import{r as c,j as u}from"./query-Bw69rE6b.js";import{ac as f}from"./index-CoUu6FiM.js";import{a as l,u as g,d as m}from"./react-CQKYBN-P.js";function x(){const{profile:a="",anchor:e=""}=l(),t=g();return c.useEffect(()=>{let r=!1;async function s(){try{const o=await f(a);if(r)return;const i=(o.artifacts||[]).find(n=>String(n.name).toLowerCase()===String(e).toLowerCase()||String(n.name).replace(/[^A-Za-z0-9_-]+/g,"_")===String(e));if(i){t(`/lineage?artifact=${i.id}`,{replace:!0});return}}catch{}t("/lineage",{replace:!0})}return s(),()=>{r=!0}},[a,e,t]),u.jsx(m,{to:"/lineage",replace:!0})}export{x as default};
