PageSourceSearch

https://myjoya.ai/_next/static/chunks/583-b07bd942ad0a7d81.js

js myjoya.ai collected 2026-10-09 22:57:36 UTC 13,628 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[583],{516:(e,t,r)=>{r.d(t,{Ix:()=>l,R0:()=>g,dV:()=>i,ec:()=>f,q4:()=>d,sC:()=>u,t8:()=>c,x7:()=>m});var a=r(2911),s=r(48866),o=r(75355),n=r(43791);let i=async e=>{try{let t=await (0,o.xn)("".concat("https://api.myjoya.ai","/joya_auth/user/exists"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e})});if(!t.ok&&400!==t.status&&401!==t.status&&200!==t.status)throw Error("Email check API call failed with status: ".concat(t.status));return(0,o.oi)(t)}catch(t){if(t instanceof o.Rc)throw t;throw(0,a.V)(n.fR.FUNCTION_ERROR,{error:n.f9.EMAIL_CHECK__API_FAILED+" fetch-data/login-signup/login.tsx checkEmailExistsApi function",data:{email:e},timestamp:new Date().toISOString(),errorObject:(0,s.P)(t)}),Error(t instanceof Error?t.message:"Network or server error")}},d=async e=>{try{let t=await (0,o.xn)("".concat("https://api.myjoya.ai","/joya_auth/googleSignIn"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({credential:e}),credentials:"include"});if(!t.ok&&400!==t.status)throw Error("Google sign in API call failed with status: ".concat(t.status));return(0,o.oi)(t)}catch(t){if(t instanceof o.Rc)throw t;throw(0,a.V)(n.fR.FUNCTION_ERROR,{error:n.f9.GOOGLE_SIGN_IN_API_FAILED+" fetch-data/login-signup/login.tsx googleSignInApi function",data:{credential:e},timestamp:new Date().toISOString(),errorObject:(0,s.P)(t)}),Error(t instanceof Error?t.message:"Network or server error")}},c=async(e,t)=>{try{let r=await (0,o.xn)("".concat("https://api.myjoya.ai","/joya_auth/emailSignIn"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e,password:t}),credentials:"include"});if(!r.ok&&400!==r.status&&401!==r.status&&200!==r.status)throw Error("Login API call failed with status: ".concat(r.status));return(0,o.oi)(r)}catch(r){if(r instanceof o.Rc)throw r;throw(0,a.V)(n.fR.FUNCTION_ERROR,{error:n.f9.LOGIN_API_FAILED+" fetch-data/login-signup/login.tsx signInApi function",data:{email:e,password:t},timestamp:new Date().toISOString(),errorObject:(0,s.P)(r)}),Error(r instanceof Error?r.message:"Failed to parse response JSON")}},l=async e=>{try{let t=await (0,o.xn)("".concat("https://api.myjoya.ai","/joya_auth/send-otp"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e})});if(!t.ok&&200!==t.status&&400!==t.status)throw Error("Send OTP API call failed with status: ".concat(t.status));return(0,o.oi)(t)}catch(t){if(t instanceof o.Rc)throw t;throw(0,a.V)(n.fR.FUNCTION_ERROR,{error:n.f9.SEND_OTP_API_FAILED+" fetch-data/login-signup/login.tsx sendOtp function",data:{email:e},timestamp:new Date().toISOString(),errorObject:(0,s.P)(t)}),Error(t instanceof Error?t.message:"Network or server error")}},f=async(e,t,r)=>{try{let a=await (0,o.xn)("".concat("https://api.myjoya.ai","/joya_auth/change-password"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e,otp:t,new_password:r})});if(!a.ok&&200!==a.status&&400!==a.status)throw Error("Change password API call failed with status: ".concat(a.status));return(0,o.oi)(a)}catch(i){if(i instanceof o.Rc)throw i;throw(0,a.V)(n.fR.FUNCTION_ERROR,{error:n.f9.CHANGE_PASSWORD_API_FAILED+" fetch-data/login-signup/login.tsx changePassword function",data:{email:e,otp:t,password:r},timestamp:new Date().toISOString(),errorObject:(0,s.P)(i)}),Error(i instanceof Error?i.message:"Network or server error")}},m=async(e,t,r,i,d)=>{try{let a=await (0,o.xn)("".concat("https://api.myjoya.ai","/joya_auth/sign-up"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({firstname:e,lastname:t,email:r,password:i,otp:d}),credentials:"include"});if(!a.ok&&400!==a.status&&201!==a.status)throw Error("API call failed with status: ".concat(a.status));return(0,o.oi)(a)}catch(c){if(c instanceof o.Rc)throw c;throw(0,a.V)(n.fR.FUNCTION_ERROR,{error:n.f9.SIGNUP_API_FAILED+" fetch-data/login-signup/login.tsx signupApi function",data:{firstName:e,lastName:t,email:r,password:i,otp:d},timestamp:new Date().toISOString(),errorObject:(0,s.P)(c)}),Error(c instanceof Error?c.message:"Network or server error")}},u=async e=>{try{let t=await (0,o.Ud)("".concat("https://api.myjoya.ai","/joya_auth/user-info"),{headers:{Authorization:"Bearer ".concat(e)}});if(!t.ok&&400!==t.status&&201!==t.status)throw Error("API call failed with status: ".concat(t.status));return(0,o.oi)(t)}catch(t){if(t instanceof o.Rc)throw t;throw(0,a.V)(n.fR.FUNCTION_ERROR,{error:n.f9.USER_INFO_API_FAILED+" fetch-data/login-signup/login.tsx userInfoApi function",data:{idToken:e},timestamp:new Date().toISOString(),errorObject:(0,s.P)(t)}),Error(t instanceof Error?t.message:"Network or server error")}},g=async(e,t,r,i,d,c,l)=>{try{let a=await (0,o.Ud)("".concat("https://api.myjoya.ai","/joya_auth/update-user-info"),{method:"PUT",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify({first_name:t,last_name:r,email:i,date_of_birth:d,city:c,country:l})});if(!a.ok&&400!==a.status&&201!==a.status)throw Error("Update user info API call failed with status: ".concat(a.status));return(0,o.oi)(a)}catch(f){if(f instanceof o.Rc)throw f;throw(0,a.V)(n.fR.FUNCTION_ERROR,{error:n.f9.UPDATE_USER_INFO_API_FAILED+" fetch-data/login-signup/login.tsx updateUserInfoApi function",data:{idToken:e,first_name:t,last_name:r,email:i,date_of_birth:d,city:c,country:l},timestamp:new Date().toISOString(),errorObject:(0,s.P)(f)}),Error(f instanceof Error?f.message:"Network or server error")}}},3998:(e,t,r)=>{r.d(t,{$:()=>c,r:()=>d});var a=r(95155),s=r(12115),o=r(32467),n=r(83101),i=r(27472);let d=(0,n.F)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary-hover",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-white/20 bg-transparent text-foreground hover:bg-white/[0.08] hover:border-white/35 hover:text-foreground",secondary:"bg-white/[0.08] text-white/80 hover:bg-white/[0.13] hover:text-white",ghost:"text-foreground
1/70 hover:bg-white/[0.08] hover:text-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),c=s.forwardRef((e,t)=>{let{className:r,variant:s,size:n,asChild:c=!1,...l}=e,f=c?o.DX:"button";return(0,a.jsx)(f,{className:(0,i.cn)(d({variant:s,size:n,className:r})),ref:t,...l})});c.displayName="Button"},36479:(e,t,r)=>{r.d(t,{$z:()=>c,Ar:()=>d,Gl:()=>l,Xm:()=>i,YQ:()=>s,_9:()=>f,my:()=>o,pi:()=>m,tA:()=>u,wB:()=>n});var a=r(15653);let s=a.z.object({firstName:a.z.string().min(1,{message:"First Name is required."}),lastName:a.z.string().min(1,{message:"Last Name is required."}),email:a.z.string().min(1,{message:"Email is required."}).email({message:"Please enter a valid email address."}),password:a.z.string().regex(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{6,}$/,{message:"Password must be at least 6 characters and contain at least one uppercase letter, one lowercase letter, one number, and one special character."}),confirmPassword:a.z.string().regex(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{6,}$/,{message:"Password must be at least 6 characters and contain at least one uppercase letter, one lowercase letter, one number, and one special character."})}).refine(e=>e.password===e.confirmPassword,{message:"Passwords do not match.",path:["confirmPassword"]}),o={firstName:"",lastName:"",email:"",password:"",confirmPassword:""},n=a.z.object({email:a.z.string().min(1,{message:"Email is required."}).email({message:"Please enter a valid email address."})}),i=a.z.object({password:a.z.string().min(6,{message:"Password must be at least 6 characters."})}),d={email:""},c={password:""},l=a.z.object({email:a.z.string().min(1,{message:"Email is required."}).email({message:"Please enter a valid email address."}),password:a.z.string().regex(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{6,}$/,{message:"Password must be at least 6 characters and contain at least one uppercase letter, one lowercase letter, one number, and one special character."}),confirmPassword:a.z.string().regex(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{6,}$/,{message:"Confirm Password must be at least 6 characters and contain at least one uppercase letter, one lowercase letter, one number, and one special character."}),otp:a.z.string().length(6,{message:"OTP must be 6 digits."})}).refine(e=>e.password===e.confirmPassword,{message:"Passwords do not match.",path:["confirmPassword"]}),f={email:"",password:"",confirmPassword:"",otp:""},m=a.z.object({one:a.z.string().length(1,{message:"Required"}),two:a.z.string().length(1,{message:"Required"}),three:a.z.string().length(1,{message:"Required"}),four:a.z.string().length(1,{message:"Required"}),five:a.z.string().length(1,{message:"Required"}),six:a.z.string().length(1,{message:"Required"})}),u={one:"",two:"",three:"",four:"",five:"",six:""}},41052:(e,t,r)=>{r.d(t,{C5:()=>w,MJ:()=>h,eI:()=>g,lR:()=>p,lV:()=>c,zB:()=>f});var a=r(95155),s=r(12115),o=r(32467),n=r(22544),i=r(27472),d=r(76444);let c=n.Op,l=s.createContext({}),f=e=>{let{...t}=e;return(0,a.jsx)(l.Provider,{value:{name:t.name},children:(0,a.jsx)(n.xI,{...t})})},m=()=>{let e=s.useContext(l),t=s.useContext(u),{getFieldState:r,formState:a}=(0,n.xW)(),o=r(e.name,a);if(!e)throw Error("useFormField should be used within <FormField>");let{id:i}=t;return{id:i,name:e.name,formItemId:"".concat(i,"-form-item"),formDescriptionId:"".concat(i,"-form-item-description"),formMessageId:"".concat(i,"-form-item-message"),...o}},u=s.createContext({}),g=s.forwardRef((e,t)=>{let{className:r,...o}=e,n=s.useId();return(0,a.jsx)(u.Provider,{value:{id:n},children:(0,a.jsx)("div",{ref:t,className:(0,i.cn)("space-y-2",r),...o})})});g.displayName="FormItem";let p=s.forwardRef((e,t)=>{let{className:r,...s}=e,{error:o,formItemId:n}=m();return(0,a.jsx)(d.J,{ref:t,className:(0,i.cn)(o&&"text-destructive",r),htmlFor:n,...s})});p.displayName="FormLabel";let h=s.forwardRef((e,t)=>
1{let{...r}=e,{error:s,formItemId:n,formDescriptionId:i,formMessageId:d}=m();return(0,a.jsx)(o.DX,{ref:t,id:n,"aria-describedby":s?"".concat(i," ").concat(d):"".concat(i),"aria-invalid":!!s,...r})});h.displayName="FormControl",s.forwardRef((e,t)=>{let{className:r,...s}=e,{formDescriptionId:o}=m();return(0,a.jsx)("p",{ref:t,id:o,className:(0,i.cn)("text-sm text-muted-foreground",r),...s})}).displayName="FormDescription";let w=s.forwardRef((e,t)=>{var r;let{className:s,children:o,...n}=e,{error:d,formMessageId:c}=m(),l=d?String(null!=(r=null==d?void 0:d.message)?r:""):o;return l?(0,a.jsx)("p",{ref:t,id:c,className:(0,i.cn)("text-sm font-medium text-destructive",s),...n,children:l}):null});w.displayName="FormMessage"},44400:(e,t,r)=>{r.d(t,{W:()=>o});var a=r(75355),s=r(12115);function o(){let[e,t]=(0,s.useState)(null);if(e)throw e;return(0,s.useCallback)(function(e){return!!(0,a.Rk)(e)&&(t(e),!0)},[])}},65142:(e,t,r)=>{r.d(t,{p:()=>n});var a=r(95155),s=r(12115),o=r(27472);let n=s.forwardRef((e,t)=>{let{className:r,type:s,...n}=e;return(0,a.jsx)("input",{type:s,className:(0,o.cn)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-white/[0.06] dark:border-white/15 dark:placeholder:text-white/35",r),ref:t,...n})});n.displayName="Input"},76444:(e,t,r)=>{r.d(t,{J:()=>c});var a=r(95155),s=r(12115),o=r(10489),n=r(83101),i=r(27472);let d=(0,n.F)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),c=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)(o.b,{ref:t,className:(0,i.cn)(d(),r),...s})});c.displayName=o.b.displayName},86948:(e,t,r)=>{r.d(t,{BT:()=>c,Wu:()=>l,ZB:()=>d,Zp:()=>n,aR:()=>i});var a=r(95155),s=r(12115),o=r(27472);let n=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)("div",{ref:t,className:(0,o.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",r),...s})});n.displayName="Card";let i=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)("div",{ref:t,className:(0,o.cn)("flex flex-col space-y-1.5 p-6",r),...s})});i.displayName="CardHeader";let d=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)("div",{ref:t,className:(0,o.cn)("text-2xl font-semibold leading-none tracking-tight",r),...s})});d.displayName="CardTitle";let c=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)("div",{ref:t,className:(0,o.cn)("text-sm text-muted-foreground",r),...s})});c.displayName="CardDescription";let l=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)("div",{ref:t,className:(0,o.cn)("p-6 pt-0",r),...s})});l.displayName="CardContent",s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)("div",{ref:t,className:(0,o.cn)("flex items-center p-6 pt-0",r),...s})}).displayName="CardFooter"}}]);
2//# sourceMappingURL=583-b07bd942ad0a7d81.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.