// @bun
var l="GEMI_REQUEST_BREAKER_ERROR";class a extends Error{kind="GEMI_REQUEST_BREAKER_ERROR";payload={api:{},view:{}}}function R(r,t){return r.replace(/:([^/]+[*?]?)/g,(c,e)=>{let s=e.endsWith("?")||e.endsWith("*"),n=s?e.slice(0,-1):e,o=t[n];if(o===void 0){if(s)return"";if(import.meta.env.DEV)throw Error(`Missing parameter: ${n}`);console.error(`Missing parameter: ${n} in URL: ${r}`)}return String(o)}).replace(/\/\//g,"/").replace(/\/$/,"")}class i extends a{constructor(r,t=307){super("Redirect error");this.name="RedirectError",this.payload={api:{status:200,data:{},directive:{kind:"Redirect",path:r}},view:{status:t,headers:{"Cache-Control":"private, no-cache, no-store, max-age=0, must-revalidate",Location:r}}}}}class d{static to(r,...t){let[c={}]=t,{search:e={},params:s={},permanent:n,status:o}={params:{},status:307,permanent:!1,...c},p=new URLSearchParams(e).toString();throw new i([R(r,s),p.toString()].filter(Boolean).join("?"),o??(n?301:307))}static external(r,t=307){throw new i(r,t)}}class E{}
export{l as sb,a as tb,R as ub,d as vb,E as wb};

//# debugId=BC9E7624FD4BF3DF64756E2164756E21
