"use client";
import{l as e,u as t}from"./keepAlive-CEzyrDfg.js";import{t as n}from"./flag-koeDAqr3.js";import{useQuery as r}from"@tanstack/react-query";import i from"axios";import{createContext as a,useCallback as o,useContext as s,useMemo as c}from"react";import{jsx as l}from"react/jsx-runtime";const u={basePath:``},d=a(null);d.displayName=`RouteConfigContext`;function f({children:e,basePath:t=u.basePath}){let n=o(e=>!t||e.startsWith(t)||e.match(/^https?:\/\//)||e.startsWith(`#`)?e:`${t.endsWith(`/`)?t.slice(0,-1):t}${e.startsWith(`/`)?e:`/${e}`}`,[t]),r=c(()=>({basePath:t,resolvePath:n}),[t,n]);return l(d.Provider,{value:r,children:e})}const p={basePath:``,resolvePath:e=>e};function m(){return s(d)??p}function h(){return s(d)}const g=a(void 0),_=()=>{let e=s(g);if(!e)throw Error(`useLineageViewContext must be used within a LineageViewProvider`);return e},v=()=>s(g),y=i.create();function b(){let i=e()?.apiClient??y;return r({queryKey:t.flag(),queryFn:()=>n(i)})}export{f as a,_ as i,g as n,m as o,v as r,h as s,b as t};
//# sourceMappingURL=useRecceServerFlag-Bg5R67J4.js.map