(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,491045,e=>{"use strict";var r=e.i(284007);let t=(0,r.createJSONStorage)(()=>sessionStorage),s=(0,r.atomWithStorage)("wx-purchase-source-attribution",null,t);e.s(["purchaseSourceAttributionAtom",0,s])},499239,e=>{"use strict";var r=e.i(981030),t=e.i(284007);(0,r.atom)("auth");let s=(0,r.atom)(null);(0,r.atom)(null);let i=(0,r.atom)(!1),a=(0,r.atom)(null),o=(0,t.atomWithStorage)("wxu-web/keyval:cart","",void 0,{getOnInit:!0}),l=(0,r.atom)(""),n=(0,r.atom)(null),d=(0,t.atomWithStorage)("wxu-web/keyval:eventChainId","",void 0,{getOnInit:!0}),c=(0,r.atom)("idle");e.s(["addressDataAtom",0,s,"billingPreviewDataAtom",0,n,"cartProductIdAtom",0,o,"checkoutValidationAtom",0,c,"eventChainIdAtom",0,d,"promoCodeAtom",0,a,"showSuccessDialogAtom",0,i,"tpccAtom",0,l])},226843,13635,963630,576816,e=>{"use strict";let r={1027:'This email address is already registered with an account. Please click "Log In" below to sign in.',11001:'Your password cannot contain the character combination "". Please try another password.',1198:"Too many failed login attempts. Please try again later.",938:e=>e?"Email or password is invalid. Please try again":"Email not found. Try another email",936:"This email address is already registered with an account. Please log in.",1134:(e,r)=>e&&r?r:r||"Must contain at least one lowercase, uppercase, special character, and a digit",1122:"Unfortunately, you've exceeded the daily limit for requests to reset your password. For security purposes, we ask that you try again later.",967:"The password you entered isn't working. Please try again, or click Forgot Password to select a new password.",1015:"Sorry, but that password is too similar to your previous one. Please try a different password.",1187:"Sorry, this password reset link has expired. To get a new reset link, please click Forgot Password.",1185:"Sorry, but it looks like the password reset link isn't working. To get a new reset link, please click Forgot Password.",1186:"Sorry, this password reset link has already been used. To get a new reset link, please click Forgot Password.",966:"Email or password is invalid. Please try again.",975:"Your password reset link has expired. Please request a new link",974:"Your password reset link has expired. Please request a new link",1038:"Email Address is invalid, Try another email."};e.s(["getErrorCodeMessage",0,function(e,t,s){let i=e&&r[e];return("function"==typeof i?i(t,s):i)||"Sorry, it looks we're having temporary problems. Please try again later."}],226843);var t=e.i(592121),s=e.i(959194),i=e.i(947118),a=e.i(737801);e.s(["useSignupStart",0,(e={})=>{let r=(0,i.useIsInitialized)(),o=(0,a.useEventAttributes)(),[l,n]=(0,t.useState)(!1),d=(0,t.useRef)(!1),c=(0,t.useMemo)(()=>{let r={...o,formVariant:e.formVariant,sourcePage:e.sourcePage,sourceModule:e.sourceModule,sourceElement:e.sourceElement,sourcePosition:e.sourcePosition,experimentJoinList:e.experimentJoinList,mParticleGranted:e.mParticleGranted??!0};return void 0===r.formVariant&&delete r.formVariant,void 0===r.sourcePage&&delete r.sourcePage,void 0===r.sourceModule&&delete r.sourceModule,void 0===r.sourceElement&&delete r.sourceElement,void 0===r.sourcePosition&&delete r.sourcePosition,void 0===r.experimentJoinList&&delete r.experimentJoinList,r},[o,e.formVariant,e.sourcePage,e.sourceModule,e.sourceElement,e.sourcePosition,e.experimentJoinList,e.mParticleGranted]);return(0,t.useEffect)(()=>{(0,s.areObjectValuesDefined)(c)&&!l&&n(!0)},[c,l]),(0,t.useCallback)(async()=>{if(r&&l&&!d.current)try{window.mParticle?.logEvent?.("signup-start",window.mParticle?.EventType?.Other,c),d.current=!0,console.debug(`MParticle: Event "signup-start" tracked - ${c.pageId}`)}catch(e){console.error('MParticle: Event "signup-start" failed',e)}},[r,c,l])}],13635),e.s(["useSignupAbandon",0,(e={})=>{let r=(0,a.useEventAttributes)(),s=(0,t.useMemo)(()=>{let t={...r,formVariant:e.formVariant,sourcePage:e.sourcePage,sourceModule:e.sourceModule,sourceElement:e.sourceElement,sourcePosition:e.sourcePosition,experimentJoinList:e.experimentJoinList,mParticleGranted:e.mParticleGranted??!0};return void 0!==e.url&&(t.url=e.url),void 0!==e.tpcc&&(t.tpcc=e.tpcc),void 0!==e.linkReferral&&(t.linkReferral=e.linkReferral),void 0===t.formVariant&&delete t.formVariant,void 0===t.sourcePage&&delete t.sourcePage,void 0===t.sourceModule&&delete t.sourceModule,void 0===t.sourceElement&&delete t.sourceElement,void 0===t.sourcePosition&&delete t.sourcePosition,void 0===t.experimentJoinList&&delete t.experimentJoinList,t},[r,e.formVariant,e.sourcePage,e.sourceModule,e.sourceElement,e.sourcePosition,e.url,e.tpcc,e.linkReferral,e.experimentJoinList,e.mParticleGranted]);(0,t.useEffect)(()=>{let e=()=>{if(window.mParticle?.isInitialized?.())try{window.mParticle?.logEvent?.("signup-abandon",window.mParticle?.EventType?.Other,s),console.debug(`MParticle: Event "signup-abandon" tracked - ${s.pageId}`)}catch(e){console.error('MParticle: Event "signup-abandon" failed',e)}};return window.addEventListener("beforeunload",e),window.addEventListener("blur",e),()=>{window.removeEventListener("beforeunload",e),window.removeEventListener("blur",e)}},[s])}],963630),e.s(["useSignupComplete",0,(e={})=>{let r=(0,i.useIsInitialized)(),o=(0,a.useEventAttributes)(),[l,n]=(0,t.useState)(!1),d=(0,t.useRef)(!1),c=(0,t.useMemo)(()=>{let r={...o,formVariant:e.formVariant,sensitiveDataAuthorization:e.sensitiveDataAuthorization,deviceTimeZone:e.deviceTimeZone,sourcePage:e.sourcePage,sourceModule:e.sourceModule,sourceElement:e.sourceElement,sourcePosition:e.sourcePosition,mParticleGranted:e.mParticleGranted??!0};return void 0!==e.url&&(r.url=e.url),void 0===r.formVariant&&delete r.formVariant,void 0===r.sensitiveDataAuthorization&&delete r.sensitiveDataAuthorization,void 0===r.deviceTimeZone&&delete r.deviceTimeZone,void 0===r.sourcePage&&delete r.sourcePage,void 0===r.sourceModule&&delete r.sourceModule,void 0===r.sourceElement&&delete r.sourceElement,void 0===r.sourcePosition&&delete r.sourcePosition,r},[o,e.formVariant,e.url,e.sensitiveDataAuthorization,e.deviceTimeZone,e.sourcePage,e.sourceModule,e.sourceElement,e.sourcePosition,e.mParticleGranted]);return(0,t.useEffect)(()=>{(0,s.areObjectValuesDefined)(c)&&!l&&n(!0)},[c,l]),(0,t.useCallback)(async()=>{if(r&&l&&!d.current)try{window.mParticle?.logEvent?.("signup-complete",window.mParticle?.EventType?.Other,c),d.current=!0,console.debug(`MParticle: Event "signup-complete" tracked - ${c.pageId}`)}catch(e){console.error('MParticle: Event "signup-complete" failed',e)}},[r,c,l])}],576816)},617145,e=>{"use strict";var r=e.i(592121),t=e.i(546446),s=e.i(491045);let i={sourcePage:null,sourceModule:null,sourceElement:null,sourceUpsellPlacement:null};var a=e.i(959194);e.s(["usePurchaseSourceAttributes",0,()=>{let e=(0,t.useAtomValue)(s.purchaseSourceAttributionAtom),o=function(e){if(!e||"string"!=typeof e)return i;let r=e.split("-");if("mktg"!==r[0])return i;let t=r[1]||null,s=r[2]||null,a=r[3]||null,o=s&&s.toLowerCase().includes("upsell")?s:null;return{sourcePage:t,sourceModule:s,sourceElement:a,sourceUpsellPlacement:o}}((0,a.getTpcc)()),l=e?.sourcePage??o.sourcePage,n=e?.sourceModule??o.sourceModule,d=e?.sourceElement??o.sourceElement,c=e?.sourceUpsellPlacement??o.sourceUpsellPlacement;return(0,r.useMemo)(()=>({...l&&{sourcePage:l},...n&&{sourceModule:n},...d&&{sourceElement:d},...c&&{sourceUpsellPlacement:c}}),[l,n,d,c])}],617145)},782847,681488,723356,526824,e=>{"use strict";var r=e.i(592121),t=e.i(959194),s=e.i(947118),i=e.i(737801),a=e.i(617145);e.s(["usePurchaseStart",0,e=>{let o=(0,s.useIsInitialized)(),l=(0,i.useEventAttributes)(),n=(0,a.usePurchaseSourceAttributes)(),[d,c]=(0,r.useState)(!1),u=(0,r.useRef)(!1),m=(0,r.useMemo)(()=>{let r={...l,...n,step:e.step??"start",accountCreated:e.accountCreated??!1,accountLogin:e.accountLogin??!1,completed:e.completed??!1,eventChainId:e.eventChainId,premiumProductId:e.premiumProductId??void 0,weatherMode:e.weatherMode??"normal",experimentJoinList:e.experimentJoinList??void 0,mParticleGranted:e.mParticleGranted??!0};return void 0===r.premiumProductId&&delete r.premiumProductId,void 0===r.experimentJoinList&&delete r.experimentJoinList,r},[l,n,e.step,e.accountCreated,e.accountLogin,e.completed,e.eventChainId,e.premiumProductId,e.weatherMode,e.experimentJoinList,e.mParticleGranted]);return(0,r.useEffect)(()=>{(0,t.areObjectValuesDefined)(m)&&!d&&c(!0)},[m,d]),(0,r.useCallback)(async()=>{if(o&&d&&!u.current)try{window.mParticle?.logEvent?.("purchase-start",window.mParticle?.EventType?.Other,m),u.current=!0,console.debug(`MParticle: Event "purchase-start" tracked - ${m.pageId}`)}catch(e){console.error('MParticle: Event "purchase-start" failed',e)}},[o,m,d])}],782847);var o=e.i(699173),l=e.i(144977),n=e.i(156207),d=e.i(291967),c=e.i(534643),u=e.i(853233),m=e.i(653747),h=e.i(556872),p="Checkbox",[x,f]=(0,n.createContextScope)(p),[g,v]=x(p);function w(e){let{__scopeCheckbox:t,checked:s,children:i,defaultChecked:a,disabled:l,form:n,name:d,onCheckedChange:u,required:m,value:h="on",internal_do_not_use_render:x}=e,[f,v]=(0,c.useControllableState)({prop:s,defaultProp:a??!1,onChange:u,caller:p}),[w,b]=r.useState(null),[j,y]=r.useState(null),P=r.useRef(!1),k=!w||!!n||!!w.closest("form"),E={checked:f,disabled:l,setChecked:v,control:w,setControl:b,name:d,form:n,value:h,hasConsumerStoppedPropagationRef:P,required:m,defaultChecked:!N(a)&&a,isFormControl:k,bubbleInput:j,setBubbleInput:y};return(0,o.jsx)(g,{scope:t,...E,children:"function"==typeof x?x(E):i})}var b="CheckboxTrigger",j=r.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:s,...i},a)=>{let{control:n,value:c,disabled:u,checked:m,required:p,setControl:x,setChecked:f,hasConsumerStoppedPropagationRef:g,isFormControl:w,bubbleInput:j}=v(b,e),y=(0,l.useComposedRefs)(a,x),P=r.useRef(m);return r.useEffect(()=>{let e=n?.form;if(e){let r=()=>f(P.current);return e.addEventListener("reset",r),()=>e.removeEventListener("reset",r)}},[n,f]),(0,o.jsx)(h.Primitive.button,{type:"button",role:"checkbox","aria-checked":N(m)?"mixed":m,"aria-required":p,"data-state":M(m),"data-disabled":u?"":void 0,disabled:u,value:c,...i,ref:y,onKeyDown:(0,d.composeEventHandlers)(t,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:(0,d.composeEventHandlers)(s,e=>{f(e=>!!N(e)||!e),j&&w&&(g.current=e.isPropagationStopped(),g.current||e.stopPropagation())})})});j.displayName=b;var y=r.forwardRef((e,r)=>{let{__scopeCheckbox:t,name:s,checked:i,defaultChecked:a,required:l,disabled:n,value:d,onCheckedChange:c,form:u,...m}=e;return(0,o.jsx)(w,{__scopeCheckbox:t,checked:i,defaultChecked:a,disabled:n,required:l,onCheckedChange:c,name:s,form:u,value:d,internal_do_not_use_render:({isFormControl:e})=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(j,{...m,ref:r,__scopeCheckbox:t}),e&&(0,o.jsx)(C,{__scopeCheckbox:t})]})})});y.displayName=p;var P="CheckboxIndicator",k=r.forwardRef((e,r)=>{let{__scopeCheckbox:t,forceMount:s,...i}=e,a=v(P,t);return(0,o.jsx)(m.Presence,{present:s||N(a.checked)||!0===a.checked,children:(0,o.jsx)(h.Primitive.span,{"data-state":M(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:r,style:{pointerEvents:"none",...e.style}})})});k.displayName=P;var E="CheckboxBubbleInput",C=r.forwardRef(({__scopeCheckbox:e,...t},s)=>{let i,{control:a,hasConsumerStoppedPropagationRef:n,checked:d,defaultChecked:c,required:m,disabled:p,name:x,value:f,form:g,bubbleInput:w,setBubbleInput:b}=v(E,e),j=(0,l.useComposedRefs)(s,b),y=(i=r.useRef({value:d,previous:d}),r.useMemo(()=>(i.current.value!==d&&(i.current.previous=i.current.value,i.current.value=d),i.current.previous),[d])),P=(0,u.useSize)(a);r.useEffect(()=>{if(!w)return;let e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set,r=!n.current;if(y!==d&&e){let t=new Event("click",{bubbles:r});w.indeterminate=N(d),e.call(w,!N(d)&&d),w.dispatchEvent(t)}},[w,y,d,n]);let k=r.useRef(!N(d)&&d);return(0,o.jsx)(h.Primitive.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??k.current,required:m,disabled:p,name:x,value:f,form:g,...t,tabIndex:-1,ref:j,style:{...t.style,...P,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function N(e){return"indeterminate"===e}function M(e){return N(e)?"indeterminate":e?"checked":"unchecked"}C.displayName=E;var I=e.i(632137),A=e.i(269767),S=e.i(747961);let F=(0,r.forwardRef)(({title:e,titleId:r,desc:t,descId:s,...i},a)=>(0,o.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:a,"aria-labelledby":r,"aria-describedby":s,...i,children:[t?(0,o.jsx)("desc",{id:s,children:t}):null,void 0===e?(0,o.jsx)("title",{id:r,children:"Checkbox Checked"}):e?(0,o.jsx)("title",{id:r,children:e}):null,(0,o.jsx)("path",{fill:"currentColor",d:"M13 2a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zM7 9.173 5.295 7.5l-.795.771L7 10.75l.348-.346.005-.003L11.1 6.688l.005-.01.395-.389-.796-.789z"})]})),L=r.default.forwardRef((e,r)=>(0,o.jsx)(S.BaseIcon,{ref:r,icon:F,...e}));L.displayName="CheckboxCheckedFilled";let T=(0,r.forwardRef)(({title:e,titleId:r,desc:t,descId:s,...i},a)=>(0,o.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:a,"aria-labelledby":r,"aria-describedby":s,...i,children:[t?(0,o.jsx)("desc",{id:s,children:t}):null,void 0===e?(0,o.jsx)("title",{id:r,children:"Checkbox Indeterminate"}):e?(0,o.jsx)("title",{id:r,children:e}):null,(0,o.jsxs)("g",{fill:"currentColor",children:[(0,o.jsx)("path",{d:"M11 8a1 1 0 0 0-1-1H6a1 1 0 0 0 0 2h4a1 1 0 0 0 1-1"}),(0,o.jsx)("path",{d:"M13 2H3a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1M3.5 13a.5.5 0 0 1-.5-.5v-9a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5z"})]})]})),V=r.default.forwardRef((e,r)=>(0,o.jsx)(S.BaseIcon,{ref:r,icon:T,...e}));V.displayName="CheckboxIndeterminate";let R=(0,r.forwardRef)(({title:e,titleId:r,desc:t,descId:s,...i},a)=>(0,o.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:a,"aria-labelledby":r,"aria-describedby":s,...i,children:[t?(0,o.jsx)("desc",{id:s,children:t}):null,void 0===e?(0,o.jsx)("title",{id:r,children:"Checkbox"}):e?(0,o.jsx)("title",{id:r,children:e}):null,(0,o.jsx)("path",{fill:"currentColor",d:"M13 2H3a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1M3.5 13a.5.5 0 0 1-.5-.5v-9a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5z"})]})),z=r.default.forwardRef((e,r)=>(0,o.jsx)(S.BaseIcon,{ref:r,icon:R,...e}));function B({className:e,checked:t,defaultChecked:s,onCheckedChange:i,...a}){let[l,n]=(0,r.useState)(void 0!==t?t:s||!1);(0,r.useEffect)(()=>{void 0!==t&&n(t)},[t]);let d="indeterminate"===l?V:l?L:z;return(0,o.jsx)(y,{"data-slot":"checkbox",className:(0,I.cn)("peer disabled:cursor-not-allowed disabled:opacity-50",e),...a,checked:l,onCheckedChange:e=>{void 0===t&&n(e),i?.(e)},children:(0,o.jsx)(k,{className:"flex items-center justify-center text-current transition-none","data-slot":"checkbox-indicator",forceMount:!0,children:(0,o.jsx)(d,{className:"size-6"})})})}z.displayName="Checkbox",e.s(["Checkbox",0,({id:e,label:r,size:t="standard",wrapperClassName:s,leftPos:i,...a})=>(0,o.jsxs)(A.FormItem,{id:e,className:(0,I.cn)("flex w-full gap-3",i?"flex-row-reverse justify-end":"flex-row justify-between",s),children:[(0,o.jsx)("div",{className:"pt-0.5",children:(0,o.jsx)(A.FormLabel,{className:(0,I.cn)("large"===t&&"text-lg"),children:r})}),(0,o.jsx)("div",{children:(0,o.jsx)(A.FormControl,{children:(0,o.jsx)(B,{...a})})})]})],681488);let U=(0,r.forwardRef)(({title:e,titleId:r,desc:t,descId:s,...i},a)=>(0,o.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:a,"aria-labelledby":r,"aria-describedby":s,...i,children:[t?(0,o.jsx)("desc",{id:s,children:t}):null,void 0===e?(0,o.jsx)("title",{id:r,children:"Person"}):e?(0,o.jsx)("title",{id:r,children:e}):null,(0,o.jsx)("g",{fill:"currentColor",children:(0,o.jsx)("path",{d:"M8.936 15H7.07a.92.92 0 0 1-.66-.283.98.98 0 0 1-.274-.683v-3.379a.92.92 0 0 1-.66-.283.98.98 0 0 1-.273-.682V6.793c0-.384.148-.752.41-1.024.263-.272.619-.424.99-.424h2.8c.371 0 .727.152.99.424s.41.64.41 1.024V9.69a.98.98 0 0 1-.273.682.92.92 0 0 1-.66.283v3.38a.98.98 0 0 1-.274.682.92.92 0 0 1-.66.283M6.603 6.31a.43.43 0 0 0-.339.132.46.46 0 0 0-.128.351V9.69h.934v4.345h1.866V9.69h.934V6.793a.47.47 0 0 0-.128-.35.44.44 0 0 0-.339-.133zM8.003 4.862c-.37 0-.73-.113-1.037-.325a1.9 1.9 0 0 1-.687-.867 2 2 0 0 1-.107-1.116c.072-.374.25-.718.511-.988s.594-.454.956-.529a1.8 1.8 0 0 1 1.078.11c.342.146.633.394.838.711.205.318.315.691.315 1.073 0 .512-.197 1.003-.547 1.365s-.825.566-1.32.566m0-2.896a.9.9 0 0 0-.518.162.96.96 0 0 0-.344.434 1 1 0 0 0 .202 1.052c.13.135.297.227.478.264a.9.9 0 0 0 .54-.055.94.94 0 0 0 .418-.356.99.99 0 0 0-.116-1.219.92.92 0 0 0-.66-.282"})})]})),O=r.default.forwardRef((e,r)=>(0,o.jsx)(S.BaseIcon,{ref:r,icon:U,...e}));O.displayName="Person",e.s(["Person",0,O],723356);var D=e.i(528600),J=e.i(546446);let G=(0,e.i(284007).atomWithStorage)("upsxLastNames",{},void 0,{getOnInit:!0}),H=e=>btoa(e.trim().toLowerCase());e.s(["useUserLastName",0,()=>{let{userProfile:e}=(0,D.useUser)(),{email:t}=e||{},s=(0,J.useSetAtom)(G),i=(0,J.useAtomValue)(G),a=(0,r.useCallback)((e,r)=>{s(t=>({...t,[H(e)]:r}))},[]);return{userLastName:i[H(t||"")]||void 0,setUserLastName:a}}],526824)},920654,e=>{"use strict";var r=e.i(546446),t=e.i(961123),s=e.i(499239);e.s(["useCart",0,function(){let e=(0,t.useSearchParams)().get("products"),[i,a]=(0,r.useAtom)(s.cartProductIdAtom);return{productId:e||i,setProductId:a}}])},264268,e=>{"use strict";var r=e.i(699173),t=e.i(592121),s=e.i(990420),i=e.i(666021),a=e.i(924689),o=e.i(683903),l=e.i(790010),n=e.i(226843),d=e.i(13635),c=e.i(963630),u=e.i(576816),m=e.i(782847),h=e.i(269767),p=e.i(825440),x=e.i(677988),f=e.i(681488),g=e.i(877957),v=e.i(368847),w=e.i(240058),b=e.i(837879),j=e.i(609958),y=e.i(723356),P=e.i(558802),k=e.i(422825),E=e.i(918462),C=e.i(961123),N=e.i(528600),M=e.i(725296),I=e.i(394481),A=e.i(526824),S=e.i(703123),F=e.i(546446),L=e.i(499239),T=e.i(920654);let V=a.z.object({firstName:a.z.string().min(1,{error:"First name is required"}),lastName:a.z.string().min(1,{error:"Last name is required"}),email:a.z.email({message:"Please enter a valid email address"}),password:a.z.string().min(8,{message:"Password must be at least 8 characters"}).regex(/[^A-Za-z0-9\s]/,{message:"Password must include at least one special character"}),newsletterEmails:a.z.boolean().optional(),weeklyEmails:a.z.boolean().optional(),marketingEmails:a.z.boolean().optional(),onYourRadarEmails:a.z.boolean().optional()});e.s(["default",0,({signupBtnText:e})=>{let a=(0,o.useTranslations)("UserAuth"),{signup:R,authRedirect:z}=(0,l.useUserSignup)(),{updateEmailSubscriptions:B}=(0,k.useEmailPreferences)({skipStatus:!0}),[U,O]=(0,t.useState)(!1),[D,J]=(0,t.useState)(null),{user:G}=(0,N.useUser)(),H=(0,b.useSubscriptionsEnabled)(),Y=(0,F.useAtomValue)(I.privacyRegimeAtom)??M.default.EXEMPT,Z=(0,C.useParams)()?.locale||"",_=G?.isUserLoggedIn||!1,{legalLinks:W}=(0,E.useFooterLinks)(Y,Z,_,!1),{productId:q}=(0,T.useCart)(),K=(0,F.useAtomValue)(L.eventChainIdAtom),{setUserLastName:$}=(0,A.useUserLastName)(),X=(0,F.useSetAtom)(S.gsiEmailStatesAtom),Q=(0,s.useForm)({resolver:(0,i.zodResolver)(V),defaultValues:{firstName:"",lastName:"",email:"",password:""}}),[ee,er,et,es]=Q.watch(["newsletterEmails","weeklyEmails","onYourRadarEmails","marketingEmails"]);(0,t.useEffect)(()=>X({newsletter:ee,weekly:er,onYourRadar:et,marketing:es}),[X,ee,er,et,es]);let ei=(0,d.useSignupStart)({formVariant:"checkout",sourceModule:null,sourceElement:"subscriptionnull",sourcePosition:"header-3"});(0,t.useEffect)(()=>{ei()},[ei]),(0,c.useSignupAbandon)({formVariant:"checkout",sourceModule:null,sourceElement:"subscriptionnull",sourcePosition:"header-3"});let ea=(0,m.usePurchaseStart)({step:"account",accountCreated:!0,accountLogin:!1,completed:!1,eventChainId:K||"",premiumProductId:q}),eo=(0,u.useSignupComplete)({formVariant:"subscription page",sensitiveDataAuthorization:!0,deviceTimeZone:"u">typeof Intl?Intl.DateTimeFormat().resolvedOptions().timeZone:void 0}),el=(0,t.useMemo)(()=>W.find(e=>"termsOfUse"===e.titleTranslationKey),[W]),en=(0,t.useMemo)(()=>W.find(e=>"privacyPolicy"===e.titleTranslationKey),[W]),ed=async e=>{O(!0),J(null);try{let{success:r,error:t}=await R({firstName:e.firstName,email:e.email,password:e.password},!1);if(!r){J((0,n.getErrorCodeMessage)(t.messageCode)),O(!1);return}$(e.email,e.lastName),ea(),await eo(),await B({newsletter:e.newsletterEmails,weekly:e.weeklyEmails,onYourRadar:e.onYourRadarEmails,marketing:e.marketingEmails}).catch(e=>{console.error("Failed to update email subscriptions",e)}),z()}catch(e){J("An error occurred during registration. Please try again."),console.error("Signup error:",e),O(!1)}};return(0,r.jsxs)("div",{children:[D&&(0,r.jsx)(v.Text,{color:"error",className:"mb-4",children:D}),(0,r.jsx)(h.Form,{...Q,children:(0,r.jsxs)("form",{onSubmit:Q.handleSubmit(ed),children:[(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,r.jsx)(h.FormField,{control:Q.control,name:"firstName",render:({field:e})=>(0,r.jsx)(h.FormItem,{children:(0,r.jsx)(h.FormControl,{children:(0,r.jsx)(p.Input,{...e,label:a("firstName"),icon:y.Person})})})}),(0,r.jsx)(h.FormField,{control:Q.control,name:"lastName",render:({field:e})=>(0,r.jsx)(h.FormItem,{children:(0,r.jsx)(h.FormControl,{children:(0,r.jsx)(p.Input,{...e,label:a("lastName"),icon:y.Person})})})})]}),(0,r.jsx)(h.FormField,{control:Q.control,name:"email",render:({field:e})=>(0,r.jsx)(h.FormItem,{children:(0,r.jsx)(h.FormControl,{children:(0,r.jsx)(p.Input,{...e,label:a("email"),icon:j.Email})})})}),(0,r.jsx)(h.FormField,{control:Q.control,name:"password",render:({field:e})=>(0,r.jsx)(h.FormItem,{children:(0,r.jsx)(h.FormControl,{children:(0,r.jsx)(x.PasswordInput,{...e,label:a("password"),icon:P.Locked})})})}),H&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.FormField,{control:Q.control,name:"newsletterEmails",render:({field:{value:e,onChange:t,...s}})=>(0,r.jsx)(f.Checkbox,{...s,checked:e,onCheckedChange:t,label:a("newsletterEmailsConsent"),wrapperClassName:"mb-6",leftPos:!0})}),(0,r.jsx)(h.FormField,{control:Q.control,name:"weeklyEmails",defaultValue:!0,render:({field:{value:e,onChange:t,...s}})=>(0,r.jsx)(f.Checkbox,{...s,checked:e,onCheckedChange:t,label:a("weeklyEmailsConsent"),wrapperClassName:"mb-6",leftPos:!0})}),(0,r.jsx)(h.FormField,{control:Q.control,name:"onYourRadarEmails",defaultValue:!0,render:({field:{value:e,onChange:t,...s}})=>(0,r.jsx)(f.Checkbox,{...s,checked:e,onCheckedChange:t,label:a("onYourRadarEmailsConsent"),wrapperClassName:"mb-6",leftPos:!0})}),(0,r.jsx)(h.FormField,{control:Q.control,name:"marketingEmails",defaultValue:!0,render:({field:{value:e,onChange:t,...s}})=>(0,r.jsx)(f.Checkbox,{...s,checked:e,onCheckedChange:t,label:a("marketingEmailsConsent"),wrapperClassName:"mb-6",leftPos:!0})})]}),(0,r.jsx)(v.Text,{className:"mt-4 mb-8 font-normal",children:a.rich("agreeTermsContinue",{div:e=>(0,r.jsx)(w.default,{href:el?.url||"",className:"text-blue-600 underline",children:e}),p:e=>(0,r.jsx)(w.default,{href:en?.url||"",className:"text-blue-600 underline",children:e})})}),(0,r.jsx)(g.Button,{type:"submit",loading:U,disabled:U,children:e||a("signup")})]})})]})}])},677988,609958,e=>{"use strict";var r=e.i(699173),t=e.i(592121),s=e.i(825440),i=e.i(877957),a=e.i(747961);let o=(0,t.forwardRef)(({title:e,titleId:t,desc:s,descId:i,...a},o)=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:o,"aria-labelledby":t,"aria-describedby":i,...a,children:[s?(0,r.jsx)("desc",{id:i,children:s}):null,void 0===e?(0,r.jsx)("title",{id:t,children:"View Off"}):e?(0,r.jsx)("title",{id:t,children:e}):null,(0,r.jsxs)("g",{fill:"currentColor",children:[(0,r.jsx)("path",{d:"M2.277 10.923a.48.48 0 0 0 .681-.004.53.53 0 0 0-.004-.742A7 7 0 0 1 1.534 8C2.55 5.465 5.35 3.5 8 3.5a6.2 6.2 0 0 1 1.686.258.55.55 0 0 0 .547-.132c.259-.261.171-.7-.181-.808A7.4 7.4 0 0 0 8 2.5 8.35 8.35 0 0 0 .53 7.83a.5.5 0 0 0 0 .34 8 8 0 0 0 1.747 2.753"}),(0,r.jsx)("path",{d:"M6 7.865a2 2 0 0 1 1.85-1.85l.905-.91A3 3 0 0 0 5.09 8.77zM15.47 7.83a8.2 8.2 0 0 0-2.87-3.72l2.048-2.052a.499.499 0 0 0-.706-.705l-12.59 12.59a.499.499 0 0 0 .705.705l2.198-2.198A7.65 7.65 0 0 0 8 13.5a8.35 8.35 0 0 0 7.47-5.33.5.5 0 0 0 0-.34M10 8a2 2 0 0 1-3 1.72L9.72 7A2 2 0 0 1 10 8m-2 4.5a6.5 6.5 0 0 1-3-.79l1.27-1.27a3 3 0 0 0 4.175-4.175L11.88 4.83A7.27 7.27 0 0 1 14.465 8C13.45 10.535 10.65 12.5 8 12.5"})]})]})),l=t.default.forwardRef((e,t)=>(0,r.jsx)(a.BaseIcon,{ref:t,icon:o,...e}));l.displayName="ViewOff";var n=e.i(245308);let d=t.default.forwardRef(({className:e,label:a="Password",error:o,...d},c)=>{let[u,m]=(0,t.useState)(!1);return(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(s.Input,{label:a,type:u?"text":"password",error:o,ref:c,...d,onClear:void 0}),(0,r.jsx)(i.Button,{type:"button",onClick:()=>{m(!u)},variant:"ghost",size:"text","data-testid":"password-toggle-button",className:"absolute top-4 right-0 flex items-center hover:bg-transparent",children:u?(0,r.jsx)(l,{className:"h-4 w-4 text-gray-500"}):(0,r.jsx)(n.View,{className:"h-4 w-4 text-gray-500"})})]})});d.displayName="PasswordInput",e.s(["PasswordInput",0,d],677988);let c=(0,t.forwardRef)(({title:e,titleId:t,desc:s,descId:i,...a},o)=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:o,"aria-labelledby":t,"aria-describedby":i,...a,children:[s?(0,r.jsx)("desc",{id:i,children:s}):null,void 0===e?(0,r.jsx)("title",{id:t,children:"Email"}):e?(0,r.jsx)("title",{id:t,children:e}):null,(0,r.jsx)("path",{fill:"currentColor",d:"M14 3H2a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1m-1.1 1L8 7.39 3.1 4zM2 12V4.455L7.715 8.41a.5.5 0 0 0 .57 0L14 4.455V12z"})]})),u=t.default.forwardRef((e,t)=>(0,r.jsx)(a.BaseIcon,{ref:t,icon:c,...e}));u.displayName="Email",e.s(["Email",0,u],609958)},105335,e=>{"use strict";var r=e.i(699173),t=e.i(592121),s=e.i(747961);let i=(0,t.forwardRef)(({title:e,titleId:t,desc:s,descId:i,...a},o)=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:o,"aria-labelledby":t,"aria-describedby":i,...a,children:[s?(0,r.jsx)("desc",{id:i,children:s}):null,void 0===e?(0,r.jsx)("title",{id:t,children:"Warning"}):e?(0,r.jsx)("title",{id:t,children:e}):null,(0,r.jsxs)("g",{fill:"currentColor",clipPath:"url(#a)",children:[(0,r.jsx)("path",{d:"M8.81 11.454a.8.8 0 1 1-1.6 0 .8.8 0 0 1 1.6 0M8.747 8.8V4.4a.75.75 0 1 0-1.5 0v4.4a.75.75 0 1 0 1.5 0"}),(0,r.jsx)("path",{fillRule:"evenodd",d:"M.83 8a7.167 7.167 0 1 1 14.333 0A7.167 7.167 0 0 1 .83 8m7.167-6.166a6.167 6.167 0 1 0 0 12.333 6.167 6.167 0 0 0 0-12.333",clipRule:"evenodd"})]}),(0,r.jsx)("defs",{children:(0,r.jsx)("clipPath",{id:"a",children:(0,r.jsx)("path",{fill:"currentColor",d:"M0 0h16v16H0z"})})})]})),a=t.default.forwardRef((e,t)=>(0,r.jsx)(s.BaseIcon,{ref:t,icon:i,...e}));a.displayName="Warning",e.s(["Warning",0,a])},983950,e=>{"use strict";var r=e.i(699173),t=e.i(592121),s=e.i(404893),i=e.i(546446);e.s(["default",0,function({type:e="standard",text:a="continue_with",theme:o="outline",size:l="large",shape:n="rectangular",logo_alignment:d="center",className:c=""}){let u=(0,i.useAtomValue)(s.googleLoginInitilizedAtom),m=(0,t.useRef)(null);return(0,t.useEffect)(()=>{let r=window?.google?.accounts?.id;r&&r?.renderButton(m.current,{type:e,shape:n,theme:o,text:a,size:l,logo_alignment:d})},[e,o,l,a,n,d,u]),(0,r.jsx)("div",{id:"google-login-button",ref:m,className:`google-login-button ${c}`,"data-testid":"google-login-button"})}])},118119,e=>{"use strict";var r=e.i(699173),t=e.i(592121),s=e.i(990420),i=e.i(666021),a=e.i(683903),o=e.i(924689),l=e.i(143851),n=e.i(269767),d=e.i(240058),c=e.i(825440),u=e.i(368847),m=e.i(677988),h=e.i(877957),p=e.i(609958),x=e.i(558802);let f=o.z.object({email:o.z.email({message:"Please enter a valid email address"}),password:o.z.string().min(8,{message:"Password must be at least 8 characters"})});e.s(["default",0,({loginBtnText:e})=>{let o=(0,a.useTranslations)("UserAuth"),{login:g}=(0,l.useUserLogin)(),[v,w]=(0,t.useState)(!1),[b,j]=(0,t.useState)(null),y=(0,s.useForm)({resolver:(0,i.zodResolver)(f),defaultValues:{email:"",password:""}}),P=async e=>{w(!0),j(null);try{await g(e.email,e.password)||(j("Invalid email or password. Please try again."),w(!1))}catch(e){j("An error occurred during login. Please try again."),w(!1),console.error("Login error:",e)}};return(0,r.jsxs)("div",{className:"@container/loginForm",children:[b&&(0,r.jsx)("div",{className:"rounded border border-red-200 bg-red-50 px-4 py-3 text-red-700",children:b}),(0,r.jsx)(n.Form,{...y,children:(0,r.jsxs)("form",{onSubmit:y.handleSubmit(P),children:[(0,r.jsx)(n.FormField,{control:y.control,name:"email",render:({field:e})=>(0,r.jsx)(n.FormItem,{children:(0,r.jsx)(n.FormControl,{children:(0,r.jsx)(c.Input,{...e,type:"email",label:o("email"),icon:p.Email})})})}),(0,r.jsx)(n.FormField,{control:y.control,name:"password",render:({field:e})=>(0,r.jsx)(n.FormItem,{children:(0,r.jsx)(n.FormControl,{children:(0,r.jsx)(m.PasswordInput,{...e,label:o("password"),icon:x.Locked})})})}),(0,r.jsxs)("div",{className:"prose mb-6 flex max-w-full flex-col justify-between gap-2 @lg/loginForm:flex-row-reverse @lg/loginForm:gap-6",children:[(0,r.jsx)("div",{className:"@max-lg/loginForm:text-right",children:(0,r.jsx)(d.default,{href:"/forgot-password",className:"text-sm whitespace-nowrap hover:underline",children:o("forgotPassword")})}),(0,r.jsx)(u.Text,{className:"m-0 @lg/loginForm:max-w-xl",dangerouslySetInnerHTML:{__html:o.raw("authenticationUniformityNote")}})]}),(0,r.jsx)(h.Button,{type:"submit",loading:v,disabled:v,children:e||o("signin")})]})})]})}])},81083,e=>{"use strict";var r=e.i(699173),t=e.i(592121),s=e.i(683903),i=e.i(118119),a=e.i(264268),o=e.i(877957),l=e.i(368847),n=e.i(983950),d=e.i(528600),c=e.i(731672),u=e.i(526824);e.s(["default",0,({initSignin:e})=>{let[m,h]=(0,t.useState)(e),p=(0,s.useTranslations)("UserAuth"),{user:x,userProfile:f}=(0,d.useUser)(),{email:g,firstName:v}=f||{},w=(0,c.useUserLogout)(),{userLastName:b}=(0,u.useUserLastName)();return x?.isUserLoggedIn?(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-6 flex items-end justify-between gap-1",children:[(0,r.jsx)(l.Text,{variant:"Title.M",color:"secondary",className:"font-semibold",children:p("yourAccount")}),(0,r.jsx)(o.Button,{variant:"link",type:"button",className:(0,l.textVariants)({className:"h-[revert] p-0",variant:"Body.M"}),onClick:()=>w(),children:p("logout")})]}),(0,r.jsxs)(l.Text,{color:"secondary",children:[v," ",b]}),(0,r.jsx)(l.Text,{color:"secondary",children:g})]}):(0,r.jsx)("div",{children:m?(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-4 flex justify-between",children:[(0,r.jsx)(l.Text,{variant:"Title.M",className:"font-semibold",children:p("signin")}),(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsxs)(l.Text,{color:"secondary",children:[p("noAccount")," "]}),(0,r.jsx)(o.Button,{variant:"link",type:"button",className:(0,l.textVariants)({className:"h-[revert] p-0",variant:"Body.M",color:"secondary"}),onClick:()=>h(!1),children:p("signup")})]})]}),(0,r.jsx)(i.default,{loginBtnText:p("signinAndContinue")})]}):(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)(l.Text,{className:"mb-2",children:p("haveAccount")}),(0,r.jsxs)("div",{className:"flex justify-center gap-4",children:[(0,r.jsx)(o.Button,{variant:"secondary",className:"bg-gray-100",onClick:()=>h(!0),children:p("signin")}),(0,r.jsx)(n.default,{text:"signin_with",shape:"pill"})]})]}),(0,r.jsxs)("div",{className:"relative my-6",children:[(0,r.jsx)("div",{className:"absolute inset-0 flex items-center",children:(0,r.jsx)("div",{className:"w-full border-t border-gray-300"})}),(0,r.jsx)("div",{className:"relative flex justify-center text-sm",children:(0,r.jsx)("span",{className:"bg-white px-2 text-gray-500 uppercase",children:p("or")})})]}),(0,r.jsx)(l.Text,{variant:"Title.M",className:"mb-4 font-semibold",children:p("signup")}),(0,r.jsx)(a.default,{signupBtnText:p("signupAndContinue")})]})})}])}]);