import{i as e,n as t}from"./jsx-runtime-DG_AJzB_.js";import{C as n,k as r}from"./useRouterState-DpT8luFk.js";function i(e={}){if(e.isNotFound=!0,e.throw)throw e;return e}function a(e){return!!e?.isNotFound}var o=`__root__`;function s(e){if(e.statusCode=e.statusCode||e.code||307,typeof e.href==`string`&&r(e.href))throw Error(`Redirect blocked: unsafe protocol in href "${e.href}". Only ${n.join(`, `)} protocols are allowed.`);if(!e.reloadDocument&&typeof e.href==`string`)try{new URL(e.href),e.reloadDocument=!0}catch{}let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let i=new Response(null,{status:e.statusCode,headers:t});if(i.options=e,e.throw)throw i;return i}function c(e){return e instanceof Response&&!!e.options}var l=e(t(),1),u=l.createContext(void 0),d=l.createContext(void 0);export{o as a,s as i,u as n,a as o,c as r,i as s,d as t};