!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2e0ad316-ab68-5d09-8fc0-10009d2957e8")}catch(e){}}(); import{r as t,u as f}from"./index-DwaoyV61.js";import{u as l}from"./components-DhFN5rxT.js";const p=a=>{const[e,r]=l(),[s,i]=t.useState(e.get("q")||""),[n,c]=t.useState(!1),h=f();function o(){location.pathname.includes("/archive")?r(e):h(`archive?q=${s}`)}return t.useEffect(()=>{const u=e.get("q")||"";s!==u&&(e.delete("page"),e.set("q",s),r(e));const m=setTimeout(()=>{s?(e.set("q",s),o()):e.has("q")&&!s&&(e.delete("q"),o()),c(!1)},a);return()=>{clearTimeout(m)}},[s,a,e]),{searchTerm:s,setSearchTerm:i,isSearching:n,setIsSearching:c}};export{p as u}; //# sourceMappingURL=useDebounce-DzYhW_Pw.js.map //# debugId=2e0ad316-ab68-5d09-8fc0-10009d2957e8