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]=`865dff18-6ed9-46b6-97c5-b57663f3b827`,e._sentryDebugIdIdentifier=`sentry-dbid-865dff18-6ed9-46b6-97c5-b57663f3b827`)}catch{}import{o as e}from"./rolldown-runtime-nx40z1zs.js";import{E as t}from"./vendor-misc-dys7qi6h.js";import{Ag as n,Gu as r,Oi as i,_r as a,bt as o,cp as s,jg as c,lp as l,ng as u,sp as d,yp as f}from"./entry.client-mpghtlrl.js";import{o as p}from"./navigation-stack-h7n8tudn.js";import{i as m,t as h}from"./ControllerPairingContext-g12j6fyu.js";import{t as g}from"./controllerPairingRouteBindings-jumx2xek.js";import{d as _}from"./routes-dojzucd0.js";var v=n(),y=e(c(),1),b=u();g();var x=i(e=>{let t=e.initialPath??_.getLink(),[n,r]=(0,y.useState)(),i=(0,y.useMemo)(()=>{let e=l({routeTree:d,history:f({initialEntries:[t]})});return e.load(),e},[]);return(0,b.jsx)(o,{autoFocusContainer:!0,className:`flex h-full flex-col`,children:(0,b.jsx)(h.Provider,{value:{...e,initialPath:t,controllerType:n,setControllerType:r},children:(0,b.jsx)(s,{router:i})})})},`PairingPage`),S=a(x,e=>{let{navcontext:n,initialPath:i}=t(r.controllerPairing);return{...e,navigationContext:n,initialPath:i}}),C=()=>{let e=(0,v.c)(4),n=S.useComponent(),{navcontext:i,initialPath:a}=t(r.controllerPairing),o=m(i,void 0,void 0,void 0,a,void 0),{navigateBack:s}=p(),c;return e[0]!==n||e[1]!==o||e[2]!==s?(c=(0,b.jsx)(n,{...o,onBack:s}),e[0]=n,e[1]=o,e[2]=s,e[3]=c):c=e[3],c};export{x as n,C as t};