1import{j as e,C as z,b as J,c as X,B as G,aF as K,d as M,e as c,am as Q,h as W}from"./index-Byg2HWAE.js";import{r as o}from"./vendor-Qgthw7N1.js";import{C as Z}from"./circle-x-C3yul9_R.js";function te(){var m,x,p,j,b,v,f,y,g,B,N,S,A,w,C,R,T,k,E,D,I,P,H,U;const[s,q]=o.useState({}),[d,u]=o.useState(!1),F=()=>{const t=document.querySelectorAll('script[src*="replit-dev-banner"]'),a=t.length>0,n=document.querySelectorAll('[style*="background-color: rgb(0, 123, 255)"]'),i=Array.from(document.querySelectorAll("*")).filter(r=>{var V;return((V=r.textContent)==null?void 0:V.includes("replit"))&&getComputedStyle(r).backgroundColor.includes("rgb(0, 123, 255)")});return{hasReplitBannerScript:a,blueBannerVisible:n.length>0,scriptCount:t.length,blueBannerTexts:i.length}},O=async()=>{try{const t=await fetch("/api/auth/user"),a=t.ok;let n=null;return a&&(n=await t.json()),{isAuthenticated:a,userData:n,status:t.status}}catch(t){return{isAuthenticated:!1,error:t.message,status:"error"}}},Y=async()=>{try{const t=await fetch("/api/admin/impersonation-status");return{accessible:t.ok,status:t.status,data:t.ok?await t.json():null}}catch(t){return{accessible:!1,error:t.message}}},$=async()=>{try{const t=await fetch("/api/analytics/summary?period=30d");return{accessible:t.ok,status:t.status,data:t.ok?await t.json():null}}catch(t){return{accessible:!1,error:t.message}}},L=()=>{const t=document.querySelectorAll("*"),a=[];return t.forEach(n=>{var i,r;((i=n.textContent)!=null&&i.includes("$10/month")||(r=n.textContent)!=null&&r.includes("$25/month"))&&a.push(n.textContent.slice(0,100))}),a},h=async()=>{u(!0);const[t,a,n]=await Promise.all([O(),Y(),$()]),i={timestamp:new Date().toISOString(),authentication:t,impersonation:a,analytics:n,blueBanner:F(),pricing:{textsFound:L()},environment:{currentUrl:window.location.href,hostname:window.location.hostname,pathname:window.location.pathname,userAgent:navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")?"Safari":"Other"}};q(i),u(!1)};o.useEffect(()=>{h()},[]);const l=({passed:t})=>t?e.jsx(W,{className:"h-5 w-5 text-green-500"}):e.jsx(Z,{className:"h-5 w-5 text-red-500"});return e.jsx("div",{className:"container mx-auto px-4 py-8 max-w-4xl",children:e.jsxs(z,{children:[e.jsx(J,{children:e.jsxs(X,{className:"flex items-center justify-between",children:[e.jsx("span",{children:"Public System Diagnostics"}),e.jsxs(G,{onClick:h,disabled:d,size:"sm",children:[e.jsx(K,{className:`h-4 w-4 mr-2 ${d?"animate-spin":""}`}),"Refresh"]})]})}),e.jsxs(M,{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("h3",{className:"font-semibold flex items-center gap-2",children:[e.jsx(l,{passed:!((m=s.blueBanner)!=null&&m.hasReplitBannerScript)&&!((x=s.blueBanner)!=null&&x.blueBannerVisible)}),"Blue Banner Test"]}),e.jsxs("div",{className:"pl-7 space-y-1 text-sm",children:[e.jsxs("div",{children:["Replit Banner Script: ",e.jsx(c,{variant:(p=s.blueBanner)!=null&&p.hasReplitBannerScript?"destructive":"default",children:(j=s.blueBanner)!=null&&j.hasReplitBannerScript?"FOUND":"Not Found"})]}),e.jsxs("div",{children:["Blue Elements: ",e.jsx(c,{variant:(b=s.blueBanner)!=null&&b.blueBannerVisible?"destructive":"default",children:(v=s.blueBanner)!=null&&v.blueBannerVisible?"VISIBLE":"None"})]}),e.jsxs("div",{children:["Blue Text Elements: ",((f=s.blueBanner)==null?void 0:f.blueBannerTexts)||0]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("h3",{className:"font-semibold flex items-center gap-2",children:[e.jsx(l,{passed:(y=s.authentication)==null?void 0:y.isAuthenticated}),"Authentication Status"]}),e.jsxs("div",{className:"pl-7 space-y-1 text-sm",children:[e.jsxs("div",{children:["Status: ",e.jsx(c,{variant:(g=s.authentication)!=null&&g.isAuthenticated?"default":"destructive",children:(B=s.authentication)!=null&&B.isAuthenticated?"Authenticated":"Not Authenticated"})]}),e.jsxs("div",{children:["HTTP Status: ",(N=s.authentication)==null?void 0:N.status]}),((S=s.authentication)==null?void 0:S.userData)&&e.jsxs("div",{children:["User: ",s.authentication.userData.email]}),((A=s.authentication)==null?void 0:A.error)&&e.jsxs("div",{className:"text-red-600",children:["Error: ",s.authentication.error]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("h3",{className:"font-semibold flex items-center gap-2",children:[e.jsx(Q,{className:"h-5 w-5 text-yellow-500"}),"Impersonation Endpoint"]}),e.jsxs("div",{className:"pl-7 space-y-1 text-sm",children:[e.jsxs("div",{children:["Accessible: ",e.jsx(c,{variant:(w=s.impersonation)!=null&&w.accessible?"default":"destructive",children:(C=s.impersonation)!=null&&C.accessible?"Yes":"No"})]}),e.jsxs("div",{children:["HTTP Status: ",(R=s.impersonation)==null?void 0:R.status]}),((T=s.impersonation)==null?void 0:T.data)&&e.jsxs("div",{children:["Data: ",JSON.stringify(s.impersonation.data).slice(0,100),"..."]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("h3",{className:"font-semibold flex items-center gap-2",children:[e.jsx(l,{passed:(k=s.analytics)==null?void 0:k.accessible}),"Analytics Endpoint"]}),e.jsxs("div",{className:"pl-7 space-y-1 text-sm",children:[e.jsxs("div",{children:["Accessible: ",e.jsx(c,{variant:(E=s.analytics)!=null&&E.accessible?"default":"destructive",children:(D=s.analytics)!=null&&D.accessible?"Yes":"No"})]}),e.jsxs("div",{children:["HTTP Status: ",(I=s.analytics)==null?void 0:I.status]}),((P=s.analytics)==null?void 0:P.data)&&e.jsx("div",{children:"Has Data: Yes"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"font-semibold",children:"Environment"}),e.jsxs("div",{className:"pl-7 space-y-1 text-sm font-mono text-gray-600",children:[e.jsxs("div",{children:["URL: ",(H=s.environment)==null?void 0:H.currentUrl]}),e.jsxs("div",{children:["Browser: ",(U=s.environment)==null?void 0:U.userAgent]}),e.jsxs("div",{children:["Timestamp: ",s.timestamp]})]})]})]})]})})}export{te 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.