try{let e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`e2b8cf6e-7497-470a-9643-114aecf393a7`,e._sentryDebugIdIdentifier=`sentry-dbid-e2b8cf6e-7497-470a-9643-114aecf393a7`)}catch{}import{o as e}from"./rolldown-runtime-eb2nym32.js";import{$d as t,Ag as n,Ig as r,Sr as i,Ym as a,hn as o,ht as s,st as c,th as l}from"./entry.client-dr7r6s9a.js";import{t as u}from"./useAButtonHandler-ftqyzpyw.js";var d=i(),f=e(r(),1),p=n(),m=performance.now()/1e3,h=a(function(){let e=(0,d.c)(14),n=c(),r=l(),i;e[0]===r?i=e[1]:(i=r.getLogger(`PerfTestRoute`),e[0]=r,e[1]=i);let a=i,h=(0,f.useRef)(null),[g,_]=(0,f.useState)(null),v,y;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(v=()=>_(performance.now()/1e3),y=[],e[2]=v,e[3]=y):(v=e[2],y=e[3]),(0,f.useEffect)(v,y);let b;e[4]!==a||e[5]!==n?(b=()=>{a.info(`Navigating to Home`),n(t.home.$path())},e[4]=a,e[5]=n,e[6]=b):b=e[6];let x=b;u(`release`,x);let S=performance.memory,C;e[7]===g?C=e[8]:(C=g!==null&&(0,p.jsxs)(`table`,{className:`border-collapse`,children:[(0,p.jsx)(`thead`,{children:(0,p.jsx)(`tr`,{className:`border-separator-neutral-alpha border-b`,children:(0,p.jsx)(`th`,{colSpan:2,className:`px-4 py-3 text-center font-bold text-noninteractive-content-primary-content type-title2`,children:`Performance Metrics`})})}),(0,p.jsxs)(`tbody`,{children:[(0,p.jsxs)(`tr`,{className:`border-separator-neutral-alpha border-b`,children:[(0,p.jsx)(`td`,{className:`px-4 py-2 text-end text-noninteractive-content-primary-content type-body`,children:`Time to init route module:`}),(0,p.jsxs)(`td`,{className:`px-4 py-2 font-mono text-noninteractive-content-primary-content type-body`,children:[m.toFixed(3),`s`]})]}),(0,p.jsxs)(`tr`,{className:`border-separator-neutral-alpha border-b`,children:[(0,p.jsx)(`td`,{className:`px-4 py-2 text-end text-noninteractive-content-primary-content type-body`,children:`Time to client render:`}),(0,p.jsxs)(`td`,{className:`px-4 py-2 font-mono text-noninteractive-content-primary-content type-body`,children:[g.toFixed(3),`s`]})]}),(0,p.jsxs)(`tr`,{className:`border-separator-neutral-alpha border-b`,children:[(0,p.jsx)(`td`,{className:`px-4 py-2 text-end text-noninteractive-content-primary-content type-body`,children:`Memory usage:`}),(0,p.jsx)(`td`,{className:`px-4 py-2 font-mono text-noninteractive-content-primary-content type-body`,children:S?`${(S.usedJSHeapSize/1024/1024).toFixed(2)} MB`:`N/A`})]})]})]}),e[7]=g,e[8]=C);let w;e[9]===x?w=e[10]:(w=(0,p.jsx)(o,{as:`button`,ref:h,onClick:x,"data-auto-focus":!0,children:`Navigate to Home`}),e[9]=x,e[10]=w);let T;return e[11]!==C||e[12]!==w?(T=(0,p.jsxs)(s,{autoFocusContainer:!0,className:`flex h-screen flex-col items-center justify-center gap-8`,children:[C,w]}),e[11]=C,e[12]=w,e[13]=T):T=e[13],T});export{h as default};