import{Ir as e}from"./i18n-CsN8OUP9.js";import{n as t}from"./registry-CwOJ4xqK.js";import{at as n,q as r}from"./store-CZ73mANc.js";var i=`/settings`,a=`/command-center`,o=`/skills`,s=`/messaging`,c=`/webhooks`,l=`/artifacts`,u=`/cron`,d=`/profiles`,f=`/agents`,p=`/starmap`,m=[{id:`new`,path:`/`,view:`chat`},{id:`settings`,path:i,view:`settings`},{id:`command-center`,path:a,view:`command-center`},{id:`skills`,path:o,view:`skills`},{id:`messaging`,path:s,view:`messaging`},{id:`webhooks`,path:c,view:`webhooks`},{id:`artifacts`,path:l,view:`artifacts`},{id:`cron`,path:u,view:`cron`},{id:`profiles`,path:d,view:`profiles`},{id:`agents`,path:f,view:`agents`},{id:`starmap`,path:p,view:`starmap`}],h=new Map(m.map(e=>[e.path,e.view])),g=new Set(m.map(e=>e.path)),_=`routes`;function v(){return t.getArea(_).map(e=>({key:`${e.source??`core`}:${e.id}`,path:e.data?.path??``,title:e.title,render:e.render})).filter(e=>!!(e.path.startsWith(`/`)&&e.render)&&!g.has(e.path))}function y(e){return v().some(t=>t.path===e)}var b=`sidebar.nav`,x=new Set([`agents`,`command-center`,`cron`,`profiles`,`settings`,`starmap`,`webhooks`]);function S(e){return x.has(e)}function C(e){let t=e.search(/[?#]/);return t===-1?e:e.slice(0,t)}function w(e){return C(e)===`/`}function T(e){let t=C(e);if(!t.startsWith(`/`)||g.has(t)||y(t))return null;let n=t.slice(1);return n&&!n.includes(`/`)?decodeURIComponent(n):null}function E(e,t){return w(e)?null:T(e)??t}function D(e){return`/${encodeURIComponent(e)}`}function O(e){let t=C(e);return w(t)||T(t)?`chat`:y(t)?`extension`:h.get(t)??`chat`}function k(e){let t=O(e);return t!==`chat`&&!S(t)}var A=e(!1);function j(){r(null),n(`workspace`)}function M(e){let t=k(e);t!==A.get()&&A.set(t),t&&j()}function N(e,t,n){e(t,n),k(t)&&j()}export{M as S,S as _,u as a,T as b,_ as c,o as d,p as f,w as g,v as h,a as i,i as l,O as m,f as n,s as o,c as p,l as r,d as s,A as t,b as u,N as v,D as x,E as y};