PageSourceSearch

https://teleneo.ai/_next/static/chunks/9da285e7db8f3b18.js

js teleneo.ai collected 2026-10-05 14:45:22 UTC 10,395 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,21224,e=>{"use strict";let s=(0,e.i(19800).default)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",()=>s],21224)},81947,e=>{"use strict";var s=e.i(72946),t=e.i(29895),a=e.i(94237),r=e.i(47163);let i=(0,a.cva)("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:text-destructive-foreground/80 dark:border-destructive [&>svg]:text-current dark:bg-destructive/50"}},defaultVariants:{variant:"default"}});function n(e){let a,n,l,d,c,o=(0,t.c)(10);return o[0]!==e?({className:a,variant:l,...n}=e,o[0]=e,o[1]=a,o[2]=n,o[3]=l):(a=o[1],n=o[2],l=o[3]),o[4]!==a||o[5]!==l?(d=(0,r.cn)(i({variant:l}),a),o[4]=a,o[5]=l,o[6]=d):d=o[6],o[7]!==n||o[8]!==d?(c=(0,s.jsx)("div",{"data-slot":"alert",role:"alert",className:d,...n}),o[7]=n,o[8]=d,o[9]=c):c=o[9],c}function l(e){let a,i,n,l,d=(0,t.c)(8);return d[0]!==e?({className:a,...i}=e,d[0]=e,d[1]=a,d[2]=i):(a=d[1],i=d[2]),d[3]!==a?(n=(0,r.cn)("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",a),d[3]=a,d[4]=n):n=d[4],d[5]!==i||d[6]!==n?(l=(0,s.jsx)("div",{"data-slot":"alert-title",className:n,...i}),d[5]=i,d[6]=n,d[7]=l):l=d[7],l}function d(e){let a,i,n,l,d=(0,t.c)(8);return d[0]!==e?({className:a,...i}=e,d[0]=e,d[1]=a,d[2]=i):(a=d[1],i=d[2]),d[3]!==a?(n=(0,r.cn)("col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",a),d[3]=a,d[4]=n):n=d[4],d[5]!==i||d[6]!==n?(l=(0,s.jsx)("div",{"data-slot":"alert-description",className:n,...i}),d[5]=i,d[6]=n,d[7]=l):l=d[7],l}e.s(["Alert",()=>n,"AlertDescription",()=>d,"AlertTitle",()=>l])},52556,e=>{"use strict";let s="[teleneo-auth]";function t(e,t){t&&Object.keys(t).length>0?console.info(s,e,t):console.info(s,e)}e.s(["authDebugClient",()=>t])},86788,73999,e=>{"use strict";e.s(["FIXED_AUTH_OTP",0,"123456"],86788);var s=e.i(32356),t=e.i(96035);let a=s.z.object({email:s.z.string().min(1,"Email is required").email("Please enter a valid email address"),password:s.z.string().min(1,"Password is required").min(6,"Password must be at least 6 characters"),rememberMe:s.z.boolean().default(!1)}),r=s.z.object({organizationName:s.z.string().min(1,"Organization name is required").min(2,"Organization name must be at least 2 characters").max(100,"Organization name must be less than 100 characters"),username:s.z.string().min(1,"Username is required").min(3,"Username must be at least 3 characters").max(50,"Username must be less than 50 characters"),email:s.z.string().min(1,"Email is required").email("Please enter a valid email address"),password:t.PasswordSchema,confirmPassword:s.z.string().min(1,"Please confirm your password")}).refine(e=>e.password===e.confirmPassword,{message:"Passwords don't match",path:["confirmPassword"]}),i=s.z.object({username:s.z.string().min(1,"Name is required").min(3,"Name must be at least 3 characters").max(100,"Name must be less than 100 characters"),email:s.z.string().min(1,"Email is required").email("Please enter a valid email address"),password:t.PasswordSchema,confirmPassword:s.z.string().min(1,"Please confirm your password")}).refine(e=>e.password===e.confirmPassword,{message:"Passwords don't match",path:["confirmPassword"]});e.s(["adminRegisterSchema",0,i,"registerSchema",0,r,"signInSchema",0,a],73999)},55586,e=>{"use strict";var s=e.i(72946),t=e.i(47638),a=e.i(32735),r=e.i(51709),i=e.i(76120),n=e.i(50388),l=e.i(21224),d=e.i(48425),c=e.i(67881),o=e.i(70065),m=e.i(71443),u=e.i(10708),h=e.i(31860),x=e.i(38036),f=e.i(86788);function g({email:e,password:a,rememberMe:r,onVerified:g,onGoBack:p}){let j,v=(0,i.useTranslations)("Auth.SignInOtp"),[b,w]=(0,n.use
1State)(f.FIXED_AUTH_OTP),[y,N]=(0,n.useState)(!1),[P,S]=(0,n.useState)(!1),[T,I]=(0,n.useState)(300),[C,O]=(0,n.useState)(!1),{toastError:k,toastSuccess:z}=(0,h.default)();(0,n.useEffect)(()=>{if(T<=0)return void O(!0);let e=setTimeout(()=>I(e=>e-1),1e3);return()=>clearTimeout(e)},[T]);let L=async s=>{let{error:t}=await x.auth.signIn.email({email:e,password:a,rememberMe:r,loginOtp:s});return t?(k(t.message),w(""),!1):(z(v("toast.success")),g(),!0)},A=async()=>{if(6!==b.length)return void k(v("toast.invalid"));N(!0);try{await L(b)}finally{N(!1)}},U=async()=>{S(!0);try{let{error:s}=await x.auth.signIn.email({email:e,password:a,rememberMe:r});if(s?.message?.includes("LOGIN_OTP_REQUIRED")){z(v("toast.resendSuccess")),I(300),O(!1),w(f.FIXED_AUTH_OTP);return}if(s)return void k(s.message);z(v("toast.resendSuccess"))}catch{k(v("toast.resendError"))}finally{S(!1)}};return(0,s.jsxs)(o.Card,{children:[(0,s.jsxs)(o.CardHeader,{className:"text-center",children:[(0,s.jsx)("div",{className:"mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-primary/10",children:(0,s.jsx)(d.Shield,{className:"h-6 w-6 text-primary"})}),(0,s.jsx)(o.CardTitle,{children:v("title")}),(0,s.jsx)(o.CardDescription,{children:v("description",{email:e})}),(0,s.jsx)("p",{className:"text-sm font-medium text-primary",children:v("fixedOtpHint",{code:f.FIXED_AUTH_OTP})})]}),(0,s.jsxs)(o.CardContent,{className:"space-y-6",children:[(0,s.jsxs)("div",{className:"space-y-2 text-center",children:[(0,s.jsx)(u.Label,{className:"block text-center",children:v("label")}),(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)(m.InputOTP,{maxLength:6,value:b,onChange:w,disabled:y,children:(0,s.jsxs)(m.InputOTPGroup,{children:[(0,s.jsx)(m.InputOTPSlot,{index:0}),(0,s.jsx)(m.InputOTPSlot,{index:1}),(0,s.jsx)(m.InputOTPSlot,{index:2}),(0,s.jsx)(m.InputOTPSlot,{index:3}),(0,s.jsx)(m.InputOTPSlot,{index:4}),(0,s.jsx)(m.InputOTPSlot,{index:5})]})})})]}),(0,s.jsxs)("div",{className:"space-y-2 text-center",children:[C?(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:v("expired")}):(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:v("expiresIn",{time:(j=Math.floor(T/60),`${j}:${(T%60).toString().padStart(2,"0")}`)})}),(0,s.jsx)(c.Button,{type:"button",variant:"ghost",size:"sm",onClick:U,disabled:!C||P,children:P?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.Loader2,{className:"mr-2 h-4 w-4 animate-spin"}),v("resending")]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.RefreshCw,{className:"mr-2 h-4 w-4"}),v("resend")]})})]}),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)(c.Button,{type:"button",className:"w-full",onClick:A,disabled:y||6!==b.length,children:y?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.Loader2,{className:"mr-2 h-4 w-4 animate-spin"}),v("verifying")]}):v("verify")}),(0,s.jsx)(c.Button,{type:"button",variant:"outline",className:"w-full",onClick:p,disabled:y||P,children:v("goBack")})]})]})]})}var p=e.i(81947),j=e.i(37663),v=e.i(52556),b=e.i(56855),w=e.i(73999),y=e.i(47163);function N({className:e,...l}
1){let[d,m]=(0,n.useState)(!1),[f,N]=(0,n.useState)(null),[P,S]=(0,n.useState)(null),{toastError:T,toastSuccess:I}=(0,h.default)(),C=(0,r.useSearchParams)(),O=(0,i.useTranslations)("Auth.SignIn"),k=(0,i.useTranslations)("Auth.Lockout"),z=async e=>{I(O("toast.success"));let s=C.get("redirect");if(s)try{let e=decodeURIComponent(s);if((0,b.isSafePostLoginRedirect)(e))return void window.location.assign(e)}catch(e){console.error("Invalid redirect URL:",e)}let t=e?.user?.role;if(null==t)try{let{data:e}=await x.auth.getSession({fetchOptions:{credentials:"include"}});t=e?.user?.role}catch{}let a="admin"===t||"staff"===t?"/admin/dashboard":"/org";window.location.assign((0,b.resolvePostLoginUrl)(a))},L=async e=>{N(null),m(!0);try{let{data:s,error:t}=await x.auth.signIn.email({email:e.email,password:e.password,rememberMe:e.rememberMe});if((0,v.authDebugClient)("signIn.email finished",{hasError:!!t,hasSignInData:!!s}),t){let s=t.message;if(s&&(s.includes("ACCOUNT_LOCKED")||s.toLowerCase().includes("temporarily locked")))return void N(s);if(s?.includes("LOGIN_OTP_REQUIRED"))return void S(e);T(s);return}await z(s)}finally{m(!1)}};return P?(0,s.jsx)("div",{className:(0,y.cn)("flex flex-col gap-6",e),...l,children:(0,s.jsx)(g,{email:P.email,password:P.password,rememberMe:P.rememberMe,onVerified:()=>z(),onGoBack:()=>S(null)})}):(0,s.jsxs)("div",{className:(0,y.cn)("flex flex-col gap-6",e),...l,children:[f?(0,s.jsxs)(p.Alert,{variant:"destructive",children:[(0,s.jsx)(p.AlertTitle,{children:k("title")}),(0,s.jsx)(p.AlertDescription,{children:f})]}):null,(0,s.jsxs)(o.Card,{children:[(0,s.jsxs)(o.CardHeader,{children:[(0,s.jsx)(o.CardTitle,{children:O("title")}),(0,s.jsx)(o.CardDescription,{children:O("description")})]}),(0,s.jsxs)(o.CardContent,{children:[(0,s.jsx)(j.default,{schema:w.signInSchema,onSubmit:L,defaultValues:{email:"",password:"",rememberMe:!1},disabled:d,children:({components:e})=>(0,s.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,s.jsx)("div",{className:"grid gap-3",children:(0,s.jsx)(e.Input,{name:"email",label:O("fields.emailLabel"),type:"email",placeholder:O("fields.emailPlaceholder")})}),(0,s.jsxs)("div",{className:"grid gap-3",children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(u.Label,{htmlFor:"password",children:O("fields.passwordLabel")}),(0,s.jsx)(a.default,{href:"/auth/forgot-password",className:"ml-auto inline-block text-sm underline-offset-4 hover:underline text-primary",children:O("forgot")})]}),(0,s.jsx)(e.PasswordInput,{name:"password"})]}),(0,s.jsx)(e.Checkbox,{name:"rememberMe",label:O("remember")}),(0,s.jsx)("div",{className:"flex flex-col gap-3",children:(0,s.jsx)(c.Button,{type:"submit",className:"w-full",children:d?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.Loader2,{className:"animate-spin mr-2"}),O("submitting")]}):O("submit")})})]})}),(0,s.jsxs)("div",{className:"mt-4 text-center text-sm",children:[O("footerText")," ",(0,s.jsx)(a.default,{href:`/auth/register${C.get("redirect")?`?redirect=${encodeURIComponent(C.get("redirect")||"")}`:""}`,className:"underline underline-offset-4",children:O("footerLink")})]})]})]})]})}e.s(["SignInForm",()=>N],55586)}]);

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.