PageSourceSearch

https://lab.snackz.ai/_next/static/chunks/app/(auth)/login/page-a9e3725e3aad8bba.js

js snackz.ai collected 2026-10-05 12:39:34 UTC 7,135 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[72],{29898:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>m});var a=t(7128),s=t(77556),i=t(67404),l=t(71060),n=t(54668),o=t(57950),d=t(81355),u=t.n(d),c=t(72666),f=t(28471),p=t(60509);let m=()=>{let e=(0,f.c)("auth"),[r,t]=(0,l.useState)(""),[d,m]=(0,l.useState)(""),[g,h]=(0,l.useState)(!1),[v,b]=(0,l.useState)(!1),[y,x]=(0,l.useState)(null),[w,j]=(0,l.useState)(!1),[N,S]=(0,l.useState)(!1),C=async()=>{if(!r||!d)return void x(e("errors.emptyCredentials"));let t=r.toLowerCase();h(!0),x(null),j(!1),S(!1);try{await (0,i.iD)(t,d,()=>{window.location.assign("/")})}catch(r){if(s.vF.error({err:r,stage:"auth-login-page"},"Login failed"),r instanceof c.g)"auth/user-not-found"===r.code?x(e("errors.userNotFound")):"auth/wrong-password"===r.code?x(e("errors.wrongPassword")):"auth/invalid-credential"===r.code?x(e("errors.invalidCredential")):"auth/user-disabled"===r.code?x(e("errors.userDisabled")):(s.vF.error({err:r,stage:"auth-login-page"},"Login failed (Firebase)"),x(e("errors.loginFailed")));else if(r instanceof Error){let t=r.message;t.includes("verify your email")?(j(!0),x(e("errors.verifyEmail"))):x(t)}else x(e("errors.loginFailed"))}finally{h(!1)}},P=async()=>{if(!r||!d)return void x(e("errors.resendVerificationRequired"));let t=r.toLowerCase();b(!0);try{await (0,i.nA)(t,d),S(!0)}catch(r){s.vF.error({err:r,stage:"auth-login-page"},"Resend verification failed"),r instanceof c.g||r instanceof Error?x(r.message):x(e("errors.resendVerificationFailed")),j(!0)}finally{b(!1)}},_=e=>{"Enter"!==e.key||g||C()};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("h1",{"data-testid":"login-title",className:"text-4xl font-bold bg-gradient-to-r from-primary-600 to-primary-400 bg-clip-text text-transparent",children:e("loginTitle")}),(0,a.jsx)("p",{"data-testid":"login-subtitle",className:"mt-3 text-default-600",children:e("loginSubtitle")})]}),(0,a.jsxs)("div",{className:"w-full space-y-4 mt-4",children:[(0,a.jsx)("div",{"data-testid":"email-input",children:(0,a.jsx)(n.r,{type:"email",placeholder:e("emailPlaceholder"),"aria-label":e("emailPlaceholder"),value:r,onValueChange:t,onKeyDown:_,size:"lg",classNames:{input:"text-base",inputWrapper:"border-2 hover:border-primary-500"}})}),(0,a.jsx)(p.A,{id:"login-password",name:"password",value:d,onValueChange:m,placeholder:e("passwordPlaceholder"),ariaLabel:e("passwordPlaceholder"),toggleAriaLabel:e("togglePasswordVisibility"),autoComplete:"current-password",onKeyDown:_,dataTestId:"password-input",toggleButtonTestId:"password-toggle"}),y&&(0,a.jsx)("div",{"data-testid":"login-error",className:"text-red-500 text-sm mt-2",children:w?(0,a.jsxs)(a.Fragment,{children:[e("errors.verifyEmailBeforeLogin")," ",N?(0,a.jsx)("span",{className:"text-green-600",children:e("verificationEmailSent")}):(0,a.jsx)("button",{onClick:P,disabled:v,className:"text-primary-600 hover:text-primary-700 hover:underline focus:outline-none inline",children:v?e("sending"):e("resendVerificationEmail")})]}):y}),(0,a.jsx)(o.T,{color:"primary",isLoading:g,onPress:C,"data-testid":"login-submit",className:"w-full h-12 text-base font-semibold bg-gradient-to-r from-primary-500 to-primary-600 hover:from-primary-600 hover:to-primary-700",children:e("signIn")}),(0,a.jsx)("div",{className:"text-center",children:(0,a.jsx)(u(),{href:"/forgot-password","data-testid":"forgot-password-link",className:"text-primary-600 hover:text-primary-700 hover:underline text-sm",children:e("forgotPasswordLink")})}),(0,a.jsx)("div",{className:"relative my-6",children:(0,a.jsx)("div",{className:"absolute inset-0 flex items-center",children:(0,a.jsx)("div",{className:"w-full border-t border-default-200"})})}),(0,a.jsx)(o.T,{as:u(),href:"/register",variant:"bordered","data-testid":"create-account-button",className:"w-full h-12 text-base font-semibold border-2 border-primary-600 text-primary-600 hover:bg-primary-50",children:e("createAccount")})]})]})}},30051:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return s}});let a=t(71060);function s(e,r){let t=(0,a.useRef)(null),s=(0,a.useRef)(null);return(0,a.useCallback)(a=>{if(null===a){let e=t.current;e&&(t.current=null,e());let r=s.current;r&&(s.current=null,r())}else e&&(t.current=i(e,a)),r&&(s.current=i(r,a))},[e,r])}function i(e,r){if("function"!=typeof e)return e.current=r,()=>{e.current=null};{let t=e(r);return"function"==typeof t?t:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esMo
1dule",{value:!0}),Object.assign(r.default,r),e.exports=r.default)},58011:(e,r,t)=>{"use strict";t.d(r,{A:()=>i});var a=t(7128);t(71060);var s=t(87105);let i=({name:e,size:r="24",filled:t=!1,className:i})=>(0,a.jsx)("span",{className:(0,s.cn)("material-symbols-outlined","inline-flex shrink-0 leading-none select-none",i),style:{fontSize:`${r}px`,fontVariationSettings:`'FILL' ${+!!t}`},children:e})},60509:(e,r,t)=>{"use strict";t.d(r,{A:()=>n});var a=t(7128),s=t(54668),i=t(71060),l=t(58011);let n=({value:e,onValueChange:r,placeholder:t,ariaLabel:n,toggleAriaLabel:o,id:d,name:u,autoComplete:c,errorMessage:f,size:p="lg",isRequired:m=!1,onKeyDown:g,dataTestId:h,toggleButtonTestId:v})=>{let[b,y]=(0,i.useState)(!1),x=(0,i.useRef)(null),w=(0,i.useCallback)(t=>{t!==e&&r(t)},[r,e]),j=(0,i.useCallback)(()=>{w(x.current?.querySelector("input")?.value??"")},[w]);return(0,a.jsx)("div",{"data-testid":h,ref:x,children:(0,a.jsx)(s.r,{id:d,name:u,type:b?"text":"password",placeholder:t,"aria-label":n,value:e,onChange:e=>{w(e.target.value)},onInput:e=>{w(e.currentTarget.value)},onBlur:j,onKeyDown:g,size:p,isRequired:m,autoComplete:c,errorMessage:f,endContent:(0,a.jsx)("button",{"aria-label":o,className:"focus:outline-none h-full flex items-center justify-center",type:"button",onMouseDown:e=>{e.preventDefault()},onClick:()=>{j(),y(e=>!e),window.requestAnimationFrame(()=>{x.current?.querySelector("input")?.focus()})},"data-testid":v,children:(0,a.jsx)(l.A,{name:b?"visibility_off":"visibility",size:"20",filled:!0,className:"text-default-500 hover:text-default-700"})}),classNames:{input:"text-base",inputWrapper:"border-2 hover:border-primary-500"}},b?"password-visible":"password-hidden")})}},70041:(e,r,t)=>{Promise.resolve().then(t.bind(t,29898))},72666:(e,r,t)=>{"use strict";t.d(r,{g:()=>a.g});var a=t(22461);(0,a.KO)("firebase","12.11.0","app")},73070:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={callServer:function(){return i.callServer},createServerReference:function(){return n.createServerReference},findSourceMapURL:function(){return l.findSourceMapURL}};for(var s in a)Object.defineProperty(r,s,{enumerable:!0,get:a[s]});let i=t(28857),l=t(6625),n=t(58846)},87105:(e,r,t)=>{"use strict";t.d(r,{cn:()=>i});var a=t(48501),s=t(77630);let i=(...e)=>(0,a.QP)((0,s.A)(e))}},e=>{e.O(0,[8328,5376,208,9590,8501,8471,4582,1882,128,8128,9846,4668,3521,1355,7404,496,4208,7358],()=>e(e.s=70041)),_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.