1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="76634335-1a4d-4946-9686-557bedf31df4",e._sentryDebugIdIdentifier="sentry-dbid-76634335-1a4d-4946-9686-557bedf31df4")}()}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[74520],{1702:(e,t,r)=>{"use strict";var a=r(99962);r.o(a,"useParams")&&r.d(t,{useParams:function(){return a.useParams}}),r.o(a,"usePathname")&&r.d(t,{usePathname:function(){return a.usePathname}}),r.o(a,"useRouter")&&r.d(t,{useRouter:function(){return a.useRouter}}),r.o(a,"useSearchParams")&&r.d(t,{useSearchParams:function(){return a.useSearchParams}})},9395:(e,t,r)=>{"use strict";r.d(t,{F:()=>i});var a=r(99783);let s=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,n=a.$,i=(e,t)=>r=>{var a;if((null==t?void 0:t.variants)==null)return n(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:i,defaultVariants:o}=t,l=Object.keys(i).map(e=>{let t=null==r?void 0:r[e],a=null==o?void 0:o[e];if(null===t)return null;let n=s(t)||s(a);return i[e][n]}),c=r&&Object.entries(r).reduce((e,t)=>{let[r,a]=t;return void 0===a||(e[r]=a),e},{});return n(e,l,null==t||null==(a=t.compoundVariants)?void 0:a.reduce((e,t)=>{let{class:r,className:a,...s}=t;return Object.entries(s).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...o,...c}[t]):({...o,...c})[t]===r})?[...e,r,a]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)}},14469:(e,t,r)=>{"use strict";r.d(t,{p:()=>i});var a=r(73365),s=r(1521),n=r(19952);let i=s.forwardRef((e,t)=>{let{className:r,type:s,...i}=e;return(0,a.jsx)("input",{type:s,className:(0,n.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",r),ref:t,...i})});i.displayName="Input"},19952:(e,t,r)=>{"use strict";r.d(t,{D:()=>o,S:()=>i,cn:()=>n});var a=r(99783),s=r(5347);function n(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,s.QP)((0,a.$)(t))}function i(e){return e.split(/[_-]/).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" ")}function o(e){switch(e){case"waiting":return{label:"Waiting",description:"Conversation is waiting for a response from the customer",variant:"secondary",className:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/20 dark:text-yellow-200"};case"escalated":return{label:"Escalated",description:"Conversation escalated to a human - Alvio auto-messages are paused",variant:"destructive",className:"bg-red-100 text-red-800 dark:bg-red-900/20 dark:text-red-200"};case"in_progress":return{label:"In Progress",description:"Conversation is actively being handled by an agent",variant:"default",className:"bg-blue-100 text-blue-800 dark:bg-blue-900/20 dark:text-blue-200"};case"follow_up":return{label:"Follow Up",description:"Conversation requires follow-up action, a reminder or a call",variant:"outline",className:"bg-purple-100 text-purple-800 dark:bg-purple-900/20 dark:text-purple-200"};case"resolved":return{label:"Resolved",description:"Conversation has been successfully resolved and closed",variant:"secondary",className:"bg-green-100 text-green-800 dark:bg-green-900/20 dark:text-green-200"};case"archived":return{label:"Archived",description:"Conversation has been archived for reference",variant:"outline",className:"bg-gray-100 text-gray-800 dark:bg-gray-900/20 dark:text-gray-200"};case"other":return{label:"Other",description:"Conversation has a custom or undefined status",variant:"outline",className:"bg-gray-100 text-gray-800 dark:bg-gray-900/20 dark:text-gray-200"};default:return{label:"Unknown",description:"Conversation status is unknown or undefined",variant:"outline",className:"bg-gray-100 text-gray-800 dark:bg-gray-900/20 dark:text-gray-200"}}}},24637:(e,t,r)=>{"use strict";r.d(t,{A:()=>
1o});var a=r(1521);let s=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim()};var n={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=(0,a.forwardRef)((e,t)=>{let{color:r="currentColor",size:i=24,strokeWidth:o=2,absoluteStrokeWidth:l,className:c="",children:d,iconNode:u,...m}=e;return(0,a.createElement)("svg",{ref:t,...n,width:i,height:i,stroke:r,strokeWidth:l?24*Number(o)/Number(i):o,className:s("lucide",c),...m},[...u.map(e=>{let[t,r]=e;return(0,a.createElement)(t,r)}),...Array.isArray(d)?d:[d]])}),o=(e,t)=>{let r=(0,a.forwardRef)((r,n)=>{let{className:o,...l}=r;return(0,a.createElement)(i,{ref:n,iconNode:t,className:s("lucide-".concat(e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),o),...l})});return r.displayName="".concat(e),r}},29155:(e,t,r)=>{"use strict";r.d(t,{J:()=>c});var a=r(73365),s=r(1521),n=r(59731),i=r(9395),o=r(19952);let l=(0,i.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)(n.b,{ref:t,className:(0,o.cn)(l(),r),...s})});c.displayName=n.b.displayName},32464:(e,t,r)=>{Promise.resolve().then(r.bind(r,60999))},34102:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(24637).A)("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},38982:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(24637).A)("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]])},59731:(e,t,r)=>{"use strict";r.d(t,{b:()=>o});var a=r(1521),s=r(75968),n=r(73365),i=a.forwardRef((e,t)=>(0,n.jsx)(s.sG.label,{...e,ref:t,onMouseDown:t=>{var r;t.target.closest("button, input, select, textarea")||(null==(r=e.onMouseDown)||r.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));i.displayName="Label";var o=i},59975:(e,t,r)=>{"use strict";r.d(t,{Fc:()=>l,TN:()=>d,XL:()=>c});var a=r(73365),s=r(1521),n=r(9395),i=r(19952);let o=(0,n.F)("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),l=s.forwardRef((e,t)=>{let{className:r,variant:s,...n}=e;return(0,a.jsx)("div",{ref:t,role:"alert",className:(0,i.cn)(o({variant:s}),r),...n})});l.displayName="Alert";let c=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)("h5",{ref:t,className:(0,i.cn)("mb-1 font-medium leading-none tracking-tight",r),...s})});c.displayName="AlertTitle";let d=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,a.jsx)("div",{ref:t,className:(0,i.cn)("text-sm [&_p]:leading-relaxed",r),...s})});d.displayName="AlertDescription"},60999:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>h});var a=r(73365),s=r(1521),n=r(1702),i=r(87021),o=r(4219),l=r(92547),c=r(14469),d=r(29155),u=r(70220),m=r(59975),g=r(38982),f=r(34102);function p(){let[e,t]=(0,s.useState)(()=>localStorage.getItem("magicLinkEmail")||""),[r,p]=(0,s.useState)(!1),[h,x]=(0,s.useState)(!0),[v,b]=(0,s.useState)(!1),[y,w]=(0,s.useState)(!1),[S,k]=(0,s.useState)(""),[N,j]=(0,s.useState)(null),[I,_]=(0,s.useState)(0),[A,T]=(0,s.useState)(""),[E,C]=(0,s.useState)(!1),[L,O]=(0,s.useState)(null),[F,P]=(0,s.useState)(null),[D,R]=(0,s.useState)(!1),[M,q]=(0,s.useState)(!1),U=(0,n.useRouter)(),J=(0,n.useSearchParams)(),{toast:W}=(0,u.dj)(),z=J.get("error"),$="magic-link"===J.get("from"),V="https:"===window.location.protocol?"; Secure":"",X=e=>{var t;e&&(document.cookie="authenticated=true; path=/; max-age=86400; SameSite=Lax".concat(V),e.access_token&&(document.cookie="sb_access_token=".concat(encodeURIComponent(e.access_token),"; path=/; max-age=3600; SameSite=Lax").concat(V)),(null==(t=e.user)?void 0:t.email)&&(document.cookie="admin_email=".concat(e.user.email,"; path=/; max-age=86400; SameSite=Lax").concat(V),localStorage.setItem("admin_email",e.user.email)))};(0,s.useEffect)(()=>{let e=localStorage.getItem("magicLinkLastSent");if(e){let t=60-Math.floor((Date.now()-parseInt(e))/1e3);t>0?_(t):localStorage.removeItem("magicLinkLastSent")}},[]),(0,s.useEffect)(()=>
1{if(I>0){let e=setTimeout(()=>{_(I-1),I-1==0&&localStorage.removeItem("magicLinkLastSent")},1e3);return()=>clearTimeout(e)}},[I]),(0,s.useEffect)(()=>{let{data:{subscription:e}}=i.supabase.auth.onAuthStateChange((e,t)=>{if("SIGNED_OUT"===e||!t)return void(document.cookie="authenticated=; path=/; max-age=0; SameSite=Lax".concat(V),document.cookie="sb_access_token=; path=/; max-age=0; SameSite=Lax".concat(V),document.cookie="admin_email=; path=/; max-age=0; SameSite=Lax".concat(V),localStorage.removeItem("admin_email"));("INITIAL_SESSION"===e||"SIGNED_IN"===e||"TOKEN_REFRESHED"===e||"USER_UPDATED"===e)&&X(t)});return()=>e.unsubscribe()},[]),(0,s.useEffect)(()=>{(async()=>{try{console.log("[Login] Checking for existing session...");let{data:{session:t},error:r}=await i.supabase.auth.getSession();if(r){console.error("[Login] Session check error:",r),o.Cp(r,{tags:{component:"LoginForm",action:"checkSession"},extra:{errorMessage:r.message,errorCode:r.code}});return}if(t){var e;console.log("[Login] Active session found for:",null==(e=t.user)?void 0:e.email),b(!0),X(t);let r=J.get("redirectedFrom")||"/inbox";console.log("[Login] Redirecting to:",r),U.replace(r)}else console.log("[Login] No active session found")}catch(e){console.error("[Login] Unexpected error during session check:",e),o.Cp(e,{tags:{component:"LoginForm",action:"checkSession"}})}finally{x(!1)}})(),z&&($?W({title:"Email Link Authentication Failed",description:"".concat(z,". Request a new sign-in code and use the 6-digit code from the latest email."),variant:"destructive"}):W({title:"Authentication Error",description:z,variant:"destructive"}))},[J,U,z,$,W]);let Y=async t=>{var r,a;t.preventDefault(),p(!0),j(null);try{console.log("[Login] Attempting to verify OTP code:",S);let{data:t,error:a}=await i.supabase.auth.verifyOtp({email:e,token:S,type:"email"});if(a)throw console.error("[Login] OTP verification error:",a),o.Cp(a,{tags:{component:"LoginForm",action:"verifyOtp"},extra:{email:e,errorMessage:a.message}}),a;if(t.session){console.log("[Login] OTP verification successful for:",null==(r=t.session.user)?void 0:r.email),b(!0),X(t.session),W({title:"Success!",description:"Authentication successful. Redirecting..."}),await new Promise(e=>setTimeout(e,500));let e=J.get("redirectedFrom")||"/inbox";U.replace(e)}}catch(r){console.error("OTP verification error:",r);let t="Invalid or expired code. Please check the latest email and try again.";(null==(a=r.message)?void 0:a.includes("expired"))&&(t="This code is no longer valid. If you requested multiple emails, use the latest one or request a new sign-in code."),j(t),o.wd("OTP verification failed: ".concat(r.message),{level:"error",tags:{component:"LoginForm",action:"handleVerifyCode"},extra:{email:e,error:r.message}})}finally{p(!1)}},G=async t=>{var r,a,s,n,l,c;t.preventDefault(),p(!0),j(null),P(null),O(null);try{q(!0);let t=await fetch("/api/access-requests/check",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e})}),s=await t.json();if(q(!1),t.ok&&s.canRequestAccess&&!s.hasAccess){R(!0),P(s.reason||null),W({title:"No access found yet",description:"Please request access from your team before signing in."});return}let{error:n}=await i.supabase.auth.signInWithOtp({email:e,options:{shouldCreateUser:!1}});if(n)throw console.error("[Login] Magic link error details:",{error:n,message:n.message,status:n.status,code:n.code}),o.Cp(n,{tags:{component:"LoginForm",action:"signInWithOtp",errorType:(null==(r=n.message)?void 0:r.includes("rate limit"))?"rate_limit":(null==(a=n.message)?void 0:a.includes("Invalid"))?"validation_error":"auth_error"},extra:{email:e,errorMessage:n.message,errorStatus:n.status,errorCode:n.code,hostname:window.location.hostname},user:{email:e}}),n;console.log("[Login] Sign-in code email sent successfully to:",e),localStorage.setItem("magicLinkLastSent",Date.now().toString()),_(60),localStorage.setItem("magicLinkEmail",e),w(!0),k(""),W({title:"Sign-In Email Sent",description:"Check your email and enter the 6-digit code. This is the most reliable option if your email security opens links automatically."})}catch(a){console.error("Sign-in code error:",a),a&&a.message&&o.wd("Sign-in code request failed: ".concat(a.message),{level:"error",tags:{component:"LoginForm",action:"handleMagicLink"},extra:{email:e,error:a.message}});let t=a.message||"Failed to send sign-in code",r="Unable to Send Sign-In Code";(null==(s=a.message)?void 0:s.includes("rate limit"))?(r="Too Many Requests",t="Too many sign-in attempts. Please wait before trying again."):429===a.status?(r="Please Wait",t="You can request a new sign-in code in a few minutes. Check your email - your previous code may still be valid."):(null==(n=a.message)?void 0:n.includes("Invalid email"))?(r="Invalid Email",t="Please enter a valid email address."):((null==(l=a.message)?void 0:l.includes("network"))||(null==(c=a.message)?void 0:c.includes("fetch")))&&(r="Connection
1Error",t="Unable to connect. Please check your internet connection and try again."),W({title:r,description:t,variant:"destructive"})}finally{q(!1),p(!1)}},Z=async t=>{if(t.preventDefault(),P(null),O(null),!e)return void P("Please enter your company email first.");C(!0);try{let t=await fetch("/api/access-requests",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e,name:A})}),r=await t.json();if(!t.ok)throw Error(r.error||"Failed to submit access request");O(r.message||"If eligible, your request will be reviewed shortly."),W({title:"Request submitted",description:r.message||"If eligible, your request will be reviewed shortly."})}catch(t){let e=(null==t?void 0:t.message)||"Failed to submit access request";P(e),W({title:"Unable to submit request",description:e,variant:"destructive"})}finally{C(!1)}};return h||v?(0,a.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-background",children:(0,a.jsxs)("div",{className:"text-center space-y-4",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center",children:(0,a.jsx)("div",{className:"w-8 h-8 border-4 border-primary border-t-transparent rounded-full animate-spin"})}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:v?"Signing you in...":"Loading..."})]})}):(0,a.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-background",children:(0,a.jsxs)("div",{className:"w-full max-w-md
1space-y-8 p-8",children:[(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("h2",{className:"text-3xl font-bold",children:"Welcome to Alvio.ai"}),(0,a.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:"Enter your email to receive a sign-in email"})]}),y||$?(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)(m.Fc,{children:[(0,a.jsx)(g.A,{className:"h-4 w-4"}),(0,a.jsxs)(m.TN,{className:"ml-2",children:[(0,a.jsx)("strong",{children:"Check your email and enter the code."}),(0,a.jsx)("br",{}),"We've sent a sign-in email to ",(0,a.jsx)("strong",{children:e}),(0,a.jsx)("br",{}),"Use the 6-digit code from that email to sign in.",(0,a.jsx)("br",{}),(0,a.jsx)("span",{className:"text-xs text-muted-foreground mt-1",children:"Some corporate mail systems open links automatically, which can invalidate a one-time magic link before the user clicks it."})]})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("form",{onSubmit:Y,className:"space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(d.J,{htmlFor:"code",children:"Verification Code"}),(0,a.jsx)(c.p,{id:"code",type:"text",value:S,onChange:e=>{k(e.target.value.replace(/\D/g,"").slice(0,6)),j(null)},placeholder:"Enter 6-digit code",className:"mt-1 text-center text-lg tracking-wider font-mono",maxLength:6,pattern:"[0-9]{6}",autoComplete:"one-time-code",autoFocus:!0}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Use the 6-digit code from the latest email. If you requested multiple emails, older codes will no longer work."}),N&&(0,a.jsx)("p",{className:"text-xs text-destructive mt-2",children:N})]}),(0,a.jsx)(l.$,{type:"submit",className:"w-full",disabled:r||6!==S.length||v,children:r||v?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin mr-2 inline-block"}),"Verifying..."]}):"Sign In With Code"})]}),(0,a.jsx)("div",{className:"flex gap-2",children:(0,a.jsx)(l.$,{variant:"outline",className:"flex-1",onClick:()=>{w(!1),t(""),k(""),j(null)},children:"Try Another Email"})})]})]}):(0,a.jsxs)("form",{onSubmit:G,className:"mt-8 space-y-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(d.J,{htmlFor:"email",children:"Email address"}),(0,a.jsx)(c.p,{id:"email",type:"email",value:e,onChange:e=>t(e.target.value),required:!0,className:"mt-1",placeholder:"Enter your email",autoFocus:!0})]}),(0,a.jsx)(l.$,{type:"submit",className:"w-full",disabled:r||M||!e||v||I>0,children:r||v||M?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin mr-2 inline-block"}),M?"Checking access...":"Sending sign-in email..."]}):I>0?(0,a.jsxs)(a.Fragment,{children:["Wait ",Math.floor(I/60),":",(I%60).toString().padStart(2,"0")," to resend"]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(g.A,{className:"mr-2 h-4 w-4"}),"Send Sign-In Email"]})}),I>0&&(0,a.jsxs)(m.Fc,{children:[(0,a.jsx)(g.A,{className:"h-4 w-4"}),(0,a.jsxs)(m.TN,{className:"ml-2",children:[(0,a.jsx)("strong",{children:"Sign-in email already sent."}),(0,a.jsx)("br",{}),"Check your inbox and spam folder. Use the latest 6-digit code from the email.",(0,a.jsx)("br",{}),(0,a.jsxs)("span",{className:"text-xs text-muted-foreground mt-1",children:["You can request a new email in ",Math.floor(I/60)," minute",1!==Math.floor(I/60)?"s":"","."]})]})]}),(0,a.jsx)("p",{className:"text-center text-sm text-muted-foreground",children:"No password needed. We'll email you a one-time sign-in code."})]}),D&&(0,a.jsxs)("div",{className:"rounded-lg border border-amber-300 bg-amber-50/70 p-4",children:[(0,a.jsxs)("div",{className:"flex items-start gap-2",children:[(0,a.jsx)(f.A,{className:"mt-0.5 h-4 w-4 text-amber-700"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-semibold text-amber-900",children:"You do not have access yet"}),(0,a.jsx)("p",{className:"mt-1 text-xs text-amber-800",children:"You can request it from your admins below. We only accept company emails (custom domains)."})]})]}),(0,a.jsxs)("form",{onSubmit:Z,className:"mt-3 space-y-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(d.J,{htmlFor:"access-name",children:"Your name (optional)"}),(0,a.jsx)(c.p,{id:"access-name",type:"text",value:A,onChange:e=>T(e.target.value),placeholder:"John",className:"mt-1"})]}),(0,a.jsx)(l.$,{type:"submit",className:"w-full",disabled:E||!e,children:E?"Submitting request...":"Request access from my team"})]}),L&&(0,a.jsx)("p",{className:"mt-2 text-xs font-medium text-emerald-700",children:L}),F&&(0,a.jsx)("p",{className:"mt-2 text-xs font-medium text-destructive",children:F})]})]})})}function h(){return(0,a.jsx)(s.Suspense,{fallback:(0,a.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-background",children:(0,a.jsx)("div",{className:"text-center",children:"Loading..."})}),children:(0,a.jsx)(p,{})})}},70220:(e,t,r)=>{"use strict";r.d(t,{dj:()=>u,oR:()=>d});var a=r(1521);let s=0,n=new Map,i=e=>{if(n.has(e))return;let t=setTimeout(()=>{n.delete(e),c({type:"REMOVE_TOAST",toastId:e})},5e3);n.set(e,t)},o=[],l={toasts:[]};function c(e){l=((e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case"DISMISS_TOAST":{let{toastId:r}=t;
1return r?i(r):e.toasts.forEach(e=>{i(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===r||void 0===r?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===t.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}})(l,e),o.forEach(e=>{e(l)})}function d(e){let{...t}=e,r=(s=(s+1)%Number.MAX_SAFE_INTEGER).toString(),a=()=>c({type:"DISMISS_TOAST",toastId:r});return c({type:"ADD_TOAST",toast:{...t,id:r,open:!0,onOpenChange:e=>{e||a()}}}),{id:r,dismiss:a,update:e=>c({type:"UPDATE_TOAST",toast:{...e,id:r}})}}function u(){let[e,t]=a.useState(l);return a.useEffect(()=>(o.push(t),()=>{let e=o.indexOf(t);e>-1&&o.splice(e,1)}),[e]),{...e,toast:d,dismiss:e=>c({type:"DISMISS_TOAST",toastId:e})}}},75968:(e,t,r)=>{"use strict";r.d(t,{hO:()=>l,sG:()=>o});var a=r(1521),s=r(98196),n=r(35933),i=r(73365),o=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let r=(0,n.TL)(`Primitive.${t}`),s=a.forwardRef((e,a)=>{let{asChild:s,...n}=e;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,i.jsx)(s?r:t,{...n,ref:a})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{});function l(e,t){e&&s.flushSync(()=>e.dispatchEvent(t))}},87021:(e,t,r)=>{"use strict";function a(e){if(!e)return null;try{let t=JSON.parse(e);return t&&"object"==typeof t?t:null}catch(e){return null}}r.d(t,{supabase:()=>s});let s=(0,r(75328).UU)("https://nfuadroqaiwtkbykbqrq.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im5mdWFkcm9xYWl3dGtieWticXJxIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NDc5MjEwMzksImV4cCI6MjA2MzQ5NzAzOX0.rwbeV6wZjO-J0CzSUukWyddxaBfTERMFdM5Dbbee6jw",{auth:{autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,storage:{getItem:e=>window.localStorage.getItem(e),setItem:(e,t)=>{{let r=window.localStorage.getItem(e);window.localStorage.setItem(e,function(e,t){let r=a(e);if(!(null==r?void 0:r.access_token)||"number"!=typeof r.expires_at||!Number.isFinite(r.expires_at)||"number"!=typeof r.expires_in||!Number.isFinite(r.expires_in))return e;let s=a(t);if((null==s?void 0:s.access_token)===r.access_token&&"number"==typeof s.expires_at&&Number.isFinite(s.expires_at))return JSON.stringify({...r,expires_at:s.expires_at});let n=Math.floor(Date.now()/1e3)+r.expires_in,i=n-r.expires_at;return 120>=Math.abs(i)?e:(console.warn("[Auth] Correcting session expiry for client clock skew",{clockSkewSeconds:i}),JSON.stringify({...r,expires_at:n}))}(t,r))}},removeItem:e=>{window.localStorage.removeItem(e)}}}})},92547:(e,t,r)=>{"use strict";r.d(t,{$:()=>c,r:()=>l});var a=r(73365),s=r(1521),n=r(35933),i=r(9395),o=r(19952);let l=(0,i.F)("inline-flex items-center justify-center gap-2 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 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-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:i,asChild:c=!1,...d}=e,u=c?n.DX:"button";return(0,a.jsx)(u,{className:(0,o.cn)(l({variant:s,size:i,className:r})),ref:t,...d})});c.displayName="Button"}},e=>{e.O(0,[75705,75328,95515,4219,2347,41082,77358],()=>e(e.s=32464)),_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.