1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[72],{529:(e,t,n)=>{"use strict";n.d(t,{p:()=>r});var i=n(5155),s=n(1442);let r=(0,n(2115).forwardRef)(({className:e,label:t,error:n,id:r,...o},a)=>(0,i.jsxs)("div",{className:"w-full",children:[t&&(0,i.jsx)("label",{htmlFor:r,className:"block font-display font-medium text-sm mb-1.5",children:t}),(0,i.jsx)("input",{ref:a,id:r,className:(0,s.cn)("w-full px-4 py-2.5 rounded-lg border-2 border-border-thick font-body text-sm","bg-white placeholder:text-border-thick/40","focus:outline-none focus:ring-2 focus:ring-primary focus:border-primary",n&&"border-danger focus:ring-danger focus:border-danger",e),...o}),n&&(0,i.jsx)("p",{className:"mt-1 text-sm text-danger font-body",children:n})]}));r.displayName="Input"},1442:(e,t,n)=>{"use strict";function i(...e){return e.filter(Boolean).join(" ")}n.d(t,{cn:()=>i})},3321:(e,t,n)=>{"use strict";var i=n(4645);n.o(i,"useParams")&&n.d(t,{useParams:function(){return i.useParams}}),n.o(i,"usePathname")&&n.d(t,{usePathname:function(){return i.usePathname}}),n.o(i,"useRouter")&&n.d(t,{useRouter:function(){return i.useRouter}}),n.o(i,"useSearchParams")&&n.d(t,{useSearchParams:function(){return i.useSearchParams}})},4193:(e,t,n)=>{"use strict";n.d(t,{$Y:()=>v,AZ:()=>j,BX:()=>C,Ch:()=>I,Dq:()=>E,FO:()=>ei,HA:()=>B,IU:()=>u,Mo:()=>x,Qu:()=>Y,RS:()=>M,RY:()=>J,Si:()=>_,U0:()=>w,Uy:()=>z,Wh:()=>V,Xc:()=>D,_I:()=>k,_x:()=>G,dP:()=>R,gm:()=>l,ho:()=>O,i1:()=>N,iD:()=>K,iH:()=>F,j4:()=>H,j6:()=>A,k5:()=>S,kp:()=>X,lo:()=>y,m3:()=>T,mC:()=>W,nI:()=>et,oQ:()=>en,pR:()=>h,pV:()=>U,qI:()=>b,qV:()=>$,rD:()=>L,rF:()=>P,s6:()=>Z,sx:()=>m,uD:()=>ee,uX:()=>q,w4:()=>p,wt:()=>Q});let i="AW-17665884814/VSI5CKv0kJkcEI6F4OdB",s="AW-17665884814/QmYUCOvyg5scEI6F4OdB";function r(){return!!window.posthog?.__loaded}let o=[],a=!1;function c(){let e=0,t=setInterval(()=>{e++,r()?(clearInterval(t),function(){if(a||!r())return;a=!0;let e=o;for(let t of(o=[],e))"capture"===t.type?window.posthog.capture(t.name,t.props):"identify"===t.type?window.posthog.identify(t.id,t.props):"register"===t.type?window.posthog.register(t.props):window.posthog.people.set(t.props);a=!1}()):e>=50&&clearInterval(t)},100)}let d=[];function l(e,t){r()?window.posthog.identify(e,t):(o.push({type:"identify",id:e,props:t}),c())}function u(){r()&&window.posthog.reset()}function p(e){r()?window.posthog.register(e):(o.push({type:"register",props:e}),c())}function h(e){r()?window.posthog.people.set(e):(o.push({type:"people_set",props:e}),c())}function m(e,t){r()?window.posthog.capture(e,t):(o.push({type:"capture",name:e,props:t}),c())}function f(e,t,n="USD"){if(window.gtag)window.gtag("event","conversion",{send_to:e,...null!=t&&{value:t,currency:n}});else{let i,s;d.push({sendTo:e,value:t,currency:n}),i=0,s=setInterval(()=>{i++,window.gtag?(clearInterval(s),function(){if(!window.gtag||0===d.length)return;let e=d;for(let t of(d=[],e))window.gtag("event","conversion",{send_to:t.sendTo,...null!=t.value&&{value:t.value,currency:t.currency}})}()):i>=50&&clearInterval(s)},100)}}function g(e,t){window.fbq?.("track",e,t)}function x(e){m("cta_clicked",{location:e})}function b(e,t){m("buy_clicked",{plan:e,price:t}),g("InitiateCheckout",{content_name:e,value:t,currency:"USD"})}function y(e){let t="snapcards_register_tracked";localStorage.getItem(t)||(m("user_registered",{email:e}),f("AW-17665884814/wyjYCNKDnYEcEI6F4OdB"),g("Lead"),localStorage.setItem(t,"1"))}function _(e){m("faq_opened",{question:e})}function w(e,t,n){let i=n.split(".").pop()?.toLowerCase()||"unknown";m("deck_generated",{deck_id:e,card_count:t,file_name:n,file_type:i})}function v(e,t,n){let i=t.split(".").pop()?.toLowerCase()||"unknown";m("generation_failed",{error:e,file_name:t,stage:n,file_type:i})}function k(e,t,n,i){m("study_session_started",{deck_id:e,session_id:t,card_count:n,...i&&{study_mode:i}})}function j(e){m("study_session_completed",{deck_id:e.deckId,session_id:e.sessionId,card_count:e.cardCount,correct_count:e.correctCount,accuracy:e.accuracy,duration_seconds:e.durationSeconds,...e.mode&&{study_mode:e.mode}})}function N(e,t,n){m("deck_exported",{deck_id:e,format:t,card_count:n})}
1function C(e,t,n){m("export_failed",{deck_id:e,format:t,error:n})}function S(e,t){m("limit_hit",{limit_type:e,tier:t})}function I(e,t,n){m("deck_cloned",{source_deck_id:e,new_deck_id:t,card_count:n})}function P(e,t){m("deck_rated",{deck_id:e,rating:t})}function B(e,t){m("card_edited",{deck_id:e,action:t})}function F(e,t){m("deck_deleted",{deck_id:e,card_count:t})}function A(e,t){m("auth_method_used",{method:e,mode:t})}function D(e){m("milestone_shown",{milestone_type:e})}function U(e){m("card_cap_hit",e)}function E(e){m("upgrade_prompt_shown",{location:e})}function R(e){m("upgrade_prompt_dismissed",{location:e})}function W(e){m("upgrade_modal_opened",e)}function q(e){m("plan_selected",e)}function L(e){m("subscribe_clicked",e)}function O(e){m("early_adopter_claimed",e)}function T(){m("subscription_completed"),s&&f(s),g("Purchase",{currency:"USD"})}function Y(e,t,n){m("library_searched",{query:e,category:t,result_count:n})}function z(){m("qualified_activation"),i&&f(i)}function H(e){m("chat_message_sent",e)}function M(e){m("chat_first_token_ms",e)}function V(e){m("chat_message_completed",e)}function X(e){m("chat_rate_limit_hit",e)}function $(e,t="dashboard_card"){m("pwa_install_prompt_shown",{platform:e,surface:t})}function Q(e){m("pwa_install_prompt_accepted",{platform:e})}function G(e){m("pwa_install_prompt_dismissed",{platform:e})}function Z(){m("pwa_installed")}function K(e){m("pwa_notification_prompt_shown",{surface:e})}function J(e,t){m("pwa_notification_permission_result",{outcome:e,surface:t})}function ee(e){m("pwa_notification_prompt_dismissed",{surface:e})}function et(e="settings"){m("pwa_push_unsubscribed",{surface:e})}function en(e,t){m("pwa_offline_session_started",{deck_id:e,card_count:t})}function ei(e,t){m("pwa_offline_sync_completed",{session_count:e,review_count:t})}},5784:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>p});var i=n(5155),s=n(2115),r=n(3321),o=n(8713),a=n(4193),c=n(9239),d=n(529),l=n(9958);function u(e){let t=e.toLowerCase();return t.includes("invalid login credentials")||t.includes("invalid_credentials")?"Email or password is incorrect. Try resetting your password, or sign in with Google if that's how you created your account.":t.includes("email not confirmed")?"Please check your email and click the confirmation link we sent you.":t.includes("user already registered")?"An account with this email already exists. Try signing in instead.":t.includes("rate limit")||t.includes("too many requests")?"Too many attempts. Please wait a moment and try again.":t.includes("signup is disabled")?"Sign-ups are temporarily disabled. Please try again later.":"Something went wrong. Please try again."}function p(){let e=(0,r.useRouter)(),[t,n]=(0,s.useState)(""),[p,h]=(0,s.use
1State)(""),[m,f]=(0,s.useState)("signin"),[g,x]=(0,s.useState)("idle"),[b,y]=(0,s.useState)(""),_=async()=>{(0,a.j6)("google","signup"===m?"signup":"signin");let e=(0,o.U)();await e.auth.signInWithOAuth({provider:"google",options:{redirectTo:`${window.location.origin}/callback`}})},w=async n=>{n.preventDefault(),x("loading"),y("");let i=(0,o.U)();if("signin"===m){let{error:n}=await i.auth.signInWithPassword({email:t,password:p});n?(x("error"),y(u(n.message))):((0,a.j6)("email","signin"),e.push("/dashboard"))}else if("signup"===m){let{error:n}=await i.auth.signUp({email:t,password:p});n?(x("error"),y(u(n.message))):((0,a.j6)("email","signup"),(0,a.lo)(t),fetch("/api/auth/post-signup",{method:"POST"}).catch(()=>{}),e.push("/dashboard?new_user=1"))}else{let{error:e}=await i.auth.resetPasswordForEmail(t,{redirectTo:`${window.location.origin}/callback/recovery`});e?(x("error"),y(u(e.message))):x("sent")}},v=e=>{f(e),x("idle"),y(""),h("")};return(0,i.jsx)("div",{className:"min-h-screen flex items-center justify-center p-4",children:(0,i.jsxs)("div",{className:"w-full max-w-sm",children:[(0,i.jsxs)("div",{className:"bg-warm-white border-2 border-border-thick shadow-brutal rounded-xl p-8",children:[(0,i.jsxs)("div",{className:"text-center mb-8",children:[(0,i.jsxs)("div",{className:"flex items-center justify-center gap-2 mb-2",children:[(0,i.jsx)(l.g,{size:32}),(0,i.jsx)("h1",{className:"font-display text-2xl font-bold",children:"SnapCards"})]}),(0,i.jsxs)("p",{className:"font-body text-sm text-border-thick/60",children:["signin"===m&&"Sign in to start studying","signup"===m&&"Create your account","forgot"===m&&"Reset your password"]})]}),"sent"===g?(0,i.jsxs)("div",{className:"text-center",children:[(0,i.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 bg-primary/10 border-2 border-border-thick rounded-xl flex items-center justify-center",children:(0,i.jsxs)("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-primary",children:[(0,i.jsx)("rect",{width:"20",height:"16",x:"2",y:"4",rx:"2"}),(0,i.jsx)("path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"})]})}),(0,i.jsx)("h2",{className:"font-display text-lg font-bold mb-2",children:"Check your email"}),(0,i.jsxs)("p",{className:"font-body text-sm text-border-thick/60 mb-6",children:["We sent a password reset link to ",(0,i.jsx)("strong",{className:"text-border-thick break-all",children:t})]}),(0,i.jsx)("button",{onClick:()=>v("signin"),className:"font-body text-sm text-primary hover:underline focus-visible:outline-2 focus-visible:outline-primary cursor-pointer py-2",children:"Back to sign in"})]}):(0,i.jsxs)("div",{className:"space-y-5",children:["forgot"!==m&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("button",{type:"button",onClick:_,className:"w-full flex items-center justify-center gap-3 h-11 px-4 rounded-lg border-2 border-border-thick bg-white font-body text-sm font-medium hover:bg-retro-gray/30 transition-colors cursor-pointer",children:[(0,i.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,i.jsx)("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z",fill:"#4285F4"}),(0,i.jsx)("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),(0,i.jsx)("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18A11.96 11.96 0 0 0 1 12c0 1.94.46 3.77 1.18 5.43l3.66-2.84z",fill:"#FBBC05"}),(0,i.jsx)("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"})]}),"Continue with Google"]}),(0,i.jsxs)("div",{className:"flex items-center gap-3",children:[(0,i.jsx)("div",{className:"flex-1 h-px bg-border-thick/20"}),(0,i.jsx)("span",{className:"font-body text-xs text-border-thick/50",children:"or"}),(0,i.jsx)("div",{className:"flex-1 h-px bg-border-thick/20"})]})]}),(0,i.jsxs)("form",{onSubmit:w,className:"space-y-4",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"email",className:"font-body text-sm font-medium block mb-1.5",children:"Email address"}),(0,i.jsx)(d.p,{id:"email",type:"email",placeholder:"[email protected]",value:t,onChange:e=>n(e.target.value),required:!0})]}),"forgot"!==m&&(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,i.jsx)("label",{htmlFor:"password",className:"font-body text-sm font-medium",children:"Password"}),"signin"===m&&(0,i.jsx)("button",{type:"button",onClick:()=>v("forgot"),className:"font-body text-xs text-primary hover:underline cursor-pointer",children:"Forgot password?"})]}),(0,i.jsx)(d.p,{id:"password",type:"password",placeholder:"signup"===m?"At least 6 characters":"Your password",value:p,onChange:e=>h(e.target.value),required:!0,minLength:6})]}),"error"===g&&(0,i.jsxs)("div",{className:"rounded-lg border border-danger/30 bg-danger/5 px-3 py-2.5",role:"alert",children:[(0,i.jsx)("p",{className:"font-body text-sm text-danger",children:b}),"signin"===m&&b.includes("incorrect")&&(0,i.jsx)("button",{type:"button",onClick:()=>v("forgot"),className:"font-body text-xs text-primary hover:underline cursor-pointer mt-1",children:"Reset your password"})]}),(0,i.jsx)(c.$,{type:"submit",className:"w-full",size:"lg",disabled:"loading"===g||!t||"forgot"!==m&&!p,children:"loading"===g?"forgot"===m?"Sending...":"signup"===m?"Creating account...":"Signing in...":"forgot"===m?"Send reset link":"signup"===m?"Sign up":"Sign in"})]}),(0,i.jsxs)("div",{className:"text-center",children:["signin"===m&&(0,i.jsxs)("p",{className:"font-body text-sm text-border-thick/60",children:["Don't have an account?"," ",(0,i.jsx)("button",{onClick:()=>v("signup"),className:"text-primary hover:underline cursor-pointer font-medium",children:"Sign up"})]}),"signup"===m&&(0,i.jsxs)("p",{className:"font-body text-sm text-border-thick/60",children:["Already have an account?"," ",(0,i.jsx)("button",{onClick:()=>v("signin"),className:"text-primary hover:underline cursor-pointer font-medium",children:"Sign in"})]}),"forgot"===m&&(0,i.jsx)("button",{onClick:()=>v("signin"),className:"font-body text-sm text-primary hover:underline cursor-pointer",children:"Back to sign in"})]})]})]}),(0,i.jsx)("p",{className:"text-center font-body text-xs text-border-thick/50 mt-6",children:"Sign in with Google or your email and password."})]})})}}
1,7523:(e,t,n)=>{Promise.resolve().then(n.bind(n,5784))},8713:(e,t,n)=>{"use strict";n.d(t,{U:()=>s});var i=n(6622);function s(){return(0,i.createBrowserClient)("https://supa.snapcards.ai","sb_publishable_2tuHeDZr2VcCUvo4vvXmYQ_wSCXBZbD")}},9239:(e,t,n)=>{"use strict";n.d(t,{$:()=>c});var i=n(5155),s=n(1442),r=n(2115);let o={primary:"bg-primary text-white border-border-thick shadow-brutal-sm hover:bg-primary/90 active:translate-x-[2px] active:translate-y-[2px] active:shadow-none",secondary:"bg-safety-orange text-white border-border-thick shadow-brutal-sm hover:bg-safety-orange/90 active:translate-x-[2px] active:translate-y-[2px] active:shadow-none",ghost:"bg-white text-border-thick border-border-thick/20 shadow-none hover:bg-retro-gray/30 hover:border-border-thick/40",destructive:"bg-danger text-white border-border-thick shadow-brutal-sm hover:bg-danger/90 active:translate-x-[2px] active:translate-y-[2px] active:shadow-none"},a={sm:"px-3 py-1.5 text-sm rounded-md",md:"px-5 py-2.5 text-sm rounded-lg",lg:"px-6 py-3 text-base rounded-lg"},c=(0,r.forwardRef)(({className:e,variant:t="primary",size:n="md",disabled:r,...c},d)=>(0,i.jsx)("button",{ref:d,disabled:r,className:(0,s.cn)("inline-flex items-center justify-center gap-1.5 font-display font-semibold border-2","focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary","transition-all duration-100 cursor-pointer","disabled:opacity-50 disabled:cursor-not-allowed disabled:active:translate-x-0 disabled:active:translate-y-0 disabled:active:shadow-brutal-sm",o[t],a[n],e),...c}));c.displayName="Button"},9958:(e,t,n)=>{"use strict";n.d(t,{g:()=>s});var i=n(5155);function s({size:e=28}){return(0,i.jsxs)("svg",{width:e,height:e,viewBox:"0 0 64 64",fill:"none","aria-hidden":"true",children:[(0,i.jsx)("rect",{x:"4",y:"4",width:"56",height:"56",rx:"12",fill:"#fb923c",stroke:"#111318",strokeWidth:"4"}),(0,i.jsx)("polygon",{points:"36 12 14 36 28 36 26 52 50 28 34 28 36 12",fill:"#ffffff",stroke:"#111318",strokeWidth:"3",strokeLinejoin:"round"})]})}}},e=>{e.O(0,[6622,8441,3139,7358],()=>e(e.s=7523)),_N_E=e.O()}]); 2//# sourceMappingURL=page-903ac89b889c0910.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.