PageSourceSearch

https://bdayrecap.com/_next/static/chunks/pages/signup-44078b8149ecfcfc.js

js bdayrecap.com collected 2026-10-04 06:14:19 UTC 10,007 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[252],{569:(e,t,s)=>{"use strict";s.d(t,{A:()=>i});var a=s(7876);s(4232);var r=s(8230),n=s.n(r);let i=e=>{let{className:t}=e;return(0,a.jsx)("footer",{className:"bg-gray-100 py-6 ".concat(t),children:(0,a.jsxs)("div",{className:"max-w-4xl mx-auto px-4 text-center",children:[(0,a.jsxs)("p",{className:"text-sm text-gray-600 mb-2",children:["Birthday News Content provided by"," ",(0,a.jsx)("a",{href:"https://www.nytimes.com",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline",children:"The New York Times"})]}),(0,a.jsxs)("div",{className:"flex flex-wrap justify-center gap-x-3 gap-y-1",children:[(0,a.jsx)(n(),{href:"/on-this-day",className:"text-sm text-blue-600 hover:underline",children:"On This Day"}),(0,a.jsx)(n(),{href:"/weather",className:"text-sm text-blue-600 hover:underline",children:"Birthday Weather"}),(0,a.jsx)(n(),{href:"/privacy",className:"text-sm text-blue-600 hover:underline",children:"Privacy Policy"})]})]})})}},1356:(e,t,s)=>{"use strict";s.d(t,{A:()=>d});var a=s(7876),r=s(8230),n=s.n(r),i=s(4232),l=s(9099),o=s(8497);function c(){let e=(0,l.useRouter)(),[t,s]=(0,i.useState)(null),[r,c]=(0,i.useState)(!1),[d,u]=(0,i.useState)(!1),[h,x]=(0,i.useState)("");(0,i.useEffect)(()=>{let e,t=!0;try{let a=(0,o.c)();a.auth.getSession().then(e=>{let{data:a}=e;if(t){var r;s(null!=(r=a.session)?r:null),c(!0)}}).catch(()=>{t&&c(!0)});let{data:r}=a.auth.onAuthStateChange((e,a)=>{t&&(s(a),c(!0))});e=r.subscription}catch(e){c(!0)}return()=>{t=!1,null==e||e.unsubscribe()}},[]);let m=async()=>{x(""),u(!0);try{let t=(0,o.c)(),{error:s}=await t.auth.signOut();if(s)throw s;await e.push("/")}catch(e){x("Could not log out. Please try again.")}finally{u(!1)}};return(0,a.jsxs)("nav",{className:"flex items-center gap-3","aria-label":"Account navigation",children:[(0,a.jsx)(n(),{href:"/birthday-emails",className:"whitespace-nowrap font-serif text-sm transition-colors hover:text-gray-600 sm:text-base",children:"Birthday emails"}),r?t?(0,a.jsx)("button",{type:"button",onClick:m,disabled:d,className:"whitespace-nowrap rounded border border-black px-3 py-1 font-serif text-sm transition-colors hover:bg-black hover:text-white disabled:cursor-wait disabled:opacity-60",children:d?"Logging out…":"Log out"}):(0,a.jsx)(n(),{href:"/login",className:"whitespace-nowrap rounded border border-black px-3 py-1 font-serif text-sm transition-colors hover:bg-black hover:text-white",children:"Log in"}):(0,a.jsx)("span",{className:"text-sm text-gray-500",role:"status",children:"Account…"}),h&&(0,a.jsx)("span",{className:"text-xs text-red-700",role:"alert",children:h})]})}function d(){return(0,a.jsx)("header",{className:"w-full border-b border-black bg-yellow-50 px-4 py-4 sm:px-8",children:(0,a.jsxs)("div",{className:"mx-auto flex max-w-7xl flex-wrap items-center justify-between gap-4",children:[(0,a.jsxs)("nav",{className:"flex flex-wrap items-center gap-2 sm:gap-6","aria-label":"Primary navigation",children:[(0,a.jsx)(n(),{href:"/",className:"font-serif text-sm transition duration-200 hover:text-gray-600 sm:text-lg lg:ml-5 lg:mr-3",children:"Home"}),(0,a.jsx)(n(),{href:"/blog",className:"font-serif text-sm transition duration-200 hover:text-gray-600 sm:text-lg",children:"Blog"}),(0,a.jsx)(n(),{href:"/on-this-day",className:"font-serif text-sm transition duration-200 hover:text-gray-600 sm:text-lg",children:"On This Day"}),(0,a.jsx)(n(),{href:"/weather",className:"font-serif text-sm transition duration-200 hover:text-gray-600 sm:text-lg",children:"Weather"})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-3 sm:gap-4",children:[(0,a.jsxs)(n(),{href:"/blog/featured/best-birthday-presents-for-your-kids",className:"inline-flex items-center gap-2 rounded-full bg-black text-white px-3 py-1 text-xs sm:text-sm font-serif hover:bg-gray-800 transition-colors",title:"Read our Birthday Gift Guide",children:[(0,a.jsx)("span",{"aria-hidden":!0,children:"\uD83C\uDF81"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Birthday Gift Guide"})]}),(0,a.jsx)(c,{})]})]})})}},1468:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/signup",function(){return s(6087)}])},6087:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>x});var a=s(7876),r=s(4232),n=s(7328),i=s.n(n),l=s(8230),o=s.n(l),c=s(9099),d=s(569),u=s(1356),h=s(8497);function x(){let e=(0,c.useRouter)(),[t,s]=(0,r.useState)(""),[n,l]=(0,r.useState)(""),[x,m]=(0,r.useState)(""),[p,f]=(0,r.useState)(""),[g,b]=(0,r.useState)(""),[y,w]=(0,r.useState)(!1),j=(0,h.q)(e.query.next),N=async s=>{if(s.preventDefault(),f(""),n!==x)return void f("The passwords do not match.");w(!0);try{let s=t.trim(),a=(0,h.c)(),{data:r,error:i}=await a.auth.signUp({email:s,password:n,options:{emailRedirectTo:"".concat(window.location.origin).concat(j)}});if(i)throw i;if(r.session)return void await e.replace(j);b(s)}catch(e){f((null==e?void 0:e.code)==="weak_password"?"Choose a stronger password with at least 8 characters.":(null==e?void 0:e.code)==="over_email_send_rate_limit"?"Too many confirmation emails were requested. Wait a little while and try again.":(null==e?void 0:e.message)||"We could not create your account. Please try again.")}finally{w(!1)}};return(0,a.jsxs)("div",{className:"flex min-h-screen flex-col bg-yellow-50",children:[(0,a.jsxs)(i(),{children:[(0,a.jsx)("title",{children:"Sign up | Birthday Recap"}),(0,a.jsx)("meta",{name:"description",content:"Create an account to schedule birthday recap emails."}),(0,a.jsx)("meta",{name:"robots",content:"noindex, follow"})]}),(0,a.jsx)(u.A,{}),(0,a.jsx)("main",{className:"flex flex-1 items-center justify-center px-4 py-12",children:(0,a.jsxs)("section",{className:"w-full max-w-md rounded-lg border border-black bg-white p-6 shadow-sm sm:p-8",children:[(0,a.jsx)("h1",{className:"font-serif text-3xl font-bold text-gray-900",children:"Create an account"}),(0,a.jsx)("p",{className:"mt-2 font-serif text-gray-700",children:"Schedule up to three birthday emails. Google sign-in is not part of this first version."}),g?(0,a.jsxs)("div",{className:"mt-8 rounded border border-green-300 bg-green-50 p-4 text-green-900",role:"status",children:[(0,a.jsx)("h2",{className:"font-serif text-lg font-bold",children:"Check your email"}),(0,a.jsxs)("p",{className:"mt-2 text-sm leading-relaxed",children:["If an account can be created for ",(0,a.jsx)("strong",{children:g}),", a confirmation link is on its way. Open it before logging in. In local development, find the message in Mailpit."]}),(0,a.jsx)(o(),{href:"/login?next=".concat(encodeURIComponent(j)),className:"mt-4 inline-block font-semibold text-blue-700 underline hover:text-blue-900",children:"Go to login"})]}):(0,a.jsxs)("form",{className:"mt-8 space-y-5",onSubmit:N,children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{htmlFor:"signup-email",className:"block font-serif font-semibold text-gray-900",children:"Email address"}),(0,a.jsx)("input",{id:"signup-email",name:"email",type:"email",autoComplete:"email",value:t,onChange:e=>s(e.target.value),disabled:y,required:!0,className:"mt-2 w-full rounded border-2 border-black bg-white px-3 py-2 text-gray-900 outline-none focus:ring-2 focus:ring-yellow-500 disabled:bg-gray-100"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{htmlFor:"signup-password",className:"block font-serif font-semibold text-gray-900",children:"Password"}),(0,a.jsx)("input",{id:"signup-password",name:"password",type:"password",autoComplete:"new-password",value:n,onChange:e=>l(e.target.value),minLength:8,disabled:y,required:!0,"aria-describedby":"signup-password-help",className:"mt-2 w-full rounded border-2 border-black bg-white px-3 py-2 text-gray-900 outline-none focus:ring-2 focus:ring-yellow-500 disabled:bg-gray-100"}),(0,a.jsx)("p",{id:"signup-password-help",className:"mt-1 text-sm text-gray-600",children:"Use at least 8 characters."})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{htmlFor:"signup-password-confirmation",className:"block font-serif font-semibold text-gray-900",children:"Confirm password"}),(0,a.jsx)("input",{id:"signup-password-confirmation",name:"passwordConfirmation",type:"password",autoComplete:"new-password",value:x,onChange:e=>m(e.target.value),minLength:8,disabled:y,required:!0,className:"mt-2 w-full rounded border-2 border-black bg-white px-3 py-2 text-gray-900 outline-none focus:ring-2 focus:ring-yellow-500 disabled:bg-gray-100"})]}),p&&(0,a.jsx)("p",{role:"alert",className:"rounded border border-red-300 bg-red-50 px-3 py-2 text-sm text-red-800",children:p}),(0,a.jsx)("button",{type:"submit",disabled:y,className:"w-full rounded bg-black px-5 py-3 font-serif text-white transition-colors hover:bg-gray-800 disabled:cursor-wait disabled:opacity-60",children:y?"Creating account…":"Create account"})]}),!g&&(0,a.jsxs)("p",{className:"mt-6 text-center font-serif text-gray-700",children:["Already registered?"," ",(0,a.jsx)(o(),{href:"/login?next=".concat(encodeURIComponent(j)),className:"font-semibold text-blue-700 underline hover:text-blue-900",children:"Log in"})]})]})}),(0,a.jsx)(d.A,{})]})}},7328:(e,t,s)=>{e.exports=s(9269)},8497:(e,t,s)=>{"use strict";let a;s.d(t,{c:()=>i,q:()=>l});var r=s(8322),n=s(5364);function i(){if(a)return a;let e="https://nxikndxokhquxhqtumex.supabase.co",t=n.env.NEXT_PUBLIC_SUPABASE_ANON_KEY;if(!e||!t)throw Error("Supabase is not configured. Set NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY.");return a=(0,r.UU)(e,t,{auth:{autoRefreshToken:!0,detectSessionInUrl:!0,persistSession:!0}})}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/birthday-emails",s=Array.isArray(e)?e[0]:e;if("string"!=typeof s||!s.startsWith("/")||s.startsWith("//")||s.includes("\\")||s.includes("\0"))return t;try{let e=new URL(s,"https://bdayrecap.local");if("https://bdayrecap.local"!==e.origin)return t;return"".concat(e.pathname).concat(e.search).concat(e.hash)}catch(e){return t}}}},e=>{e.O(0,[531,783,636,593,792],()=>e(e.s=1468)),_N_E=e.O()}]);

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.