PageSourceSearch

https://smartmanageai.ai/assets/impersonate-DJ4VJVSt.js

js smartmanageai.ai collected 2026-10-05 15:06:08 UTC 1,673 bytes, 1 lines download raw bytes

1import{r as o,j as e}from"./vendor-react-DKbe1Umz.js";import{a as d,C as m,s as l,t as p,v as u}from"./index-DZ74KeH3.js";import{c0 as g}from"./vendor-ui-DMaW9-Ov.js";import"./vendor-data-CjSe2wkl.js";import"./vendor-charts-DWX9qznF.js";import"./vendor-dates-5UNeOyFW.js";import"./vendor-forms-C2vWC2ab.js";function N(){const[,i]=d(),[t,a]=o.useState("loading"),[c,r]=o.useState("Setting up session...");return o.useEffect(()=>{const n=new URLSearchParams(window.location.search).get("code");if(!n){a("error"),r("No authentication code provided");return}window.history.replaceState({},document.title,"/impersonate"),fetch("/api/platform/impersonate/exchange",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:n}),credentials:"include"}).then(s=>{if(!s.ok)throw new Error("Code expired or invalid");return s.json()}).then(()=>{a("success"),r("Logged in successfully. Redirecting..."),setTimeout(()=>{i("/dashboard")},1e3)}).catch(s=>{a("error"),r(s.message||"Failed to authenticate")})},[i]),e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background","data-testid":"impersonate-page",children:e.jsxs(m,{className:"w-[400px]",children:[e.jsx(l,{children:e.jsxs(p,{className:"text-center","data-testid":"text-impersonate-status",children:[t==="loading"&&"Logging In...",t==="success"&&"Login Successful",t==="error"&&"Login Failed"]})}),e.jsxs(u,{className:"flex flex-col items-center gap-4",children:[t==="loading"&&e.jsx(g,{className:"h-8 w-8 animate-spin text-primary"}),e.jsx("p",{className:"text-muted-foreground text-center","data-testid":"text-impersonate-message",children:c})]})]})})}export{N as default};

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.