import{n as e}from"./rolldown-runtime-Bh1tDfsg.js";import{n as t}from"./jsx-runtime-BHz_hoGM.js";import{t as n}from"./useRouter-B9Ekf4jx.js";import{F as r,t as i,x as a}from"./useStore-6tYspCh2.js";import{n as o,t as s}from"./matchContext-Dv7T8dWW.js";var c=e(t(),1),l={get(){},subscribe(){return{unsubscribe(){}}}};function u(e,t){let n=c.useRef();return i=>{let a=e?.select?e.select(i):i;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=r(n.current,a):a}}function d(e){let t=n(),r=c.useContext(e.from?s:o),d=e.from?t.stores.getRouteMatchStore(e.from):t.stores.matchStores.get(r),f=u(e,t),p=i(d??l,e=>e?f(e):l);if(p!==l)return p;(e.shouldThrow??!0)&&a()}function f(e){return d({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}export{d as n,f as t};
//# sourceMappingURL=useSearch-BGl3KWA7.js.map