@cats-inc/cats-platform 0.1.7 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -8
- package/build/desktop/bootstrapPage.d.ts.map +1 -1
- package/build/desktop/bootstrapPage.js +5 -1
- package/build/desktop/bootstrapPage.js.map +1 -1
- package/build/desktop/cliInventoryProbe.d.ts.map +1 -1
- package/build/desktop/cliInventoryProbe.js +12 -0
- package/build/desktop/cliInventoryProbe.js.map +1 -1
- package/build/desktop/contracts.d.ts +1 -1
- package/build/desktop/contracts.d.ts.map +1 -1
- package/build/desktop/contracts.js +4 -0
- package/build/desktop/contracts.js.map +1 -1
- package/build/desktop/main.js +41 -9
- package/build/desktop/main.js.map +1 -1
- package/build/desktop/packaging.d.ts.map +1 -1
- package/build/desktop/packaging.js +62 -0
- package/build/desktop/packaging.js.map +1 -1
- package/build/desktop/setupAssets.d.ts.map +1 -1
- package/build/desktop/setupAssets.js +134 -0
- package/build/desktop/setupAssets.js.map +1 -1
- package/build/desktop/updateInstallHandoff.d.ts +14 -0
- package/build/desktop/updateInstallHandoff.d.ts.map +1 -1
- package/build/desktop/updateInstallHandoff.js +23 -0
- package/build/desktop/updateInstallHandoff.js.map +1 -1
- package/build/desktop/updateManager.d.ts.map +1 -1
- package/build/desktop/updateManager.js +8 -0
- package/build/desktop/updateManager.js.map +1 -1
- package/build/desktop/updaterAdapter.d.ts +16 -1
- package/build/desktop/updaterAdapter.d.ts.map +1 -1
- package/build/desktop/updaterAdapter.js +49 -2
- package/build/desktop/updaterAdapter.js.map +1 -1
- package/build/renderer/assets/{ActiveSessionPermissionChip-BRMLwkvf.js → ActiveSessionPermissionChip-Dl2UOFgh.js} +1 -1
- package/build/renderer/assets/{App-BM2nzo6s.js → App-C57f4p8k.js} +1 -1
- package/build/renderer/assets/{App-CVQAwCMi.js → App-CPqGDXVi.js} +1 -1
- package/build/renderer/assets/{App-Dl5FLaR_.js → App-ChvP0G9X.js} +1 -1
- package/build/renderer/assets/{WorkspaceAppRoutes-C3DUzdbj.js → WorkspaceAppRoutes-DYg2vnjz.js} +1 -1
- package/build/renderer/assets/{app-hP5h2jAt.js → app-DVN9Ghrk.js} +3 -3
- package/build/renderer/assets/{conversationSidebarRecentEntries-B-mNvfiy.js → conversationSidebarRecentEntries-XZVCnMLw.js} +1 -1
- package/build/renderer/assets/{useDraftSessionChips-DuXIoptW.js → useDraftSessionChips-By3XXabI.js} +1 -1
- package/build/renderer/index.html +1 -1
- package/build/server/shared/providerCatalog.d.ts +2 -2
- package/build/server/shared/providerCatalog.d.ts.map +1 -1
- package/build/server/shared/providerCatalogData.d.ts +11 -1
- package/build/server/shared/providerCatalogData.d.ts.map +1 -1
- package/build/server/shared/providerCatalogData.js +8 -0
- package/build/server/shared/providerCatalogData.js.map +1 -1
- package/build/server/shared/providerCatalogInstances.d.ts.map +1 -1
- package/build/server/shared/providerCatalogInstances.js +6 -0
- package/build/server/shared/providerCatalogInstances.js.map +1 -1
- package/package.json +6 -3
- package/scripts/README.md +51 -2
- package/scripts/linux/install-aider.sh +8 -0
- package/scripts/linux/install-cline.sh +8 -0
- package/scripts/linux/install-devin.sh +8 -0
- package/scripts/linux/install-grok.sh +8 -0
- package/scripts/linux/install-pi.sh +1 -1
- package/scripts/linux/node-cli-common.sh +43 -3
- package/scripts/linux/provider-cli-common.sh +162 -24
- package/scripts/linux/test-linux-package-smoke.sh +16 -0
- package/scripts/linux/upgrade-cli-tools.sh +2 -2
- package/scripts/macos/install-aider.sh +8 -0
- package/scripts/macos/install-cline.sh +8 -0
- package/scripts/macos/install-devin.sh +8 -0
- package/scripts/macos/install-grok.sh +8 -0
- package/scripts/macos/install-pi.sh +1 -1
- package/scripts/macos/node-cli-common.sh +43 -3
- package/scripts/macos/provider-cli-common.sh +162 -24
- package/scripts/macos/test-macos-package-smoke.sh +15 -0
- package/scripts/macos/upgrade-cli-tools.sh +2 -2
- package/scripts/windows/Check-WindowsSetupReadiness.ps1 +32 -1
- package/scripts/windows/Install-Aider.ps1 +368 -0
- package/scripts/windows/Install-Cline.ps1 +39 -0
- package/scripts/windows/Install-Devin.ps1 +385 -0
- package/scripts/windows/Install-Grok.ps1 +355 -0
- package/scripts/windows/Install-Pi.ps1 +1 -1
- package/scripts/windows/Test-WindowsInstallerSmoke.ps1 +23 -0
- package/scripts/windows/_NpmCliInstaller.ps1 +41 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/App-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/App-ChvP0G9X.js","assets/client-BdGHAUoK.js","assets/conversationSidebarRecentEntries-XZVCnMLw.js","assets/ActiveSessionPermissionChip-Dl2UOFgh.js","assets/useDraftSessionChips-By3XXabI.js","assets/App-BXCQs2gk.css","assets/App-C57f4p8k.js","assets/WorkspaceAppRoutes-DYg2vnjz.js","assets/App-DGwkRFZl.css","assets/App-CPqGDXVi.js","assets/App-DKequja8.css"])))=>i.map(i=>d[i]);
|
|
2
2
|
import{r as d,a as bd,j as r,R as Ii,b as yd}from"./client-BdGHAUoK.js";var Wo=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Bi=/^[\\/]{2}/;function vd(e,t){return t+e.replace(/\\/g,"/")}var Wn="popstate";function Un(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function Cd(e={}){function t(o,n){let s=n.state?.masked,{pathname:i,search:c,hash:u}=s||o.location;return no("",{pathname:i,search:c,hash:u},n.state&&n.state.usr||null,n.state&&n.state.key||"default",s?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function a(o,n){return typeof n=="string"?n:ua(n)}return Ld(t,a,null,e)}function he(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function He(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Sd(){return Math.random().toString(36).substring(2,10)}function Hn(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function no(e,t,a=null,o,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?qt(t):t,state:a,key:t&&t.key||o||Sd(),mask:n}}function ua({pathname:e="/",search:t="",hash:a=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),a&&a!=="#"&&(e+=a.charAt(0)==="#"?a:"#"+a),e}function qt(e){let t={};if(e){let a=e.indexOf("#");a>=0&&(t.hash=e.substring(a),e=e.substring(0,a));let o=e.indexOf("?");o>=0&&(t.search=e.substring(o),e=e.substring(0,o)),e&&(t.pathname=e)}return t}function Ld(e,t,a,o={}){let{window:n=document.defaultView,v5Compat:s=!1}=o,i=n.history,c="POP",u=null,h=g();h==null&&(h=0,i.replaceState({...i.state,idx:h},""));function g(){return(i.state||{idx:null}).idx}function p(){c="POP";let m=g(),C=m==null?null:m-h;h=m,u&&u({action:c,location:b.location,delta:C})}function k(m,C){c="PUSH";let v=Un(m)?m:no(b.location,m,C);h=g()+1;let y=Hn(v,h),L=b.createHref(v.mask||v);try{i.pushState(y,"",L)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;n.location.assign(L)}s&&u&&u({action:c,location:b.location,delta:1})}function f(m,C){c="REPLACE";let v=Un(m)?m:no(b.location,m,C);h=g();let y=Hn(v,h),L=b.createHref(v.mask||v);i.replaceState(y,"",L),s&&u&&u({action:c,location:b.location,delta:0})}function w(m){return Rd(n,m)}let b={get action(){return c},get location(){return e(n,i)},listen(m){if(u)throw new Error("A history only accepts one active listener");return n.addEventListener(Wn,p),u=m,()=>{n.removeEventListener(Wn,p),u=null}},createHref(m){return t(n,m)},createURL:w,encodeLocation(m){let C=w(m);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:k,replace:f,go(m){return i.go(m)}};return b}function Rd(e,t,a=!1){let o="http://localhost";e&&(o=e.location.origin!=="null"?e.location.origin:e.location.href),he(o,"No window.location.(origin|href) available to create URL");let n=typeof t=="string"?t:ua(t);return n=n.replace(/ $/,"%20"),!a&&Bi.test(n)&&(n=o+n),new URL(n,o)}function Fi(e,t,a="/"){return Pd(e,t,a,!1)}function Pd(e,t,a,o,n){let s=typeof t=="string"?qt(t):t,i=ht(s.pathname||"/",a);if(i==null)return null;let c=Ad(e),u=null,h=_i(i);for(let g=0;u==null&&g<c.length;++g)u=Fd(c[g],h,o);return u}function Ad(e){let t=Oi(e);return xd(t),t}function Oi(e,t=[],a=[],o="",n=!1){let s=(i,c,u=n,h)=>{let g={relativePath:h===void 0?i.path||"":h,caseSensitive:i.caseSensitive===!0,childrenIndex:c,route:i};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(o)&&u)return;he(g.relativePath.startsWith(o),`Absolute route path "${g.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(o.length)}let p=Qe([o,g.relativePath]),k=a.concat(g);i.children&&i.children.length>0&&(he(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),Oi(i.children,t,k,p,u)),!(i.path==null&&!i.index)&&t.push({path:p,score:Id(p,i.index),routesMeta:k.map((f,w)=>{let[b,m]=Hi(f.relativePath,f.caseSensitive,w===k.length-1);return{...f,matcher:b,compiledParams:m}})})};return e.forEach((i,c)=>{if(i.path===""||!i.path?.includes("?"))s(i,c);else for(let u of Wi(i.path))s(i,c,!0,u)}),t}function Wi(e){let t=e.split("/");if(t.length===0)return[];let[a,...o]=t,n=a.endsWith("?"),s=a.replace(/\?$/,"");if(o.length===0)return n?[s,""]:[s];let i=Wi(o.join("/")),c=[];return c.push(...i.map(u=>u===""?s:[s,u].join("/"))),n&&c.push(...i),c.map(u=>e.startsWith("/")&&u===""?"/":u)}function xd(e){e.sort((t,a)=>t.score!==a.score?a.score-t.score:Bd(t.routesMeta.map(o=>o.childrenIndex),a.routesMeta.map(o=>o.childrenIndex)))}var Td=/^:[\w-]+$/,Dd=3,Nd=2,jd=1,Md=10,Ed=-2,_n=e=>e==="*";function Id(e,t){let a=e.split("/"),o=a.length;return a.some(_n)&&(o+=Ed),t&&(o+=Nd),a.filter(n=>!_n(n)).reduce((n,s)=>n+(Td.test(s)?Dd:s===""?jd:Md),o)}function Bd(e,t){return e.length===t.length&&e.slice(0,-1).every((o,n)=>o===t[n])?e[e.length-1]-t[t.length-1]:0}function Fd(e,t,a=!1){let{routesMeta:o}=e,n={},s="/",i=[];for(let c=0;c<o.length;++c){let u=o[c],h=c===o.length-1,g=s==="/"?t:t.slice(s.length)||"/",p={path:u.relativePath,caseSensitive:u.caseSensitive,end:h},k=u.matcher&&u.compiledParams?Ui(p,g,u.matcher,u.compiledParams):pa(p,g),f=u.route;if(!k&&h&&a&&!o[o.length-1].route.index&&(k=pa({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},g)),!k)return null;Object.assign(n,k.params),i.push({params:n,pathname:Qe([s,k.pathname]),pathnameBase:Ud(Qe([s,k.pathnameBase])),route:f}),k.pathnameBase!=="/"&&(s=Qe([s,k.pathnameBase]))}return i}function pa(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[a,o]=Hi(e.path,e.caseSensitive,e.end);return Ui(e,t,a,o)}function Ui(e,t,a,o){let n=t.match(a);if(!n)return null;let s=n[0],i=s.replace(/(.)\/+$/,"$1"),c=n.slice(1);return{params:o.reduce((h,{paramName:g,isOptional:p},k)=>{if(g==="*"){let w=c[k]||"";i=s.slice(0,s.length-w.length).replace(/(.)\/+$/,"$1")}const f=c[k];return p&&!f?h[g]=void 0:h[g]=(f||"").replace(/%2F/g,"/"),h},{}),pathname:s,pathnameBase:i,pattern:e}}function Hi(e,t=!1,a=!0){He(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let o=[],n="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,c,u,h,g)=>{if(o.push({paramName:c,isOptional:u!=null}),u){let p=g.charAt(h+i.length);return p&&p!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(o.push({paramName:"*"}),n+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?n+="\\/*$":e!==""&&e!=="/"&&(n+="(?:(?=\\/|$))"),[new RegExp(n,t?void 0:"i"),o]}function _i(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return He(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function ht(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let a=t.endsWith("/")?t.length-1:t.length,o=e.charAt(a);return o&&o!=="/"?null:e.slice(a)||"/"}function Od(e,t="/"){let{pathname:a,search:o="",hash:n=""}=typeof e=="string"?qt(e):e,s;return a?(a=Gi(a),a.startsWith("/")?s=Gn(a.substring(1),"/"):s=Gn(a,t)):s=t,{pathname:s,search:Hd(o),hash:_d(n)}}function Gn(e,t){let a=$a(t).split("/");return e.split("/").forEach(n=>{n===".."?a.length>1&&a.pop():n!=="."&&a.push(n)}),a.length>1?a.join("/"):"/"}function Dr(e,t,a,o){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Wd(e){return e.filter((t,a)=>a===0||t.route.path&&t.route.path.length>0)}function Uo(e){let t=Wd(e);return t.map((a,o)=>o===t.length-1?a.pathname:a.pathnameBase)}function sr(e,t,a,o=!1){let n;typeof e=="string"?n=qt(e):(n={...e},he(!n.pathname||!n.pathname.includes("?"),Dr("?","pathname","search",n)),he(!n.pathname||!n.pathname.includes("#"),Dr("#","pathname","hash",n)),he(!n.search||!n.search.includes("#"),Dr("#","search","hash",n)));let s=e===""||n.pathname==="",i=s?"/":n.pathname,c;if(i==null)c=a;else{let p=t.length-1;if(!o&&i.startsWith("..")){let k=i.split("/");for(;k[0]==="..";)k.shift(),p-=1;n.pathname=k.join("/")}c=p>=0?t[p]:"/"}let u=Od(n,c),h=i&&i!=="/"&&i.endsWith("/"),g=(s||i===".")&&a.endsWith("/");return!u.pathname.endsWith("/")&&(h||g)&&(u.pathname+="/"),u}var Gi=e=>e.replace(/[\\/]{2,}/g,"/"),Qe=e=>Gi(e.join("/")),$a=e=>e.replace(/\/+$/,""),Ud=e=>$a(e).replace(/^\/*/,"/"),Hd=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,_d=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Gd=class{constructor(e,t,a,o=!1){this.status=e,this.statusText=t||"",this.internal=o,a instanceof Error?(this.data=a.toString(),this.error=a):this.data=a}};function Kd(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function qd(e){let t=e.map(a=>a.route.path).filter(Boolean);return Qe(t)||"/"}var Ki=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function qi(e,t){let a=e;if(typeof a!="string"||!Wo.test(a))return{absoluteURL:void 0,isExternal:!1,to:a};let o=a,n=!1;if(Ki)try{let s=new URL(window.location.href),i=Bi.test(a)?new URL(vd(a,s.protocol)):new URL(a),c=ht(i.pathname,t);i.origin===s.origin&&c!=null?a=c+i.search+i.hash:n=!0}catch{He(!1,`<Link to="${a}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:n,to:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var $i=["POST","PUT","PATCH","DELETE"];new Set($i);var $d=["GET",...$i];new Set($d);var zd=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function Vd(e){try{return zd.includes(new URL(e).protocol)}catch{return!1}}var $t=d.createContext(null);$t.displayName="DataRouter";var ir=d.createContext(null);ir.displayName="DataRouterState";var zi=d.createContext(!1);function Yd(){return d.useContext(zi)}var Vi=d.createContext({isTransitioning:!1});Vi.displayName="ViewTransition";var Qd=d.createContext(new Map);Qd.displayName="Fetchers";var Jd=d.createContext(null);Jd.displayName="Await";var Ue=d.createContext(null);Ue.displayName="Navigation";var La=d.createContext(null);La.displayName="Location";var _e=d.createContext({outlet:null,matches:[],isDataRoute:!1});_e.displayName="Route";var Ho=d.createContext(null);Ho.displayName="RouteError";var Yi="REACT_ROUTER_ERROR",Xd="REDIRECT",Zd="ROUTE_ERROR_RESPONSE";function eu(e){if(e.startsWith(`${Yi}:${Xd}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function tu(e){if(e.startsWith(`${Yi}:${Zd}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Gd(t.status,t.statusText,t.data)}catch{}}function au(e,{relative:t}={}){he(Mt(),"useHref() may be used only in the context of a <Router> component.");let{basename:a,navigator:o}=d.useContext(Ue),{hash:n,pathname:s,search:i}=Ra(e,{relative:t}),c=s;return a!=="/"&&(c=s==="/"?a:Qe([a,s])),o.createHref({pathname:c,search:i,hash:n})}function Mt(){return d.useContext(La)!=null}function ve(){return he(Mt(),"useLocation() may be used only in the context of a <Router> component."),d.useContext(La).location}function ru(e){he(Mt(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:t}=ve();return d.useMemo(()=>pa(e,_i(t)),[t,e])}var Qi="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Ji(e){d.useContext(Ue).static||d.useLayoutEffect(e)}function Ne(){let{isDataRoute:e}=d.useContext(_e);return e?ku():ou()}function ou(){he(Mt(),"useNavigate() may be used only in the context of a <Router> component.");let e=d.useContext($t),{basename:t,navigator:a}=d.useContext(Ue),{matches:o}=d.useContext(_e),{pathname:n}=ve(),s=JSON.stringify(Uo(o)),i=d.useRef(!1);return Ji(()=>{i.current=!0}),d.useCallback((u,h={})=>{if(He(i.current,Qi),!i.current)return;if(typeof u=="number"){a.go(u);return}let g=sr(u,JSON.parse(s),n,h.relative==="path");e==null&&t!=="/"&&(g.pathname=g.pathname==="/"?t:Qe([t,g.pathname])),(h.replace?a.replace:a.push)(g,h.state,h)},[t,a,s,n,e])}var Xi=d.createContext(null);function nu(){return d.useContext(Xi)}function su(e){let t=d.useContext(_e).outlet;return d.useMemo(()=>t&&d.createElement(Xi.Provider,{value:e},t),[t,e])}function lr(){let{matches:e}=d.useContext(_e);return e[e.length-1]?.params??{}}function Ra(e,{relative:t}={}){let{matches:a}=d.useContext(_e),{pathname:o}=ve(),n=JSON.stringify(Uo(a));return d.useMemo(()=>sr(e,JSON.parse(n),o,t==="path"),[e,n,o,t])}function iu(e,t){return Zi(e,t)}function Zi(e,t,a){he(Mt(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=d.useContext(Ue),{matches:n}=d.useContext(_e),s=n[n.length-1],i=s?s.params:{},c=s?s.pathname:"/",u=s?s.pathnameBase:"/",h=s&&s.route;{let m=h&&h.path||"";tl(c,!h||m.endsWith("*")||m.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${m}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
3
3
|
|
|
4
4
|
Please change the parent <Route path="${m}"> to <Route path="${m==="/"?"*":`${m}/*`}">.`)}let g=ve(),p;if(t){let m=typeof t=="string"?qt(t):t;he(u==="/"||m.pathname?.startsWith(u),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${m.pathname}" was given in the \`location\` prop.`),p=m}else p=g;let k=p.pathname||"/",f=k;if(u!=="/"){let m=u.replace(/^\//,"").split("/");f="/"+k.replace(/^\//,"").split("/").slice(m.length).join("/")}let w=a&&a.state.matches.length?a.state.matches.map(m=>Object.assign(m,{route:a.manifest[m.route.id]||m.route})):Fi(e,{pathname:f});He(h||w!=null,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),He(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.length-1].route.lazy!==void 0,`Matched leaf route at location "${p.pathname}${p.search}${p.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let b=pu(w&&w.map(m=>Object.assign({},m,{params:Object.assign({},i,m.params),pathname:Qe([u,o.encodeLocation?o.encodeLocation(m.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?u:Qe([u,o.encodeLocation?o.encodeLocation(m.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:m.pathnameBase])})),n,a);return t&&b?d.createElement(La.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...p},navigationType:"POP"}},b):b}function lu(){let e=wu(),t=Kd(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),a=e instanceof Error?e.stack:null,o="rgba(200,200,200, 0.5)",n={padding:"0.5rem",backgroundColor:o},s={padding:"2px 4px",backgroundColor:o},i=null;return console.error("Error handled by React Router default ErrorBoundary:",e),i=d.createElement(d.Fragment,null,d.createElement("p",null,"💿 Hey developer 👋"),d.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",d.createElement("code",{style:s},"ErrorBoundary")," or"," ",d.createElement("code",{style:s},"errorElement")," prop on your route.")),d.createElement(d.Fragment,null,d.createElement("h2",null,"Unexpected Application Error!"),d.createElement("h3",{style:{fontStyle:"italic"}},t),a?d.createElement("pre",{style:n},a):null,i)}var cu=d.createElement(lu,null),el=class extends d.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const a=tu(e.digest);a&&(e=a)}let t=e!==void 0?d.createElement(_e.Provider,{value:this.props.routeContext},d.createElement(Ho.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?d.createElement(du,{error:e},t):t}};el.contextType=zi;var Nr=new WeakMap;function du({children:e,error:t}){let{basename:a}=d.useContext(Ue);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let o=eu(t.digest);if(o){let n=Nr.get(t);if(n)throw n;let s=qi(o.location,a),i=s.absoluteURL||s.to;if(Vd(i))throw new Error("Invalid redirect location");if(Ki&&!Nr.get(t))if(s.isExternal||o.reloadDocument)window.location.href=i;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(s.to,{replace:o.replace}));throw Nr.set(t,c),c}return d.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i}`})}}return e}function uu({routeContext:e,match:t,children:a}){let o=d.useContext($t);return o&&o.static&&o.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=t.route.id),d.createElement(_e.Provider,{value:e},a)}function pu(e,t=[],a){let o=a?.state;if(e==null){if(!o)return null;if(o.errors)e=o.matches;else if(t.length===0&&!o.initialized&&o.matches.length>0)e=o.matches;else return null}let n=e,s=o?.errors;if(s!=null){let g=n.findIndex(p=>p.route.id&&s?.[p.route.id]!==void 0);he(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),n=n.slice(0,Math.min(n.length,g+1))}let i=!1,c=-1;if(a&&o){i=o.renderFallback;for(let g=0;g<n.length;g++){let p=n[g];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(c=g),p.route.id){let{loaderData:k,errors:f}=o,w=p.route.loader&&!k.hasOwnProperty(p.route.id)&&(!f||f[p.route.id]===void 0);if(p.route.lazy||w){a.isStatic&&(i=!0),c>=0?n=n.slice(0,c+1):n=[n[0]];break}}}}let u=a?.onError,h=o&&u?(g,p)=>{u(g,{location:o.location,params:o.matches?.[0]?.params??{},pattern:qd(o.matches),errorInfo:p})}:void 0;return n.reduceRight((g,p,k)=>{let f,w=!1,b=null,m=null;o&&(f=s&&p.route.id?s[p.route.id]:void 0,b=p.route.errorElement||cu,i&&(c<0&&k===0?(tl("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,m=null):c===k&&(w=!0,m=p.route.hydrateFallbackElement||null)));let C=t.concat(n.slice(0,k+1)),v=()=>{let y;return f?y=b:w?y=m:p.route.Component?y=d.createElement(p.route.Component,null):p.route.element?y=p.route.element:y=g,d.createElement(uu,{match:p,routeContext:{outlet:g,matches:C,isDataRoute:o!=null},children:y})};return o&&(p.route.ErrorBoundary||p.route.errorElement||k===0)?d.createElement(el,{location:o.location,revalidation:o.revalidation,component:b,error:f,children:v(),routeContext:{outlet:null,matches:C,isDataRoute:!0},onError:h}):v()},null)}function _o(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function hu(e){let t=d.useContext($t);return he(t,_o(e)),t}function mu(e){let t=d.useContext(ir);return he(t,_o(e)),t}function gu(e){let t=d.useContext(_e);return he(t,_o(e)),t}function Go(e){let t=gu(e),a=t.matches[t.matches.length-1];return he(a.route.id,`${e} can only be used on routes that contain a unique "id"`),a.route.id}function fu(){return Go("useRouteId")}function wu(){let e=d.useContext(Ho),t=mu("useRouteError"),a=Go("useRouteError");return e!==void 0?e:t.errors?.[a]}function ku(){let{router:e}=hu("useNavigate"),t=Go("useNavigate"),a=d.useRef(!1);return Ji(()=>{a.current=!0}),d.useCallback(async(n,s={})=>{He(a.current,Qi),a.current&&(typeof n=="number"?await e.navigate(n):await e.navigate(n,{fromRouteId:t,...s}))},[e,t])}var Kn={};function tl(e,t,a){!t&&!Kn[e]&&(Kn[e]=!0,He(!1,a))}d.memo(bu);function bu({routes:e,manifest:t,future:a,state:o,isStatic:n,onError:s}){return Zi(e,void 0,{manifest:t,state:o,isStatic:n,onError:s})}function gt({to:e,replace:t,state:a,relative:o}){he(Mt(),"<Navigate> may be used only in the context of a <Router> component.");let{static:n}=d.useContext(Ue);He(!n,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=d.useContext(_e),{pathname:i}=ve(),c=Ne(),u=sr(e,Uo(s),i,o==="path"),h=JSON.stringify(u);return d.useEffect(()=>{c(JSON.parse(h),{replace:t,state:a,relative:o})},[c,h,o,t,a]),null}function al(e){return su(e.context)}function Z(e){he(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function yu({basename:e="/",children:t=null,location:a,navigationType:o="POP",navigator:n,static:s=!1,useTransitions:i}){he(!Mt(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),u=d.useMemo(()=>({basename:c,navigator:n,static:s,useTransitions:i,future:{}}),[c,n,s,i]);typeof a=="string"&&(a=qt(a));let{pathname:h="/",search:g="",hash:p="",state:k=null,key:f="default",mask:w}=a,b=d.useMemo(()=>{let m=ht(h,c);return m==null?null:{location:{pathname:m,search:g,hash:p,state:k,key:f,mask:w},navigationType:o}},[c,h,g,p,k,f,o,w]);return He(b!=null,`<Router basename="${c}"> is not able to match the URL "${h}${g}${p}" because it does not start with the basename, so the <Router> won't render anything.`),b==null?null:d.createElement(Ue.Provider,{value:u},d.createElement(La.Provider,{children:t,value:b}))}function na({children:e,location:t}){return iu(so(e),t)}function so(e,t=[]){let a=[];return d.Children.forEach(e,(o,n)=>{if(!d.isValidElement(o))return;let s=[...t,n];if(o.type===d.Fragment){a.push.apply(a,so(o.props.children,s));return}he(o.type===Z,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),he(!o.props.index||!o.props.children,"An index route cannot have child routes.");let i={id:o.props.id||s.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(i.children=so(o.props.children,s)),a.push(i)}),a}var _a="get",Ga="application/x-www-form-urlencoded";function cr(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function vu(e){return cr(e)&&e.tagName.toLowerCase()==="button"}function Cu(e){return cr(e)&&e.tagName.toLowerCase()==="form"}function Su(e){return cr(e)&&e.tagName.toLowerCase()==="input"}function Lu(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ru(e,t){return e.button===0&&(!t||t==="_self")&&!Lu(e)}function io(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,a)=>{let o=e[a];return t.concat(Array.isArray(o)?o.map(n=>[a,n]):[[a,o]])},[]))}function Pu(e,t){let a=io(e);return t&&t.forEach((o,n)=>{a.has(n)||t.getAll(n).forEach(s=>{a.append(n,s)})}),a}var Ma=null;function Au(){if(Ma===null)try{new FormData(document.createElement("form"),0),Ma=!1}catch{Ma=!0}return Ma}var xu=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function jr(e){return e!=null&&!xu.has(e)?(He(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ga}"`),null):e}function Tu(e,t){let a,o,n,s,i;if(Cu(e)){let c=e.getAttribute("action");o=c?ht(c,t):null,a=e.getAttribute("method")||_a,n=jr(e.getAttribute("enctype"))||Ga,s=new FormData(e)}else if(vu(e)||Su(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let u=e.getAttribute("formaction")||c.getAttribute("action");if(o=u?ht(u,t):null,a=e.getAttribute("formmethod")||c.getAttribute("method")||_a,n=jr(e.getAttribute("formenctype"))||jr(c.getAttribute("enctype"))||Ga,s=new FormData(c,e),!Au()){let{name:h,type:g,value:p}=e;if(g==="image"){let k=h?`${h}.`:"";s.append(`${k}x`,"0"),s.append(`${k}y`,"0")}else h&&s.append(h,p)}}else{if(cr(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=_a,o=null,n=Ga,i=e}return s&&n==="text/plain"&&(i=s,s=void 0),{action:o,method:a.toLowerCase(),encType:n,formData:s,body:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Ko(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function rl(e,t,a,o){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return a?n.pathname.endsWith("/")?n.pathname=`${n.pathname}_.${o}`:n.pathname=`${n.pathname}.${o}`:n.pathname==="/"?n.pathname=`_root.${o}`:t&&ht(n.pathname,t)==="/"?n.pathname=`${$a(t)}/_root.${o}`:n.pathname=`${$a(n.pathname)}.${o}`,n}async function Du(e,t){if(e.id in t)return t[e.id];try{let a=await import(e.module);return t[e.id]=a,a}catch(a){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(a),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Nu(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function ju(e,t,a){let o=await Promise.all(e.map(async n=>{let s=t.routes[n.route.id];if(s){let i=await Du(s,a);return i.links?i.links():[]}return[]}));return Bu(o.flat(1).filter(Nu).filter(n=>n.rel==="stylesheet"||n.rel==="preload").map(n=>n.rel==="stylesheet"?{...n,rel:"prefetch",as:"style"}:{...n,rel:"prefetch"}))}function qn(e,t,a,o,n,s){let i=(u,h)=>a[h]?u.route.id!==a[h].route.id:!0,c=(u,h)=>a[h].pathname!==u.pathname||a[h].route.path?.endsWith("*")&&a[h].params["*"]!==u.params["*"];return s==="assets"?t.filter((u,h)=>i(u,h)||c(u,h)):s==="data"?t.filter((u,h)=>{let g=o.routes[u.route.id];if(!g||!g.hasLoader)return!1;if(i(u,h)||c(u,h))return!0;if(u.route.shouldRevalidate){let p=u.route.shouldRevalidate({currentUrl:new URL(n.pathname+n.search+n.hash,window.origin),currentParams:a[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:u.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function Mu(e,t,{includeHydrateFallback:a}={}){return Eu(e.map(o=>{let n=t.routes[o.route.id];if(!n)return[];let s=[n.module];return n.clientActionModule&&(s=s.concat(n.clientActionModule)),n.clientLoaderModule&&(s=s.concat(n.clientLoaderModule)),a&&n.hydrateFallbackModule&&(s=s.concat(n.hydrateFallbackModule)),n.imports&&(s=s.concat(n.imports)),s}).flat(1))}function Eu(e){return[...new Set(e)]}function Iu(e){let t={},a=Object.keys(e).sort();for(let o of a)t[o]=e[o];return t}function Bu(e,t){let a=new Set;return new Set(t),e.reduce((o,n)=>{let s=JSON.stringify(Iu(n));return a.has(s)||(a.add(s),o.push({key:s,link:n})),o},[])}function qo(){let e=d.useContext($t);return Ko(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Fu(){let e=d.useContext(ir);return Ko(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var $o=d.createContext(void 0);$o.displayName="FrameworkContext";function dr(){let e=d.useContext($o);return Ko(e,"You must render this element inside a <HydratedRouter> element"),e}function Ou(e,t){let a=d.useContext($o),[o,n]=d.useState(!1),[s,i]=d.useState(!1),{onFocus:c,onBlur:u,onMouseEnter:h,onMouseLeave:g,onTouchStart:p}=t,k=d.useRef(null);d.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let b=C=>{C.forEach(v=>{i(v.isIntersecting)})},m=new IntersectionObserver(b,{threshold:.5});return k.current&&m.observe(k.current),()=>{m.disconnect()}}},[e]),d.useEffect(()=>{if(o){let b=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(b)}}},[o]);let f=()=>{n(!0)},w=()=>{n(!1),i(!1)};return a?e!=="intent"?[s,k,{}]:[s,k,{onFocus:Zt(c,f),onBlur:Zt(u,w),onMouseEnter:Zt(h,f),onMouseLeave:Zt(g,w),onTouchStart:Zt(p,f)}]:[!1,k,{}]}function Zt(e,t){return a=>{e&&e(a),a.defaultPrevented||t(a)}}function Wu({page:e,...t}){let a=Yd(),{nonce:o}=dr(),{router:n}=qo(),s=d.useMemo(()=>Fi(n.routes,e,n.basename),[n.routes,e,n.basename]);return s?(t.nonce==null&&o&&(t={...t,nonce:o}),a?d.createElement(Hu,{page:e,matches:s,...t}):d.createElement(_u,{page:e,matches:s,...t})):null}function Uu(e){let{manifest:t,routeModules:a}=dr(),[o,n]=d.useState([]);return d.useEffect(()=>{let s=!1;return ju(e,t,a).then(i=>{s||n(i)}),()=>{s=!0}},[e,t,a]),o}function Hu({page:e,matches:t,...a}){let o=ve(),{future:n}=dr(),{basename:s}=qo(),i=d.useMemo(()=>{if(e===o.pathname+o.search+o.hash)return[];let c=rl(e,s,n.v8_trailingSlashAwareDataRequests,"rsc"),u=!1,h=[];for(let g of t)typeof g.route.shouldRevalidate=="function"?u=!0:h.push(g.route.id);return u&&h.length>0&&c.searchParams.set("_routes",h.join(",")),[c.pathname+c.search]},[s,n.v8_trailingSlashAwareDataRequests,e,o,t]);return d.createElement(d.Fragment,null,i.map(c=>d.createElement("link",{key:c,rel:"prefetch",as:"fetch",href:c,...a})))}function _u({page:e,matches:t,...a}){let o=ve(),{future:n,manifest:s,routeModules:i}=dr(),{basename:c}=qo(),{loaderData:u,matches:h}=Fu(),g=d.useMemo(()=>qn(e,t,h,s,o,"data"),[e,t,h,s,o]),p=d.useMemo(()=>qn(e,t,h,s,o,"assets"),[e,t,h,s,o]),k=d.useMemo(()=>{if(e===o.pathname+o.search+o.hash)return[];let b=new Set,m=!1;if(t.forEach(v=>{let y=s.routes[v.route.id];!y||!y.hasLoader||(!g.some(L=>L.route.id===v.route.id)&&v.route.id in u&&i[v.route.id]?.shouldRevalidate||y.hasClientLoader?m=!0:b.add(v.route.id))}),b.size===0)return[];let C=rl(e,c,n.v8_trailingSlashAwareDataRequests,"data");return m&&b.size>0&&C.searchParams.set("_routes",t.filter(v=>b.has(v.route.id)).map(v=>v.route.id).join(",")),[C.pathname+C.search]},[c,n.v8_trailingSlashAwareDataRequests,u,o,s,g,t,e,i]),f=d.useMemo(()=>Mu(p,s),[p,s]),w=Uu(p);return d.createElement(d.Fragment,null,k.map(b=>d.createElement("link",{key:b,rel:"prefetch",as:"fetch",href:b,...a})),f.map(b=>d.createElement("link",{key:b,rel:"modulepreload",href:b,...a})),w.map(({key:b,link:m})=>d.createElement("link",{key:b,nonce:a.nonce,...m,crossOrigin:m.crossOrigin??a.crossOrigin})))}function Gu(...e){return t=>{e.forEach(a=>{typeof a=="function"?a(t):a!=null&&(a.current=t)})}}var Ku=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Ku&&(window.__reactRouterVersion="7.18.1")}catch{}function qu({basename:e,children:t,useTransitions:a,window:o}){let n=d.useRef();n.current==null&&(n.current=Cd({window:o,v5Compat:!0}));let s=n.current,[i,c]=d.useState({action:s.action,location:s.location}),u=d.useCallback(h=>{a===!1?c(h):d.startTransition(()=>c(h))},[a]);return d.useLayoutEffect(()=>s.listen(u),[s,u]),d.createElement(yu,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:s,useTransitions:a})}var Nt=d.forwardRef(function({onClick:t,discover:a="render",prefetch:o="none",relative:n,reloadDocument:s,replace:i,mask:c,state:u,target:h,to:g,preventScrollReset:p,viewTransition:k,defaultShouldRevalidate:f,...w},b){let{basename:m,navigator:C,useTransitions:v}=d.useContext(Ue),y=typeof g=="string"&&Wo.test(g),L=qi(g,m);g=L.to;let N=au(g,{relative:n}),T=ve(),j=null;if(c){let G=sr(c,[],T.mask?T.mask.pathname:"/",!0);m!=="/"&&(G.pathname=G.pathname==="/"?m:Qe([m,G.pathname])),j=C.createHref(G)}let[A,R,P]=Ou(o,w),I=Yu(g,{replace:i,mask:c,state:u,target:h,preventScrollReset:p,relative:n,viewTransition:k,defaultShouldRevalidate:f,useTransitions:v});function O(G){t&&t(G),G.defaultPrevented||I(G)}let E=!(L.isExternal||s),$=d.createElement("a",{...w,...P,href:(E?j:void 0)||L.absoluteURL||N,onClick:E?O:t,ref:Gu(b,R),target:h,"data-discover":!y&&a==="render"?"true":void 0});return A&&!y?d.createElement(d.Fragment,null,$,d.createElement(Wu,{page:N})):$});Nt.displayName="Link";var $u=d.forwardRef(function({"aria-current":t="page",caseSensitive:a=!1,className:o="",end:n=!1,style:s,to:i,viewTransition:c,children:u,...h},g){let p=Ra(i,{relative:h.relative}),k=ve(),f=d.useContext(ir),{navigator:w,basename:b}=d.useContext(Ue),m=f!=null&&ep(p)&&c===!0,C=w.encodeLocation?w.encodeLocation(p).pathname:p.pathname,v=k.pathname,y=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;a||(v=v.toLowerCase(),y=y?y.toLowerCase():null,C=C.toLowerCase()),y&&b&&(y=ht(y,b)||y);const L=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let N=v===C||!n&&v.startsWith(C)&&v.charAt(L)==="/",T=y!=null&&(y===C||!n&&y.startsWith(C)&&y.charAt(C.length)==="/"),j={isActive:N,isPending:T,isTransitioning:m},A=N?t:void 0,R;typeof o=="function"?R=o(j):R=[o,N?"active":null,T?"pending":null,m?"transitioning":null].filter(Boolean).join(" ");let P=typeof s=="function"?s(j):s;return d.createElement(Nt,{...h,"aria-current":A,className:R,ref:g,style:P,to:i,viewTransition:c},typeof u=="function"?u(j):u)});$u.displayName="NavLink";var zu=d.forwardRef(({discover:e="render",fetcherKey:t,navigate:a,reloadDocument:o,replace:n,state:s,method:i=_a,action:c,onSubmit:u,relative:h,preventScrollReset:g,viewTransition:p,defaultShouldRevalidate:k,...f},w)=>{let{useTransitions:b}=d.useContext(Ue),m=Xu(),C=Zu(c,{relative:h}),v=i.toLowerCase()==="get"?"get":"post",y=typeof c=="string"&&Wo.test(c),L=N=>{if(u&&u(N),N.defaultPrevented)return;N.preventDefault();let T=N.nativeEvent.submitter,j=T?.getAttribute("formmethod")||i,A=()=>m(T||N.currentTarget,{fetcherKey:t,method:j,navigate:a,replace:n,state:s,relative:h,preventScrollReset:g,viewTransition:p,defaultShouldRevalidate:k});b&&a!==!1?d.startTransition(()=>A()):A()};return d.createElement("form",{ref:w,method:v,action:C,onSubmit:o?u:L,...f,"data-discover":!y&&e==="render"?"true":void 0})});zu.displayName="Form";function Vu(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ol(e){let t=d.useContext($t);return he(t,Vu(e)),t}function Yu(e,{target:t,replace:a,mask:o,state:n,preventScrollReset:s,relative:i,viewTransition:c,defaultShouldRevalidate:u,useTransitions:h}={}){let g=Ne(),p=ve(),k=Ra(e,{relative:i});return d.useCallback(f=>{if(Ru(f,t)){f.preventDefault();let w=a!==void 0?a:ua(p)===ua(k),b=()=>g(e,{replace:w,mask:o,state:n,preventScrollReset:s,relative:i,viewTransition:c,defaultShouldRevalidate:u});h?d.startTransition(()=>b()):b()}},[p,g,k,a,o,n,t,e,s,i,c,u,h])}function TS(e){He(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=d.useRef(io(e)),a=d.useRef(!1),o=ve(),n=d.useMemo(()=>Pu(o.search,a.current?null:t.current),[o.search]),s=Ne(),i=d.useCallback((c,u)=>{const h=io(typeof c=="function"?c(new URLSearchParams(n)):c);a.current=!0,s("?"+h,u)},[s,n]);return[n,i]}var Qu=0,Ju=()=>`__${String(++Qu)}__`;function Xu(){let{router:e}=ol("useSubmit"),{basename:t}=d.useContext(Ue),a=fu(),o=e.fetch,n=e.navigate;return d.useCallback(async(s,i={})=>{let{action:c,method:u,encType:h,formData:g,body:p}=Tu(s,t);if(i.navigate===!1){let k=i.fetcherKey||Ju();await o(k,a,i.action||c,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:g,body:p,formMethod:i.method||u,formEncType:i.encType||h,flushSync:i.flushSync})}else await n(i.action||c,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:g,body:p,formMethod:i.method||u,formEncType:i.encType||h,replace:i.replace,state:i.state,fromRouteId:a,flushSync:i.flushSync,viewTransition:i.viewTransition})},[o,n,t,a])}function Zu(e,{relative:t}={}){let{basename:a}=d.useContext(Ue),o=d.useContext(_e);he(o,"useFormAction must be used inside a RouteContext");let[n]=o.matches.slice(-1),s={...Ra(e||".",{relative:t})},i=ve();if(e==null){s.search=i.search;let c=new URLSearchParams(s.search),u=c.getAll("index");if(u.some(g=>g==="")){c.delete("index"),u.filter(p=>p).forEach(p=>c.append("index",p));let g=c.toString();s.search=g?`?${g}`:""}}return(!e||e===".")&&n.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),a!=="/"&&(s.pathname=s.pathname==="/"?a:Qe([a,s.pathname])),ua(s)}function ep(e,{relative:t}={}){let a=d.useContext(Vi);he(a!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=ol("useViewTransitionState"),n=Ra(e,{relative:t});if(!a.isTransitioning)return!1;let s=ht(a.currentLocation.pathname,o)||a.currentLocation.pathname,i=ht(a.nextLocation.pathname,o)||a.nextLocation.pathname;return pa(n.pathname,i)!=null||pa(n.pathname,s)!=null}var Wt=bd(),ur=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},tp=class extends ur{#e;#t;#a;constructor(){super(),this.#a=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#a)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#a=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},nl=new tp,ap={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},rp=class{#e=ap;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},lo=new rp;function op(e){setTimeout(e,0)}var np=typeof window>"u"||"Deno"in globalThis;function Ve(){}function sp(e,t){return typeof e=="function"?e(t):e}function ip(e){return typeof e=="number"&&e>=0&&e!==1/0}function lp(e,t){return Math.max(e+(t||0)-Date.now(),0)}function co(e,t){return typeof e=="function"?e(t):e}function cp(e,t){return typeof e=="function"?e(t):e}function $n(e,t){const{type:a="all",exact:o,fetchStatus:n,predicate:s,queryKey:i,stale:c}=e;if(i){if(o){if(t.queryHash!==zo(i,t.options))return!1}else if(!ma(t.queryKey,i))return!1}if(a!=="all"){const u=t.isActive();if(a==="active"&&!u||a==="inactive"&&u)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||n&&n!==t.state.fetchStatus||s&&!s(t))}function zn(e,t){const{exact:a,status:o,predicate:n,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(a){if(ha(t.options.mutationKey)!==ha(s))return!1}else if(!ma(t.options.mutationKey,s))return!1}return!(o&&t.state.status!==o||n&&!n(t))}function zo(e,t){return(t?.queryKeyHashFn||ha)(e)}function ha(e){return JSON.stringify(e,(t,a)=>uo(a)?Object.keys(a).sort().reduce((o,n)=>(o[n]=a[n],o),{}):a)}function ma(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(a=>ma(e[a],t[a])):!1}var dp=Object.prototype.hasOwnProperty;function sl(e,t,a=0){if(e===t)return e;if(a>500)return t;const o=Vn(e)&&Vn(t);if(!o&&!(uo(e)&&uo(t)))return t;const s=(o?e:Object.keys(e)).length,i=o?t:Object.keys(t),c=i.length,u=o?new Array(c):{};let h=0;for(let g=0;g<c;g++){const p=o?g:i[g],k=e[p],f=t[p];if(k===f){u[p]=k,(o?g<s:dp.call(e,p))&&h++;continue}if(k===null||f===null||typeof k!="object"||typeof f!="object"){u[p]=f;continue}const w=sl(k,f,a+1);u[p]=w,w===k&&h++}return s===c&&h===s?e:u}function DS(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const a in e)if(e[a]!==t[a])return!1;return!0}function Vn(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function uo(e){if(!Yn(e))return!1;const t=e.constructor;if(t===void 0)return!0;const a=t.prototype;return!(!Yn(a)||!a.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Yn(e){return Object.prototype.toString.call(e)==="[object Object]"}function up(e){return new Promise(t=>{lo.setTimeout(t,e)})}function pp(e,t,a){return typeof a.structuralSharing=="function"?a.structuralSharing(e,t):a.structuralSharing!==!1?sl(e,t):t}function hp(e,t,a=0){const o=[...e,t];return a&&o.length>a?o.slice(1):o}function mp(e,t,a=0){const o=[t,...e];return a&&o.length>a?o.slice(0,-1):o}var Vo=Symbol();function il(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Vo?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function NS(e,t){return typeof e=="function"?e(...t):!!e}function gp(e,t,a){let o=!1,n;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(n??=t(),o||(o=!0,n.aborted?a():n.addEventListener("abort",a,{once:!0})),n)}),e}var ll=(()=>{let e=()=>np;return{isServer(){return e()},setIsServer(t){e=t}}})();function fp(){let e,t;const a=new Promise((n,s)=>{e=n,t=s});a.status="pending",a.catch(()=>{});function o(n){Object.assign(a,n),delete a.resolve,delete a.reject}return a.resolve=n=>{o({status:"fulfilled",value:n}),e(n)},a.reject=n=>{o({status:"rejected",reason:n}),t(n)},a}var wp=op;function kp(){let e=[],t=0,a=c=>{c()},o=c=>{c()},n=wp;const s=c=>{t?e.push(c):n(()=>{a(c)})},i=()=>{const c=e;e=[],c.length&&n(()=>{o(()=>{c.forEach(u=>{a(u)})})})};return{batch:c=>{let u;t++;try{u=c()}finally{t--,t||i()}return u},batchCalls:c=>(...u)=>{s(()=>{c(...u)})},schedule:s,setNotifyFunction:c=>{a=c},setBatchNotifyFunction:c=>{o=c},setScheduler:c=>{n=c}}}var Me=kp(),bp=class extends ur{#e=!0;#t;#a;constructor(){super(),this.#a=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),a=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",a,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",a)}}}}onSubscribe(){this.#t||this.setEventListener(this.#a)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#a=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(a=>{a(e)}))}isOnline(){return this.#e}},za=new bp;function yp(e){return Math.min(1e3*2**e,3e4)}function cl(e){return(e??"online")==="online"?za.isOnline():!0}var po=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function dl(e){let t=!1,a=0,o;const n=fp(),s=()=>n.status!=="pending",i=b=>{if(!s()){const m=new po(b);k(m),e.onCancel?.(m)}},c=()=>{t=!0},u=()=>{t=!1},h=()=>nl.isFocused()&&(e.networkMode==="always"||za.isOnline())&&e.canRun(),g=()=>cl(e.networkMode)&&e.canRun(),p=b=>{s()||(o?.(),n.resolve(b))},k=b=>{s()||(o?.(),n.reject(b))},f=()=>new Promise(b=>{o=m=>{(s()||h())&&b(m)},e.onPause?.()}).then(()=>{o=void 0,s()||e.onContinue?.()}),w=()=>{if(s())return;let b;const m=a===0?e.initialPromise:void 0;try{b=m??e.fn()}catch(C){b=Promise.reject(C)}Promise.resolve(b).then(p).catch(C=>{if(s())return;const v=e.retry??(ll.isServer()?0:3),y=e.retryDelay??yp,L=typeof y=="function"?y(a,C):y,N=v===!0||typeof v=="number"&&a<v||typeof v=="function"&&v(a,C);if(t||!N){k(C);return}a++,e.onFail?.(a,C),up(L).then(()=>h()?void 0:f()).then(()=>{t?k(C):w()})})};return{promise:n,status:()=>n.status,cancel:i,continue:()=>(o?.(),n),cancelRetry:c,continueRetry:u,canStart:g,start:()=>(g()?w():f().then(w),n)}}var ul=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ip(this.gcTime)&&(this.#e=lo.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ll.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(lo.clearTimeout(this.#e),this.#e=void 0)}};function vp(e){return{onFetch:(t,a)=>{const o=t.options,n=t.fetchOptions?.meta?.fetchMore?.direction,s=t.state.data?.pages||[],i=t.state.data?.pageParams||[];let c={pages:[],pageParams:[]},u=0;const h=async()=>{let g=!1;const p=w=>{gp(w,()=>t.signal,()=>g=!0)},k=il(t.options,t.fetchOptions),f=async(w,b,m)=>{if(g)return Promise.reject(t.signal.reason);if(b==null&&w.pages.length)return Promise.resolve(w);const v=(()=>{const T={client:t.client,queryKey:t.queryKey,pageParam:b,direction:m?"backward":"forward",meta:t.options.meta};return p(T),T})(),y=await k(v),{maxPages:L}=t.options,N=m?mp:hp;return{pages:N(w.pages,y,L),pageParams:N(w.pageParams,b,L)}};if(n&&s.length){const w=n==="backward",b=w?Cp:Qn,m={pages:s,pageParams:i},C=b(o,m);c=await f(m,C,w)}else{const w=e??s.length;do{const b=u===0?i[0]??o.initialPageParam:Qn(o,c);if(u>0&&b==null)break;c=await f(c,b),u++}while(u<w)}return c};t.options.persister?t.fetchFn=()=>t.options.persister?.(h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},a):t.fetchFn=h}}}function Qn(e,{pages:t,pageParams:a}){const o=t.length-1;return t.length>0?e.getNextPageParam(t[o],t,a[o],a):void 0}function Cp(e,{pages:t,pageParams:a}){return t.length>0?e.getPreviousPageParam?.(t[0],t,a[0],a):void 0}var Sp=class extends ul{#e;#t;#a;#o;#n;#r;#l;#s;constructor(e){super(),this.#s=!1,this.#l=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#n=e.client,this.#o=this.#n.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Xn(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#l,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=Xn(this.options);t.data!==void 0&&(this.setState(Jn(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#o.remove(this)}setData(e,t){const a=pp(this.state.data,e,this.options);return this.#i({data:a,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),a}setState(e){this.#i({type:"setState",state:e})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Ve).catch(Ve):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>cp(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Vo||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>co(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!lp(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#o.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#s||this.#c()?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#o.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const u=this.observers.find(h=>h.options.queryFn);u&&this.setOptions(u.options)}const a=new AbortController,o=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(this.#s=!0,a.signal)})},n=()=>{const u=il(this.options,t),g=(()=>{const p={client:this.#n,queryKey:this.queryKey,meta:this.meta};return o(p),p})();return this.#s=!1,this.options.persister?this.options.persister(u,g,this):u(g)},i=(()=>{const u={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#n,state:this.state,fetchFn:n};return o(u),u})();(this.#e==="infinite"?vp(this.options.pages):this.options.behavior)?.onFetch(i,this),this.#a=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==i.fetchOptions?.meta)&&this.#i({type:"fetch",meta:i.fetchOptions?.meta}),this.#r=dl({initialPromise:t?.initialPromise,fn:i.fetchFn,onCancel:u=>{u instanceof po&&u.revert&&this.setState({...this.#a,fetchStatus:"idle"}),a.abort()},onFail:(u,h)=>{this.#i({type:"failed",failureCount:u,error:h})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0});try{const u=await this.#r.start();if(u===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(u),this.#o.config.onSuccess?.(u,this),this.#o.config.onSettled?.(u,this.state.error,this),u}catch(u){if(u instanceof po){if(u.silent)return this.#r.promise;if(u.revert){if(this.state.data===void 0)throw u;return this.state.data}}throw this.#i({type:"error",error:u}),this.#o.config.onError?.(u,this),this.#o.config.onSettled?.(this.state.data,u,this),u}finally{this.scheduleGc()}}#i(e){const t=a=>{switch(e.type){case"failed":return{...a,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...a,fetchStatus:"paused"};case"continue":return{...a,fetchStatus:"fetching"};case"fetch":return{...a,...Lp(a.data,this.options),fetchMeta:e.meta??null};case"success":const o={...a,...Jn(e.data,e.dataUpdatedAt),dataUpdateCount:a.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#a=e.manual?o:void 0,o;case"error":const n=e.error;return{...a,error:n,errorUpdateCount:a.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:a.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...a,isInvalidated:!0};case"setState":return{...a,...e.state}}};this.state=t(this.state),Me.batch(()=>{this.observers.forEach(a=>{a.onQueryUpdate()}),this.#o.notify({query:this,type:"updated",action:e})})}};function Lp(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:cl(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Jn(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Xn(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,a=t!==void 0,o=a?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:a?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:a?"success":"pending",fetchStatus:"idle"}}var Rp=class extends ul{#e;#t;#a;#o;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#a=e.mutationCache,this.#t=[],this.state=e.state||Pp(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#a.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#a.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#a.remove(this))}continue(){return this.#o?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#n({type:"continue"})},a={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#o=dl({fn:()=>this.options.mutationFn?this.options.mutationFn(e,a):Promise.reject(new Error("No mutationFn found")),onFail:(s,i)=>{this.#n({type:"failed",failureCount:s,error:i})},onPause:()=>{this.#n({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#a.canRun(this)});const o=this.state.status==="pending",n=!this.#o.canStart();try{if(o)t();else{this.#n({type:"pending",variables:e,isPaused:n}),this.#a.config.onMutate&&await this.#a.config.onMutate(e,this,a);const i=await this.options.onMutate?.(e,a);i!==this.state.context&&this.#n({type:"pending",context:i,variables:e,isPaused:n})}const s=await this.#o.start();return await this.#a.config.onSuccess?.(s,e,this.state.context,this,a),await this.options.onSuccess?.(s,e,this.state.context,a),await this.#a.config.onSettled?.(s,null,this.state.variables,this.state.context,this,a),await this.options.onSettled?.(s,null,e,this.state.context,a),this.#n({type:"success",data:s}),s}catch(s){try{await this.#a.config.onError?.(s,e,this.state.context,this,a)}catch(i){Promise.reject(i)}try{await this.options.onError?.(s,e,this.state.context,a)}catch(i){Promise.reject(i)}try{await this.#a.config.onSettled?.(void 0,s,this.state.variables,this.state.context,this,a)}catch(i){Promise.reject(i)}try{await this.options.onSettled?.(void 0,s,e,this.state.context,a)}catch(i){Promise.reject(i)}throw this.#n({type:"error",error:s}),s}finally{this.#a.runNext(this)}}#n(e){const t=a=>{switch(e.type){case"failed":return{...a,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...a,isPaused:!0};case"continue":return{...a,isPaused:!1};case"pending":return{...a,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...a,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...a,data:void 0,error:e.error,failureCount:a.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Me.batch(()=>{this.#t.forEach(a=>{a.onMutationUpdate(e)}),this.#a.notify({mutation:this,type:"updated",action:e})})}};function Pp(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ap=class extends ur{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#a=0}#e;#t;#a;build(e,t,a){const o=new Rp({client:e,mutationCache:this,mutationId:++this.#a,options:e.defaultMutationOptions(t),state:a});return this.add(o),o}add(e){this.#e.add(e);const t=Ea(e);if(typeof t=="string"){const a=this.#t.get(t);a?a.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=Ea(e);if(typeof t=="string"){const a=this.#t.get(t);if(a)if(a.length>1){const o=a.indexOf(e);o!==-1&&a.splice(o,1)}else a[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Ea(e);if(typeof t=="string"){const o=this.#t.get(t)?.find(n=>n.state.status==="pending");return!o||o===e}else return!0}runNext(e){const t=Ea(e);return typeof t=="string"?this.#t.get(t)?.find(o=>o!==e&&o.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Me.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(a=>zn(t,a))}findAll(e={}){return this.getAll().filter(t=>zn(e,t))}notify(e){Me.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Me.batch(()=>Promise.all(e.map(t=>t.continue().catch(Ve))))}};function Ea(e){return e.options.scope?.id}var xp=class extends ur{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,a){const o=t.queryKey,n=t.queryHash??zo(o,t);let s=this.get(n);return s||(s=new Sp({client:e,queryKey:o,queryHash:n,options:e.defaultQueryOptions(t),state:a,defaultOptions:e.getQueryDefaults(o)}),this.add(s)),s}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Me.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(a=>$n(t,a))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(a=>$n(e,a)):t}notify(e){Me.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Me.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Me.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Tp=class{#e;#t;#a;#o;#n;#r;#l;#s;constructor(e={}){this.#e=e.queryCache||new xp,this.#t=e.mutationCache||new Ap,this.#a=e.defaultOptions||{},this.#o=new Map,this.#n=new Map,this.#r=0}mount(){this.#r++,this.#r===1&&(this.#l=nl.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=za.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#r--,this.#r===0&&(this.#l?.(),this.#l=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),a=this.#e.build(this,t),o=a.state.data;return o===void 0?this.fetchQuery(e):(e.revalidateIfStale&&a.isStaleByTime(co(t.staleTime,a))&&this.prefetchQuery(t),Promise.resolve(o))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:a})=>{const o=a.data;return[t,o]})}setQueryData(e,t,a){const o=this.defaultQueryOptions({queryKey:e}),s=this.#e.get(o.queryHash)?.state.data,i=sp(t,s);if(i!==void 0)return this.#e.build(this,o).setData(i,{...a,manual:!0})}setQueriesData(e,t,a){return Me.batch(()=>this.#e.findAll(e).map(({queryKey:o})=>[o,this.setQueryData(o,t,a)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Me.batch(()=>{t.findAll(e).forEach(a=>{t.remove(a)})})}resetQueries(e,t){const a=this.#e;return Me.batch(()=>(a.findAll(e).forEach(o=>{o.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const a={revert:!0,...t},o=Me.batch(()=>this.#e.findAll(e).map(n=>n.cancel(a)));return Promise.all(o).then(Ve).catch(Ve)}invalidateQueries(e,t={}){return Me.batch(()=>(this.#e.findAll(e).forEach(a=>{a.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const a={...t,cancelRefetch:t.cancelRefetch??!0},o=Me.batch(()=>this.#e.findAll(e).filter(n=>!n.isDisabled()&&!n.isStatic()).map(n=>{let s=n.fetch(void 0,a);return a.throwOnError||(s=s.catch(Ve)),n.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(o).then(Ve)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const a=this.#e.build(this,t);return a.isStaleByTime(co(t.staleTime,a))?a.fetch(t):Promise.resolve(a.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ve).catch(Ve)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ve).catch(Ve)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return za.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#a}setDefaultOptions(e){this.#a=e}setQueryDefaults(e,t){this.#o.set(ha(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#o.values()],a={};return t.forEach(o=>{ma(e,o.queryKey)&&Object.assign(a,o.defaultOptions)}),a}setMutationDefaults(e,t){this.#n.set(ha(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#n.values()],a={};return t.forEach(o=>{ma(e,o.mutationKey)&&Object.assign(a,o.defaultOptions)}),a}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#a.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=zo(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Vo&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#a.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},pl=d.createContext(void 0),jS=e=>{const t=d.useContext(pl);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Dp=({client:e,children:t})=>(d.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),r.jsx(pl.Provider,{value:e,children:t}));const Yo=[{id:"chat",surface:"chat",routePrefix:"/chat",productName:"Cats Chat",subtitle:"Conversations with companions and personal agents",group:"home",installPolicy:"required",installState:"installed",maturity:"active",setup:{selectable:!0},settings:[{id:"chat",label:"Chat",path:"/settings/chat"}]},{id:"code",surface:"code",routePrefix:"/code",productName:"Cats Code",subtitle:"Repos, runs, and codespaces",group:"office",installPolicy:"required",installState:"installed",maturity:"preview",setup:{selectable:!0},settings:[{id:"code",label:"Code",path:"/settings/code"}]},{id:"work",surface:"work",routePrefix:"/work",productName:"Cats Work",subtitle:"Projects, approvals, and operator workflow",group:"office",installPolicy:"required",installState:"installed",maturity:"preview",setup:{selectable:!0},settings:[{id:"work",label:"Work",path:"/settings/work"}]}];new Map(Yo.map(e=>[e.id,e]));const hl=new Map(Yo.filter(e=>e.surface!==null).map(e=>[e.surface,e]));function Np(e){return{...e,setup:{...e.setup},settings:e.settings?.map(t=>({...t}))}}function jp(){return Yo.map(Np)}function Mp(e){return hl.get(e)?.routePrefix??"/chat"}function Ep(e){return hl.get(e)?.productName??"Cats Chat"}const Qo=jp().filter(e=>e.surface!==null).map(e=>({id:e.surface,routePrefix:e.routePrefix,productName:e.productName,subtitle:e.subtitle}));new Map(Qo.map(e=>[e.id,e]));const Ip={chat:"Chat",work:"Work",code:"Code"};function Bp(){return Qo}function Fp(e){return Qo.find(a=>e===a.routePrefix||e.startsWith(`${a.routePrefix}/`))?.id??"chat"}function MS(e){return Ep(e)}function Op(e){return Ip[e]??"Chat"}function pr(e){return Mp(e)}const l={appBrandName:"app.brandName",appLoadingWithSurface:"app.loadingWithSurface",appLoadingEllipsis:"app.loadingEllipsis",appErrorTitle:"app.errorTitle",appErrorEyebrow:"app.errorEyebrow",appTitle:"app.title",appLoadErrorMessage:"app.loadErrorMessage",appLoadStateFailedWithStatus:"app.loadStateFailedWithStatus",setupWizardAdminCredentialsHint:"setupWizard.adminCredentialsHint",setupWizardAdminIdentifierLabel:"setupWizard.adminIdentifierLabel",setupWizardAdminIdentifierPlaceholder:"setupWizard.adminIdentifierPlaceholder",setupWizardAdminPasswordLabel:"setupWizard.adminPasswordLabel",setupWizardAdminPasswordPlaceholder:"setupWizard.adminPasswordPlaceholder",authLoginTitle:"auth.login.title",authLoginSubtitle:"auth.login.subtitle",authLoginIdentifierLabel:"auth.login.identifierLabel",authLoginIdentifierPlaceholder:"auth.login.identifierPlaceholder",authLoginPasswordLabel:"auth.login.passwordLabel",authLoginPasswordPlaceholder:"auth.login.passwordPlaceholder",authLoginSubmit:"auth.login.submit",authLoginSubmitting:"auth.login.submitting",authLoginInvalidCredentials:"auth.login.invalidCredentials",authLoginForbidden:"auth.login.forbidden",authLoginCsrfMismatch:"auth.login.csrfMismatch",authLoginFailed:"auth.login.failed",authLoginFailedWithStatus:"auth.login.failedWithStatus",authLoginGoogleOriginHint:"auth.login.googleOriginHint",authLoginGoogleUnavailable:"auth.login.googleUnavailable",authRepairTitle:"auth.repair.title",authRepairSubtitle:"auth.repair.subtitle",authRepairDisplayNameLabel:"auth.repair.displayNameLabel",authRepairDisplayNamePlaceholder:"auth.repair.displayNamePlaceholder",authRepairIdentifierLabel:"auth.repair.identifierLabel",authRepairIdentifierPlaceholder:"auth.repair.identifierPlaceholder",authRepairPasswordLabel:"auth.repair.passwordLabel",authRepairPasswordPlaceholder:"auth.repair.passwordPlaceholder",authRepairRecoveryTokenLabel:"auth.repair.recoveryTokenLabel",authRepairRecoveryTokenPlaceholder:"auth.repair.recoveryTokenPlaceholder",authRepairRecoveryTokenHint:"auth.repair.recoveryTokenHint",authRepairSubmit:"auth.repair.submit",authRepairSubmitting:"auth.repair.submitting",authRepairForbidden:"auth.repair.forbidden",authRepairFailed:"auth.repair.failed",authRepairFailedWithStatus:"auth.repair.failedWithStatus",appHostLabel:"appHost.label",appHostNotInstalledTitle:"appHost.notInstalledTitle",appHostBackToLobby:"appHost.backToLobby",appHostSubtitleRendererPending:"appHost.subtitleRendererPending",appHostSubtitleDisabled:"appHost.subtitleDisabled",appHostSectionPackage:"appHost.sectionPackage",appHostSectionStatus:"appHost.sectionStatus",appHostSectionPublisher:"appHost.sectionPublisher",sharedProductRendererErrorEyebrow:"shared.productRenderer.errorEyebrow",sharedProductRendererChatUnavailableTitle:"shared.productRenderer.chatUnavailableTitle",sharedProductRendererUnknownError:"shared.productRenderer.unknownError",sharedProductBootLoadingAria:"shared.product.bootLoadingAria",platformProductChatName:"platform.product.chat.name",platformProductChatSubtitle:"platform.product.chat.subtitle",platformProductChatSettingsLabel:"platform.product.chat.settingsLabel",platformProductCodeName:"platform.product.code.name",platformProductCodeSubtitle:"platform.product.code.subtitle",platformProductCodeSettingsLabel:"platform.product.code.settingsLabel",platformProductWorkName:"platform.product.work.name",platformProductWorkSubtitle:"platform.product.work.subtitle",platformProductWorkSettingsLabel:"platform.product.work.settingsLabel",lobbyAccountSettingsAriaLabel:"lobby.accountSettingsAriaLabel",lobbyOpenAccountSettings:"lobby.openAccountSettings",lobbyRuntimeStatusLabel:"lobby.runtimeStatusLabel",lobbyProductsSectionTitle:"lobby.productsSectionTitle",lobbyAppsSectionTitle:"lobby.appsSectionTitle",lobbyContinueText:"lobby.continueText",lobbyOpenEntry:"lobby.openEntry",lobbyGreetingChooseSurface:"lobby.greeting.chooseSurface",lobbyGreetingHomeReady:"lobby.greeting.homeReady",lobbyGreetingPickProduct:"lobby.greeting.pickProduct",lobbyGreetingEverythingStaged:"lobby.greeting.everythingStaged",lobbyGreetingOpenSurface:"lobby.greeting.openSurface",lobbyGreetingAwake:"lobby.greeting.awake",lobbyGreetingContinue:"lobby.greeting.continue",sharedRuntimeStatusTooltipReady:"shared.runtimeStatus.tooltip.ready",sharedRuntimeStatusTooltipDegraded:"shared.runtimeStatus.tooltip.degraded",sharedRuntimeStatusTooltipUnavailable:"shared.runtimeStatus.tooltip.unavailable",sharedRuntimeStatusTooltipUnknown:"shared.runtimeStatus.tooltip.unknown",sharedRuntimeStatusChipReady:"shared.runtimeStatus.chip.ready",sharedRuntimeStatusChipDegraded:"shared.runtimeStatus.chip.degraded",sharedRuntimeStatusChipUnavailable:"shared.runtimeStatus.chip.unavailable",settingsGeneralProfileTitle:"settings.general.profileTitle",settingsGeneralProfileDescription:"settings.general.profileDescription",settingsGeneralAvatarLabel:"settings.general.avatarLabel",settingsGeneralAvatarChangeLabel:"settings.general.avatarChangeLabel",settingsGeneralAvatarUploadLabel:"settings.general.avatarUploadLabel",settingsGeneralAvatarRemoveLabel:"settings.general.avatarRemoveLabel",settingsGeneralNameLabel:"settings.general.nameLabel",settingsGeneralAccountTitle:"settings.general.accountTitle",settingsGeneralAccountDescription:"settings.general.accountDescription",settingsGeneralSignOutButton:"settings.general.signOutButton",settingsGeneralSigningOutButton:"settings.general.signingOutButton",settingsGeneralSignOutFailed:"settings.general.signOutFailed",settingsGeneralSignOutFailedWithStatus:"settings.general.signOutFailedWithStatus",settingsGeneralSignOutCsrfError:"settings.general.signOutCsrfError",settingsGeneralSignOutForbiddenError:"settings.general.signOutForbiddenError",settingsGeneralSignOutUnauthenticated:"settings.general.signOutUnauthenticated",settingsGeneralLanguageTitle:"settings.general.languageTitle",settingsGeneralLanguageDescription:"settings.general.languageDescription",settingsGeneralAssistantLanguagePreferenceLabel:"settings.general.assistantLanguagePreferenceLabel",settingsGeneralAssistantLanguagePreferenceDescription:"settings.general.assistantLanguagePreferenceDescription",settingsGeneralAssistantLanguageSelectAriaLabel:"settings.general.assistantLanguageSelectAriaLabel",settingsGeneralAssistantLanguageUnspecifiedOption:"settings.general.assistantLanguageUnspecifiedOption",settingsGeneralLanguagePreferenceLabel:"settings.general.languagePreferenceLabel",settingsGeneralLanguagePreferenceDescription:"settings.general.languagePreferenceDescription",settingsGeneralLanguageSelectAriaLabel:"settings.general.languageSelectAriaLabel",settingsGeneralLanguageAutoOption:"settings.general.languageAutoOption",settingsGeneralLanguageEnglishOption:"settings.general.languageEnglishOption",settingsGeneralLanguageTraditionalChineseOption:"settings.general.languageTraditionalChineseOption",settingsGeneralLobbyMotionTitle:"settings.general.lobbyMotionTitle",settingsGeneralLobbyMotionDescription:"settings.general.lobbyMotionDescription",settingsGeneralLobbyMotionOffLabel:"settings.general.lobbyMotionOffLabel",settingsGeneralLobbyMotionOffDescription:"settings.general.lobbyMotionOffDescription",settingsGeneralLobbyMotionReducedLabel:"settings.general.lobbyMotionReducedLabel",settingsGeneralLobbyMotionReducedDescription:"settings.general.lobbyMotionReducedDescription",settingsGeneralLobbyMotionFullLabel:"settings.general.lobbyMotionFullLabel",settingsGeneralLobbyMotionFullDescription:"settings.general.lobbyMotionFullDescription",settingsGeneralGuideCatAssistTitle:"settings.general.guideCatAssistTitle",settingsGeneralGuideCatAssistDisabledDescription:"settings.general.guideCatAssistDisabledDescription",settingsGeneralGuideCatAssistEnabledDescription:"settings.general.guideCatAssistEnabledDescription",settingsGeneralOpenAssistantsButton:"settings.general.openAssistantsButton",settingsGeneralGuideCatAutoLabel:"settings.general.guideCatAutoLabel",settingsGeneralGuideCatAutoDescription:"settings.general.guideCatAutoDescription",settingsGeneralGuideCatSidePanelLabel:"settings.general.guideCatSidePanelLabel",settingsGeneralGuideCatSidePanelDescription:"settings.general.guideCatSidePanelDescription",settingsGeneralGuideCatBubbleLabel:"settings.general.guideCatBubbleLabel",settingsGeneralGuideCatBubbleDescription:"settings.general.guideCatBubbleDescription",settingsGeneralUpdateNameError:"settings.general.updateNameError",settingsGeneralUpdateAssistantLanguageError:"settings.general.updateAssistantLanguageError",settingsGeneralUpdateLanguageError:"settings.general.updateLanguageError",settingsGeneralUpdateLobbyAnimationError:"settings.general.updateLobbyAnimationError",settingsGeneralUpdateGuideCatModeError:"settings.general.updateGuideCatModeError",settingsGeneralRemoveAvatarError:"settings.general.removeAvatarError",settingsGeneralSaveAvatarError:"settings.general.saveAvatarError",settingsShellHeading:"settings.shell.heading",settingsShellSectionGeneral:"settings.shell.sectionGeneral",settingsShellSectionCats:"settings.shell.sectionCats",settingsShellSubsectionMyCats:"settings.shell.subsectionMyCats",settingsShellSubsectionAssistants:"settings.shell.subsectionAssistants",settingsShellSectionApps:"settings.shell.sectionApps",settingsShellSectionDesktop:"settings.shell.sectionDesktop",settingsShellSectionRuntime:"settings.shell.sectionRuntime",settingsShellSectionData:"settings.shell.sectionData",settingsShellCloseButtonLabel:"settings.shell.closeButtonLabel",settingsChatBossToolProfileTitle:"settings.chat.bossToolProfileTitle",settingsChatBossToolProfileUpdateFailure:"settings.chat.bossToolProfileUpdateFailure",settingsChatAdvancedControlsFailure:"settings.chat.advancedControlsFailure",settingsConversationProductLabelChat:"settings.conversation.productLabelChat",settingsConversationProductLabelCode:"settings.conversation.productLabelCode",settingsConversationProductLabelWork:"settings.conversation.productLabelWork",settingsConversationBehaviorTitle:"settings.conversation.behaviorTitle",settingsConversationBehaviorDescription:"settings.conversation.behaviorDescription",settingsConversationShowVerboseLabel:"settings.conversation.showVerboseLabel",settingsConversationShowVerboseDescription:"settings.conversation.showVerboseDescription",settingsConversationShowLiveProgressLabel:"settings.conversation.showLiveProgressLabel",settingsConversationShowLiveProgressDescription:"settings.conversation.showLiveProgressDescription",settingsConversationUpdateFailure:"settings.conversation.updateFailure",settingsConversationConcurrentLayoutLabel:"settings.conversation.concurrentLayoutLabel",settingsConversationConcurrentLayoutDescription:"settings.conversation.concurrentLayoutDescription",settingsConversationLayoutInlineStack:"settings.conversation.layoutInlineStack",settingsConversationLayoutCompareCards:"settings.conversation.layoutCompareCards",settingsConversationLayoutFocusRail:"settings.conversation.layoutFocusRail",settingsConversationLayoutAdaptive:"settings.conversation.layoutAdaptive",settingsAdvancedDraftControlsTitle:"settings.advancedDraftControls.title",settingsAdvancedDraftControlsDescription:"settings.advancedDraftControls.description",settingsAdvancedDraftControlsEnableLabel:"settings.advancedDraftControls.enableLabel",settingsAdvancedDraftControlsToggleDescription:"settings.advancedDraftControls.toggleDescription",settingsRuntimeStatusChipRuntimeUnavailable:"settings.runtime.statusChip.runtimeUnavailable",settingsRuntimeStatusChipRuntimeDegraded:"settings.runtime.statusChip.runtimeDegraded",settingsRuntimeStatusChipRuntimeReady:"settings.runtime.statusChip.runtimeReady",settingsRuntimeStatusChipSetupReadyToApply:"settings.runtime.statusChip.setupReadyToApply",settingsRuntimeStatusChipSetupNeedsRemediation:"settings.runtime.statusChip.setupNeedsRemediation",settingsRuntimeStatusChipProviderScanRequired:"settings.runtime.statusChip.providerScanRequired",settingsRuntimeStatusChipSetupUnavailable:"settings.runtime.statusChip.setupUnavailable",settingsRuntimeStatusTitle:"settings.runtime.statusTitle",settingsRuntimeStatusDescription:"settings.runtime.statusDescription",settingsRuntimeMetricReadyProviders:"settings.runtime.metricReadyProviders",settingsRuntimeMetricProvidersScanned:"settings.runtime.metricProvidersScanned",settingsRuntimeMetricNeedAttention:"settings.runtime.metricNeedAttention",settingsRuntimeNeedAttentionTitle:"settings.runtime.needAttentionTitle",settingsRuntimeNeedAttentionDescription:"settings.runtime.needAttentionDescription",settingsRuntimeProviderHelpersTitle:"settings.runtime.providerHelpersTitle",settingsRuntimeProviderHelpersDescription:"settings.runtime.providerHelpersDescription",settingsRuntimeNoProviderHelpers:"settings.runtime.noProviderHelpers",settingsRuntimeLoadingHelpers:"settings.runtime.loadingHelpers",settingsRuntimeWorkingState:"settings.runtime.workingState",settingsRuntimeActionCheckLabel:"settings.runtime.actions.check",settingsRuntimeActionInstallLabel:"settings.runtime.actions.install",settingsRuntimeActionUpgradeLabel:"settings.runtime.actions.upgrade",settingsRuntimeActionRepairLabel:"settings.runtime.actions.repair",settingsRuntimeActionUninstallLabel:"settings.runtime.actions.uninstall",settingsRuntimeUninstallButtonLabel:"settings.runtime.uninstallButtonLabel",settingsRuntimeModelCatalogsTitle:"settings.runtime.modelCatalogsTitle",settingsRuntimeModelCatalogsDescription:"settings.runtime.modelCatalogsDescription",settingsRuntimeRefreshingState:"settings.runtime.refreshingState",settingsRuntimeRefreshCatalogsButton:"settings.runtime.refreshCatalogsButton",settingsRuntimeStandaloneSetupTitle:"settings.runtime.standaloneSetupTitle",settingsRuntimeStandaloneSetupDescription:"settings.runtime.standaloneSetupDescription",settingsRuntimeOpenStandaloneSetup:"settings.runtime.openStandaloneSetup",settingsRuntimeBrowserHandoffError:"settings.runtime.browserHandoffError",settingsRuntimeCancelActionLabel:"settings.runtime.cancelActionLabel",settingsRuntimeCancelActionFallbackLabel:"settings.runtime.cancelActionFallbackLabel",settingsRuntimeRefreshFailure:"settings.runtime.refreshFailure",settingsRuntimeRefreshFailureWithStatus:"settings.runtime.refreshFailureWithStatus",settingsRuntimeRefreshSummary:"settings.runtime.refreshSummary",settingsRuntimeRefreshSummaryWithFailures:"settings.runtime.refreshSummaryWithFailures",settingsRuntimeUninstallTitle:"settings.runtime.uninstallTitle",settingsRuntimeUninstallHelperLabel:"settings.runtime.uninstallHelperLabel",settingsRuntimeUninstallScriptLabel:"settings.runtime.uninstallScriptLabel",settingsRuntimeComputingPlannedRemovals:"settings.runtime.computingPlannedRemovals",settingsRuntimePreviewUnavailable:"settings.runtime.previewUnavailable",settingsRuntimeNothingToRemove:"settings.runtime.nothingToRemove",settingsRuntimeSystemInstallDetected:"settings.runtime.systemInstallDetected",settingsRuntimeWillRemoveItems:"settings.runtime.willRemoveItems",settingsRuntimeSystemInstallCannotRemove:"settings.runtime.systemInstallCannotRemove",settingsRuntimeUninstallDescriptionPrefix:"settings.runtime.uninstallDescriptionPrefix",settingsRuntimeUninstallDescriptionSuffix:"settings.runtime.uninstallDescriptionSuffix",settingsRuntimeActionNoResult:"settings.runtime.actionNoResult",settingsRuntimeActionSuccessComplete:"settings.runtime.actionSuccessComplete",settingsRuntimeActionSuccessNothingToRemove:"settings.runtime.actionSuccessNothingToRemove",settingsRuntimeActionPartialWithDetail:"settings.runtime.actionPartialWithDetail",settingsRuntimeActionPartial:"settings.runtime.actionPartial",settingsRuntimeActionFailedWithDetail:"settings.runtime.actionFailedWithDetail",settingsRuntimeActionFailed:"settings.runtime.actionFailed",settingsRuntimeHostBridgeUnavailableClient:"settings.runtime.hostBridgeUnavailableClient",settingsRuntimeHostBridgeUnavailable:"settings.runtime.hostBridgeUnavailable",settingsRuntimePreviewMissingResult:"settings.runtime.previewMissingResult",settingsRuntimePreviewFailed:"settings.runtime.previewFailed",settingsRuntimeFixStepCount:"settings.runtime.fixStepCount",settingsRuntimeHelperLabelWindowsCliReadiness:"settings.runtime.helperLabel.windowsCliReadiness",settingsRuntimeHelperLabelWindowsVcRedist:"settings.runtime.helperLabel.windowsVcRedist",settingsRuntimeHelperLabelNodeHostInstaller:"settings.runtime.helperLabel.nodeHostInstaller",settingsRuntimeHelperLabelGithubCliHostInstaller:"settings.runtime.helperLabel.githubCliHostInstaller",settingsRuntimeHelperLabelNpmPrefixHelper:"settings.runtime.helperLabel.npmPrefixHelper",settingsRuntimeHelperLabelSetupReadinessAudit:"settings.runtime.helperLabel.setupReadinessAudit",settingsRuntimeHelperLabelPackagedBackgroundProcessHelper:"settings.runtime.helperLabel.packagedBackgroundProcessHelper",settingsRuntimeHelperLabelPackagedProviderUninstallHelper:"settings.runtime.helperLabel.packagedProviderUninstallHelper",settingsRuntimeHelperLabelPackagedNpmGlobalCliInstallerHelper:"settings.runtime.helperLabel.packagedNpmGlobalCliInstallerHelper",settingsRuntimeHelperLabelNativeProviderInstaller:"settings.runtime.helperLabel.nativeProviderInstaller",settingsRuntimeHelperLabelProviderInstaller:"settings.runtime.helperLabel.providerInstaller",settingsRuntimeHelperLabelLocalModelInstaller:"settings.runtime.helperLabel.localModelInstaller",settingsRuntimeHelperUnavailableReason:"settings.runtime.helperUnavailableReason",settingsRuntimeHelperUnsupportedPlatformReason:"settings.runtime.helperUnsupportedPlatformReason",settingsRuntimePlatformSupportAllDesktop:"settings.runtime.platformSupport.allDesktop",settingsRuntimePlatformSupportWindows:"settings.runtime.platformSupport.windows",settingsRuntimePlatformSupportWindowsWsl:"settings.runtime.platformSupport.windowsWsl",settingsRuntimePlatformSupportMacos:"settings.runtime.platformSupport.macos",settingsRuntimePlatformSupportLinux:"settings.runtime.platformSupport.linux",settingsRuntimeHelperUnsupportedActionReason:"settings.runtime.helperUnsupportedActionReason",settingsRuntimeLifecycleStatusAuthRequired:"settings.runtime.lifecycleStatus.authRequired",settingsRuntimeLifecycleStatusBlocked:"settings.runtime.lifecycleStatus.blocked",settingsRuntimeLifecycleStatusChangesRequired:"settings.runtime.lifecycleStatus.changesRequired",settingsRuntimeLifecycleStatusFailed:"settings.runtime.lifecycleStatus.failed",settingsRuntimeLifecycleStatusNotInstalled:"settings.runtime.lifecycleStatus.notInstalled",settingsRuntimeLifecycleStatusPreview:"settings.runtime.lifecycleStatus.preview",settingsRuntimeLifecycleStatusReady:"settings.runtime.lifecycleStatus.ready",settingsRuntimeLifecycleStatusRestartRequired:"settings.runtime.lifecycleStatus.restartRequired",settingsRuntimeLifecycleStatusUninstalled:"settings.runtime.lifecycleStatus.uninstalled",settingsRuntimeLifecycleDetailLaunchWslFirstBoot:"settings.runtime.lifecycleDetail.launchWslFirstBoot",settingsRuntimeLifecycleDetailStartDockerWarmUp:"settings.runtime.lifecycleDetail.startDockerWarmUp",settingsRuntimeLifecycleDetailRunMissingHostSubstrate:"settings.runtime.lifecycleDetail.runMissingHostSubstrate",settingsRuntimeLifecycleDetailRestartThenRerunMode:"settings.runtime.lifecycleDetail.restartThenRerunMode",settingsRuntimeLifecycleDetailRestartThenRerun:"settings.runtime.lifecycleDetail.restartThenRerun",settingsRuntimeLifecycleDetailRelaunchThenVerify:"settings.runtime.lifecycleDetail.relaunchThenVerify",settingsRuntimeLifecycleDetailElevationRequired:"settings.runtime.lifecycleDetail.elevationRequired",settingsRuntimeLifecycleDetailAuthThenRerunMode:"settings.runtime.lifecycleDetail.authThenRerunMode",settingsRuntimeLifecycleDetailRetryAfterFailure:"settings.runtime.lifecycleDetail.retryAfterFailure",settingsRuntimeLifecycleDetailRunMissingRequirement:"settings.runtime.lifecycleDetail.runMissingRequirement",settingsRuntimeLifecycleDetailFinishManualFollowThrough:"settings.runtime.lifecycleDetail.finishManualFollowThrough",settingsRuntimeLifecycleDetailRunApplyRemainingChanges:"settings.runtime.lifecycleDetail.runApplyRemainingChanges",settingsRuntimeLifecycleDetailRerunCheckToVerify:"settings.runtime.lifecycleDetail.rerunCheckToVerify",settingsRuntimeLifecycleDetailFinishedWithStatus:"settings.runtime.lifecycleDetail.finishedWithStatus",settingsRuntimeLifecycleModeApply:"settings.runtime.lifecycleMode.apply",settingsRuntimeLifecycleModeCheck:"settings.runtime.lifecycleMode.check",settingsRuntimeLifecycleModeForce:"settings.runtime.lifecycleMode.force",settingsRuntimeLifecycleModeUninstall:"settings.runtime.lifecycleMode.uninstall",settingsRuntimeLifecycleModeUpgrade:"settings.runtime.lifecycleMode.upgrade",settingsRouteTitleAssistants:"settings.route.title.assistants",settingsRouteTitleMyCats:"settings.route.title.myCats",settingsRouteTitleChat:"settings.route.title.chat",settingsRouteTitleWork:"settings.route.title.work",settingsRouteTitleCode:"settings.route.title.code",settingsRouteTitleApps:"settings.route.title.apps",settingsRouteTitleDesktop:"settings.route.title.desktop",settingsRouteTitleRuntime:"settings.route.title.runtime",settingsRouteTitleData:"settings.route.title.data",settingsRouteTitleGeneral:"settings.route.title.general",settingsRouteTitleNotFound:"settings.route.title.notFound",settingsRouteNotFoundDescription:"settings.route.notFound.description",settingsRouteNotFoundOpenGeneral:"settings.route.notFound.openGeneral",settingsCanvasLoadingLabel:"settings.canvas.loadingLabel",settingsCanvasLoadErrorTitle:"settings.canvas.loadErrorTitle",settingsCanvasLoadErrorBody:"settings.canvas.loadErrorBody",settingsAppsSectionTitle:"settings.apps.sectionTitle",settingsAppsSectionDescription:"settings.apps.sectionDescription",settingsAppsInstalledPackagesLabel:"settings.apps.installedPackagesLabel",settingsAppsInstalledPackagesDescription:"settings.apps.installedPackagesDescription",settingsAppsNoInstalledAppsLabel:"settings.apps.noInstalledAppsLabel",settingsAppsNoInstalledAppsDescription:"settings.apps.noInstalledAppsDescription",settingsAppsEmptyStateChipLabel:"settings.apps.emptyStateChipLabel",settingsAppsLocalInstallTitle:"settings.apps.localInstallTitle",settingsAppsLocalInstallDescription:"settings.apps.localInstallDescription",settingsAppsPackagePathLabel:"settings.apps.packagePathLabel",settingsAppsPackagePathPlaceholder:"settings.apps.packagePathPlaceholder",settingsAppsReviewButton:"settings.apps.reviewButton",settingsAppsReadyStatusChip:"settings.apps.readyStatusChip",settingsAppsNeedsReviewStatusChip:"settings.apps.needsReviewStatusChip",settingsAppsNoLobbyRoute:"settings.apps.noLobbyRoute",settingsAppsInstallButton:"settings.apps.installButton",settingsAppsEnableAction:"settings.apps.enableAction",settingsAppsDisableAction:"settings.apps.disableAction",settingsAppsUninstallAction:"settings.apps.uninstallAction",settingsAppsOpenAction:"settings.apps.openAction",settingsAppsSettingsAction:"settings.apps.settingsAction",settingsAppsUninstallTitle:"settings.apps.uninstallTitle",settingsAppsEnableTitle:"settings.apps.enableTitle",settingsAppsDisableTitle:"settings.apps.disableTitle",settingsAppsUninstallMessage:"settings.apps.uninstallMessage",settingsAppsEnableMessage:"settings.apps.enableMessage",settingsAppsDisableMessage:"settings.apps.disableMessage",settingsAppsInstallTitle:"settings.apps.installTitle",settingsAppsInstallMessage:"settings.apps.installMessage",settingsAppsLocalInstallReady:"settings.apps.localInstallReady",settingsAppsLocalInstallNeedsReview:"settings.apps.localInstallNeedsReview",settingsAppsCategoryConnector:"settings.apps.category.connector",settingsAppsCategoryProductModule:"settings.apps.category.productModule",settingsAppsCategoryUserApp:"settings.apps.category.userApp",settingsAppsInstallStateEnabled:"settings.apps.installState.enabled",settingsAppsInstallStateInstalled:"settings.apps.installState.installed",settingsAppsInstallStateDisabled:"settings.apps.installState.disabled",settingsAppsInstallStateError:"settings.apps.installState.error",settingsAppsInstallStateUpgradePending:"settings.apps.installState.upgradePending",settingsAppsInstallStateUninstalled:"settings.apps.installState.uninstalled",settingsAppsTrustTierLocalUser:"settings.apps.trustTier.localUser",settingsAppsTrustTierSystem:"settings.apps.trustTier.system",settingsAppsTrustTierThirdParty:"settings.apps.trustTier.thirdParty",settingsAppsPermissionCount:"settings.apps.permissionCount",settingsAppsToolCount:"settings.apps.toolCount",settingsAppsCapabilitySingular:"settings.apps.capabilitySingular",settingsAppsCapabilityPlural:"settings.apps.capabilityPlural",settingsAppsConnectorCountSingle:"settings.apps.connectorCountSingle",settingsAppsConnectorCountMany:"settings.apps.connectorCountMany",settingsAppsAuthLabel:"settings.apps.authLabel",settingsAppsConfirmMutationFailed:"settings.apps.confirmMutationFailed",settingsAppsConfirmMutationFailedFallback:"settings.apps.confirmMutationFailedFallback",settingsAppsMutationFailed:"settings.apps.mutationFailed",settingsAppsMutationFailedFallback:"settings.apps.mutationFailedFallback",settingsAppsPackagePathRequired:"settings.apps.packagePathRequired",settingsAppsValidationFailed:"settings.apps.validationFailed",settingsAppsErrorNotInstalled:"settings.apps.error.notInstalled",settingsAppsErrorNotEnabled:"settings.apps.error.notEnabled",settingsAppsErrorPackagePathNotFound:"settings.apps.error.packagePathNotFound",settingsAppsErrorInvalidManifestJson:"settings.apps.error.invalidManifestJson",settingsAppsErrorCannotReadManifest:"settings.apps.error.cannotReadManifest",settingsAppsErrorReservedAppId:"settings.apps.error.reservedAppId",settingsAppsErrorDuplicateAppId:"settings.apps.error.duplicateAppId",settingsAppsErrorManifestInvalid:"settings.apps.error.manifestInvalid",settingsAppsErrorValidationIssueWithPath:"settings.apps.error.validationIssueWithPath",settingsAppsErrorValidationIssue:"settings.apps.error.validationIssue",settingsAppsOpenPairingUrl:"settings.apps.openPairingUrl",settingsDataResetAllDataTitle:"settings.data.resetAllDataTitle",settingsDataResetAllDataDescription:"settings.data.resetAllDataDescription",settingsDataResetButtonResetting:"settings.data.resetButtonResetting",settingsDataResetButtonLabel:"settings.data.resetButtonLabel",settingsDataResetFailure:"settings.data.resetFailure",settingsConversationPreferenceUpdateFailure:"settings.conversation.preferenceUpdateFailure",settingsDesktopMobilePairingTitle:"settings.desktop.mobilePairingTitle",settingsDesktopMobilePairingDescription:"settings.desktop.mobilePairingDescription",settingsDesktopMobilePairingStatusDisabled:"settings.desktop.mobilePairingStatusDisabled",settingsDesktopMobilePairingStatusLoopbackOnly:"settings.desktop.mobilePairingStatusLoopbackOnly",settingsDesktopMobilePairingStatusNoLanAddress:"settings.desktop.mobilePairingStatusNoLanAddress",settingsDesktopMobilePairingStatusReady:"settings.desktop.mobilePairingStatusReady",settingsDesktopMobilePairingStatusValidationPending:"settings.desktop.mobilePairingStatusValidationPending",settingsDesktopMobilePairingEnableLabel:"settings.desktop.mobilePairingEnableLabel",settingsDesktopMobilePairingEnableDescription:"settings.desktop.mobilePairingEnableDescription",settingsDesktopMobilePairingEnableButton:"settings.desktop.mobilePairingEnableButton",settingsDesktopMobilePairingApplyingButton:"settings.desktop.mobilePairingApplyingButton",settingsDesktopMobilePairingBindLabel:"settings.desktop.mobilePairingBindLabel",settingsDesktopMobilePairingReachabilityLabel:"settings.desktop.mobilePairingReachabilityLabel",settingsDesktopMobilePairingLanAddressLabel:"settings.desktop.mobilePairingLanAddressLabel",settingsDesktopMobilePairingNoneLabel:"settings.desktop.mobilePairingNoneLabel",settingsDesktopMobilePairingReachabilityLoopback:"settings.desktop.mobilePairingReachabilityLoopback",settingsDesktopMobilePairingReachabilityLan:"settings.desktop.mobilePairingReachabilityLan",settingsDesktopMobilePairingReachabilityAllInterfaces:"settings.desktop.mobilePairingReachabilityAllInterfaces",settingsDesktopMobilePairingReachabilityOtherInterface:"settings.desktop.mobilePairingReachabilityOtherInterface",settingsDesktopMobilePairingAllowLanLabel:"settings.desktop.mobilePairingAllowLanLabel",settingsDesktopMobilePairingAllowLanDescription:"settings.desktop.mobilePairingAllowLanDescription",settingsDesktopMobilePairingApplyAndRestartButton:"settings.desktop.mobilePairingApplyAndRestartButton",settingsDesktopMobilePairingNoLanAddressNote:"settings.desktop.mobilePairingNoLanAddressNote",settingsDesktopMobilePairingHostMismatchNote:"settings.desktop.mobilePairingHostMismatchNote",settingsDesktopMobilePairingDiagnosticLabel:"settings.desktop.mobilePairingDiagnosticLabel",settingsDesktopMobilePairingDiagnosticCopyButton:"settings.desktop.mobilePairingDiagnosticCopyButton",settingsDesktopMobilePairingDiagnosticCopiedMessage:"settings.desktop.mobilePairingDiagnosticCopiedMessage",settingsDesktopMobilePairingExpoUrlLabel:"settings.desktop.mobilePairingExpoUrlLabel",settingsDesktopMobilePairingExpoUrlCopiedMessage:"settings.desktop.mobilePairingExpoUrlCopiedMessage",settingsDesktopMobilePairingCopyUrlButton:"settings.desktop.mobilePairingCopyUrlButton",settingsDesktopMobilePairingQrUrlTooLong:"settings.desktop.mobilePairingQrUrlTooLong",settingsDesktopMobilePairingQrCodeLabel:"settings.desktop.mobilePairingQrCodeLabel",settingsDesktopMobilePairingNoPairingUrlStatus:"settings.desktop.mobilePairingNoPairingUrlStatus",settingsDesktopMobilePairingOpenPairingUrlLabel:"settings.desktop.mobilePairingOpenPairingUrlLabel",settingsDesktopMobilePairingCopyEnvValuesSuccess:"settings.desktop.mobilePairingCopyEnvValuesSuccess",settingsDesktopMobilePairingConfirmRestart:"settings.desktop.mobilePairingConfirmRestart",settingsDesktopMobilePairingDesktopUpdateSuccess:"settings.desktop.mobilePairingDesktopUpdateSuccess",settingsDesktopMobilePairingDesktopUpdateFailure:"settings.desktop.mobilePairingDesktopUpdateFailure",settingsDesktopStartupTitle:"settings.desktop.startupTitle",settingsDesktopStartupDescription:"settings.desktop.startupDescription",settingsDesktopStartupSignInLabel:"settings.desktop.startupSignInLabel",settingsDesktopStartupSignInDescription:"settings.desktop.startupSignInDescription",settingsDesktopStartupTrayLabel:"settings.desktop.startupTrayLabel",settingsDesktopStartupTrayDescription:"settings.desktop.startupTrayDescription",settingsDesktopStartupOpenWindowLabel:"settings.desktop.startupOpenWindowLabel",settingsDesktopStartupOpenWindowDescription:"settings.desktop.startupOpenWindowDescription",settingsDesktopUpdatesTitle:"settings.desktop.updatesTitle",settingsDesktopUpdatesDescription:"settings.desktop.updatesDescription",settingsDesktopUpdatesCurrentVersionLabel:"settings.desktop.updatesCurrentVersionLabel",settingsDesktopUpdatesChannelLabel:"settings.desktop.updatesChannelLabel",settingsDesktopUpdatesLastCheckedLabel:"settings.desktop.updatesLastCheckedLabel",settingsDesktopUpdatesLastCheckedNever:"settings.desktop.updatesLastCheckedNever",settingsDesktopUpdatesAvailableVersionLabel:"settings.desktop.updatesAvailableVersionLabel",settingsDesktopUpdatesStatusUnavailable:"settings.desktop.updatesStatusUnavailable",settingsDesktopUpdatesStatusIdle:"settings.desktop.updatesStatusIdle",settingsDesktopUpdatesStatusChecking:"settings.desktop.updatesStatusChecking",settingsDesktopUpdatesStatusUpToDate:"settings.desktop.updatesStatusUpToDate",settingsDesktopUpdatesStatusAvailable:"settings.desktop.updatesStatusAvailable",settingsDesktopUpdatesStatusDownloading:"settings.desktop.updatesStatusDownloading",settingsDesktopUpdatesStatusDownloaded:"settings.desktop.updatesStatusDownloaded",settingsDesktopUpdatesStatusInstalling:"settings.desktop.updatesStatusInstalling",settingsDesktopUpdatesStatusFailed:"settings.desktop.updatesStatusFailed",settingsDesktopUpdatesActionCheck:"settings.desktop.updatesActionCheck",settingsDesktopUpdatesActionChecking:"settings.desktop.updatesActionChecking",settingsDesktopUpdatesActionDownload:"settings.desktop.updatesActionDownload",settingsDesktopUpdatesActionDownloading:"settings.desktop.updatesActionDownloading",settingsDesktopUpdatesActionRestartInstall:"settings.desktop.updatesActionRestartInstall",settingsDesktopUpdatesActionInstalling:"settings.desktop.updatesActionInstalling",settingsDesktopUpdatesToastUpToDate:"settings.desktop.updatesToastUpToDate",settingsDesktopUpdatesWindowsInstallerNotice:"settings.desktop.updatesWindowsInstallerNotice",settingsDesktopUpdatesPreviewNotice:"settings.desktop.updatesPreviewNotice",settingsDesktopUpdatesErrorOffline:"settings.desktop.updatesErrorOffline",settingsDesktopUpdatesErrorTimeout:"settings.desktop.updatesErrorTimeout",settingsDesktopUpdatesErrorProviderRejected:"settings.desktop.updatesErrorProviderRejected",settingsDesktopUpdatesErrorMetadataInvalid:"settings.desktop.updatesErrorMetadataInvalid",settingsDesktopUpdatesErrorChecksumMismatch:"settings.desktop.updatesErrorChecksumMismatch",settingsDesktopUpdatesErrorSignatureRejected:"settings.desktop.updatesErrorSignatureRejected",settingsDesktopUpdatesErrorUnsupportedPackage:"settings.desktop.updatesErrorUnsupportedPackage",settingsDesktopUpdatesErrorDownloadCancelled:"settings.desktop.updatesErrorDownloadCancelled",settingsDesktopUpdatesErrorInstallHandoffFailed:"settings.desktop.updatesErrorInstallHandoffFailed",settingsDesktopUpdatesErrorUnknown:"settings.desktop.updatesErrorUnknown",workNewChatDraftStartProjectChipLabel:"work.newChatDraft.startProjectChipLabel",workNewChatDraftStartProjectPrompt:"work.newChatDraft.startProjectPrompt",workNewChatDraftAddTaskChipLabel:"work.newChatDraft.addTaskChipLabel",workNewChatDraftAddTaskPrompt:"work.newChatDraft.addTaskPrompt",workNewChatDraftPlanSprintChipLabel:"work.newChatDraft.planSprintChipLabel",workNewChatDraftPlanSprintPrompt:"work.newChatDraft.planSprintPrompt",workNewChatDraftScheduleReviewChipLabel:"work.newChatDraft.scheduleReviewChipLabel",workNewChatDraftScheduleReviewPrompt:"work.newChatDraft.scheduleReviewPrompt",workNewChatDraftTriageBacklogChipLabel:"work.newChatDraft.triageBacklogChipLabel",workNewChatDraftTriageBacklogPrompt:"work.newChatDraft.triageBacklogPrompt",workItemsListTitle:"work.items.listTitle",workItemsListNewAction:"work.items.newAction",workItemsListImportExternalIssueAction:"work.items.importExternalIssueAction",workItemsListImportExternalIssueAriaLabel:"work.items.importExternalIssueAriaLabel",workItemsListCreateNewWorkItem:"work.items.createNewWorkItem",workItemsListCreateNewWorkItemAriaLabel:"work.items.createNewWorkItemAriaLabel",workItemsListLoading:"work.items.loading",workItemsListLoadError:"work.items.loadError",workItemsListEmptyIntro:"work.items.emptyIntro",workItemsListEmptyActionLabel:"work.items.emptyActionLabel",workItemsListEmptySuffix:"work.items.emptySuffix",workItemsListProjectPrefix:"work.items.projectPrefix",workItemsListProjectOrphan:"work.items.projectOrphan",workItemsListDecisionPill:"work.items.pill.decision",workItemsListBlockedPill:"work.items.pill.blocked",workItemsListTasksLabel:"work.items.tasksLabel",workItemsListOpenWorkItemAria:"work.items.openWorkItemAriaLabel",workItemsListParentWorkItemTooltip:"work.items.parentWorkItemTooltip",workSidebarNewWorkLabel:"work.sidebar.newWorkLabel",workSidebarTeamWorkLabel:"work.sidebar.teamWorkLabel",workSidebarParallelWorkLabel:"work.sidebar.parallelWorkLabel",workSidebarPortfolioLabel:"work.sidebar.portfolioLabel",workSidebarProjectsLabel:"work.sidebar.projectsLabel",workSidebarManagedWorkLabel:"work.sidebar.managedWorkLabel",workSidebarWorkItemsLabel:"work.sidebar.workItemsLabel",workSidebarTasksLabel:"work.sidebar.tasksLabel",workSidebarRunsLabel:"work.sidebar.runsLabel",workSidebarMissionsLabel:"work.sidebar.missionsLabel",workSidebarSchedulesLabel:"work.sidebar.schedulesLabel",workSidebarExecutionLabel:"work.sidebar.executionLabel",workSidebarSystemMapLabel:"work.sidebar.systemMapLabel",workSidebarCockpitLabel:"work.sidebar.cockpitLabel",workSidebarBrokenLinksLabel:"work.sidebar.brokenLinksLabel",workSidebarWarRoomLabel:"work.sidebar.warRoomLabel",workSidebarWorkTopDownSurfacesLabel:"work.sidebar.workTopDownSurfacesLabel",workSidebarUnpinProjectLabel:"work.sidebar.unpinProjectLabel",workSidebarDeleteProjectLabel:"work.sidebar.deleteProjectLabel",workSidebarNoWorkYetLabel:"work.sidebar.noWorkYetLabel",workQueryHttpError:"work.query.httpError",workQueryHttpErrorWithStatusText:"work.query.httpErrorWithStatusText",workGraphLoadErrorFallback:"work.graph.loadErrorFallback",workMissionsListTitle:"work.missions.listTitle",workMissionsListLede:"work.missions.lede",workMissionsListLoading:"work.missions.loading",workMissionsListLoadError:"work.missions.loadError",workMissionsListEmpty:"work.missions.emptyLabel",workMissionsListOpenMissionAria:"work.missions.openMissionAriaLabel",workMissionBackLabel:"work.mission.backLabel",workMissionBackArrowLabel:"work.mission.backArrowLabel",workMissionCancelConfirmation:"work.mission.cancelConfirmation",workMissionCancelBlocked:"work.mission.cancelBlocked",workMissionCancelBlockedNoDetails:"work.mission.cancelBlockedNoDetails",workMissionCancelError:"work.mission.cancelError",workMissionCancelRouteFailed:"work.mission.cancelRouteFailed",workMissionCancelLabel:"work.mission.cancelLabel",workMissionCancelLabelBusy:"work.mission.cancelLabelBusy",workCancellationBlockerRunNotStoppable:"work.cancellation.blocker.runNotStoppable",workCancellationBlockerNoRuntimeSession:"work.cancellation.blocker.noRuntimeSession",workCancellationBlockerRuntimeClientUnavailable:"work.cancellation.blocker.runtimeClientUnavailable",workCancellationBlockerRuntimeCancellationFailed:"work.cancellation.blocker.runtimeCancellationFailed",workMissionSummaryTitle:"work.mission.summaryTitle",workMissionStatusLabel:"work.mission.statusLabel",workMissionAssignedAgentLabel:"work.mission.assignedAgentLabel",workMissionUpdatedAtLabel:"work.mission.updatedAtLabel",workMissionWorkItemLabel:"work.mission.workItemLabel",workMissionConversationLabel:"work.mission.conversationLabel",workMissionTasksHeading:"work.mission.tasksHeading",workMissionNoLinkedWorkItemForTasks:"work.mission.noLinkedWorkItemForTasks",workMissionNoLinkedWorkItemForRuns:"work.mission.noLinkedWorkItemForRuns",workMissionNoTasks:"work.mission.noTasks",workMissionRunsHeading:"work.mission.runsHeading",workMissionNoTransitiveRuns:"work.mission.noTransitiveRuns",workMissionLoadingLabel:"work.mission.loadingLabel",workMissionNotFound:"work.mission.notFound",workMissionNoMissionId:"work.mission.noMissionId",workProjectsListTitle:"work.projects.listTitle",workProjectsNewAction:"work.projects.newAction",workProjectsCreateNewProjectAriaLabel:"work.projects.createNewProjectAriaLabel",workProjectsListLoading:"work.projects.loading",workProjectsListLoadError:"work.projects.loadError",workProjectsListEmptyIntro:"work.projects.emptyIntro",workProjectsListEmptySuffix:"work.projects.emptySuffix",workProjectsOpenProjectAriaLabel:"work.projects.openProjectAriaLabel",workProjectsDecisionPill:"work.projects.decisionPill",workProjectsBlockedPill:"work.projects.blockedPill",workProjectsWorkItemsAbbrev:"work.projects.workItemsAbbrev",workProjectsTasksLabel:"work.projects.tasksLabel",workProjectBackLabel:"work.project.backLabel",workProjectBackArrowLabel:"work.project.backArrowLabel",workProjectUpdatedAtPrefix:"work.project.updatedAtPrefix",workProjectDeleteLabel:"work.project.deleteLabel",workProjectDeleteLabelBusy:"work.project.deleteLabelBusy",workProjectDeleteConfirmation:"work.project.deleteConfirmation",workProjectDeleteError:"work.project.deleteError",workProjectOverviewTitle:"work.project.overviewTitle",workProjectSummaryLabel:"work.project.summaryLabel",workProjectOwnerLabel:"work.project.ownerLabel",workProjectConversationLabel:"work.project.conversationLabel",workProjectWorkItemsTitle:"work.project.workItemsTitle",workProjectNoWorkItems:"work.project.noWorkItems",workProjectTasksTitle:"work.project.tasksTitle",workProjectNoTasks:"work.project.noTasks",workProjectActivityTitle:"work.project.activityTitle",workProjectNoActivity:"work.project.noActivity",workProjectLoadingLabel:"work.project.loadingLabel",workProjectNotFoundTitle:"work.project.notFoundTitle",workProjectMissingIdLabel:"work.project.missingIdLabel",workProjectNotFoundPrefix:"work.project.notFoundPrefix",workProjectNotFoundSuffix:"work.project.notFoundSuffix",workRunsListTitle:"work.runs.listTitle",workRunsListLede:"work.runs.lede",workRunsListLoading:"work.runs.loading",workRunsListLoadError:"work.runs.loadError",workRunsListNoRunsIntro:"work.runs.noRunsIntro",workRunOpenAriaLabel:"work.run.openAriaLabel",workRunOpenSubRunAriaLabel:"work.run.openSubRunAriaLabel",workRunSubRunChip:"work.run.subRunChip",workRunStopErrorWithError:"work.run.stopErrorWithError",workRunStopErrorFallback:"work.run.stopErrorFallback",workRunStopNotStoppable:"work.run.stopNotStoppable",workRunStopNotStoppableGeneric:"work.run.stopNotStoppableGeneric",workRunStopConfirmation:"work.run.stopConfirmation",workRunStopError:"work.run.stopError",workRunStopRouteFailed:"work.run.stopRouteFailed",workRunBackArrowLabel:"work.run.backArrowLabel",workRunBackLabel:"work.run.backLabel",workRunStopLabel:"work.run.stopLabel",workRunStopLabelBusy:"work.run.stopLabelBusy",workRunSummaryBlockedBeforeRuntimeLaunch:"work.run.summary.blockedBeforeRuntimeLaunch",workRunSummaryBlockedBeforeScheduledRuntimeLaunch:"work.run.summary.blockedBeforeScheduledRuntimeLaunch",workRunSummaryLaunchingScheduledMission:"work.run.summary.launchingScheduledMission",workRunSummaryProviderAgentRuntimeMessageCompleted:"work.run.summary.providerAgentRuntimeMessageCompleted",workRunSummaryQueuedSupervisedWorkRun:"work.run.summary.queuedSupervisedWorkRun",workRunSummaryRelayFanOutDispatch:"work.run.summary.relayFanOutDispatch",workRunSummaryStartedSupervisedCodeTaskExecution:"work.run.summary.startedSupervisedCodeTaskExecution",workRunSummaryTitle:"work.run.summaryTitle",workRunStatusLabel:"work.run.statusLabel",workRunUpdatedLabel:"work.run.updatedLabel",workRunDurationLabel:"work.run.durationLabel",workRunParentRunLabel:"work.run.parentRunLabel",workRunConversationLabel:"work.run.conversationLabel",workRunSubRunsTitle:"work.run.subRunsTitle",workRunNoSubRuns:"work.run.noSubRuns",workRunTraceTitle:"work.run.traceTitle",workRunTraceLoading:"work.run.traceLoading",workRunTraceLoadFallback:"work.run.traceLoadFallback",workRunTraceLoadError:"work.run.traceLoadError",workRunTraceEmptyQueued:"work.run.traceEmptyQueued",workRunTraceEmptyRunning:"work.run.traceEmptyRunning",workRunTraceEmptyBlocked:"work.run.traceEmptyBlocked",workRunTraceEmptyCompleted:"work.run.traceEmptyCompleted",workRunTraceEmptyFailed:"work.run.traceEmptyFailed",workRunTraceEmptyCancelled:"work.run.traceEmptyCancelled",workRunTraceEmptyDefault:"work.run.traceEmptyDefault",workRunTraceNoActorRecorded:"work.run.traceNoActorRecorded",workRunTraceKindUnknown:"work.run.traceKindUnknown",workRunArtifactStatusDraft:"work.run.artifactStatus.draft",workRunArtifactStatusReady:"work.run.artifactStatus.ready",workRunArtifactStatusPublished:"work.run.artifactStatus.published",workRunArtifactStatusArchived:"work.run.artifactStatus.archived",workRunActivitiesTitle:"work.run.activitiesTitle",workRunOutcomesTitle:"work.run.outcomesTitle",workRunArtifactsTitle:"work.run.artifactsTitle",workRunLoadingLabel:"work.run.loadingLabel",workRunNotFound:"work.run.notFound",workRunNoRunId:"work.run.noRunId",workSchedulesListTitle:"work.schedules.listTitle",workSchedulesListLede:"work.schedules.lede",workSchedulesListLoadErrorFallback:"work.schedules.loadErrorFallback",workSchedulesExportAction:"work.schedules.exportAction",workSchedulesListLoading:"work.schedules.loading",workSchedulesListEmpty:"work.schedules.empty",workScheduleOpenAriaLabel:"work.schedule.openAriaLabel",workScheduleNextFireChip:"work.schedule.nextFireChip",workScheduleReceiptChip:"work.schedule.receiptChip",workScheduleEnabledStatus:"work.schedule.enabledStatus",workScheduleDisabledStatus:"work.schedule.disabledStatus",workScheduleSummaryOnceAt:"work.schedule.summary.onceAt",workScheduleSummaryDailyAt:"work.schedule.summary.dailyAt",workScheduleDateNone:"work.schedule.dateNone",workScheduleReceiptStatusClaimed:"work.schedule.receiptStatus.claimed",workScheduleReceiptStatusAdmitted:"work.schedule.receiptStatus.admitted",workScheduleReceiptStatusDuplicate:"work.schedule.receiptStatus.duplicate",workScheduleReceiptStatusSkipped:"work.schedule.receiptStatus.skipped",workScheduleReceiptStatusFailed:"work.schedule.receiptStatus.failed",workScheduleTriggerReasonDue:"work.schedule.triggerReason.due",workScheduleTriggerReasonManualTest:"work.schedule.triggerReason.manualTest",workScheduleTriggerReasonStartupMisfire:"work.schedule.triggerReason.startupMisfire",workScheduleTriggerReasonRetry:"work.schedule.triggerReason.retry",workScheduleMissionPolicyPerFire:"work.schedule.missionPolicy.perFire",workScheduleConcurrencyPolicySkip:"work.schedule.concurrencyPolicy.skip",workScheduleConcurrencyPolicyQueue:"work.schedule.concurrencyPolicy.queue",workScheduleConcurrencyPolicyReplace:"work.schedule.concurrencyPolicy.replace",workScheduleMisfirePolicySkip:"work.schedule.misfirePolicy.skip",workScheduleMisfirePolicyFireOnce:"work.schedule.misfirePolicy.fireOnce",workScheduleMisfirePolicyFireAll:"work.schedule.misfirePolicy.fireAll",workScheduleRetryBackoffNone:"work.schedule.retryBackoff.none",workScheduleRetryBackoffFixed:"work.schedule.retryBackoff.fixed",workScheduleRetryBackoffExponential:"work.schedule.retryBackoff.exponential",workScheduleRuleNotLoadedError:"work.schedule.ruleNotLoadedError",workScheduleCreateFailed:"work.schedule.createFailed",workScheduleUpdateFailed:"work.schedule.updateFailed",workScheduleTestFireFailed:"work.schedule.testFireFailed",workScheduleDeleteFailed:"work.schedule.deleteFailed",workScheduleDeleteConfirmation:"work.schedule.deleteConfirmation",workScheduleActionFailed:"work.schedule.actionFailed",workScheduleLoadingTitle:"work.schedule.loadingTitle",workScheduleLoadingLabel:"work.schedule.loadingLabel",workScheduleLoadFailed:"work.schedule.loadFailed",workScheduleOverviewTitle:"work.schedule.overviewTitle",workScheduleScheduleLabel:"work.schedule.scheduleLabel",workScheduleTimezoneLabel:"work.schedule.timezoneLabel",workScheduleRevisionLabel:"work.schedule.revisionLabel",workScheduleTargetLabel:"work.schedule.targetLabel",workScheduleTargetKindCat:"work.schedule.targetKind.cat",workScheduleTargetKindAgent:"work.schedule.targetKind.agent",workScheduleOriginLabel:"work.schedule.originLabel",workScheduleOriginSchedule:"work.schedule.origin.schedule",workScheduleMissionPolicyLabel:"work.schedule.missionPolicyLabel",workScheduleConcurrencyLabel:"work.schedule.concurrencyLabel",workScheduleMisfireLabel:"work.schedule.misfireLabel",workScheduleRetryLabel:"work.schedule.retryLabel",workScheduleRetryNone:"work.schedule.retryNone",workScheduleRetryPolicyValue:"work.schedule.retryPolicyValue",workScheduleDiagnosticsTitle:"work.schedule.diagnosticsTitle",workScheduleNextFireLabel:"work.schedule.nextFireLabel",workScheduleLastScheduledFireLabel:"work.schedule.lastScheduledFireLabel",workScheduleLastRunLabel:"work.schedule.lastRunLabel",workScheduleConsecutiveFailuresLabel:"work.schedule.consecutiveFailuresLabel",workScheduleDisabledDiagnosticFallback:"work.schedule.disabledDiagnosticFallback",workScheduleRetryStatePill:"work.schedule.retryStatePill",workScheduleLastFailurePill:"work.schedule.lastFailurePill",workScheduleRecentTriggersTitle:"work.schedule.recentTriggersTitle",workScheduleNoTriggerReceipts:"work.schedule.noTriggerReceipts",workScheduleRetryAttemptSuffix:"work.schedule.retryAttemptSuffix",workScheduleBackArrowLabel:"work.schedule.backArrowLabel",workScheduleBackLabel:"work.schedule.backLabel",workScheduleTestFireBusyLabel:"work.schedule.testFireBusyLabel",workScheduleTestFireLabel:"work.schedule.testFireLabel",workScheduleUpdatingLabel:"work.schedule.updatingLabel",workScheduleDisableLabel:"work.schedule.disableLabel",workScheduleEnableLabel:"work.schedule.enableLabel",workScheduleDeleteAriaLabel:"work.schedule.deleteAriaLabel",workScheduleDeleteBusyLabel:"work.schedule.deleteBusyLabel",workScheduleDeleteLabel:"work.schedule.deleteLabel",workScheduleMissingIdLabel:"work.schedule.missingIdLabel",workScheduleNotFoundTitle:"work.schedule.notFoundTitle",workScheduleNotFoundPrefix:"work.schedule.notFoundPrefix",workScheduleNotFoundSuffix:"work.schedule.notFoundSuffix",workItemBackLabel:"work.item.backLabel",workItemBackArrowLabel:"work.item.backArrowLabel",workItemUpdatedAtPrefix:"work.item.updatedAtPrefix",workItemDeleteLabel:"work.item.deleteLabel",workItemDeleteLabelBusy:"work.item.deleteLabelBusy",workItemDeleteConfirmation:"work.item.deleteConfirmation",workItemDeleteConfirmationDetail:"work.item.deleteConfirmationDetail",workItemDeleteError:"work.item.deleteError",workItemOverviewTitle:"work.item.overviewTitle",workItemSummaryLabel:"work.item.summaryLabel",workItemProjectLabel:"work.item.projectLabel",workItemParentLabel:"work.item.parentLabel",workItemOwnerLabel:"work.item.ownerLabel",workItemConversationLabel:"work.item.conversationLabel",workItemOrphanSummaryFallback:"work.item.orphanSummaryFallback",workItemNoTasksLabel:"work.item.noTasksLabel",workItemTasksTitle:"work.item.tasksTitle",workItemMissionsTitle:"work.item.missionsTitle",workItemSubWorkItemsTitle:"work.item.subWorkItemsTitle",workItemNoSubWorkItems:"work.item.noSubWorkItems",workItemNoMissions:"work.item.noMissions",workItemSubWorkItemsCountLabel:"work.item.subWorkItemsCountLabel",workItemNoActivity:"work.item.noActivity",workItemActivityTitle:"work.item.activityTitle",workItemLoadingLabel:"work.item.loadingLabel",workItemNotFoundTitle:"work.item.notFoundTitle",workItemNotFoundText:"work.item.notFoundText",workItemNotInProjectionText:"work.item.notInProjectionText",workItemMissedTitle:"work.item.missedTitle",workItemNoTasksYetLabel:"work.item.noTasksYetLabel",workItemNotFoundCodeLabel:"work.item.notFoundCodeLabel",workExternalEmpty:"work.external.empty",workExternalLinkIssueAction:"work.external.linkIssueAction",workExternalLinkTrackerAction:"work.external.linkTrackerAction",workExternalLinkDialogTitle:"work.external.dialogTitle",workExternalLinkCloseLabel:"work.external.closeLabel",workExternalProviderLabel:"work.external.providerLabel",workExternalProviderGithub:"work.external.provider.github",workExternalProviderGitlab:"work.external.provider.gitlab",workExternalProviderGitea:"work.external.provider.gitea",workExternalProviderRedmine:"work.external.provider.redmine",workExternalProviderBugzilla:"work.external.provider.bugzilla",workExternalTypeLabel:"work.external.typeLabel",workExternalTypeIssue:"work.external.type.issue",workExternalTypeTicket:"work.external.type.ticket",workExternalTypeProject:"work.external.type.project",workExternalIdLabel:"work.external.idLabel",workExternalIdPlaceholder:"work.external.idPlaceholder",workExternalUrlLabel:"work.external.urlLabel",workExternalUrlPlaceholder:"work.external.urlPlaceholder",workExternalSyncDirectionLabel:"work.external.syncDirectionLabel",workExternalSyncPull:"work.external.sync.pull",workExternalSyncPush:"work.external.sync.push",workExternalSyncBidirectional:"work.external.sync.bidirectional",workExternalCancelButton:"work.external.cancelButton",workExternalSubmitLabel:"work.external.submitLabel",workExternalSubmitBusyLabel:"work.external.submitBusyLabel",workExternalLinkError:"work.external.linkError",workExternalUnlinkAction:"work.external.unlinkAction",workExternalUnlinkAriaLabel:"work.external.unlinkAriaLabel",workExternalUnlinkConfirmation:"work.external.unlinkConfirmation",workExternalUnlinkError:"work.external.unlinkError",workExternalImportDialogTitle:"work.external.import.dialogTitle",workExternalImportProviderLabel:"work.external.import.providerLabel",workExternalImportUrlLabel:"work.external.import.urlLabel",workExternalImportUrlPlaceholder:"work.external.import.urlPlaceholder",workExternalImportCancelButton:"work.external.import.cancelButton",workExternalImportSubmitLabel:"work.external.import.submitLabel",workExternalImportSubmitBusyLabel:"work.external.import.submitBusyLabel",workExternalImportError:"work.external.import.error",workExternalImportExternalIssueLabel:"work.external.import.externalIssueLabel",workExternalImportProviderGithub:"work.external.import.provider.github",workExternalImportProviderRedmine:"work.external.import.provider.redmine",workExternalImportProviderBugzilla:"work.external.import.provider.bugzilla",workExternalImportTypeIssue:"work.external.import.type.issue",workExternalImportTypeTicket:"work.external.import.type.ticket",workExternalImportResultImported:"work.external.import.result.imported",workExternalImportResultLinked:"work.external.import.result.linked",workExternalImportResultAlreadyImported:"work.external.import.result.alreadyImported",workExternalImportFailureBody:"work.external.import.failure.body",workExternalImportFailureBodyUnknown:"work.external.import.failure.bodyUnknown",workExternalImportFailureReasonInvalidTarget:"work.external.import.failure.reason.invalidTarget",workExternalImportFailureReasonStoreUnavailable:"work.external.import.failure.reason.storeUnavailable",workExternalImportFailureReasonUnsupportedOwnerMessage:"work.external.import.failure.reason.unsupportedOwnerMessage",workExternalImportFailureReasonSchemaInvalid:"work.external.import.failure.reason.schemaInvalid",workExternalImportFailureReasonIssueMismatch:"work.external.import.failure.reason.issueMismatch",workExternalImportFailureReasonProviderMismatch:"work.external.import.failure.reason.providerMismatch",workExternalImportFailureReasonPendingApproval:"work.external.import.failure.reason.pendingApproval",workExternalImportFailureReasonUnsupportedSource:"work.external.import.failure.reason.unsupportedSource",workExternalImportFailureReasonFetchFailed:"work.external.import.failure.reason.fetchFailed",workExternalImportFailureReasonPullRequestUnsupported:"work.external.import.failure.reason.pullRequestUnsupported",workExternalImportFailureReasonUnexpected:"work.external.import.failure.reason.unexpected",workTasksListTitle:"work.tasks.listTitle",workTasksListNewAction:"work.tasks.newAction",workTasksListCreateNewTaskAriaLabel:"work.tasks.createNewTaskAriaLabel",workTasksListLoading:"work.tasks.loading",workTasksListLoadError:"work.tasks.loadError",workTasksListEmptyIntro:"work.tasks.emptyIntro",workTasksListEmptyActionLabel:"work.tasks.emptyActionLabel",workTasksListEmptySuffix:"work.tasks.emptySuffix",workTasksListOpenTaskAria:"work.tasks.openTaskAriaLabel",workTaskStatusPendingApproval:"work.task.status.pendingApproval",workTaskStatusApproved:"work.task.status.approved",workTaskStatusArchived:"work.task.status.archived",workTaskPriorityUrgent:"work.task.priority.urgent",workTaskPriorityHigh:"work.task.priority.high",workTaskPriorityMedium:"work.task.priority.medium",workTaskPriorityLow:"work.task.priority.low",workTaskPriorityLabelWithValue:"work.task.priority.labelWithValue",workTaskBackLabel:"work.task.backLabel",workTaskBackArrowLabel:"work.task.backArrowLabel",workTaskUpdatedAtPrefix:"work.task.updatedAtPrefix",workTaskDeleteLabel:"work.task.deleteLabel",workTaskDeleteLabelBusy:"work.task.deleteLabelBusy",workTaskDeleteConfirmation:"work.task.deleteConfirmation",workTaskDeleteError:"work.task.deleteError",workTaskApproveLabel:"work.task.approveLabel",workTaskApproveBusyLabel:"work.task.approveBusyLabel",workTaskRejectLabel:"work.task.rejectLabel",workTaskRejectBusyLabel:"work.task.rejectBusyLabel",workTaskApprovalDecisionError:"work.task.approvalDecisionError",workTaskPriorityTooltip:"work.task.priorityTooltip",workTaskOverviewTitle:"work.task.overviewTitle",workTaskSummaryLabel:"work.task.summaryLabel",workTaskProjectLabel:"work.task.projectLabel",workTaskOrphanProjectFallback:"work.task.orphanProjectFallback",workTaskWorkItemLabel:"work.task.workItemLabel",workTaskNoWorkItemFallback:"work.task.noWorkItemFallback",workTaskParentTaskLabel:"work.task.parentTaskLabel",workTaskOwnerLabel:"work.task.ownerLabel",workTaskAssigneeLabel:"work.task.assigneeLabel",workTaskNoAssigneeFallback:"work.task.noAssigneeFallback",workTaskAssignedActorsLabel:"work.task.assignedActorsLabel",workTaskNoActorsAssignedFallback:"work.task.noActorsAssignedFallback",workTaskAcceptanceCriteriaLabel:"work.task.acceptanceCriteriaLabel",workTaskConversationLabel:"work.task.conversationLabel",workTaskNoActivity:"work.task.noActivity",workTaskActivityTitle:"work.task.activityTitle",workTaskSubTasksTitle:"work.task.subTasksTitle",workTaskNoSubTasksLabel:"work.task.noSubTasksLabel",workTaskRunsTitle:"work.task.runsTitle",workTaskNoRunsIntro:"work.task.noRunsIntro",workTaskNoRunsActionLabel:"work.task.noRunsActionLabel",workTaskNoRunsSuffix:"work.task.noRunsSuffix",workTaskStartRunBusyLabel:"work.task.startRunBusyLabel",workTaskStartRunError:"work.task.startRunError",workTaskLoadingLabel:"work.task.loadingLabel",workTaskNotFoundTitle:"work.task.notFoundTitle",workTaskNotFoundText:"work.task.notFoundText",workTaskNotFoundCodeLabel:"work.task.notFoundCodeLabel",workObjectKindAgent:"work.object.kind.agent",workObjectKindContainer:"work.object.kind.container",workObjectKindConversation:"work.object.kind.conversation",workObjectKindTurn:"work.object.kind.turn",workObjectKindLane:"work.object.kind.lane",workObjectKindProject:"work.object.kind.project",workObjectKindWorkItem:"work.object.kind.workItem",workObjectKindTask:"work.object.kind.task",workObjectKindMission:"work.object.kind.mission",workObjectKindRun:"work.object.kind.run",workObjectKindArtifact:"work.object.kind.artifact",workObjectKindActivity:"work.object.kind.activity",workObjectKindOutcome:"work.object.kind.outcome",workObjectKindApprovalBinding:"work.object.kind.approvalBinding",workObjectKindUnknown:"work.object.kind.unknown",workObjectAttentionUnknown:"work.object.attention.unknown",workObjectAttentionDecisionNeeded:"work.object.attention.decisionNeeded",workObjectAttentionBlocked:"work.object.attention.blocked",workObjectAttentionFailed:"work.object.attention.failed",workObjectAttentionReadyToReview:"work.object.attention.readyToReview",workObjectAttentionRecentlyShipped:"work.object.attention.recentlyShipped",workObjectStatusDraft:"work.object.status.draft",workObjectStatusPlanned:"work.object.status.planned",workObjectStatusActive:"work.object.status.active",workObjectStatusPaused:"work.object.status.paused",workObjectStatusArchived:"work.object.status.archived",workObjectStatusReady:"work.object.status.ready",workObjectStatusInProgress:"work.object.status.inProgress",workObjectStatusBlocked:"work.object.status.blocked",workObjectStatusCompleted:"work.object.status.completed",workObjectStatusCancelled:"work.object.status.cancelled",workObjectStatusRunning:"work.object.status.running",workObjectStatusQueued:"work.object.status.queued",workObjectStatusUnknown:"work.object.status.unknown",workActorRoleAssistant:"work.actorRole.assistant",workActorRoleBoss:"work.actorRole.boss",workActorRoleCoder:"work.actorRole.coder",workActorRoleCoordinator:"work.actorRole.coordinator",workActorRoleCritic:"work.actorRole.critic",workActorRoleDrafter:"work.actorRole.drafter",workActorRoleMainCoder:"work.actorRole.mainCoder",workActorRoleOrchestrator:"work.actorRole.orchestrator",workActorRoleOwner:"work.actorRole.owner",workActorRolePlanner:"work.actorRole.planner",workActorRoleReviewer:"work.actorRole.reviewer",workActorRoleSummarizer:"work.actorRole.summarizer",workObjectGateStateNotRequested:"work.object.gateState.notRequested",workObjectGateStatePending:"work.object.gateState.pending",workObjectGateStateApproved:"work.object.gateState.approved",workObjectGateStateRejected:"work.object.gateState.rejected",workObjectGateStateUnknown:"work.object.gateState.unknown",workTopdownParentTaskOwningLabel:"work.topdown.parentTaskOwningLabel",workTopdownParentTaskLabel:"work.topdown.parentTaskLabel",workTopdownParentWorkItemLabel:"work.topdown.parentWorkItemLabel",workTopdownCrossCuttingLayer:"work.topdown.crossCuttingLayer",workTopdownCockpitEyebrow:"work.topdown.cockpitEyebrow",workTopdownCockpitTitle:"work.topdown.cockpitTitle",workTopdownCockpitLede:"work.topdown.cockpitLede",workTopdownCockpitMetricDecisions:"work.topdown.cockpitMetricDecisions",workTopdownCockpitMetricBlocked:"work.topdown.cockpitMetricBlocked",workTopdownCockpitMetricShipped:"work.topdown.cockpitMetricShipped",workTopdownCockpitTabsAriaLabel:"work.topdown.cockpitTabsAriaLabel",workTopdownCockpitTabCommandLabel:"work.topdown.cockpitTabCommandLabel",workTopdownCockpitTabCommandSub:"work.topdown.cockpitTabCommandSub",workTopdownCockpitTabNeedsDecisionLabel:"work.topdown.cockpitTabNeedsDecisionLabel",workTopdownCockpitTabNeedsDecisionSub:"work.topdown.cockpitTabNeedsDecisionSub",workTopdownCockpitTabActiveLabel:"work.topdown.cockpitTabActiveLabel",workTopdownCockpitTabActiveSub:"work.topdown.cockpitTabActiveSub",workTopdownCockpitTabActiveRunsLabel:"work.topdown.cockpitTabActiveRunsLabel",workTopdownCockpitTabActiveRunsSub:"work.topdown.cockpitTabActiveRunsSub",workTopdownCockpitTabBlockedLabel:"work.topdown.cockpitTabBlockedLabel",workTopdownCockpitTabBlockedSub:"work.topdown.cockpitTabBlockedSub",workTopdownCockpitTabShippedLabel:"work.topdown.cockpitTabShippedLabel",workTopdownCockpitTabShippedSub:"work.topdown.cockpitTabShippedSub",workTopdownCockpitTabTeamsLabel:"work.topdown.cockpitTabTeamsLabel",workTopdownCockpitTabTeamsSub:"work.topdown.cockpitTabTeamsSub",workTopdownCockpitOpen:"work.topdown.cockpitOpen",workTopdownCockpitNoBucketItems:"work.topdown.cockpitNoBucketItems",workTopdownCockpitRecentActivityAriaLabel:"work.topdown.cockpitRecentActivityAriaLabel",workTopdownCockpitRecentActivityTitle:"work.topdown.cockpitRecentActivityTitle",workTopdownCockpitRecentActivitySummary:"work.topdown.cockpitRecentActivitySummary",workTopdownCockpitRecentActivityEmpty:"work.topdown.cockpitRecentActivityEmpty",workTopdownCockpitNoActorRoles:"work.topdown.cockpitNoActorRoles",workTopdownLinkageTitle:"work.topdown.linkageTitle",workTopdownLinkageAddAction:"work.topdown.linkageAddAction",workTopdownLinkageNoLinksYetPrefix:"work.topdown.linkageNoLinksYetPrefix",workTopdownLinkageNoLinksYetSuffix:"work.topdown.linkageNoLinksYetSuffix",workTopdownLinkageViewKindBlocksLabel:"work.topdown.linkageViewKindBlocksLabel",workTopdownLinkageViewKindBlockedByLabel:"work.topdown.linkageViewKindBlockedByLabel",workTopdownLinkageViewKindRelatedToLabel:"work.topdown.linkageViewKindRelatedToLabel",workTopdownLinkageViewKindDuplicateOfLabel:"work.topdown.linkageViewKindDuplicateOfLabel",workTopdownLinkageViewKindFollowsLabel:"work.topdown.linkageViewKindFollowsLabel",workTopdownLinkageViewKindBlocksEmpty:"work.topdown.linkageViewKindBlocksEmpty",workTopdownLinkageViewKindBlockedByEmpty:"work.topdown.linkageViewKindBlockedByEmpty",workTopdownLinkageViewKindRelatedToEmpty:"work.topdown.linkageViewKindRelatedToEmpty",workTopdownLinkageViewKindDuplicateOfEmpty:"work.topdown.linkageViewKindDuplicateOfEmpty",workTopdownLinkageViewKindFollowsEmpty:"work.topdown.linkageViewKindFollowsEmpty",workTopdownLinkKindBlocksHelp:"work.topdown.linkKindBlocksHelp",workTopdownLinkKindBlockedByHelp:"work.topdown.linkKindBlockedByHelp",workTopdownLinkKindRelatedToHelp:"work.topdown.linkKindRelatedToHelp",workTopdownLinkKindDuplicateOfHelp:"work.topdown.linkKindDuplicateOfHelp",workTopdownLinkKindFollowsHelp:"work.topdown.linkKindFollowsHelp",workTopdownNewLinkDialogTitle:"work.topdown.newLinkDialogTitle",workTopdownNewLinkClose:"work.topdown.newLinkClose",workTopdownNewLinkSourcePrefix:"work.topdown.newLinkSourcePrefix",workTopdownNewLinkRelationLabel:"work.topdown.newLinkRelationLabel",workTopdownNewLinkTargetLabel:"work.topdown.newLinkTargetLabel",workTopdownNewLinkTargetSearchPlaceholder:"work.topdown.newLinkTargetSearchPlaceholder",workTopdownNewLinkNoMatches:"work.topdown.newLinkNoMatches",workTopdownNewLinkNoteLabel:"work.topdown.newLinkNoteLabel",workTopdownNewLinkNotePlaceholder:"work.topdown.newLinkNotePlaceholder",workTopdownNewLinkCancel:"work.topdown.newLinkCancel",workTopdownNewLinkSaving:"work.topdown.newLinkSaving",workTopdownNewLinkErrorInvalidTarget:"work.topdown.newLinkErrorInvalidTarget",workTopdownNewLinkErrorSelfLink:"work.topdown.newLinkErrorSelfLink",workTopdownNewLinkErrorNoteTooLong:"work.topdown.newLinkErrorNoteTooLong",workTopdownNewLinkErrorFailed:"work.topdown.newLinkErrorFailed",workTopdownUpstreamBlockersAriaLabel:"work.topdown.upstreamBlockersAriaLabel",workTopdownBlockersTitle:"work.topdown.blockersTitle",workTopdownUpstreamBlocksLine:"work.topdown.upstreamBlocksLine",workTopdownNoUpstreamBlockers:"work.topdown.noUpstreamBlockers",workTopdownBrokenLinksEyebrow:"work.topdown.brokenLinksEyebrow",workTopdownBrokenLinksTitle:"work.topdown.brokenLinksTitle",workTopdownBrokenLinksLede:"work.topdown.brokenLinksLede",workTopdownBrokenLinksErrorMetricSuffix:"work.topdown.brokenLinksErrorMetricSuffix",workTopdownBrokenLinksWarningMetricSuffix:"work.topdown.brokenLinksWarningMetricSuffix",workTopdownBrokenLinksInfoMetricSuffix:"work.topdown.brokenLinksInfoMetricSuffix",workTopdownBrokenLinksSeverityFiltersAriaLabel:"work.topdown.brokenLinksSeverityFiltersAriaLabel",workTopdownBrokenLinksSeverityAllLabel:"work.topdown.brokenLinksSeverityAllLabel",workTopdownBrokenLinksSeverityErrorLabel:"work.topdown.brokenLinksSeverityErrorLabel",workTopdownBrokenLinksSeverityWarningLabel:"work.topdown.brokenLinksSeverityWarningLabel",workTopdownBrokenLinksSeverityInfoLabel:"work.topdown.brokenLinksSeverityInfoLabel",workTopdownBrokenLinksNoDiagnostics:"work.topdown.brokenLinksNoDiagnostics",workTopdownBrokenLinksOn:"work.topdown.brokenLinksOn",workTopdownBrokenLinksOpenInDrawer:"work.topdown.brokenLinksOpenInDrawer",workTopdownBrokenLinksObjectNotInProjection:"work.topdown.brokenLinksObjectNotInProjection",workTopdownBrokenLinksNoSpecificObject:"work.topdown.brokenLinksNoSpecificObject",workTopdownBrokenLinksRemoveTooltipRemovable:"work.topdown.brokenLinksRemoveTooltipRemovable",workTopdownBrokenLinksRemoveTooltipDemoSeed:"work.topdown.brokenLinksRemoveTooltipDemoSeed",workTopdownBrokenLinksRemoveAction:"work.topdown.brokenLinksRemoveAction",workTopdownBrokenLinksRemoveUnknownError:"work.topdown.brokenLinksRemoveUnknownError",workTopdownBrokenLinksRemovingInProgress:"work.topdown.brokenLinksRemovingInProgress",workTopdownBrokenLinksRemovableOnlyDemo:"work.topdown.brokenLinksRemovableOnlyDemo",workTopdownBrokenLinksCycleRemovableRows:"work.topdown.brokenLinksCycleRemovableRows",workTopdownBrokenLinksDeletedLabel:"work.topdown.brokenLinksDeletedLabel",workTopdownDiagnosticKindBrokenFk:"work.topdown.diagnosticKind.brokenFk",workTopdownDiagnosticKindMissingProjectAnchor:"work.topdown.diagnosticKind.missingProjectAnchor",workTopdownDiagnosticKindMissingPlanningExecutionBridge:"work.topdown.diagnosticKind.missingPlanningExecutionBridge",workTopdownDiagnosticKindUnanchoredRun:"work.topdown.diagnosticKind.unanchoredRun",workTopdownDiagnosticKindUnanchoredEvidence:"work.topdown.diagnosticKind.unanchoredEvidence",workTopdownDiagnosticKindMissingGateSubject:"work.topdown.diagnosticKind.missingGateSubject",workTopdownDiagnosticKindOrphanLink:"work.topdown.diagnosticKind.orphanLink",workTopdownDiagnosticKindLinkCycle:"work.topdown.diagnosticKind.linkCycle",workTopdownTaskProductBindingTitle:"work.topdown.taskProductBindingTitle",workTopdownTaskProductBindingUnbound:"work.topdown.taskProductBindingUnbound",workTopdownParentTaskTooltip:"work.topdown.parentTaskTooltip",workTopdownSelectionLost:"work.topdown.selectionLost",workTopdownObjectNotInProjectionTitle:"work.topdown.objectNotInProjectionTitle",workTopdownObjectNotInProjectionMessage:"work.topdown.objectNotInProjectionMessage",workTopdownIdentityTitle:"work.topdown.identityTitle",workTopdownIdentityKind:"work.topdown.identityKind",workTopdownIdentityStatus:"work.topdown.identityStatus",workTopdownIdentityLayer:"work.topdown.identityLayer",workTopdownIdentityOwnerRole:"work.topdown.identityOwnerRole",workTopdownIdentityNextAction:"work.topdown.identityNextAction",workTopdownIdentityUpdated:"work.topdown.identityUpdated",workTopdownIdentitySummary:"work.topdown.identitySummary",workTopdownExternalTitle:"work.topdown.externalTitle",workTopdownExternalBindingTooltip:"work.topdown.externalBindingTooltip",workTopdownExternalSyncLabel:"work.topdown.externalSyncLabel",workTopdownExternalUpdatedLabel:"work.topdown.externalUpdatedLabel",workTopdownAnchorsTitle:"work.topdown.anchorsTitle",workTopdownEvidenceTitle:"work.topdown.evidenceTitle",workTopdownEvidenceEmpty:"work.topdown.evidenceEmpty",workTopdownMissingSuffix:"work.topdown.missingSuffix",workTopdownGatesTitle:"work.topdown.gatesTitle",workTopdownGatesEmpty:"work.topdown.gatesEmpty",workTopdownDiagnosticsTitle:"work.topdown.diagnosticsTitle",workTopdownRelativeJustNow:"work.topdown.relativeJustNow",workTopdownRelativeMinutesAgo:"work.topdown.relativeMinutesAgo",workTopdownRelativeHoursAgo:"work.topdown.relativeHoursAgo",workTopdownRelativeDaysAgo:"work.topdown.relativeDaysAgo",workTopdownAnchorProject:"work.topdown.anchorProject",workTopdownAnchorWorkItem:"work.topdown.anchorWorkItem",workTopdownAnchorTask:"work.topdown.anchorTask",workTopdownAnchorRun:"work.topdown.anchorRun",workTopdownAnchorConversation:"work.topdown.anchorConversation",workTopdownAnchorsEmpty:"work.topdown.anchorsEmpty",workTopdownSystemMapEyebrow:"work.topdown.systemMapEyebrow",workTopdownSystemMapTitle:"work.topdown.systemMapTitle",workTopdownSystemMapLede:"work.topdown.systemMapLede",workTopdownSystemMapStructuralLabel:"work.topdown.systemMapStructuralLabel",workTopdownSystemMapTotalLabel:"work.topdown.systemMapTotalLabel",workTopdownSystemMapDiagnosticsLabel:"work.topdown.systemMapDiagnosticsLabel",workTopdownSystemMapLayerAriaLabel:"work.topdown.systemMapLayerAriaLabel",workTopdownSystemMapLayerInteractionLabel:"work.topdown.systemMapLayerInteractionLabel",workTopdownSystemMapLayerPlanningLabel:"work.topdown.systemMapLayerPlanningLabel",workTopdownSystemMapLayerExecutionLabel:"work.topdown.systemMapLayerExecutionLabel",workTopdownSystemMapLayerInteractionDescription:"work.topdown.systemMapLayerInteractionDescription",workTopdownSystemMapLayerPlanningDescription:"work.topdown.systemMapLayerPlanningDescription",workTopdownSystemMapLayerExecutionDescription:"work.topdown.systemMapLayerExecutionDescription",workTopdownSystemMapLayerEmpty:"work.topdown.systemMapLayerEmpty",workWarRoomAttentionAttention:"work.warRoom.attentionAttention",workWarRoomAttentionError:"work.warRoom.attentionError",workWarRoomAttentionFallback:"work.warRoom.attentionFallback",workWarRoomAttentionMuted:"work.warRoom.attentionMuted",workWarRoomAttentionProgress:"work.warRoom.attentionProgress",workWarRoomAttentionSuccess:"work.warRoom.attentionSuccess",workWarRoomControlPlane:"work.warRoom.controlPlane",workWarRoomControlPlaneBlockedBy:"work.warRoom.controlPlaneBlockedBy",workWarRoomControlPlaneEmptyBadge:"work.warRoom.controlPlaneEmptyBadge",workWarRoomControlPlaneEmptyBody:"work.warRoom.controlPlaneEmptyBody",workWarRoomControlPlaneEmptyTitle:"work.warRoom.controlPlaneEmptyTitle",workWarRoomControlPlaneNoTargets:"work.warRoom.controlPlaneNoTargets",workWarRoomControlPlaneTargets:"work.warRoom.controlPlaneTargets",workWarRoomCountSummary:"work.warRoom.countSummary",workWarRoomGovernanceEyebrow:"work.warRoom.governanceEyebrow",workWarRoomActionBusy:"work.warRoom.actionBusy",workWarRoomActionError:"work.warRoom.actionError",workWarRoomLoadError:"work.warRoom.loadError",workWarRoomLoadingBadge:"work.warRoom.loadingBadge",workWarRoomLoadingBody:"work.warRoom.loadingBody",workWarRoomLoadingEyebrow:"work.warRoom.loadingEyebrow",workWarRoomLoadingSummary:"work.warRoom.loadingSummary",workWarRoomLoadingTitle:"work.warRoom.loadingTitle",workWarRoomManagedWorkEyebrow:"work.warRoom.managedWorkEyebrow",workWarRoomMetaLabelActions:"work.warRoom.metaLabelActions",workWarRoomMetaLabelActors:"work.warRoom.metaLabelActors",workWarRoomMetaLabelApproval:"work.warRoom.metaLabelApproval",workWarRoomMetaLabelBlocked:"work.warRoom.metaLabelBlocked",workWarRoomMetaLabelConversation:"work.warRoom.metaLabelConversation",workWarRoomMetaLabelDelivery:"work.warRoom.metaLabelDelivery",workWarRoomMetaLabelLatest:"work.warRoom.metaLabelLatest",workWarRoomMetaLabelLatestSource:"work.warRoom.metaLabelLatestSource",workWarRoomMetaLabelNext:"work.warRoom.metaLabelNext",workWarRoomMetaLabelOwner:"work.warRoom.metaLabelOwner",workWarRoomMetaLabelProduct:"work.warRoom.metaLabelProduct",workWarRoomMetaLabelProject:"work.warRoom.metaLabelProject",workWarRoomMetaLabelReasons:"work.warRoom.metaLabelReasons",workWarRoomMetaLabelReplay:"work.warRoom.metaLabelReplay",workWarRoomMetaLabelRepo:"work.warRoom.metaLabelRepo",workWarRoomMetaLabelRetryAvailable:"work.warRoom.metaLabelRetryAvailable",workWarRoomMetaLabelStrategy:"work.warRoom.metaLabelStrategy",workWarRoomMetaLabelTask:"work.warRoom.metaLabelTask",workWarRoomMetaLabelTasks:"work.warRoom.metaLabelTasks",workWarRoomMetaLabelWatch:"work.warRoom.metaLabelWatch",workWarRoomMetaLabelWorkflow:"work.warRoom.metaLabelWorkflow",workWarRoomMetaLabelWorkItem:"work.warRoom.metaLabelWorkItem",workWarRoomMetaLabelWorkItems:"work.warRoom.metaLabelWorkItems",workWarRoomMetaValueNo:"work.warRoom.metaValueNo",workWarRoomMetaValueNoReplayBlock:"work.warRoom.metaValueNoReplayBlock",workWarRoomMetaValueNoTimelineItem:"work.warRoom.metaValueNoTimelineItem",workWarRoomMetaValueNotBound:"work.warRoom.metaValueNotBound",workWarRoomMetaValueNotRecorded:"work.warRoom.metaValueNotRecorded",workWarRoomMetaValueNotSpecified:"work.warRoom.metaValueNotSpecified",workWarRoomMetaValueUnassigned:"work.warRoom.metaValueUnassigned",workWarRoomMetaValueNoRuntimeBridge:"work.warRoom.metaValueNoRuntimeBridge",workWarRoomMetaValueNone:"work.warRoom.metaValueNone",workWarRoomNoLinkedConversation:"work.warRoom.noLinkedConversation",workWarRoomNoLinkedProject:"work.warRoom.noLinkedProject",workWarRoomNoLinkedTask:"work.warRoom.noLinkedTask",workWarRoomNoLinkedWorkItem:"work.warRoom.noLinkedWorkItem",workWarRoomNoPrimaryConversation:"work.warRoom.noPrimaryConversation",workWarRoomNoProjectSummary:"work.warRoom.noProjectSummary",workWarRoomNoStatus:"work.warRoom.noStatus",workWarRoomNoTaskSummary:"work.warRoom.noTaskSummary",workWarRoomNoWorkItemSummary:"work.warRoom.noWorkItemSummary",workWarRoomNone:"work.warRoom.none",workWarRoomNotRecorded:"work.warRoom.notRecorded",workWarRoomOpenActor:"work.warRoom.openActor",workWarRoomOpenBriefingThread:"work.warRoom.openBriefingThread",workWarRoomOpenProject:"work.warRoom.openProject",workWarRoomOpenTask:"work.warRoom.openTask",workWarRoomOpenWorkItem:"work.warRoom.openWorkItem",workWarRoomOperateEyebrow:"work.warRoom.operateEyebrow",workWarRoomOperatorInbox:"work.warRoom.operatorInbox",workWarRoomOperatorInboxEmptyBadge:"work.warRoom.operatorInboxEmptyBadge",workWarRoomOperatorInboxEmptyBody:"work.warRoom.operatorInboxEmptyBody",workWarRoomOperatorInboxEmptyTitle:"work.warRoom.operatorInboxEmptyTitle",workWarRoomPageEyebrow:"work.warRoom.pageEyebrow",workWarRoomPageTitle:"work.warRoom.pageTitle",workWarRoomPortfolioEyebrow:"work.warRoom.portfolioEyebrow",workWarRoomProjects:"work.warRoom.projects",workWarRoomProjectsEmptyBadge:"work.warRoom.projectsEmptyBadge",workWarRoomProjectsEmptyBody:"work.warRoom.projectsEmptyBody",workWarRoomProjectsEmptyTitle:"work.warRoom.projectsEmptyTitle",workWarRoomRecovery:"work.warRoom.recovery",workWarRoomRecoveryEmptyBadge:"work.warRoom.recoveryEmptyBadge",workWarRoomRecoveryEmptyBody:"work.warRoom.recoveryEmptyBody",workWarRoomRecoveryEmptyTitle:"work.warRoom.recoveryEmptyTitle",workWarRoomRecoveryEyebrow:"work.warRoom.recoveryEyebrow",workWarRoomRecoveryNoRecoveryNote:"work.warRoom.recoveryNoRecoveryNote",workWarRoomSnapshotEyebrow:"work.warRoom.snapshotEyebrow",workWarRoomSnapshotSummary:"work.warRoom.snapshotSummary",workWarRoomSnapshotTitle:"work.warRoom.snapshotTitle",workWarRoomStatusFallback:"work.warRoom.statusFallback",workWarRoomSummaryAttention:"work.warRoom.summaryAttention",workWarRoomSummaryInProgressBlocked:"work.warRoom.summaryInProgressBlocked",workWarRoomSummaryLabelAttention:"work.warRoom.summaryLabelAttention",workWarRoomSummaryLabelProjects:"work.warRoom.summaryLabelProjects",workWarRoomSummaryLabelRecovery:"work.warRoom.summaryLabelRecovery",workWarRoomSummaryLabelTasks:"work.warRoom.summaryLabelTasks",workWarRoomSummaryRecovery:"work.warRoom.summaryRecovery",workWarRoomWorkItems:"work.warRoom.workItems",workWarRoomWorkItemsEmptyBadge:"work.warRoom.workItemsEmptyBadge",workWarRoomWorkItemsEmptyBody:"work.warRoom.workItemsEmptyBody",workWarRoomWorkItemsEmptyTitle:"work.warRoom.workItemsEmptyTitle",workTimelineEvidenceProviderAgentRunLoop:"work.timeline.evidence.providerAgentRunLoop",workTimelineEvidenceSupervision:"work.timeline.evidence.supervision",workTimelineTitleApprovalBinding:"work.timeline.title.approvalBinding",workTimelineTitleApprovalDecided:"work.timeline.title.approvalDecided",workTimelineTitleApprovalRequested:"work.timeline.title.approvalRequested",workTimelineTitleArtifactRecorded:"work.timeline.title.artifactRecorded",workTimelineTitleCheckpoint:"work.timeline.title.checkpoint",workTimelineTitleCheckpointRecorded:"work.timeline.title.checkpointRecorded",workTimelineTitleEvidence:"work.timeline.title.evidence",workTimelineTitleNote:"work.timeline.title.note",workTimelineTitleOperatorAction:"work.timeline.title.operatorAction",workTimelineTitleProviderAgentPlan:"work.timeline.title.providerAgentPlan",workTimelineTitleStatusChanged:"work.timeline.title.statusChanged",workTimelineTitleTrace:"work.timeline.title.trace",workTimelineTitleWorkItemUpdated:"work.timeline.title.workItemUpdated",workExecutionActionAcknowledge:"work.execution.action.acknowledge",workExecutionActionApprove:"work.execution.action.approve",workExecutionActionComplete:"work.execution.action.complete",workExecutionActionCreateCommit:"work.execution.action.createCommit",workExecutionActionDispatch:"work.execution.action.dispatch",workExecutionActionOpenPullRequest:"work.execution.action.openPullRequest",workExecutionActionPublishPreview:"work.execution.action.publishPreview",workExecutionActionReject:"work.execution.action.reject",workExecutionActionRequestReview:"work.execution.action.requestReview",workExecutionActionReroute:"work.execution.action.reroute",workExecutionActionRetry:"work.execution.action.retry",workExecutionActionWait:"work.execution.action.wait",workExecutionActionWaitForChecks:"work.execution.action.waitForChecks",workExecutionApprovalStatusApproved:"work.execution.approvalStatus.approved",workExecutionApprovalStatusNotRequested:"work.execution.approvalStatus.notRequested",workExecutionApprovalStatusPending:"work.execution.approvalStatus.pending",workExecutionApprovalStatusRejected:"work.execution.approvalStatus.rejected",workExecutionDeliveryModeArtifactOnly:"work.execution.deliveryMode.artifactOnly",workExecutionDeliveryModeCommitOnly:"work.execution.deliveryMode.commitOnly",workExecutionDeliveryModeDeployPreview:"work.execution.deliveryMode.deployPreview",workExecutionDeliveryModePrWithChecks:"work.execution.deliveryMode.prWithChecks",workExecutionDeliveryModePushBranch:"work.execution.deliveryMode.pushBranch",workExecutionStrategyPdca:"work.execution.strategy.pdca",workExecutionStrategyPlanAndExecute:"work.execution.strategy.planAndExecute",workExecutionStrategyReact:"work.execution.strategy.react",workExecutionStrategyReflexion:"work.execution.strategy.reflexion",workExecutionReasonApprovalPending:"work.execution.reason.approvalPending",workExecutionReasonChildTasksInProgress:"work.execution.reason.childTasksInProgress",workExecutionReasonMaxDispatches:"work.execution.reason.maxDispatches",workExecutionReasonNoValidTargets:"work.execution.reason.noValidTargets",workExecutionReasonRetryAvailable:"work.execution.reason.retryAvailable",workExecutionReasonRunBlocked:"work.execution.reason.runBlocked",workExecutionReasonRunFailed:"work.execution.reason.runFailed",workExecutionReasonUserCancelled:"work.execution.reason.userCancelled",workExecutionReasonWorkflowReviewRequired:"work.execution.reason.workflowReviewRequired",workExecutionReplaySourceOrchestratorReplay:"work.execution.replaySource.orchestratorReplay",workExecutionReplaySourceOrchestratorStartupRecovery:"work.execution.replaySource.orchestratorStartupRecovery",workExecutionReplaySourceWorkflowContinuationReplay:"work.execution.replaySource.workflowContinuationReplay",workExecutionReplayStateFailed:"work.execution.replayState.failed",workExecutionReplayStateInProgress:"work.execution.replayState.inProgress",workExecutionReplayStatePending:"work.execution.replayState.pending",workExecutionReplayStateReady:"work.execution.replayState.ready",workNewWorkItemTitle:"work.newWorkItem.title",workNewWorkItemTitleLabel:"work.newWorkItem.titleLabel",workNewWorkItemSummaryLabel:"work.newWorkItem.summaryLabel",workNewWorkItemProjectLabel:"work.newWorkItem.projectLabel",workNewWorkItemStatusLabel:"work.newWorkItem.statusLabel",workNewWorkItemProjectOrphan:"work.newWorkItem.projectOrphan",workNewWorkItemTitlePlaceholder:"work.newWorkItem.titlePlaceholder",workNewWorkItemSummaryPlaceholder:"work.newWorkItem.summaryPlaceholder",workNewWorkItemCancelButton:"work.newWorkItem.cancelButton",workNewWorkItemCloseLabel:"work.newWorkItem.closeLabel",workNewWorkItemSubmitLabel:"work.newWorkItem.submitLabel",workNewWorkItemSubmitBusyLabel:"work.newWorkItem.submitBusyLabel",workNewWorkItemCreateError:"work.newWorkItem.createError",workNewWorkItemStatusDraft:"work.newWorkItem.status.draft",workNewWorkItemStatusPlanned:"work.newWorkItem.status.planned",workNewWorkItemStatusReady:"work.newWorkItem.status.ready",workNewWorkItemStatusInProgress:"work.newWorkItem.status.inProgress",workNewWorkItemStatusBlocked:"work.newWorkItem.status.blocked",workNewWorkItemStatusCompleted:"work.newWorkItem.status.completed",workNewWorkItemStatusCancelled:"work.newWorkItem.status.cancelled",workNewTaskTitle:"work.newTask.title",workNewTaskTitleLabel:"work.newTask.titleLabel",workNewTaskSummaryLabel:"work.newTask.summaryLabel",workNewTaskStatusLabel:"work.newTask.statusLabel",workNewTaskParentTaskLabel:"work.newTask.parentTaskLabel",workNewTaskNoParentTask:"work.newTask.noParentTask",workNewTaskAssigneeLabel:"work.newTask.assigneeLabel",workNewTaskAssigneePlaceholder:"work.newTask.assigneePlaceholder",workNewTaskPriorityLabel:"work.newTask.priorityLabel",workNewTaskNoPriority:"work.newTask.noPriority",workNewTaskAcceptanceCriteriaLabel:"work.newTask.acceptanceCriteriaLabel",workNewTaskAcceptanceCriteriaPlaceholder:"work.newTask.acceptanceCriteriaPlaceholder",workNewTaskTitlePlaceholder:"work.newTask.titlePlaceholder",workNewTaskSummaryPlaceholder:"work.newTask.summaryPlaceholder",workNewTaskCancelButton:"work.newTask.cancelButton",workNewTaskCloseLabel:"work.newTask.closeLabel",workNewTaskSubmitLabel:"work.newTask.submitLabel",workNewTaskSubmittingLabel:"work.newTask.submittingLabel",workNewTaskCreateError:"work.newTask.createError",workNewTaskStatusDraft:"work.newTask.status.draft",workNewTaskStatusPendingApproval:"work.newTask.status.pendingApproval",workNewTaskStatusInProgress:"work.newTask.status.inProgress",workNewTaskStatusBlocked:"work.newTask.status.blocked",workNewTaskStatusCompleted:"work.newTask.status.completed",workNewTaskStatusApproved:"work.newTask.status.approved",workNewTaskPriorityUrgent:"work.newTask.priority.urgent",workNewTaskPriorityHigh:"work.newTask.priority.high",workNewTaskPriorityMedium:"work.newTask.priority.medium",workNewTaskPriorityLow:"work.newTask.priority.low",workNewProjectTitle:"work.newProject.title",workNewProjectTitleLabel:"work.newProject.titleLabel",workNewProjectSummaryLabel:"work.newProject.summaryLabel",workNewProjectStatusLabel:"work.newProject.statusLabel",workNewProjectTitlePlaceholder:"work.newProject.titlePlaceholder",workNewProjectSummaryPlaceholder:"work.newProject.summaryPlaceholder",workNewProjectCancelButton:"work.newProject.cancelButton",workNewProjectCloseLabel:"work.newProject.closeLabel",workNewProjectSubmitLabel:"work.newProject.submitLabel",workNewProjectSubmitBusyLabel:"work.newProject.submitBusyLabel",workNewProjectCreateError:"work.newProject.createError",workCrudErrorTitleRequired:"work.crud.error.titleRequired",workCrudErrorInvalidInput:"work.crud.error.invalidInput",workCrudErrorProjectIdRequired:"work.crud.error.projectIdRequired",workCrudErrorWorkItemIdRequired:"work.crud.error.workItemIdRequired",workCrudErrorTaskIdRequired:"work.crud.error.taskIdRequired",workCrudErrorProjectNotFound:"work.crud.error.projectNotFound",workCrudErrorWorkItemNotFound:"work.crud.error.workItemNotFound",workCrudErrorTaskNotFound:"work.crud.error.taskNotFound",workCrudErrorMustBeStringWhenProvided:"work.crud.error.mustBeStringWhenProvided",workCrudErrorMetadataObjectRequired:"work.crud.error.metadataObjectRequired",workCrudErrorFieldStringOrNull:"work.crud.error.fieldStringOrNull",workCrudErrorFieldStringArray:"work.crud.error.fieldStringArray",workCrudErrorMustBeOneOf:"work.crud.error.mustBeOneOf",workItemLoadingTitle:"work.item.loadingTitle",workItemRelatedWorkItemTitle:"work.item.relatedWorkItemTitle",chatNewChatDraftSidePanelTitle:"chat.newChatDraft.sidePanelTitle",chatNewChatDraftGeneratedTitle:"chat.newChatDraft.generatedTitle",chatNewChatDraftGeneratedTitleWithIndex:"chat.newChatDraft.generatedTitleWithIndex",chatComposerErrorChooseTwoParallelChats:"chat.composer.error.chooseTwoParallelChats",chatComposerErrorNoActiveParallelThread:"chat.composer.error.noActiveParallelThread",chatComposerErrorNoParallelChatForSending:"chat.composer.error.noParallelChatForSending",chatComposerErrorNoChatForSending:"chat.composer.error.noChatForSending",chatComposerErrorRelayFailedForChannel:"chat.composer.error.relayFailedForChannel",chatComposerErrorRelayCompareFailed:"chat.composer.error.relayCompareFailed",chatParallelRelayCommandCheckLabel:"chat.parallelRelay.command.check.label",chatParallelRelayCommandCheckShortLabel:"chat.parallelRelay.command.check.shortLabel",chatParallelRelayCommandCheckDescription:"chat.parallelRelay.command.check.description",chatParallelRelayCommandAdoptLabel:"chat.parallelRelay.command.adopt.label",chatParallelRelayCommandAdoptShortLabel:"chat.parallelRelay.command.adopt.shortLabel",chatParallelRelayCommandAdoptDescription:"chat.parallelRelay.command.adopt.description",chatParallelRelayCommandDebateLabel:"chat.parallelRelay.command.debate.label",chatParallelRelayCommandDebateShortLabel:"chat.parallelRelay.command.debate.shortLabel",chatParallelRelayCommandDebateDescription:"chat.parallelRelay.command.debate.description",chatParallelRelayCommandImproveLabel:"chat.parallelRelay.command.improve.label",chatParallelRelayCommandImproveShortLabel:"chat.parallelRelay.command.improve.shortLabel",chatParallelRelayCommandImproveDescription:"chat.parallelRelay.command.improve.description",chatParallelRelayCommandCounterLabel:"chat.parallelRelay.command.counter.label",chatParallelRelayCommandCounterShortLabel:"chat.parallelRelay.command.counter.shortLabel",chatParallelRelayCommandCounterDescription:"chat.parallelRelay.command.counter.description",chatParallelRelayCommandSynthesizeLabel:"chat.parallelRelay.command.synthesize.label",chatParallelRelayCommandSynthesizeShortLabel:"chat.parallelRelay.command.synthesize.shortLabel",chatParallelRelayCommandSynthesizeDescription:"chat.parallelRelay.command.synthesize.description",chatParallelRelayTargetNoChats:"chat.parallelRelay.target.noChats",chatParallelRelayTargetPair:"chat.parallelRelay.target.pair",chatParallelRelayTargetMany:"chat.parallelRelay.target.many",chatParallelRelayOutgoingNote:"chat.parallelRelay.note.outgoing",chatParallelRelayIncomingNote:"chat.parallelRelay.note.incoming",chatParallelRelayPromptHeader:"chat.parallelRelay.prompt.header",chatParallelRelayPromptSourceHeader:"chat.parallelRelay.prompt.sourceHeader",chatParallelRelayPromptSourceLabel:"chat.parallelRelay.prompt.sourceLabel",chatParallelRelayPromptCheckInstructionOne:"chat.parallelRelay.prompt.check.instructionOne",chatParallelRelayPromptCheckInstructionTwo:"chat.parallelRelay.prompt.check.instructionTwo",chatParallelRelayPromptAdoptInstructionOne:"chat.parallelRelay.prompt.adopt.instructionOne",chatParallelRelayPromptAdoptInstructionTwo:"chat.parallelRelay.prompt.adopt.instructionTwo",chatParallelRelayPromptDebateInstructionOne:"chat.parallelRelay.prompt.debate.instructionOne",chatParallelRelayPromptDebateInstructionTwo:"chat.parallelRelay.prompt.debate.instructionTwo",chatParallelRelayPromptImproveInstructionOne:"chat.parallelRelay.prompt.improve.instructionOne",chatParallelRelayPromptImproveInstructionTwo:"chat.parallelRelay.prompt.improve.instructionTwo",chatParallelRelayPromptCounterInstructionOne:"chat.parallelRelay.prompt.counter.instructionOne",chatParallelRelayPromptCounterInstructionTwo:"chat.parallelRelay.prompt.counter.instructionTwo",chatParallelRelayPromptSynthesizeInstructionOne:"chat.parallelRelay.prompt.synthesize.instructionOne",chatParallelRelayPromptSynthesizeInstructionTwo:"chat.parallelRelay.prompt.synthesize.instructionTwo",chatComposerErrorSendFailed:"chat.composer.error.sendFailed",chatComposerErrorRetryFailed:"chat.composer.error.retryFailed",chatComposerErrorStopFailed:"chat.composer.error.stopFailed",chatComposerErrorActiveChatNotInParallelGroup:"chat.composer.error.activeChatNotInParallelGroup",chatComposerErrorSourceChatNotInParallelGroup:"chat.composer.error.sourceChatNotInParallelGroup",chatComposerErrorParallelBranchOutsideGroup:"chat.composer.error.parallelBranchOutsideGroup",chatComposerErrorNoParallelRelayTargets:"chat.composer.error.noParallelRelayTargets",chatComposerErrorMessageNotFound:"chat.composer.error.messageNotFound",chatComposerErrorRetryInvalidSender:"chat.composer.error.retryInvalidSender",chatComposerErrorRetryInProgress:"chat.composer.error.retryInProgress",chatComposerErrorRetryNotLatest:"chat.composer.error.retryNotLatest",chatComposerErrorRetryNotAvailable:"chat.composer.error.retryNotAvailable",chatGovernanceErrorUpdateApproval:"chat.governance.error.updateApproval",chatGovernanceErrorSubmitChoiceResponse:"chat.governance.error.submitChoiceResponse",chatGovernanceErrorRecordOperatorAction:"chat.governance.error.recordOperatorAction",chatParticipantsErrorUpdateParticipant:"chat.participants.error.updateParticipant",chatParticipantsErrorNoFields:"chat.participants.error.noFields",chatParticipantsErrorNotFound:"chat.participants.error.notFound",chatParticipantsErrorTemporaryOnly:"chat.participants.error.temporaryOnly",chatParticipantsErrorNameRequired:"chat.participants.error.nameRequired",chatCatAssignmentCreatedAssignHint:"chat.catAssignment.createdAssignHint",chatCatAssignmentErrorCreateCat:"chat.catAssignment.error.createCat",chatCatAssignmentErrorAssignCat:"chat.catAssignment.error.assignCat",chatCatAssignmentErrorRemoveCat:"chat.catAssignment.error.removeCat",chatCatAssignmentErrorChannelNotFound:"chat.catAssignment.error.channelNotFound",chatCatAssignmentErrorAssignmentNotFound:"chat.catAssignment.error.assignmentNotFound",chatCatAssignmentErrorDirectRecipientOnly:"chat.catAssignment.error.directRecipientOnly",chatCatAssignmentErrorParticipantLimitReached:"chat.catAssignment.error.participantLimitReached",chatCompanionTabStatus:"chat.companion.tab.status",chatCompanionTabSources:"chat.companion.tab.sources",chatCompanionTabMemory:"chat.companion.tab.memory",chatCompanionTabBehavior:"chat.companion.tab.behavior",chatCompanionTabInspector:"chat.companion.tab.inspector",chatCompanionWorkspaceLoadError:"chat.companion.workspace.loadError",sharedExecutionTargetSaveNewChatDefaultsError:"shared.executionTarget.saveNewChatDefaultsError",sharedExecutionTargetSaveChatReplySettingsError:"shared.executionTarget.saveChatReplySettingsError",sharedChannelContinuityStartFreshError:"shared.channelContinuity.startFreshError",sharedSettingsCatsMemorySaveError:"shared.settingsCatsMemory.saveError",sharedSettingsCatsMemoryDeleteError:"shared.settingsCatsMemory.deleteError",sharedSettingsCatsMemoryContentRequired:"shared.settingsCatsMemory.contentRequired",sharedSettingsCatsMemoryInvalidCategory:"shared.settingsCatsMemory.invalidCategory",sharedSettingsCatsMemoryNotFound:"shared.settingsCatsMemory.notFound",sharedOperatorLoopLoadError:"shared.operatorLoop.loadError",sharedFolderBrowserLoadError:"shared.folderBrowser.loadError",sharedOrchestratorFallbackName:"shared.orchestrator.fallbackName",sharedDraftHeaderChangeCoverPhoto:"shared.draftHeader.changeCoverPhoto",sharedDraftHeaderAddCoverPhoto:"shared.draftHeader.addCoverPhoto",sharedDraftHeaderChangeAvatar:"shared.draftHeader.changeAvatar",sharedDraftHeaderAddAvatar:"shared.draftHeader.addAvatar",chatParticipantChipCountOne:"chat.participantChip.countOne",chatParticipantChipCountMany:"chat.participantChip.countMany",chatParticipantChipDefault:"chat.participantChip.default",chatDraftParticipantCapabilityStrongAgent:"chat.draftParticipant.capability.strongAgent",chatDraftParticipantCapabilityConservativeAgent:"chat.draftParticipant.capability.conservativeAgent",chatDraftParticipantReviewReasonBroadWrite:"chat.draftParticipant.reviewReason.broadWrite",chatDraftParticipantReviewReasonOutcomeDelegation:"chat.draftParticipant.reviewReason.outcomeDelegation",chatDraftParticipantReviewReasonHighApproval:"chat.draftParticipant.reviewReason.highApproval",chatDraftParticipantAutonomyNone:"chat.draftParticipant.autonomy.none",chatDraftParticipantAutonomySingleStep:"chat.draftParticipant.autonomy.singleStep",chatDraftParticipantAutonomyMilestonePlan:"chat.draftParticipant.autonomy.milestonePlan",chatDraftParticipantAutonomyOutcomeDelegation:"chat.draftParticipant.autonomy.outcomeDelegation",chatDraftParticipantToolScopeNone:"chat.draftParticipant.toolScope.none",chatDraftParticipantToolScopeReadOnly:"chat.draftParticipant.toolScope.readOnly",chatDraftParticipantToolScopeNarrowWrite:"chat.draftParticipant.toolScope.narrowWrite",chatDraftParticipantToolScopeBroadWrite:"chat.draftParticipant.toolScope.broadWrite",chatDraftParticipantApprovalThresholdLow:"chat.draftParticipant.approvalThreshold.low",chatDraftParticipantApprovalThresholdMedium:"chat.draftParticipant.approvalThreshold.medium",chatDraftParticipantApprovalThresholdHigh:"chat.draftParticipant.approvalThreshold.high",chatDraftParticipantPolicySummary:"chat.draftParticipant.policySummary",chatDraftParticipantToolGrantSummary:"chat.draftParticipant.toolGrantSummary",chatSidebarPrimaryActionNewChat:"chat.sidebar.primaryAction.newChat",chatSidebarPrimaryActionGroupChat:"chat.sidebar.primaryAction.groupChat",chatSidebarPrimaryActionParallelChat:"chat.sidebar.primaryAction.parallelChat",chatSidebarMyCatsEmptyStateLabel:"chat.sidebar.myCatsEmptyStateLabel",chatConcurrentClusterDismissActionLabel:"chat.concurrentCluster.dismissActionLabel",chatConcurrentClusterDismissActionTitle:"chat.concurrentCluster.dismissActionTitle",chatConcurrentToolLabel:"chat.concurrent.toolLabel",chatConcurrentProgressFinalizing:"chat.concurrent.progress.finalizing",chatConcurrentProgressFinishing:"chat.concurrent.progress.finishing",chatConcurrentErrorRuntimeStreamUnavailable:"chat.concurrent.error.runtimeStreamUnavailable",chatConcurrentErrorProxy:"chat.concurrent.error.proxy",chatConcurrentCopyLabeledResponseLabel:"chat.concurrent.copyLabeledResponseLabel",chatConcurrentCopyUnnamedResponseLabel:"chat.concurrent.copyUnnamedResponseLabel",chatFocusRailUnnamedResponseLabel:"chat.focusRail.unnamedResponseLabel",chatFocusRailExpandAnonymousResponseLabel:"chat.focusRail.expandAnonymousResponseLabel",chatFocusRailCollapseAnonymousResponseLabel:"chat.focusRail.collapseAnonymousResponseLabel",chatFocusRailExpandLabeledResponseLabel:"chat.focusRail.expandLabeledResponseLabel",chatFocusRailCollapseLabeledResponseLabel:"chat.focusRail.collapseLabeledResponseLabel",chatActivityFeedEyebrow:"chat.activityFeed.eyebrow",chatActivityFeedLatestUpdatesTitle:"chat.activityFeed.latestUpdatesTitle",chatActivityFeedEmptyState:"chat.activityFeed.emptyState",chatActivityFeedByActorLabel:"chat.activityFeed.byActorLabel",chatMessageChoicesCustomButton:"chat.messageChoices.customButton",chatMessageChoicesCustomPlaceholder:"chat.messageChoices.customPlaceholder",chatMessageChoicesOwnerSkippedState:"chat.messageChoices.ownerSkippedState",chatMessageChoicesOwnerRecordedState:"chat.messageChoices.ownerRecordedState",chatMessageChoicesConfirmButton:"chat.messageChoices.confirmButton",chatMessageChoicesSkipButton:"chat.messageChoices.skipButton",chatParallelFooterNavigationAriaLabel:"chat.parallelFooter.navigationAriaLabel",chatParallelFooterPrevAriaLabel:"chat.parallelFooter.prevAriaLabel",chatParallelFooterNextAriaLabel:"chat.parallelFooter.nextAriaLabel",chatParallelFooterTabsAriaLabel:"chat.parallelFooter.tabsAriaLabel",chatParallelFooterThreadLabel:"chat.parallelFooter.threadLabel",chatParallelFooterDefaultModelLabel:"chat.parallelFooter.defaultModelLabel",chatCompareCardsPrevCardAriaLabel:"chat.compareCards.prevCardAriaLabel",chatCompareCardsNextCardAriaLabel:"chat.compareCards.nextCardAriaLabel",chatCompareCardsPaginationItemAriaLabel:"chat.compareCards.paginationItemAriaLabel",chatTopBarToggleSidePanelAriaLabel:"chat.topBar.toggleSidePanelAriaLabel",chatBootLoadingAria:"chat.boot.loadingAria",chatNewChatDraftSidePanelParticipantsCatsTitle:"chat.newChatDraft.participants.catsTitle",chatNewChatDraftSidePanelParticipantsGroupTitle:"chat.newChatDraft.participants.groupTitle",chatNewChatDraftSidePanelParticipantsEmptyState:"chat.newChatDraft.participants.emptyState",chatNewChatDraftPlanMyDayChipLabel:"chat.newChatDraft.planMyDayChipLabel",chatNewChatDraftPlanMyDayPrompt:"chat.newChatDraft.planMyDayPrompt",chatNewChatDraftBrainstormNameChipLabel:"chat.newChatDraft.brainstormNameChipLabel",chatNewChatDraftBrainstormNamePrompt:"chat.newChatDraft.brainstormNamePrompt",chatNewChatDraftSummarizeLinkChipLabel:"chat.newChatDraft.summarizeLinkChipLabel",chatNewChatDraftSummarizeLinkPrompt:"chat.newChatDraft.summarizeLinkPrompt",chatNewChatDraftPomodoroChipLabel:"chat.newChatDraft.pomodoroChipLabel",chatNewChatDraftPomodoroPrompt:"chat.newChatDraft.pomodoroPrompt",chatNewChatDraftStartProjectChipLabel:"chat.newChatDraft.startProjectChipLabel",chatNewChatDraftStartProjectPrompt:"chat.newChatDraft.startProjectPrompt",chatNewChatDraftSidePanelExecutionTitle:"chat.newChatDraft.execution.title",chatNewChatDraftSidePanelExecutionActionLabel:"chat.newChatDraft.execution.actionLabel",chatNewChatDraftSidePanelExecutionEmptyState:"chat.newChatDraft.execution.emptyState",chatNewChatDraftSidePanelFolderTitle:"chat.newChatDraft.folder.title",chatNewChatDraftSidePanelFolderEmptyState:"chat.newChatDraft.folder.emptyState",chatNewChatDraftDefaultGreeting:"chat.newChatDraft.defaultGreeting",chatNewChatDraftGreetingNap:"chat.newChatDraft.greeting.nap",chatNewChatDraftGreetingKeyboard:"chat.newChatDraft.greeting.keyboard",chatNewChatDraftGreetingLetsGo:"chat.newChatDraft.greeting.letsGo",chatNewChatDraftGreetingStandby:"chat.newChatDraft.greeting.standby",chatNewChatDraftGreetingTaskReady:"chat.newChatDraft.greeting.taskReady",chatNewChatDraftGreetingOnDuty:"chat.newChatDraft.greeting.onDuty",chatNewChatDraftComposerPlaceholder:"chat.newChatDraft.composerPlaceholder",chatNewChatDraftFolderActionLabel:"chat.newChatDraft.folderActionLabel",chatNewChatDraftChooseCodespaceActionLabel:"chat.newChatDraft.chooseCodespaceActionLabel",chatNewChatDraftGroupDraftSelectionLabelSingle:"chat.newChatDraft.groupDraftSelectionLabelSingle",chatNewChatDraftGroupDraftSelectionLabelCount:"chat.newChatDraft.groupDraftSelectionLabelCount",chatNewChatDraftGroupDraftSelectionLabelWithCatsOrAssistants:"chat.newChatDraft.groupDraftSelectionLabelWithCatsOrAssistants",chatNewChatDraftGroupDraftSelectionLabelWithSettings:"chat.newChatDraft.groupDraftSelectionLabelWithSettings",chatNewChatDraftAssistantPresetAdd:"chat.newChatDraft.assistantPresetAdd",chatNewChatDraftAssistantPresetReview:"chat.newChatDraft.assistantPresetReview",chatNewChatDraftAssistantPresetAdded:"chat.newChatDraft.assistantPresetAdded",chatNewChatDraftTemporaryParticipantCancel:"chat.newChatDraft.temporaryParticipantCancel",chatNewChatDraftTemporaryParticipantNameLabel:"chat.newChatDraft.temporaryParticipantNameLabel",chatNewChatDraftTemporaryParticipantNamePlaceholder:"chat.newChatDraft.temporaryParticipantNamePlaceholder",chatNewChatDraftTemporaryParticipantNameHint:"chat.newChatDraft.temporaryParticipantNameHint",chatNewChatDraftTemporaryParticipantSaveName:"chat.newChatDraft.temporaryParticipantSaveName",chatNewChatDraftTemporaryParticipantRename:"chat.newChatDraft.temporaryParticipantRename",chatNewChatDraftTemporaryParticipantRemove:"chat.newChatDraft.temporaryParticipantRemove",chatNewChatDraftTemporaryParticipantRoleHintLabel:"chat.newChatDraft.temporaryParticipantRoleHintLabel",chatNewChatDraftTemporaryParticipantRoleHintPlaceholder:"chat.newChatDraft.temporaryParticipantRoleHintPlaceholder",chatNewChatDraftTemporaryParticipantSubmit:"chat.newChatDraft.temporaryParticipantSubmit",chatNewChatDraftTemporaryParticipantOpenForm:"chat.newChatDraft.temporaryParticipantOpenForm",chatSidePanelTemporaryParticipantLabel:"chat.sidePanel.temporaryParticipantLabel",chatSidePanelRoleLabel:"chat.sidePanel.roleLabel",chatSidePanelAiServiceLabel:"chat.sidePanel.aiServiceLabel",chatSidePanelConnectionLabel:"chat.sidePanel.connectionLabel",chatApprovalQueueEyebrow:"chat.approvalQueue.eyebrow",chatApprovalQueuePendingTitle:"chat.approvalQueue.pendingTitle",chatApprovalQueueEmptyState:"chat.approvalQueue.emptyState",chatApprovalQueueDefaultRequester:"chat.approvalQueue.defaultRequester",chatApprovalQueueDefaultSummary:"chat.approvalQueue.defaultSummary",chatApprovalQueueRequestedByPrefix:"chat.approvalQueue.requestedByPrefix",chatSidePanelStartFresh:"chat.sidePanel.startFresh",chatSidePanelStartingFreshBusy:"chat.sidePanel.startingFreshBusy",chatSidePanelStartFreshHint:"chat.sidePanel.startFreshHint",chatSidePanelRunStatusTitle:"chat.sidePanel.runStatusTitle",chatSidePanelRunStatusUnavailableTitle:"chat.sidePanel.runStatusUnavailableTitle",chatSidePanelLoadingTitle:"chat.sidePanel.loadingTitle",chatSidePanelOperatorLoadingState:"chat.sidePanel.operatorLoadingState",chatCatStatusCompactActiveLabel:"chat.catStatus.compact.activeLabel",chatCatStatusCompactNeedAttentionLabel:"chat.catStatus.compact.needAttentionLabel",chatCatStatusCompactSleepingLabel:"chat.catStatus.compact.sleepingLabel",chatCatStatusActiveLabel:"chat.catStatus.activeLabel",chatCatStatusBlockedLabel:"chat.catStatus.blockedLabel",chatCatStatusWaitingForReviewLabel:"chat.catStatus.waitingForReviewLabel",chatCatStatusErrorLabel:"chat.catStatus.errorLabel",chatCatStatusWakingUpLabel:"chat.catStatus.wakingUpLabel",chatCatStatusSleepingLabel:"chat.catStatus.sleepingLabel",chatCatStatusIdleLabel:"chat.catStatus.idleLabel",chatLifecycleAwakeLabel:"chat.lifecycle.awakeLabel",chatLifecycleWakingUpLabel:"chat.lifecycle.wakingUpLabel",chatLifecycleNeedsAttentionLabel:"chat.lifecycle.needsAttentionLabel",chatLifecycleSleepingLabel:"chat.lifecycle.sleepingLabel",chatCompanionWorkspaceRetryLabel:"chat.companionWorkspace.retryLabel",chatCompanionWorkspaceNoSelectionState:"chat.companionWorkspace.noSelectionState",chatCompanionWorkspaceSubscriptionDisabledTooltip:"chat.companionWorkspace.subscriptionDisabledTooltip",chatCompanionWorkspaceSubscriptionLabel:"chat.companionWorkspace.subscriptionLabel",chatCompanionWorkspaceShareDisabledTooltip:"chat.companionWorkspace.shareDisabledTooltip",chatCompanionWorkspaceShareLabel:"chat.companionWorkspace.shareLabel",chatCompanionWorkspaceSidePanelTitle:"chat.companionWorkspace.sidePanelTitle",chatCompanionFeedTabPosts:"chat.companionFeedTabPosts",chatCompanionFeedTabPhotos:"chat.companionFeedTabPhotos",chatCompanionFeedTabVideos:"chat.companionFeedTabVideos",chatCompanionFeedTabMusic:"chat.companionFeedTabMusic",chatCompanionFeedTabFiles:"chat.companionFeedTabFiles",chatCompanionFeedTabActivity:"chat.companionFeedTabActivity",chatCompanionFeedNavAriaLabel:"chat.companionFeedNavAriaLabel",chatCompanionFeedPostEmptyState:"chat.companionFeedPostEmptyState",chatCompanionFeedMediaEmptyState:"chat.companionFeedMediaEmptyState",chatCompanionFeedMediaItemDefaultLabel:"chat.companionFeedMediaItemDefaultLabel",chatCompanionFeedMediaItemsLabel:"chat.companionFeedMediaItemsLabel",chatCompanionFeedSurfacePhotoLabel:"chat.companionFeedSurfacePhotoLabel",chatCompanionFeedSurfaceVideoLabel:"chat.companionFeedSurfaceVideoLabel",chatCompanionFeedSurfaceMusicLabel:"chat.companionFeedSurfaceMusicLabel",chatCompanionFeedSurfaceFileLabel:"chat.companionFeedSurfaceFileLabel",chatCompanionFeedActivityEmptyState:"chat.companionFeedActivityEmptyState",chatCompanionFeedActivityHiddenState:"chat.companionFeedActivityHiddenState",chatCompanionMessageReferenceListAria:"chat.companionMessageReferenceListAria",chatCompanionMessageReferenceUnsupportedVersionLabel:"chat.companionMessageReferenceUnsupportedVersionLabel",chatCompanionMessageReferenceMalformedLabel:"chat.companionMessageReferenceMalformedLabel",chatCompanionMessageReferenceInvalidWrongScheme:"chat.companionMessageReference.invalidWrongScheme",chatCompanionMessageReferenceInvalidWrongHost:"chat.companionMessageReference.invalidWrongHost",chatCompanionMessageReferenceInvalidMalformedPercentEncoding:"chat.companionMessageReference.invalidMalformedPercentEncoding",chatCompanionMessageReferenceInvalidBadSegmentCount:"chat.companionMessageReference.invalidBadSegmentCount",chatCompanionMessageReferenceInvalidEmptyPathSegment:"chat.companionMessageReference.invalidEmptyPathSegment",chatCompanionMessageReferenceInvalidUnknownTargetType:"chat.companionMessageReference.invalidUnknownTargetType",chatCompanionMessageReferenceLoadingLabel:"chat.companionMessageReferenceLoadingLabel",chatCompanionMessageReferenceUnavailableLabel:"chat.companionMessageReferenceUnavailableLabel",chatCompanionMessageReferenceOpenInCompanionAction:"chat.companionMessageReferenceOpenInCompanionAction",chatCompanionModeToggleDirectLaneAriaLabel:"chat.companionModeToggleDirectLaneAriaLabel",chatCompanionModeToggleChatViewAriaLabel:"chat.companionModeToggleChatViewAriaLabel",chatCompanionModeToggleCompanionViewAriaLabel:"chat.companionModeToggleCompanionViewAriaLabel",chatCompanionResourcesLoadingState:"chat.companionResourcesLoadingState",chatCompanionResourcesSectionTitle:"chat.companionResourcesSectionTitle",chatCompanionResourcesActionShowForm:"chat.companionResourcesActionShowForm",chatCompanionResourcesActionCancel:"chat.companionResourcesActionCancel",chatCompanionResourcesActionAddResource:"chat.companionResourcesActionAddResource",chatCompanionResourcesActionBusy:"chat.companionResourcesActionBusy",chatCompanionResourcesFormTitlePlaceholder:"chat.companionResourcesFormTitlePlaceholder",chatCompanionResourcesFormNotePlaceholder:"chat.companionResourcesFormNotePlaceholder",chatCompanionResourcesFormContentPlaceholder:"chat.companionResourcesFormContentPlaceholder",chatCompanionResourcesEmptyState:"chat.companionResourcesEmptyState",chatCompanionResourcesSourceKindNote:"chat.companionResourcesSourceKindNote",chatCompanionResourcesSourceKindConversationLog:"chat.companionResourcesSourceKindConversationLog",chatCompanionResourcesSourceKindArticle:"chat.companionResourcesSourceKindArticle",chatCompanionResourcesSourceKindImage:"chat.companionResourcesSourceKindImage",chatCompanionResourcesSourceKindVideo:"chat.companionResourcesSourceKindVideo",chatCompanionResourcesSourceKindAudio:"chat.companionResourcesSourceKindAudio",chatCompanionResourcesSourceKindPath:"chat.companionResourcesSourceKindPath",chatCompanionResourcesSourceKindUnknown:"chat.companionResourcesSourceKindUnknown",chatCompanionResourcesUntitledSource:"chat.companionResourcesUntitledSource",chatCompanionResourcesActionRemove:"chat.companionResourcesActionRemove",chatCompanionSettingsLoadingState:"chat.companionSettingsLoadingState",chatCompanionSettingsResponseProfileTitle:"chat.companionSettingsResponseProfileTitle",chatCompanionSettingsExpressionModeLabel:"chat.companionSettingsExpressionModeLabel",chatCompanionSettingsExpressionModeAnimalistic:"chat.companionSettingsExpressionModeAnimalistic",chatCompanionSettingsExpressionModeAnthropomorphic:"chat.companionSettingsExpressionModeAnthropomorphic",chatCompanionSettingsExpressionModeMixed:"chat.companionSettingsExpressionModeMixed",chatCompanionSettingsOutputModeLabel:"chat.companionSettingsOutputModeLabel",chatCompanionSettingsOutputModeText:"chat.companionSettingsOutputModeText",chatCompanionSettingsOutputModeAudioClip:"chat.companionSettingsOutputModeAudioClip",chatCompanionSettingsOutputModeTts:"chat.companionSettingsOutputModeTts",chatCompanionSettingsOutputModeMixed:"chat.companionSettingsOutputModeMixed",chatCompanionSettingsResponseNotesLabel:"chat.companionSettingsResponseNotesLabel",chatCompanionSettingsResponseNotesPlaceholder:"chat.companionSettingsResponseNotesPlaceholder",chatCompanionSettingsResponseNotesSave:"chat.companionSettingsResponseNotesSave",chatCompanionSettingsResponseNotesSaving:"chat.companionSettingsResponseNotesSaving",chatCompanionSettingsTelegramBindingTitle:"chat.companionSettingsTelegramBindingTitle",chatCompanionSettingsTelegramBindingBotLabel:"chat.companionSettingsTelegramBindingBotLabel",chatCompanionSettingsTelegramBindingModeLabel:"chat.companionSettingsTelegramBindingModeLabel",chatCompanionSettingsTelegramBindingConnected:"chat.companionSettingsTelegramBindingConnected",chatCompanionSettingsTelegramBindingDefaultMode:"chat.companionSettingsTelegramBindingDefaultMode",chatCompanionSettingsTelegramBindingManageHint:"chat.companionSettingsTelegramBindingManageHint",chatCompanionSettingsTelegramBindingSettingsLabel:"chat.companionSettingsTelegramBindingSettingsLabel",chatCompanionSettingsTelegramBindingSuffix:"chat.companionSettingsTelegramBindingSuffix",chatCompanionSettingsNoTelegramBindingState:"chat.companionSettingsNoTelegramBindingState",chatCompanionOverviewLoadingState:"chat.companionOverviewLoadingState",chatCompanionOverviewPresenceTitle:"chat.companionOverviewPresenceTitle",chatCompanionOverviewPresenceWakeButton:"chat.companionOverviewPresenceWakeButton",chatCompanionOverviewPresenceSleepButton:"chat.companionOverviewPresenceSleepButton",chatCompanionOverviewSummaryTitle:"chat.companionOverviewSummaryTitle",chatCompanionOverviewSummaryResourceLabel:"chat.companionOverviewSummaryResourceLabel",chatCompanionOverviewSummaryCreationLabel:"chat.companionOverviewSummaryCreationLabel",chatCompanionOverviewSummaryMemoryLabel:"chat.companionOverviewSummaryMemoryLabel",chatCompanionOverviewRecentMemoriesTitle:"chat.companionOverviewRecentMemoriesTitle",chatCompanionOverviewEmptyState:"chat.companionOverviewEmptyState",chatCompanionMemoryLoadingState:"chat.companionMemoryLoadingState",chatCompanionMemorySectionTitle:"chat.companionMemorySectionTitle",chatCompanionMemoryActionAdd:"chat.companionMemoryActionAdd",chatCompanionMemoryActionCancel:"chat.companionMemoryActionCancel",chatCompanionMemoryFormPlaceholder:"chat.companionMemoryFormPlaceholder",chatCompanionMemoryActionBusy:"chat.companionMemoryActionBusy",chatCompanionMemoryActionAddSubmit:"chat.companionMemoryActionAddSubmit",chatCompanionMemoryFilterAll:"chat.companionMemoryFilterAll",chatCompanionMemoryCategoryIdentity:"chat.companionMemoryCategoryIdentity",chatCompanionMemoryCategoryPreference:"chat.companionMemoryCategoryPreference",chatCompanionMemoryCategoryRelationship:"chat.companionMemoryCategoryRelationship",chatCompanionMemoryCategoryFact:"chat.companionMemoryCategoryFact",chatCompanionMemoryCategoryEvent:"chat.companionMemoryCategoryEvent",chatCompanionMemoryCategoryOwnerNote:"chat.companionMemoryCategoryOwnerNote",chatCompanionMemoryEmptyState:"chat.companionMemoryEmptyState",chatCompanionMemoryEmptyFilterState:"chat.companionMemoryEmptyFilterState",chatCompanionMemoryActionRemove:"chat.companionMemoryActionRemove",chatCompanionMessageReferenceAvailabilityLivePreview:"chat.companionMessageReferenceAvailabilityLivePreview",chatCompanionMessageReferenceAvailabilityMissing:"chat.companionMessageReferenceAvailabilityMissing",chatCompanionMessageReferenceAvailabilityDeleted:"chat.companionMessageReferenceAvailabilityDeleted",chatCompanionMessageReferenceAvailabilityInaccessible:"chat.companionMessageReferenceAvailabilityInaccessible",chatCompanionMessageReferenceMissingFallbackTitle:"chat.companionMessageReferenceMissingFallbackTitle",chatCompanionMessageReferenceDeletedFallbackTitle:"chat.companionMessageReferenceDeletedFallbackTitle",chatCompanionMessageReferenceInaccessibleFallbackTitle:"chat.companionMessageReferenceInaccessibleFallbackTitle",chatCompanionMessageReferenceInaccessibleFallbackDescription:"chat.companionMessageReferenceInaccessibleFallbackDescription",chatCompanionMessageReferenceUnknownCompanionLabel:"chat.companionMessageReferenceUnknownCompanionLabel",chatCompanionMessageReferenceUntitledPostTitle:"chat.companionMessageReferenceUntitledPostTitle",chatCompanionMessageReferenceUntitledSourceTitle:"chat.companionMessageReferenceUntitledSourceTitle",chatNewChatDraftBranchPolicyWorkspaceWorktree:"chat.newChatDraft.branchPolicyWorkspaceWorktree",chatNewChatDraftBranchPolicyWorkspaceSource:"chat.newChatDraft.branchPolicyWorkspaceSource",chatNewChatDraftBranchPolicyWorkspaceSandbox:"chat.newChatDraft.branchPolicyWorkspaceSandbox",chatNewChatDraftBranchPolicyAccessReadOnly:"chat.newChatDraft.branchPolicyAccessReadOnly",chatNewChatDraftBranchPolicyAccessFull:"chat.newChatDraft.branchPolicyAccessFull",chatNewChatDraftBranchPolicyRelinkAria:"chat.newChatDraft.branchPolicyRelinkAria",chatNewChatDraftBranchPolicyDetachAria:"chat.newChatDraft.branchPolicyDetachAria",chatNewChatDraftBranchPolicyFollowsLeadLabel:"chat.newChatDraft.branchPolicyFollowsLeadLabel",chatNewChatDraftBranchFolderRelinkAria:"chat.newChatDraft.branchFolderRelinkAria",chatNewChatDraftBranchFolderChooseAria:"chat.newChatDraft.branchFolderChooseAria",chatNewChatDraftBranchFollowsLeadLabel:"chat.newChatDraft.branchFollowsLeadLabel",chatNewChatDraftBranchPromptJumpToLeadTitle:"chat.newChatDraft.branchPromptJumpToLeadTitle",chatNewChatDraftBranchPromptJumpToLeadAria:"chat.newChatDraft.branchPromptJumpToLeadAria",chatNewChatDraftBranchAttachAria:"chat.newChatDraft.branchAttachAria",chatNewChatDraftBranchCollaborateAria:"chat.newChatDraft.branchCollaborateAria",chatNewChatDraftBranchRemoveAria:"chat.newChatDraft.branchRemoveAria",chatNewChatDraftBranchAddParallelAria:"chat.newChatDraft.branchAddParallelAria",chatNewChatDraftBranchAddCompareHint:"chat.newChatDraft.branchAddCompareHint",chatNewChatDraftBranchAttachmentOverrideError:"chat.newChatDraft.branchAttachmentOverrideError",chatNewChatDraftCollaborateAria:"chat.newChatDraft.collaborateAria",chatNewChatDraftCollaborateHint:"chat.newChatDraft.collaborateHint",chatNewChatDraftRemoveFolderAria:"chat.newChatDraft.removeFolderAria",chatNewChatDraftAttachmentRemoveAria:"chat.newChatDraft.attachmentRemoveAria",chatNewChatDraftAddPhotosAndFiles:"chat.newChatDraft.addPhotosAndFiles",chatNewChatDraftTakeScreenshot:"chat.newChatDraft.takeScreenshot",sharedScreenshotCaptureTooltipDesktopRegion:"shared.screenshotCapture.tooltipDesktopRegion",sharedScreenshotCaptureTooltipWebPicker:"shared.screenshotCapture.tooltipWebPicker",sharedScreenshotCaptureTooltipUnavailable:"shared.screenshotCapture.tooltipUnavailable",sharedScreenshotCapturePermissionRequired:"shared.screenshotCapture.permissionRequired",sharedScreenshotCapturePermissionStatusUnknown:"shared.screenshotCapture.permissionStatusUnknown",sharedScreenshotCaptureFailed:"shared.screenshotCapture.failed",sharedScreenshotCaptureFrameLoadFailed:"shared.screenshotCapture.frameLoadFailed",sharedScreenshotCaptureFrameEmpty:"shared.screenshotCapture.frameEmpty",sharedScreenshotCaptureCanvasPrepareFailed:"shared.screenshotCapture.canvasPrepareFailed",sharedScreenshotCaptureEncodeFailed:"shared.screenshotCapture.encodeFailed",sharedScreenshotCaptureDownscaleFailed:"shared.screenshotCapture.downscaleFailed",sharedScreenshotCaptureDisplayUnavailable:"shared.screenshotCapture.displayUnavailable",sharedScreenshotCaptureRegionUnsupported:"shared.screenshotCapture.regionUnsupported",sharedScreenshotCaptureNoDisplays:"shared.screenshotCapture.noDisplays",sharedScreenshotCaptureWlrootsSessionUnsupported:"shared.screenshotCapture.wlrootsSessionUnsupported",sharedScreenshotCaptureWlrootsToolsRequired:"shared.screenshotCapture.wlrootsToolsRequired",sharedScreenshotCaptureWlrootsSelectionParseFailed:"shared.screenshotCapture.wlrootsSelectionParseFailed",sharedArtifactCanvasTitle:"shared.artifactCanvas.title",sharedArtifactCanvasLoading:"shared.artifactCanvas.loading",sharedArtifactCanvasLoadFailed:"shared.artifactCanvas.loadFailed",sharedArtifactCanvasInvalidRoute:"shared.artifactCanvas.invalidRoute",sharedArtifactCanvasClose:"shared.artifactCanvas.close",sharedArtifactCanvasCollapse:"shared.artifactCanvas.collapse",sharedArtifactCanvasExpand:"shared.artifactCanvas.expand",sharedArtifactCanvasRefresh:"shared.artifactCanvas.refresh",sharedArtifactCanvasOpenExternal:"shared.artifactCanvas.openExternal",sharedArtifactCanvasResizePane:"shared.artifactCanvas.resizePane",sharedArtifactCanvasUnsupportedTitle:"shared.artifactCanvas.unsupportedTitle",sharedArtifactCanvasUnsupportedBody:"shared.artifactCanvas.unsupportedBody",sharedArtifactCanvasPolicyVersion:"shared.artifactCanvas.policyVersion",chatNewChatDraftCancelSendAria:"chat.newChatDraft.cancelSendAria",chatNewChatDraftSendAria:"chat.newChatDraft.sendAria",chatNewChatDraftSendAllChatsAria:"chat.newChatDraft.sendAllChatsAria",chatNewChatDraftStartVoiceInputAria:"chat.newChatDraft.startVoiceInputAria",chatNewChatDraftStopVoiceInputAria:"chat.newChatDraft.stopVoiceInputAria",chatAudienceRemoveParticipantAria:"chat.audience.removeParticipantAria",chatAudienceRemoveParticipantFromAudienceAria:"chat.audience.removeParticipantFromAudienceAria",sharedVoiceInputErrorNotAllowed:"shared.voiceInput.error.notAllowed",sharedVoiceInputErrorServiceNotAllowed:"shared.voiceInput.error.serviceNotAllowed",sharedVoiceInputErrorAudioCapture:"shared.voiceInput.error.audioCapture",sharedVoiceInputErrorNetwork:"shared.voiceInput.error.network",sharedVoiceInputErrorLanguageNotSupported:"shared.voiceInput.error.languageNotSupported",sharedVoiceInputErrorPermissionDenied:"shared.voiceInput.error.permissionDenied",sharedVoiceInputErrorPermissionNotDetermined:"shared.voiceInput.error.permissionNotDetermined",sharedVoiceInputErrorMicUnavailable:"shared.voiceInput.error.micUnavailable",sharedVoiceInputErrorEngineUnavailable:"shared.voiceInput.error.engineUnavailable",sharedVoiceInputErrorHelperCrashed:"shared.voiceInput.error.helperCrashed",sharedVoiceInputFailedWithKind:"shared.voiceInput.failedWithKind",sharedVoiceInputPrivacyUnknown:"shared.voiceInput.privacyUnknown",sharedVoiceInputPrivacyCloud:"shared.voiceInput.privacyCloud",chatDraftCompareCarouselAriaLabel:"chat.draftCompareCarousel.ariaLabel",chatDraftCompareCarouselPreviousBranchAria:"chat.draftCompareCarousel.previousBranchAria",chatDraftCompareCarouselNextBranchAria:"chat.draftCompareCarousel.nextBranchAria",chatDraftCompareCarouselSelectBranchAria:"chat.draftCompareCarousel.selectBranchAria",chatDraftCompareCarouselGoToBranchAria:"chat.draftCompareCarousel.goToBranchAria",chatComposerAreaAttachAria:"chat.composerArea.attachAria",chatComposerAreaPlaceholderParallelWaiting:"chat.composerArea.placeholderParallelWaiting",chatComposerAreaPlaceholderReply:"chat.composerArea.placeholderReply",chatComposerAreaScrollToLatestAria:"chat.composerArea.scrollToLatestAria",chatComposerAreaStopButtonLabel:"chat.composerArea.stopButtonLabel",chatComposerAreaSwitchSendModeLabel:"chat.composerArea.switchSendModeLabel",chatComposerAreaSendToThisChatAria:"chat.composerArea.sendToThisChatAria",chatActivityEyebrow:"chat.activityEyebrow",chatActivityLatestUpdatesHeading:"chat.activityLatestUpdatesHeading",chatActivityEmptyState:"chat.activityEmptyState",chatActivityByActor:"chat.activityByActor",chatParticipantsSectionNameLabel:"chat.participantsSectionNameLabel",chatParticipantsSectionSaveNameButton:"chat.participantsSectionSaveNameButton",chatParticipantsSectionCancelButton:"chat.participantsSectionCancelButton",chatParticipantsSectionRenameButton:"chat.participantsSectionRenameButton",chatParticipantsSectionNoParticipants:"chat.participantsSectionNoParticipants",chatParticipantsSectionChooseCatsButton:"chat.participantsSectionChooseCatsButton",chatTranscriptMessageCheckWithOthersLabel:"chat.transcriptMessageCheckWithOthersLabel",chatTranscriptMessageSynthesizeWithOthersLabel:"chat.transcriptMessageSynthesizeWithOthersLabel",chatTranscriptMessageImproveWithOthersLabel:"chat.transcriptMessageImproveWithOthersLabel",chatTranscriptMessageAdoptWithOthersLabel:"chat.transcriptMessageAdoptWithOthersLabel",chatTranscriptMessageCounterWithOthersLabel:"chat.transcriptMessageCounterWithOthersLabel",chatTranscriptMessageDebateWithOthersLabel:"chat.transcriptMessageDebateWithOthersLabel",chatTranscriptMessageCopyLabel:"chat.transcriptMessageCopyLabel",chatTranscriptMessageRetryResponseLabel:"chat.transcriptMessageRetryResponseLabel",chatTranscriptMessageRelayToOthersLabel:"chat.transcriptMessageRelayToOthersLabel",chatTranscriptMessageFailedStatusLabel:"chat.transcriptMessageFailedStatusLabel",chatProductIntentAckUnsupportedDirectAudience:"chat.productIntent.ack.unsupportedDirectAudience",chatProductIntentAckUnsupportedContext:"chat.productIntent.ack.unsupportedContext",chatProductIntentAckChatActive:"chat.productIntent.ack.chatActive",chatProductIntentAckWorkHumanGate:"chat.productIntent.ack.workHumanGate",chatProductIntentAckWorkStrongAnchor:"chat.productIntent.ack.workStrongAnchor",chatProductIntentAckWorkClarify:"chat.productIntent.ack.workClarify",chatProductIntentAckCodeHumanGate:"chat.productIntent.ack.codeHumanGate",chatProductIntentAckCodeStrongAnchor:"chat.productIntent.ack.codeStrongAnchor",chatProductIntentAckCodeClarify:"chat.productIntent.ack.codeClarify",chatProductIntentHumanGateDraftSummaryFallback:"chat.productIntent.humanGate.draftSummaryFallback",chatProductIntentHumanGateContinueClarifying:"chat.productIntent.humanGate.continueClarifying",chatProductIntentHumanGateOpenWorkItems:"chat.productIntent.humanGate.openWorkItems",chatProductIntentHumanGateSwitchCat:"chat.productIntent.humanGate.switchCat",chatProductIntentHumanGateQuestion:"chat.productIntent.humanGate.question",chatProductIntentDraftTitleWork:"chat.productIntent.draft.title.work",chatProductIntentDraftTitleCode:"chat.productIntent.draft.title.code",chatProductIntentDraftSummary:"chat.productIntent.draft.summary",chatProductIntentDraftGoalFallback:"chat.productIntent.draft.goalFallback",chatProductIntentDraftSuccessCriteria:"chat.productIntent.draft.successCriteria",chatProductIntentDraftOutOfScope:"chat.productIntent.draft.outOfScope",chatProductIntentDraftOpenQuestion:"chat.productIntent.draft.openQuestion",chatImplicitProductIntentSuggestionWork:"chat.implicitProductIntent.suggestion.work",chatImplicitProductIntentSuggestionCode:"chat.implicitProductIntent.suggestion.code",chatImplicitProductIntentQuestion:"chat.implicitProductIntent.question",chatImplicitProductIntentConfirmWork:"chat.implicitProductIntent.confirm.work",chatImplicitProductIntentConfirmCode:"chat.implicitProductIntent.confirm.code",chatImplicitProductIntentDecline:"chat.implicitProductIntent.decline",chatImplicitProductIntentConfirmedWork:"chat.implicitProductIntent.confirmed.work",chatImplicitProductIntentConfirmedCode:"chat.implicitProductIntent.confirmed.code",chatImplicitProductIntentDeclined:"chat.implicitProductIntent.declined",chatImplicitProductIntentExpired:"chat.implicitProductIntent.expired",sharedAddCatPanelTitle:"shared.addCatPanelTitle",sharedAddCatPanelClose:"shared.addCatPanelClose",sharedAddCatPanelChooseExisting:"shared.addCatPanelChooseExisting",sharedAddCatPanelCreateNew:"shared.addCatPanelCreateNew",sharedAddCatPanelAdding:"shared.addCatPanelAdding",sharedAddCatPanelRemoving:"shared.addCatPanelRemoving",sharedAddCatPanelRemove:"shared.addCatPanelRemove",sharedAddCatPanelAdd:"shared.addCatPanelAdd",sharedAddCatPanelNoOtherCats:"shared.addCatPanelNoOtherCats",sharedAddCatPanelAllCatsInChat:"shared.addCatPanelAllCatsInChat",sharedAddCatPanelNameLabel:"shared.addCatPanelNameLabel",sharedAddCatPanelNamePlaceholder:"shared.addCatPanelNamePlaceholder",sharedAddCatPanelSaving:"shared.addCatPanelSaving",sharedAddCatPanelCreateAndAdd:"shared.addCatPanelCreateAndAdd",sharedAddCatPanelCreateAndAddToChat:"shared.addCatPanelCreateAndAddToChat",telegramCommandStartDescription:"telegram.command.start.description",telegramCommandHelpDescription:"telegram.command.help.description",telegramCommandCommandsDescription:"telegram.command.commands.description",telegramCommandStatusDescription:"telegram.command.status.description",telegramCommandOpenDescription:"telegram.command.open.description",telegramCommandModeDescription:"telegram.command.mode.description",telegramCommandChatDescription:"telegram.command.chat.description",telegramCommandWorkDescription:"telegram.command.work.description",telegramCommandCodeDescription:"telegram.command.code.description",telegramCommandHelpText:"telegram.command.help.text",telegramCommandModeCompanion:"telegram.command.mode.companion",telegramCommandModeAgent:"telegram.command.mode.agent",telegramCommandStartGreetingBound:"telegram.command.start.greetingBound",telegramCommandStartGreetingUnbound:"telegram.command.start.greetingUnbound",telegramCommandStatusBotLine:"telegram.command.status.botLine",telegramCommandStatusLinkedCatLine:"telegram.command.status.linkedCatLine",telegramCommandStatusModeLine:"telegram.command.status.modeLine",telegramCommandStatusInboundLine:"telegram.command.status.inboundLine",telegramCommandStatusChatLine:"telegram.command.status.chatLine",telegramCommandStatusConnectedLine:"telegram.command.status.connectedLine",telegramCommandOpenReply:"telegram.command.open.reply",telegramCommandModeNotConfigurable:"telegram.command.mode.notConfigurable",telegramCommandModeCurrent:"telegram.command.mode.current",telegramCommandModeUnknown:"telegram.command.mode.unknown",telegramCommandModeSwitchUnavailable:"telegram.command.mode.switchUnavailable",telegramCommandModeSwitched:"telegram.command.mode.switched",telegramCommandUnknownCommand:"telegram.command.unknownCommand",sharedOperatorNoTimestamp:"shared.operator.noTimestamp",sharedOperatorRunStatusRunning:"shared.operator.runStatus.running",sharedOperatorRunStatusBlocked:"shared.operator.runStatus.blocked",sharedOperatorRunStatusCompleted:"shared.operator.runStatus.completed",sharedOperatorRunStatusFailed:"shared.operator.runStatus.failed",sharedOperatorRunStatusCancelled:"shared.operator.runStatus.cancelled",sharedOperatorRunStatusQueued:"shared.operator.runStatus.queued",sharedOperatorBranchStatusPending:"shared.operator.branchStatus.pending",sharedOperatorBranchStatusRunning:"shared.operator.branchStatus.running",sharedOperatorBranchStatusCompleted:"shared.operator.branchStatus.completed",sharedOperatorBranchStatusFailed:"shared.operator.branchStatus.failed",sharedOperatorBranchStatusBlocked:"shared.operator.branchStatus.blocked",sharedOperatorBranchStatusCancelled:"shared.operator.branchStatus.cancelled",sharedOperatorBranchStatusWaitingForConverge:"shared.operator.branchStatus.waitingForConverge",sharedOperatorCheckpointStatusCompleted:"shared.operator.checkpointStatus.completed",sharedOperatorCheckpointStatusCancelled:"shared.operator.checkpointStatus.cancelled",sharedOperatorCheckpointStatusOpen:"shared.operator.checkpointStatus.open",sharedOperatorOutcomeStatusSucceeded:"shared.operator.outcomeStatus.succeeded",sharedOperatorOutcomeStatusBlocked:"shared.operator.outcomeStatus.blocked",sharedOperatorOutcomeStatusFailed:"shared.operator.outcomeStatus.failed",sharedOperatorOutcomeStatusCancelled:"shared.operator.outcomeStatus.cancelled",sharedOperatorTraceKindApproval:"shared.operator.traceKind.approval",sharedOperatorTraceKindCheckpoint:"shared.operator.traceKind.checkpoint",sharedOperatorTraceKindDispatch:"shared.operator.traceKind.dispatch",sharedOperatorTraceKindError:"shared.operator.traceKind.error",sharedOperatorTraceKindOutcome:"shared.operator.traceKind.outcome",sharedOperatorTraceKindStatus:"shared.operator.traceKind.status",sharedOperatorTraceKindNote:"shared.operator.traceKind.note",sharedOperatorActivityLabelRecovery:"shared.operator.activity.label.recovery",sharedOperatorActivityLabelReplay:"shared.operator.activity.label.replay",sharedOperatorActivityLabelDecision:"shared.operator.activity.label.decision",sharedOperatorActivityLabelAction:"shared.operator.activity.label.action",sharedOperatorActivityLabelArtifact:"shared.operator.activity.label.artifact",sharedOperatorActivityLabelUpdate:"shared.operator.activity.label.update",sharedOperatorActivityLabelTrace:"shared.operator.activity.label.trace",sharedOperatorEyebrowInspector:"shared.operator.eyebrow.inspector",sharedOperatorRunInspectorTitle:"shared.operator.runInspector.title",sharedOperatorRunInspectorNoHistory:"shared.operator.runInspector.noHistory",sharedOperatorRunInspectorSummaryFallback:"shared.operator.runInspector.summaryFallback",sharedOperatorMetaStarted:"shared.operator.meta.started",sharedOperatorMetaUpdated:"shared.operator.meta.updated",sharedOperatorMetaStage:"shared.operator.meta.stage",sharedOperatorWorkflowStageBlocked:"shared.operator.workflowStage.blocked",sharedOperatorWorkflowStageConcurrentFanOut:"shared.operator.workflowStage.concurrentFanOut",sharedOperatorWorkflowStageContinuationHandoff:"shared.operator.workflowStage.continuationHandoff",sharedOperatorWorkflowStageConvergeReview:"shared.operator.workflowStage.convergeReview",sharedOperatorWorkflowStageDispatch:"shared.operator.workflowStage.dispatch",sharedOperatorWorkflowStageInitialDispatch:"shared.operator.workflowStage.initialDispatch",sharedOperatorWorkflowStageRuntimeError:"shared.operator.workflowStage.runtimeError",sharedOperatorWorkflowStageStartupRecovery:"shared.operator.workflowStage.startupRecovery",sharedOperatorWorkflowStageTurnCompleted:"shared.operator.workflowStage.turnCompleted",sharedOperatorMetaShape:"shared.operator.meta.shape",sharedOperatorMetaReviewRequired:"shared.operator.meta.reviewRequired",sharedOperatorMetaGuardrail:"shared.operator.meta.guardrail",sharedOperatorMetaCooldown:"shared.operator.meta.cooldown",sharedOperatorGuardMaxContinuations:"shared.operator.guard.maxContinuations",sharedOperatorGuardMaxDispatches:"shared.operator.guard.maxDispatches",sharedOperatorGuardMaxTargetVisits:"shared.operator.guard.maxTargetVisits",sharedOperatorGuardAntiPingPong:"shared.operator.guard.antiPingPong",sharedOperatorCooldownActive:"shared.operator.cooldown.active",sharedOperatorSectionTrace:"shared.operator.section.trace",sharedOperatorSectionCheckpoints:"shared.operator.section.checkpoints",sharedOperatorNoCheckpointsRecorded:"shared.operator.noCheckpointsRecorded",sharedOperatorCheckpointSummaryFallback:"shared.operator.checkpointSummaryFallback",sharedOperatorSectionBranches:"shared.operator.section.branches",sharedOperatorNoBranchesRecorded:"shared.operator.noBranchesRecorded",sharedOperatorBranchHandoff:"shared.operator.branch.handoff",sharedOperatorBranchStrategy:"shared.operator.branch.strategy",sharedOperatorBranchStrategyForkIfPossible:"shared.operator.branchStrategy.forkIfPossible",sharedOperatorBranchStrategyFreshNoParent:"shared.operator.branchStrategy.freshNoParent",sharedOperatorBranchStrategySingleTargetReview:"shared.operator.branchStrategy.singleTargetReview",sharedOperatorBranchStrategyTransplantContext:"shared.operator.branchStrategy.transplantContext",sharedOperatorBranchHandoffExplicitMention:"shared.operator.branchHandoff.explicitMention",sharedOperatorBranchHandoffOperatorReroute:"shared.operator.branchHandoff.operatorReroute",sharedOperatorBranchHandoffRoomDefault:"shared.operator.branchHandoff.roomDefault",sharedOperatorBranchHandoffRoomEntry:"shared.operator.branchHandoff.roomEntry",sharedOperatorBranchHandoffRuntimeRetry:"shared.operator.branchHandoff.runtimeRetry",sharedOperatorBranchHandoffWorkflowContinuation:"shared.operator.branchHandoff.workflowContinuation",sharedOperatorBranchFromCheckpoint:"shared.operator.branch.fromCheckpoint",sharedOperatorBranchNoLineage:"shared.operator.branch.noLineage",sharedOperatorSectionOutcomes:"shared.operator.section.outcomes",sharedOperatorNoOutcomesRecorded:"shared.operator.noOutcomesRecorded",sharedOperatorOutcomeSummaryFallback:"shared.operator.outcomeSummaryFallback",sharedOperatorEyebrowProgress:"shared.operator.eyebrow.progress",sharedOperatorRunStatusTitle:"shared.operator.runStatus.title",sharedOperatorNoActiveRun:"shared.operator.noActiveRun",sharedOperatorProgressSummaryFallback:"shared.operator.progressSummaryFallback",sharedOperatorMetricDispatches:"shared.operator.metric.dispatches",sharedOperatorMetricContinuations:"shared.operator.metric.continuations",sharedOperatorMetricTargets:"shared.operator.metric.targets",sharedOperatorApprovalPendingSingular:"shared.operator.approvalPending.singular",sharedOperatorApprovalPendingPlural:"shared.operator.approvalPending.plural",sharedOperatorDeliveryLabel:"shared.operator.meta.delivery",sharedOperatorGatesLabel:"shared.operator.meta.gates",sharedOperatorBudgetLabel:"shared.operator.meta.budget",sharedOperatorDeliveryModeArtifactOnly:"shared.operator.deliveryMode.artifactOnly",sharedOperatorDeliveryModeCommitOnly:"shared.operator.deliveryMode.commitOnly",sharedOperatorDeliveryModeDeployPreview:"shared.operator.deliveryMode.deployPreview",sharedOperatorDeliveryModePrWithChecks:"shared.operator.deliveryMode.prWithChecks",sharedOperatorDeliveryModePushBranch:"shared.operator.deliveryMode.pushBranch",sharedOperatorGateManualReviewRequired:"shared.operator.deliveryGate.manualReviewRequired",sharedOperatorGateOwnerApprovalRequired:"shared.operator.deliveryGate.ownerApprovalRequired",sharedOperatorGatePublishArtifactRequired:"shared.operator.deliveryGate.publishArtifactRequired",sharedOperatorBudgetLevelNormal:"shared.operator.budgetLevel.normal",sharedOperatorBudgetLevelWarning:"shared.operator.budgetLevel.warning",sharedOperatorBudgetLevelBlocked:"shared.operator.budgetLevel.blocked",sharedOperatorWorkflowShapeSequential:"shared.operator.workflowShape.sequential",sharedOperatorWorkflowShapeConcurrent:"shared.operator.workflowShape.concurrent",sharedOperatorWorkflowShapeConverge:"shared.operator.workflowShape.converge",sharedOperatorInspectRunButton:"shared.operator.inspectRunButton",sharedOperatorNoTraceRecords:"shared.operator.noTraceRecords",sharedOperatorActionRequestRetry:"shared.operator.action.requestRetry",sharedOperatorActionRetryAgain:"shared.operator.action.retryAgain",sharedOperatorActionRetrying:"shared.operator.action.retrying",sharedOperatorActionRetryRequested:"shared.operator.action.retryRequested",sharedOperatorActionAcknowledge:"shared.operator.action.acknowledge",sharedOperatorActionAcknowledged:"shared.operator.action.acknowledged",sharedOperatorActionRetryDescription:"shared.operator.action.retryDescription",sharedOperatorActionReplayStoredDispatchDescription:"shared.operator.action.replayStoredDispatchDescription",sharedOperatorActionRetryTaskDescription:"shared.operator.action.retryTaskDescription",sharedOperatorActionRetryFailedDescription:"shared.operator.action.retryFailedDescription",sharedOperatorActionAcknowledgeDescription:"shared.operator.action.acknowledgeDescription",sharedOperatorActionAcknowledgeBlockedDescription:"shared.operator.action.acknowledgeBlockedDescription",sharedOperatorActionStatusRetryInProgress:"shared.operator.action.status.retryInProgress",sharedOperatorActionStatusRetryFailed:"shared.operator.action.status.retryFailed",sharedOperatorActionStatusRetryFailedWithError:"shared.operator.action.status.retryFailedWithError",sharedOperatorActionStatusRetryDispatched:"shared.operator.action.status.retryDispatched",sharedOperatorActionStatusRetryRequested:"shared.operator.action.status.retryRequested",sharedOperatorActionStatusAcknowledged:"shared.operator.action.status.acknowledged",sharedAudiencePopoverHeader:"shared.audience.popoverHeader",sharedAudienceSelectAudienceLabel:"shared.audience.selectAudienceLabel",sharedAudienceWorkflowSequential:"shared.audience.workflowSequential",sharedAudienceWorkflowConcurrent:"shared.audience.workflowConcurrent",sharedAudienceSwitchToSequentialModeLabel:"shared.audience.switchToSequentialModeLabel",sharedAudienceSwitchToConcurrentModeLabel:"shared.audience.switchToConcurrentModeLabel",sharedWorkspaceModeCurrentLabel:"shared.workspaceMode.currentLabel",sharedWorkspaceModeWorktreeLabel:"shared.workspaceMode.worktreeLabel",sharedWorkspaceModeCurrentTooltip:"shared.workspaceMode.currentTooltip",sharedWorkspaceModeWorktreeTooltip:"shared.workspaceMode.worktreeTooltip",sharedTelegramConnectDialogTitle:"shared.telegramConnectDialog.title",sharedTelegramConnectBotUsernameLabel:"shared.telegramConnectDialog.botUsernameLabel",sharedTelegramConnectBotUsernamePlaceholder:"shared.telegramConnectDialog.botUsernamePlaceholder",sharedTelegramConnectBotTokenLabel:"shared.telegramConnectDialog.botTokenLabel",sharedTelegramConnectBotTokenPlaceholder:"shared.telegramConnectDialog.botTokenPlaceholder",sharedTelegramConnectModeLabel:"shared.telegramConnectDialog.modeLabel",sharedTelegramConnectModePolling:"shared.telegramConnectDialog.modePolling",sharedTelegramConnectModeWebhook:"shared.telegramConnectDialog.modeWebhook",sharedTelegramConnectWebhookSecretLabel:"shared.telegramConnectDialog.webhookSecretLabel",sharedTelegramConnectWebhookSecretPlaceholder:"shared.telegramConnectDialog.webhookSecretPlaceholder",sharedTelegramConnectCancel:"shared.telegramConnectDialog.cancel",sharedTelegramConnectConnecting:"shared.telegramConnectDialog.connecting",sharedTelegramConnectConnect:"shared.telegramConnectDialog.connect",sharedCatsCreateCreateSection:"shared.catsCreateCreateSection",sharedCatsCreateNewCat:"shared.catsCreateNewCat",sharedCatsCreateCatLimitReached:"shared.catsCreateCatLimitReached",sharedCatsCreateAddNewCatHint:"shared.catsCreateAddNewCatHint",sharedCatsCreateCatNamePlaceholder:"shared.catsCreateCatNamePlaceholder",sharedCatsCreateCancel:"shared.catsCreateCancel",sharedCatsCreateSaving:"shared.catsCreateSaving",sharedCatsCreateSaveCat:"shared.catsCreateSaveCat",sharedPermissionModeFullAccess:"shared.permissionMode.fullAccess",sharedPermissionModeReadOnly:"shared.permissionMode.readOnly",sharedComposerSurfaceLabelChat:"shared.composerSurface.label.chat",sharedComposerSurfaceLabelWork:"shared.composerSurface.label.work",sharedComposerSurfaceLabelCode:"shared.composerSurface.label.code",sharedComposerSurfaceClearAria:"shared.composerSurface.clearAria",sharedProviderModelSupportAdvanced:"shared.providerModel.support.advanced",sharedProviderModelSupportReadOnly:"shared.providerModel.support.readOnly",sharedDeleteParallelChatGroupTitle:"shared.delete.parallelChatGroup.title",sharedDeleteParallelChatGroupMessage:"shared.delete.parallelChatGroup.message",sharedDeleteParallelChatGroupConfirm:"shared.delete.parallelChatGroup.confirm",sharedDeleteParallelChatGroupFallback:"shared.delete.parallelChatGroup.fallback",sharedDeleteCatTitle:"shared.delete.cat.title",sharedDeleteCatMessage:"shared.delete.cat.message",sharedDeleteCatConfirm:"shared.delete.cat.confirm",sharedDeleteCatFallback:"shared.delete.cat.fallback",sharedTranscriptDeletedCat:"shared.transcript.deletedCat",sharedCommonApply:"shared.common.apply",sharedCommonCancel:"shared.common.cancel",sharedCommonClose:"shared.common.close",sharedCommonDelete:"shared.common.delete",sharedCommonRetry:"shared.common.retry",sharedGuideCatPanelGreeting:"shared.guideCat.panelGreeting",sharedGuideCatWelcomeGreeting:"shared.guideCat.welcomeGreeting",sharedGuideCatWelcomeStartChat:"shared.guideCat.welcomeStartChat",sharedGuideCatWelcomeMeetCats:"shared.guideCat.welcomeMeetCats",sharedGuideCatWelcomeExploreProducts:"shared.guideCat.welcomeExploreProducts",sharedGuideCatWelcomeHideNow:"shared.guideCat.welcomeHideNow",sharedGuideCatPillOpenLabel:"shared.guideCat.pillOpenLabel",sharedGuideCatPillDisableLabel:"shared.guideCat.pillDisableLabel",sharedGuideCatDockUndockLabel:"shared.guideCat.dockUndockLabel",sharedGuideCatDialogDisableTitle:"shared.guideCat.dialog.disableTitle",sharedGuideCatDialogDisableMessage:"shared.guideCat.dialog.disableMessage",sharedGuideCatDialogDisableConfirm:"shared.guideCat.dialog.disableConfirm",sharedGuideCatDialogKeepEnabled:"shared.guideCat.dialog.keepEnabled",sharedGuideCatDialogDockNow:"shared.guideCat.dialog.dockNow",sharedImageUploadClickHint:"shared.imageUpload.clickHint",sharedImageUploadDragHint:"shared.imageUpload.dragHint",sharedWorkspaceNavigationDeleteChannelRuntimeCleanupFeedbackOne:"shared.workspaceNavigation.deleteChannelRuntimeCleanupFeedbackOne",sharedWorkspaceNavigationDeleteChannelRuntimeCleanupFeedbackMany:"shared.workspaceNavigation.deleteChannelRuntimeCleanupFeedbackMany",sharedWorkspaceNavigationRenameChatError:"shared.workspaceNavigation.renameChatError",sharedWorkspaceNavigationDeleteChatError:"shared.workspaceNavigation.deleteChatError",sharedWorkspaceNavigationRenameParallelChatError:"shared.workspaceNavigation.renameParallelChatError",sharedWorkspaceNavigationUngroupParallelChatError:"shared.workspaceNavigation.ungroupParallelChatError",sharedWorkspaceNavigationDeleteParallelChatGroupError:"shared.workspaceNavigation.deleteParallelChatGroupError",sharedWorkspaceNavigationParallelChatFallbackName:"shared.workspaceNavigation.parallelChatFallbackName",sharedWorkspaceNavigationErrorChatNotFound:"shared.workspaceNavigation.error.chatNotFound",sharedWorkspaceNavigationErrorChannelNotFound:"shared.workspaceNavigation.error.channelNotFound",sharedWorkspaceNavigationErrorParallelChatGroupNotFound:"shared.workspaceNavigation.error.parallelChatGroupNotFound",sharedWorkspaceNavigationErrorTitleRequired:"shared.workspaceNavigation.error.titleRequired",sharedWorkspaceNavigationErrorParallelChatTitleRequired:"shared.workspaceNavigation.error.parallelChatTitleRequired",sharedSettingsCatsRegistrySectionLabel:"shared.settingsCatsRegistry.sectionLabel",sharedSettingsCatsRegistrySavedCatsLabel:"shared.settingsCatsRegistry.savedCatsLabel",sharedSettingsCatsRegistryNoCatsYetLabel:"shared.settingsCatsRegistry.noCatsYetLabel",sharedSettingsCatsRegistryShowArchivedLabel:"shared.settingsCatsRegistry.showArchivedLabel",sharedSettingsCatsRegistryBossCatLabel:"shared.settingsCatsRegistry.bossCatLabel",sharedSettingsCatsRegistryRecoverLabel:"shared.settingsCatsRegistry.recoverLabel",sharedSettingsCatsRegistryRecoverTooltip:"shared.settingsCatsRegistry.recoverTooltip",sharedSettingsCatsRegistryDeleteTooltip:"shared.settingsCatsRegistry.deleteTooltip",sharedSettingsCatsRegistryArchiveTooltip:"shared.settingsCatsRegistry.archiveTooltip",sharedSettingsCatsRegistryDefaultSkillProfileLabel:"shared.settingsCatsRegistry.defaultSkillProfileLabel",sharedSettingsCatsRegistryMemorySavedLabel:"shared.settingsCatsRegistry.memorySavedLabel",sharedSettingsCatsRegistryNoMemoryYetLabel:"shared.settingsCatsRegistry.noMemoryYetLabel",sharedSettingsCatsRegistryBotBindingCount:"shared.settingsCatsRegistry.botBindingCount",sharedSettingsCatsRegistryEmptyStateHint:"shared.settingsCatsRegistry.emptyStateHint",sharedSettingsCatsSelectCatAria:"shared.settingsCats.selectCatAriaLabel",sharedSettingsCatsAddNewCatLabel:"shared.settingsCats.addNewCatLabel",sharedSettingsCatsShowArchivedLabel:"shared.settingsCats.showArchivedLabel",sharedSettingsCatsArchiveLabel:"shared.settingsCats.archiveLabel",sharedSettingsCatsRenameLabel:"shared.settingsCats.renameLabel",sharedSettingsCatsDeleteLabel:"shared.settingsCats.deleteLabel",sharedSettingsCatsChannelLabel:"shared.settingsCats.channelLabel",sharedSettingsCatsMemoryLabel:"shared.settingsCats.memoryLabel",sharedSettingsCatsSave:"shared.settingsCats.save",sharedSettingsCatsSaving:"shared.settingsCats.saving",sharedSettingsCatsBossCatLabel:"shared.settingsCats.bossCatLabel",sharedSettingsCatsChangeBossCatTitle:"shared.settingsCats.changeBossCatTitle",sharedSettingsCatsChangeBossCatMessage:"shared.settingsCats.changeBossCatMessage",sharedSettingsCatsConfirm:"shared.settingsCats.confirm",sharedSettingsCatsSetting:"shared.settingsCats.setting",sharedSettingsCatsSaveSuccess:"shared.settingsCats.saveSuccess",sharedSettingsCatsSaveError:"shared.settingsCats.saveError",sharedSettingsCatsRenameSuccess:"shared.settingsCats.renameSuccess",sharedSettingsCatsRenameError:"shared.settingsCats.renameError",sharedSettingsCatsDeleteSuccess:"shared.settingsCats.deleteSuccess",sharedSettingsCatsDeleteError:"shared.settingsCats.deleteError",sharedSettingsCatsBossUpdated:"shared.settingsCats.bossUpdated",sharedSettingsCatsStatusActive:"shared.settingsCats.status.active",sharedSettingsCatsStatusArchived:"shared.settingsCats.status.archived",sharedSettingsCatsMakeBossCatLabel:"shared.settingsCats.makeBossCatLabel",sharedSettingsCatsSetBossCatError:"shared.settingsCats.setBossCatError",sharedSettingsCatsSkillUpdateError:"shared.settingsCats.skillUpdateError",sharedSettingsCatsSkillProfileLabel:"shared.settingsCats.skillProfileLabel",sharedSettingsCatsMcpProfileLabel:"shared.settingsCats.mcpProfileLabel",sharedSettingsCatsMcpProfileChatMemoryLabel:"shared.settingsCats.mcpProfileChatMemoryLabel",sharedSettingsCatsMcpProfileWorkMemoryLabel:"shared.settingsCats.mcpProfileWorkMemoryLabel",sharedSettingsCatsChangeMcpProfileError:"shared.settingsCats.changeMcpProfileError",sharedSettingsCatsDisconnectTelegramAria:"shared.settingsCats.disconnectTelegramAria",sharedSettingsCatsDisconnectTelegram:"shared.settingsCats.disconnectTelegram",sharedSettingsCatsBindingActive:"shared.settingsCats.bindingActive",sharedSettingsCatsBindingDisabled:"shared.settingsCats.bindingDisabled",sharedSettingsCatsBindingPollingMode:"shared.settingsCats.bindingPollingMode",sharedSettingsCatsBindingWebhookMode:"shared.settingsCats.bindingWebhookMode",sharedSettingsCatsTelegramBindingCreated:"shared.settingsCats.telegramBindingCreated",sharedSettingsCatsTelegramBindingCreateError:"shared.settingsCats.telegramBindingCreateError",sharedSettingsCatsTelegramBindingRemoved:"shared.settingsCats.telegramBindingRemoved",sharedSettingsCatsTelegramBindingRemoveError:"shared.settingsCats.telegramBindingRemoveError",sharedSettingsCatsTelegramDiagnosticsLoadError:"shared.settingsCats.telegramDiagnosticsLoadError",sharedSettingsCatsCoverPhotoLabel:"shared.settingsCats.coverPhotoLabel",sharedSettingsCatsChangeCoverPhotoLabel:"shared.settingsCats.changeCoverPhotoLabel",sharedSettingsCatsUploadCoverPhotoLabel:"shared.settingsCats.uploadCoverPhotoLabel",sharedSettingsCatsChangeCoverLabel:"shared.settingsCats.changeCoverLabel",sharedSettingsCatsUploadCoverLabel:"shared.settingsCats.uploadCoverLabel",sharedSettingsCatsRemoveCoverLabel:"shared.settingsCats.removeCoverLabel",sharedSettingsCatsChangeSkillProfileError:"shared.settingsCats.changeSkillProfileError",sharedSettingsCatsUpdateBrainError:"shared.settingsCats.updateBrainError",sharedSettingsCatsLastInboundLabel:"shared.settingsCats.lastInboundLabel",sharedSettingsCatsConnectTelegramLabel:"shared.settingsCats.connectTelegramLabel",sharedSettingsCatsUnavailableHint:"shared.settingsCats.unavailableHint",sharedSettingsCatsSetBossCatLabel:"shared.settingsCats.setBossCatLabel",sharedSettingsCatsAddMemoryLabel:"shared.settingsCats.addMemoryLabel",sharedSettingsCatsDeleteMemoryAria:"shared.settingsCats.deleteMemoryAria",sharedSettingsCatsSkillProfileDefaultLabel:"shared.settingsCats.skillProfileDefaultLabel",sharedSettingsCatsSkillProfileCompanionLabel:"shared.settingsCats.skillProfileCompanionLabel",sharedSettingsCatsMemoryCategoryPreferenceLabel:"shared.settingsCats.memoryCategoryPreferenceLabel",sharedSettingsCatsMemoryCategoryFactLabel:"shared.settingsCats.memoryCategoryFactLabel",sharedSettingsCatsMemoryCategoryPolicyLabel:"shared.settingsCats.memoryCategoryPolicyLabel",sharedSettingsCatsMemoryCategoryStyleLabel:"shared.settingsCats.memoryCategoryStyleLabel",sharedSettingsCatsMemoryCategoryRelationshipLabel:"shared.settingsCats.memoryCategoryRelationshipLabel",sharedSettingsCatsMemoryCategoryLessonLabel:"shared.settingsCats.memoryCategoryLessonLabel",sharedSettingsCatsFallbackCatName:"shared.settingsCats.fallbackCatName",sharedSettingsCatsArchiveConfirmTitle:"shared.settingsCats.archiveConfirmTitle",sharedSettingsCatsArchiveConfirmMessage:"shared.settingsCats.archiveConfirmMessage",sharedSettingsCatsArchiveWithTelegramConfirmMessage:"shared.settingsCats.archiveWithTelegramConfirmMessage",sharedSettingsCatsArchiveSuccess:"shared.settingsCats.archiveSuccess",sharedSettingsCatsArchiveError:"shared.settingsCats.archiveError",sharedSettingsCatsRecoverConfirmTitle:"shared.settingsCats.recoverConfirmTitle",sharedSettingsCatsRecoverConfirmMessage:"shared.settingsCats.recoverConfirmMessage",sharedSettingsCatsRecoverConfirmLabel:"shared.settingsCats.recoverConfirmLabel",sharedSettingsCatsRecoverSuccess:"shared.settingsCats.recoverSuccess",sharedSettingsCatsRecoverError:"shared.settingsCats.recoverError",sharedSettingsCatsErrorNameRequired:"shared.settingsCats.error.nameRequired",sharedSettingsCatsErrorProviderRequired:"shared.settingsCats.error.providerRequired",sharedSettingsCatsErrorNameEmpty:"shared.settingsCats.error.nameEmpty",sharedSettingsCatsErrorAlreadyArchived:"shared.settingsCats.error.alreadyArchived",sharedSettingsCatsErrorAlreadyActive:"shared.settingsCats.error.alreadyActive",sharedSettingsCatsErrorArchiveRecoverConflict:"shared.settingsCats.error.archiveRecoverConflict",sharedSettingsCatsErrorNoProducts:"shared.settingsCats.error.noProducts",sharedSettingsCatsErrorBotTokenDuplicate:"shared.settingsCats.error.botTokenDuplicate",sharedSettingsCatsErrorNameDuplicate:"shared.settingsCats.error.nameDuplicate",sharedSettingsCatsErrorLimitReached:"shared.settingsCats.error.limitReached",sharedSettingsCatsErrorNotFound:"shared.settingsCats.error.notFound",sharedSettingsCatsErrorNotActive:"shared.settingsCats.error.notActive",sharedSettingsCatsErrorNotAvailableInChat:"shared.settingsCats.error.notAvailableInChat",sharedSettingsCatsErrorBotBindingNotFound:"shared.settingsCats.error.botBindingNotFound",sharedPlatformSurfaceSwitcherMenuLabel:"shared.platformSurfaceSwitcher.menuLabel",sharedPlatformSurfaceSwitcherOpenLobby:"shared.platformSurfaceSwitcher.openLobby",sharedPlatformSurfaceSwitcherAriaLabel:"shared.platformSurfaceSwitcher.ariaLabel",sharedProviderModelBrainCardTitle:"shared.providerModelBrainCard.title",sharedProviderModelControlDefault:"shared.providerModel.controls.default",sharedProviderModelControlEnabled:"shared.providerModel.controls.enabled",sharedProviderModelControlDisabled:"shared.providerModel.controls.disabled",sharedProviderModelControlOptionalPlaceholder:"shared.providerModel.controls.optionalPlaceholder",sharedProviderModelFieldProviderLabel:"shared.providerModel.field.providerLabel",sharedProviderModelFieldLoadingProviders:"shared.providerModel.field.loadingProviders",sharedProviderModelFieldSelectProviderHint:"shared.providerModel.field.selectProviderHint",sharedProviderModelFieldProviderLoadFailed:"shared.providerModel.field.providerLoadFailed",sharedProviderModelFieldNoProviders:"shared.providerModel.field.noProviders",sharedProviderModelFieldRegistryCheckingHint:"shared.providerModel.field.registryCheckingHint",sharedProviderModelFieldRegistryUsingProductCatalogHint:"shared.providerModel.field.registryUsingProductCatalogHint",sharedProviderModelFieldRegistryStaleHint:"shared.providerModel.field.registryStaleHint",sharedProviderModelFieldRegistryCachedRefreshFailedHint:"shared.providerModel.field.registryCachedRefreshFailedHint",sharedProviderModelFieldRegistryLoadFailedHint:"shared.providerModel.field.registryLoadFailedHint",sharedProviderModelFieldRegistryEmptyHint:"shared.providerModel.field.registryEmptyHint",sharedProviderModelFieldProviderInstanceLabel:"shared.providerModel.field.providerInstanceLabel",sharedProviderModelFieldModelLabel:"shared.providerModel.field.modelLabel",sharedProviderModelFieldRetryProvidersFirst:"shared.providerModel.field.retryProvidersFirst",sharedProviderModelFieldSelectProviderFirst:"shared.providerModel.field.selectProviderFirst",sharedProviderModelFieldWaitingProviders:"shared.providerModel.field.waitingProviders",sharedProviderModelFieldLoadingModels:"shared.providerModel.field.loadingModels",sharedProviderModelFieldSelectModel:"shared.providerModel.field.selectModel",sharedProviderModelFieldNoModels:"shared.providerModel.field.noModels",sharedProviderModelFieldCustomLegacyModelLabel:"shared.providerModel.field.customLegacyModelLabel",sharedProviderModelFieldLegacyModelIdLabel:"shared.providerModel.field.legacyModelIdLabel",sharedProviderModelFieldLegacyModelIdPlaceholder:"shared.providerModel.field.legacyModelIdPlaceholder",sharedProviderModelFieldLegacyModelIdHint:"shared.providerModel.field.legacyModelIdHint",sharedProviderModelFieldModeLabel:"shared.providerModel.field.modeLabel",sharedProviderModelFieldModeStandardLabel:"shared.providerModel.field.modeStandardLabel",sharedProviderModelFieldModeStandardOnlyLabel:"shared.providerModel.field.modeStandardOnlyLabel",sharedProviderModelFieldPresetPreviewSuffix:"shared.providerModel.field.presetPreviewSuffix",sharedProviderModelFieldPresetUnavailableSuffix:"shared.providerModel.field.presetUnavailableSuffix",sharedProviderModelFieldPresetTuningDescriptionFallback:"shared.providerModel.field.presetTuningDescriptionFallback",sharedProviderModelFieldModeOnlyBaseHint:"shared.providerModel.field.modeOnlyBaseHint",sharedProviderModelFieldRequestScopedWarning:"shared.providerModel.field.requestScopedWarning",sharedProviderModelFieldOpenRuntimeSetupLabel:"shared.providerModel.field.openRuntimeSetupLabel",sharedProviderModelFieldAdvancedCatalogUnavailable:"shared.providerModel.field.advancedCatalogUnavailable",sharedProviderModelFieldCatalogKindModel:"shared.providerModel.field.catalogKindModel",sharedProviderModelFieldCatalogKindAdvancedModel:"shared.providerModel.field.catalogKindAdvancedModel",sharedProviderModelFieldRuntimeCatalogUnavailable:"shared.providerModel.field.runtimeCatalogUnavailable",sharedProviderModelFieldRuntimeCatalogUnavailableWarning:"shared.providerModel.field.runtimeCatalogUnavailableWarning",sharedMemoryEditorDialogTitle:"shared.memoryEditorDialog.title",sharedMemoryEditorDialogCategoryLabel:"shared.memoryEditorDialog.categoryLabel",sharedMemoryEditorDialogContentLabel:"shared.memoryEditorDialog.contentLabel",sharedMemoryEditorDialogMemoryPlaceholder:"shared.memoryEditorDialog.memoryPlaceholder",sharedMemoryEditorDialogCancel:"shared.memoryEditorDialog.cancel",sharedMemoryEditorDialogSaving:"shared.memoryEditorDialog.saving",sharedMemoryEditorDialogAdd:"shared.memoryEditorDialog.add",sharedApprovalEyebrow:"shared.approvalEyebrow",sharedApprovalPendingTitle:"shared.approvalPendingTitle",sharedApprovalEmptyState:"shared.approvalEmptyState",sharedApprovalRequester:"shared.approvalRequester",sharedApprovalSummaryFallback:"shared.approvalSummaryFallback",sharedApprovalRequestedBy:"shared.approvalRequestedBy",sharedApprovalActionApprove:"shared.approval.action.approve",sharedApprovalActionReroute:"shared.approval.action.reroute",sharedApprovalActionReject:"shared.approval.action.reject",sharedApprovalActionApproveDescription:"shared.approval.action.approveDescription",sharedApprovalActionRerouteDescription:"shared.approval.action.rerouteDescription",sharedApprovalActionRejectDescription:"shared.approval.action.rejectDescription",sharedCatInspectTitle:"shared.catInspectTitle",sharedCatInspectClose:"shared.catInspectClose",sharedCatInspectBossLabel:"shared.catInspectBossLabel",sharedCatInspectProviderLabel:"shared.catInspectProviderLabel",sharedCatInspectInstanceLabel:"shared.catInspectInstanceLabel",sharedCatInspectModelLabel:"shared.catInspectModelLabel",sharedCatInspectSkillProfileLabel:"shared.catInspectSkillProfileLabel",sharedCatInspectSharedPresetDescription:"shared.catInspectSharedPresetDescription",sharedMessageChoicesCustom:"shared.messageChoicesCustom",sharedMessageChoicesAddCustomPlaceholder:"shared.messageChoicesAddCustomPlaceholder",sharedMessageChoicesSkipped:"shared.messageChoicesSkipped",sharedMessageChoicesRecorded:"shared.messageChoicesRecorded",sharedMessageChoicesConfirm:"shared.messageChoicesConfirm",sharedMessageChoicesSkip:"shared.messageChoicesSkip",sharedFolderBrowserEnterPath:"shared.folderBrowserEnterPath",sharedFolderBrowserGo:"shared.folderBrowserGo",sharedFolderBrowserUpOneLevel:"shared.folderBrowserUpOneLevel",sharedFolderBrowserRefresh:"shared.folderBrowserRefresh",sharedFolderBrowserLoading:"shared.folderBrowserLoading",sharedFolderBrowserNoSubdirectories:"shared.folderBrowserNoSubdirectories",sharedFolderBrowserUseThisFolder:"shared.folderBrowserUseThisFolder",sharedCommonSaving:"shared.common.saving",sharedCommonDismiss:"shared.common.dismiss",setupWizardWelcomeTitle:"setup.wizard.welcomeTitle",setupWizardWelcomeIntro:"setup.wizard.welcomeIntro",setupWizardOwnerNameLabel:"setup.wizard.ownerNameLabel",setupWizardOwnerNamePlaceholder:"setup.wizard.ownerNamePlaceholder",setupWizardGetStartedButton:"setup.wizard.getStartedButton",setupWizardStepIndicator:"setup.wizard.stepIndicator",setupWizardEnableGuideTitle:"setup.wizard.enableGuideTitle",setupWizardEnableGuideSubtitle:"setup.wizard.enableGuideSubtitle",setupWizardEnableGuideLabel:"setup.wizard.enableGuideLabel",setupWizardSkipGuideMessage:"setup.wizard.skipGuideMessage",setupWizardBackButton:"setup.wizard.backButton",setupWizardOpeningCatsAction:"setup.wizard.openingCatsAction",setupWizardOpenCatsAction:"setup.wizard.openCatsAction",setupWizardFailedMessage:"setup.wizard.failedMessage",setupWizardFailedWithStatus:"setup.wizard.failedWithStatus",setupWizardAlreadyCompleteError:"setup.wizard.alreadyCompleteError",setupWizardInvalidRequestError:"setup.wizard.invalidRequestError",setupWizardServerError:"setup.wizard.serverError",setupWizardRecordOpenFailedWithStatus:"setup.wizard.recordOpenFailedWithStatus",setupGuideCatRuntimeUnavailable:"setup.guideCat.runtimeUnavailable",setupGuideCatNoUsableTargets:"setup.guideCat.noUsableTargets",setupGuideCatRuntimeConnected:"setup.guideCat.runtimeConnected",setupGuideCatRuntimeNotDetected:"setup.guideCat.runtimeNotDetected",setupGuideCatNameLabel:"setup.guideCat.nameLabel",setupGuideCatNameHint:"setup.guideCat.nameHint",setupGuideCatOpenRuntimeSetup:"setup.guideCat.openRuntimeSetup",setupGuideCatUnavailableNote:"setup.guideCat.unavailableNote",setupGuideCatNoUsableTargetsNote:"setup.guideCat.noUsableTargetsNote",settingsAssistantsDefaultName:"settings.assistants.defaultName",settingsAssistantsStatusFailed:"settings.assistants.statusFailed",settingsAssistantsSaveFailed:"settings.assistants.saveFailed",settingsAssistantsStatusUpdateFailed:"settings.assistants.statusUpdateFailed",settingsAssistantsGuideCatUpdateFailed:"settings.assistants.guideCatUpdateFailed",settingsAssistantsGuideCatSaveFailed:"settings.assistants.guideCatSaveFailed",settingsAssistantsSaveFailedWithError:"settings.assistants.saveFailedWithError",settingsAssistantsRemoveTitle:"settings.assistants.removeTitle",settingsAssistantsRemoveMessage:"settings.assistants.removeMessage",settingsAssistantsRemoveButton:"settings.assistants.removeButton",settingsAssistantsRemoveFailed:"settings.assistants.removeFailed",settingsAssistantsEnableButton:"settings.assistants.enableButton",settingsAssistantsEnableBusyButton:"settings.assistants.enableBusyButton",settingsAssistantsDisableButton:"settings.assistants.disableButton",settingsAssistantsAvatarLabel:"settings.assistants.avatarLabel",settingsAssistantsNameLabel:"settings.assistants.nameLabel",settingsAssistantsSelectAriaLabel:"settings.assistants.selectAriaLabel",settingsAssistantsAddNewLabel:"settings.assistants.addNewLabel",settingsAssistantsNewAssistantTitle:"settings.assistants.newAssistantTitle",settingsAssistantsCancelButton:"settings.assistants.cancelButton",settingsAssistantsCreateButton:"settings.assistants.createButton",settingsAssistantsDeleteButton:"settings.assistants.deleteButton",settingsAssistantsRoleHintTitle:"settings.assistants.roleHintTitle",settingsAssistantsNamePlaceholder:"settings.assistants.namePlaceholder",settingsAssistantsRoleHintPlaceholder:"settings.assistants.roleHintPlaceholder",settingsAssistantsRenameFailed:"settings.assistants.renameFailed",settingsAssistantsRoleHintUpdateFailed:"settings.assistants.roleHintUpdateFailed",settingsAssistantsBrainUpdateFailed:"settings.assistants.brainUpdateFailed",settingsAssistantsCreateFailed:"settings.assistants.createFailed",settingsAssistantsApiInvalidRequestBody:"settings.assistants.api.invalidRequestBody",settingsAssistantsApiAssistantNameRequired:"settings.assistants.api.assistantNameRequired",settingsAssistantsApiAssistantProviderRequired:"settings.assistants.api.assistantProviderRequired",settingsAssistantsApiAssistantModelRequired:"settings.assistants.api.assistantModelRequired",settingsAssistantsApiAssistantNotFound:"settings.assistants.api.assistantNotFound",settingsAssistantsApiGuideCatNameManaged:"settings.assistants.api.guideCatNameManaged",settingsAssistantsApiGuideCatStatusInvalid:"settings.assistants.api.guideCatStatusInvalid",settingsAssistantsApiGuideCatNotFound:"settings.assistants.api.guideCatNotFound",conversationSidebarChatsLabel:"conversationSidebar.chatsLabel",conversationSidebarRecentsLabel:"conversationSidebar.recentsLabel",conversationSidebarNoChatsLabel:"conversationSidebar.noChatsLabel",conversationSidebarPrimaryAriaLabel:"conversationSidebar.primaryAriaLabel",conversationSidebarOpenSidebarLabel:"conversationSidebar.openSidebarLabel",conversationSidebarCloseSidebarLabel:"conversationSidebar.closeSidebarLabel",conversationSidebarRenameLabel:"conversationSidebar.renameLabel",conversationSidebarRenamingLabel:"conversationSidebar.renamingLabel",conversationSidebarDeleteLabel:"conversationSidebar.deleteLabel",conversationSidebarDeletingLabel:"conversationSidebar.deletingLabel",conversationSidebarUngroupLabel:"conversationSidebar.ungroupLabel",conversationSidebarUngroupingLabel:"conversationSidebar.ungroupingLabel",conversationSidebarDeleteAllLabel:"conversationSidebar.deleteAllLabel",conversationSidebarOpenAccountSettingsLabel:"conversationSidebar.openAccountSettingsLabel",conversationSidebarRuntimeStatusAriaLabel:"conversationSidebar.runtimeStatusAriaLabel",conversationSidebarDirectMessagesLabel:"conversationSidebar.directMessagesLabel",conversationSidebarTelegramBoundTooltip:"conversationSidebar.telegramBoundTooltip",conversationSidebarArchiveButton:"conversationSidebar.archiveButton",conversationSidebarDirectMessageButton:"conversationSidebar.directMessageButton",conversationSidebarClearButton:"conversationSidebar.clearButton",conversationSidebarClearConfirmMessage:"conversationSidebar.clearConfirmMessage",chatNewChatDraftViewCatProfileAction:"chatNewChatDraft.viewCatProfileAction",chatTopBarOpenCatProfileAriaLabel:"chatTopBar.openCatProfileAriaLabel",codeActiveComposerDetachedBranch:"code.activeComposer.detachedBranch",codeNewDraftGreeting:"code.newDraft.greeting",codeNewDraftGreetingOpenRepo:"code.newDraft.greeting.openRepo",codeNewDraftGreetingBuildFixRefactor:"code.newDraft.greeting.buildFixRefactor",codeNewDraftGreetingShipImprovement:"code.newDraft.greeting.shipImprovement",codeNewDraftGreetingSmallestChange:"code.newDraft.greeting.smallestChange",codeNewDraftComposerPlaceholder:"code.newDraft.composer.placeholder",codeNewDraftSetupTitle:"code.newDraft.setupTitle",codeNewDraftParticipantsTitle:"code.newDraft.participants.title",codeNewDraftParticipantsEmpty:"code.newDraft.participants.empty",codeNewDraftExecutionTitle:"code.newDraft.execution.title",codeNewDraftExecutionAction:"code.newDraft.execution.action",codeNewDraftExecutionEmpty:"code.newDraft.execution.empty",codeNewDraftFolderTitle:"code.newDraft.folder.title",codeNewDraftFolderAction:"code.newDraft.folder.action",codeNewDraftFolderEmpty:"code.newDraft.folder.empty",codeNewDraftSessionProfileTitle:"code.newDraft.sessionProfile.title",codeNewDraftSessionProfileDescription:"code.newDraft.sessionProfile.description",codeNewDraftWorkspaceIndependentWorktree:"code.newDraft.workspace.independentWorktree",codeNewDraftWorkspaceCurrentFolder:"code.newDraft.workspace.currentFolder",codeNewDraftWorkspaceSandbox:"code.newDraft.workspace.sandbox",codeNewDraftPermissionReadOnly:"code.newDraft.permission.readOnly",codeNewDraftPermissionFullAccess:"code.newDraft.permission.fullAccess",codeNewDraftStarterPomodoroLabel:"code.newDraft.starter.pomodoro.label",codeNewDraftStarterPomodoroPrompt:"code.newDraft.starter.pomodoro.prompt",codeNewDraftStarterFixBugLabel:"code.newDraft.starter.fixBug.label",codeNewDraftStarterFixBugPrompt:"code.newDraft.starter.fixBug.prompt",codeNewDraftStarterRefactorLabel:"code.newDraft.starter.refactor.label",codeNewDraftStarterRefactorPrompt:"code.newDraft.starter.refactor.prompt",codeNewDraftStarterWriteTestsLabel:"code.newDraft.starter.writeTests.label",codeNewDraftStarterWriteTestsPrompt:"code.newDraft.starter.writeTests.prompt",codeNewDraftStarterStartProjectLabel:"code.newDraft.starter.startProject.label",codeNewDraftStarterStartProjectPrompt:"code.newDraft.starter.startProject.prompt",codeTaskPillsAriaLabel:"code.taskPills.ariaLabel",codeTaskPillsMockAuthMiddleware:"code.taskPills.mock.authMiddleware",codeTaskPillsMockKiroSessionDelete:"code.taskPills.mock.kiroSessionDelete",codeTaskPillsMockArtifactGallery:"code.taskPills.mock.artifactGallery",codeTaskPillsNamePlaceholder:"code.taskPills.namePlaceholder",codeTaskPillsEditAria:"code.taskPills.editAria",codeTaskPillsTitleCurrent:"code.taskPills.title.current",codeTaskPillsTitleFocus:"code.taskPills.title.focus",codeTaskPillsHideAria:"code.taskPills.hideAria",codeTaskPillsFallbackTask:"code.taskPills.fallbackTask",codeTaskPillsAddAria:"code.taskPills.addAria",codeTaskPillsButtonTask:"code.taskPills.buttonTask",codeArtifactAnchorSourceLabel:"code.workspace.source.artifactAnchor",codeArtifactBuildLabel:"code.artifact.kind.build",codeArtifactDatasetLabel:"code.artifact.kind.dataset",codeArtifactDetailArtifactUnavailable:"code.artifactDetail.artifactUnavailable",codeArtifactDetailBackToBuild:"code.artifactDetail.backToBuild",codeArtifactDetailArtifactOutput:"code.artifactDetail.artifactOutput",codeArtifactDetailConversationLabel:"code.artifactDetail.conversationLabel",codeArtifactDetailContextEyebrow:"code.artifactDetail.contextEyebrow",codeArtifactDetailContextTitle:"code.artifactDetail.contextTitle",codeArtifactDetailLoadFailed:"code.artifactDetail.loadFailed",codeArtifactDetailLoadingBody:"code.artifactDetail.loadingBody",codeArtifactDetailLoadingTitle:"code.artifactDetail.loadingTitle",codeArtifactDetailMissingId:"code.artifactDetail.missingId",codeArtifactDetailNoArtifactSummary:"code.artifactDetail.noArtifactSummary",codeArtifactDetailNoInlinePreview:"code.artifactDetail.noInlinePreview",codeArtifactDetailNotInlineSafe:"code.artifactDetail.notInlineSafe",codeArtifactDetailPreviewOutput:"code.artifactDetail.previewOutput",codeArtifactDetailPreviewActionOpenArtifact:"code.artifactDetail.previewActionOpenArtifact",codeArtifactDetailPreviewActionOpenPreview:"code.artifactDetail.previewActionOpenPreview",codeArtifactDetailProjectLabel:"code.artifactDetail.projectLabel",codeArtifactDetailProjectMeta:"code.artifactDetail.projectMeta",codeArtifactDetailRelatedEmpty:"code.artifactDetail.relatedEmpty",codeArtifactDetailRelatedEyebrow:"code.artifactDetail.relatedEyebrow",codeArtifactDetailRelatedTitle:"code.artifactDetail.relatedTitle",codeArtifactDetailOpenConversationAction:"code.artifactDetail.openConversationAction",codeArtifactDetailOpenProjectAction:"code.artifactDetail.openProjectAction",codeArtifactDetailOpenTaskAction:"code.artifactDetail.openTaskAction",codeArtifactDetailOpenWorkItemAction:"code.artifactDetail.openWorkItemAction",codeArtifactDetailTaskLabel:"code.artifactDetail.taskLabel",codeArtifactDetailTitle:"code.artifactDetail.title",codeArtifactDetailViewArtifact:"code.artifactDetail.viewArtifact",codeArtifactDetailWorkItemLinkedLabel:"code.artifactDetail.workItemLinkedLabel",codeArtifactDetailWorkItemMissingLabel:"code.artifactDetail.workItemMissingLabel",codeArtifactKindAttachmentLabel:"code.artifactKind.attachment",codeArtifactKindDocumentLabel:"code.artifactKind.document",codeArtifactKindPreviewLabel:"code.artifactKind.preview",codeArtifactKindReportLabel:"code.artifactKind.report",codeArtifactKindTranscriptLabel:"code.artifactKind.transcript",codeArtifactKindUnknownLabel:"code.artifactKind.unknown",codeArtifactKindBuildLabel:"code.artifactKind.build",codeArtifactStatusArchived:"code.artifactStatus.archived",codeArtifactStatusDraft:"code.artifactStatus.draft",codeArtifactStatusPublished:"code.artifactStatus.published",codeArtifactStatusReady:"code.artifactStatus.ready",codeArtifactStatusUnknown:"code.artifactStatus.unknown",codeArtifactListArtifact:"code.artifactList.artifact",codeArtifactListAllFilter:"code.artifactList.filter.all",codeArtifactListAriaOpen:"code.artifactList.ariaOpenArtifact",codeArtifactListEmpty:"code.artifactList.empty",codeArtifactListHeader:"code.artifactList.header",codeArtifactListLoading:"code.artifactList.loading",codeArtifactListError:"code.artifactList.error",codeArtifactListLoadFailed:"code.artifactList.loadFailed",codeArtifactListCandidateHint:"code.artifactList.candidateHint",codeArtifactListCandidateLabel:"code.artifactList.candidateLabel",codeArtifactListProvenanceRun:"code.artifactList.provenance.run",codeArtifactListProvenanceTask:"code.artifactList.provenance.task",codeArtifactListStatusFilterLabel:"code.artifactList.statusFilterLabel",codeArtifactMetaContract:"code.artifactMeta.contract",codeArtifactMetaMode:"code.artifactMeta.mode",codeArtifactMetaDecision:"code.artifactMeta.decision",codeArtifactMetaKind:"code.artifactMeta.kind",codeArtifactMetaPath:"code.artifactMeta.path",codeArtifactMetaStatus:"code.artifactMeta.status",codeArtifactMetaUpdated:"code.artifactMeta.updated",codeArtifactMetaViewArtifact:"code.artifactMeta.viewArtifact",codeArtifactPreview:"code.artifactPreview",codeArtifactUnknown:"code.artifact.unknown",codeConversationKindChatChannel:"code.conversationKind.chatChannel",codeConversationKindChatRoot:"code.conversationKind.chatRoot",codeConversationKindCodeThread:"code.conversationKind.codeThread",codeConversationKindDirectMessage:"code.conversationKind.directMessage",codeConversationKindParallelGroup:"code.conversationKind.parallelGroup",codeConversationKindUnknown:"code.conversationKind.unknown",codeConversationKindWorkThread:"code.conversationKind.workThread",codeRecordStatusArchived:"code.recordStatus.archived",codeRecordStatusBlocked:"code.recordStatus.blocked",codeRecordStatusCancelled:"code.recordStatus.cancelled",codeRecordStatusCompleted:"code.recordStatus.completed",codeRecordStatusDraft:"code.recordStatus.draft",codeRecordStatusFailed:"code.recordStatus.failed",codeRecordStatusInProgress:"code.recordStatus.inProgress",codeRecordStatusOpen:"code.recordStatus.open",codeRecordStatusPending:"code.recordStatus.pending",codeRecordStatusPendingApproval:"code.recordStatus.pendingApproval",codeRecordStatusReady:"code.recordStatus.ready",codeRecordStatusRunning:"code.recordStatus.running",codeRecordStatusUnknown:"code.recordStatus.unknown",codeBuilderCodespaceHeader:"code.builder.codespaceHeader",codeBuilderCodeOutputLabel:"code.builder.codeOutputLabel",codeBuilderBack:"code.builder.back",codeBuilderContinue:"code.builder.continue",codeBuilderContinueBuild:"code.builder.continueBuild",codeBuilderContinueBuildBusy:"code.builder.continueBuildBusy",codeBuilderContinueTaskBusy:"code.builder.continueTaskBusy",codeBuilderCreateArtifact:"code.builder.createArtifact",codeBuilderCreateLabel:"code.builder.createLabel",codeBuilderCreatingTask:"code.builder.creatingTask",codeBuilderDefineTaskHeader:"code.builder.defineTaskHeader",codeBuilderDetailPlaceholder:"code.builder.detailsPlaceholder",codeBuilderDetailsLabel:"code.builder.detailsLabel",codeBuilderErrorCodespaceResolve:"code.builder.errorCodespaceResolve",codeBuilderErrorCodespacePathInvalid:"code.builder.errorCodespacePathInvalid",codeBuilderErrorCodespaceNoPath:"code.builder.errorCodespaceNoPath",codeBuilderErrorTaskCreate:"code.builder.errorTaskCreate",codeBuilderErrorTaskCreateMissingId:"code.builder.errorTaskCreateMissingId",codeBuilderErrorTaskExecution:"code.builder.errorTaskExecution",codeBuilderErrorTaskDetailLoad:"code.builder.errorTaskDetailLoad",codeBuilderErrorTaskResume:"code.builder.errorTaskResume",codeBuilderErrorTaskResumeInput:"code.builder.errorTaskResumeInput",codeBuilderErrorTaskTitle:"code.builder.errorTaskTitle",codeBuilderRuntimeObservationFailed:"code.builder.runtimeObservationFailed",codeBuilderExecutionDoneBanner:"code.builder.executionDoneBanner",codeBuilderExistingTask:"code.builder.existingTask",codeBuilderFeedbackResumeReady:"code.builder.feedbackResumeReady",codeBuilderFeedbackResumeTask:"code.builder.feedbackResumeTask",codeBuilderFeedbackResumeNoWorkspace:"code.builder.feedbackResumeNoWorkspace",codeBuilderFeedbackResumeWorkspaceNeeded:"code.builder.feedbackResumeWorkspaceNeeded",codeBuilderFilterCodespace:"code.builder.filter.codespace",codeBuilderHeaderCodespace:"code.builder.header.codespace",codeBuilderHeaderNewTask:"code.builder.header.newTask",codeBuilderHeaderProjectFolder:"code.builder.header.projectFolder",codeBuilderHeaderTaskStep:"code.builder.header.taskStep",codeBuilderModelLabel:"code.builder.modelLabel",codeBuilderModelPlaceholder:"code.builder.modelPlaceholder",codeBuilderNewTaskButton:"code.builder.newTaskButton",codeBuilderProviderLabel:"code.builder.providerLabel",codeBuilderProviderTaskLabel:"code.builder.providerTaskLabel",codeBuilderRepoPathLabel:"code.builder.repoPathLabel",codeBuilderResumeLabel:"code.builder.resumeLabel",codeBuilderResumePrompt:"code.builder.resumePrompt",codeBuilderRetryPrompt:"code.builder.retryPrompt",codeBuilderStepLabel:"code.builder.stepLabel",codeBuilderSuccessTaskReadyWithCurrentChat:"code.builder.successTaskReadyWithCurrentChat",codeBuilderTaskIdRequired:"code.builder.taskIdRequired",codeBuilderTaskIdReady:"code.builder.taskIdReady",codeBuilderTaskIdReadyNoWorkspace:"code.builder.taskIdReadyNoWorkspace",codeBuilderTaskLabel:"code.builder.taskLabel",codeBuilderTaskSummaryPlaceholder:"code.builder.taskSummaryPlaceholder",codeBuilderTitle:"code.builder.title",codeBuilderWorkspaceActiveNotice:"code.builder.workspaceActiveNotice",codeBuilderWorkspaceFallbackBound:"code.builder.workspaceFallbackBound",codeBuilderWorkspaceFallbackBoundFallback:"code.builder.workspaceFallbackBoundFallback",codeBuilderWorkspaceFallbackChatRepo:"code.builder.workspaceFallbackChatRepo",codeBuilderWorkspaceFallbackRoom:"code.builder.workspaceFallbackRoom",codeBuilderWorkspaceFooterLabel:"code.builder.workspaceFooterLabel",codeBuilderWorkspacePathPlaceholder:"code.builder.workspacePathPlaceholder",codeBuilderWorkspaceResumeHelp:"code.builder.workspaceResumeHelp",codeBuilderWorkspaceSampleTaskId:"code.builder.sampleTaskId",codeBuilderWorkspaceSummaryLabel:"code.builder.workspaceSummaryLabel",codeBuilderWorkspaceSummaryNotice:"code.builder.workspaceSummaryNotice",codeBuilderStartingTaskBusy:"code.builder.startingTaskBusy",codeBuilderTaskQuestion:"code.builder.taskQuestion",codeLivePreviewCommandProfile:"code.livePreview.commandProfile",codeLivePreviewDescription:"code.livePreview.description",codeLivePreviewDiagnostic:"code.livePreview.diagnostic",codeLivePreviewErrorLoad:"code.livePreview.error.load",codeLivePreviewErrorLogs:"code.livePreview.error.logs",codeLivePreviewErrorStop:"code.livePreview.error.stop",codeLivePreviewExpiresAt:"code.livePreview.expiresAt",codeLivePreviewHideLogs:"code.livePreview.hideLogs",codeLivePreviewLogs:"code.livePreview.logs",codeLivePreviewLogsEmpty:"code.livePreview.logsEmpty",codeLivePreviewLogsLoading:"code.livePreview.logsLoading",codeLivePreviewOpen:"code.livePreview.open",codeLivePreviewRetry:"code.livePreview.retry",codeLivePreviewRetryUnavailable:"code.livePreview.retryUnavailable",codeLivePreviewStatusExpired:"code.livePreview.status.expired",codeLivePreviewStatusFailed:"code.livePreview.status.failed",codeLivePreviewStatusReady:"code.livePreview.status.ready",codeLivePreviewStatusStarting:"code.livePreview.status.starting",codeLivePreviewStatusStopped:"code.livePreview.status.stopped",codeLivePreviewStatusStopping:"code.livePreview.status.stopping",codeLivePreviewStop:"code.livePreview.stop",codeLivePreviewStopRequested:"code.livePreview.stopRequested",codeLivePreviewStopping:"code.livePreview.stopping",codeLivePreviewTitle:"code.livePreview.title",codeLivePreviewWorkspace:"code.livePreview.workspace",codeExecutionExecutionHeader:"code.execution.header",codeExecutionMetaNoTask:"code.execution.meta.noTask",codeExecutionMetaRuntimeSession:"code.execution.meta.runtimeSession",codeExecutionMetaWorkingTreeClean:"code.execution.meta.workingTreeClean",codeExecutionMetaWorkingTreeDirty:"code.execution.meta.workingTreeDirty",codeExecutionNoActiveSession:"code.execution.noActiveSession",codeExecutionNoTask:"code.execution.noTask",codeExecutionNotStarted:"code.execution.notStarted",codeExecutionOwnerDecisionRequired:"code.execution.ownerDecisionRequired",codeExecutionPanelTitle:"code.execution.panelTitle",codeExecutionRuntimeHeader:"code.execution.runtimeHeader",codeExecutionRuntimeIdle:"code.execution.runtimeIdle",codeExecutionRuntimeModeDelivery:"code.execution.modeDelivery",codeExecutionRuntimeTargetLabel:"code.execution.targetLabel",codeExecutionRuntimeTargets:"code.execution.targets",codeExecutionRuntimeTitle:"code.execution.runtimeTitle",codeExecutionSectionBlocked:"code.execution.sectionBlocked",codeExecutionTaskHeader:"code.execution.taskHeader",codeExecutionTaskStatus:"code.execution.taskStatus",codeExecutionTaskTitle:"code.execution.taskTitle",codeExecutionNotActiveYet:"code.execution.notActiveYet",codeExecutionPaused:"code.execution.paused",codeExecutionProvider:"code.execution.provider",codeExecutionModel:"code.execution.model",codeExecutionDefaultModel:"code.execution.defaultModel",codeExecutionSession:"code.execution.session",codeExecutionTaskId:"code.execution.taskId",codeExecutionStatusBlocked:"code.execution.status.blocked",codeExecutionStatusDone:"code.execution.status.done",codeExecutionStatusPending:"code.execution.status.pending",codeExecutionStatusRunning:"code.execution.status.running",codeExecutionStatusUnknown:"code.execution.status.unknown",codeExecutionTaskRuntimeHeader:"code.execution.taskRuntimeHeader",codeExecutionTaskStrategy:"code.execution.taskStrategy",codeExecutionStrategyPdca:"code.execution.strategy.pdca",codeExecutionStrategyReact:"code.execution.strategy.react",codeExecutionStrategyReflexion:"code.execution.strategy.reflexion",codeExecutionDeliveryModeArtifactOnly:"code.execution.deliveryMode.artifactOnly",codeExecutionDeliveryModeCommitOnly:"code.execution.deliveryMode.commitOnly",codeExecutionDeliveryModeDeployPreview:"code.execution.deliveryMode.deployPreview",codeExecutionDeliveryModePrWithChecks:"code.execution.deliveryMode.prWithChecks",codeExecutionDeliveryModePushBranch:"code.execution.deliveryMode.pushBranch",codeExecutionBlockedReasonAntiPingPong:"code.execution.blockedReason.antiPingPong",codeExecutionBlockedReasonApprovalPending:"code.execution.blockedReason.approvalPending",codeExecutionBlockedReasonMaxDispatches:"code.execution.blockedReason.maxDispatches",codeExecutionBlockedReasonNoValidTargets:"code.execution.blockedReason.noValidTargets",codeExecutionBlockedReasonStartupRecovery:"code.execution.blockedReason.startupRecovery",codeExecutionBlockedReasonUserCancelled:"code.execution.blockedReason.userCancelled",codeExecutionUnknownDeliveryMode:"code.execution.unknownDeliveryMode",codeExecutionUnknownValue:"code.execution.unknownValue",codeExecutionUnknownValueUnknown:"code.execution.unknownValueUnknown",codeExecutionControlHeader:"code.execution.controlHeader",codeExecutionControlMode:"code.execution.controlMode",codeExecutionControlDelivery:"code.execution.controlDelivery",codeExecutionControlBlocked:"code.execution.controlBlocked",codeExecutionControlApprovalPending:"code.execution.controlApprovalPending",codeExecutionControlBlockedBy:"code.execution.controlBlockedBy",codeExecutionControlTargets:"code.execution.controlTargets",codeExecutionControlReplable:"code.execution.controlTargets",codeExecutionStatusActiveLabel:"code.execution.statusActiveLabel",codeExecutionStatusIdleLabel:"code.execution.statusIdleLabel",codeExecutionStatusBlockedLabel:"code.execution.statusBlockedLabel",codeExecutionStatusRunningLabel:"code.execution.statusRunningLabel",codeExecutionStatusDoneLabel:"code.execution.statusDoneLabel",codeExecutionStatusPendingLabel:"code.execution.statusPendingLabel","codeDelivery.blocked":"code.delivery.blocked",codeDeliveryPreviewHeader:"code.delivery.previewHeader",codeDeliveryBlockerLabel:"code.delivery.blockerLabel",codeDeliveryContractLabel:"code.delivery.contractLabel",codeDeliveryErrorRepoStatusUnavailable:"code.delivery.error.repoStatusUnavailable",codeDeliveryWarningsLabel:"code.delivery.warningsLabel",codeDeliveryWarningsTitle:"code.delivery.warningsTitle",codeDeliveryHeader:"code.delivery.header",codeDeliveryLabel:"code.delivery.label",codeDeliveryLabelPreview:"code.delivery.labelPreview",codeDeliveryMetaBranch:"code.delivery.metaBranch",codeDeliveryMetaAhead:"code.delivery.metaAhead",codeDeliveryMetaBehind:"code.delivery.metaBehind",codeDeliveryMetaStaged:"code.delivery.metaStaged",codeDeliveryMetaUnstaged:"code.delivery.metaUnstaged",codeDeliveryMetaUntracked:"code.delivery.metaUntracked",codeDeliveryMetaRemote:"code.delivery.metaRemote",codeDeliveryMetaMode:"code.delivery.metaMode",codeDeliveryMetaDecision:"code.delivery.metaDecision",codeDeliveryNoCodespace:"code.delivery.noCodespace",codeDeliveryNoRepoStatus:"code.delivery.noRepoStatus",codeDeliveryNoInlinePreview:"code.delivery.noInlinePreview",codeDeliveryNoWorkspace:"code.delivery.noWorkspace",codeDeliveryPanelSubtitle:"code.delivery.panelSubtitle",codeDeliveryPanelTitle:"code.delivery.panelTitle",codeDeliveryPreviewHintUnsafe:"code.delivery.previewHintUnsafe",codeDeliveryRepoClean:"code.delivery.repoClean",codeDeliveryRepoDirty:"code.delivery.repoDirty",codeDeliveryRepoStatusHeader:"code.delivery.repoStatusHeader",codeDeliveryActionsCommitHeader:"code.delivery.actions.commitHeader",codeDeliveryActionsPushHeader:"code.delivery.actions.pushHeader",codeDeliveryActionsExportHeader:"code.delivery.actions.exportHeader",codeDeliveryActionRefresh:"code.delivery.action.refresh",codeDeliveryActionPreview:"code.delivery.action.preview",codeDeliveryActionCommit:"code.delivery.action.commit",codeDeliveryActionPush:"code.delivery.action.push",codeDeliveryActionPushPreview:"code.delivery.action.pushPreview",codeDeliveryActionPushConfirm:"code.delivery.action.pushConfirm",codeDeliveryActionPushCancel:"code.delivery.action.pushCancel",codeDeliveryActionExport:"code.delivery.action.export",codeDeliveryActionCommitPlaceholder:"code.delivery.action.commitPlaceholder",codeDeliveryConfirmationPush:"code.delivery.confirmation.push",codeDeliveryConfirmationPushHint:"code.delivery.confirmation.pushHint",codeDeliveryCommitFailed:"code.delivery.error.commitFailed",codeDeliveryPushFailed:"code.delivery.error.pushFailed",codeDeliveryExportFailed:"code.delivery.error.exportFailed",codeDeliveryStatusReady:"code.delivery.status.ready",codeDeliveryStatusBlocked:"code.delivery.status.blocked",codeDeliveryStatusUnknown:"code.delivery.status.unknown",codeDeliveryDecisionApprove:"code.delivery.decision.approve",codeDeliveryDecisionComplete:"code.delivery.decision.complete",codeDeliveryDecisionReject:"code.delivery.decision.reject",codeDeliveryDecisionReroute:"code.delivery.decision.reroute",codeDeliveryDecisionWait:"code.delivery.decision.wait",codeDeliveryUnknownBlocker:"code.delivery.unknownBlocker",codeDeliveryWarningFallback:"code.delivery.warningFallback",codePlanHeader:"code.plan.header",codePlanPanelTitle:"code.plan.panelTitle",codePlanEmpty:"code.plan.empty",codePlanReplan:"code.plan.replan",codePlanStatusBlocked:"code.plan.status.blocked",codePlanStatusDone:"code.plan.status.done",codePlanStatusPending:"code.plan.status.pending",codePlanStatusRunning:"code.plan.status.running",codePlanTitle:"code.plan.title",codePlanReplannedSuffix:"code.plan.replannedSuffix",codePlanLoadError:"code.plan.error.load",codePlanUpdateError:"code.plan.error.update",codePlanStepUpdateError:"code.plan.error.stepUpdate",codePreviewArtifactCountMany:"code.preview.artifactCountMany",codePreviewArtifactCountOne:"code.preview.artifactCountOne",codePreviewBlocked:"code.preview.blocked",codePreviewDetails:"code.preview.details",codePreviewHeader:"code.preview.header",codePreviewIframeTitle:"code.preview.iframeTitle",codePreviewNoPreview:"code.preview.noPreview",codePreviewNotInlineSafe:"code.preview.notInlineSafe",codePreviewOpenArtifact:"code.preview.openArtifact",codePreviewOpenLatestArtifact:"code.preview.openLatestArtifact",codePreviewOpenLatestPreview:"code.preview.openLatestPreview",codePreviewOpenPreview:"code.preview.openPreview",codePreviewTitle:"code.preview.title",codeRelayActionCreateRelayThread:"code.relay.action.createThread",codeRelayActionDispatching:"code.relay.action.dispatching",codeRelayActionFanOut:"code.relay.action.fanOut",codeRelayActionRefresh:"code.relay.action.refresh",codeRelayActionFanOutSelected:"code.relay.action.fanOutSelected",codeRelayAuthorKindAgent:"code.relay.authorKind.agent",codeRelayAuthorKindSystem:"code.relay.authorKind.system",codeRelayAuthorKindUnknown:"code.relay.authorKind.unknown",codeRelayAuthorKindUser:"code.relay.authorKind.user",codeRelayAvailabilityInstanceUnavailable:"code.relay.availability.instanceUnavailable",codeRelayAvailabilityProviderPathMissing:"code.relay.availability.providerPathMissing",codeRelayAvailabilityProviderPathReady:"code.relay.availability.providerPathReady",codeRelayAvailabilityRuntimeConfigUnavailable:"code.relay.availability.runtimeConfigUnavailable",codeRelayAvailabilityRuntimeReadyVia:"code.relay.availability.runtimeReadyVia",codeRelayErrorAgentRequired:"code.relay.error.agentRequired",codeRelayErrorFanOutPromptRequired:"code.relay.error.fanOutPromptRequired",codeRelayErrorThreadRequired:"code.relay.error.threadRequired",codeRelayErrorThreadTitleRequired:"code.relay.error.threadTitleRequired",codeRelayErrorMissingPayload:"code.relay.error.missingPayload",codeRelayErrorNoPayload:"code.relay.error.noPayload",codeRelayErrorRelayFailed:"code.relay.error.relayFailed",codeRelayErrorRosterUpdateFailed:"code.relay.error.rosterUpdateFailed",codeRelayErrorThreadLoadFailed:"code.relay.error.threadLoadFailed",codeRelayErrorThreadRefreshFailed:"code.relay.error.threadRefreshFailed",codeRelayErrorThreadCreateFailed:"code.relay.error.threadCreateFailed",codeRelayHeaderCodeRelay:"code.relay.header.codeRelay",codeRelayLabelContract:"code.relay.label.contract",codeRelayLabelContractLoading:"code.relay.label.contractLoading",codeRelayLabelActiveThread:"code.relay.label.activeThread",codeRelayLabelDefault:"code.relay.label.default",codeRelayLabelEnabled:"code.relay.label.enabled",codeRelayLabelEnded:"code.relay.label.ended",codeRelayLabelModel:"code.relay.label.model",codeRelayLabelNoObjective:"code.relay.label.noObjective",codeRelayLabelNoRounds:"code.relay.label.noRounds",codeRelayLabelNoThreads:"code.relay.label.noThreads",codeRelayLabelNoneYet:"code.relay.label.noneYet",codeRelayLabelObjective:"code.relay.label.objective",codeRelayLabelProven:"code.relay.label.proven",codeRelayLabelRepoPath:"code.relay.label.repoPath",codeRelayLabelRelayThreadTitle:"code.relay.label.relayThreadTitle",codeRelayLabelRepoNoBound:"code.relay.label.repoNoBound",codeRelayLabelUpdated:"code.relay.label.updated",codeRelayLabelMode:"code.relay.label.mode",codeRelayLabelOpen:"code.relay.label.open",codeRelayLabelQuotaNote:"code.relay.label.quotaNote",codeRelayLabelRoster:"code.relay.label.roster",codeRelayLabelRoundObjective:"code.relay.label.roundObjective",codeRelayLabelRoundPrompt:"code.relay.label.roundPrompt",codeRelayLabelRoundTimeline:"code.relay.label.roundTimeline",codeRelayLabelRounds:"code.relay.label.rounds",codeRelayLabelRole:"code.relay.label.role",codeRelayLabelStarted:"code.relay.label.started",codeRelayLabelStatusWaiting:"code.relay.label.statusWaiting",codeRelayStatusActive:"code.relay.status.active",codeRelayStatusAvailable:"code.relay.status.available",codeRelayStatusCompleted:"code.relay.status.completed",codeRelayStatusFailed:"code.relay.status.failed",codeRelayStatusRequested:"code.relay.status.requested",codeRelayStatusRunning:"code.relay.status.running",codeRelayStatusUnavailable:"code.relay.status.unavailable",codeRelayStatusUnknown:"code.relay.status.unknown",codeRelayStatusWaitingForAgents:"code.relay.status.waitingForAgents",codeRelayStatusWaitingForUser:"code.relay.status.waitingForUser",codeRelayModeBuild:"code.relay.mode.build",codeRelayModeDiscover:"code.relay.mode.discover",codeRelayModeDocument:"code.relay.mode.document",codeRelayModeFit:"code.relay.mode.fit",codeRelayModeHumanVerify:"code.relay.mode.humanVerify",codeRelayModeRepair:"code.relay.mode.repair",codeRelayModeReview:"code.relay.mode.review",codeRelayModeShape:"code.relay.mode.shape",codeRelayRoleCritic:"code.relay.role.critic",codeRelayRoleDrafter:"code.relay.role.drafter",codeRelayRoleIdle:"code.relay.role.idle",codeRelayRoleMainCoder:"code.relay.role.mainCoder",codeRelayRoleReviewer:"code.relay.role.reviewer",codeRelayRoleSummarizer:"code.relay.role.summarizer",codeRelayLabelThreadShell:"code.relay.label.threadShell",codeRelayLabelThreadTitle:"code.relay.label.threadTitle",codeRelayLabelPhase0:"code.relay.phase.phase0",codeRelayLabelPhase1:"code.relay.phase.phase1",codeRelayLabelPhase2:"code.relay.phase.phase2",codeRelayLabelPhaseFanOut:"code.relay.phase.fanOut",codeRelayLabelPhaseRoster:"code.relay.phase.roster",codeRelayLabelPhaseProject:"code.relay.phase.project",codeRelayLabelProjectThread:"code.relay.projectThread",codeRelayLabelProjectThreadSummary:"code.relay.projectThreadSummary",codeRelayLabelRuntimeProviderSurface:"code.relay.runtimeProviderSurface",codeRelayLabelRuntimeSurface:"code.relay.runtimeSurface",codeRelayLabelThreadProject:"code.relay.threadProject",codeRelayLabelThreadShellTitle:"code.relay.threadShellTitle",codeRelayModeParallelPrompt:"code.relay.mode.parallelPrompt",codeRelayNoObjective:"code.relay.noObjective",codeRelayNotRecorded:"code.relay.notRecorded",codeRelayOpenDiscoveryRound:"code.relay.openDiscoveryRound",codeRelayPlaceholderObjective:"code.relay.placeholder.objective",codeRelayPlaceholderOptionalRepo:"code.relay.placeholder.optionalRepo",codeRelayPlaceholderFanOutPrompt:"code.relay.placeholder.fanOutPrompt",codeRelayPlaceholderQuotaNote:"code.relay.placeholder.quotaNote",codeRelayLabelCurrentChat:"code.relay.currentChat",codeRelayLabelCreate:"code.relay.create",codeRelayDefaultThreadTitle:"code.relay.defaultThreadTitle",codeRelayLabelLoading:"code.relay.loading",codeRelayLabelProjectThreadHeader:"code.relay.projectThreadHeader",codeRelayLabelRelayToOthers:"code.relay.relayToOthers",codeRelayLabelTargetAgent:"code.relay.targetAgent",codeRelayLabelThreadLabel:"code.relay.threadLabel",codeRelayTitle:"code.relay.title",codeRelayTitleConnectorContract:"code.relay.titleConnectorContract",codeRelayTitleProjectThread:"code.relay.titleProjectThread",codeRelayTitleTimeline:"code.relay.titleTimeline",codeRelayTransportUnknown:"code.relay.transportUnknown",codeRelayTransportUnknownWithValue:"code.relay.transportUnknownWithValue",codeRelayTransportRuntimeSessionBridge:"code.relay.transportRuntimeSessionBridge",codeSidebarCodespaceLabel:"code.sidebar.codespace",codeSidebarCodeBuilderTitle:"code.sidebar.codeBuilderTitle",codeSidebarCodespacesLabel:"code.sidebar.codespaces",codeSidebarSourceCodeTask:"code.workspaceSource.codeTask",codeSidebarSourceConversationRepo:"code.workspaceSource.conversationRepo",codeSidebarSourceRuntimeCwd:"code.workspaceSource.runtimeCwd",codeRelayTitleProjectThreadSection:"code.relay.titleProjectThreadSection",codeSidebarTeamCodeLabel:"code.sidebar.teamCode",codeSidebarPeerCodeLabel:"code.sidebar.peerCode",codeSidebarNewCodeLabel:"code.sidebar.newCode",codeSidebarNoCodesYetLabel:"code.sidebar.noCodesYet",codeSidebarNoConversationsSummary:"code.sidebar.noConversationsSummary",codeRelayNoRoundsHint:"code.relay.noRoundsHint",codeSidebarLabelArtifacts:"code.sidebar.artifacts",codeSidebarLabelBuild:"code.sidebar.build",codeSidebarLabelRelay:"code.sidebar.relay",codeWorkspaceSectionCodeOutput:"code.workspace.sectionCodeOutput",codeWorkspaceSummaryBinding:"code.workspace.summary.binding",codeWorkspaceSummaryCodespace:"code.workspace.summary.codespace",codeWorkspaceSummaryKind:"code.workspace.summary.kind",codeWorkspaceSummaryOwnership:"code.workspace.summary.ownership",codeWorkspaceSummaryNoticeConversation:"code.workspace.summary.chatContext",codeWorkspaceSummaryNoBindingChat:"code.workspace.summary.noChatContext",codeWorkspaceSummaryNoChat:"code.workspace.summary.noChat",codeWorkspaceSummaryBindingConversationRepo:"code.workspace.summary.binding.conversationRepo",codeWorkspaceSummaryBindingManagedRoom:"code.workspace.summary.binding.managedRoom",codeWorkspaceSummaryBindingUserSelected:"code.workspace.summary.binding.userSelected",codeWorkspaceKindConversationRepo:"code.workspace.kind.conversationRepo",codeWorkspaceKindManagedRoom:"code.workspace.kind.managedRoom",codeWorkspaceKindUserSelected:"code.workspace.kind.userSelected",codeWorkspaceOwnershipConversationBound:"code.workspace.ownership.conversationBound",codeWorkspaceOwnershipRoomOwned:"code.workspace.ownership.roomOwned",codeWorkspaceOwnershipOwnerSelected:"code.workspace.ownership.ownerSelected",codeWorkspaceSourceTask:"code.workspace.source.task",codeWorkspaceSourceConversationRepo:"code.workspace.source.conversationRepo",codeWorkspaceSourceRuntimeCwd:"code.workspace.source.runtimeCwd",codeWorkspacesListHeader:"code.workspaces.listHeader",codeWorkspacesListNoCodespaces:"code.workspaces.listNoCodespaces",codeWorkspacesListLoading:"code.workspaces.loading",codeWorkspacesListError:"code.workspaces.error",codeWorkspacesLoadError:"code.workspaces.loadError",codeWorkspacesListSourceCodes:"code.workspaces.sourceCodes",codeWorkspacesListSourceRepo:"code.workspaces.sourceRepo",codeWorkspacesListSourceRuntime:"code.workspaces.sourceRuntime",codeWorkspacesListSourceArtifact:"code.workspaces.sourceArtifact",codeWorkspacesListAriaOpen:"code.workspaces.ariaOpen",codeWorkspaceStatusActive:"code.workspaceStatus.active",codeWorkspaceStatusArchived:"code.workspaceStatus.archived",codeWorkspaceStatusDraft:"code.workspaceStatus.draft",codeWorkspaceStatusReady:"code.workspaceStatus.ready",codeWorkspaceStatusUnknown:"code.workspaceStatus.unknown",codeWorkspaceDetailError:"code.workspaceDetail.error",codeWorkspaceDetailLoading:"code.workspaceDetail.loading",codeWorkspaceDetailTitle:"code.workspaceDetail.title",codeWorkspaceDetailNotFound:"code.workspaceDetail.notFound",codeWorkspaceDetailMissingId:"code.workspaceDetail.missingId",codeWorkspaceDetailBackToList:"code.workspaceDetail.backToList",codeWorkspaceDetailOverviewTitle:"code.workspaceDetail.overviewTitle",codeWorkspaceDetailArtifactSection:"code.workspaceDetail.artifactSection",codeWorkspaceDetailConversationsSection:"code.workspaceDetail.conversationsSection",codeWorkspaceDetailTasksSection:"code.workspaceDetail.tasksSection",codeWorkspaceDetailNoArtifacts:"code.workspaceDetail.noArtifacts",codeWorkspaceDetailNoArtifactsDesc:"code.workspaceDetail.noArtifactsDesc",codeWorkspaceDetailNoConversations:"code.workspaceDetail.noConversations",codeWorkspaceDetailNoTasks:"code.workspaceDetail.noTasks",codeWorkspaceDetailOverviewPath:"code.workspaceDetail.overviewPath",codeWorkspaceDetailOverviewSource:"code.workspaceDetail.overviewSource",codeWorkspaceDetailOverviewStatus:"code.workspaceDetail.overviewStatus",codeWorkspaceDetailOverviewLastActive:"code.workspaceDetail.overviewLastActive",codeWorkspaceDetailOverviewSummary:"code.workspaceDetail.overviewSummary",codeWorkspaceDetailNoSummary:"code.workspaceDetail.noSummary",codeWorkspaceDetailMetricConversations:"code.workspaceDetail.metric.conversations",codeWorkspaceDetailMetricTasks:"code.workspaceDetail.metric.tasks",codeWorkspaceDetailMetricArtifacts:"code.workspaceDetail.metric.artifacts",codeWorkspaceDetailMetricId:"code.workspaceDetail.metric.id",codeWorkspaceDetailOverviewNoArtifactYet:"code.workspaceDetail.overviewNoArtifacts",codeWorkspaceDetailConversationsEmpty:"code.workspaceDetail.conversationsEmpty",codeWorkspaceDetailTasksEmpty:"code.workspaceDetail.tasksEmpty",codeWorkspaceDetailTaskLabel:"code.workspaceDetail.taskLabel",codeWorkspaceDetailArtifactsHeader:"code.workspaceDetail.artifactsHeader",codeWorkspaceDetailSourceUnknown:"code.workspace.source.unknown",designSidePanelCloseLabel:"design.sidePanel.closeLabel",designAccountIdentityMenuLabel:"design.accountIdentityMenu.label",designAccountIdentityMenuMenuLabel:"design.accountIdentityMenu.menuLabel",designAccountIdentityMenuSettingsLabel:"design.accountIdentityMenu.settingsLabel",designAccountIdentityMenuEnvironmentLabel:"design.accountIdentityMenu.environmentLabel",designNotificationDismissLabel:"design.notification.dismissLabel",entityComingSoonBackToLobby:"entity.comingSoon.backToLobby",entityDetailBreadcrumbLobby:"entity.detail.breadcrumb.lobby",clowdersListTitle:"clowdersList.title",clowdersListEyebrow:"clowdersList.eyebrow",clowdersListEmptyState:"clowdersList.emptyState",catteriesListTitle:"catteriesList.title",catteriesListEyebrow:"catteriesList.eyebrow",catteriesListEmptyState:"catteriesList.emptyState",clowdersCanvasAriaLabel:"clowdersCanvas.ariaLabel",catteriesCanvasAriaLabel:"catteriesCanvas.ariaLabel",entityCanvasTotalLabel:"entityCanvas.totalLabel",entityCanvasCatsLabel:"entityCanvas.catsLabel",entityCanvasMembersLabel:"entityCanvas.membersLabel",entityCanvasClowdersLabel:"entityCanvas.clowdersLabel",entityCanvasIdLabel:"entityCanvas.idLabel",entityCanvasCreatedLabel:"entityCanvas.createdLabel",entityCanvasSelectedClowderLabel:"entityCanvas.selectedClowderLabel",entityCanvasSelectedCatteryLabel:"entityCanvas.selectedCatteryLabel",entityCanvasOrganizationLabel:"entityCanvas.organizationLabel",entityCanvasParentCatteryLabel:"entityCanvas.parentCatteryLabel",entityCanvasFormalClowderLabel:"entityCanvas.formalClowderLabel",entityCanvasNoOrganizationLabel:"entityCanvas.noOrganizationLabel",entityCanvasNoFormalClowdersLabel:"entityCanvas.noFormalClowdersLabel",entityCanvasOpenClowderAction:"entityCanvas.openClowderAction",entityCanvasOpenCatteryAction:"entityCanvas.openCatteryAction",entityCanvasCatterySubtitle:"entityCanvas.catterySubtitle",catProfileNotFoundTitle:"catProfile.notFound.title",catProfileNotFoundBody:"catProfile.notFound.body",entitiesSidebarSectionCats:"entitiesSidebar.section.cats",entitiesSidebarSectionClowders:"entitiesSidebar.section.clowders",entitiesSidebarSectionCatteries:"entitiesSidebar.section.catteries",entitiesSidebarNewCat:"entitiesSidebar.newCat",entitiesSidebarNewClowder:"entitiesSidebar.newClowder",entitiesSidebarNewCattery:"entitiesSidebar.newCattery",entityIndexEyebrow:"entityIndex.eyebrow",entityIndexTitle:"entityIndex.title",entityIndexColumnHeaderCats:"entityIndex.columnHeader.cats",entityIndexColumnHeaderClowders:"entityIndex.columnHeader.clowders",entityIndexColumnHeaderCatteries:"entityIndex.columnHeader.catteries",entityIndexCardTotal:"entityIndex.card.total",entityIndexCardOpenCanvasAriaLabel:"entityIndex.card.openCanvasAriaLabel",entitiesShellAriaLabel:"entitiesShell.ariaLabel",entitiesShellSurfaceLabel:"entitiesShell.surfaceLabel",entitiesShellBrandLabel:"entitiesShell.brandLabel",entitiesShellExitButtonAriaLabel:"entitiesShell.exitButtonAriaLabel",clowderHomeAriaLabel:"clowderHome.ariaLabel",clowderHomeChipPartOf:"clowderHome.chip.partOf",clowderHomeChipCrossUnit:"clowderHome.chip.crossUnit",clowderHomeTabCats:"clowderHome.tab.cats",clowderHomeTabSettings:"clowderHome.tab.settings",clowderHomeEmptyCats:"clowderHome.empty.cats",clowderHomeSettingsBody:"clowderHome.settings.body",clowderHomeNotFoundTitle:"clowderHome.notFound.title",clowderHomeNotFoundBody:"clowderHome.notFound.body",catteryHomeAriaLabel:"catteryHome.ariaLabel",catteryHomeTabMembers:"catteryHome.tab.members",catteryHomeTabClowders:"catteryHome.tab.clowders",catteryHomeTabCats:"catteryHome.tab.cats",catteryHomeTabSettings:"catteryHome.tab.settings",catteryHomeEmptyMembers:"catteryHome.empty.members",catteryHomeEmptyClowders:"catteryHome.empty.clowders",catteryHomeEmptyCats:"catteryHome.empty.cats",catteryHomeSettingsBody:"catteryHome.settings.body",catteryHomeNotFoundTitle:"catteryHome.notFound.title",catteryHomeNotFoundBody:"catteryHome.notFound.body"},Wp={"app.brandName":"CATS INC","app.loadingWithSurface":"Loading {surface}","app.loadingEllipsis":"Loading …","app.errorTitle":"Could not start Cats","app.errorEyebrow":"Error","app.loadErrorMessage":"Failed to load","app.loadStateFailedWithStatus":"Failed to load app state ({status})","app.title":"Cats","setupWizard.adminCredentialsHint":"Use these credentials to sign in after setup. They are separate from your display profile.","setupWizard.adminIdentifierLabel":"Admin login email","setupWizard.adminIdentifierPlaceholder":"you@example.com","setupWizard.adminPasswordLabel":"Admin password","setupWizard.adminPasswordPlaceholder":"Create a password","auth.login.title":"Sign in to Cats","auth.login.subtitle":"Use the local admin credentials created during setup.","auth.login.identifierLabel":"Email","auth.login.identifierPlaceholder":"you@example.com","auth.login.passwordLabel":"Password","auth.login.passwordPlaceholder":"Enter your password","auth.login.submit":"Sign in","auth.login.submitting":"Signing in…","auth.login.invalidCredentials":"The email or password is incorrect.","auth.login.forbidden":"Sign-in is temporarily blocked or not allowed.","auth.login.csrfMismatch":"Security token mismatch. Refresh and try again.","auth.login.failed":"Sign-in failed.","auth.login.failedWithStatus":"Sign-in failed ({status}).","auth.login.googleOriginHint":"Google sign-in only works on authorized Google JavaScript origins. If this LAN/IP origin is not authorized, use local admin credentials.","auth.login.googleUnavailable":"Google sign-in is unavailable on this origin. Use local admin credentials or open Cats from an authorized origin.","auth.repair.title":"Repair Cats authentication","auth.repair.subtitle":"Cats found setup-complete state but cannot read a usable auth state file. Recreate the first local Admin account to unlock this workspace.","auth.repair.displayNameLabel":"Owner display name","auth.repair.displayNamePlaceholder":"Owner","auth.repair.identifierLabel":"Admin login email","auth.repair.identifierPlaceholder":"you@example.com","auth.repair.passwordLabel":"Admin password","auth.repair.passwordPlaceholder":"Create a replacement password","auth.repair.recoveryTokenLabel":"Recovery token","auth.repair.recoveryTokenPlaceholder":"Required recovery token","auth.repair.recoveryTokenHint":"Required for every repair. Read it from the local auth-recovery-token file printed at startup.","auth.repair.submit":"Repair and sign in","auth.repair.submitting":"Repairing…","auth.repair.forbidden":"Repair requires the one-time recovery token.","auth.repair.failed":"Repair failed.","auth.repair.failedWithStatus":"Repair failed ({status}).","appHost.label":"App","appHost.notInstalledTitle":"App not installed","appHost.backToLobby":"Back to Lobby","appHost.subtitleRendererPending":"App renderer pending","appHost.subtitleDisabled":"App disabled","appHost.sectionPackage":"Package","appHost.sectionStatus":"Status","appHost.sectionPublisher":"Publisher","shared.productRenderer.errorEyebrow":"Renderer Error","shared.productRenderer.chatUnavailableTitle":"Chat unavailable","shared.productRenderer.unknownError":"Unknown renderer error.","shared.product.bootLoadingAria":"Loading Cats {productName}","platform.product.chat.name":"Cats Chat","platform.product.chat.subtitle":"Conversations with companions and personal agents","platform.product.chat.settingsLabel":"Chat","platform.product.code.name":"Cats Code","platform.product.code.subtitle":"Repos, runs, and codespaces","platform.product.code.settingsLabel":"Code","platform.product.work.name":"Cats Work","platform.product.work.subtitle":"Projects, approvals, and operator workflow","platform.product.work.settingsLabel":"Work","lobby.accountSettingsAriaLabel":"Account settings","lobby.openAccountSettings":"Open account settings","lobby.runtimeStatusLabel":"Runtime status: {runtimeStatus}","lobby.productsSectionTitle":"Products","lobby.appsSectionTitle":"Apps","lobby.continueText":"Continue","lobby.openEntry":"Open {entryTitle}","lobby.greeting.chooseSurface":"Choose a surface and get moving.","lobby.greeting.homeReady":"Home base is ready.","lobby.greeting.pickProduct":"Chat, Work, or Code. Your call.","lobby.greeting.everythingStaged":"Everything is staged. Pick a lane.","lobby.greeting.openSurface":"Open the surface that fits the task.","lobby.greeting.awake":"Cats Inc is awake.","lobby.greeting.continue":"Continue where the work makes sense.","shared.runtimeStatus.tooltip.ready":"Cats Runtime is connected","shared.runtimeStatus.tooltip.degraded":"Cats Runtime is starting up","shared.runtimeStatus.tooltip.unavailable":"Cats Runtime is offline","shared.runtimeStatus.tooltip.unknown":"Checking Cats Runtime status…","shared.runtimeStatus.chip.ready":"Runtime connected","shared.runtimeStatus.chip.degraded":"Runtime degraded","shared.runtimeStatus.chip.unavailable":"Runtime unavailable","settings.general.profileTitle":"Profile","settings.general.profileDescription":"This is your platform-wide profile across Chat, Code, Work, and Lobby.","settings.general.avatarLabel":"Avatar","settings.general.avatarChangeLabel":"Change avatar","settings.general.avatarUploadLabel":"Upload avatar","settings.general.avatarRemoveLabel":"Remove avatar","settings.general.nameLabel":"Name","settings.general.accountTitle":"Account","settings.general.accountDescription":"End the current browser session on this device.","settings.general.signOutButton":"Sign out","settings.general.signingOutButton":"Signing out…","settings.general.signOutFailed":"Sign-out failed.","settings.general.signOutFailedWithStatus":"Sign-out failed ({status}).","settings.general.signOutCsrfError":"Security token mismatch. Refresh and try again.","settings.general.signOutForbiddenError":"Sign-out is not allowed right now.","settings.general.signOutUnauthenticated":"You are already signed out.","settings.general.languageTitle":"Language","settings.general.languageDescription":"Choose how assistants answer and how Cats displays its interface.","settings.general.assistantLanguagePreferenceLabel":"Assistant response language","settings.general.assistantLanguagePreferenceDescription":"Sets the default language instruction for assistant replies. User requests in a turn still take priority.","settings.general.assistantLanguageSelectAriaLabel":"Assistant response language","settings.general.assistantLanguageUnspecifiedOption":"Unspecified","settings.general.languagePreferenceLabel":"Display language","settings.general.languagePreferenceDescription":"Auto-detect follows your browser or desktop language. Named languages are shown in their own language.","settings.general.languageSelectAriaLabel":"Display language","settings.general.languageAutoOption":"Auto-detect","settings.general.languageEnglishOption":"English","settings.general.languageTraditionalChineseOption":"Traditional Chinese","settings.general.lobbyMotionTitle":"Lobby motion","settings.general.lobbyMotionDescription":"Choose how lively the Lobby background should feel. Reduced is the default.","settings.general.lobbyMotionOffLabel":"Off","settings.general.lobbyMotionOffDescription":"Keep the Lobby still and remove the bouncing cats background.","settings.general.lobbyMotionReducedLabel":"Reduced","settings.general.lobbyMotionReducedDescription":"Keep the background alive, but soft and slow.","settings.general.lobbyMotionFullLabel":"Full","settings.general.lobbyMotionFullDescription":"Let the cats bounce at full speed in the Lobby background.","settings.general.guideCatAssistTitle":"Guide Cat assist","settings.general.guideCatAssistDisabledDescription":"{guideCatName} is disabled. Enable it again from Settings > Assistants when you want {guideCatName} help back.","settings.general.guideCatAssistEnabledDescription":"Choose how {guideCatName} appears when you click the floating avatar.","settings.general.openAssistantsButton":"Open Assistants","settings.general.guideCatAutoLabel":"Auto","settings.general.guideCatAutoDescription":"First time shows a speech bubble, then switches to a full side panel.","settings.general.guideCatSidePanelLabel":"Side panel","settings.general.guideCatSidePanelDescription":"Always open a full side panel when you click the guide cat avatar.","settings.general.guideCatBubbleLabel":"Speech bubble","settings.general.guideCatBubbleDescription":"Always show a compact speech bubble with quick actions.","settings.general.updateNameError":"Failed to update name","settings.general.updateAssistantLanguageError":"Failed to update assistant language","settings.general.updateLanguageError":"Failed to update language","settings.general.updateLobbyAnimationError":"Failed to update Lobby motion","settings.general.updateGuideCatModeError":"Failed to update Guide Cat mode","settings.general.removeAvatarError":"Failed to remove avatar","settings.general.saveAvatarError":"Failed to save avatar","settings.shell.heading":"Settings","settings.shell.sectionGeneral":"General","settings.shell.sectionCats":"Cats","settings.shell.subsectionMyCats":"My Cats","settings.shell.subsectionAssistants":"Assistants","settings.shell.sectionApps":"Apps","settings.shell.sectionDesktop":"Desktop","settings.shell.sectionRuntime":"Runtime","settings.shell.sectionData":"Data","settings.shell.closeButtonLabel":"Close settings","settings.chat.bossToolProfileTitle":"Boss Cat tool profile","settings.chat.bossToolProfileUpdateFailure":"Failed to update Boss Cat tool profile","settings.chat.advancedControlsFailure":"Failed to update chat advanced controls","settings.conversation.productLabelChat":"Cats Chat","settings.conversation.productLabelCode":"Cats Code","settings.conversation.productLabelWork":"Cats Work","settings.conversation.behaviorTitle":"Conversation behavior","settings.conversation.behaviorDescription":"These settings affect {product} only.","settings.conversation.showVerboseLabel":"Show verbose messages","settings.conversation.showVerboseDescription":"Keep system-level room and orchestration messages visible in chat.","settings.conversation.showLiveProgressLabel":"Show live progress details","settings.conversation.showLiveProgressDescription":"Show more granular progress updates while a response is still running.","settings.conversation.updateFailure":"Failed to update conversation behavior","settings.conversation.concurrentLayoutLabel":"Concurrent response layout","settings.conversation.concurrentLayoutDescription":"Choose how multi-model replies are arranged in {product}.","settings.conversation.layoutInlineStack":"Inline stack","settings.conversation.layoutCompareCards":"Compare cards","settings.conversation.layoutFocusRail":"Focus rail","settings.conversation.layoutAdaptive":"Adaptive","settings.advancedDraftControls.title":"Draft builder","settings.advancedDraftControls.description":"Let any {surface} draft add collaborators or compare against other models.","settings.advancedDraftControls.enableLabel":"Enable advanced draft controls","settings.advancedDraftControls.toggleDescription":"Shows whichever +collaborate or +compare button each draft entry hides by default.","settings.runtime.statusChip.runtimeUnavailable":"Runtime unavailable","settings.runtime.statusChip.runtimeDegraded":"Runtime degraded","settings.runtime.statusChip.runtimeReady":"Runtime ready","settings.runtime.statusChip.setupReadyToApply":"Setup ready to apply","settings.runtime.statusChip.setupNeedsRemediation":"Setup needs remediation","settings.runtime.statusChip.providerScanRequired":"Provider scan required","settings.runtime.statusChip.setupUnavailable":"Setup unavailable","settings.runtime.statusTitle":"Runtime status","settings.runtime.statusDescription":"Whether cats-runtime is reachable and your provider setup is complete. The breakdown below shows how many providers are currently usable.","settings.runtime.metricReadyProviders":"ready providers","settings.runtime.metricProvidersScanned":"providers scanned","settings.runtime.metricNeedAttention":"need attention","settings.runtime.needAttentionTitle":"Need attention","settings.runtime.needAttentionDescription":"Providers the scan flagged for remediation before they can join the runtime.","settings.runtime.providerHelpersTitle":"Provider helpers","settings.runtime.providerHelpersDescription":"Run packaged installers to check, install, upgrade, repair, or uninstall each local CLI provider. Actions stream through the desktop host bridge; the renderer never executes scripts directly.","settings.runtime.loadingHelpers":"Loading helpers…","settings.runtime.noProviderHelpers":"No provider helpers are bundled with this host build.","settings.runtime.workingState":"Working…","settings.runtime.actions.check":"Check","settings.runtime.actions.install":"Install","settings.runtime.actions.upgrade":"Upgrade","settings.runtime.actions.repair":"Repair","settings.runtime.actions.uninstall":"Uninstall","settings.runtime.uninstallButtonLabel":"Uninstall","settings.runtime.modelCatalogsTitle":"Model catalogs","settings.runtime.modelCatalogsDescription":"Ask cats-runtime to refresh every provider's model list now, so newly released models show up in the Brain picker without waiting for the background caches to expire.","settings.runtime.refreshingState":"Refreshing","settings.runtime.refreshCatalogsButton":"Refresh model catalogs","settings.runtime.standaloneSetupTitle":"Standalone setup","settings.runtime.standaloneSetupDescription":"Open the standalone runtime setup when you need provider remediation or a deeper scan.","settings.runtime.openStandaloneSetup":"Open Cats Runtime setup","settings.runtime.browserHandoffError":"Cats could not open Runtime setup in your browser. Please try again.","settings.runtime.cancelActionLabel":"Cancel","settings.runtime.cancelActionFallbackLabel":"Close","settings.runtime.refreshFailure":"Refresh failed.","settings.runtime.refreshFailureWithStatus":"Refresh failed ({status}).","settings.runtime.refreshSummary":"Refreshed {refreshed} target{pluralSuffix}","settings.runtime.refreshSummaryWithFailures":"Refreshed {refreshed} · {failed} failed","settings.runtime.uninstallTitle":"Uninstall {label}","settings.runtime.uninstallDescriptionPrefix":"This will remove user-owned files for","settings.runtime.uninstallDescriptionSuffix":"Auth files, API keys, and external configuration are left in place. Active sessions using this provider may fail until another provider is configured.","settings.runtime.uninstallHelperLabel":"Helper: {helperId}","settings.runtime.uninstallScriptLabel":"Script: {scriptPath}","settings.runtime.computingPlannedRemovals":"Computing planned removals…","settings.runtime.previewUnavailable":"Preview unavailable; the uninstall will still report planned actions.","settings.runtime.nothingToRemove":"Nothing to remove — the helper reports this provider is not installed.","settings.runtime.systemInstallDetected":"Note: a system install was detected at {installPath} but it cannot be removed by this helper.","settings.runtime.willRemoveItems":"Will remove {itemCount} item{pluralSuffix}:","settings.runtime.systemInstallCannotRemove":"Note: a system install at {installPath} cannot be removed by this helper.","settings.runtime.actionNoResult":"{helperLabel}: host did not report a result for {actionLabel}.","settings.runtime.actionSuccessComplete":"{helperLabel}: {actionLabel} complete.","settings.runtime.actionSuccessNothingToRemove":"{helperLabel}: {actionLabel} reported nothing to remove.","settings.runtime.actionPartialWithDetail":"{helperLabel}: {actionLabel} {status} - {detail}","settings.runtime.actionPartial":"{helperLabel}: {actionLabel} {status}.","settings.runtime.actionFailedWithDetail":"{helperLabel}: {actionLabel} failed - {detail}.","settings.runtime.actionFailed":"{helperLabel}: {actionLabel} failed.","settings.runtime.hostBridgeUnavailableClient":"Desktop host bridge is not available in this client.","settings.runtime.hostBridgeUnavailable":"Desktop host bridge is not available.","settings.runtime.previewMissingResult":"Host did not return a preview result.","settings.runtime.previewFailed":"Preview failed.","settings.runtime.fixStepCount":"{count} fix step{pluralSuffix}","settings.runtime.helperLabel.windowsCliReadiness":"Windows PowerShell + PATH readiness helper","settings.runtime.helperLabel.windowsVcRedist":"Windows Microsoft Visual C++ 2015-2022 Redistributable (x64)","settings.runtime.helperLabel.nodeHostInstaller":"{platform} Node.js LTS host installer","settings.runtime.helperLabel.githubCliHostInstaller":"{platform} GitHub CLI host installer","settings.runtime.helperLabel.npmPrefixHelper":"{platform} npm prefix and PATH prerequisite helper","settings.runtime.helperLabel.setupReadinessAudit":"{platform} setup readiness audit","settings.runtime.helperLabel.packagedBackgroundProcessHelper":"{platform} packaged setup background process helper","settings.runtime.helperLabel.packagedProviderUninstallHelper":"{platform} packaged provider uninstall helper","settings.runtime.helperLabel.packagedNpmGlobalCliInstallerHelper":"{platform} packaged npm-global CLI installer helper","settings.runtime.helperLabel.nativeProviderInstaller":"{platform} native {providerLabel} installer","settings.runtime.helperLabel.providerInstaller":"{platform} {providerLabel} installer","settings.runtime.helperLabel.localModelInstaller":"{platform} {providerLabel} local-model installer","settings.runtime.helperUnavailableReason":"{helperLabel} is not currently bundled with this host build.","settings.runtime.helperUnsupportedPlatformReason":"{helperLabel} is currently only supported on {platformSupport}.","settings.runtime.platformSupport.allDesktop":"Windows, macOS, or Linux hosts","settings.runtime.platformSupport.windows":"Windows hosts","settings.runtime.platformSupport.windowsWsl":"Windows hosts with WSL support","settings.runtime.platformSupport.macos":"macOS hosts","settings.runtime.platformSupport.linux":"Linux hosts","settings.runtime.helperUnsupportedActionReason":"{helperLabel} does not support {actionLabel}.","settings.runtime.lifecycleStatus.authRequired":"authentication required","settings.runtime.lifecycleStatus.blocked":"blocked","settings.runtime.lifecycleStatus.changesRequired":"changes required","settings.runtime.lifecycleStatus.failed":"failed","settings.runtime.lifecycleStatus.notInstalled":"not installed","settings.runtime.lifecycleStatus.preview":"preview","settings.runtime.lifecycleStatus.ready":"ready","settings.runtime.lifecycleStatus.restartRequired":"restart required","settings.runtime.lifecycleStatus.uninstalled":"uninstalled","settings.runtime.lifecycleDetail.launchWslFirstBoot":"Launch the target WSL distro once to finish first-user setup, then rerun the packaged setup check.","settings.runtime.lifecycleDetail.startDockerWarmUp":"Start Docker Desktop and wait for the engine to become ready, then rerun the packaged setup check.","settings.runtime.lifecycleDetail.runMissingHostSubstrate":"Run {helperLabel} to install the missing host substrate flagged by the readiness audit.","settings.runtime.lifecycleDetail.restartThenRerunMode":"Restart the host or Windows session, then rerun {helperLabel} in {mode} mode.","settings.runtime.lifecycleDetail.restartThenRerun":"Restart Windows or the current session, then rerun {helperLabel}.","settings.runtime.lifecycleDetail.relaunchThenVerify":"Relaunch Cats Desktop Host, then rerun {helperLabel} to verify the updated packaged setup state.","settings.runtime.lifecycleDetail.elevationRequired":"{helperLabel} requires an elevated host step before it can continue.","settings.runtime.lifecycleDetail.authThenRerunMode":"Complete the required sign-in flow, then rerun {helperLabel} in {mode} mode.","settings.runtime.lifecycleDetail.retryAfterFailure":"Retry {helperLabel} after addressing the last failure.","settings.runtime.lifecycleDetail.runMissingRequirement":"Run {helperLabel} to install the missing packaged setup requirement.","settings.runtime.lifecycleDetail.finishManualFollowThrough":"Finish the manual follow-through for {helperLabel}, then rerun a verification step.","settings.runtime.lifecycleDetail.runApplyRemainingChanges":"Run {helperLabel} again to apply the remaining packaged setup changes.","settings.runtime.lifecycleDetail.rerunCheckToVerify":"Rerun {helperLabel} in check mode if you want to verify the packaged setup state again.","settings.runtime.lifecycleDetail.finishedWithStatus":"{helperLabel} {mode} finished with {status}.","settings.runtime.lifecycleMode.apply":"apply","settings.runtime.lifecycleMode.check":"check","settings.runtime.lifecycleMode.force":"force","settings.runtime.lifecycleMode.uninstall":"uninstall","settings.runtime.lifecycleMode.upgrade":"upgrade","settings.route.title.assistants":"Assistants","settings.route.title.myCats":"My Cats","settings.route.title.chat":"Chat","settings.route.title.work":"Work","settings.route.title.code":"Code","settings.route.title.apps":"Apps","settings.route.title.desktop":"Desktop","settings.route.title.runtime":"Runtime","settings.route.title.data":"Data","settings.route.title.general":"General","settings.route.title.notFound":"Settings page not found","settings.route.notFound.description":"This settings page is not registered in the current Cats build.","settings.route.notFound.openGeneral":"Open General settings","settings.canvas.loadingLabel":"Loading settings…","settings.canvas.loadErrorTitle":"Couldn’t load settings","settings.canvas.loadErrorBody":"The platform service didn’t respond. Check that the runtime is up and try again.","settings.apps.sectionTitle":"Apps","settings.apps.sectionDescription":"Installed Cats apps, connector packages, and system modules.","settings.apps.installedPackagesLabel":"Installed packages","settings.apps.installedPackagesDescription":"{count} connector package{pluralSuffix}","settings.apps.noInstalledAppsLabel":"Installed apps","settings.apps.noInstalledAppsDescription":"No installed apps are registered yet.","settings.apps.emptyStateChipLabel":"Empty","settings.apps.localInstallTitle":"Local install","settings.apps.localInstallDescription":"Review a local Cats app package before adding it to Cats.","settings.apps.packagePathLabel":"Package path","settings.apps.packagePathPlaceholder":"/path/to/cats-app-package","settings.apps.reviewButton":"Review","settings.apps.readyStatusChip":"Ready","settings.apps.needsReviewStatusChip":"Needs review","settings.apps.noLobbyRoute":"No Lobby route","settings.apps.installButton":"Install","settings.apps.enableAction":"Enable","settings.apps.disableAction":"Disable","settings.apps.uninstallAction":"Uninstall","settings.apps.openAction":"Open","settings.apps.settingsAction":"Settings","settings.apps.uninstallTitle":"Uninstall app","settings.apps.enableTitle":"Enable app","settings.apps.disableTitle":"Disable app","settings.apps.uninstallMessage":'Uninstall "{appDisplayName}"? It will be removed from Cats without deleting package files.',"settings.apps.enableMessage":'Enable "{appDisplayName}"? It can appear in Cats wherever its permissions allow.',"settings.apps.disableMessage":'Disable "{appDisplayName}"? It will stop appearing in Lobby and scoped app routes.',"settings.apps.installTitle":"Install app","settings.apps.installMessage":'Install "{appDisplayName}"? It will be enabled after install.',"settings.apps.localInstallReady":"Ready","settings.apps.localInstallNeedsReview":"Needs review","settings.apps.category.connector":"Connector","settings.apps.category.productModule":"Product module","settings.apps.category.userApp":"User app","settings.apps.installState.enabled":"Enabled","settings.apps.installState.installed":"Installed","settings.apps.installState.disabled":"Disabled","settings.apps.installState.error":"Error","settings.apps.installState.upgradePending":"Upgrade pending","settings.apps.installState.uninstalled":"Uninstalled","settings.apps.trustTier.localUser":"Local user","settings.apps.trustTier.system":"System","settings.apps.trustTier.thirdParty":"Third party","settings.apps.permissionCount":"{count} permission{pluralSuffix}","settings.apps.toolCount":"{count} tool{pluralSuffix}","settings.apps.capabilitySingular":"capability","settings.apps.capabilityPlural":"capabilities","settings.apps.connectorCountSingle":"{connector}: {count} {capabilityLabel}","settings.apps.connectorCountMany":"{connectorCount} connectors, {count} {capabilityLabel}","settings.apps.authLabel":"Auth","settings.apps.confirmMutationFailed":"Could not confirm the action. Please retry.","settings.apps.confirmMutationFailedFallback":"Action confirmation failed before execution.","settings.apps.mutationFailed":"{action} failed.","settings.apps.mutationFailedFallback":"The action failed.","settings.apps.packagePathRequired":"Package path is required.","settings.apps.validationFailed":"Package validation failed.","settings.apps.error.notInstalled":'Cats app "{appId}" is not installed.',"settings.apps.error.notEnabled":'Cats app "{appId}" is not enabled.',"settings.apps.error.packagePathNotFound":"Package path does not exist: {path}.","settings.apps.error.invalidManifestJson":"cats.app.json is not valid JSON.","settings.apps.error.cannotReadManifest":"Cannot read cats.app.json.","settings.apps.error.reservedAppId":'Cats app id "{appId}" is reserved.',"settings.apps.error.duplicateAppId":'Cats app id "{appId}" is already installed.',"settings.apps.error.manifestInvalid":"Cats app manifest must be an object.","settings.apps.error.validationIssueWithPath":"Package validation failed at {path}: {code}.","settings.apps.error.validationIssue":"Package validation failed: {code}.","settings.apps.openPairingUrl":"Open pairing URL","settings.data.resetAllDataTitle":"Reset all data","settings.data.resetAllDataDescription":"This will erase all chats, cats, platform preferences, and setup state. You will be returned to the setup wizard.","settings.data.resetButtonResetting":"Resetting...","settings.data.resetButtonLabel":"Reset all data","settings.data.resetFailure":"Failed to reset setup.","settings.conversation.preferenceUpdateFailure":"Failed to update preference.","settings.desktop.mobilePairingTitle":"Mobile pairing","settings.desktop.mobilePairingDescription":"LAN readiness for the bundled Expo Go mobile shell.","settings.desktop.mobilePairingStatusDisabled":"Disabled","settings.desktop.mobilePairingStatusLoopbackOnly":"Loopback only","settings.desktop.mobilePairingStatusNoLanAddress":"No LAN address","settings.desktop.mobilePairingStatusReady":"Ready","settings.desktop.mobilePairingStatusValidationPending":"Manifest validation pending","settings.desktop.mobilePairingEnableLabel":"Enable mobile pairing","settings.desktop.mobilePairingEnableDescription":"Writes the desktop .env values needed for LAN access. Restart Cats Desktop after applying.","settings.desktop.mobilePairingEnableButton":"Enable","settings.desktop.mobilePairingApplyingButton":"Applying...","settings.desktop.mobilePairingBindLabel":"Bind","settings.desktop.mobilePairingReachabilityLabel":"Reachability","settings.desktop.mobilePairingLanAddressLabel":"LAN address","settings.desktop.mobilePairingNoneLabel":"None","settings.desktop.mobilePairingReachabilityLoopback":"Loopback","settings.desktop.mobilePairingReachabilityLan":"LAN address","settings.desktop.mobilePairingReachabilityAllInterfaces":"All interfaces","settings.desktop.mobilePairingReachabilityOtherInterface":"Interface mismatch","settings.desktop.mobilePairingAllowLanLabel":"Allow LAN access","settings.desktop.mobilePairingAllowLanDescription":"Cats is bound to loopback. Restart with {bindOverrideEnv} before scanning from a phone.","settings.desktop.mobilePairingApplyAndRestartButton":"Apply and restart","settings.desktop.mobilePairingNoLanAddressNote":"No non-loopback LAN IPv4 address was detected.","settings.desktop.mobilePairingHostMismatchNote":"The current bind host does not match a LAN IPv4 address.","settings.desktop.mobilePairingDiagnosticLabel":"Diagnostic manifest","settings.desktop.mobilePairingDiagnosticCopyButton":"Copy URL","settings.desktop.mobilePairingDiagnosticCopiedMessage":"Copied diagnostic manifest URL.","settings.desktop.mobilePairingExpoUrlLabel":"Expo Go URL","settings.desktop.mobilePairingExpoUrlCopiedMessage":"Copied Expo Go URL.","settings.desktop.mobilePairingCopyUrlButton":"Copy URL","settings.desktop.mobilePairingQrUrlTooLong":"URL too long","settings.desktop.mobilePairingQrCodeLabel":"Mobile pairing QR code","settings.desktop.mobilePairingNoPairingUrlStatus":"QR pending","settings.desktop.mobilePairingOpenPairingUrlLabel":"Open pairing URL","settings.desktop.mobilePairingCopyEnvValuesSuccess":"Copied mobile pairing env values.","settings.desktop.mobilePairingConfirmRestart":"Apply 0.0.0.0 binding and restart Cats Desktop now? Unsaved changes will be lost.","settings.desktop.mobilePairingDesktopUpdateSuccess":"Updated {envPath}. Restarting Cats Desktop…","settings.desktop.mobilePairingDesktopUpdateFailure":"Failed to update desktop env.","settings.desktop.updatesTitle":"App updates","settings.desktop.updatesDescription":"Check for and install Cats desktop updates. Downloads never start on their own.","settings.desktop.updatesCurrentVersionLabel":"Installed version","settings.desktop.updatesChannelLabel":"Release channel","settings.desktop.updatesLastCheckedLabel":"Last checked","settings.desktop.updatesLastCheckedNever":"Not checked yet","settings.desktop.updatesAvailableVersionLabel":"Available version","settings.desktop.updatesStatusUnavailable":"Updates unavailable","settings.desktop.updatesStatusIdle":"Ready to check","settings.desktop.updatesStatusChecking":"Checking","settings.desktop.updatesStatusUpToDate":"Up to date","settings.desktop.updatesStatusAvailable":"Update available","settings.desktop.updatesStatusDownloading":"Downloading","settings.desktop.updatesStatusDownloaded":"Ready to install","settings.desktop.updatesStatusInstalling":"Installing","settings.desktop.updatesStatusFailed":"Update failed","settings.desktop.updatesActionCheck":"Check for Updates","settings.desktop.updatesActionChecking":"Checking…","settings.desktop.updatesActionDownload":"Download Update","settings.desktop.updatesActionDownloading":"Downloading…","settings.desktop.updatesActionRestartInstall":"Restart and Install","settings.desktop.updatesActionInstalling":"Installing…","settings.desktop.updatesToastUpToDate":"Cats is already up to date.","settings.desktop.updatesWindowsInstallerNotice":"Cats will close and the Windows installer will open. You may be asked to confirm the installation folder.","settings.desktop.updatesPreviewNotice":"This is an unsigned preview build. Updates are for testing the release flow and are not a supported installation.","settings.desktop.updatesErrorOffline":"Cats could not reach the update service.","settings.desktop.updatesErrorTimeout":"The update service did not respond in time.","settings.desktop.updatesErrorProviderRejected":"The update service rejected the request.","settings.desktop.updatesErrorMetadataInvalid":"The update information could not be read.","settings.desktop.updatesErrorChecksumMismatch":"The downloaded update failed its integrity check.","settings.desktop.updatesErrorSignatureRejected":"The downloaded update failed its signature check.","settings.desktop.updatesErrorUnsupportedPackage":"This installation cannot update itself.","settings.desktop.updatesErrorDownloadCancelled":"The update download was cancelled.","settings.desktop.updatesErrorInstallHandoffFailed":"Cats could not open the installer.","settings.desktop.updatesErrorUnknown":"The update could not be completed.","settings.desktop.startupTitle":"Startup behavior","settings.desktop.startupDescription":"Control whether Cats Desktop starts when you sign in, whether it opens the main window automatically after sign-in startup, and whether closing the window keeps Cats available in the system tray.","settings.desktop.startupSignInLabel":"Start Cats Desktop when you sign in to your computer","settings.desktop.startupSignInDescription":"Keep Cats Desktop ready in the background as soon as you sign in.","settings.desktop.startupTrayLabel":"Keep Cats in the system tray when you close the window","settings.desktop.startupTrayDescription":"When enabled, closing the window hides Cats and keeps it running. When disabled, closing the window quits Cats.","settings.desktop.startupOpenWindowLabel":"Open Cats after sign-in startup","settings.desktop.startupOpenWindowDescription":"When disabled, Cats can start in the background after you sign in without opening the main window automatically. Opening Cats yourself still shows the app.","work.newChatDraft.startProjectChipLabel":"Start a project","work.newChatDraft.startProjectPrompt":"Spin up a new project workspace and outline its milestones.","work.newChatDraft.addTaskChipLabel":"Add a task","work.newChatDraft.addTaskPrompt":"Capture a new task with owner, deadline, and priority.","work.newChatDraft.planSprintChipLabel":"Plan a sprint","work.newChatDraft.planSprintPrompt":"Plan the next sprint with goals and a delivery cadence.","work.newChatDraft.scheduleReviewChipLabel":"Schedule a review","work.newChatDraft.scheduleReviewPrompt":"Schedule a project review with the right cats invited.","work.newChatDraft.triageBacklogChipLabel":"Triage backlog","work.newChatDraft.triageBacklogPrompt":"Walk the backlog with me and triage what to ship next.","work.items.listTitle":"Work items","work.items.newAction":"New work item","work.items.importExternalIssueAction":"Import issue","work.items.importExternalIssueAriaLabel":"Import external issue","work.items.createNewWorkItem":"New work item","work.items.createNewWorkItemAriaLabel":"Create new work item","work.items.loading":"Loading work items…","work.items.loadError":"Failed to load work items: {errorMessage}","work.items.emptyIntro":"No work items yet. Click","work.items.emptyActionLabel":"New work item","work.items.emptySuffix":"to create one.","work.items.projectPrefix":"in {projectTitle}","work.items.projectOrphan":"orphan","work.items.pill.decision":"decision","work.items.pill.blocked":"blocked","work.items.tasksLabel":"tasks","work.items.openWorkItemAriaLabel":"Open work item {title}","work.items.parentWorkItemTooltip":"Parent work item: {parentTitle}","work.item.backLabel":"Work items","work.item.backArrowLabel":"← Work items","work.item.updatedAtPrefix":"updated {updatedAt}","work.item.deleteLabel":"Delete work item","work.item.deleteLabelBusy":"Deleting…","work.item.deleteConfirmation":`Delete work item "{title}"?
|
|
@@ -35,9 +35,9 @@ Cats 會先透過監督式執行階段工作階段要求執行階段取消,再
|
|
|
35
35
|
使用 /mode companion 或 /mode agent 來切換。`,"telegram.command.mode.unknown":`未知模式:{mode}
|
|
36
36
|
請使用 /mode companion 或 /mode agent。`,"telegram.command.mode.switchUnavailable":"這個 bot 綁定目前無法切換模式。","telegram.command.mode.switched":`已將 {name} 切換為{mode}模式。
|
|
37
37
|
之後此聊天中的一般訊息會使用該模式。`,"telegram.command.unknownCommand":`未知指令:/{command}
|
|
38
|
-
輸入 /help 查看可用指令。`,"shared.operator.noTimestamp":"沒有時間","shared.operator.runStatus.running":"進行中","shared.operator.runStatus.blocked":"受阻","shared.operator.runStatus.completed":"已完成","shared.operator.runStatus.failed":"失敗","shared.operator.runStatus.cancelled":"已取消","shared.operator.runStatus.queued":"排隊中","shared.operator.runStatus.title":"執行狀態","shared.operator.branchStatus.pending":"等待中","shared.operator.branchStatus.running":"執行中","shared.operator.branchStatus.completed":"已完成","shared.operator.branchStatus.failed":"失敗","shared.operator.branchStatus.blocked":"受阻","shared.operator.branchStatus.cancelled":"已取消","shared.operator.branchStatus.waitingForConverge":"等待匯合","shared.operator.checkpointStatus.completed":"完成","shared.operator.checkpointStatus.cancelled":"已取消","shared.operator.checkpointStatus.open":"進行中","shared.operator.outcomeStatus.succeeded":"成功","shared.operator.outcomeStatus.blocked":"受阻","shared.operator.outcomeStatus.failed":"失敗","shared.operator.outcomeStatus.cancelled":"已取消","shared.operator.traceKind.approval":"批准","shared.operator.traceKind.checkpoint":"檢查點","shared.operator.traceKind.dispatch":"派工","shared.operator.traceKind.error":"錯誤","shared.operator.traceKind.outcome":"結果","shared.operator.traceKind.status":"狀態","shared.operator.traceKind.note":"附註","shared.operator.activity.label.recovery":"復原","shared.operator.activity.label.replay":"重放","shared.operator.activity.label.decision":"決策","shared.operator.activity.label.action":"動作","shared.operator.activity.label.artifact":"成果物","shared.operator.activity.label.update":"更新","shared.operator.activity.label.trace":"軌跡","shared.operator.eyebrow.inspector":"檢視器","shared.operator.runInspector.title":"執行檢視","shared.operator.runInspector.noHistory":"請選擇一個有歷史紀錄的房間,以查看軌跡與檢查點。","shared.operator.runInspector.summaryFallback":"這裡會顯示本次執行的軌跡、檢查點與結果紀錄。","shared.operator.meta.started":"開始於 {time}","shared.operator.meta.updated":"更新於 {time}","shared.operator.meta.stage":"階段:{stage}","shared.operator.workflowStage.blocked":"受阻","shared.operator.workflowStage.concurrentFanOut":"並行展開","shared.operator.workflowStage.continuationHandoff":"續接交接","shared.operator.workflowStage.convergeReview":"匯合檢閱","shared.operator.workflowStage.dispatch":"派工","shared.operator.workflowStage.initialDispatch":"初始派工","shared.operator.workflowStage.runtimeError":"執行階段錯誤","shared.operator.workflowStage.startupRecovery":"啟動復原","shared.operator.workflowStage.turnCompleted":"回合完成","shared.operator.meta.shape":"形態:{shape}","shared.operator.meta.reviewRequired":"需要檢閱","shared.operator.meta.guardrail":"保護條件:{guardrail}","shared.operator.meta.cooldown":"冷卻:{cooldown}","shared.operator.guard.maxContinuations":"達到最大續接次數","shared.operator.guard.maxDispatches":"達到最大派工次數","shared.operator.guard.maxTargetVisits":"達到單一目標最大造訪次數","shared.operator.guard.antiPingPong":"防止來回轉派","shared.operator.cooldown.active":"冷卻中","shared.operator.section.trace":"軌跡","shared.operator.section.checkpoints":"檢查點","shared.operator.noCheckpointsRecorded":"本次執行尚無檢查點紀錄。","shared.operator.checkpointSummaryFallback":"已紀錄檢查點。","shared.operator.section.branches":"分支","shared.operator.noBranchesRecorded":"本次執行尚無分支或交接紀錄。","shared.operator.branch.handoff":"交接:{handoffReason}","shared.operator.branch.strategy":"策略:{strategy}","shared.operator.branchStrategy.forkIfPossible":"可行時分支","shared.operator.branchStrategy.freshNoParent":"新分支無父層","shared.operator.branchStrategy.singleTargetReview":"單一目標檢閱","shared.operator.branchStrategy.transplantContext":"沿用上下文","shared.operator.branchHandoff.explicitMention":"明確提及","shared.operator.branchHandoff.operatorReroute":"操作員改派","shared.operator.branchHandoff.roomDefault":"房間預設","shared.operator.branchHandoff.roomEntry":"進入房間","shared.operator.branchHandoff.runtimeRetry":"執行階段重試","shared.operator.branchHandoff.workflowContinuation":"工作流程續接","shared.operator.branch.fromCheckpoint":"來源檢查點:{checkpointId}。","shared.operator.branch.noLineage":"尚未錄到檢查點血緣。","shared.operator.section.outcomes":"結果","shared.operator.noOutcomesRecorded":"本次執行尚無結果紀錄。","shared.operator.outcomeSummaryFallback":"已紀錄結果。","shared.operator.eyebrow.progress":"進度","shared.operator.noActiveRun":"目前沒有啟動中的 room 執行。請先開始或繼續對話以查看派工狀態。","shared.operator.progressSummaryFallback":"目前可檢視 room 的編排狀態。","shared.operator.metric.dispatches":"派工次數","shared.operator.metric.continuations":"續接次數","shared.operator.metric.targets":"目標數","shared.operator.approvalPending.singular":"{count} 項待處理同意","shared.operator.approvalPending.plural":"{count} 項待處理同意","shared.operator.meta.delivery":"交付:{deliveryMode}","shared.operator.meta.gates":"門檻:{gates}","shared.operator.meta.budget":"預算:{budgetLevel}","shared.operator.deliveryMode.artifactOnly":"僅成果物","shared.operator.deliveryMode.commitOnly":"僅提交","shared.operator.deliveryMode.deployPreview":"部署預覽","shared.operator.deliveryMode.prWithChecks":"含檢查的 Pull Request","shared.operator.deliveryMode.pushBranch":"推送分支","shared.operator.deliveryGate.manualReviewRequired":"需要人工檢閱","shared.operator.deliveryGate.ownerApprovalRequired":"需要擁有者核准","shared.operator.deliveryGate.publishArtifactRequired":"需要發布成果物","shared.operator.budgetLevel.normal":"正常","shared.operator.budgetLevel.warning":"警告","shared.operator.budgetLevel.blocked":"受阻","shared.operator.workflowShape.sequential":"依序","shared.operator.workflowShape.concurrent":"並行","shared.operator.workflowShape.converge":"匯合","shared.operator.inspectRunButton":"檢視執行","shared.operator.noTraceRecords":"本次執行尚無軌跡紀錄。","shared.operator.action.requestRetry":"要求重試","shared.operator.action.retryAgain":"再次重試","shared.operator.action.retrying":"重試中","shared.operator.action.retryRequested":"已要求重試","shared.operator.action.acknowledge":"標記已知悉","shared.operator.action.acknowledged":"已知悉","shared.operator.action.retryDescription":"記錄操作員希望重試這個受阻或失敗的執行。","shared.operator.action.replayStoredDispatchDescription":"透過既有操作員路徑重放已儲存的派工或工作流程延續。","shared.operator.action.retryTaskDescription":"記錄操作員希望重試這個受阻或失敗的任務。","shared.operator.action.retryFailedDescription":"重試失敗。操作員可以再次重放已儲存的派工。","shared.operator.action.acknowledgeDescription":"記錄操作員已查看目前的保護條件或事件狀態。","shared.operator.action.acknowledgeBlockedDescription":"記錄操作員已查看目前受阻或失敗的狀態。","shared.operator.action.status.retryInProgress":"重試進行中","shared.operator.action.status.retryFailed":"重試失敗","shared.operator.action.status.retryFailedWithError":"重試失敗:{error}","shared.operator.action.status.retryDispatched":"已派送重試","shared.operator.action.status.retryRequested":"已要求重試","shared.operator.action.status.acknowledged":"已知悉","shared.common.apply":"套用","shared.common.cancel":"取消","shared.common.close":"關閉","shared.common.delete":"刪除","shared.common.retry":"重試","shared.guideCat.panelGreeting":"嗨 {ownerDisplayName},我是 {guideCatName},你的導覽貓。可以點這些項目開始,或關閉面板自己探索吧。","shared.guideCat.welcomeGreeting":"歡迎,{ownerDisplayName}。我是你的導覽貓。這裡有一些你可以先嘗試的功能。","shared.guideCat.welcomeStartChat":"先開始一則聊天","shared.guideCat.welcomeMeetCats":"認識你的貓","shared.guideCat.welcomeExploreProducts":"探索產品","shared.guideCat.welcomeHideNow":"先隱藏","shared.guideCat.pillOpenLabel":"開啟導覽:{guideCatName}","shared.guideCat.pillDisableLabel":"停用導覽貓","shared.guideCat.dockUndockLabel":"取消停駐 {guideCatName}","shared.guideCat.dialog.disableTitle":"停用 {guideCatName}?","shared.guideCat.dialog.disableMessage":"這會關閉 {guideCatName} 的導覽幫助。若只是想先藏起來,可先將其收進側欄。你隨時可以回到「設定」>「助手」重新開啟。","shared.guideCat.dialog.disableConfirm":"停用","shared.guideCat.dialog.keepEnabled":"保留啟用","shared.guideCat.dialog.dockNow":"立即收合","shared.imageUpload.clickHint":"點擊以選擇圖片","shared.imageUpload.dragHint":"拖曳來移動畫面,滾動可縮放","shared.workspaceNavigation.deleteChannelRuntimeCleanupFeedbackOne":"對話已刪除;Cats 執行階段保留了 {count} 個連結的執行階段工作階段。如需清理磁碟,請開啟執行階段診斷。","shared.workspaceNavigation.deleteChannelRuntimeCleanupFeedbackMany":"對話已刪除;Cats 執行階段保留了 {count} 個連結的執行階段工作階段。如需清理磁碟,請開啟執行階段診斷。","shared.workspaceNavigation.renameChatError":"重新命名聊天失敗。","shared.workspaceNavigation.deleteChatError":"刪除聊天失敗。","shared.workspaceNavigation.renameParallelChatError":"重新命名平行聊天失敗。","shared.workspaceNavigation.ungroupParallelChatError":"取消群組平行聊天失敗。","shared.workspaceNavigation.deleteParallelChatGroupError":"刪除所有聊天失敗。","shared.workspaceNavigation.parallelChatFallbackName":"這個平行聊天","shared.workspaceNavigation.error.chatNotFound":"找不到這個聊天工作區。","shared.workspaceNavigation.error.channelNotFound":"找不到這個聊天室。","shared.workspaceNavigation.error.parallelChatGroupNotFound":"找不到這個平行聊天群組。","shared.workspaceNavigation.error.titleRequired":"聊天標題不可空白。","shared.workspaceNavigation.error.parallelChatTitleRequired":"平行聊天標題不可空白。","shared.settingsCatsRegistry.sectionLabel":"註冊表","shared.settingsCatsRegistry.savedCatsLabel":"已儲存貓咪","shared.settingsCatsRegistry.noCatsYetLabel":"尚未有貓咪","shared.settingsCatsRegistry.showArchivedLabel":"顯示封存({count})","shared.settingsCatsRegistry.bossCatLabel":"主控貓","shared.settingsCatsRegistry.recoverLabel":"恢復","shared.settingsCatsRegistry.recoverTooltip":"恢復 {name}","shared.settingsCatsRegistry.deleteTooltip":"刪除 {name}","shared.settingsCatsRegistry.archiveTooltip":"封存 {name}","shared.settingsCatsRegistry.defaultSkillProfileLabel":"預設","shared.settingsCatsRegistry.memorySavedLabel":"已記憶","shared.settingsCatsRegistry.noMemoryYetLabel":"尚未有記憶","shared.settingsCatsRegistry.botBindingCount":"{count} 個機器人","shared.settingsCatsRegistry.emptyStateHint":"從右側面板新增第一隻貓咪。","shared.settingsCats.selectCatAriaLabel":"選擇貓咪","shared.settingsCats.addNewCatLabel":"新增貓咪","shared.settingsCats.showArchivedLabel":"顯示封存({count})","shared.settingsCats.archiveLabel":"封存","shared.settingsCats.deleteLabel":"刪除","shared.settingsCats.channelLabel":"通道","shared.settingsCats.memoryLabel":"記憶","shared.settingsCats.renameLabel":"重新命名","shared.settingsCats.save":"儲存","shared.settingsCats.saving":"儲存中…","shared.settingsCats.bossCatLabel":"主控貓","shared.settingsCats.changeBossCatTitle":"更改主控貓","shared.settingsCats.changeBossCatMessage":"將 {name} 設為主控貓?這將更改新對話的預設接收對象。","shared.settingsCats.confirm":"確認","shared.settingsCats.setting":"設定中…","shared.settingsCats.saveSuccess":"貓咪已儲存。","shared.settingsCats.saveError":"儲存貓咪失敗。","shared.settingsCats.renameSuccess":"貓咪已重新命名。","shared.settingsCats.renameError":"重新命名貓咪失敗。","shared.settingsCats.deleteSuccess":"{catName} 已刪除。","shared.settingsCats.deleteError":"刪除貓咪失敗。","shared.settingsCats.bossUpdated":"主控貓已更新。","shared.settingsCats.status.active":"啟用","shared.settingsCats.status.archived":"已封存","shared.settingsCats.makeBossCatLabel":"將 {name} 設為主控貓","shared.settingsCats.setBossCatLabel":"設為主控貓","shared.settingsCats.setBossCatError":"無法將其設為主控貓。","shared.settingsCats.skillUpdateError":"更新技能失敗。","shared.settingsCats.skillProfileLabel":"技能檔案","shared.settingsCats.mcpProfileLabel":"工具檔案","shared.settingsCats.mcpProfileChatMemoryLabel":"聊天記憶","shared.settingsCats.mcpProfileWorkMemoryLabel":"工作記憶","shared.settingsCats.changeMcpProfileError":"無法變更工具檔案。","shared.settingsCats.coverPhotoLabel":"封面圖片","shared.settingsCats.changeCoverPhotoLabel":"更換封面圖片","shared.settingsCats.uploadCoverPhotoLabel":"上傳封面圖片","shared.settingsCats.changeCoverLabel":"更換封面","shared.settingsCats.uploadCoverLabel":"上傳封面","shared.settingsCats.removeCoverLabel":"移除封面","shared.settingsCats.changeSkillProfileError":"無法變更技能檔案。","shared.settingsCats.updateBrainError":"更新大腦設定失敗。","shared.settingsCats.disconnectTelegramAria":"中斷 Telegram 連線","shared.settingsCats.disconnectTelegram":"中斷連線","shared.settingsCats.bindingActive":"啟用","shared.settingsCats.bindingDisabled":"停用","shared.settingsCats.bindingPollingMode":"輪詢","shared.settingsCats.bindingWebhookMode":"Webhook","shared.settingsCats.telegramBindingCreated":"Telegram 機器人綁定已建立。","shared.settingsCats.telegramBindingCreateError":"建立綁定失敗。","shared.settingsCats.telegramBindingRemoved":"綁定已移除。","shared.settingsCats.telegramBindingRemoveError":"移除綁定失敗。","shared.settingsCats.telegramDiagnosticsLoadError":"載入 Telegram 診斷資訊失敗。","shared.settingsCats.lastInboundLabel":"最後入站 {time}","shared.settingsCats.connectTelegramLabel":"連線 Telegram","shared.settingsCats.unavailableHint":"已封存或非聊天貓無法使用。","shared.settingsCats.addMemoryLabel":"新增記憶","shared.settingsCats.deleteMemoryAria":"刪除記憶","shared.settingsCats.skillProfileDefaultLabel":"預設","shared.settingsCats.skillProfileCompanionLabel":"助手","shared.settingsCats.memoryCategoryPreferenceLabel":"偏好","shared.settingsCats.memoryCategoryFactLabel":"事實","shared.settingsCats.memoryCategoryPolicyLabel":"規範","shared.settingsCats.memoryCategoryStyleLabel":"風格","shared.settingsCats.memoryCategoryRelationshipLabel":"關係","shared.settingsCats.memoryCategoryLessonLabel":"學習","shared.settingsCats.fallbackCatName":"這隻貓咪","shared.settingsCats.archiveConfirmTitle":"封存貓咪","shared.settingsCats.archiveConfirmMessage":"要封存「{catName}」嗎?之後仍可從設定復原。","shared.settingsCats.archiveWithTelegramConfirmMessage":"要封存「{catName}」嗎?Telegram 機器人綁定會被移除,但之後仍可從設定復原。","shared.settingsCats.archiveSuccess":"{catName} 已封存。","shared.settingsCats.archiveError":"封存貓咪失敗。","shared.settingsCats.recoverConfirmTitle":"復原貓咪","shared.settingsCats.recoverConfirmMessage":"要從封存復原「{catName}」嗎?","shared.settingsCats.recoverConfirmLabel":"復原","shared.settingsCats.recoverSuccess":"{catName} 已復原。","shared.settingsCats.recoverError":"復原貓咪失敗。","shared.settingsCats.error.nameRequired":"請輸入貓咪名稱。","shared.settingsCats.error.providerRequired":"請選擇貓咪供應器。","shared.settingsCats.error.nameEmpty":"貓咪名稱不可空白。","shared.settingsCats.error.alreadyArchived":"這隻貓咪已封存。","shared.settingsCats.error.alreadyActive":"這隻貓咪已啟用。","shared.settingsCats.error.archiveRecoverConflict":"貓咪不可同時封存與復原。","shared.settingsCats.error.noProducts":"請至少為這隻貓咪選擇一個產品。","shared.settingsCats.error.botTokenDuplicate":"這個 bot token 已被另一個綁定使用。","shared.settingsCats.error.nameDuplicate":"已存在名為「{name}」的貓咪。","shared.settingsCats.error.limitReached":"已達貓咪數量上限(最多 {maxCats} 隻)。","shared.settingsCats.error.notFound":"找不到這隻貓咪。","shared.settingsCats.error.notActive":"這隻貓咪尚未啟用。","shared.settingsCats.error.notAvailableInChat":"這隻貓咪無法在 Cats Chat 使用。","shared.settingsCats.error.botBindingNotFound":"找不到 bot 綁定。","shared.platformSurfaceSwitcher.menuLabel":"切換產品","shared.platformSurfaceSwitcher.openLobby":"開啟大廳","shared.platformSurfaceSwitcher.ariaLabel":"切換產品。目前產品為 {productName}。","shared.providerModelBrainCard.title":"大腦","shared.providerModel.controls.default":"預設","shared.providerModel.controls.enabled":"啟用","shared.providerModel.controls.disabled":"停用","shared.providerModel.controls.optionalPlaceholder":"選填","shared.providerModel.field.providerLabel":"供應器","shared.providerModel.field.loadingProviders":"正在載入可用的供應器…","shared.providerModel.field.selectProviderHint":"請選擇可用的供應器","shared.providerModel.field.providerLoadFailed":"無法載入執行階段支援的供應器","shared.providerModel.field.noProviders":"沒有執行階段支援的供應器可用","shared.providerModel.field.registryCheckingHint":"正在檢查 cats-runtime 可用的供應器目標。","shared.providerModel.field.registryUsingProductCatalogHint":"檢查 cats-runtime 供應器目標時,先使用產品內建供應器目錄。","shared.providerModel.field.registryStaleHint":"cats-runtime 重新連線時,先顯示上次可用的供應器目標。","shared.providerModel.field.registryCachedRefreshFailedHint":"重新整理失敗,先顯示快取的供應器目標:{message}","shared.providerModel.field.registryLoadFailedHint":"無法從 cats-runtime 載入目前可用的供應器目標。","shared.providerModel.field.registryEmptyHint":"cats-runtime 已連線,但沒有回報任何目前可用的供應器目標。","shared.providerModel.field.providerInstanceLabel":"供應器實例","shared.providerModel.field.modelLabel":"模型","shared.providerModel.field.retryProvidersFirst":"請先重新載入供應器","shared.providerModel.field.selectProviderFirst":"請先選擇可用的供應器","shared.providerModel.field.waitingProviders":"正在等待可用的供應器…","shared.providerModel.field.loadingModels":"正在載入可用模型…","shared.providerModel.field.selectModel":"選擇模型","shared.providerModel.field.noModels":"沒有執行階段支援的模型可用","shared.providerModel.field.customLegacyModelLabel":"自訂舊版模型…","shared.providerModel.field.legacyModelIdLabel":"舊版模型 ID","shared.providerModel.field.legacyModelIdPlaceholder":"例如 claude-sonnet-4-6","shared.providerModel.field.legacyModelIdHint":"手動輸入模型 ID 會直接傳遞。執行階段會把它視為舊版 `model` 欄位,而不是結構化項目/預設選擇。","shared.providerModel.field.modeLabel":"模式","shared.providerModel.field.modeStandardLabel":"標準","shared.providerModel.field.modeStandardOnlyLabel":"僅標準","shared.providerModel.field.presetPreviewSuffix":"(預覽)","shared.providerModel.field.presetUnavailableSuffix":"(不可用)","shared.providerModel.field.presetTuningDescriptionFallback":"這個模型的額外參數。","shared.providerModel.field.modeOnlyBaseHint":"此供應器目標只會對持久化的聊天/會話設定曝光基礎模型。","shared.providerModel.field.requestScopedWarning":"這裡隱藏了只可套用於個別請求的覆寫,因為這組選擇器會寫回聊天/會話預設。","shared.providerModel.field.openRuntimeSetupLabel":"開啟 Cats 執行階段設定","shared.providerModel.field.advancedCatalogUnavailable":"執行階段進階模型目錄無法使用。","shared.providerModel.field.catalogKindModel":"模型","shared.providerModel.field.catalogKindAdvancedModel":"進階模型","shared.providerModel.field.runtimeCatalogUnavailable":"執行階段{catalogKind}目錄無法使用。","shared.providerModel.field.runtimeCatalogUnavailableWarning":"cats-runtime 重新整理時,先使用產品內建的{catalogKind}目錄:{message}","shared.memoryEditorDialog.title":"新增記憶","shared.memoryEditorDialog.categoryLabel":"分類","shared.memoryEditorDialog.contentLabel":"內容","shared.memoryEditorDialog.memoryPlaceholder":"這隻貓咪需要記住些什麼?","shared.memoryEditorDialog.cancel":"取消","shared.memoryEditorDialog.saving":"儲存中…","shared.memoryEditorDialog.add":"新增","shared.approvalEyebrow":"核准","shared.approvalPendingTitle":"待核准項目","shared.approvalEmptyState":"在此由指揮面板保持運轉,直到任務需要由負責人做判斷決定。","shared.approvalRequester":"指揮者","shared.approvalSummaryFallback":"請先確認此次派工,再讓 Cats 繼續。","shared.approvalRequestedBy":"提交者:{requestedBy}","shared.approval.action.approve":"核准","shared.approval.action.reroute":"改派路徑","shared.approval.action.reject":"拒絕","shared.approval.action.approveDescription":"允許編排計畫繼續。","shared.approval.action.rerouteDescription":"將計畫退回,改用其他交接或派工路徑。","shared.approval.action.rejectDescription":"不允許計畫繼續。","shared.catInspectTitle":"貓咪預設","shared.catInspectClose":"關閉","shared.catInspectBossLabel":"主控","shared.catInspectProviderLabel":"供應器","shared.catInspectInstanceLabel":"實例","shared.catInspectModelLabel":"模型","shared.catInspectSkillProfileLabel":"技能檔案","shared.catInspectSharedPresetDescription":"這是共用的貓咪預設。這裡的變更會影響所有使用此貓咪的對話。","shared.messageChoicesCustom":"自訂","shared.messageChoicesAddCustomPlaceholder":"輸入你的答案","shared.messageChoicesSkipped":"發起者已略過這些選項。","shared.messageChoicesRecorded":"發起者回應已記錄。","shared.messageChoicesConfirm":"確認","shared.messageChoicesSkip":"跳過","shared.folderBrowserEnterPath":"輸入路徑","shared.folderBrowserGo":"前往","shared.folderBrowserUpOneLevel":"回上一層","shared.folderBrowserRefresh":"重新整理","shared.folderBrowserLoading":"載入中…","shared.folderBrowserNoSubdirectories":"此資料夾中沒有子資料夾。","shared.folderBrowserUseThisFolder":"使用此資料夾","shared.common.saving":"儲存中…","shared.common.dismiss":"關閉","setup.wizard.welcomeTitle":"歡迎使用 Cats","setup.wizard.welcomeIntro":"你的個人 AI 工作空間。讓我們快速完成設定。","setup.wizard.ownerNameLabel":"您的名字","setup.wizard.ownerNamePlaceholder":"顯示名稱","setup.wizard.getStartedButton":"開始","setup.wizard.stepIndicator":"第 {step} 步,共 {total} 步","setup.wizard.enableGuideTitle":"啟用 {guideCatName}","setup.wizard.enableGuideSubtitle":"這位可選助理可在聊天、工作與程式碼場景中提供協助。","setup.wizard.enableGuideLabel":"啟用 {guideCatName}","setup.wizard.skipGuideMessage":"你可以先略過此步驟,稍後再從「設定 > 助理」啟用 {guideCatName}。","setup.wizard.backButton":"返回","setup.wizard.openingCatsAction":"正在開啟 Cats…","setup.wizard.openCatsAction":"開啟 Cats","setup.wizard.failedMessage":"設定失敗。","setup.wizard.failedWithStatus":"設定失敗({status})","setup.wizard.alreadyCompleteError":"設定已完成。","setup.wizard.invalidRequestError":"設定請求無效。","setup.wizard.serverError":"無法完成設定,請稍後再試。","setup.wizard.recordOpenFailedWithStatus":"記錄設定開啟狀態失敗({status})","setup.guideCat.runtimeUnavailable":"供應器目錄無法使用","setup.guideCat.noUsableTargets":"找不到可用供應器","setup.guideCat.runtimeConnected":"Cats 執行階段已連線","setup.guideCat.runtimeNotDetected":"未偵測到 Cats 執行階段","setup.guideCat.nameLabel":"導覽貓名稱","setup.guideCat.nameHint":"Cats 會保留這個名稱,後續可依語系調整。","setup.guideCat.openRuntimeSetup":"開啟 Cats 執行階段設定","setup.guideCat.unavailableNote":"即使導覽貓未啟用也能使用。若遇到連線逾時,請在此重試,或前往 Cats 執行階段設定頁。","setup.guideCat.noUsableTargetsNote":"Cats 執行階段已可連線,但目前沒有回報任何可用的導覽貓供應器設定。","settings.assistants.defaultName":"助理","settings.assistants.statusFailed":"狀態更新失敗({status})","settings.assistants.saveFailed":"儲存失敗。","settings.assistants.statusUpdateFailed":"狀態更新失敗({status})","settings.assistants.guideCatUpdateFailed":"無法更新導覽貓。","settings.assistants.guideCatSaveFailed":"無法儲存導覽貓。","settings.assistants.saveFailedWithError":"儲存失敗({status})","settings.assistants.removeTitle":"移除助理","settings.assistants.removeMessage":"移除「{title}」?將無法復原。","settings.assistants.removeButton":"移除","settings.assistants.removeFailed":"無法移除助理。","settings.assistants.enableButton":"啟用","settings.assistants.enableBusyButton":"儲存中…","settings.assistants.disableButton":"停用","settings.assistants.avatarLabel":"頭像","settings.assistants.nameLabel":"名稱","settings.assistants.selectAriaLabel":"選取助理","settings.assistants.addNewLabel":"新增助理","settings.assistants.newAssistantTitle":"新增助理","settings.assistants.cancelButton":"取消","settings.assistants.createButton":"儲存","settings.assistants.deleteButton":"刪除","settings.assistants.roleHintTitle":"角色提示","settings.assistants.namePlaceholder":"助理","settings.assistants.roleHintPlaceholder":"檢閱者、除錯人員、文字編修者、API 專家…","settings.assistants.renameFailed":"無法重新命名助理。","settings.assistants.roleHintUpdateFailed":"無法更新角色提示。","settings.assistants.brainUpdateFailed":"無法更新大腦設定。","settings.assistants.createFailed":"無法儲存助理。","settings.assistants.api.invalidRequestBody":"請求內容無效。","settings.assistants.api.assistantNameRequired":"請輸入助理名稱。","settings.assistants.api.assistantProviderRequired":"請選擇助理供應器。","settings.assistants.api.assistantModelRequired":"請選擇助理模型。","settings.assistants.api.assistantNotFound":"找不到助理。","settings.assistants.api.guideCatNameManaged":"導覽貓名稱由 Cats 管理。","settings.assistants.api.guideCatStatusInvalid":"導覽貓狀態必須是啟用或已停用。","settings.assistants.api.guideCatNotFound":"尚未建立導覽貓。","conversationSidebar.chatsLabel":"聊天","conversationSidebar.recentsLabel":"最近","conversationSidebar.noChatsLabel":"尚無聊天","conversationSidebar.primaryAriaLabel":"主要","conversationSidebar.openSidebarLabel":"展開側邊欄","conversationSidebar.closeSidebarLabel":"收合側邊欄","conversationSidebar.renameLabel":"重新命名","conversationSidebar.renamingLabel":"重新命名中…","conversationSidebar.deleteLabel":"刪除","conversationSidebar.deletingLabel":"刪除中…","conversationSidebar.ungroupLabel":"取消群組","conversationSidebar.ungroupingLabel":"取消群組中…","conversationSidebar.deleteAllLabel":"刪除全部","conversationSidebar.openAccountSettingsLabel":"開啟帳號設定","conversationSidebar.runtimeStatusAriaLabel":"執行階段狀態:{status}","conversationSidebar.directMessagesLabel":"直接訊息","conversationSidebar.telegramBoundTooltip":"已綁定 Telegram 機器人","conversationSidebar.archiveButton":"封存","conversationSidebar.directMessageButton":"直接訊息","conversationSidebar.clearButton":"清除","conversationSidebar.clearConfirmMessage":"清除與 {catName} 的對話歷史?此操作無法復原。","chatNewChatDraft.viewCatProfileAction":"查看貓咪個人檔案","chatTopBar.openCatProfileAriaLabel":"查看貓咪個人檔案","design.sidePanel.closeLabel":"關閉","design.accountIdentityMenu.label":"帳號選單","design.accountIdentityMenu.menuLabel":"帳號選單","design.accountIdentityMenu.settingsLabel":"設定","design.accountIdentityMenu.environmentLabel":"環境","design.notification.dismissLabel":"關閉","entity.comingSoon.backToLobby":"返回大廳","entity.detail.breadcrumb.lobby":"大廳","clowdersList.title":"我的貓群","clowdersList.eyebrow":"貓群","clowdersList.emptyState":"尚未有貓群。接上貓群 registry 後,正式任務群組會在這裡列出。","catteriesList.title":"我的貓窩","catteriesList.eyebrow":"貓窩","catteriesList.emptyState":"尚未有貓窩。接上貓窩 registry 後,組織會在這裡列出。","clowdersCanvas.ariaLabel":"貓群畫布","catteriesCanvas.ariaLabel":"貓窩畫布","entityCanvas.totalLabel":"總數","entityCanvas.catsLabel":"貓咪","entityCanvas.membersLabel":"成員","entityCanvas.clowdersLabel":"貓群","entityCanvas.idLabel":"識別碼","entityCanvas.createdLabel":"建立時間","entityCanvas.selectedClowderLabel":"選取的貓群","entityCanvas.selectedCatteryLabel":"選取的貓窩","entityCanvas.organizationLabel":"組織","entityCanvas.parentCatteryLabel":"上層貓窩","entityCanvas.formalClowderLabel":"正式貓群","entityCanvas.noOrganizationLabel":"沒有組織連結","entityCanvas.noFormalClowdersLabel":"沒有正式貓群","entityCanvas.openClowderAction":"開啟貓群","entityCanvas.openCatteryAction":"開啟貓窩","entityCanvas.catterySubtitle":"{clowderCount} 個貓群 · {memberCount} 位成員","catProfile.notFound.title":"找不到這隻貓","catProfile.notFound.body":"此工作區中沒有 id 為「{catId}」的貓。可能已被移除,或連結已失效。","entitiesSidebar.section.cats":"我的貓咪","entitiesSidebar.section.clowders":"我的貓群","entitiesSidebar.section.catteries":"我的貓窩","entitiesSidebar.newCat":"新增貓咪","entitiesSidebar.newClowder":"新增貓群","entitiesSidebar.newCattery":"新增貓窩","entityIndex.eyebrow":"目錄","entityIndex.title":"Cats 目錄","entityIndex.columnHeader.cats":"貓咪","entityIndex.columnHeader.clowders":"貓群","entityIndex.columnHeader.catteries":"貓窩","entityIndex.card.total":"共 {count} 個","entityIndex.card.openCanvasAriaLabel":"開啟{label}","entitiesShell.ariaLabel":"Cats 目錄 工作區","entitiesShell.surfaceLabel":"Cats 目錄","entitiesShell.brandLabel":"目錄","entitiesShell.exitButtonAriaLabel":"離開 Cats 目錄","clowderHome.ariaLabel":"貓群主頁","clowderHome.chip.partOf":"隸屬於 {catteryName}","clowderHome.chip.crossUnit":"跨單位任務小組","clowderHome.tab.cats":"貓咪","clowderHome.tab.settings":"設定","clowderHome.empty.cats":"此貓群尚未有貓咪。Phase 6 成員管理上線後即可加入第一隻。","clowderHome.settings.body":"貓群設定(重新命名、封存、轉移)會在 PLAN-091 phase 6 成員管理上線時提供。","clowderHome.notFound.title":"找不到這個貓群","clowderHome.notFound.body":"此工作區中沒有 id 為「{clowderId}」的貓群。可能已被移除,或連結已失效。","catteryHome.ariaLabel":"貓窩主頁","catteryHome.tab.members":"成員","catteryHome.tab.clowders":"貓群","catteryHome.tab.cats":"貓咪","catteryHome.tab.settings":"設定","catteryHome.empty.members":"尚未有成員。Phase 6 成員管理上線後即可加入第一位。","catteryHome.empty.clowders":"此貓窩尚未有貓群。Phase 6 上線後正式編制的貓群會在這裡列出。","catteryHome.empty.cats":"尚未能透過此貓窩取得貓咪。Phase 6 成員資料上線後會把直接成員與透過正式貓群間接到的成員彙總在這裡。","catteryHome.settings.body":"貓窩設定(個資、轉移所有權、封存)會在 PLAN-091 phase 6 成員管理上線時提供。","catteryHome.notFound.title":"找不到這個貓窩","catteryHome.notFound.body":"此工作區中沒有 id 為「{catteryId}」的貓窩。可能已被移除,或連結已失效。","code.activeComposer.detachedBranch":"分離分支","code.newDraft.greeting":"準備開始寫程式。","code.newDraft.greeting.openRepo":"開啟 repo,從小處開始。","code.newDraft.greeting.buildFixRefactor":"建置、修復或重構真實的東西。","code.newDraft.greeting.shipImprovement":"交付一個清楚的改善。","code.newDraft.greeting.smallestChange":"從最小但有用的變更開始。","code.newDraft.composer.placeholder":"這次程式工作階段要建置、修復或調查什麼?","code.newDraft.setupTitle":"新程式設定","code.newDraft.participants.title":"參與者","code.newDraft.participants.empty":"目前沒有可用的參與者。","code.newDraft.execution.title":"執行","code.newDraft.execution.action":"選擇執行目標","code.newDraft.execution.empty":"尚未設定執行目標。","code.newDraft.folder.title":"程式工作區","code.newDraft.folder.action":"選擇程式工作區","code.newDraft.folder.empty":"尚未選擇程式工作區。","code.newDraft.sessionProfile.title":"工作階段設定","code.newDraft.sessionProfile.description":"此程式工作階段會以 {workspace} 與 {permission} 開始。","code.newDraft.workspace.independentWorktree":"獨立工作樹","code.newDraft.workspace.currentFolder":"目前資料夾","code.newDraft.workspace.sandbox":"沙盒","code.newDraft.permission.readOnly":"唯讀","code.newDraft.permission.fullAccess":"完整存取","code.newDraft.starter.pomodoro.label":"建置番茄鐘應用程式","code.newDraft.starter.pomodoro.prompt":"寫一個小型番茄鐘計時器應用程式。","code.newDraft.starter.fixBug.label":"修復錯誤","code.newDraft.starter.fixBug.prompt":"找出並修復這個程式碼庫中的錯誤。","code.newDraft.starter.refactor.label":"重構程式碼","code.newDraft.starter.refactor.prompt":"在不改變行為的前提下重構這段程式碼。","code.newDraft.starter.writeTests.label":"撰寫測試","code.newDraft.starter.writeTests.prompt":"為我們上次碰過的程式碼新增測試。","code.newDraft.starter.startProject.label":"開始專案","code.newDraft.starter.startProject.prompt":"開始一個小專案來追蹤里程碑。","code.taskPills.ariaLabel":"任務提醒","code.taskPills.mock.authMiddleware":"重構驗證中介層","code.taskPills.mock.kiroSessionDelete":"修復 Kiro 工作階段刪除","code.taskPills.mock.artifactGallery":"草擬成品圖庫","code.taskPills.namePlaceholder":"命名此任務","code.taskPills.editAria":"編輯任務名稱","code.taskPills.title.current":"目前任務:{taskLabel} — 雙擊可重新命名","code.taskPills.title.focus":"聚焦 {taskLabel}(雙擊可重新命名)","code.taskPills.hideAria":"隱藏 {taskLabel}","code.taskPills.fallbackTask":"任務","code.taskPills.addAria":"新增任務提醒","code.taskPills.buttonTask":"任務","code.workspace.source.artifactAnchor":"成品錨點","code.artifact.kind.build":"建置","code.artifact.kind.dataset":"資料集","code.artifactDetail.artifactUnavailable":"成品詳細資料不可用","code.artifactDetail.backToBuild":"返回建置","code.artifactDetail.artifactOutput":"成品輸出","code.artifactDetail.conversationLabel":"對話","code.artifactDetail.contextEyebrow":"脈絡","code.artifactDetail.contextTitle":"已連結記錄","code.artifactDetail.loadFailed":"無法載入成品詳細資料。","code.artifactDetail.loadingBody":"正在取得成品中繼資料與相關脈絡。","code.artifactDetail.loadingTitle":"正在載入成品詳細資料","code.artifactDetail.missingId":"成品 ID 為必填。","code.artifactDetail.noArtifactSummary":"尚未記錄成品摘要。","code.artifactDetail.noInlinePreview":"這個成品目前沒有可用的內嵌預覽。","code.artifactDetail.notInlineSafe":"此成品已可用,但目前 Code 介面不適合內嵌顯示。","code.artifactDetail.previewOutput":"預覽輸出","code.artifactDetail.previewActionOpenArtifact":"開啟成品","code.artifactDetail.previewActionOpenPreview":"開啟預覽","code.artifactDetail.projectLabel":"專案","code.artifactDetail.projectMeta":"專案:{projectTitle}","code.artifactDetail.relatedEmpty":"這個任務或工作項目尚未記錄相關成品。","code.artifactDetail.relatedEyebrow":"相關","code.artifactDetail.relatedTitle":"鄰近成品","code.artifactDetail.openConversationAction":"開啟對話","code.artifactDetail.openProjectAction":"開啟專案","code.artifactDetail.openTaskAction":"開啟任務","code.artifactDetail.openWorkItemAction":"開啟工作項目","code.artifactDetail.taskLabel":"任務","code.artifactDetail.title":"成品","code.artifactDetail.viewArtifact":"查看成品","code.artifactDetail.workItemLinkedLabel":"工作項目","code.artifactDetail.workItemMissingLabel":"沒有連結的工作項目","code.artifactKind.attachment":"附件","code.artifactKind.document":"文件","code.artifactKind.preview":"預覽","code.artifactKind.report":"報告","code.artifactKind.transcript":"對話紀錄","code.artifactKind.unknown":"未知","code.artifactKind.build":"建置","code.artifactStatus.archived":"已封存","code.artifactStatus.draft":"草稿","code.artifactStatus.published":"已發佈","code.artifactStatus.ready":"就緒","code.artifactStatus.unknown":"未知","code.artifactList.artifact":"成品","code.artifactList.filter.all":"全部","code.artifactList.ariaOpenArtifact":"開啟成品 {title}","code.artifactList.empty":"目前沒有符合此篩選的成品。建置、預覽、報告、附件與對話匯出會出現在這裡。","code.artifactList.header":"成品","code.artifactList.loading":"正在載入成品…","code.artifactList.error":"無法載入成品:{error}","code.artifactList.loadFailed":"成品清單請求失敗。","code.artifactList.candidateHint":"候選成品尚未升級為持久記錄。","code.artifactList.candidateLabel":"候選","code.artifactList.provenance.run":"執行","code.artifactList.statusFilterLabel":"狀態:","code.artifactList.provenance.task":"任務","code.artifactMeta.contract":"契約","code.artifactMeta.mode":"模式:{mode}","code.artifactMeta.decision":"決策:{decision}","code.artifactMeta.kind":"類型:{kind}","code.artifactMeta.path":"路徑:{path}","code.artifactMeta.status":"狀態:{status}","code.artifactMeta.updated":"更新時間:{updatedAt}","code.artifactMeta.viewArtifact":"查看成品","code.artifactPreview":"成品預覽","code.artifact.unknown":"未知","code.conversationKind.chatChannel":"聊天頻道","code.conversationKind.chatRoot":"聊天根目錄","code.conversationKind.codeThread":"程式討論串","code.conversationKind.directMessage":"直接訊息","code.conversationKind.parallelGroup":"平行群組","code.conversationKind.unknown":"對話","code.conversationKind.workThread":"工作討論串","code.recordStatus.archived":"已封存","code.recordStatus.blocked":"已阻擋","code.recordStatus.cancelled":"已取消","code.recordStatus.completed":"已完成","code.recordStatus.draft":"草稿","code.recordStatus.failed":"失敗","code.recordStatus.inProgress":"進行中","code.recordStatus.open":"開啟","code.recordStatus.pending":"待處理","code.recordStatus.pendingApproval":"等待核准","code.recordStatus.ready":"就緒","code.recordStatus.running":"執行中","code.recordStatus.unknown":"未知","code.builder.codespaceHeader":"程式工作區","code.builder.codeOutputLabel":"輸出","code.builder.back":"返回","code.builder.continue":"繼續","code.builder.continueBuild":"繼續建置","code.builder.continueBuildBusy":"正在繼續…","code.builder.continueTaskBusy":"正在繼續…","code.builder.createArtifact":"建立成品","code.builder.createLabel":"建置","code.builder.creatingTask":"正在建立…","code.builder.defineTaskHeader":"定義任務","code.builder.detailsPlaceholder":"描述完成狀態與驗收條件…","code.builder.detailsLabel":"細節 / 驗收條件(選填)","code.builder.errorCodespaceResolve":"無法解析這個程式工作區。","code.builder.errorCodespacePathInvalid":"選取的路徑不存在或不是資料夾:{path}","code.builder.errorCodespaceNoPath":"找不到有效的程式工作區路徑。請選擇資料夾,或確認房間工作區存在。","code.builder.errorTaskCreate":"無法建立程式碼任務。","code.builder.errorTaskCreateMissingId":"建立任務的回應缺少 task id。","code.builder.errorTaskExecution":"無法啟動程式碼任務。","code.builder.errorTaskDetailLoad":"無法載入這個程式碼任務。","code.builder.errorTaskResume":"無法接續這個程式碼任務。","code.builder.errorTaskResumeInput":"請輸入要接續的任務 ID。","code.builder.errorTaskTitle":"請輸入你想建置的內容。","code.builder.runtimeObservationFailed":"無法重新整理執行階段工作階段。","code.builder.executionDoneBanner":"任務已完成。請檢查上方結果,並使用交付操作提交或推送。","code.builder.existingTask":"既有任務","code.builder.feedbackResumeReady":"任務已可繼續。","code.builder.feedbackResumeTask":"已接續任務 {taskId}。","code.builder.feedbackResumeNoWorkspace":"已接續任務 {taskId};繼續前請先選擇程式工作區。","code.builder.feedbackResumeWorkspaceNeeded":"繼續此任務前請先選擇程式工作區。","code.builder.filter.codespace":"程式工作區","code.builder.header.codespace":"程式工作區","code.builder.header.newTask":"新任務","code.builder.header.projectFolder":"專案資料夾","code.builder.header.taskStep":"任務","code.builder.modelLabel":"模型(選填)","code.builder.modelPlaceholder":"預設","code.builder.newTaskButton":"新任務","code.builder.providerLabel":"供應器","code.builder.providerTaskLabel":"供應器","code.builder.repoPathLabel":"儲存庫路徑","code.builder.resumeLabel":"既有任務 ID(選填)","code.builder.resumePrompt":"接續任務","code.builder.retryPrompt":"重試","code.builder.stepLabel":"步驟 {step}","code.builder.successTaskReadyWithCurrentChat":"{workspaceFallback},來源:{title}。","code.builder.taskIdRequired":"請輸入任務 ID。","code.builder.taskIdReady":"任務 {taskId} 已可繼續。","code.builder.taskIdReadyNoWorkspace":"任務 {taskId} 已可繼續;繼續前請先選擇程式工作區。","code.builder.taskLabel":"任務","code.builder.taskSummaryPlaceholder":"例如:加入使用者登入功能","code.builder.title":"程式建置器","code.builder.workspaceActiveNotice":"這會成為下一個任務步驟使用的建置程式工作區。","code.builder.workspaceFallbackBound":"已綁定工作區","code.builder.workspaceFallbackBoundFallback":"請輸入專案資料夾,或接續既有任務。","code.builder.workspaceFallbackChatRepo":"目前聊天室儲存庫","code.builder.workspaceFallbackRoom":"目前房間資料夾","code.builder.workspaceFooterLabel":"工作區","code.builder.workspacePathPlaceholder":"/path/to/project","code.builder.workspaceResumeHelp":"接續功能適用於你想繼續處理的草稿、已阻擋或失敗程式碼任務。","code.builder.sampleTaskId":"task-...","code.builder.workspaceSummaryLabel":"程式工作區","code.builder.workspaceSummaryNotice":"目前的建置程式工作區。","code.builder.startingTaskBusy":"正在啟動…","code.builder.taskQuestion":"你想建置什麼?","code.livePreview.commandProfile":"設定檔:{profile}","code.livePreview.description":"檢視連到此 Cats Code 介面的受監管本機即時預覽。","code.livePreview.diagnostic":"診斷:{message}","code.livePreview.error.load":"無法載入即時預覽狀態。","code.livePreview.error.logs":"無法載入即時預覽記錄。","code.livePreview.error.stop":"無法停止即時預覽。","code.livePreview.expiresAt":"到期:{time}","code.livePreview.hideLogs":"隱藏記錄","code.livePreview.logs":"記錄","code.livePreview.logsEmpty":"此預覽尚未記錄內容。","code.livePreview.logsLoading":"正在載入記錄…","code.livePreview.open":"開啟預覽","code.livePreview.retry":"重試","code.livePreview.retryUnavailable":"重試會在即時預覽啟動流程核准後開放。","code.livePreview.status.expired":"已到期","code.livePreview.status.failed":"失敗","code.livePreview.status.ready":"就緒","code.livePreview.status.starting":"啟動中","code.livePreview.status.stopped":"已停止","code.livePreview.status.stopping":"停止中","code.livePreview.stop":"停止","code.livePreview.stopRequested":"已送出停止要求。","code.livePreview.stopping":"正在停止…","code.livePreview.title":"即時預覽","code.livePreview.workspace":"工作區:{workspace}","code.execution.header":"執行","code.execution.meta.noTask":"尚未綁定任務","code.execution.meta.runtimeSession":"執行階段工作階段:{sessionId}","code.execution.meta.workingTreeClean":"工作樹乾淨","code.execution.meta.workingTreeDirty":"工作樹有變更","code.execution.noActiveSession":"沒有作用中的工作階段","code.execution.noTask":"尚未綁定任務","code.execution.notStarted":"尚未開始","code.execution.ownerDecisionRequired":"需要使用者決策","code.execution.panelTitle":"任務執行","code.execution.runtimeHeader":"執行階段","code.execution.runtimeIdle":"閒置","code.execution.modeDelivery":"交付模式:{deliveryMode}","code.execution.targetLabel":"目標:{target}","code.execution.targets":"目標:{targets}","code.execution.runtimeTitle":"執行階段","code.execution.sectionBlocked":"已阻擋","code.execution.taskHeader":"任務","code.execution.taskStatus":"狀態:{status}","code.execution.taskTitle":"任務","code.execution.notActiveYet":"尚未啟用","code.execution.paused":"已暫停","code.execution.provider":"供應器:{provider}","code.execution.model":"模型:{model}","code.execution.defaultModel":"預設","code.execution.session":"工作階段:{sessionId}","code.execution.taskId":"ID:{taskId}","code.execution.status.blocked":"已阻擋","code.execution.status.done":"完成","code.execution.status.pending":"待處理","code.execution.status.running":"執行中","code.execution.status.unknown":"未知","code.execution.taskRuntimeHeader":"執行階段","code.execution.taskStrategy":"策略:{strategy}","code.execution.strategy.pdca":"PDCA","code.execution.strategy.react":"ReAct","code.execution.strategy.reflexion":"Reflexion","code.execution.deliveryMode.artifactOnly":"僅成品","code.execution.deliveryMode.commitOnly":"僅提交","code.execution.deliveryMode.deployPreview":"部署預覽","code.execution.deliveryMode.prWithChecks":"含檢查的 Pull Request","code.execution.deliveryMode.pushBranch":"推送分支","code.execution.blockedReason.antiPingPong":"防迴圈保護","code.execution.blockedReason.approvalPending":"等待核准","code.execution.blockedReason.maxDispatches":"已達分派上限","code.execution.blockedReason.noValidTargets":"沒有有效目標","code.execution.blockedReason.startupRecovery":"啟動修復","code.execution.blockedReason.userCancelled":"使用者已取消","code.execution.unknownDeliveryMode":"未知交付模式","code.execution.unknownValue":"未知","code.execution.unknownValueUnknown":"未知","code.execution.controlHeader":"控制","code.execution.controlMode":"模式:{mode}","code.execution.controlDelivery":"交付:{deliveryMode}","code.execution.controlBlocked":"已阻擋","code.execution.controlApprovalPending":"等待核准","code.execution.controlBlockedBy":"接續流程被 {reason} 阻擋。","code.execution.controlTargets":"目標:{targets}","code.execution.statusActiveLabel":"作用中","code.execution.statusIdleLabel":"閒置","code.execution.statusBlockedLabel":"已阻擋","code.execution.statusRunningLabel":"執行中","code.execution.statusDoneLabel":"完成","code.execution.statusPendingLabel":"待處理","code.delivery.previewHeader":"預覽","code.delivery.blockerLabel":"已阻擋","code.delivery.contractLabel":"契約","code.delivery.error.repoStatusUnavailable":"無法取得儲存庫狀態。","code.delivery.warningsLabel":"警告","code.delivery.warningsTitle":"警告","code.delivery.header":"交付","code.delivery.label":"交付","code.delivery.labelPreview":"{label} 預覽","code.delivery.metaBranch":"分支:{branch}","code.delivery.metaAhead":"領先:{count}","code.delivery.metaBehind":"落後:{count}","code.delivery.metaStaged":"已暫存:{count}","code.delivery.metaUnstaged":"未暫存:{count}","code.delivery.metaUntracked":"未追蹤:{count}","code.delivery.metaRemote":"遠端:{remote}","code.delivery.metaMode":"模式:{mode}","code.delivery.metaDecision":"決策:{decision}","code.delivery.noCodespace":"尚未綁定程式工作區。請先解析程式工作區才能查看儲存庫操作。","code.delivery.noRepoStatus":"尚未載入儲存庫狀態。","code.delivery.noInlinePreview":"目前沒有可用的內嵌預覽。","code.delivery.noWorkspace":"尚未選擇工作區。","code.delivery.panelSubtitle":"從目前程式工作區提交、推送或匯出輸出。","code.delivery.panelTitle":"儲存庫操作","code.delivery.previewHintUnsafe":"此預覽已可用,但較適合在內嵌框架外開啟。","code.delivery.repoClean":"乾淨","code.delivery.repoDirty":"有變更","code.delivery.repoStatusHeader":"儲存庫狀態","code.delivery.actions.commitHeader":"提交","code.delivery.actions.pushHeader":"推送","code.delivery.actions.exportHeader":"匯出","code.delivery.action.refresh":"重新整理","code.delivery.action.preview":"預覽","code.delivery.action.commit":"提交","code.delivery.action.push":"推送…","code.delivery.action.pushPreview":"預覽推送","code.delivery.action.pushConfirm":"確認推送","code.delivery.action.pushCancel":"取消","code.delivery.action.export":"匯出成品","code.delivery.action.commitPlaceholder":"提交訊息…","code.delivery.confirmation.push":"要推送到遠端嗎?這會對外可見。","code.delivery.confirmation.pushHint":"此操作會將本機提交發佈到設定的遠端。","code.delivery.error.commitFailed":"提交操作失敗。","code.delivery.error.pushFailed":"推送操作失敗。","code.delivery.error.exportFailed":"成品匯出失敗。","code.delivery.status.ready":"就緒","code.delivery.status.blocked":"已阻擋","code.delivery.status.unknown":"未知","code.delivery.decision.approve":"核准","code.delivery.decision.complete":"完成","code.delivery.decision.reject":"拒絕","code.delivery.decision.reroute":"重新指派","code.delivery.decision.wait":"等待","code.delivery.unknownBlocker":"未知阻擋原因","code.delivery.warningFallback":"警告","code.plan.header":"計畫","code.plan.panelTitle":"程式計畫","code.plan.empty":"這個任務尚未建立計畫步驟。","code.plan.replan":"重新規劃","code.plan.status.blocked":"已阻擋","code.plan.status.done":"完成","code.plan.status.pending":"待處理","code.plan.status.running":"執行中","code.plan.title":"計畫","code.plan.replannedSuffix":"(已重新規劃 {count} 次)","code.plan.error.load":"無法載入計畫。","code.plan.error.update":"無法更新計畫。","code.plan.error.stepUpdate":"無法更新計畫步驟。","code.preview.artifactCountMany":"{count} 個成品","code.preview.artifactCountOne":"{count} 個成品","code.preview.blocked":"預覽已阻擋","code.preview.details":"詳細資料","code.preview.header":"輸出","code.preview.iframeTitle":"即時預覽","code.preview.noPreview":"尚未產生建置或預覽成品。","code.preview.notInlineSafe":"最新預覽已可用,但此輸出較適合在內嵌框架外開啟。","code.preview.openArtifact":"開啟成品","code.preview.openLatestArtifact":"開啟最新成品","code.preview.openLatestPreview":"開啟最新預覽","code.preview.openPreview":"開啟預覽","code.preview.title":"建置與預覽","code.relay.action.createThread":"建立分派討論串","code.relay.action.dispatching":"正在分派…","code.relay.action.fanOut":"分派","code.relay.action.refresh":"重新整理","code.relay.action.fanOutSelected":"分派給已選代理人","code.relay.authorKind.agent":"代理人","code.relay.authorKind.system":"系統","code.relay.authorKind.unknown":"未知","code.relay.authorKind.user":"使用者","code.relay.availability.instanceUnavailable":"{providerLabel} 執行個體「{instance}」無法在 cats-runtime 中使用。","code.relay.availability.providerPathMissing":"執行階段沒有回報已設定的 {providerLabel} 供應器路徑。","code.relay.availability.providerPathReady":"{providerLabel} 的執行階段供應器路徑已就緒。","code.relay.availability.runtimeConfigUnavailable":"執行階段供應器設定無法使用。","code.relay.availability.runtimeReadyVia":"執行階段已透過 {target} 就緒。","code.relay.error.agentRequired":"請至少選擇一個代理人。","code.relay.error.fanOutPromptRequired":"分派提示為必填。","code.relay.error.threadRequired":"請先建立或選擇分派討論串。","code.relay.error.threadTitleRequired":"討論串標題為必填。","code.relay.error.missingPayload":"分派請求缺少必要酬載。","code.relay.error.noPayload":"分派回應沒有包含酬載。","code.relay.error.relayFailed":"分派執行失敗。","code.relay.error.rosterUpdateFailed":"更新分派名單失敗。","code.relay.error.threadLoadFailed":"載入分派討論串失敗。","code.relay.error.threadRefreshFailed":"重新整理分派討論串失敗。","code.relay.error.threadCreateFailed":"建立分派討論串失敗。","code.relay.header.codeRelay":"程式分派","code.relay.label.contract":"契約","code.relay.label.contractLoading":"正在載入連接器契約…","code.relay.label.activeThread":"作用中討論串","code.relay.label.default":"預設","code.relay.label.enabled":"啟用","code.relay.label.ended":"結束:{endedAt}","code.relay.label.model":"模型:{model}","code.relay.label.noObjective":"尚未記錄目標。","code.relay.label.noRounds":"尚無回合","code.relay.label.noThreads":"尚無分派討論串","code.relay.label.noneYet":"尚無","code.relay.label.objective":"目標","code.relay.label.proven":"已驗證:{providers}","code.relay.label.repoPath":"儲存庫:{repoPath}","code.relay.label.relayThreadTitle":"分派討論串標題","code.relay.label.repoNoBound":"未綁定","code.relay.label.updated":"更新:{updatedAt}","code.relay.label.mode":"模式:{mode}","code.relay.label.open":"開啟","code.relay.label.quotaNote":"額度備註","code.relay.label.roster":"代理人名單","code.relay.label.roundObjective":"回合目標","code.relay.label.roundPrompt":"分派提示","code.relay.label.roundTimeline":"時間軸","code.relay.label.rounds":"回合","code.relay.label.role":"角色:{role}","code.relay.label.started":"開始:{startedAt}","code.relay.label.statusWaiting":"等待中","code.relay.status.active":"作用中","code.relay.status.available":"可用","code.relay.status.completed":"已完成","code.relay.status.failed":"失敗","code.relay.status.requested":"已請求","code.relay.status.running":"執行中","code.relay.status.unavailable":"不可用","code.relay.status.unknown":"未知","code.relay.status.waitingForAgents":"等待代理人","code.relay.status.waitingForUser":"等待使用者","code.relay.mode.build":"建置","code.relay.mode.discover":"探索","code.relay.mode.document":"文件化","code.relay.mode.fit":"整合","code.relay.mode.humanVerify":"人工驗證","code.relay.mode.repair":"修復","code.relay.mode.review":"審查","code.relay.mode.shape":"塑形","code.relay.role.critic":"評論者","code.relay.role.drafter":"草稿手","code.relay.role.idle":"閒置","code.relay.role.mainCoder":"主要程式代理人","code.relay.role.reviewer":"審查者","code.relay.role.summarizer":"摘要者","code.relay.label.threadShell":"討論串外殼","code.relay.label.threadTitle":"討論串標題","code.relay.phase.phase0":"階段 0","code.relay.phase.phase1":"階段 1","code.relay.phase.phase2":"階段 2","code.relay.phase.fanOut":"分派","code.relay.phase.roster":"名單","code.relay.phase.project":"專案","code.relay.projectThread":"專案討論串","code.relay.projectThreadSummary":"專案討論串摘要","code.relay.runtimeProviderSurface":"執行階段供應器介面","code.relay.runtimeSurface":"執行階段介面","code.relay.threadProject":"專案討論串","code.relay.threadShellTitle":"討論串外殼","code.relay.mode.parallelPrompt":"平行提示","code.relay.noObjective":"尚未記錄目標。","code.relay.notRecorded":"未記錄","code.relay.openDiscoveryRound":"開啟探索回合","code.relay.placeholder.objective":"我們要決定或建置什麼?","code.relay.placeholder.optionalRepo":"選填的本機儲存庫綁定","code.relay.placeholder.fanOutPrompt":"把同一個需求問題發給多個程式代理人。","code.relay.placeholder.quotaNote":"選填的建議備註","code.relay.currentChat":"目前對話:{title}","code.relay.create":"正在建立…","code.relay.defaultThreadTitle":"新的分派討論串","code.relay.loading":"正在載入分派程式工作區…","code.relay.projectThreadHeader":"專案討論串","code.relay.relayToOthers":"分派給其他人(階段 2)","code.relay.targetAgent":"目標代理人","code.relay.threadLabel":"討論串","code.relay.title":"程式分派","code.relay.titleConnectorContract":"連接器契約","code.relay.titleProjectThread":"專案討論串","code.relay.titleTimeline":"時間軸","code.relay.transportUnknown":"未知傳輸","code.relay.transportUnknownWithValue":"未知傳輸({transport})","code.relay.transportRuntimeSessionBridge":"執行階段工作階段橋接","code.sidebar.codespace":"程式工作區","code.sidebar.codeBuilderTitle":"程式建置器","code.sidebar.codespaces":"程式工作區","code.workspaceSource.codeTask":"程式碼任務","code.workspaceSource.conversationRepo":"對話儲存庫","code.workspaceSource.runtimeCwd":"執行階段工作目錄","code.relay.titleProjectThreadSection":"專案討論串","code.sidebar.teamCode":"團隊程式","code.sidebar.peerCode":"同儕程式","code.sidebar.newCode":"新增程式","code.sidebar.noCodesYet":"目前沒有程式對話","code.sidebar.noConversationsSummary":"目前沒有程式對話","code.relay.noRoundsHint":"使用上方分派表單開啟第一個探索回合。","code.sidebar.artifacts":"成品","code.sidebar.build":"建置","code.sidebar.relay":"分派","code.workspace.sectionCodeOutput":"程式輸出","code.workspace.summary.binding":"綁定","code.workspace.summary.codespace":"程式工作區","code.workspace.summary.kind":"類型:{kind}","code.workspace.summary.ownership":"歸屬:{ownership}","code.workspace.summary.chatContext":"對話脈絡:{title}","code.workspace.summary.noChatContext":"沒有對話脈絡","code.workspace.summary.noChat":"沒有對話","code.workspace.summary.binding.conversationRepo":"建置流程已綁定到選取的對話儲存庫。","code.workspace.summary.binding.managedRoom":"建置流程已綁定到這個房間管理的程式工作區。","code.workspace.summary.binding.userSelected":"建置流程已綁定到使用者選取的本機資料夾。","code.workspace.kind.conversationRepo":"目前對話儲存庫","code.workspace.kind.managedRoom":"房間管理的工作區","code.workspace.kind.userSelected":"使用者選取的資料夾","code.workspace.ownership.conversationBound":"對話擁有","code.workspace.ownership.roomOwned":"房間擁有","code.workspace.ownership.ownerSelected":"使用者選取","code.workspace.source.task":"程式碼任務","code.workspace.source.conversationRepo":"對話儲存庫","code.workspace.source.runtimeCwd":"執行階段工作目錄","code.workspaces.listHeader":"程式工作區","code.workspaces.listNoCodespaces":"目前沒有程式工作區。啟動一個指定儲存庫、資料夾、工作樹或受管理房間的程式工作階段後,會出現在這裡。","code.workspaces.loading":"正在載入程式工作區…","code.workspaces.error":"無法載入程式工作區:{error}","code.workspaces.loadError":"載入程式工作區失敗。","code.workspaces.sourceCodes":"程式碼任務","code.workspaces.sourceRepo":"對話儲存庫","code.workspaces.sourceRuntime":"執行階段工作目錄","code.workspaces.sourceArtifact":"成品錨點","code.workspaces.ariaOpen":"開啟程式工作區 {title}","code.workspaceStatus.active":"作用中","code.workspaceStatus.archived":"已封存","code.workspaceStatus.draft":"草稿","code.workspaceStatus.ready":"就緒","code.workspaceStatus.unknown":"未知","code.workspaceDetail.error":"無法載入程式工作區。","code.workspaceDetail.loading":"正在載入程式工作區…","code.workspaceDetail.title":"程式工作區","code.workspaceDetail.notFound":"找不到程式工作區。它可能已被移除,或 URL 已變更。","code.workspaceDetail.missingId":"程式工作區 ID 為必填。","code.workspaceDetail.backToList":"返回所有程式工作區 →","code.workspaceDetail.overviewTitle":"總覽","code.workspaceDetail.artifactSection":"成品","code.workspaceDetail.conversationsSection":"對話","code.workspaceDetail.tasksSection":"任務","code.workspaceDetail.noArtifacts":"沒有成品","code.workspaceDetail.noArtifactsDesc":"尚未連結成品。這個程式工作區產生的建置、預覽或文件會出現在這裡。","code.workspaceDetail.noConversations":"目前沒有對話連結到這個程式工作區。","code.workspaceDetail.noTasks":"目前沒有程式碼任務連結到這個程式工作區。","code.workspaceDetail.overviewPath":"路徑","code.workspaceDetail.overviewSource":"來源","code.workspaceDetail.overviewStatus":"狀態","code.workspaceDetail.overviewLastActive":"最後活動","code.workspaceDetail.overviewSummary":"摘要","code.workspaceDetail.noSummary":"尚無摘要。","code.workspaceDetail.metric.conversations":"對話","code.workspaceDetail.metric.tasks":"任務","code.workspaceDetail.metric.artifacts":"成品","code.workspaceDetail.metric.id":"識別碼","code.workspaceDetail.overviewNoArtifacts":"尚無成品","code.workspaceDetail.conversationsEmpty":"沒有連結的對話","code.workspaceDetail.tasksEmpty":"沒有連結的任務","code.workspaceDetail.taskLabel":"任務","code.workspaceDetail.artifactsHeader":"此程式工作區的成品","code.workspace.source.unknown":"未知來源","code.delivery.blocked":"交付已阻擋"},Zn={en:Wp,"zh-TW":Up},Hp=["zh","zh-tw","zh-hant","zh-hk","zh-mo","chinese","traditional","traditional chinese","mandarin","中文","繁體中文","繁体中文","繁體","繁体","國語","国语","華語","华语"],_p=["zh-cn","zh-hans","zh-sg","zh-my","simplified","simplified chinese","簡體中文","简体中文","簡體","简体"],Gp=["zh-tw-","zh-hant-","zh-hk-","zh-mo-"],Kp=["zh-cn-","zh-hans-","zh-sg-","zh-my-"],qp=new Set(Hp),$p=new Set(_p);function ml(e){if(!e)return null;for(const t of zp(e)){const a=Qp(t);if(a)return a}return null}function zp(e){return e.split(",").map((t,a)=>{const[o,...n]=t.trim().split(";"),s=Vp(o),i=Yp(n);return{token:s,quality:i,index:a}}).filter(t=>t.token.length>0&&t.quality>0).sort((t,a)=>a.quality-t.quality||t.index-a.index).map(t=>t.token)}function Vp(e){return(e??"").trim().replace(/_/gu,"-").toLowerCase()}function Yp(e){const t=e.find(s=>/^q\s*=/iu.test(s.trim()));if(!t)return 1;const a=/^q\s*=\s*(?<quality>.*)$/iu.exec(t.trim());if(!a?.groups)return 1;const o=a.groups.quality.trim();if(!/^\d+(?:\.\d+)?$/u.test(o))return 1;const n=Number.parseFloat(o);return Math.min(Math.max(n,0),1)}function Qp(e){return e==="en"||e.startsWith("en-")?"en":es(e,qp,Gp)?"zh-TW":(es(e,$p,Kp),null)}function es(e,t,a){return t.has(e)?!0:a.some(o=>e.startsWith(o))}function Jp(e){return ml(e)??"en"}function Xp(e,t){return t?e.replace(/\{([^{}]+)\}/g,(a,o)=>{const n=t[o];return n===void 0?a:String(n)}):e}function Fe(e){return function(a,o){const n=a in l?l[a]:a;return Xp(Zn[e][n]??Zn.en[n],o)}}const zt=Fe("en"),Vt=Fe("en"),Zp={chat:{nameKey:l.platformProductChatName,subtitleKey:l.platformProductChatSubtitle,settingsLabelKey:l.platformProductChatSettingsLabel},code:{nameKey:l.platformProductCodeName,subtitleKey:l.platformProductCodeSubtitle,settingsLabelKey:l.platformProductCodeSettingsLabel},work:{nameKey:l.platformProductWorkName,subtitleKey:l.platformProductWorkSubtitle,settingsLabelKey:l.platformProductWorkSettingsLabel}};function Jo(e){return Zp[e]??null}function eh(e,t=Vt){return ah(e.id,e.productName,t)}function th(e,t=Vt){return rh(e.id,e.subtitle,t)}function ah(e,t,a=Vt){const o=Jo(e);return o?a(o.nameKey):t}function rh(e,t,a=Vt){const o=Jo(e);return o?a(o.subtitleKey):t}function gl(e,t,a=Vt){const o=Jo(e);return o?a(o.settingsLabelKey):t}function oh(e,t,a=Vt){return t.id===e?gl(e,t.label,a):t.label}const ts="en",fl="auto",wl=()=>{},kl=d.createContext({locale:ts,languagePreference:fl,setLanguagePreference:wl,t:Fe(ts)});function Ot({children:e,languagePreference:t=fl,locale:a,setLanguagePreference:o=wl}){const n=d.useMemo(()=>({locale:a,languagePreference:t,setLanguagePreference:o,t:Fe(a)}),[t,a,o]);return r.jsx(kl.Provider,{value:n,children:e})}const ho=["chat","work","code"],nh=["chat","work","code"],sh=["chat"];function bl(e){return ho.includes(e)}function sa(e,t=null){return typeof e=="string"&&bl(e)?e:t}function Mr(e,t){const a=new Set(t),o=[];for(const n of e)!bl(n)||!a.has(n)||o.includes(n)||o.push(n);return o}function ih(e,t={}){const a=Mr(t.allowed??ho,ho),o=Mr(Array.isArray(e)?e.filter(s=>typeof s=="string"):[],a);if(o.length>0)return o;const n=t.fallback??null;return!n||n.length===0?[]:Mr(n,a)}function Xo(e,t,a={}){return ih(e,a).includes(t)}function lh(e){return nh.includes(e)}function hr(){return[...sh]}const ch=null,dh="/api/work",uh="/api/code",ph={chat:ch,work:dh,code:uh};function hh(e){return ph[e]??null}const as="/settings";function Pa(e){return e===as||e.startsWith(`${as}/`)}const mh="/setup",rs="/lobby",os="/products",gh="/entities",fh=[gh];function yl(e){return e===mh}function ga(e){return e===rs||e.startsWith(`${rs}/`)}function vl(e){return e===os||e.startsWith(`${os}/`)}function Cl(e){return fh.some(t=>e===t||e.startsWith(`${t}/`))}function wh(e){return yl(e)||ga(e)||vl(e)||Cl(e)||Pa(e)}const Er=Object.fromEntries(Bp().map(e=>[e.id,{surface:e.id,routePrefix:e.routePrefix,apiBase:hh(e.id),placeholder:!lh(e.id)}]));function kh(e){return Fp(e)}function bh(e,t,a,o="chat"){const n=sa(e);if(n)return n;const s=sa(t);if(s)return s;const i=sa(a);if(i)return i;const c=sa(o);return c||"chat"}function U(){return d.useContext(kl)}function Et(){const[e,t]=d.useState(null),a=d.useCallback(s=>new Promise(i=>{t({options:s,resolve:i})}),[]),o=d.useCallback(async s=>await a(s)==="confirm",[a]),n=d.useCallback(s=>{e&&(e.resolve(yh(s)),t(null))},[e]);return{dialog:e,confirm:o,choose:a,handleClose:n}}function It({dialog:e,onClose:t}){const{t:a}=U(),o=d.useRef(null);if(d.useEffect(()=>{e&&o.current?.focus()},[e]),d.useEffect(()=>{if(!e)return;function s(i){i.key==="Escape"&&t("cancel")}return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[e,t]),!e)return null;const n=e.options.defaultAction??"confirm";return r.jsx("div",{className:"confirmOverlay",onClick:()=>t("cancel"),children:r.jsxs("div",{className:"confirmDialog",onClick:s=>s.stopPropagation(),children:[r.jsx("p",{className:"confirmTitle",children:e.options.title}),r.jsx("p",{className:"confirmMessage",children:e.options.message}),r.jsxs("div",{className:"confirmActions",children:[r.jsx("button",{ref:n==="cancel"?o:null,className:"confirmCancelButton",type:"button",onClick:()=>t("cancel"),children:e.options.cancelLabel??a(l.sharedCommonCancel)}),e.options.auxiliaryLabel?r.jsx("button",{ref:n==="auxiliary"?o:null,className:"confirmAuxiliaryButton",type:"button",onClick:()=>t("auxiliary"),children:e.options.auxiliaryLabel}):null,r.jsx("button",{ref:n==="confirm"?o:null,className:"confirmDestructiveButton",type:"button",onClick:()=>t("confirm"),children:e.options.confirmLabel??a(l.sharedCommonDelete)})]})]})})}function yh(e){return typeof e=="boolean"?e?"confirm":"cancel":e}function vh({id:e,title:t,badge:a,isOpen:o,onToggle:n,children:s}){return r.jsxs("div",{className:"accordionSection",children:[r.jsxs("button",{type:"button",className:"accordionHeader",onClick:()=>n(e),"aria-expanded":o,children:[r.jsx("span",{className:"accordionHeaderTitle",children:t}),a!=null&&a>0?r.jsx("span",{className:"accordionBadge",children:a}):null,r.jsx("svg",{className:o?"accordionChevron accordionChevronOpen":"accordionChevron",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M4.5 2.5 8 6 4.5 9.5"})})]}),o?r.jsx("div",{className:"accordionBody",children:s}):null]})}const mo="cats:side-panel-layout-change";function Ch({title:e,activeSection:t,onSectionToggle:a,onClose:o,sections:n,className:s="",position:i="side"}){const c=d.useRef(null),{t:u}=U(),h=["sidePanel",i==="bottom"?"sidePanelBottom":"",s].filter(Boolean).join(" ");d.useEffect(()=>{function p(f){if(c.current&&!c.current.contains(f.target)){if(f.target.closest(".sidePanelToggle"))return;o()}}function k(f){f.key==="Escape"&&o()}return document.addEventListener("mousedown",p),document.addEventListener("keydown",k),()=>{document.removeEventListener("mousedown",p),document.removeEventListener("keydown",k)}},[o]);const g=i==="bottom"?"bottom":"side";return d.useEffect(()=>(ns(),()=>{ns()}),[h,g]),r.jsxs("aside",{className:h,ref:c,"data-side-panel-position":g,children:[r.jsxs("div",{className:"sidePanelHeader",children:[r.jsx("strong",{children:e}),r.jsx("button",{type:"button",className:"chromeButton",onClick:o,"aria-label":u(l.designSidePanelCloseLabel),children:"×"})]}),r.jsx("div",{className:"sidePanelBody",children:n.map(p=>r.jsx(vh,{id:p.id,title:p.title,badge:p.badge,isOpen:t===p.id,onToggle:a,children:p.children},p.id))})]})}function ns(){typeof window>"u"||window.dispatchEvent(new Event(mo))}let it=null,Rt=null,la=null;function Sl(){return it||(it=document.createElement("div"),it.className="tooltipPortal",document.body.appendChild(it)),it}function Zo(){la&&(clearTimeout(la),la=null)}function Sh(e){const t=e.getAttribute("data-tooltip-delay");if(!t)return 0;const a=Number(t);return Number.isFinite(a)&&a>0?a:0}function Lh(e){if(!e.isConnected)return!1;try{return e.matches(":hover")}catch{return!0}}function ss(e,t){const a=Sl();a.textContent=t,a.classList.add("tooltipVisible");const o=e.getBoundingClientRect(),n=6;a.style.left=`${o.left+o.width/2}px`,a.style.top=`${o.top-n}px`,a.style.transform="translate(-50%, -100%)";const s=a.getBoundingClientRect();s.top<4&&(a.style.top=`${o.bottom+n}px`,a.style.transform="translate(-50%, 0)"),a.getBoundingClientRect().right>window.innerWidth-4&&(a.style.left=`${window.innerWidth-4}px`,a.style.transform=s.top<4?"translate(-100%, 0)":"translate(-100%, -100%)")}function Rh(e){const t=e.getAttribute("data-tooltip");if(!t)return;Rt&&(clearTimeout(Rt),Rt=null),Zo();const a=Sh(e);if(a>0){la=setTimeout(()=>{la=null;const o=e.getAttribute("data-tooltip");o&&Lh(e)&&ss(e,o)},a);return}ss(e,t)}function Ph(){Zo(),Rt=setTimeout(()=>{Sl().classList.remove("tooltipVisible")},50)}function go(){Zo(),Rt&&(clearTimeout(Rt),Rt=null),it&&it.classList.remove("tooltipVisible")}function Ah(){go()}function xh(){function e(o){const n=o.target.closest?.("[data-tooltip]");n&&Rh(n)}function t(o){o.target.closest?.("[data-tooltip]")&&Ph()}function a(){go()}return document.addEventListener("mouseover",e,!0),document.addEventListener("mouseout",t,!0),document.addEventListener("click",a,!0),()=>{document.removeEventListener("mouseover",e,!0),document.removeEventListener("mouseout",t,!0),document.removeEventListener("click",a,!0),go(),it&&(it.remove(),it=null)}}function Ir(e,t={}){const a=t.pinnedOnly?'[data-side-panel-position="side"][data-side-panel-pinned="true"]':'[data-side-panel-position="side"]',n=Array.from(e.querySelectorAll(a)).filter(s=>Th(s)).map(s=>s.getBoundingClientRect()).filter(s=>s.width>0&&s.height>0).reduce((s,i)=>s==null?i.left:Math.min(s,i.left),null);return n==null?null:Math.round(n)}function Th(e){const t=e.checkVisibility;if(typeof t=="function")try{return t.call(e,{checkOpacity:!0,checkVisibilityCSS:!0,contentVisibilityAuto:!0})}catch{}if(typeof window>"u"||typeof window.getComputedStyle!="function")return!0;const a=window.getComputedStyle(e);if(a.display==="none"||a.visibility==="hidden")return!1;const o=Number(a.opacity);return!(Number.isFinite(o)&&o===0)}function Dh(e,t=!1){return e==="bubble"||t&&e==="auto"?"welcome-peek":"open"}function Nh(){return"collapsed"}function jh(e){return e==="drawer"?"open":"welcome-peek"}function Mh(e,t){return t<=e.lastQueuedToken?e:{lastQueuedToken:t,pendingToken:t}}function Eh(e,t){return t||e.pendingToken==null?{queue:e,shouldOpen:!1}:{queue:{...e,pendingToken:null},shouldOpen:!0}}function Ih(e){const t=Mh(e.queue,e.token),a=Eh(t,e.isHiddenRoute);return a.shouldOpen?{queue:a.queue,commit:{innerState:jh(e.mode),proactive:!0}}:{queue:a.queue,commit:null}}function Bh(e,t,a=!1){return e==="collapsed"?{nextState:Dh(t,a),persistSeen:!1}:e==="welcome-peek"?t==="bubble"||a&&t==="auto"?{nextState:"collapsed",persistSeen:!0}:{nextState:"open",persistSeen:!0}:{nextState:"collapsed",persistSeen:!1}}function Fh(e){return{nextState:"collapsed",persistSeen:e==="welcome-peek"}}function is(){return Nh()}function Oh(e,t,a=0,o="floating"){const n=ve(),[s,i]=d.useState(()=>is()),[c,u]=d.useState(!1),h=d.useRef({lastQueuedToken:0,pendingToken:null}),g=d.useRef(e);g.current=e;const p=n.pathname==="/setup",k=Pa(n.pathname),f=p||k&&o!=="docked",w=k&&o==="docked";d.useEffect(()=>{f&&(u(!1),i(y=>{const L=is();return y===L?y:L}))},[f]),d.useEffect(()=>{const y=Ih({queue:h.current,token:a,isHiddenRoute:f,mode:g.current});if(h.current=y.queue,!y.commit)return;const{innerState:L,proactive:N}=y.commit;u(N),i(T=>T===L?T:L)},[f,a]);const b=f?"hidden":s,m=d.useCallback(()=>{u(!1),i(y=>{const L=Bh(y,e,w);return L.persistSeen&&t(),L.nextState})},[e,t,w]),C=d.useCallback(()=>{u(!1),i(y=>{const L=Fh(y);return L.persistSeen&&t(),L.nextState})},[t]),v=d.useCallback(()=>{u(!1),i("collapsed"),t()},[t]);return{viewState:b,proactive:c,toggle:m,collapse:C,dismissWelcome:v}}const Ll={x:.03,y:.5};function Rl(e,t="floating"){return yl(e)?"hidden":Pa(e)?t==="docked"?"workspace":"hidden":ga(e)?"lobby":"workspace"}const ot=16,Wh=28,Ia=Wh/2,Ba=24,Uh=24,Hh=4;function ls(e){const t=e.currentX-e.startX,a=e.currentY-e.startY;return Math.hypot(t,a)>=Hh}function _h(e){const{surface:t,viewport:a,topChromeBottom:o,sidebarRight:n,rightBlockedLeft:s=null}=e,i=t==="workspace"&&n!=null?Math.max(ot,n+ot):ot,c=t==="lobby"&&o!=null?Math.max(ot,o+ot):ot,u=t==="workspace"&&s!=null?Math.min(a.width-ot,s-ot):a.width-ot,h=i+Ia,g=c+Ia,p=Math.max(h+1,u-Ia),k=Math.max(g+1,a.height-ot-Ia);return{left:h,top:g,right:p,bottom:k}}function Pl(e){const{anchor:t,viewport:a,safeArea:o}=e,n=t.x*a.width,s=t.y*a.height;return{x:Math.min(o.right,Math.max(o.left,n)),y:Math.min(o.bottom,Math.max(o.top,s))}}function fo(e){const{pointerX:t,pointerY:a,viewport:o}=e;return o.width<=0||o.height<=0?{...Ll}:{x:Math.min(1,Math.max(0,t/o.width)),y:Math.min(1,Math.max(0,a/o.height))}}function Al(e){return e??{...Ll}}function Gh(e){const t=fo({pointerX:e.pointerX,pointerY:e.pointerY,viewport:e.viewport}),a=Al(t),o=Pl({anchor:a,viewport:e.viewport,safeArea:e.safeArea}),n=fo({pointerX:o.x,pointerY:o.y,viewport:e.viewport});return e.undock?{placement:"floating",floatingAnchor:n}:{floatingAnchor:n}}function Kh(e){const{pointerX:t,pointerY:a,slotRect:o}=e;return o?t>=o.left-Ba&&t<=o.right+Ba&&a>=o.top-Ba&&a<=o.bottom+Ba:!1}function wo(e){return e==="lobby"?"lobby":e==="workspace"?"workspace":null}function qh(e){const{placement:t,anchor:a,surface:o,viewport:n,safeArea:s}=e;if(o==="hidden")return{kind:"hidden"};if(t==="docked"){const p=wo(o);return p?{kind:"docked",slot:p}:{kind:"hidden"}}const i=Al(a),{x:c,y:u}=Pl({anchor:i,viewport:n,safeArea:s}),h=fo({pointerX:c,pointerY:u,viewport:n}),g=Math.abs(h.x-i.x)>.001||Math.abs(h.y-i.y)>.001?"collision_reflow":null;return{kind:"floating",x:c,y:u,overrideReason:g}}const xl=d.createContext(null);function $h({guideCat:e,placement:t,floatingAnchor:a,sidecarMode:o,proactiveGreetingToken:n=0,onPersistSeen:s,onCommit:i,children:c}){const u=Oh(o,s,n,t),h=ve(),g=Rl(h.pathname,t),[p,k]=d.useState(()=>cs()),[f,w]=d.useState(null),[b,m]=d.useState(null),[C,v]=d.useState(null),y=d.useRef({lobby:null,workspace:null}),L=d.useRef({lobby:null,workspace:null}),N=d.useRef(null),T=d.useRef(!1),j=d.useRef(null),[A,R]=d.useState(null),P=d.useCallback(M=>{j.current=M,R(M)},[]);d.useEffect(()=>{if(typeof window>"u")return;const M=()=>k(cs());return window.addEventListener("resize",M),()=>window.removeEventListener("resize",M)},[]),d.useEffect(()=>{if(!(typeof document>"u"))return ps({document,selector:".lobbyTopBar",readValue:M=>M?Math.round(M.getBoundingClientRect().bottom):null,onChange:M=>{w(H=>H===M?H:M)}})},[h.pathname]),d.useEffect(()=>{if(!(typeof document>"u"))return ps({document,selector:"aside.sidebar",readValue:M=>M?Math.round(M.getBoundingClientRect().right):null,onChange:M=>{m(H=>H===M?H:M)}})},[h.pathname]),d.useEffect(()=>{if(typeof document>"u"||typeof window>"u")return;const M=()=>{const H=g==="workspace"?Ir(document):null;v(V=>V===H?V:H)};return M(),window.addEventListener("resize",M),window.addEventListener(mo,M),()=>{window.removeEventListener("resize",M),window.removeEventListener(mo,M)}},[g,h.pathname]);const I=d.useMemo(()=>_h({surface:g,viewport:p,topChromeBottom:f,sidebarRight:b,rightBlockedLeft:C}),[g,p,f,b,C]),O=d.useMemo(()=>qh({placement:t,anchor:a,surface:g,viewport:p,safeArea:I}),[t,a,g,p,I]),E=d.useMemo(()=>{if(!A||!A.activated)return O;const M=A.currentX-A.startX,H=A.currentY-A.startY;return A.mode==="floating"?{kind:"floating",x:Fa(A.basePillX+M,p.width),y:Fa(A.basePillY+H,p.height),overrideReason:null}:A.mode==="docked"&&!A.escaped?O:A.mode==="docked"&&A.escaped?{kind:"floating",x:Fa(A.basePillX+M,p.width),y:Fa(A.basePillY+H,p.height),overrideReason:null}:O},[O,A,p]),$=d.useMemo(()=>{const M=wo(g),H=t==="docked"&&M!=null,V=A?.mode==="floating"&&A.activated?A.overSlot:null;return{lobby:{active:H&&M==="lobby",preview:V==="lobby"},workspace:{active:H&&M==="workspace",preview:V==="workspace"}}},[t,g,A]),G=d.useCallback((M,H)=>{y.current[M]=H,L.current[M]=H?Fr(H):null},[]),ee=d.useCallback(()=>{Object.keys(y.current).forEach(M=>{const H=y.current[M];L.current[M]=H?Fr(H):null})},[]),B=d.useCallback(M=>{const H=y.current[M];return H?Fr(H):null},[]),q=d.useCallback((M,H,V=!1)=>Gh({pointerX:M,pointerY:H,viewport:p,safeArea:I,undock:V}),[I,p]),F=d.useCallback(M=>{i({placement:"docked"})},[i]),Q=d.useCallback(M=>{const H=ls({startX:M.startX,startY:M.startY,currentX:M.currentX,currentY:M.currentY}),V=M.basePillX+(M.currentX-M.startX),Se=M.basePillY+(M.currentY-M.startY);M.mode==="floating"&&M.overSlot?(F(M.overSlot),T.current=!0):M.mode==="floating"&&H?(i(q(V,Se)),T.current=!0):M.mode==="docked"&&M.escaped&&(i(q(V,Se,!0)),T.current=!0),P(null)},[F,i,q]),me=d.useCallback(M=>{const H=j.current;if(!H||M.pointerId!==H.pointerId)return;const V={...H,currentX:M.clientX,currentY:M.clientY};if(!H.activated){if(!ls({startX:H.startX,startY:H.startY,currentX:M.clientX,currentY:M.clientY})){P(V);return}V.activated=!0,typeof document<"u"&&document.body.classList.add(Br),ds(),u.collapse(),ee()}if(H.mode==="floating"){const Se=wo(g);if(Se){const z=L.current[Se];Kh({pointerX:M.clientX,pointerY:M.clientY,slotRect:z})?V.overSlot=Se:V.overSlot=null}else V.overSlot=null}else if(H.mode==="docked"){const Se=M.clientX-H.startX,z=M.clientY-H.startY;!H.escaped&&Math.hypot(Se,z)>=Uh&&(V.escaped=!0)}P(V)},[u,ee,P,g]),W=d.useCallback(M=>{const H=j.current;if(!H||M.pointerId!==H.pointerId)return;const V={...H,currentX:M.clientX,currentY:M.clientY};Q(V)},[Q]);d.useEffect(()=>{if(!A)return;const M=H=>{const V=j.current;!V||H.pointerId!==V.pointerId||P(null)};return window.addEventListener("pointermove",me),window.addEventListener("pointerup",W),window.addEventListener("pointercancel",M),()=>{window.removeEventListener("pointermove",me),window.removeEventListener("pointerup",W),window.removeEventListener("pointercancel",M)}},[A,me,W,P]);const D=!!A?.activated,_=d.useMemo(()=>g==="workspace"&&b!=null?Math.max(0,Math.round(b)):0,[g,b]);d.useEffect(()=>{if(!(typeof document>"u")&&D)return document.body.classList.add(Br),()=>{document.body.classList.remove(Br),ds()}},[D]);const J=d.useCallback(M=>{if(M.button!==0&&M.pointerType==="mouse")return;M.preventDefault(),M.stopPropagation(),T.current=!1,us(),v(Ir(document,{pinnedOnly:!0}));const H=M.currentTarget,V=H.getBoundingClientRect(),Se=V.left+V.width/2,z=V.top+V.height/2;try{H.setPointerCapture(M.pointerId)}catch{}P({mode:"floating",pointerId:M.pointerId,startX:M.clientX,startY:M.clientY,currentX:M.clientX,currentY:M.clientY,basePillX:Se,basePillY:z,activated:!1,overSlot:null,escaped:!1})},[]),X=d.useCallback(M=>{if(M.button!==0&&M.pointerType==="mouse")return;M.preventDefault(),M.stopPropagation(),T.current=!1,us(),v(Ir(document,{pinnedOnly:!0}));const H=M.currentTarget,V=H.getBoundingClientRect(),Se=V.left+V.width/2,z=V.top+V.height/2;try{H.setPointerCapture(M.pointerId)}catch{}P({mode:"docked",pointerId:M.pointerId,startX:M.clientX,startY:M.clientY,currentX:M.clientX,currentY:M.clientY,basePillX:Se,basePillY:z,activated:!1,overSlot:null,escaped:!1})},[]),oe=d.useCallback(()=>{const M=T.current;return T.current=!1,M},[]),we=d.useCallback(()=>{T.current=!1},[]),Ee=d.useCallback(()=>{if(E.kind!=="docked")return;const M=B(E.slot);if(!M)return;const H=(M.left+M.right)/2,V=(M.top+M.bottom)/2;i(q(H,V,!0))},[E,i,q,B]),Ae=d.useMemo(()=>({guideCat:e,projection:E,dockSlotState:$,pillRef:N,registerSlotRef:G,onFloatingPointerDown:J,onDockedPointerDown:X,consumePillClickSuppression:oe,clearPillClickSuppression:we,presentation:u,dragActive:D,panelOriginX:_,getDockSlotRect:B,undock:Ee}),[e,E,$,G,J,X,oe,we,u,D,_,B,Ee]);return r.jsx(xl.Provider,{value:Ae,children:c})}function en(){const e=d.useContext(xl);if(!e)throw new Error("useGuideCatPlacement requires GuideCatPlacementProvider");return e}function zh(e){const{registerSlotRef:t}=en();return d.useCallback(a=>{t(e,a)},[t,e])}function cs(){return typeof window>"u"?{width:0,height:0}:{width:window.innerWidth,height:window.innerHeight}}function Fa(e,t){return t<=0?e:Math.min(t,Math.max(0,e))}function ds(){Ah()}const Tl=Symbol.for("cats.guideCat.dismissTransientChrome");function Vh(e){return!!e[Tl]}function us(){if(typeof document>"u"||typeof MouseEvent>"u")return;const e=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:typeof window<"u"?window:void 0,button:0});e[Tl]=!0,document.body.dispatchEvent(e)}const Br="guideCatDragging";function Fr(e){const t=e.getBoundingClientRect();return{left:t.left,top:t.top,right:t.right,bottom:t.bottom}}function ps(e){const{document:t,selector:a,readValue:o,onChange:n}=e,s=globalThis.ResizeObserver,i=globalThis.MutationObserver,c=t.body??t.documentElement;if(!c)return n(o(t.querySelector(a))),()=>{};let u=null,h=null,g=null;const p=()=>{h?.disconnect(),g?.disconnect(),h=null,g=null},k=()=>{n(o(u))},f=()=>{u&&typeof s=="function"&&(h=new s(k),h.observe(u)),u&&typeof i=="function"&&(g=new i(k),g.observe(u,{attributes:!0,attributeFilter:["class","style"]}))},w=()=>{const m=t.querySelector(a);return m===u?!1:(p(),u=m,f(),k(),!0)};let b=null;return typeof i=="function"&&(b=new i(()=>{u!=null&&(u.isConnected??!0)||w()}),b.observe(c,{childList:!0,subtree:!0})),w()||k(),()=>{p(),b?.disconnect()}}const mr="cats.guide-cat-ui-prefs",Dl=1,Ht={sidecarSeen:!1,sidecarMode:"auto",placement:"floating",floatingAnchor:null},hs=new Set;function fa(){const e=globalThis;return typeof e.addEventListener!="function"||typeof e.removeEventListener!="function"?null:e}function Yh(e,t){(fa()===null?d.useEffect:d.useLayoutEffect)(e,t)}function Qh(e){if(typeof e!="object"||e===null)return null;const t=e,a=t.x,o=t.y;return typeof a!="number"||typeof o!="number"||!Number.isFinite(a)||!Number.isFinite(o)?null:{x:Math.min(1,Math.max(0,a)),y:Math.min(1,Math.max(0,o))}}function Jh(e){return e==="auto"||e==="drawer"||e==="bubble"?e:Ht.sidecarMode}function Xh(e){return e==="floating"||e==="docked"?e:Ht.placement}function Zh(e,t){return{sidecarSeen:t.sidecarSeen??e.sidecarSeen,sidecarMode:t.sidecarMode??e.sidecarMode,placement:t.placement??e.placement,floatingAnchor:t.floatingAnchor!==void 0?t.floatingAnchor:e.floatingAnchor}}function tn(e){if(!e)return null;try{const t=JSON.parse(e);if(typeof t!="object"||t===null)return null;const a=t;return a.version===Dl?{sidecarSeen:a.sidecarSeen===!0,sidecarMode:Jh(a.sidecarMode),placement:Xh(a.placement),floatingAnchor:Qh(a.floatingAnchor)}:null}catch{return null}}function Nl(e){hs.has(e)||(hs.add(e),globalThis.console?.warn?.(`[guide-cat-ui-prefs] Ignoring unsupported or malformed stored prefs during ${e}.`))}function em(e){const t={version:Dl,sidecarSeen:e.sidecarSeen,sidecarMode:e.sidecarMode,placement:e.placement,floatingAnchor:e.floatingAnchor?{...e.floatingAnchor}:null};return JSON.stringify(t)}function tm(e){if(!e)return null;try{return tn(e.getItem(mr))}catch{return null}}function am(e){if(!e)return null;try{return e.getItem(mr)}catch{return null}}function jl(e,t){if(!e)return{persisted:!1,prefs:t};try{e.setItem(mr,em(t));const a=tm(e);if(a)return{persisted:!0,prefs:a}}catch{}return{persisted:!1,prefs:t}}function rm(e){const{storage:t}=e,a=am(t),o=tn(a);if(o)return{prefs:o,source:"local",persisted:!0};if(a!==null)return Nl("bootstrap"),{prefs:{...Ht},source:"defaults",persisted:!1};const n={...Ht},s=jl(t,n).persisted;return{prefs:n,source:"defaults",persisted:s}}function Or(e,t){return e.sidecarSeen===t.sidecarSeen&&e.sidecarMode===t.sidecarMode&&e.placement===t.placement&&e.floatingAnchor?.x===t.floatingAnchor?.x&&e.floatingAnchor?.y===t.floatingAnchor?.y}class om{constructor(t){this.storage=t}prefs={...Ht};hydrated=!1;listeners=new Set;storageListening=!1;getSnapshot=()=>this.prefs;isHydrated(){return this.hydrated}subscribe=t=>(this.listeners.add(t),this.ensureStorageListener(),()=>{this.listeners.delete(t),this.listeners.size===0&&this.teardownStorageListener()});ensureHydrated(){if(this.hydrated)return;const t=rm({storage:this.storage});this.prefs=t.prefs,this.hydrated=!0}update(t){this.hydrated||this.ensureHydrated();const a=Zh(this.prefs,t);if(Or(this.prefs,a))return;const o=jl(this.storage,a).prefs;this.prefs=o,this.hydrated=!0,this.emit()}emit(){this.listeners.forEach(t=>t())}ensureStorageListener(){const t=fa();!t||this.storageListening||(t.addEventListener?.("storage",this.handleStorageEvent),this.storageListening=!0)}teardownStorageListener(){const t=fa();!t||!this.storageListening||(t.removeEventListener?.("storage",this.handleStorageEvent),this.storageListening=!1)}handleStorageEvent=t=>{if(t.key!==mr)return;if(t.newValue===null){const o={...Ht};if(Or(this.prefs,o))return;this.prefs=o,this.hydrated=!0,this.emit();return}const a=tn(t.newValue);if(!a){Nl("storage-event");return}Or(this.prefs,a)||(this.prefs=a,this.hydrated=!0,this.emit())}}function Ml(e){return new om(e)}let Wr=null;function nm(){return Wr||(Wr=Ml(fa()?.localStorage??null)),Wr}function an(e={}){const{hydrate:t=!0}=e,a=d.useMemo(()=>fa()===null?Ml(null):nm(),[]),[,o]=d.useState(0);Yh(()=>{!t||a.isHydrated()||(a.ensureHydrated(),o(i=>i+1))},[t,a]);const n=d.useSyncExternalStore(a.subscribe,a.getSnapshot,a.getSnapshot),s=d.useCallback(i=>{a.update(i)},[a]);return{prefs:n,hydrated:t&&a.isHydrated(),update:s}}const Va=["claude","codex","antigravity","cursor","copilot","opencode","kilo","goose","pi","auggie","junie","kiro","ollama","openclaw"],sm={openclaw:[{value:"openclaw-coder",label:"openclaw-coder (default)",default:!0}],claude:[{value:"opus",label:"Opus 4.7 with 1M context",default:!0},{value:"sonnet",label:"Sonnet 4.6"},{value:"haiku",label:"Haiku 4.5"}],codex:[{value:"gpt-5.4",label:"gpt-5.4",default:!0},{value:"gpt-5.4-mini",label:"gpt-5.4-mini"},{value:"gpt-5.3-codex",label:"gpt-5.3-codex"},{value:"gpt-5.3-codex-spark",label:"gpt-5.3-codex-spark"},{value:"gpt-5.2-codex",label:"gpt-5.2-codex"},{value:"gpt-5.2",label:"gpt-5.2"},{value:"gpt-5.1-codex-max",label:"gpt-5.1-codex-max"},{value:"gpt-5.1-codex-mini",label:"gpt-5.1-codex-mini"}],antigravity:[{value:"antigravity-default",label:"Antigravity default",default:!0}],copilot:[{value:"gpt-5.4",label:"gpt-5.4 (default)",default:!0},{value:"claude-opus-4-6",label:"claude-opus-4-6"},{value:"gemini-3-pro-preview",label:"gemini-3-pro-preview"}],opencode:[{value:"opencode-go/glm-5",label:"glm-5 (default)",default:!0},{value:"opencode-go/kimi-k2.5",label:"kimi k2.5"},{value:"opencode-go/minimax-m2.5",label:"minimax m2.5"}],kilo:[{value:"kilo/openai/gpt-5.4",label:"gpt-5.4 (default)",default:!0},{value:"kilo/openai/gpt-5.4-mini",label:"gpt-5.4-mini"},{value:"kilo/anthropic/claude-opus-4.6",label:"claude-opus-4.6"},{value:"kilo/anthropic/claude-sonnet-4.6",label:"claude-sonnet-4.6"},{value:"kilo/google/gemini-3.1-pro-preview",label:"gemini-3.1-pro-preview"},{value:"kilo/z-ai/glm-5",label:"glm-5"}],auggie:[{value:"gpt-5.4",label:"gpt-5.4 (default)",default:!0},{value:"claude opus 4.6",label:"claude opus 4.6"},{value:"sonnet 4.6",label:"sonnet 4.6"}],pi:[{value:"openai-codex/gpt-5.4",label:"openai-codex gpt-5.4 (default)",default:!0}],junie:[{value:"Gemini 3 Flash",label:"Gemini 3 Flash (default)",default:!0},{value:"Claude Opus 4.6",label:"Claude Opus 4.6"},{value:"Claude Opus 4.7",label:"Claude Opus 4.7"},{value:"Claude Sonnet 4.6",label:"Claude Sonnet 4.6"},{value:"Gemini 3.1 Flash Lite",label:"Gemini 3.1 Flash Lite"},{value:"Gemini 3.1 Pro Preview",label:"Gemini 3.1 Pro Preview"},{value:"GPT-5",label:"GPT-5"},{value:"GPT-5.2",label:"GPT-5.2"},{value:"GPT-5.3-codex",label:"GPT-5.3-codex"},{value:"GPT-5.4",label:"GPT-5.4"},{value:"Grok 4.1 Fast Reasoning",label:"Grok 4.1 Fast Reasoning"}],cursor:[{value:"auto",label:"auto"},{value:"composer-2-fast",label:"Composer 2 Fast (default)",default:!0},{value:"gpt-5.4",label:"gpt-5.4"},{value:"claude-opus-4-6",label:"claude 4.6 opus"},{value:"gemini-3.1-pro",label:"gemini 3.1 pro"}],kiro:[{value:"claude-sonnet-4.5",label:"claude-sonnet-4.5 (default)",default:!0},{value:"deepseek-3.2",label:"deepseek-3.2"},{value:"minimax-m2.1",label:"minimax-m2.1"}],goose:[{value:"openai/gpt-5-codex",label:"openai/gpt-5-codex (default)",default:!0},{value:"openai/gpt-5",label:"openai/gpt-5"}],ollama:[{value:"qwen2.5-coder:7b",label:"qwen2.5-coder:7b (default)",default:!0}]},im={claude:[{id:"native",label:"cli/native",target:"cli/native",backend:"cli",default:!0},{id:"sdk",label:"agent/sdk",target:"agent/sdk",backend:"agent"},{id:"sonnet",label:"api/sonnet",target:"api/sonnet",backend:"api"}],codex:[{id:"native",label:"cli/native",target:"cli/native",backend:"cli",default:!0},{id:"main",label:"api/main",target:"api/main",backend:"api"}],antigravity:[{id:"native",label:"cli/native",target:"cli/native",backend:"cli",default:!0}],cursor:[{id:"native",label:"cli/native",target:"cli/native",backend:"cli",default:!0}],copilot:[{id:"native",label:"cli/native",target:"cli/native",backend:"cli",default:!0}],opencode:[{id:"native",label:"cli/native",target:"cli/native",backend:"cli",default:!0}],kilo:[{id:"native",label:"cli/native",target:"cli/native",backend:"cli",default:!0}],goose:[{id:"native",label:"cli/native",target:"cli/native",backend:"cli",default:!0}],pi:[{id:"native",label:"cli/native",target:"cli/native",backend:"cli",default:!0}],auggie:[{id:"native",label:"cli/native",target:"cli/native",backend:"cli",default:!0}],junie:[{id:"native",label:"cli/native",target:"cli/native",backend:"cli",default:!0}],kiro:[{id:"native",label:"cli/native",target:"cli/native",backend:"cli",default:!0}],ollama:[{id:"local",label:"local/local",target:"local/local",backend:"local",default:!0}],openclaw:[{id:"gateway",label:"agent/gateway",target:"agent/gateway",backend:"agent",default:!0}]},lm=Object.fromEntries(Object.entries(sm).map(([e,t])=>[e,t.map(a=>({...a}))]));function ue(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function El(e){const t=ue(e);return t?ue(t.catalog)??t:null}function ae(e){return typeof e=="string"&&e.trim().length>0?e:null}function ea(e){return e==="none"||e==="derived"||e==="native"||e==="unknown"?e:"unknown"}function cm(e){return e==="none"||e==="final"||e==="chunk"||e==="line"||e==="token"||e==="unknown"?e:"unknown"}function dm(e){return e==="final_message"||e==="event_tape"||e==="content_blocks"||e==="unknown"?e:"unknown"}function um(e){const t=ue(e);if(!t)return null;const a=ue(t.normalizedStream),o=ue(a?.text),n=ue(t.transcript),s=ue(t.presentation),i=ue(t.validation),c=ue(i?.observed);return{normalizedStream:{text:{mode:cm(o?.mode),stepwise:o?.stepwise===!0},toolUse:ea(a?.toolUse),toolResult:ea(a?.toolResult),progress:ea(a?.progress),reasoning:ea(a?.reasoning)},transcript:{contentBlocks:ea(n?.contentBlocks)},presentation:{recommended:dm(s?.recommended)},notes:De(t.notes),...i?{validation:{artifactId:typeof i.artifactId=="string"?i.artifactId:"",capturedAt:typeof i.capturedAt=="string"?i.capturedAt:"",transport:typeof i.transport=="string"?i.transport:"",...typeof i.runtimeMode=="string"?{runtimeMode:i.runtimeMode}:{},executionStatus:i.executionStatus==="failed"?"failed":"completed",observed:{incrementalText:c?.incrementalText===!0,toolUse:c?.toolUse===!0,toolResult:c?.toolResult===!0,progress:c?.progress===!0,finalResult:c?.finalResult===!0}}}:{}}}function ko(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function De(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function Oa(e){const t=ue(e);if(!t)return;const a=Object.entries(t).filter(([,o])=>ko(o));return a.length>0?Object.fromEntries(a):void 0}function ms(e){return e==="supported"||e==="unavailable"||e==="available"||e==="preview"||e==="deprecated"?e:void 0}function pm(e){return e==="boolean"||e==="enum"||e==="number"||e==="string"?e:"string"}function hm(e){return e==="session_default"||e==="request"||e==="both"?e:"session_default"}function mm(e){return e==="auto"||e==="explicit"?e:"explicit"}function gs(e){if(!Array.isArray(e))return;const t=e.flatMap(a=>{if(ko(a))return[{value:a,label:String(a)}];const o=ue(a);return!o||!ko(o.value)?[]:[{value:o.value,label:ae(o.label)??String(o.value),...ae(o.description)?{description:ae(o.description)}:{},...De(o.applicableEntryIds).length>0?{applicableEntryIds:De(o.applicableEntryIds)}:{}}]});return t.length>0?t:void 0}function gm(e){return Va.includes(e)}function Bt(e){const t=e?.trim().toLowerCase();if(!t)return null;if(Va.includes(t))return t;if(t.endsWith("-cli")){const a=t.slice(0,-4);if(Va.includes(a))return a}return null}function Il(e){const t=Bt(e)??e.trim();return t==="openclaw"?"OpenClaw":t.charAt(0).toUpperCase()+t.slice(1)}function rn(e){const t=Bt(e);return t?lm[t]??[]:[]}function on(e,t){const a=t?.trim();if(!a)return null;if((Bt(e)??e)==="claude"){const n=a.toLowerCase();if(n==="claude-opus-4-6"||n==="claude-opus-4.6"||n==="opus")return"opus";if(n==="claude-sonnet-4-6"||n==="claude-sonnet-4.6"||n==="sonnet")return"sonnet";if(n==="claude-haiku-4-5"||n==="claude-haiku-4.5"||n==="haiku")return"haiku"}return a}function Bl(e){const t=rn(e);return t.find(a=>a.default)?.value??t[0]?.value??""}function gr(e){const t=Bt(e);return t?im[t]??[]:[]}function nn(e){const t=gr(e);return t.find(a=>a.default)?.id??t[0]?.id??null}function Fl(e){const t=gr(e);return t.find(a=>a.default)?.backend??t[0]?.backend??null}function fm(){return Va.map(e=>({id:e,label:Il(e),defaultModel:Bl(e)||null,defaultInstance:nn(e),defaultBackend:Fl(e),instances:gr(e),modelsPath:`/api/providers/${e}/models`}))}function sn(e){return e.defaultModel||e.models.find(t=>t.default)?.id||e.models[0]?.id||""}function Ol(e,t={}){return{provider:e,backend:null,instance:t.instance??null,defaultModel:Bl(e)||null,source:"static",cache:null,models:rn(e).map(a=>({id:a.value,label:a.label,default:a.default})),warnings:t.warnings??[]}}function wm(e,t={}){const a=Ol(e,t),o=sn(a)||null;return{provider:a.provider,backend:a.backend,instance:a.instance,defaultModel:o,source:a.source,cache:a.cache,entries:a.models.map(n=>({...n})),presets:[],controls:[],defaultSelection:o?{entryId:o,entryMode:"explicit"}:null,support:{tier:"entry_only",notes:[]},warnings:[...a.warnings]}}function km(e){const t=sn(e)||null;return{provider:e.provider,backend:e.backend,instance:e.instance,defaultModel:t,source:e.source,cache:e.cache,entries:e.models.map(a=>({...a})),presets:[],controls:[],defaultSelection:t?{entryId:t,entryMode:"explicit"}:null,support:{tier:"entry_only",notes:[]},warnings:[...e.warnings]}}function bm(e,t){const a=El(e)??{},o=a.source,n=o==="dynamic"||o==="config"||o==="static"?o:"static",s=ue(a.cache),i=Array.isArray(a.models)?a.models:[];return{provider:ae(a.provider)??t,backend:ae(a.backend),instance:ae(a.instance),defaultModel:ae(a.defaultModel),source:n,cache:s?{servedFromCache:!!s.servedFromCache,cachedAt:ae(s.cachedAt),ttlSec:typeof s.ttlSec=="number"?s.ttlSec:null}:null,models:i.map(c=>ue(c)).filter(c=>c!==null).map(c=>({id:ae(c.id)??"",label:ae(c.label)??ae(c.id)??"",default:!!c.default,status:ae(c.status)??void 0})).filter(c=>c.id.length>0),warnings:Array.isArray(a.warnings)?a.warnings.filter(c=>typeof c=="string"):[]}}function ym(e,t){const a=El(e)??{},o=a.source,n=o==="dynamic"||o==="config"||o==="static"?o:"static",s=ue(a.cache),i=Array.isArray(a.entries)?a.entries:[],c=Array.isArray(a.presets)?a.presets:[],u=Array.isArray(a.controls)?a.controls:[],h=ue(a.support),g=ue(a.defaultSelection);return{provider:ae(a.provider)??t,backend:ae(a.backend),instance:ae(a.instance),defaultModel:ae(a.defaultModel),source:n,cache:s?{servedFromCache:!!s.servedFromCache,cachedAt:ae(s.cachedAt),ttlSec:typeof s.ttlSec=="number"?s.ttlSec:null}:null,entries:i.map(p=>ue(p)).filter(p=>p!==null).map(p=>({id:ae(p.id)??"",label:ae(p.label)??ae(p.id)??"",default:!!p.default,...ae(p.status)?{status:ae(p.status)}:{},...De(p.capabilityTags).length>0?{capabilityTags:De(p.capabilityTags)}:{},...ue(p.limits)?{limits:{...typeof ue(p.limits)?.contextWindowTokens=="number"?{contextWindowTokens:Number(ue(p.limits)?.contextWindowTokens)}:typeof ue(p.limits)?.contextWindow=="number"?{contextWindowTokens:Number(ue(p.limits)?.contextWindow)}:{},...typeof ue(p.limits)?.maxOutputTokens=="number"?{maxOutputTokens:Number(ue(p.limits)?.maxOutputTokens)}:{}}}:{},...De(p.notes).length>0?{notes:De(p.notes)}:{}})).filter(p=>p.id.length>0),presets:c.map(p=>ue(p)).filter(p=>p!==null).map(p=>({id:ae(p.id)??"",label:ae(p.label)??ae(p.id)??"",...ae(p.description)?{description:ae(p.description)}:{},...ms(p.availability)?{availability:ms(p.availability)}:{},...De(p.applicableEntryIds).length>0?{applicableEntryIds:De(p.applicableEntryIds)}:{},...ae(p.preferredEntryId)?{preferredEntryId:ae(p.preferredEntryId)}:{},...Oa(p.controlDefaults)?{controlDefaults:Oa(p.controlDefaults)}:{},...De(p.warnings).length>0?{warnings:De(p.warnings)}:{}})).filter(p=>p.id.length>0),controls:u.map(p=>ue(p)).filter(p=>p!==null).map(p=>({key:ae(p.key)??"",label:ae(p.label)??ae(p.key)??"",...ae(p.description)?{description:ae(p.description)}:{},kind:pm(p.kind),scope:hm(p.scope),...gs(p.values)?{values:gs(p.values)}:{},...typeof p.minimum=="number"?{minimum:p.minimum}:{},...typeof p.maximum=="number"?{maximum:p.maximum}:{},...typeof p.step=="number"?{step:p.step}:{},...De(p.applicableEntryIds).length>0?{applicableEntryIds:De(p.applicableEntryIds)}:{},...De(p.semanticTags).length>0?{semanticTags:De(p.semanticTags)}:{}})).filter(p=>p.key.length>0),defaultSelection:g?{...ae(g.entryId)?{entryId:ae(g.entryId)}:{},entryMode:mm(g.entryMode),...ae(g.presetId)?{presetId:ae(g.presetId)}:{},...Oa(g.controls)?{controls:Oa(g.controls)}:{}}:null,support:{tier:h?.tier==="full"||h?.tier==="entry_only"||h?.tier==="read_only"?h.tier:"entry_only",notes:De(h?.notes)},warnings:Array.isArray(a.warnings)?a.warnings.filter(p=>typeof p=="string"):[]}}const ln=new Map;function vm(e){const t=e.trim().toLowerCase();if(t.endsWith("-cli")){const o=t.slice(0,-4);if(gm(o))return{provider:o,backendSuffix:"-CLI"}}return{provider:Bt(t)??e.trim(),backendSuffix:null}}function fr(e){return e.replace(/\s*\((?:default|recommended)\)\s*/giu," ").trim()}function fs(e){const t=e?.toLowerCase();return t==="cli"?"-CLI":t==="agent"?"-AGENT":t==="api"?"-API":t==="local"?"-LOCAL":""}function Cm(e,t){if(!t)return"";const a=t.toLowerCase();if(a.startsWith("cli/")||a==="cli")return"-CLI";if(a.startsWith("agent/")||a==="agent")return"-AGENT";if(a.startsWith("api/")||a==="api")return"-API";if(a.startsWith("local/")||a==="local")return"-LOCAL";if(a==="default")return fs(Fl(e));const o=gr(e).find(i=>i.id===t),n=fs(o?.backend);if(n)return n;const s=o?.target?.toLowerCase();return s?.startsWith("cli/")?"-CLI":s?.startsWith("agent/")?"-AGENT":s?.startsWith("api/")?"-API":s?.startsWith("local/")?"-LOCAL":""}function Sm(e,t){if(!t)return null;const a=on(e,t)??t,o=rn(e).find(s=>s.value===a)?.label,n=e==="claude"&&(a==="opus"||a==="sonnet"||a==="haiku")?a.charAt(0).toUpperCase()+a.slice(1):a;return fr(o??n)}function Lm(e){const t=e?.trim();return t?fr(t):null}function Wl(e){const t=e?.trim();return t?fr(t):null}function Rm(e){return JSON.stringify([typeof e,e])}function Pm(e){if(!e)return"";const t=Object.entries(e).filter(([,a])=>a!==""&&a!==!1).sort(([a],[o])=>a.localeCompare(o)).map(([a,o])=>[a,Rm(o)]);return t.length>0?JSON.stringify(t):""}function Ul(e){const t=Bt(e.provider)??e.provider.trim().toLowerCase(),a=(e.instance?.trim()||nn(e.provider)||"").toLowerCase(),o=(on(e.provider,e.model)??e.model?.trim()??"").toLowerCase();return JSON.stringify([t,a,o,Pm(e.controls)])}function Am(){ln.clear()}function xm(e){return _l(e)}function Hl(e){const t=Wl(e.executionLabel);return t?(ln.set(Ul({provider:e.provider,instance:e.instance,model:e.model,controls:e.modelSelection?.controls??null}),t),t):null}function _l(e){return ln.get(Ul({provider:e.provider,instance:e.instance,model:e.model,controls:e.modelSelection?.controls??null}))??null}const Tm={max:"Max",xhigh:"xHigh",high:"High",medium:"Medium",low:"Low",none:"None"};function Dm(e){return typeof e=="boolean"?e?"On":"Off":typeof e=="number"?String(e):Tm[e]??e.replace(/[_-]/g," ").replace(/\b\w/g,t=>t.toUpperCase())}function Gl(e,t){if(!e)return[];const a=new Map((t??[]).map(o=>[o.key,o]));return Object.entries(e).filter(([,o])=>o!==""&&o!==!1).map(([o,n])=>{const i=a.get(o)?.values?.find(c=>c.value===n);return fr(i?.label??Dm(n))}).filter(o=>o.length>0)}function cn(e,t,a,o,n,s){const i=vm(e),c=o?.trim()||Il(i.provider),u=t?.trim()||nn(i.provider),h=i.backendSuffix??Cm(i.provider,u),g=Lm(s)??Sm(i.provider,a),p=n&&n.length>0?` · ${n.join(" · ")}`:"";return c+h+(g?` · ${g}`:"")+p}function wr(e){const t=Hl({provider:e.provider,instance:e.instance,model:e.model,modelSelection:e.modelSelection??null,executionLabel:e.executionLabel??null});if(t)return t;const a=_l({provider:e.provider,instance:e.instance,model:e.model,modelSelection:e.modelSelection??null});if(a)return a;const o=e.controlLabels??Gl(e.modelSelection?.controls,e.catalogControls);return cn(e.provider,e.instance,e.model,e.providerLabel,o,e.modelLabelOverride)}function Nm(e){const t=e.defaultExecutionTarget;return wr({provider:t.provider,instance:t.instance??null,model:t.model??null,modelSelection:e.defaultModelSelection??null,executionLabel:e.executionLabel??null})}function ES(e){const t=e.execution?.target;return t?.provider?wr({provider:t.provider,instance:t.instance??null,model:t.model??null,modelSelection:e.execution?.modelSelection??null,executionLabel:e.executionLabel??null}):Wl(e.executionLabel)}function Kl(e,t){return t?`${e} · ${t}`:e}const jm="Catlas",Mm=[];function ws(e){return e.trim().toLowerCase()}function Em(e){return Array.isArray(e)?e.map(t=>ws(t)).filter(t=>t.length>0):typeof e!="string"?[]:e.split(",").map(t=>ws(t.split(";",1)[0]??"")).filter(t=>t.length>0)}function Im(){const e=typeof globalThis=="object"&&globalThis!==null&&"navigator"in globalThis?globalThis.navigator:void 0;return e?Array.isArray(e.languages)&&e.languages.length>0?e.languages:typeof e.language=="string"?e.language:null:null}function Bm(e){const t=Em(e);for(const a of t){const o=Mm.find(n=>n.prefixes.some(s=>a===s||a.startsWith(`${s}-`)));if(o)return o.name}return jm}function ct(){return Bm(Im())}function wa(e){return e==null||e==="active"}const Ya=new URL("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20120%20120'%20width='100%25'%20height='100%25'%3e%3cdefs%3e%3cclipPath%20id='circle-clip'%3e%3ccircle%20cx='60'%20cy='60'%20r='60'%20/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23circle-clip)'%3e%3c!--%20Background%20--%3e%3crect%20width='120'%20height='120'%20fill='%238B7E74'%20/%3e%3c!--%20Ears%20--%3e%3cpolygon%20points='25,25%2045,50%2025,60'%20fill='%23F2994A'%20/%3e%3cpolygon%20points='95,25%2075,50%2095,60'%20fill='%23F2994A'%20/%3e%3cpolygon%20points='28,32%2040,50%2030,55'%20fill='%23FDE1D3'%20/%3e%3cpolygon%20points='92,32%2080,50%2090,55'%20fill='%23FDE1D3'%20/%3e%3c!--%20Head%20--%3e%3cellipse%20cx='60'%20cy='65'%20rx='45'%20ry='35'%20fill='%23F2994A'%20/%3e%3c!--%20Face%20marking%20(white%20area)%20--%3e%3cpath%20d='M%2060,65%20Q%2020,65%2025,85%20Q%2060,110%2095,85%20Q%20100,65%2060,65%20Z'%20fill='%23FFFFFF'%20/%3e%3c!--%20Eyes%20--%3e%3ccircle%20cx='42'%20cy='60'%20r='6'%20fill='%23333333'%20/%3e%3ccircle%20cx='78'%20cy='60'%20r='6'%20fill='%23333333'%20/%3e%3c!--%20Catchlights%20--%3e%3ccircle%20cx='44'%20cy='58'%20r='2'%20fill='%23FFFFFF'%20/%3e%3ccircle%20cx='80'%20cy='58'%20r='2'%20fill='%23FFFFFF'%20/%3e%3c!--%20Nose%20--%3e%3cpolygon%20points='56,72%2064,72%2060,77'%20fill='%23EB5757'%20/%3e%3c!--%20Mouth%20--%3e%3cpath%20d='M%2052,80%20Q%2060,85%2068,80'%20fill='none'%20stroke='%23333333'%20stroke-width='2'%20stroke-linecap='round'%20/%3e%3c!--%20Whiskers%20--%3e%3cline%20x1='15'%20y1='65'%20x2='30'%20y2='68'%20stroke='%23333333'%20stroke-width='1.5'%20stroke-linecap='round'%20opacity='0.5'%20/%3e%3cline%20x1='12'%20y1='72'%20x2='28'%20y2='72'%20stroke='%23333333'%20stroke-width='1.5'%20stroke-linecap='round'%20opacity='0.5'%20/%3e%3cline%20x1='105'%20y1='65'%20x2='90'%20y2='68'%20stroke='%23333333'%20stroke-width='1.5'%20stroke-linecap='round'%20opacity='0.5'%20/%3e%3cline%20x1='108'%20y1='72'%20x2='92'%20y2='72'%20stroke='%23333333'%20stroke-width='1.5'%20stroke-linecap='round'%20opacity='0.5'%20/%3e%3c!--%20Guide%20Scarf/Bandana%20--%3e%3cpath%20d='M%2020,85%20Q%2060,105%20100,85%20L%20110,120%20L%2010,120%20Z'%20fill='%232D9CDB'%20/%3e%3cpath%20d='M%2060,100%20L%2075,120%20L%2045,120%20Z'%20fill='%232285C2'%20/%3e%3ccircle%20cx='60'%20cy='95'%20r='7'%20fill='%23F2C94C'%20/%3e%3c/g%3e%3c/svg%3e",import.meta.url).href,ks=14,Fm=36,Om=20,Wm=20;function Um(e,t="floating"){const a=Rl(e,t);return a==="workspace"?"product":a}function bs({name:e,tooltip:t,unreadCount:a,onClick:o,onDismissClick:n,onPointerDown:s,style:i,className:c,dragging:u}){const{t:h}=U(),g=ct();return r.jsxs("div",{className:c??"guideCatPillWrap","data-dragging":u?"true":"false",style:i,children:[r.jsxs("button",{type:"button",className:"guideCatPill",onPointerDown:s,onClick:o,"aria-label":h(l.sharedGuideCatPillOpenLabel,{guideCatName:g}),"data-tooltip":t,"data-tooltip-delay":"1000",children:[r.jsx(ql,{className:"guideCatPillAvatar"}),a>0?r.jsx("span",{className:"guideCatPillBadge",children:a}):null]}),n&&!u?r.jsx("button",{type:"button",className:"guideCatPillDismiss",onClick:p=>{p.stopPropagation(),n()},"aria-label":h(l.sharedGuideCatPillDisableLabel),children:"✕"}):null]})}function Hm({ownerDisplayName:e,onAction:t,onDismiss:a,style:o,anchor:n="anchor-left"}){const{t:s}=U();return r.jsxs("div",{className:`guideCatPeek guideCatPeek--${n}`,style:o,children:[r.jsx("p",{className:"guideCatPeekGreeting",children:s(l.sharedGuideCatWelcomeGreeting,{ownerDisplayName:e})}),r.jsxs("div",{className:"guideCatPeekActions",children:[r.jsx(Ut,{route:"/chat/new",onAction:t,labelKey:l.sharedGuideCatWelcomeStartChat}),r.jsx(Ut,{route:"/settings/cats",onAction:t,labelKey:l.sharedGuideCatWelcomeMeetCats}),r.jsx(Ut,{route:"/lobby",onAction:t,labelKey:l.sharedGuideCatWelcomeExploreProducts})]}),a?r.jsx("button",{type:"button",className:"guideCatPeekDismiss",onClick:a,children:s(l.sharedGuideCatWelcomeHideNow)}):null]})}function Ut({route:e,onAction:t,labelKey:a,className:o="guideCatPeekAction"}){const{t:n}=U();return r.jsx("button",{type:"button",className:o,onClick:()=>t(e),children:n(a)})}function _m({name:e,tooltip:t,ownerDisplayName:a,onAction:o,onClose:n,style:s,surfaceMode:i}){const{t:c}=U(),u=ct();return r.jsxs("div",{className:i==="lobby"?"guideCatPanel guideCatPanel--lobby":"guideCatPanel guideCatPanel--product",style:s,children:[r.jsxs("div",{className:"guideCatPanelHeader","data-tooltip":t,"data-tooltip-delay":"1000",children:[r.jsx(ql,{className:"guideCatPanelAvatar"}),r.jsx("span",{className:"guideCatPanelName",children:u}),r.jsx("button",{type:"button",className:"guideCatPanelClose",onClick:n,"aria-label":c(l.sharedCommonClose),children:"✕"})]}),r.jsxs("div",{className:"guideCatPanelBody",children:[r.jsx("p",{className:"guideCatPanelGreeting",children:c(l.sharedGuideCatPanelGreeting,{ownerDisplayName:a,guideCatName:u})}),r.jsxs("div",{className:"guideCatPanelActions",children:[r.jsx(Ut,{route:"/chat/new",onAction:o,labelKey:l.sharedGuideCatWelcomeStartChat,className:"guideCatPanelAction"}),r.jsx(Ut,{route:"/settings/cats",onAction:o,labelKey:l.sharedGuideCatWelcomeMeetCats,className:"guideCatPanelAction"}),r.jsx(Ut,{route:"/lobby",onAction:o,labelKey:l.sharedGuideCatWelcomeExploreProducts,className:"guideCatPanelAction"})]})]})]})}function ql({className:e}){return r.jsx("img",{className:e,src:Ya,alt:"","aria-hidden":"true"})}function Gm({viewState:e,guideCat:t,ownerDisplayName:a,unreadCount:o,onToggle:n,onAction:s,onCollapse:i,onDismissWelcome:c,onDismissClick:u,onPillPointerDown:h,dragging:g,pillStyle:p,peekStyle:k,panelStyle:f,surfaceMode:w,dialog:b,onDialogClose:m,rootRef:C,pillHostedExternally:v,peekAnchor:y="anchor-left"}){if(e==="hidden"||v&&e==="collapsed")return null;const L=Km(t);let N;return e==="collapsed"?N=r.jsx(bs,{name:t.name,tooltip:L,unreadCount:o,onClick:n,onDismissClick:u,onPointerDown:h,style:p,dragging:g}):e==="welcome-peek"?N=r.jsxs("div",{ref:C,children:[v?null:r.jsx(bs,{name:t.name,tooltip:L,unreadCount:0,onClick:n,onDismissClick:u,onPointerDown:h,style:p,dragging:g}),r.jsx(Hm,{ownerDisplayName:a,onAction:s,onDismiss:c,style:k,anchor:y})]}):N=r.jsx("div",{ref:C,children:r.jsx(_m,{name:t.name,tooltip:L,ownerDisplayName:a,onAction:s,onClose:i,style:f,surfaceMode:w})}),r.jsxs(r.Fragment,{children:[N,r.jsx(It,{dialog:b,onClose:m})]})}function Km(e){const t=ct(),a=wr({provider:e.executionTarget.provider,instance:e.executionTarget.instance,model:e.executionTarget.model,modelSelection:e.modelSelection??null});return Kl(t,a)}function qm({viewState:e,guideCat:t,ownerDisplayName:a,unreadCount:o,proactive:n,toggle:s,collapse:i,dismissWelcome:c,onDismissed:u,onPillPointerDown:h,consumePillClickSuppression:g,pillStyle:p,peekStyle:k,panelStyle:f,surfaceMode:w,dragActive:b,pillHostedExternally:m,peekAnchor:C}){const v=Ne(),y=d.useRef(null),L=an(),{dialog:N,choose:T,handleClose:j}=Et(),A=ct(),{t:R}=U(),P=d.useCallback(E=>{i(),v(E)},[i,v]),I=d.useCallback(async()=>{const E=await T({title:R(l.sharedGuideCatDialogDisableTitle,{guideCatName:A}),message:R(l.sharedGuideCatDialogDisableMessage,{guideCatName:A}),confirmLabel:R(l.sharedGuideCatDialogDisableConfirm),cancelLabel:R(l.sharedGuideCatDialogKeepEnabled),auxiliaryLabel:R(l.sharedGuideCatDialogDockNow),defaultAction:"auxiliary"});if(E==="auxiliary"){L.update({placement:"docked"}),i();return}if(E==="confirm")try{(await fetch("/api/platform/guide-cat",{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({status:"dismissed"})})).ok&&u()}catch{}},[T,i,A,L,u]);d.useEffect(()=>{if(e!=="open"&&e!=="welcome-peek"||e==="welcome-peek"&&n||b)return;function E(G){if(Vh(G))return;const ee=G.target;ee?.closest?.(".guideCatDockSlot")||ee?.closest?.(".guideCatPillWrap")||y.current&&!y.current.contains(G.target)&&i()}function $(G){G.key==="Escape"&&i()}return document.addEventListener("mousedown",E),document.addEventListener("keydown",$),()=>{document.removeEventListener("mousedown",E),document.removeEventListener("keydown",$)}},[e,i,n,b]);const O=d.useCallback(()=>{g()||s()},[g,s]);return r.jsx(Gm,{viewState:e,guideCat:t,ownerDisplayName:a,unreadCount:o,onToggle:O,onAction:P,onCollapse:i,onDismissWelcome:n?c:void 0,onDismissClick:I,onPillPointerDown:h,dragging:b,pillStyle:p,peekStyle:k,panelStyle:f,surfaceMode:w,dialog:N,onDialogClose:j,rootRef:y,pillHostedExternally:m,peekAnchor:C})}function $m({guideCat:e,ownerDisplayName:t,unreadCount:a,onDismissed:o}){const n=ve(),{projection:s,presentation:i,onFloatingPointerDown:c,consumePillClickSuppression:u,dragActive:h,panelOriginX:g,getDockSlotRect:p}=en();if(s.kind==="hidden")return null;const k=s.kind==="docked";if(k&&i.viewState==="collapsed")return null;const f=s.kind==="floating"?s:null,w=f?{left:`${f.x-ks}px`,top:`${f.y-ks}px`,transform:"none"}:{},b=!f&&s.kind==="docked"?zm(s.slot,p(s.slot)):null,m=f?{left:`${f.x+Fm}px`,top:`${f.y}px`,transform:"translateY(-50%)"}:b?.style??{},C=b?.anchor??"anchor-left",v={left:`${g}px`},y=Um(n.pathname,s.kind==="docked"?"docked":"floating");return Wt.createPortal(r.jsx(qm,{viewState:i.viewState,guideCat:e,ownerDisplayName:t,unreadCount:a,proactive:i.proactive,toggle:i.toggle,collapse:i.collapse,dismissWelcome:i.dismissWelcome,onDismissed:o,onPillPointerDown:k?void 0:c,consumePillClickSuppression:u,pillStyle:w,peekStyle:m,panelStyle:v,surfaceMode:y,dragActive:h,pillHostedExternally:k,peekAnchor:C}),document.body)}function zm(e,t){return t?e==="workspace"?{style:{left:`${t.right+Om}px`,top:`${t.bottom}px`,transform:"translateY(-100%)"},anchor:"anchor-bottom-left"}:{style:{left:`${(t.left+t.right)/2}px`,top:`${t.bottom+Wm}px`,transform:"translateX(-50%)"},anchor:"anchor-top"}:null}function Vm(e,t){return e===t||e.startsWith(`${t}/`)}function Ym({envelope:e}){const{t}=U(),a=Ne(),o=ve(),{appId:n=""}=lr(),s=e.installedApps.find(g=>g.id===n),i=s?.lobbyEntries.find(g=>Vm(o.pathname,g.routePath))??s?.lobbyEntries[0]??null;if(!s)return r.jsx("div",{className:"screen screenCentered appHostScreen",children:r.jsxs("section",{className:"appHostPanel",children:[r.jsx("p",{className:"eyebrow",children:t("appHostLabel")}),r.jsx("h1",{children:t("appHostNotInstalledTitle")}),r.jsx("button",{type:"button",className:"secondaryButton appHostBackButton",onClick:()=>a("/lobby"),children:t("appHostBackToLobby")})]})});const c=s.enabled&&s.installState==="enabled",u=i?.title??s.displayName,h=i?.subtitle??t(c?"appHostSubtitleRendererPending":"appHostSubtitleDisabled");return r.jsx("div",{className:"screen screenCentered appHostScreen",children:r.jsxs("section",{className:"appHostPanel",children:[r.jsxs("div",{className:"appHostHeader",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:t("appHostLabel")}),r.jsx("h1",{children:u})]}),r.jsx("button",{type:"button",className:"secondaryButton appHostBackButton",onClick:()=>a("/lobby"),children:t("appHostBackToLobby")})]}),r.jsx("p",{className:"appHostSubtext",children:h}),r.jsxs("dl",{className:"appHostMeta",children:[r.jsxs("div",{children:[r.jsx("dt",{children:t("appHostSectionPackage")}),r.jsx("dd",{children:s.id})]}),r.jsxs("div",{children:[r.jsx("dt",{children:t("appHostSectionStatus")}),r.jsx("dd",{children:s.installState})]}),r.jsxs("div",{children:[r.jsx("dt",{children:t("appHostSectionPublisher")}),r.jsx("dd",{children:s.publisher})]})]})]})})}function Qm(e){return e.roomMode==="direct_message"?"direct_message":"chat_channel"}function dn(e){const t=Qm({roomMode:e.roomMode,participants:e.participants});return e.channelKind==="direct_message"||t==="direct_message"?"direct_message":"chat_channel"}function Jm(e){return e.assignedCats&&e.assignedCats.length>0?e.assignedCats:e.catAssignments??[]}function Xm(e){return dn({channelKind:e.channelKind,roomMode:e.roomRouting?.mode==="direct_message"?"direct_message":"chat_channel",participants:Jm(e)})}function Zm(e){return Xm(e)==="direct_message"}function ys(e){return dn({channelKind:e.channelKind,roomMode:e.roomMode==="direct_message"?"direct_message":"chat_channel",participants:[]})==="direct_message"}const eg=["chat","code","work"];function $l(){return{chat:!1,code:!1,work:!1}}function tg(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function kr(e){const t=$l(),a=tg(e);return a?eg.reduce((o,n)=>({...o,[n]:a[n]===!0}),t):t}function un(e,t){return kr(e)[t]===!0}const ag=["inline_stack","compare_cards","focus_rail","adaptive"],zl=["chat","work","code"];function Qa(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function Ka(){return{showVerboseMessages:!1,showLiveProgressDetails:!1,concurrentPresentationMode:"inline_stack"}}function rg(){return{chat:Ka(),work:Ka(),code:Ka()}}function Vl(e){return typeof e=="string"&&ag.includes(e)?e:"inline_stack"}function og(e){const t=Ka(),a=Qa(e);return{showVerboseMessages:a?.showVerboseMessages===!0,showLiveProgressDetails:a?.showLiveProgressDetails===!0,concurrentPresentationMode:Vl(a?.concurrentPresentationMode??t.concurrentPresentationMode)}}function pn(e){const t=rg(),a=Qa(e);return zl.reduce((o,n)=>(o[n]=og(a?.[n]),o),t)}function ng(e,t){const a=pn(e),o=Qa(t);if(!o)return a;for(const n of zl){const s=Qa(o[n]);s&&(typeof s.showVerboseMessages=="boolean"&&(a[n].showVerboseMessages=s.showVerboseMessages),typeof s.showLiveProgressDetails=="boolean"&&(a[n].showLiveProgressDetails=s.showLiveProgressDetails),s.concurrentPresentationMode!==void 0&&(a[n].concurrentPresentationMode=Vl(s.concurrentPresentationMode)))}return a}function sg(e,t){return pn(e)[t]}const ig=["chat","work","code"];function wt(e){if(typeof e!="string")return null;const t=e.trim();return t||null}function lg(e){return typeof e=="string"&&ig.includes(e)}function Yl(){return{bySurface:{},chatDirectLaneByCatId:{}}}function Ql(e){const t=Yl();if(typeof e!="object"||e===null)return t;const a=e,o=typeof a.bySurface=="object"&&a.bySurface!==null?a.bySurface:{},n=typeof a.chatDirectLaneByCatId=="object"&&a.chatDirectLaneByCatId!==null?a.chatDirectLaneByCatId:{},s={};for(const[c,u]of Object.entries(o)){const h=lg(c)?c:null,g=wt(typeof u=="string"?u:null);h&&g&&(s[h]=g)}const i={};for(const[c,u]of Object.entries(n)){const h=wt(c),g=wt(typeof u=="string"?u:null);h&&g&&(i[h]=g)}return{bySurface:s,chatDirectLaneByCatId:i}}function IS(e,t){const a=Ql(e),o=wt(t.directLaneCatId);return t.surface==="chat"&&o?a.chatDirectLaneByCatId[o]??null:a.bySurface[t.surface]??null}function BS(e,t,a){const o=Ql(e),n=wt(a),s=wt(t.directLaneCatId);if(t.surface==="chat"&&s){const c={...o.chatDirectLaneByCatId};return n?c[s]=n:delete c[s],{bySurface:{...o.bySurface},chatDirectLaneByCatId:c}}const i={...o.bySurface};return n?i[t.surface]=n:delete i[t.surface],{bySurface:i,chatDirectLaneByCatId:{...o.chatDirectLaneByCatId}}}async function FS(e){const t=wt(e.requestedPath),a=wt(e.rememberedPath),o=t??a,n=await e.browse(o??void 0);return!n.error||!a||t?n:e.browse(void 0)}function pe(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function ie(e,t=""){return typeof e=="string"?e:t}function se(e){return typeof e=="string"&&e.trim().length>0?e:null}function Ur(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function Hr(e,t){return typeof e=="boolean"?e:t}function cg(e,t){return typeof e=="number"&&Number.isFinite(e)?e:t}function dg(e){const t=pe(e.desktop)??{};e.desktop=t;const a=pe(t.mobilePairing)??{};t.mobilePairing={enabled:Hr(a.enabled,!1),bindHost:ie(a.bindHost,"127.0.0.1"),bindPort:cg(a.bindPort,0),bindReachability:a.bindReachability==="lan"||a.bindReachability==="all_interfaces"||a.bindReachability==="other_interface"?a.bindReachability:"loopback",canReachFromLan:Hr(a.canReachFromLan,!1),selectedLanIp:se(a.selectedLanIp),selectedLanUrl:se(a.selectedLanUrl),diagnosticManifestUrl:se(a.diagnosticManifestUrl),noLanCandidateReason:a.noLanCandidateReason==="loopback_bound"||a.noLanCandidateReason==="no_lan_candidate"||a.noLanCandidateReason==="bind_host_not_lan_candidate"?a.noLanCandidateReason:Hr(a.enabled,!1)?null:"feature_disabled",bindOverrideEnv:se(a.bindOverrideEnv),pairingUrlStatus:a.pairingUrlStatus==="ready"?"ready":"phase1_pending",pairingUrl:se(a.pairingUrl)}}function vs(e,t){const a=Array.isArray(e.catAssignments)?e.catAssignments:[],o=Array.isArray(e.assignedCats)?e.assignedCats:[],n=(a.length>0?a:o).map(s=>{const i=pe(s)??{};return{catId:ie(i.catId),status:ie(i.status,"active")==="removed"?"removed":"active"}});e.channelKind=dn({channelKind:e.channelKind==="chat_channel"||e.channelKind==="direct_message"||e.channelKind==="chat_channel"?e.channelKind:null,roomMode:t,participants:n})}function Jl(e){const t=structuredClone(e);dg(t);const a=pe(t.chat)??{};t.chat=a;const o=pe(a.globalOrchestrator);o&&!pe(o.executionTarget)&&(o.executionTarget={provider:ie(o.provider,"claude"),instance:se(o.instance),model:se(o.model)});const n=pe(o?.executionTarget);n&&n.instance===void 0&&(n.instance=se(o?.instance)),o&&!pe(o.memory)&&(o.memory={summary:null,facts:[],openLoops:[],updatedAt:null});const s=pe(a.selectedChannel);if(s&&!pe(s.orchestratorLease)){const u=pe(o?.executionTarget);s.orchestratorLease={sessionId:null,status:"not_started",cwd:null,lastError:null,provider:se(u?.provider)??"claude",instance:se(u?.instance),model:se(u?.model),startedAt:null,lastUsedAt:null}}Array.isArray(a.cats)||(a.cats=[]);const i=a.cats.map(u=>{const h=pe(u)??{};pe(h.defaultExecutionTarget)||(h.defaultExecutionTarget={provider:ie(h.provider,"claude"),instance:se(h.instance),model:se(h.model)});const g=pe(h.defaultExecutionTarget);return g&&g.instance===void 0&&(g.instance=se(h.instance)),pe(h.memory)||(h.memory={summary:null,facts:[],openLoops:[],updatedAt:null}),Array.isArray(h.roles)||(h.roles=Ur(h.roles)),h}),c=new Map(i.map(u=>[ie(u.id),u]));if(s){const u=pe(s.roomRouting);vs(s,ie(u?.mode,"chat_channel")==="direct_message"?"direct_message":"chat_channel"),Array.isArray(s.catAssignments)||(s.catAssignments=[]);const h=Array.isArray(s.catAssignments)?s.catAssignments:[];Array.isArray(s.participantAssignments)||(s.participantAssignments=h.map(p=>{const k=pe(p)??{},f=c.get(ie(k.catId))??{};return{participantId:ie(k.participantId,ie(k.catId)),sourceKind:ie(k.sourceKind,"cat")==="cat"?"cat":"adhoc",sourceRefId:se(k.sourceRefId)??se(k.catId),name:ie(k.name,ie(f.name,"Participant")),status:ie(k.status,"active"),roles:Array.isArray(k.roles)?k.roles:[],roleHint:se(k.roleHint),joinedAt:ie(k.joinedAt),leftAt:se(k.leftAt),execution:k.execution}})),(h.length>0||!Array.isArray(s.assignedCats))&&(s.assignedCats=h.map(p=>{const k=pe(p)??{},f=c.get(ie(k.catId))??{};return{participantId:ie(k.participantId,ie(k.catId)),sourceKind:"cat",sourceRefId:ie(k.sourceRefId,ie(k.catId)),catId:ie(k.catId),name:ie(f.name,"Cat"),roles:Array.isArray(k.roles)?k.roles:Ur(f.roles),roleHint:se(k.roleHint),skillProfile:se(f.skillProfile),mcpProfile:se(f.mcpProfile),status:ie(k.status,"active"),joinedAt:ie(k.joinedAt),leftAt:se(k.leftAt),avatarColor:se(f.avatarColor),avatarUrl:se(f.avatarUrl),execution:k.execution,memory:pe(f.memory)??{summary:null,facts:[],openLoops:[],updatedAt:null}}}));const g=Array.isArray(s.participantAssignments)?s.participantAssignments:[];(g.length>0||!Array.isArray(s.assignedParticipants))&&(s.assignedParticipants=g.map(p=>{const k=pe(p)??{},f=se(k.sourceRefId),w=f?c.get(f)??null:null;return{participantId:ie(k.participantId),sourceKind:ie(k.sourceKind,"adhoc")==="cat"?"cat":"adhoc",sourceRefId:f,name:ie(k.name,ie(w?.name,"Participant")),roles:Array.isArray(k.roles)?k.roles:Ur(w?.roles),roleHint:se(k.roleHint),skillProfile:se(w?.skillProfile),mcpProfile:se(w?.mcpProfile),status:ie(k.status,"active"),joinedAt:ie(k.joinedAt),leftAt:se(k.leftAt),avatarColor:se(w?.avatarColor),avatarUrl:se(w?.avatarUrl),execution:k.execution,memory:pe(w?.memory)??{summary:null,facts:[],openLoops:[],updatedAt:null}}}))}return a.cats=Array.from(c.values()),t.setupCompleteAt===void 0&&(t.setupCompleteAt=null),t.ownerDisplayName||(t.ownerDisplayName="Owner"),t.ownerAvatarColor===void 0&&(t.ownerAvatarColor=null),a.bossCatId===void 0&&(a.bossCatId=null),a.conversationBehavior=pn(a.conversationBehavior),pe(a.advancedDraftControls)||(a.advancedDraftControls=$l()),pe(a.folderBrowsePreferences)||(a.folderBrowsePreferences=Yl()),pe(a.newChatDefaults)||(a.newChatDefaults={provider:ie(n?.provider,"claude"),instance:se(n?.instance),model:se(n?.model),modelSelection:null}),Array.isArray(a.channels)&&(a.channels=a.channels.map(u=>{const h=pe(u)??{};return vs(h,ie(h.roomMode,"chat_channel")==="direct_message"?"direct_message":"chat_channel"),h.catCount===void 0&&(h.catCount=0),h.activeCatCount===void 0&&(h.activeCatCount=0),h})),Array.isArray(a.parallelChatGroups)||(a.parallelChatGroups=[]),t}async function hn(e,t){try{const a=await e.json();return typeof a.error=="string"?a.error||t:a.error&&typeof a.error=="object"&&typeof a.error.message=="string"&&a.error.message||t}catch{return t}}async function de(e,t){if(!e.ok)throw new Error(await hn(e,t));return await e.json()}const ug=15e3,Xl="provider_catalog.model.load_failed",Zl="provider_catalog.model.incomplete_response",ec="provider_catalog.advanced.load_failed",tc="provider_catalog.advanced.incomplete_response",Ja={entries:new Map,inflight:new Map},Xa={entries:new Map,inflight:new Map};function pg(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function Aa(e){const t=e?.trim();return t||null}function mn(e,t){return`${e.trim()}\0${Aa(t)??""}`}function ac(e){const t=new URLSearchParams,a=Aa(e.instance);a&&t.set("instance",a);const o=`/api/providers/${encodeURIComponent(e.provider)}/models${e.advanced?"/advanced":""}`,n=t.toString();return n?`${o}?${n}`:o}async function rc(e,t){try{const a=await e.json();if(typeof a.error?.message=="string")return a.error.message}catch{}return t}async function oc(e,t){const a=await e.json();if(!pg(a)?.catalog)throw new Error(t);return a}async function nc(e){const t=Date.now();if(!e.force){const o=e.cache.entries.get(e.cacheKey);if(o&&o.freshUntilMs>t)return o.value;const n=e.cache.inflight.get(e.cacheKey);if(n)return n}const a=e.load().then(o=>(e.cache.entries.set(e.cacheKey,{value:o,freshUntilMs:Date.now()+ug}),o)).finally(()=>{e.cache.inflight.delete(e.cacheKey)});return e.cache.inflight.set(e.cacheKey,a),a}function hg(){Ja.entries.clear(),Ja.inflight.clear(),Xa.entries.clear(),Xa.inflight.clear()}function sc(e,t,a){const o=t.trim();if(!o)return null;const n=mn(o,Aa(a)),s=e.entries.get(n);return s&&s.freshUntilMs>Date.now()?s.value:null}function mg(e){return sc(Ja,e.provider,e.instance)}function gg(e){return sc(Xa,e.provider,e.instance)}async function gn(e){const t=e.provider.trim(),a=Aa(e.instance),o=mn(t,a);return nc({cache:Ja,cacheKey:o,force:e.force,load:async()=>{const n=await(e.fetchImpl??fetch)(ac({provider:t,instance:a}));if(!n.ok)throw new Error(await rc(n,Xl));return bm(await oc(n,Zl),t)}})}async function fn(e){const t=e.provider.trim(),a=Aa(e.instance),o=mn(t,a);return nc({cache:Xa,cacheKey:o,force:e.force,load:async()=>{const n=await(e.fetchImpl??fetch)(ac({provider:t,instance:a,advanced:!0}));if(!n.ok)throw new Error(await rc(n,ec));return ym(await oc(n,tc),t)}})}function fg(e){return Promise.allSettled([gn(e),fn(e)]).then(()=>{})}function wg(e,t={}){return Promise.allSettled(e.providers.map(a=>{const o=a.defaultInstance??a.instances.find(n=>n.default)?.id??a.instances[0]?.id??null;return fg({provider:a.id,instance:o,fetchImpl:t.fetchImpl})})).then(()=>{})}const ic="provider_registry.product_catalog_checking",kg="provider_registry.last_saved_targets",Za="provider_registry.load_failed",lc="provider_registry.refresh_failed",bo="provider_registry.cached_refresh_failed:";function bg(e){return`${bo}${e}`}function yg(e){return e.startsWith(bo)?e.slice(bo.length):null}const vg=15e3,Cg=10*6e4,Pe={value:null,freshUntilMs:0,staleIfErrorUntilMs:0,inflight:null};async function Sg(e,t){try{const a=await e.json();if(typeof a.error?.message=="string")return a.error.message}catch{}return t}function Lg(e){const t=Array.isArray(e.providers)?e.providers:[];return{state:e.state??(t.length>0?"ready":"no_usable_targets"),providers:t.map(a=>({id:a.id,label:a.label,defaultModel:a.defaultModel??null,defaultInstance:a.defaultInstance??null,defaultBackend:a.defaultBackend??null,instances:Array.isArray(a.instances)?a.instances.map(o=>({id:o.id,label:o.label,target:o.target??null,backend:o.backend??null,default:!!o.default,eventCapabilities:um(o.eventCapabilities)})):[],modelsPath:a.modelsPath})),recovery:e.recovery,warnings:Array.isArray(e.warnings)?e.warnings:[]}}function Cs(e){return{state:"runtime_unreachable",providers:[],recovery:{retryable:!0},warnings:[e]}}function Rg(e){return e.state!=="runtime_unreachable"}function Pg(e,t){const a=Array.isArray(e.warnings)?e.warnings:[];return{...e,warnings:a.includes(t)?a:[...a,t]}}function Ag(e){return e.warnings?.[0]??lc}function xg(e){const t=Date.now();Pe.value=e,Pe.freshUntilMs=t+vg,Pe.staleIfErrorUntilMs=t+Cg}function Tg(){Pe.value=null,Pe.freshUntilMs=0,Pe.staleIfErrorUntilMs=0}async function Dg(e,t={}){try{const a=t.force?"/api/providers?force=1":"/api/providers",o=await e(a);if(!o.ok)return Cs(await Sg(o,Za));const n=await o.json();return Lg(n)}catch(a){return Cs(a instanceof Error?a.message:Za)}}function Ng(){const e=Date.now();return Pe.value&&Pe.freshUntilMs>e?Pe.value:null}async function br(e={}){const t=Date.now();if(!e.force&&Pe.value&&Pe.freshUntilMs>t)return Pe.value;if(!e.force&&Pe.inflight)return Pe.inflight;const a=Dg(e.fetchImpl??fetch,{force:e.force}).then(o=>{if(Rg(o))return xg(o),o;const n=Pe.value;return n&&Pe.staleIfErrorUntilMs>Date.now()?Pg(n,bg(Ag(o))):(Tg(),o)}).finally(()=>{Pe.inflight=null});return Pe.inflight=a,a}function jg(e={}){return br(e).then(()=>{})}async function Pt(e){return br(e)}async function At(e,t){return gn({provider:e,instance:t})}async function xt(e,t){return fn({provider:e,instance:t})}const yo="provider_catalog.refresh_failed_status:";function Ss(e){return`${yo}${e}`}function Mg(e){if(!e.startsWith(yo))return null;const t=Number(e.slice(yo.length));return Number.isInteger(t)?t:null}async function Eg(){const e=await fetch("/api/providers/models/refresh",{method:"POST",headers:{Accept:"application/json"}});if(!e.ok){let a=Ss(e.status);try{const o=await e.json();o.error?.code==="provider_catalog_refresh_failed"?a=Ss(e.status):typeof o.error?.message=="string"&&(a=o.error.message)}catch{}throw new Error(a)}const t=await e.json();return hg(),t}async function Ze(e){const t=await fetch("/api/app-shell",{headers:{Accept:"application/json"},signal:e});return Jl(await de(t,`cats app shell returned ${t.status}`))}async function bt(e,t,a){if(!e.ok)throw new Error(await hn(e,t));try{return await Ze(a)}catch{return Ze()}}async function OS(e,t){const a=await fetch("/api/preferences",{method:"PATCH",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify({selectedChannelId:e}),signal:t});return bt(a,`cats chat selection returned ${a.status}`,t)}async function wn(e,t,a){const o=await fetch("/api/preferences",{method:"PATCH",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify({conversationBehavior:{[e]:t}}),signal:a});return bt(o,`cats conversation behavior update returned ${o.status}`,a)}async function kn(e,t){const a=await fetch("/api/preferences",{method:"PATCH",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify({advancedDraftControls:e}),signal:t});return bt(a,`cats advanced draft controls update returned ${a.status}`,t)}async function WS(e,t){const a=await fetch("/api/preferences",{method:"PATCH",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify({newChatDefaults:e}),signal:t});return bt(a,`cats new chat defaults update returned ${a.status}`,t)}async function US(e,t){const a=await fetch("/api/preferences",{method:"PATCH",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify({folderBrowsePreference:{surface:e.surface,directLaneCatId:e.directLaneCatId??null,path:e.path}}),signal:t});return de(a,`cats folder browse preference update returned ${a.status}`)}async function HS(e,t,a){const o=await fetch(`/api/channels/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(t),signal:a});return bt(o,`cats channel update returned ${o.status}`,a)}async function _S(e,t){const a=await fetch(`/api/channels/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify({resetContinuity:!0}),signal:t});return bt(a,`cats channel continuity reset returned ${a.status}`,t)}async function Ig(e,t){const a=await fetch("/api/orchestrator",{method:"PATCH",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(e),signal:t});return bt(a,`cats orchestrator update returned ${a.status}`,t)}async function tt(e,t,a){return bt(e,t,a)}const Bg=6,Fg=12,Og=2;function Wg(){return{activeTurn:null,turnHistory:[],eventHistory:[],lastCheckpointEvent:null,lastOutcomeEvent:null}}function Ug(e={}){return{mode:e.mode??"chat_channel",defaultRecipientId:e.defaultRecipientId??null,maxContinuations:Bg,maxDispatchesPerTurn:Fg,maxTargetVisitsPerTurn:Og,lastOutcome:null,lastCheckpoint:null,lastWakeRequest:null,wakeHistory:[],workflow:Wg()}}function Hg(e){return e?structuredClone(e):Ug()}function Ls(e){switch(e){case"ready":return"awake";case"initializing":return"waking_up";case"error":return"error";default:return"sleeping"}}function cc(e){return e?{...e,roomRouting:Hg(e.roomRouting)}:null}function GS(e){if(!e)return null;if(Zm(e)&&e.roomRouting.defaultRecipientId){const t=e.assignedCats.find(a=>a.status==="active"&&a.catId===e.roomRouting.defaultRecipientId);return t?Ls(t?.execution.lease.status):null}return Ls(e.orchestratorLease.status)}function KS(e){return!e.routeChannelId||!e.routeChannelExists?!1:e.selectedChannelId!==e.routeChannelId||e.selectedChannelViewId!==e.routeChannelId}const Ft="/api/parallel-chat-groups";function _g(e){if(!e||typeof e!="object"||Array.isArray(e))return{attemptedSessionCount:0,retainedSessionCount:0,retainedSessions:[]};const t=e,a=Array.isArray(t.retainedSessions)?t.retainedSessions.flatMap(n=>{if(!n||typeof n!="object"||Array.isArray(n))return[];const s=n,i=typeof s.sessionId=="string"?s.sessionId.trim():"";return i?[{sessionId:i,reason:typeof s.reason=="string"&&s.reason.trim()?s.reason.trim():null}]:[]}):[];return{attemptedSessionCount:typeof t.attemptedSessionCount=="number"&&Number.isFinite(t.attemptedSessionCount)&&t.attemptedSessionCount>0?Math.floor(t.attemptedSessionCount):0,retainedSessionCount:a.length,retainedSessions:a}}function dc(e){const a=[];for(let o=0;o<e.length;o+=32768){const n=e.subarray(o,o+32768);a.push(String.fromCharCode(...n))}return btoa(a.join(""))}async function Gg(e,t){const a=await fetch(`/api/cats/${encodeURIComponent(e)}`,{method:"DELETE",headers:{Accept:"application/json"},signal:t});return tt(a,`cats cat deletion returned ${a.status}`,t)}async function qS(e,t){const a=await fetch("/api/channels",{method:"POST",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(e),signal:t}),{channel:o}=await de(a,`cats chat creation returned ${a.status}`),n=cc(o);if(!n)throw new Error("Created channel payload was invalid.");return n}async function $S(e,t,a){const o=await fetch(`/api/channels/${e}`,{method:"PATCH",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify({title:t}),signal:a});return tt(o,`cats chat rename returned ${o.status}`,a)}async function zS(e,t){const a=await fetch(`/api/channels/${e}`,{method:"DELETE",headers:{Accept:"application/json"},signal:t});if(!a.ok)throw new Error(await hn(a,`cats chat deletion returned ${a.status}`));const o=await a.json();let n;try{n=await Ze(t)}catch{n=await Ze()}return{payload:n,runtimeCleanup:_g(o.runtimeCleanup)}}async function Kg(e,t){const a=await fetch("/api/cats",{method:"POST",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(e),signal:t});return tt(a,`cats chat cat creation returned ${a.status}`,t)}async function VS(e,t,a){const{catId:o,...n}=t,s=await fetch(`/api/channels/${e}/cats/${o}`,{method:"PUT",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(n),signal:a});return tt(s,`cats channel cat assignment returned ${s.status}`,a)}async function YS(e,t,a){const o=await fetch(`/api/channels/${e}/cats/${t}`,{method:"DELETE",headers:{Accept:"application/json"},signal:a});return tt(o,`cats channel cat removal returned ${o.status}`,a)}async function QS(e,t,a,o){const n=await fetch(`/api/channels/${encodeURIComponent(e)}/participants/${encodeURIComponent(t)}`,{method:"PATCH",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(a),signal:o});return tt(n,`cats channel participant update returned ${n.status}`,o)}async function JS(e,t){const a=await fetch(`/api/channels/${e}/activations`,{method:"POST",headers:{Accept:"application/json"},signal:t}),{activation:o}=await de(a,`cats channel activation returned ${a.status}`);let n;try{n=await Ze(t)}catch{n=await Ze()}return{appShell:n,results:o.results}}async function XS(e,t,a){const o=await Promise.all(t.map(async i=>{const c=await i.arrayBuffer(),u=new Uint8Array(c);return{name:i.name,data:dc(u)}})),n=await fetch(`/api/channels/${e}/attachments`,{method:"POST",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify({files:o}),signal:a});return(await de(n,`attachment upload returned ${n.status}`)).attachments}async function ZS(e){return Promise.all(e.map(async t=>{const a=await t.arrayBuffer(),o=new Uint8Array(a);return{name:t.name,data:dc(o)}}))}async function eL(e,t){const a=await fetch(Ft,{method:"POST",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(e),signal:t});return de(a,`parallel chat creation returned ${a.status}`)}async function tL(e,t,a){const o=await fetch(`${Ft}/${encodeURIComponent(e)}/messages`,{method:"POST",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(t),signal:a});return de(o,`parallel chat dispatch returned ${o.status}`)}async function aL(e,t,a){const o=await fetch(`${Ft}/${encodeURIComponent(e)}/relay`,{method:"POST",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(t),signal:a});return de(o,`parallel chat relay returned ${o.status}`)}async function rL(e,t,a){const o=await fetch(`${Ft}/${encodeURIComponent(e)}/cancel`,{method:"POST",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(t),signal:a});return de(o,`parallel chat cancel returned ${o.status}`)}async function oL(e,t,a){const o=await fetch(`${Ft}/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(t),signal:a});return tt(o,`parallel chat rename returned ${o.status}`,a)}async function nL(e,t){const a=await fetch(`${Ft}/${encodeURIComponent(e)}/ungroup`,{method:"POST",headers:{Accept:"application/json"},signal:t});return tt(a,`parallel chat ungroup returned ${a.status}`,t)}async function sL(e,t){const a=await fetch(`${Ft}/${encodeURIComponent(e)}`,{method:"DELETE",headers:{Accept:"application/json"},signal:t});return tt(a,`parallel chat deletion returned ${a.status}`,t)}async function iL(e,t){const a=await fetch(`/api/channels/${e}/cancel`,{method:"POST",headers:{Accept:"application/json"},signal:t});return de(a,`cats channel cancel returned ${a.status}`)}async function lL(e,t,a){const o=await fetch(`/api/channels/${encodeURIComponent(e)}/messages/${encodeURIComponent(t)}/retry`,{method:"POST",headers:{Accept:"application/json"},signal:a});return de(o,`channel message retry returned ${o.status}`)}async function cL(e,t,a){const o=await fetch(`/api/channels/${e}/messages`,{method:"POST",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(t),signal:a});return de(o,`cats channel messaging returned ${o.status}`)}async function Re(e,t,a){const o=await fetch(`/api/cats/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(t),signal:a});return tt(o,`cat profile update returned ${o.status}`,a)}function qg(e){async function t(o,n){const s=await fetch("/api/setup/complete",{method:"POST",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(o),signal:n});return e(await de(s,`setup completion returned ${s.status}`))}async function a(o){const n=await fetch("/api/setup/reset",{method:"POST",headers:{Accept:"application/json"},signal:o});return e(await de(n,`setup reset returned ${n.status}`))}return{completeSetup:t,resetSetup:a}}const $g=qg(Jl),zg=$g.resetSetup;function Vg(e){async function t(n,s){const i=await fetch("/api/bot-bindings",{method:"POST",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify({platform:"telegram",...n}),signal:s});return e.refetchAfterMutation(i,`bot binding create returned ${i.status}`,s)}async function a(n,s){const i=await fetch(`/api/bot-bindings/${encodeURIComponent(n)}`,{method:"DELETE",headers:{Accept:"application/json"},signal:s});return e.refetchAfterMutation(i,`bot binding delete returned ${i.status}`,s)}async function o(n,s,i){const c=await fetch(`/api/bot-bindings/${n}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(s),signal:i});return de(c,`update bot binding returned ${c.status}`)}return{createBotBindingApi:t,deleteBotBindingApi:a,updateBotBindingApi:o}}async function Rs(e){const t=await fetch("/api/transports/telegram",{headers:{Accept:"application/json"},signal:e});return(await de(t,`telegram transport status returned ${t.status}`)).telegram}async function Ps(e){const t=await fetch("/api/transports/telegram/diagnostics",{headers:{Accept:"application/json"},signal:e});return(await de(t,`telegram transport diagnostics returned ${t.status}`)).telegram}const uc=Vg({refetchAfterMutation:tt}),Yg=uc.createBotBindingApi,Qg=uc.deleteBotBindingApi;async function Jg(e,t){const a=await fetch(`/api/cats/${encodeURIComponent(e)}/memory`,{headers:{Accept:"application/json"},signal:t});return(await de(a,`cat memory list returned ${a.status}`)).records??[]}async function Xg(e,t,a){const o=await fetch(`/api/cats/${encodeURIComponent(e)}/memory`,{method:"POST",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(t),signal:a});return(await de(o,`cat memory create returned ${o.status}`)).memory}async function Zg(e,t,a){const o=await fetch(`/api/cats/${encodeURIComponent(e)}/memory/${encodeURIComponent(t)}`,{method:"DELETE",headers:{Accept:"application/json"},signal:a});await de(o,`cat memory delete returned ${o.status}`)}const dL="current",uL="full",pc={read_only:["default"],read_write:["skip","whitelist"]};function ef(e,t){return pc[e].includes(t)}function hc(e){return pc[e][0]}function tf(e){return typeof e=="string"&&e.trim().length>0}function vo(e,t){if(!t)return{...e};const a={...e};for(const o of Object.keys(e)){const n=t[o];n!==void 0&&(a[o]=n)}return a}function bn(){const e="read_write";return{workspaceKind:"sandbox",workspaceAccess:e,permissionMode:hc(e)}}function yn(e){const{workspaceKind:t,workspaceAccess:a}=e,o=ef(a,e.permissionMode)?e.permissionMode:hc(a);return a==="read_only"?{workspaceKind:t,workspaceAccess:a,permissionMode:o}:{workspaceKind:t,workspaceAccess:a,permissionMode:o}}function pL(){return yn(bn())}function af(e){return e.workspaceAccess==="read_only"?{runtimeWorkspaceKind:e.workspaceKind,runtimeWorkspaceAccess:e.workspaceAccess,runtimePermissionMode:e.permissionMode}:{runtimeWorkspaceKind:e.workspaceKind,runtimeWorkspaceAccess:e.workspaceAccess,runtimePermissionMode:e.permissionMode}}function hL(e){return yn(vo(bn(),e))}function rf(e){const t=vo(bn(),{workspaceKind:tf(e.repoPath)?"source":void 0});return yn(vo(t,e.policy))}function mL(e){return e==="worktree"?"worktree":"current"}function gL(e){return e.hasCwd?e.isRepo&&e.workspaceMode==="worktree"?"worktree":"source":"sandbox"}function fL(e){return e==="read_only"?"read_only":"full"}function wL(e){return e==="read_only"?{workspaceAccess:"read_only",permissionMode:"default"}:{workspaceAccess:"read_write",permissionMode:"skip"}}function vn(e){const t=e?.trim();return t==="Chat"||t==="Orchestrator"}function As(e){const t=e?.trim();return!t||vn(t)?null:t}function of(e){return As(e.displayName)??As(e.executionLabel)??(e.provider?cn(e.provider,e.instance??null,null):null)}const et="chat-memory",mc="work-memory",ka=new Map;function kL(e,t){const a=ka.get(e)??null;a&&a!==t&&console.warn("Replacing pending optimistic send for channel.",{feature:"chat_optimistic_message_replaced_in_flight",channelId:e,previousMessageId:a,nextMessageId:t}),ka.set(e,t)}function nf(e,t){const a=ka.get(e)??null;a&&(t&&a!==t||ka.delete(e))}function bL(){return[...ka.entries()].map(([e,t])=>({channelId:e,optimisticMessageId:t}))}function fe(e){const t=e.trim().split(/\s+/);return t.length>=2?(t[0][0]+t[1][0]).toUpperCase():e.slice(0,2).toUpperCase()}const xa=Fe("en");function xs(e){return Bt(e)??e.trim()}function Ts(){return{name:"",provider:"claude",instance:"",model:"",modelSelection:null,makeBoss:!1,products:hr(),skillProfile:"chat-default",mcpProfile:et}}function sf(e){return Xo(e.products,"chat",{fallback:hr()})}function gc(e){return Nm(e)}function lf(e){return Array.isArray(e)?new Set(e.filter(t=>!!t)):e?new Set([e]):new Set}function cf(e,t,a={}){const o=lf(a.bossCatIds);if(a.archivedLast){const c=e.status==="archived"?1:0,u=t.status==="archived"?1:0;if(c!==u)return c-u}const n=o.has(e.id)?0:1,s=o.has(t.id)?0:1;if(n!==s)return n-s;const i=e.createdAt.localeCompare(t.createdAt);return i!==0?i:e.id.localeCompare(t.id)}function _t(e,t={}){return[...e].sort((a,o)=>cf(a,o,t))}function df(e){const t=e.metadata?.executionLabelSnapshot;return typeof t=="string"&&t.trim()?t.trim():null}function uf(e){const t=e?.trim();return!t||vn(t)?null:t}function yL(e,t,a=xa){if(e.senderKind==="user"||e.senderKind==="system")return{kind:"none",label:null,cat:null};const o=e.metadata?.targetKind==="cat"||e.metadata?.targetKind==="orchestrator"?e.metadata.targetKind:null,n=typeof e.metadata?.targetId=="string"&&e.metadata.targetId?e.metadata.targetId:null,s=e.senderName?.trim()??"",i=uf(e.senderName),c=df(e),u=vn(s);if(o==="cat"&&n){const g=t.find(p=>p.id===n)??null;return g?{kind:"cat",label:g.name,cat:g}:{kind:"deleted_cat",label:a(l.sharedTranscriptDeletedCat),cat:null}}const h=i&&i!=="Orchestrator"?t.find(g=>g.name===i)??null:null;return h?{kind:"cat",label:h.name,cat:h}:(c||e.executionProvider)&&(o==="orchestrator"||u)?{kind:"provider",label:of({displayName:e.senderName,executionLabel:c,provider:e.executionProvider,instance:e.executionInstance}),cat:null}:i?{kind:"name",label:i,cat:null}:{kind:"none",label:null,cat:null}}function pf(e,t,a=xa){const o=e.replace(/\s+/g," ").trim();return o?o.slice(0,48):t>0?a(l.chatNewChatDraftGeneratedTitleWithIndex,{index:t+1}):a(l.chatNewChatDraftGeneratedTitle)}function hf(e){return e.replace(/\s+/g," ").trim().slice(0,120)}function vL(e,t){return t.length===0?e:`[Attached files in working directory:]
|
|
38
|
+
輸入 /help 查看可用指令。`,"shared.operator.noTimestamp":"沒有時間","shared.operator.runStatus.running":"進行中","shared.operator.runStatus.blocked":"受阻","shared.operator.runStatus.completed":"已完成","shared.operator.runStatus.failed":"失敗","shared.operator.runStatus.cancelled":"已取消","shared.operator.runStatus.queued":"排隊中","shared.operator.runStatus.title":"執行狀態","shared.operator.branchStatus.pending":"等待中","shared.operator.branchStatus.running":"執行中","shared.operator.branchStatus.completed":"已完成","shared.operator.branchStatus.failed":"失敗","shared.operator.branchStatus.blocked":"受阻","shared.operator.branchStatus.cancelled":"已取消","shared.operator.branchStatus.waitingForConverge":"等待匯合","shared.operator.checkpointStatus.completed":"完成","shared.operator.checkpointStatus.cancelled":"已取消","shared.operator.checkpointStatus.open":"進行中","shared.operator.outcomeStatus.succeeded":"成功","shared.operator.outcomeStatus.blocked":"受阻","shared.operator.outcomeStatus.failed":"失敗","shared.operator.outcomeStatus.cancelled":"已取消","shared.operator.traceKind.approval":"批准","shared.operator.traceKind.checkpoint":"檢查點","shared.operator.traceKind.dispatch":"派工","shared.operator.traceKind.error":"錯誤","shared.operator.traceKind.outcome":"結果","shared.operator.traceKind.status":"狀態","shared.operator.traceKind.note":"附註","shared.operator.activity.label.recovery":"復原","shared.operator.activity.label.replay":"重放","shared.operator.activity.label.decision":"決策","shared.operator.activity.label.action":"動作","shared.operator.activity.label.artifact":"成果物","shared.operator.activity.label.update":"更新","shared.operator.activity.label.trace":"軌跡","shared.operator.eyebrow.inspector":"檢視器","shared.operator.runInspector.title":"執行檢視","shared.operator.runInspector.noHistory":"請選擇一個有歷史紀錄的房間,以查看軌跡與檢查點。","shared.operator.runInspector.summaryFallback":"這裡會顯示本次執行的軌跡、檢查點與結果紀錄。","shared.operator.meta.started":"開始於 {time}","shared.operator.meta.updated":"更新於 {time}","shared.operator.meta.stage":"階段:{stage}","shared.operator.workflowStage.blocked":"受阻","shared.operator.workflowStage.concurrentFanOut":"並行展開","shared.operator.workflowStage.continuationHandoff":"續接交接","shared.operator.workflowStage.convergeReview":"匯合檢閱","shared.operator.workflowStage.dispatch":"派工","shared.operator.workflowStage.initialDispatch":"初始派工","shared.operator.workflowStage.runtimeError":"執行階段錯誤","shared.operator.workflowStage.startupRecovery":"啟動復原","shared.operator.workflowStage.turnCompleted":"回合完成","shared.operator.meta.shape":"形態:{shape}","shared.operator.meta.reviewRequired":"需要檢閱","shared.operator.meta.guardrail":"保護條件:{guardrail}","shared.operator.meta.cooldown":"冷卻:{cooldown}","shared.operator.guard.maxContinuations":"達到最大續接次數","shared.operator.guard.maxDispatches":"達到最大派工次數","shared.operator.guard.maxTargetVisits":"達到單一目標最大造訪次數","shared.operator.guard.antiPingPong":"防止來回轉派","shared.operator.cooldown.active":"冷卻中","shared.operator.section.trace":"軌跡","shared.operator.section.checkpoints":"檢查點","shared.operator.noCheckpointsRecorded":"本次執行尚無檢查點紀錄。","shared.operator.checkpointSummaryFallback":"已紀錄檢查點。","shared.operator.section.branches":"分支","shared.operator.noBranchesRecorded":"本次執行尚無分支或交接紀錄。","shared.operator.branch.handoff":"交接:{handoffReason}","shared.operator.branch.strategy":"策略:{strategy}","shared.operator.branchStrategy.forkIfPossible":"可行時分支","shared.operator.branchStrategy.freshNoParent":"新分支無父層","shared.operator.branchStrategy.singleTargetReview":"單一目標檢閱","shared.operator.branchStrategy.transplantContext":"沿用上下文","shared.operator.branchHandoff.explicitMention":"明確提及","shared.operator.branchHandoff.operatorReroute":"操作員改派","shared.operator.branchHandoff.roomDefault":"房間預設","shared.operator.branchHandoff.roomEntry":"進入房間","shared.operator.branchHandoff.runtimeRetry":"執行階段重試","shared.operator.branchHandoff.workflowContinuation":"工作流程續接","shared.operator.branch.fromCheckpoint":"來源檢查點:{checkpointId}。","shared.operator.branch.noLineage":"尚未錄到檢查點血緣。","shared.operator.section.outcomes":"結果","shared.operator.noOutcomesRecorded":"本次執行尚無結果紀錄。","shared.operator.outcomeSummaryFallback":"已紀錄結果。","shared.operator.eyebrow.progress":"進度","shared.operator.noActiveRun":"目前沒有啟動中的 room 執行。請先開始或繼續對話以查看派工狀態。","shared.operator.progressSummaryFallback":"目前可檢視 room 的編排狀態。","shared.operator.metric.dispatches":"派工次數","shared.operator.metric.continuations":"續接次數","shared.operator.metric.targets":"目標數","shared.operator.approvalPending.singular":"{count} 項待處理同意","shared.operator.approvalPending.plural":"{count} 項待處理同意","shared.operator.meta.delivery":"交付:{deliveryMode}","shared.operator.meta.gates":"門檻:{gates}","shared.operator.meta.budget":"預算:{budgetLevel}","shared.operator.deliveryMode.artifactOnly":"僅成果物","shared.operator.deliveryMode.commitOnly":"僅提交","shared.operator.deliveryMode.deployPreview":"部署預覽","shared.operator.deliveryMode.prWithChecks":"含檢查的 Pull Request","shared.operator.deliveryMode.pushBranch":"推送分支","shared.operator.deliveryGate.manualReviewRequired":"需要人工檢閱","shared.operator.deliveryGate.ownerApprovalRequired":"需要擁有者核准","shared.operator.deliveryGate.publishArtifactRequired":"需要發布成果物","shared.operator.budgetLevel.normal":"正常","shared.operator.budgetLevel.warning":"警告","shared.operator.budgetLevel.blocked":"受阻","shared.operator.workflowShape.sequential":"依序","shared.operator.workflowShape.concurrent":"並行","shared.operator.workflowShape.converge":"匯合","shared.operator.inspectRunButton":"檢視執行","shared.operator.noTraceRecords":"本次執行尚無軌跡紀錄。","shared.operator.action.requestRetry":"要求重試","shared.operator.action.retryAgain":"再次重試","shared.operator.action.retrying":"重試中","shared.operator.action.retryRequested":"已要求重試","shared.operator.action.acknowledge":"標記已知悉","shared.operator.action.acknowledged":"已知悉","shared.operator.action.retryDescription":"記錄操作員希望重試這個受阻或失敗的執行。","shared.operator.action.replayStoredDispatchDescription":"透過既有操作員路徑重放已儲存的派工或工作流程延續。","shared.operator.action.retryTaskDescription":"記錄操作員希望重試這個受阻或失敗的任務。","shared.operator.action.retryFailedDescription":"重試失敗。操作員可以再次重放已儲存的派工。","shared.operator.action.acknowledgeDescription":"記錄操作員已查看目前的保護條件或事件狀態。","shared.operator.action.acknowledgeBlockedDescription":"記錄操作員已查看目前受阻或失敗的狀態。","shared.operator.action.status.retryInProgress":"重試進行中","shared.operator.action.status.retryFailed":"重試失敗","shared.operator.action.status.retryFailedWithError":"重試失敗:{error}","shared.operator.action.status.retryDispatched":"已派送重試","shared.operator.action.status.retryRequested":"已要求重試","shared.operator.action.status.acknowledged":"已知悉","shared.common.apply":"套用","shared.common.cancel":"取消","shared.common.close":"關閉","shared.common.delete":"刪除","shared.common.retry":"重試","shared.guideCat.panelGreeting":"嗨 {ownerDisplayName},我是 {guideCatName},你的導覽貓。可以點這些項目開始,或關閉面板自己探索吧。","shared.guideCat.welcomeGreeting":"歡迎,{ownerDisplayName}。我是你的導覽貓。這裡有一些你可以先嘗試的功能。","shared.guideCat.welcomeStartChat":"先開始一則聊天","shared.guideCat.welcomeMeetCats":"認識你的貓","shared.guideCat.welcomeExploreProducts":"探索產品","shared.guideCat.welcomeHideNow":"先隱藏","shared.guideCat.pillOpenLabel":"開啟導覽:{guideCatName}","shared.guideCat.pillDisableLabel":"停用導覽貓","shared.guideCat.dockUndockLabel":"取消停駐 {guideCatName}","shared.guideCat.dialog.disableTitle":"停用 {guideCatName}?","shared.guideCat.dialog.disableMessage":"這會關閉 {guideCatName} 的導覽幫助。若只是想先藏起來,可先將其收進側欄。你隨時可以回到「設定」>「助手」重新開啟。","shared.guideCat.dialog.disableConfirm":"停用","shared.guideCat.dialog.keepEnabled":"保留啟用","shared.guideCat.dialog.dockNow":"立即收合","shared.imageUpload.clickHint":"點擊以選擇圖片","shared.imageUpload.dragHint":"拖曳來移動畫面,滾動可縮放","shared.workspaceNavigation.deleteChannelRuntimeCleanupFeedbackOne":"對話已刪除;Cats 執行階段保留了 {count} 個連結的執行階段工作階段。如需清理磁碟,請開啟執行階段診斷。","shared.workspaceNavigation.deleteChannelRuntimeCleanupFeedbackMany":"對話已刪除;Cats 執行階段保留了 {count} 個連結的執行階段工作階段。如需清理磁碟,請開啟執行階段診斷。","shared.workspaceNavigation.renameChatError":"重新命名聊天失敗。","shared.workspaceNavigation.deleteChatError":"刪除聊天失敗。","shared.workspaceNavigation.renameParallelChatError":"重新命名平行聊天失敗。","shared.workspaceNavigation.ungroupParallelChatError":"取消群組平行聊天失敗。","shared.workspaceNavigation.deleteParallelChatGroupError":"刪除所有聊天失敗。","shared.workspaceNavigation.parallelChatFallbackName":"這個平行聊天","shared.workspaceNavigation.error.chatNotFound":"找不到這個聊天工作區。","shared.workspaceNavigation.error.channelNotFound":"找不到這個聊天室。","shared.workspaceNavigation.error.parallelChatGroupNotFound":"找不到這個平行聊天群組。","shared.workspaceNavigation.error.titleRequired":"聊天標題不可空白。","shared.workspaceNavigation.error.parallelChatTitleRequired":"平行聊天標題不可空白。","shared.settingsCatsRegistry.sectionLabel":"註冊表","shared.settingsCatsRegistry.savedCatsLabel":"已儲存貓咪","shared.settingsCatsRegistry.noCatsYetLabel":"尚未有貓咪","shared.settingsCatsRegistry.showArchivedLabel":"顯示封存({count})","shared.settingsCatsRegistry.bossCatLabel":"主控貓","shared.settingsCatsRegistry.recoverLabel":"恢復","shared.settingsCatsRegistry.recoverTooltip":"恢復 {name}","shared.settingsCatsRegistry.deleteTooltip":"刪除 {name}","shared.settingsCatsRegistry.archiveTooltip":"封存 {name}","shared.settingsCatsRegistry.defaultSkillProfileLabel":"預設","shared.settingsCatsRegistry.memorySavedLabel":"已記憶","shared.settingsCatsRegistry.noMemoryYetLabel":"尚未有記憶","shared.settingsCatsRegistry.botBindingCount":"{count} 個機器人","shared.settingsCatsRegistry.emptyStateHint":"從右側面板新增第一隻貓咪。","shared.settingsCats.selectCatAriaLabel":"選擇貓咪","shared.settingsCats.addNewCatLabel":"新增貓咪","shared.settingsCats.showArchivedLabel":"顯示封存({count})","shared.settingsCats.archiveLabel":"封存","shared.settingsCats.deleteLabel":"刪除","shared.settingsCats.channelLabel":"通道","shared.settingsCats.memoryLabel":"記憶","shared.settingsCats.renameLabel":"重新命名","shared.settingsCats.save":"儲存","shared.settingsCats.saving":"儲存中…","shared.settingsCats.bossCatLabel":"主控貓","shared.settingsCats.changeBossCatTitle":"更改主控貓","shared.settingsCats.changeBossCatMessage":"將 {name} 設為主控貓?這將更改新對話的預設接收對象。","shared.settingsCats.confirm":"確認","shared.settingsCats.setting":"設定中…","shared.settingsCats.saveSuccess":"貓咪已儲存。","shared.settingsCats.saveError":"儲存貓咪失敗。","shared.settingsCats.renameSuccess":"貓咪已重新命名。","shared.settingsCats.renameError":"重新命名貓咪失敗。","shared.settingsCats.deleteSuccess":"{catName} 已刪除。","shared.settingsCats.deleteError":"刪除貓咪失敗。","shared.settingsCats.bossUpdated":"主控貓已更新。","shared.settingsCats.status.active":"啟用","shared.settingsCats.status.archived":"已封存","shared.settingsCats.makeBossCatLabel":"將 {name} 設為主控貓","shared.settingsCats.setBossCatLabel":"設為主控貓","shared.settingsCats.setBossCatError":"無法將其設為主控貓。","shared.settingsCats.skillUpdateError":"更新技能失敗。","shared.settingsCats.skillProfileLabel":"技能檔案","shared.settingsCats.mcpProfileLabel":"工具檔案","shared.settingsCats.mcpProfileChatMemoryLabel":"聊天記憶","shared.settingsCats.mcpProfileWorkMemoryLabel":"工作記憶","shared.settingsCats.changeMcpProfileError":"無法變更工具檔案。","shared.settingsCats.coverPhotoLabel":"封面圖片","shared.settingsCats.changeCoverPhotoLabel":"更換封面圖片","shared.settingsCats.uploadCoverPhotoLabel":"上傳封面圖片","shared.settingsCats.changeCoverLabel":"更換封面","shared.settingsCats.uploadCoverLabel":"上傳封面","shared.settingsCats.removeCoverLabel":"移除封面","shared.settingsCats.changeSkillProfileError":"無法變更技能檔案。","shared.settingsCats.updateBrainError":"更新大腦設定失敗。","shared.settingsCats.disconnectTelegramAria":"中斷 Telegram 連線","shared.settingsCats.disconnectTelegram":"中斷連線","shared.settingsCats.bindingActive":"啟用","shared.settingsCats.bindingDisabled":"停用","shared.settingsCats.bindingPollingMode":"輪詢","shared.settingsCats.bindingWebhookMode":"Webhook","shared.settingsCats.telegramBindingCreated":"Telegram 機器人綁定已建立。","shared.settingsCats.telegramBindingCreateError":"建立綁定失敗。","shared.settingsCats.telegramBindingRemoved":"綁定已移除。","shared.settingsCats.telegramBindingRemoveError":"移除綁定失敗。","shared.settingsCats.telegramDiagnosticsLoadError":"載入 Telegram 診斷資訊失敗。","shared.settingsCats.lastInboundLabel":"最後入站 {time}","shared.settingsCats.connectTelegramLabel":"連線 Telegram","shared.settingsCats.unavailableHint":"已封存或非聊天貓無法使用。","shared.settingsCats.addMemoryLabel":"新增記憶","shared.settingsCats.deleteMemoryAria":"刪除記憶","shared.settingsCats.skillProfileDefaultLabel":"預設","shared.settingsCats.skillProfileCompanionLabel":"助手","shared.settingsCats.memoryCategoryPreferenceLabel":"偏好","shared.settingsCats.memoryCategoryFactLabel":"事實","shared.settingsCats.memoryCategoryPolicyLabel":"規範","shared.settingsCats.memoryCategoryStyleLabel":"風格","shared.settingsCats.memoryCategoryRelationshipLabel":"關係","shared.settingsCats.memoryCategoryLessonLabel":"學習","shared.settingsCats.fallbackCatName":"這隻貓咪","shared.settingsCats.archiveConfirmTitle":"封存貓咪","shared.settingsCats.archiveConfirmMessage":"要封存「{catName}」嗎?之後仍可從設定復原。","shared.settingsCats.archiveWithTelegramConfirmMessage":"要封存「{catName}」嗎?Telegram 機器人綁定會被移除,但之後仍可從設定復原。","shared.settingsCats.archiveSuccess":"{catName} 已封存。","shared.settingsCats.archiveError":"封存貓咪失敗。","shared.settingsCats.recoverConfirmTitle":"復原貓咪","shared.settingsCats.recoverConfirmMessage":"要從封存復原「{catName}」嗎?","shared.settingsCats.recoverConfirmLabel":"復原","shared.settingsCats.recoverSuccess":"{catName} 已復原。","shared.settingsCats.recoverError":"復原貓咪失敗。","shared.settingsCats.error.nameRequired":"請輸入貓咪名稱。","shared.settingsCats.error.providerRequired":"請選擇貓咪供應器。","shared.settingsCats.error.nameEmpty":"貓咪名稱不可空白。","shared.settingsCats.error.alreadyArchived":"這隻貓咪已封存。","shared.settingsCats.error.alreadyActive":"這隻貓咪已啟用。","shared.settingsCats.error.archiveRecoverConflict":"貓咪不可同時封存與復原。","shared.settingsCats.error.noProducts":"請至少為這隻貓咪選擇一個產品。","shared.settingsCats.error.botTokenDuplicate":"這個 bot token 已被另一個綁定使用。","shared.settingsCats.error.nameDuplicate":"已存在名為「{name}」的貓咪。","shared.settingsCats.error.limitReached":"已達貓咪數量上限(最多 {maxCats} 隻)。","shared.settingsCats.error.notFound":"找不到這隻貓咪。","shared.settingsCats.error.notActive":"這隻貓咪尚未啟用。","shared.settingsCats.error.notAvailableInChat":"這隻貓咪無法在 Cats Chat 使用。","shared.settingsCats.error.botBindingNotFound":"找不到 bot 綁定。","shared.platformSurfaceSwitcher.menuLabel":"切換產品","shared.platformSurfaceSwitcher.openLobby":"開啟大廳","shared.platformSurfaceSwitcher.ariaLabel":"切換產品。目前產品為 {productName}。","shared.providerModelBrainCard.title":"大腦","shared.providerModel.controls.default":"預設","shared.providerModel.controls.enabled":"啟用","shared.providerModel.controls.disabled":"停用","shared.providerModel.controls.optionalPlaceholder":"選填","shared.providerModel.field.providerLabel":"供應器","shared.providerModel.field.loadingProviders":"正在載入可用的供應器…","shared.providerModel.field.selectProviderHint":"請選擇可用的供應器","shared.providerModel.field.providerLoadFailed":"無法載入執行階段支援的供應器","shared.providerModel.field.noProviders":"沒有執行階段支援的供應器可用","shared.providerModel.field.registryCheckingHint":"正在檢查 cats-runtime 可用的供應器目標。","shared.providerModel.field.registryUsingProductCatalogHint":"檢查 cats-runtime 供應器目標時,先使用產品內建供應器目錄。","shared.providerModel.field.registryStaleHint":"cats-runtime 重新連線時,先顯示上次可用的供應器目標。","shared.providerModel.field.registryCachedRefreshFailedHint":"重新整理失敗,先顯示快取的供應器目標:{message}","shared.providerModel.field.registryLoadFailedHint":"無法從 cats-runtime 載入目前可用的供應器目標。","shared.providerModel.field.registryEmptyHint":"cats-runtime 已連線,但沒有回報任何目前可用的供應器目標。","shared.providerModel.field.providerInstanceLabel":"供應器實例","shared.providerModel.field.modelLabel":"模型","shared.providerModel.field.retryProvidersFirst":"請先重新載入供應器","shared.providerModel.field.selectProviderFirst":"請先選擇可用的供應器","shared.providerModel.field.waitingProviders":"正在等待可用的供應器…","shared.providerModel.field.loadingModels":"正在載入可用模型…","shared.providerModel.field.selectModel":"選擇模型","shared.providerModel.field.noModels":"沒有執行階段支援的模型可用","shared.providerModel.field.customLegacyModelLabel":"自訂舊版模型…","shared.providerModel.field.legacyModelIdLabel":"舊版模型 ID","shared.providerModel.field.legacyModelIdPlaceholder":"例如 claude-sonnet-4-6","shared.providerModel.field.legacyModelIdHint":"手動輸入模型 ID 會直接傳遞。執行階段會把它視為舊版 `model` 欄位,而不是結構化項目/預設選擇。","shared.providerModel.field.modeLabel":"模式","shared.providerModel.field.modeStandardLabel":"標準","shared.providerModel.field.modeStandardOnlyLabel":"僅標準","shared.providerModel.field.presetPreviewSuffix":"(預覽)","shared.providerModel.field.presetUnavailableSuffix":"(不可用)","shared.providerModel.field.presetTuningDescriptionFallback":"這個模型的額外參數。","shared.providerModel.field.modeOnlyBaseHint":"此供應器目標只會對持久化的聊天/會話設定曝光基礎模型。","shared.providerModel.field.requestScopedWarning":"這裡隱藏了只可套用於個別請求的覆寫,因為這組選擇器會寫回聊天/會話預設。","shared.providerModel.field.openRuntimeSetupLabel":"開啟 Cats 執行階段設定","shared.providerModel.field.advancedCatalogUnavailable":"執行階段進階模型目錄無法使用。","shared.providerModel.field.catalogKindModel":"模型","shared.providerModel.field.catalogKindAdvancedModel":"進階模型","shared.providerModel.field.runtimeCatalogUnavailable":"執行階段{catalogKind}目錄無法使用。","shared.providerModel.field.runtimeCatalogUnavailableWarning":"cats-runtime 重新整理時,先使用產品內建的{catalogKind}目錄:{message}","shared.memoryEditorDialog.title":"新增記憶","shared.memoryEditorDialog.categoryLabel":"分類","shared.memoryEditorDialog.contentLabel":"內容","shared.memoryEditorDialog.memoryPlaceholder":"這隻貓咪需要記住些什麼?","shared.memoryEditorDialog.cancel":"取消","shared.memoryEditorDialog.saving":"儲存中…","shared.memoryEditorDialog.add":"新增","shared.approvalEyebrow":"核准","shared.approvalPendingTitle":"待核准項目","shared.approvalEmptyState":"在此由指揮面板保持運轉,直到任務需要由負責人做判斷決定。","shared.approvalRequester":"指揮者","shared.approvalSummaryFallback":"請先確認此次派工,再讓 Cats 繼續。","shared.approvalRequestedBy":"提交者:{requestedBy}","shared.approval.action.approve":"核准","shared.approval.action.reroute":"改派路徑","shared.approval.action.reject":"拒絕","shared.approval.action.approveDescription":"允許編排計畫繼續。","shared.approval.action.rerouteDescription":"將計畫退回,改用其他交接或派工路徑。","shared.approval.action.rejectDescription":"不允許計畫繼續。","shared.catInspectTitle":"貓咪預設","shared.catInspectClose":"關閉","shared.catInspectBossLabel":"主控","shared.catInspectProviderLabel":"供應器","shared.catInspectInstanceLabel":"實例","shared.catInspectModelLabel":"模型","shared.catInspectSkillProfileLabel":"技能檔案","shared.catInspectSharedPresetDescription":"這是共用的貓咪預設。這裡的變更會影響所有使用此貓咪的對話。","shared.messageChoicesCustom":"自訂","shared.messageChoicesAddCustomPlaceholder":"輸入你的答案","shared.messageChoicesSkipped":"發起者已略過這些選項。","shared.messageChoicesRecorded":"發起者回應已記錄。","shared.messageChoicesConfirm":"確認","shared.messageChoicesSkip":"跳過","shared.folderBrowserEnterPath":"輸入路徑","shared.folderBrowserGo":"前往","shared.folderBrowserUpOneLevel":"回上一層","shared.folderBrowserRefresh":"重新整理","shared.folderBrowserLoading":"載入中…","shared.folderBrowserNoSubdirectories":"此資料夾中沒有子資料夾。","shared.folderBrowserUseThisFolder":"使用此資料夾","shared.common.saving":"儲存中…","shared.common.dismiss":"關閉","setup.wizard.welcomeTitle":"歡迎使用 Cats","setup.wizard.welcomeIntro":"你的個人 AI 工作空間。讓我們快速完成設定。","setup.wizard.ownerNameLabel":"您的名字","setup.wizard.ownerNamePlaceholder":"顯示名稱","setup.wizard.getStartedButton":"開始","setup.wizard.stepIndicator":"第 {step} 步,共 {total} 步","setup.wizard.enableGuideTitle":"啟用 {guideCatName}","setup.wizard.enableGuideSubtitle":"這位可選助理可在聊天、工作與程式碼場景中提供協助。","setup.wizard.enableGuideLabel":"啟用 {guideCatName}","setup.wizard.skipGuideMessage":"你可以先略過此步驟,稍後再從「設定 > 助理」啟用 {guideCatName}。","setup.wizard.backButton":"返回","setup.wizard.openingCatsAction":"正在開啟 Cats…","setup.wizard.openCatsAction":"開啟 Cats","setup.wizard.failedMessage":"設定失敗。","setup.wizard.failedWithStatus":"設定失敗({status})","setup.wizard.alreadyCompleteError":"設定已完成。","setup.wizard.invalidRequestError":"設定請求無效。","setup.wizard.serverError":"無法完成設定,請稍後再試。","setup.wizard.recordOpenFailedWithStatus":"記錄設定開啟狀態失敗({status})","setup.guideCat.runtimeUnavailable":"供應器目錄無法使用","setup.guideCat.noUsableTargets":"找不到可用供應器","setup.guideCat.runtimeConnected":"Cats 執行階段已連線","setup.guideCat.runtimeNotDetected":"未偵測到 Cats 執行階段","setup.guideCat.nameLabel":"導覽貓名稱","setup.guideCat.nameHint":"Cats 會保留這個名稱,後續可依語系調整。","setup.guideCat.openRuntimeSetup":"開啟 Cats 執行階段設定","setup.guideCat.unavailableNote":"即使導覽貓未啟用也能使用。若遇到連線逾時,請在此重試,或前往 Cats 執行階段設定頁。","setup.guideCat.noUsableTargetsNote":"Cats 執行階段已可連線,但目前沒有回報任何可用的導覽貓供應器設定。","settings.assistants.defaultName":"助理","settings.assistants.statusFailed":"狀態更新失敗({status})","settings.assistants.saveFailed":"儲存失敗。","settings.assistants.statusUpdateFailed":"狀態更新失敗({status})","settings.assistants.guideCatUpdateFailed":"無法更新導覽貓。","settings.assistants.guideCatSaveFailed":"無法儲存導覽貓。","settings.assistants.saveFailedWithError":"儲存失敗({status})","settings.assistants.removeTitle":"移除助理","settings.assistants.removeMessage":"移除「{title}」?將無法復原。","settings.assistants.removeButton":"移除","settings.assistants.removeFailed":"無法移除助理。","settings.assistants.enableButton":"啟用","settings.assistants.enableBusyButton":"儲存中…","settings.assistants.disableButton":"停用","settings.assistants.avatarLabel":"頭像","settings.assistants.nameLabel":"名稱","settings.assistants.selectAriaLabel":"選取助理","settings.assistants.addNewLabel":"新增助理","settings.assistants.newAssistantTitle":"新增助理","settings.assistants.cancelButton":"取消","settings.assistants.createButton":"儲存","settings.assistants.deleteButton":"刪除","settings.assistants.roleHintTitle":"角色提示","settings.assistants.namePlaceholder":"助理","settings.assistants.roleHintPlaceholder":"檢閱者、除錯人員、文字編修者、API 專家…","settings.assistants.renameFailed":"無法重新命名助理。","settings.assistants.roleHintUpdateFailed":"無法更新角色提示。","settings.assistants.brainUpdateFailed":"無法更新大腦設定。","settings.assistants.createFailed":"無法儲存助理。","settings.assistants.api.invalidRequestBody":"請求內容無效。","settings.assistants.api.assistantNameRequired":"請輸入助理名稱。","settings.assistants.api.assistantProviderRequired":"請選擇助理供應器。","settings.assistants.api.assistantModelRequired":"請選擇助理模型。","settings.assistants.api.assistantNotFound":"找不到助理。","settings.assistants.api.guideCatNameManaged":"導覽貓名稱由 Cats 管理。","settings.assistants.api.guideCatStatusInvalid":"導覽貓狀態必須是啟用或已停用。","settings.assistants.api.guideCatNotFound":"尚未建立導覽貓。","conversationSidebar.chatsLabel":"聊天","conversationSidebar.recentsLabel":"最近","conversationSidebar.noChatsLabel":"尚無聊天","conversationSidebar.primaryAriaLabel":"主要","conversationSidebar.openSidebarLabel":"展開側邊欄","conversationSidebar.closeSidebarLabel":"收合側邊欄","conversationSidebar.renameLabel":"重新命名","conversationSidebar.renamingLabel":"重新命名中…","conversationSidebar.deleteLabel":"刪除","conversationSidebar.deletingLabel":"刪除中…","conversationSidebar.ungroupLabel":"取消群組","conversationSidebar.ungroupingLabel":"取消群組中…","conversationSidebar.deleteAllLabel":"刪除全部","conversationSidebar.openAccountSettingsLabel":"開啟帳號設定","conversationSidebar.runtimeStatusAriaLabel":"執行階段狀態:{status}","conversationSidebar.directMessagesLabel":"直接訊息","conversationSidebar.telegramBoundTooltip":"已綁定 Telegram 機器人","conversationSidebar.archiveButton":"封存","conversationSidebar.directMessageButton":"直接訊息","conversationSidebar.clearButton":"清除","conversationSidebar.clearConfirmMessage":"清除與 {catName} 的對話歷史?此操作無法復原。","chatNewChatDraft.viewCatProfileAction":"查看貓咪個人檔案","chatTopBar.openCatProfileAriaLabel":"查看貓咪個人檔案","design.sidePanel.closeLabel":"關閉","design.accountIdentityMenu.label":"帳號選單","design.accountIdentityMenu.menuLabel":"帳號選單","design.accountIdentityMenu.settingsLabel":"設定","design.accountIdentityMenu.environmentLabel":"環境","design.notification.dismissLabel":"關閉","entity.comingSoon.backToLobby":"返回大廳","entity.detail.breadcrumb.lobby":"大廳","clowdersList.title":"我的貓群","clowdersList.eyebrow":"貓群","clowdersList.emptyState":"尚未有貓群。接上貓群 registry 後,正式任務群組會在這裡列出。","catteriesList.title":"我的貓窩","catteriesList.eyebrow":"貓窩","catteriesList.emptyState":"尚未有貓窩。接上貓窩 registry 後,組織會在這裡列出。","clowdersCanvas.ariaLabel":"貓群畫布","catteriesCanvas.ariaLabel":"貓窩畫布","entityCanvas.totalLabel":"總數","entityCanvas.catsLabel":"貓咪","entityCanvas.membersLabel":"成員","entityCanvas.clowdersLabel":"貓群","entityCanvas.idLabel":"識別碼","entityCanvas.createdLabel":"建立時間","entityCanvas.selectedClowderLabel":"選取的貓群","entityCanvas.selectedCatteryLabel":"選取的貓窩","entityCanvas.organizationLabel":"組織","entityCanvas.parentCatteryLabel":"上層貓窩","entityCanvas.formalClowderLabel":"正式貓群","entityCanvas.noOrganizationLabel":"沒有組織連結","entityCanvas.noFormalClowdersLabel":"沒有正式貓群","entityCanvas.openClowderAction":"開啟貓群","entityCanvas.openCatteryAction":"開啟貓窩","entityCanvas.catterySubtitle":"{clowderCount} 個貓群 · {memberCount} 位成員","catProfile.notFound.title":"找不到這隻貓","catProfile.notFound.body":"此工作區中沒有 id 為「{catId}」的貓。可能已被移除,或連結已失效。","entitiesSidebar.section.cats":"我的貓咪","entitiesSidebar.section.clowders":"我的貓群","entitiesSidebar.section.catteries":"我的貓窩","entitiesSidebar.newCat":"新增貓咪","entitiesSidebar.newClowder":"新增貓群","entitiesSidebar.newCattery":"新增貓窩","entityIndex.eyebrow":"目錄","entityIndex.title":"Cats 目錄","entityIndex.columnHeader.cats":"貓咪","entityIndex.columnHeader.clowders":"貓群","entityIndex.columnHeader.catteries":"貓窩","entityIndex.card.total":"共 {count} 個","entityIndex.card.openCanvasAriaLabel":"開啟{label}","entitiesShell.ariaLabel":"Cats 目錄 工作區","entitiesShell.surfaceLabel":"Cats 目錄","entitiesShell.brandLabel":"目錄","entitiesShell.exitButtonAriaLabel":"離開 Cats 目錄","clowderHome.ariaLabel":"貓群主頁","clowderHome.chip.partOf":"隸屬於 {catteryName}","clowderHome.chip.crossUnit":"跨單位任務小組","clowderHome.tab.cats":"貓咪","clowderHome.tab.settings":"設定","clowderHome.empty.cats":"此貓群尚未有貓咪。Phase 6 成員管理上線後即可加入第一隻。","clowderHome.settings.body":"貓群設定(重新命名、封存、轉移)會在 PLAN-091 phase 6 成員管理上線時提供。","clowderHome.notFound.title":"找不到這個貓群","clowderHome.notFound.body":"此工作區中沒有 id 為「{clowderId}」的貓群。可能已被移除,或連結已失效。","catteryHome.ariaLabel":"貓窩主頁","catteryHome.tab.members":"成員","catteryHome.tab.clowders":"貓群","catteryHome.tab.cats":"貓咪","catteryHome.tab.settings":"設定","catteryHome.empty.members":"尚未有成員。Phase 6 成員管理上線後即可加入第一位。","catteryHome.empty.clowders":"此貓窩尚未有貓群。Phase 6 上線後正式編制的貓群會在這裡列出。","catteryHome.empty.cats":"尚未能透過此貓窩取得貓咪。Phase 6 成員資料上線後會把直接成員與透過正式貓群間接到的成員彙總在這裡。","catteryHome.settings.body":"貓窩設定(個資、轉移所有權、封存)會在 PLAN-091 phase 6 成員管理上線時提供。","catteryHome.notFound.title":"找不到這個貓窩","catteryHome.notFound.body":"此工作區中沒有 id 為「{catteryId}」的貓窩。可能已被移除,或連結已失效。","code.activeComposer.detachedBranch":"分離分支","code.newDraft.greeting":"準備開始寫程式。","code.newDraft.greeting.openRepo":"開啟 repo,從小處開始。","code.newDraft.greeting.buildFixRefactor":"建置、修復或重構真實的東西。","code.newDraft.greeting.shipImprovement":"交付一個清楚的改善。","code.newDraft.greeting.smallestChange":"從最小但有用的變更開始。","code.newDraft.composer.placeholder":"這次程式工作階段要建置、修復或調查什麼?","code.newDraft.setupTitle":"新程式設定","code.newDraft.participants.title":"參與者","code.newDraft.participants.empty":"目前沒有可用的參與者。","code.newDraft.execution.title":"執行","code.newDraft.execution.action":"選擇執行目標","code.newDraft.execution.empty":"尚未設定執行目標。","code.newDraft.folder.title":"程式工作區","code.newDraft.folder.action":"選擇程式工作區","code.newDraft.folder.empty":"尚未選擇程式工作區。","code.newDraft.sessionProfile.title":"工作階段設定","code.newDraft.sessionProfile.description":"此程式工作階段會以 {workspace} 與 {permission} 開始。","code.newDraft.workspace.independentWorktree":"獨立工作樹","code.newDraft.workspace.currentFolder":"目前資料夾","code.newDraft.workspace.sandbox":"沙盒","code.newDraft.permission.readOnly":"唯讀","code.newDraft.permission.fullAccess":"完整存取","code.newDraft.starter.pomodoro.label":"建置番茄鐘應用程式","code.newDraft.starter.pomodoro.prompt":"寫一個小型番茄鐘計時器應用程式。","code.newDraft.starter.fixBug.label":"修復錯誤","code.newDraft.starter.fixBug.prompt":"找出並修復這個程式碼庫中的錯誤。","code.newDraft.starter.refactor.label":"重構程式碼","code.newDraft.starter.refactor.prompt":"在不改變行為的前提下重構這段程式碼。","code.newDraft.starter.writeTests.label":"撰寫測試","code.newDraft.starter.writeTests.prompt":"為我們上次碰過的程式碼新增測試。","code.newDraft.starter.startProject.label":"開始專案","code.newDraft.starter.startProject.prompt":"開始一個小專案來追蹤里程碑。","code.taskPills.ariaLabel":"任務提醒","code.taskPills.mock.authMiddleware":"重構驗證中介層","code.taskPills.mock.kiroSessionDelete":"修復 Kiro 工作階段刪除","code.taskPills.mock.artifactGallery":"草擬成品圖庫","code.taskPills.namePlaceholder":"命名此任務","code.taskPills.editAria":"編輯任務名稱","code.taskPills.title.current":"目前任務:{taskLabel} — 雙擊可重新命名","code.taskPills.title.focus":"聚焦 {taskLabel}(雙擊可重新命名)","code.taskPills.hideAria":"隱藏 {taskLabel}","code.taskPills.fallbackTask":"任務","code.taskPills.addAria":"新增任務提醒","code.taskPills.buttonTask":"任務","code.workspace.source.artifactAnchor":"成品錨點","code.artifact.kind.build":"建置","code.artifact.kind.dataset":"資料集","code.artifactDetail.artifactUnavailable":"成品詳細資料不可用","code.artifactDetail.backToBuild":"返回建置","code.artifactDetail.artifactOutput":"成品輸出","code.artifactDetail.conversationLabel":"對話","code.artifactDetail.contextEyebrow":"脈絡","code.artifactDetail.contextTitle":"已連結記錄","code.artifactDetail.loadFailed":"無法載入成品詳細資料。","code.artifactDetail.loadingBody":"正在取得成品中繼資料與相關脈絡。","code.artifactDetail.loadingTitle":"正在載入成品詳細資料","code.artifactDetail.missingId":"成品 ID 為必填。","code.artifactDetail.noArtifactSummary":"尚未記錄成品摘要。","code.artifactDetail.noInlinePreview":"這個成品目前沒有可用的內嵌預覽。","code.artifactDetail.notInlineSafe":"此成品已可用,但目前 Code 介面不適合內嵌顯示。","code.artifactDetail.previewOutput":"預覽輸出","code.artifactDetail.previewActionOpenArtifact":"開啟成品","code.artifactDetail.previewActionOpenPreview":"開啟預覽","code.artifactDetail.projectLabel":"專案","code.artifactDetail.projectMeta":"專案:{projectTitle}","code.artifactDetail.relatedEmpty":"這個任務或工作項目尚未記錄相關成品。","code.artifactDetail.relatedEyebrow":"相關","code.artifactDetail.relatedTitle":"鄰近成品","code.artifactDetail.openConversationAction":"開啟對話","code.artifactDetail.openProjectAction":"開啟專案","code.artifactDetail.openTaskAction":"開啟任務","code.artifactDetail.openWorkItemAction":"開啟工作項目","code.artifactDetail.taskLabel":"任務","code.artifactDetail.title":"成品","code.artifactDetail.viewArtifact":"查看成品","code.artifactDetail.workItemLinkedLabel":"工作項目","code.artifactDetail.workItemMissingLabel":"沒有連結的工作項目","code.artifactKind.attachment":"附件","code.artifactKind.document":"文件","code.artifactKind.preview":"預覽","code.artifactKind.report":"報告","code.artifactKind.transcript":"對話紀錄","code.artifactKind.unknown":"未知","code.artifactKind.build":"建置","code.artifactStatus.archived":"已封存","code.artifactStatus.draft":"草稿","code.artifactStatus.published":"已發佈","code.artifactStatus.ready":"就緒","code.artifactStatus.unknown":"未知","code.artifactList.artifact":"成品","code.artifactList.filter.all":"全部","code.artifactList.ariaOpenArtifact":"開啟成品 {title}","code.artifactList.empty":"目前沒有符合此篩選的成品。建置、預覽、報告、附件與對話匯出會出現在這裡。","code.artifactList.header":"成品","code.artifactList.loading":"正在載入成品…","code.artifactList.error":"無法載入成品:{error}","code.artifactList.loadFailed":"成品清單請求失敗。","code.artifactList.candidateHint":"候選成品尚未升級為持久記錄。","code.artifactList.candidateLabel":"候選","code.artifactList.provenance.run":"執行","code.artifactList.statusFilterLabel":"狀態:","code.artifactList.provenance.task":"任務","code.artifactMeta.contract":"契約","code.artifactMeta.mode":"模式:{mode}","code.artifactMeta.decision":"決策:{decision}","code.artifactMeta.kind":"類型:{kind}","code.artifactMeta.path":"路徑:{path}","code.artifactMeta.status":"狀態:{status}","code.artifactMeta.updated":"更新時間:{updatedAt}","code.artifactMeta.viewArtifact":"查看成品","code.artifactPreview":"成品預覽","code.artifact.unknown":"未知","code.conversationKind.chatChannel":"聊天頻道","code.conversationKind.chatRoot":"聊天根目錄","code.conversationKind.codeThread":"程式討論串","code.conversationKind.directMessage":"直接訊息","code.conversationKind.parallelGroup":"平行群組","code.conversationKind.unknown":"對話","code.conversationKind.workThread":"工作討論串","code.recordStatus.archived":"已封存","code.recordStatus.blocked":"已阻擋","code.recordStatus.cancelled":"已取消","code.recordStatus.completed":"已完成","code.recordStatus.draft":"草稿","code.recordStatus.failed":"失敗","code.recordStatus.inProgress":"進行中","code.recordStatus.open":"開啟","code.recordStatus.pending":"待處理","code.recordStatus.pendingApproval":"等待核准","code.recordStatus.ready":"就緒","code.recordStatus.running":"執行中","code.recordStatus.unknown":"未知","code.builder.codespaceHeader":"程式工作區","code.builder.codeOutputLabel":"輸出","code.builder.back":"返回","code.builder.continue":"繼續","code.builder.continueBuild":"繼續建置","code.builder.continueBuildBusy":"正在繼續…","code.builder.continueTaskBusy":"正在繼續…","code.builder.createArtifact":"建立成品","code.builder.createLabel":"建置","code.builder.creatingTask":"正在建立…","code.builder.defineTaskHeader":"定義任務","code.builder.detailsPlaceholder":"描述完成狀態與驗收條件…","code.builder.detailsLabel":"細節 / 驗收條件(選填)","code.builder.errorCodespaceResolve":"無法解析這個程式工作區。","code.builder.errorCodespacePathInvalid":"選取的路徑不存在或不是資料夾:{path}","code.builder.errorCodespaceNoPath":"找不到有效的程式工作區路徑。請選擇資料夾,或確認房間工作區存在。","code.builder.errorTaskCreate":"無法建立程式碼任務。","code.builder.errorTaskCreateMissingId":"建立任務的回應缺少 task id。","code.builder.errorTaskExecution":"無法啟動程式碼任務。","code.builder.errorTaskDetailLoad":"無法載入這個程式碼任務。","code.builder.errorTaskResume":"無法接續這個程式碼任務。","code.builder.errorTaskResumeInput":"請輸入要接續的任務 ID。","code.builder.errorTaskTitle":"請輸入你想建置的內容。","code.builder.runtimeObservationFailed":"無法重新整理執行階段工作階段。","code.builder.executionDoneBanner":"任務已完成。請檢查上方結果,並使用交付操作提交或推送。","code.builder.existingTask":"既有任務","code.builder.feedbackResumeReady":"任務已可繼續。","code.builder.feedbackResumeTask":"已接續任務 {taskId}。","code.builder.feedbackResumeNoWorkspace":"已接續任務 {taskId};繼續前請先選擇程式工作區。","code.builder.feedbackResumeWorkspaceNeeded":"繼續此任務前請先選擇程式工作區。","code.builder.filter.codespace":"程式工作區","code.builder.header.codespace":"程式工作區","code.builder.header.newTask":"新任務","code.builder.header.projectFolder":"專案資料夾","code.builder.header.taskStep":"任務","code.builder.modelLabel":"模型(選填)","code.builder.modelPlaceholder":"預設","code.builder.newTaskButton":"新任務","code.builder.providerLabel":"供應器","code.builder.providerTaskLabel":"供應器","code.builder.repoPathLabel":"儲存庫路徑","code.builder.resumeLabel":"既有任務 ID(選填)","code.builder.resumePrompt":"接續任務","code.builder.retryPrompt":"重試","code.builder.stepLabel":"步驟 {step}","code.builder.successTaskReadyWithCurrentChat":"{workspaceFallback},來源:{title}。","code.builder.taskIdRequired":"請輸入任務 ID。","code.builder.taskIdReady":"任務 {taskId} 已可繼續。","code.builder.taskIdReadyNoWorkspace":"任務 {taskId} 已可繼續;繼續前請先選擇程式工作區。","code.builder.taskLabel":"任務","code.builder.taskSummaryPlaceholder":"例如:加入使用者登入功能","code.builder.title":"程式建置器","code.builder.workspaceActiveNotice":"這會成為下一個任務步驟使用的建置程式工作區。","code.builder.workspaceFallbackBound":"已綁定工作區","code.builder.workspaceFallbackBoundFallback":"請輸入專案資料夾,或接續既有任務。","code.builder.workspaceFallbackChatRepo":"目前聊天室儲存庫","code.builder.workspaceFallbackRoom":"目前房間資料夾","code.builder.workspaceFooterLabel":"工作區","code.builder.workspacePathPlaceholder":"/path/to/project","code.builder.workspaceResumeHelp":"接續功能適用於你想繼續處理的草稿、已阻擋或失敗程式碼任務。","code.builder.sampleTaskId":"task-...","code.builder.workspaceSummaryLabel":"程式工作區","code.builder.workspaceSummaryNotice":"目前的建置程式工作區。","code.builder.startingTaskBusy":"正在啟動…","code.builder.taskQuestion":"你想建置什麼?","code.livePreview.commandProfile":"設定檔:{profile}","code.livePreview.description":"檢視連到此 Cats Code 介面的受監管本機即時預覽。","code.livePreview.diagnostic":"診斷:{message}","code.livePreview.error.load":"無法載入即時預覽狀態。","code.livePreview.error.logs":"無法載入即時預覽記錄。","code.livePreview.error.stop":"無法停止即時預覽。","code.livePreview.expiresAt":"到期:{time}","code.livePreview.hideLogs":"隱藏記錄","code.livePreview.logs":"記錄","code.livePreview.logsEmpty":"此預覽尚未記錄內容。","code.livePreview.logsLoading":"正在載入記錄…","code.livePreview.open":"開啟預覽","code.livePreview.retry":"重試","code.livePreview.retryUnavailable":"重試會在即時預覽啟動流程核准後開放。","code.livePreview.status.expired":"已到期","code.livePreview.status.failed":"失敗","code.livePreview.status.ready":"就緒","code.livePreview.status.starting":"啟動中","code.livePreview.status.stopped":"已停止","code.livePreview.status.stopping":"停止中","code.livePreview.stop":"停止","code.livePreview.stopRequested":"已送出停止要求。","code.livePreview.stopping":"正在停止…","code.livePreview.title":"即時預覽","code.livePreview.workspace":"工作區:{workspace}","code.execution.header":"執行","code.execution.meta.noTask":"尚未綁定任務","code.execution.meta.runtimeSession":"執行階段工作階段:{sessionId}","code.execution.meta.workingTreeClean":"工作樹乾淨","code.execution.meta.workingTreeDirty":"工作樹有變更","code.execution.noActiveSession":"沒有作用中的工作階段","code.execution.noTask":"尚未綁定任務","code.execution.notStarted":"尚未開始","code.execution.ownerDecisionRequired":"需要使用者決策","code.execution.panelTitle":"任務執行","code.execution.runtimeHeader":"執行階段","code.execution.runtimeIdle":"閒置","code.execution.modeDelivery":"交付模式:{deliveryMode}","code.execution.targetLabel":"目標:{target}","code.execution.targets":"目標:{targets}","code.execution.runtimeTitle":"執行階段","code.execution.sectionBlocked":"已阻擋","code.execution.taskHeader":"任務","code.execution.taskStatus":"狀態:{status}","code.execution.taskTitle":"任務","code.execution.notActiveYet":"尚未啟用","code.execution.paused":"已暫停","code.execution.provider":"供應器:{provider}","code.execution.model":"模型:{model}","code.execution.defaultModel":"預設","code.execution.session":"工作階段:{sessionId}","code.execution.taskId":"ID:{taskId}","code.execution.status.blocked":"已阻擋","code.execution.status.done":"完成","code.execution.status.pending":"待處理","code.execution.status.running":"執行中","code.execution.status.unknown":"未知","code.execution.taskRuntimeHeader":"執行階段","code.execution.taskStrategy":"策略:{strategy}","code.execution.strategy.pdca":"PDCA","code.execution.strategy.react":"ReAct","code.execution.strategy.reflexion":"Reflexion","code.execution.deliveryMode.artifactOnly":"僅成品","code.execution.deliveryMode.commitOnly":"僅提交","code.execution.deliveryMode.deployPreview":"部署預覽","code.execution.deliveryMode.prWithChecks":"含檢查的 Pull Request","code.execution.deliveryMode.pushBranch":"推送分支","code.execution.blockedReason.antiPingPong":"防迴圈保護","code.execution.blockedReason.approvalPending":"等待核准","code.execution.blockedReason.maxDispatches":"已達分派上限","code.execution.blockedReason.noValidTargets":"沒有有效目標","code.execution.blockedReason.startupRecovery":"啟動修復","code.execution.blockedReason.userCancelled":"使用者已取消","code.execution.unknownDeliveryMode":"未知交付模式","code.execution.unknownValue":"未知","code.execution.unknownValueUnknown":"未知","code.execution.controlHeader":"控制","code.execution.controlMode":"模式:{mode}","code.execution.controlDelivery":"交付:{deliveryMode}","code.execution.controlBlocked":"已阻擋","code.execution.controlApprovalPending":"等待核准","code.execution.controlBlockedBy":"接續流程被 {reason} 阻擋。","code.execution.controlTargets":"目標:{targets}","code.execution.statusActiveLabel":"作用中","code.execution.statusIdleLabel":"閒置","code.execution.statusBlockedLabel":"已阻擋","code.execution.statusRunningLabel":"執行中","code.execution.statusDoneLabel":"完成","code.execution.statusPendingLabel":"待處理","code.delivery.previewHeader":"預覽","code.delivery.blockerLabel":"已阻擋","code.delivery.contractLabel":"契約","code.delivery.error.repoStatusUnavailable":"無法取得儲存庫狀態。","code.delivery.warningsLabel":"警告","code.delivery.warningsTitle":"警告","code.delivery.header":"交付","code.delivery.label":"交付","code.delivery.labelPreview":"{label} 預覽","code.delivery.metaBranch":"分支:{branch}","code.delivery.metaAhead":"領先:{count}","code.delivery.metaBehind":"落後:{count}","code.delivery.metaStaged":"已暫存:{count}","code.delivery.metaUnstaged":"未暫存:{count}","code.delivery.metaUntracked":"未追蹤:{count}","code.delivery.metaRemote":"遠端:{remote}","code.delivery.metaMode":"模式:{mode}","code.delivery.metaDecision":"決策:{decision}","code.delivery.noCodespace":"尚未綁定程式工作區。請先解析程式工作區才能查看儲存庫操作。","code.delivery.noRepoStatus":"尚未載入儲存庫狀態。","code.delivery.noInlinePreview":"目前沒有可用的內嵌預覽。","code.delivery.noWorkspace":"尚未選擇工作區。","code.delivery.panelSubtitle":"從目前程式工作區提交、推送或匯出輸出。","code.delivery.panelTitle":"儲存庫操作","code.delivery.previewHintUnsafe":"此預覽已可用,但較適合在內嵌框架外開啟。","code.delivery.repoClean":"乾淨","code.delivery.repoDirty":"有變更","code.delivery.repoStatusHeader":"儲存庫狀態","code.delivery.actions.commitHeader":"提交","code.delivery.actions.pushHeader":"推送","code.delivery.actions.exportHeader":"匯出","code.delivery.action.refresh":"重新整理","code.delivery.action.preview":"預覽","code.delivery.action.commit":"提交","code.delivery.action.push":"推送…","code.delivery.action.pushPreview":"預覽推送","code.delivery.action.pushConfirm":"確認推送","code.delivery.action.pushCancel":"取消","code.delivery.action.export":"匯出成品","code.delivery.action.commitPlaceholder":"提交訊息…","code.delivery.confirmation.push":"要推送到遠端嗎?這會對外可見。","code.delivery.confirmation.pushHint":"此操作會將本機提交發佈到設定的遠端。","code.delivery.error.commitFailed":"提交操作失敗。","code.delivery.error.pushFailed":"推送操作失敗。","code.delivery.error.exportFailed":"成品匯出失敗。","code.delivery.status.ready":"就緒","code.delivery.status.blocked":"已阻擋","code.delivery.status.unknown":"未知","code.delivery.decision.approve":"核准","code.delivery.decision.complete":"完成","code.delivery.decision.reject":"拒絕","code.delivery.decision.reroute":"重新指派","code.delivery.decision.wait":"等待","code.delivery.unknownBlocker":"未知阻擋原因","code.delivery.warningFallback":"警告","code.plan.header":"計畫","code.plan.panelTitle":"程式計畫","code.plan.empty":"這個任務尚未建立計畫步驟。","code.plan.replan":"重新規劃","code.plan.status.blocked":"已阻擋","code.plan.status.done":"完成","code.plan.status.pending":"待處理","code.plan.status.running":"執行中","code.plan.title":"計畫","code.plan.replannedSuffix":"(已重新規劃 {count} 次)","code.plan.error.load":"無法載入計畫。","code.plan.error.update":"無法更新計畫。","code.plan.error.stepUpdate":"無法更新計畫步驟。","code.preview.artifactCountMany":"{count} 個成品","code.preview.artifactCountOne":"{count} 個成品","code.preview.blocked":"預覽已阻擋","code.preview.details":"詳細資料","code.preview.header":"輸出","code.preview.iframeTitle":"即時預覽","code.preview.noPreview":"尚未產生建置或預覽成品。","code.preview.notInlineSafe":"最新預覽已可用,但此輸出較適合在內嵌框架外開啟。","code.preview.openArtifact":"開啟成品","code.preview.openLatestArtifact":"開啟最新成品","code.preview.openLatestPreview":"開啟最新預覽","code.preview.openPreview":"開啟預覽","code.preview.title":"建置與預覽","code.relay.action.createThread":"建立分派討論串","code.relay.action.dispatching":"正在分派…","code.relay.action.fanOut":"分派","code.relay.action.refresh":"重新整理","code.relay.action.fanOutSelected":"分派給已選代理人","code.relay.authorKind.agent":"代理人","code.relay.authorKind.system":"系統","code.relay.authorKind.unknown":"未知","code.relay.authorKind.user":"使用者","code.relay.availability.instanceUnavailable":"{providerLabel} 執行個體「{instance}」無法在 cats-runtime 中使用。","code.relay.availability.providerPathMissing":"執行階段沒有回報已設定的 {providerLabel} 供應器路徑。","code.relay.availability.providerPathReady":"{providerLabel} 的執行階段供應器路徑已就緒。","code.relay.availability.runtimeConfigUnavailable":"執行階段供應器設定無法使用。","code.relay.availability.runtimeReadyVia":"執行階段已透過 {target} 就緒。","code.relay.error.agentRequired":"請至少選擇一個代理人。","code.relay.error.fanOutPromptRequired":"分派提示為必填。","code.relay.error.threadRequired":"請先建立或選擇分派討論串。","code.relay.error.threadTitleRequired":"討論串標題為必填。","code.relay.error.missingPayload":"分派請求缺少必要酬載。","code.relay.error.noPayload":"分派回應沒有包含酬載。","code.relay.error.relayFailed":"分派執行失敗。","code.relay.error.rosterUpdateFailed":"更新分派名單失敗。","code.relay.error.threadLoadFailed":"載入分派討論串失敗。","code.relay.error.threadRefreshFailed":"重新整理分派討論串失敗。","code.relay.error.threadCreateFailed":"建立分派討論串失敗。","code.relay.header.codeRelay":"程式分派","code.relay.label.contract":"契約","code.relay.label.contractLoading":"正在載入連接器契約…","code.relay.label.activeThread":"作用中討論串","code.relay.label.default":"預設","code.relay.label.enabled":"啟用","code.relay.label.ended":"結束:{endedAt}","code.relay.label.model":"模型:{model}","code.relay.label.noObjective":"尚未記錄目標。","code.relay.label.noRounds":"尚無回合","code.relay.label.noThreads":"尚無分派討論串","code.relay.label.noneYet":"尚無","code.relay.label.objective":"目標","code.relay.label.proven":"已驗證:{providers}","code.relay.label.repoPath":"儲存庫:{repoPath}","code.relay.label.relayThreadTitle":"分派討論串標題","code.relay.label.repoNoBound":"未綁定","code.relay.label.updated":"更新:{updatedAt}","code.relay.label.mode":"模式:{mode}","code.relay.label.open":"開啟","code.relay.label.quotaNote":"額度備註","code.relay.label.roster":"代理人名單","code.relay.label.roundObjective":"回合目標","code.relay.label.roundPrompt":"分派提示","code.relay.label.roundTimeline":"時間軸","code.relay.label.rounds":"回合","code.relay.label.role":"角色:{role}","code.relay.label.started":"開始:{startedAt}","code.relay.label.statusWaiting":"等待中","code.relay.status.active":"作用中","code.relay.status.available":"可用","code.relay.status.completed":"已完成","code.relay.status.failed":"失敗","code.relay.status.requested":"已請求","code.relay.status.running":"執行中","code.relay.status.unavailable":"不可用","code.relay.status.unknown":"未知","code.relay.status.waitingForAgents":"等待代理人","code.relay.status.waitingForUser":"等待使用者","code.relay.mode.build":"建置","code.relay.mode.discover":"探索","code.relay.mode.document":"文件化","code.relay.mode.fit":"整合","code.relay.mode.humanVerify":"人工驗證","code.relay.mode.repair":"修復","code.relay.mode.review":"審查","code.relay.mode.shape":"塑形","code.relay.role.critic":"評論者","code.relay.role.drafter":"草稿手","code.relay.role.idle":"閒置","code.relay.role.mainCoder":"主要程式代理人","code.relay.role.reviewer":"審查者","code.relay.role.summarizer":"摘要者","code.relay.label.threadShell":"討論串外殼","code.relay.label.threadTitle":"討論串標題","code.relay.phase.phase0":"階段 0","code.relay.phase.phase1":"階段 1","code.relay.phase.phase2":"階段 2","code.relay.phase.fanOut":"分派","code.relay.phase.roster":"名單","code.relay.phase.project":"專案","code.relay.projectThread":"專案討論串","code.relay.projectThreadSummary":"專案討論串摘要","code.relay.runtimeProviderSurface":"執行階段供應器介面","code.relay.runtimeSurface":"執行階段介面","code.relay.threadProject":"專案討論串","code.relay.threadShellTitle":"討論串外殼","code.relay.mode.parallelPrompt":"平行提示","code.relay.noObjective":"尚未記錄目標。","code.relay.notRecorded":"未記錄","code.relay.openDiscoveryRound":"開啟探索回合","code.relay.placeholder.objective":"我們要決定或建置什麼?","code.relay.placeholder.optionalRepo":"選填的本機儲存庫綁定","code.relay.placeholder.fanOutPrompt":"把同一個需求問題發給多個程式代理人。","code.relay.placeholder.quotaNote":"選填的建議備註","code.relay.currentChat":"目前對話:{title}","code.relay.create":"正在建立…","code.relay.defaultThreadTitle":"新的分派討論串","code.relay.loading":"正在載入分派程式工作區…","code.relay.projectThreadHeader":"專案討論串","code.relay.relayToOthers":"分派給其他人(階段 2)","code.relay.targetAgent":"目標代理人","code.relay.threadLabel":"討論串","code.relay.title":"程式分派","code.relay.titleConnectorContract":"連接器契約","code.relay.titleProjectThread":"專案討論串","code.relay.titleTimeline":"時間軸","code.relay.transportUnknown":"未知傳輸","code.relay.transportUnknownWithValue":"未知傳輸({transport})","code.relay.transportRuntimeSessionBridge":"執行階段工作階段橋接","code.sidebar.codespace":"程式工作區","code.sidebar.codeBuilderTitle":"程式建置器","code.sidebar.codespaces":"程式工作區","code.workspaceSource.codeTask":"程式碼任務","code.workspaceSource.conversationRepo":"對話儲存庫","code.workspaceSource.runtimeCwd":"執行階段工作目錄","code.relay.titleProjectThreadSection":"專案討論串","code.sidebar.teamCode":"團隊程式","code.sidebar.peerCode":"同儕程式","code.sidebar.newCode":"新增程式","code.sidebar.noCodesYet":"目前沒有程式對話","code.sidebar.noConversationsSummary":"目前沒有程式對話","code.relay.noRoundsHint":"使用上方分派表單開啟第一個探索回合。","code.sidebar.artifacts":"成品","code.sidebar.build":"建置","code.sidebar.relay":"分派","code.workspace.sectionCodeOutput":"程式輸出","code.workspace.summary.binding":"綁定","code.workspace.summary.codespace":"程式工作區","code.workspace.summary.kind":"類型:{kind}","code.workspace.summary.ownership":"歸屬:{ownership}","code.workspace.summary.chatContext":"對話脈絡:{title}","code.workspace.summary.noChatContext":"沒有對話脈絡","code.workspace.summary.noChat":"沒有對話","code.workspace.summary.binding.conversationRepo":"建置流程已綁定到選取的對話儲存庫。","code.workspace.summary.binding.managedRoom":"建置流程已綁定到這個房間管理的程式工作區。","code.workspace.summary.binding.userSelected":"建置流程已綁定到使用者選取的本機資料夾。","code.workspace.kind.conversationRepo":"目前對話儲存庫","code.workspace.kind.managedRoom":"房間管理的工作區","code.workspace.kind.userSelected":"使用者選取的資料夾","code.workspace.ownership.conversationBound":"對話擁有","code.workspace.ownership.roomOwned":"房間擁有","code.workspace.ownership.ownerSelected":"使用者選取","code.workspace.source.task":"程式碼任務","code.workspace.source.conversationRepo":"對話儲存庫","code.workspace.source.runtimeCwd":"執行階段工作目錄","code.workspaces.listHeader":"程式工作區","code.workspaces.listNoCodespaces":"目前沒有程式工作區。啟動一個指定儲存庫、資料夾、工作樹或受管理房間的程式工作階段後,會出現在這裡。","code.workspaces.loading":"正在載入程式工作區…","code.workspaces.error":"無法載入程式工作區:{error}","code.workspaces.loadError":"載入程式工作區失敗。","code.workspaces.sourceCodes":"程式碼任務","code.workspaces.sourceRepo":"對話儲存庫","code.workspaces.sourceRuntime":"執行階段工作目錄","code.workspaces.sourceArtifact":"成品錨點","code.workspaces.ariaOpen":"開啟程式工作區 {title}","code.workspaceStatus.active":"作用中","code.workspaceStatus.archived":"已封存","code.workspaceStatus.draft":"草稿","code.workspaceStatus.ready":"就緒","code.workspaceStatus.unknown":"未知","code.workspaceDetail.error":"無法載入程式工作區。","code.workspaceDetail.loading":"正在載入程式工作區…","code.workspaceDetail.title":"程式工作區","code.workspaceDetail.notFound":"找不到程式工作區。它可能已被移除,或 URL 已變更。","code.workspaceDetail.missingId":"程式工作區 ID 為必填。","code.workspaceDetail.backToList":"返回所有程式工作區 →","code.workspaceDetail.overviewTitle":"總覽","code.workspaceDetail.artifactSection":"成品","code.workspaceDetail.conversationsSection":"對話","code.workspaceDetail.tasksSection":"任務","code.workspaceDetail.noArtifacts":"沒有成品","code.workspaceDetail.noArtifactsDesc":"尚未連結成品。這個程式工作區產生的建置、預覽或文件會出現在這裡。","code.workspaceDetail.noConversations":"目前沒有對話連結到這個程式工作區。","code.workspaceDetail.noTasks":"目前沒有程式碼任務連結到這個程式工作區。","code.workspaceDetail.overviewPath":"路徑","code.workspaceDetail.overviewSource":"來源","code.workspaceDetail.overviewStatus":"狀態","code.workspaceDetail.overviewLastActive":"最後活動","code.workspaceDetail.overviewSummary":"摘要","code.workspaceDetail.noSummary":"尚無摘要。","code.workspaceDetail.metric.conversations":"對話","code.workspaceDetail.metric.tasks":"任務","code.workspaceDetail.metric.artifacts":"成品","code.workspaceDetail.metric.id":"識別碼","code.workspaceDetail.overviewNoArtifacts":"尚無成品","code.workspaceDetail.conversationsEmpty":"沒有連結的對話","code.workspaceDetail.tasksEmpty":"沒有連結的任務","code.workspaceDetail.taskLabel":"任務","code.workspaceDetail.artifactsHeader":"此程式工作區的成品","code.workspace.source.unknown":"未知來源","code.delivery.blocked":"交付已阻擋"},Zn={en:Wp,"zh-TW":Up},Hp=["zh","zh-tw","zh-hant","zh-hk","zh-mo","chinese","traditional","traditional chinese","mandarin","中文","繁體中文","繁体中文","繁體","繁体","國語","国语","華語","华语"],_p=["zh-cn","zh-hans","zh-sg","zh-my","simplified","simplified chinese","簡體中文","简体中文","簡體","简体"],Gp=["zh-tw-","zh-hant-","zh-hk-","zh-mo-"],Kp=["zh-cn-","zh-hans-","zh-sg-","zh-my-"],qp=new Set(Hp),$p=new Set(_p);function ml(e){if(!e)return null;for(const t of zp(e)){const a=Qp(t);if(a)return a}return null}function zp(e){return e.split(",").map((t,a)=>{const[o,...n]=t.trim().split(";"),s=Vp(o),i=Yp(n);return{token:s,quality:i,index:a}}).filter(t=>t.token.length>0&&t.quality>0).sort((t,a)=>a.quality-t.quality||t.index-a.index).map(t=>t.token)}function Vp(e){return(e??"").trim().replace(/_/gu,"-").toLowerCase()}function Yp(e){const t=e.find(s=>/^q\s*=/iu.test(s.trim()));if(!t)return 1;const a=/^q\s*=\s*(?<quality>.*)$/iu.exec(t.trim());if(!a?.groups)return 1;const o=a.groups.quality.trim();if(!/^\d+(?:\.\d+)?$/u.test(o))return 1;const n=Number.parseFloat(o);return Math.min(Math.max(n,0),1)}function Qp(e){return e==="en"||e.startsWith("en-")?"en":es(e,qp,Gp)?"zh-TW":(es(e,$p,Kp),null)}function es(e,t,a){return t.has(e)?!0:a.some(o=>e.startsWith(o))}function Jp(e){return ml(e)??"en"}function Xp(e,t){return t?e.replace(/\{([^{}]+)\}/g,(a,o)=>{const n=t[o];return n===void 0?a:String(n)}):e}function Fe(e){return function(a,o){const n=a in l?l[a]:a;return Xp(Zn[e][n]??Zn.en[n],o)}}const zt=Fe("en"),Vt=Fe("en"),Zp={chat:{nameKey:l.platformProductChatName,subtitleKey:l.platformProductChatSubtitle,settingsLabelKey:l.platformProductChatSettingsLabel},code:{nameKey:l.platformProductCodeName,subtitleKey:l.platformProductCodeSubtitle,settingsLabelKey:l.platformProductCodeSettingsLabel},work:{nameKey:l.platformProductWorkName,subtitleKey:l.platformProductWorkSubtitle,settingsLabelKey:l.platformProductWorkSettingsLabel}};function Jo(e){return Zp[e]??null}function eh(e,t=Vt){return ah(e.id,e.productName,t)}function th(e,t=Vt){return rh(e.id,e.subtitle,t)}function ah(e,t,a=Vt){const o=Jo(e);return o?a(o.nameKey):t}function rh(e,t,a=Vt){const o=Jo(e);return o?a(o.subtitleKey):t}function gl(e,t,a=Vt){const o=Jo(e);return o?a(o.settingsLabelKey):t}function oh(e,t,a=Vt){return t.id===e?gl(e,t.label,a):t.label}const ts="en",fl="auto",wl=()=>{},kl=d.createContext({locale:ts,languagePreference:fl,setLanguagePreference:wl,t:Fe(ts)});function Ot({children:e,languagePreference:t=fl,locale:a,setLanguagePreference:o=wl}){const n=d.useMemo(()=>({locale:a,languagePreference:t,setLanguagePreference:o,t:Fe(a)}),[t,a,o]);return r.jsx(kl.Provider,{value:n,children:e})}const ho=["chat","work","code"],nh=["chat","work","code"],sh=["chat"];function bl(e){return ho.includes(e)}function sa(e,t=null){return typeof e=="string"&&bl(e)?e:t}function Mr(e,t){const a=new Set(t),o=[];for(const n of e)!bl(n)||!a.has(n)||o.includes(n)||o.push(n);return o}function ih(e,t={}){const a=Mr(t.allowed??ho,ho),o=Mr(Array.isArray(e)?e.filter(s=>typeof s=="string"):[],a);if(o.length>0)return o;const n=t.fallback??null;return!n||n.length===0?[]:Mr(n,a)}function Xo(e,t,a={}){return ih(e,a).includes(t)}function lh(e){return nh.includes(e)}function hr(){return[...sh]}const ch=null,dh="/api/work",uh="/api/code",ph={chat:ch,work:dh,code:uh};function hh(e){return ph[e]??null}const as="/settings";function Pa(e){return e===as||e.startsWith(`${as}/`)}const mh="/setup",rs="/lobby",os="/products",gh="/entities",fh=[gh];function yl(e){return e===mh}function ga(e){return e===rs||e.startsWith(`${rs}/`)}function vl(e){return e===os||e.startsWith(`${os}/`)}function Cl(e){return fh.some(t=>e===t||e.startsWith(`${t}/`))}function wh(e){return yl(e)||ga(e)||vl(e)||Cl(e)||Pa(e)}const Er=Object.fromEntries(Bp().map(e=>[e.id,{surface:e.id,routePrefix:e.routePrefix,apiBase:hh(e.id),placeholder:!lh(e.id)}]));function kh(e){return Fp(e)}function bh(e,t,a,o="chat"){const n=sa(e);if(n)return n;const s=sa(t);if(s)return s;const i=sa(a);if(i)return i;const c=sa(o);return c||"chat"}function U(){return d.useContext(kl)}function Et(){const[e,t]=d.useState(null),a=d.useCallback(s=>new Promise(i=>{t({options:s,resolve:i})}),[]),o=d.useCallback(async s=>await a(s)==="confirm",[a]),n=d.useCallback(s=>{e&&(e.resolve(yh(s)),t(null))},[e]);return{dialog:e,confirm:o,choose:a,handleClose:n}}function It({dialog:e,onClose:t}){const{t:a}=U(),o=d.useRef(null);if(d.useEffect(()=>{e&&o.current?.focus()},[e]),d.useEffect(()=>{if(!e)return;function s(i){i.key==="Escape"&&t("cancel")}return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[e,t]),!e)return null;const n=e.options.defaultAction??"confirm";return r.jsx("div",{className:"confirmOverlay",onClick:()=>t("cancel"),children:r.jsxs("div",{className:"confirmDialog",onClick:s=>s.stopPropagation(),children:[r.jsx("p",{className:"confirmTitle",children:e.options.title}),r.jsx("p",{className:"confirmMessage",children:e.options.message}),r.jsxs("div",{className:"confirmActions",children:[r.jsx("button",{ref:n==="cancel"?o:null,className:"confirmCancelButton",type:"button",onClick:()=>t("cancel"),children:e.options.cancelLabel??a(l.sharedCommonCancel)}),e.options.auxiliaryLabel?r.jsx("button",{ref:n==="auxiliary"?o:null,className:"confirmAuxiliaryButton",type:"button",onClick:()=>t("auxiliary"),children:e.options.auxiliaryLabel}):null,r.jsx("button",{ref:n==="confirm"?o:null,className:"confirmDestructiveButton",type:"button",onClick:()=>t("confirm"),children:e.options.confirmLabel??a(l.sharedCommonDelete)})]})]})})}function yh(e){return typeof e=="boolean"?e?"confirm":"cancel":e}function vh({id:e,title:t,badge:a,isOpen:o,onToggle:n,children:s}){return r.jsxs("div",{className:"accordionSection",children:[r.jsxs("button",{type:"button",className:"accordionHeader",onClick:()=>n(e),"aria-expanded":o,children:[r.jsx("span",{className:"accordionHeaderTitle",children:t}),a!=null&&a>0?r.jsx("span",{className:"accordionBadge",children:a}):null,r.jsx("svg",{className:o?"accordionChevron accordionChevronOpen":"accordionChevron",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M4.5 2.5 8 6 4.5 9.5"})})]}),o?r.jsx("div",{className:"accordionBody",children:s}):null]})}const mo="cats:side-panel-layout-change";function Ch({title:e,activeSection:t,onSectionToggle:a,onClose:o,sections:n,className:s="",position:i="side"}){const c=d.useRef(null),{t:u}=U(),h=["sidePanel",i==="bottom"?"sidePanelBottom":"",s].filter(Boolean).join(" ");d.useEffect(()=>{function p(f){if(c.current&&!c.current.contains(f.target)){if(f.target.closest(".sidePanelToggle"))return;o()}}function k(f){f.key==="Escape"&&o()}return document.addEventListener("mousedown",p),document.addEventListener("keydown",k),()=>{document.removeEventListener("mousedown",p),document.removeEventListener("keydown",k)}},[o]);const g=i==="bottom"?"bottom":"side";return d.useEffect(()=>(ns(),()=>{ns()}),[h,g]),r.jsxs("aside",{className:h,ref:c,"data-side-panel-position":g,children:[r.jsxs("div",{className:"sidePanelHeader",children:[r.jsx("strong",{children:e}),r.jsx("button",{type:"button",className:"chromeButton",onClick:o,"aria-label":u(l.designSidePanelCloseLabel),children:"×"})]}),r.jsx("div",{className:"sidePanelBody",children:n.map(p=>r.jsx(vh,{id:p.id,title:p.title,badge:p.badge,isOpen:t===p.id,onToggle:a,children:p.children},p.id))})]})}function ns(){typeof window>"u"||window.dispatchEvent(new Event(mo))}let it=null,Rt=null,la=null;function Sl(){return it||(it=document.createElement("div"),it.className="tooltipPortal",document.body.appendChild(it)),it}function Zo(){la&&(clearTimeout(la),la=null)}function Sh(e){const t=e.getAttribute("data-tooltip-delay");if(!t)return 0;const a=Number(t);return Number.isFinite(a)&&a>0?a:0}function Lh(e){if(!e.isConnected)return!1;try{return e.matches(":hover")}catch{return!0}}function ss(e,t){const a=Sl();a.textContent=t,a.classList.add("tooltipVisible");const o=e.getBoundingClientRect(),n=6;a.style.left=`${o.left+o.width/2}px`,a.style.top=`${o.top-n}px`,a.style.transform="translate(-50%, -100%)";const s=a.getBoundingClientRect();s.top<4&&(a.style.top=`${o.bottom+n}px`,a.style.transform="translate(-50%, 0)"),a.getBoundingClientRect().right>window.innerWidth-4&&(a.style.left=`${window.innerWidth-4}px`,a.style.transform=s.top<4?"translate(-100%, 0)":"translate(-100%, -100%)")}function Rh(e){const t=e.getAttribute("data-tooltip");if(!t)return;Rt&&(clearTimeout(Rt),Rt=null),Zo();const a=Sh(e);if(a>0){la=setTimeout(()=>{la=null;const o=e.getAttribute("data-tooltip");o&&Lh(e)&&ss(e,o)},a);return}ss(e,t)}function Ph(){Zo(),Rt=setTimeout(()=>{Sl().classList.remove("tooltipVisible")},50)}function go(){Zo(),Rt&&(clearTimeout(Rt),Rt=null),it&&it.classList.remove("tooltipVisible")}function Ah(){go()}function xh(){function e(o){const n=o.target.closest?.("[data-tooltip]");n&&Rh(n)}function t(o){o.target.closest?.("[data-tooltip]")&&Ph()}function a(){go()}return document.addEventListener("mouseover",e,!0),document.addEventListener("mouseout",t,!0),document.addEventListener("click",a,!0),()=>{document.removeEventListener("mouseover",e,!0),document.removeEventListener("mouseout",t,!0),document.removeEventListener("click",a,!0),go(),it&&(it.remove(),it=null)}}function Ir(e,t={}){const a=t.pinnedOnly?'[data-side-panel-position="side"][data-side-panel-pinned="true"]':'[data-side-panel-position="side"]',n=Array.from(e.querySelectorAll(a)).filter(s=>Th(s)).map(s=>s.getBoundingClientRect()).filter(s=>s.width>0&&s.height>0).reduce((s,i)=>s==null?i.left:Math.min(s,i.left),null);return n==null?null:Math.round(n)}function Th(e){const t=e.checkVisibility;if(typeof t=="function")try{return t.call(e,{checkOpacity:!0,checkVisibilityCSS:!0,contentVisibilityAuto:!0})}catch{}if(typeof window>"u"||typeof window.getComputedStyle!="function")return!0;const a=window.getComputedStyle(e);if(a.display==="none"||a.visibility==="hidden")return!1;const o=Number(a.opacity);return!(Number.isFinite(o)&&o===0)}function Dh(e,t=!1){return e==="bubble"||t&&e==="auto"?"welcome-peek":"open"}function Nh(){return"collapsed"}function jh(e){return e==="drawer"?"open":"welcome-peek"}function Mh(e,t){return t<=e.lastQueuedToken?e:{lastQueuedToken:t,pendingToken:t}}function Eh(e,t){return t||e.pendingToken==null?{queue:e,shouldOpen:!1}:{queue:{...e,pendingToken:null},shouldOpen:!0}}function Ih(e){const t=Mh(e.queue,e.token),a=Eh(t,e.isHiddenRoute);return a.shouldOpen?{queue:a.queue,commit:{innerState:jh(e.mode),proactive:!0}}:{queue:a.queue,commit:null}}function Bh(e,t,a=!1){return e==="collapsed"?{nextState:Dh(t,a),persistSeen:!1}:e==="welcome-peek"?t==="bubble"||a&&t==="auto"?{nextState:"collapsed",persistSeen:!0}:{nextState:"open",persistSeen:!0}:{nextState:"collapsed",persistSeen:!1}}function Fh(e){return{nextState:"collapsed",persistSeen:e==="welcome-peek"}}function is(){return Nh()}function Oh(e,t,a=0,o="floating"){const n=ve(),[s,i]=d.useState(()=>is()),[c,u]=d.useState(!1),h=d.useRef({lastQueuedToken:0,pendingToken:null}),g=d.useRef(e);g.current=e;const p=n.pathname==="/setup",k=Pa(n.pathname),f=p||k&&o!=="docked",w=k&&o==="docked";d.useEffect(()=>{f&&(u(!1),i(y=>{const L=is();return y===L?y:L}))},[f]),d.useEffect(()=>{const y=Ih({queue:h.current,token:a,isHiddenRoute:f,mode:g.current});if(h.current=y.queue,!y.commit)return;const{innerState:L,proactive:N}=y.commit;u(N),i(T=>T===L?T:L)},[f,a]);const b=f?"hidden":s,m=d.useCallback(()=>{u(!1),i(y=>{const L=Bh(y,e,w);return L.persistSeen&&t(),L.nextState})},[e,t,w]),C=d.useCallback(()=>{u(!1),i(y=>{const L=Fh(y);return L.persistSeen&&t(),L.nextState})},[t]),v=d.useCallback(()=>{u(!1),i("collapsed"),t()},[t]);return{viewState:b,proactive:c,toggle:m,collapse:C,dismissWelcome:v}}const Ll={x:.03,y:.5};function Rl(e,t="floating"){return yl(e)?"hidden":Pa(e)?t==="docked"?"workspace":"hidden":ga(e)?"lobby":"workspace"}const ot=16,Wh=28,Ia=Wh/2,Ba=24,Uh=24,Hh=4;function ls(e){const t=e.currentX-e.startX,a=e.currentY-e.startY;return Math.hypot(t,a)>=Hh}function _h(e){const{surface:t,viewport:a,topChromeBottom:o,sidebarRight:n,rightBlockedLeft:s=null}=e,i=t==="workspace"&&n!=null?Math.max(ot,n+ot):ot,c=t==="lobby"&&o!=null?Math.max(ot,o+ot):ot,u=t==="workspace"&&s!=null?Math.min(a.width-ot,s-ot):a.width-ot,h=i+Ia,g=c+Ia,p=Math.max(h+1,u-Ia),k=Math.max(g+1,a.height-ot-Ia);return{left:h,top:g,right:p,bottom:k}}function Pl(e){const{anchor:t,viewport:a,safeArea:o}=e,n=t.x*a.width,s=t.y*a.height;return{x:Math.min(o.right,Math.max(o.left,n)),y:Math.min(o.bottom,Math.max(o.top,s))}}function fo(e){const{pointerX:t,pointerY:a,viewport:o}=e;return o.width<=0||o.height<=0?{...Ll}:{x:Math.min(1,Math.max(0,t/o.width)),y:Math.min(1,Math.max(0,a/o.height))}}function Al(e){return e??{...Ll}}function Gh(e){const t=fo({pointerX:e.pointerX,pointerY:e.pointerY,viewport:e.viewport}),a=Al(t),o=Pl({anchor:a,viewport:e.viewport,safeArea:e.safeArea}),n=fo({pointerX:o.x,pointerY:o.y,viewport:e.viewport});return e.undock?{placement:"floating",floatingAnchor:n}:{floatingAnchor:n}}function Kh(e){const{pointerX:t,pointerY:a,slotRect:o}=e;return o?t>=o.left-Ba&&t<=o.right+Ba&&a>=o.top-Ba&&a<=o.bottom+Ba:!1}function wo(e){return e==="lobby"?"lobby":e==="workspace"?"workspace":null}function qh(e){const{placement:t,anchor:a,surface:o,viewport:n,safeArea:s}=e;if(o==="hidden")return{kind:"hidden"};if(t==="docked"){const p=wo(o);return p?{kind:"docked",slot:p}:{kind:"hidden"}}const i=Al(a),{x:c,y:u}=Pl({anchor:i,viewport:n,safeArea:s}),h=fo({pointerX:c,pointerY:u,viewport:n}),g=Math.abs(h.x-i.x)>.001||Math.abs(h.y-i.y)>.001?"collision_reflow":null;return{kind:"floating",x:c,y:u,overrideReason:g}}const xl=d.createContext(null);function $h({guideCat:e,placement:t,floatingAnchor:a,sidecarMode:o,proactiveGreetingToken:n=0,onPersistSeen:s,onCommit:i,children:c}){const u=Oh(o,s,n,t),h=ve(),g=Rl(h.pathname,t),[p,k]=d.useState(()=>cs()),[f,w]=d.useState(null),[b,m]=d.useState(null),[C,v]=d.useState(null),y=d.useRef({lobby:null,workspace:null}),L=d.useRef({lobby:null,workspace:null}),N=d.useRef(null),T=d.useRef(!1),j=d.useRef(null),[A,R]=d.useState(null),P=d.useCallback(M=>{j.current=M,R(M)},[]);d.useEffect(()=>{if(typeof window>"u")return;const M=()=>k(cs());return window.addEventListener("resize",M),()=>window.removeEventListener("resize",M)},[]),d.useEffect(()=>{if(!(typeof document>"u"))return ps({document,selector:".lobbyTopBar",readValue:M=>M?Math.round(M.getBoundingClientRect().bottom):null,onChange:M=>{w(H=>H===M?H:M)}})},[h.pathname]),d.useEffect(()=>{if(!(typeof document>"u"))return ps({document,selector:"aside.sidebar",readValue:M=>M?Math.round(M.getBoundingClientRect().right):null,onChange:M=>{m(H=>H===M?H:M)}})},[h.pathname]),d.useEffect(()=>{if(typeof document>"u"||typeof window>"u")return;const M=()=>{const H=g==="workspace"?Ir(document):null;v(V=>V===H?V:H)};return M(),window.addEventListener("resize",M),window.addEventListener(mo,M),()=>{window.removeEventListener("resize",M),window.removeEventListener(mo,M)}},[g,h.pathname]);const I=d.useMemo(()=>_h({surface:g,viewport:p,topChromeBottom:f,sidebarRight:b,rightBlockedLeft:C}),[g,p,f,b,C]),O=d.useMemo(()=>qh({placement:t,anchor:a,surface:g,viewport:p,safeArea:I}),[t,a,g,p,I]),E=d.useMemo(()=>{if(!A||!A.activated)return O;const M=A.currentX-A.startX,H=A.currentY-A.startY;return A.mode==="floating"?{kind:"floating",x:Fa(A.basePillX+M,p.width),y:Fa(A.basePillY+H,p.height),overrideReason:null}:A.mode==="docked"&&!A.escaped?O:A.mode==="docked"&&A.escaped?{kind:"floating",x:Fa(A.basePillX+M,p.width),y:Fa(A.basePillY+H,p.height),overrideReason:null}:O},[O,A,p]),$=d.useMemo(()=>{const M=wo(g),H=t==="docked"&&M!=null,V=A?.mode==="floating"&&A.activated?A.overSlot:null;return{lobby:{active:H&&M==="lobby",preview:V==="lobby"},workspace:{active:H&&M==="workspace",preview:V==="workspace"}}},[t,g,A]),G=d.useCallback((M,H)=>{y.current[M]=H,L.current[M]=H?Fr(H):null},[]),ee=d.useCallback(()=>{Object.keys(y.current).forEach(M=>{const H=y.current[M];L.current[M]=H?Fr(H):null})},[]),B=d.useCallback(M=>{const H=y.current[M];return H?Fr(H):null},[]),q=d.useCallback((M,H,V=!1)=>Gh({pointerX:M,pointerY:H,viewport:p,safeArea:I,undock:V}),[I,p]),F=d.useCallback(M=>{i({placement:"docked"})},[i]),Q=d.useCallback(M=>{const H=ls({startX:M.startX,startY:M.startY,currentX:M.currentX,currentY:M.currentY}),V=M.basePillX+(M.currentX-M.startX),Se=M.basePillY+(M.currentY-M.startY);M.mode==="floating"&&M.overSlot?(F(M.overSlot),T.current=!0):M.mode==="floating"&&H?(i(q(V,Se)),T.current=!0):M.mode==="docked"&&M.escaped&&(i(q(V,Se,!0)),T.current=!0),P(null)},[F,i,q]),me=d.useCallback(M=>{const H=j.current;if(!H||M.pointerId!==H.pointerId)return;const V={...H,currentX:M.clientX,currentY:M.clientY};if(!H.activated){if(!ls({startX:H.startX,startY:H.startY,currentX:M.clientX,currentY:M.clientY})){P(V);return}V.activated=!0,typeof document<"u"&&document.body.classList.add(Br),ds(),u.collapse(),ee()}if(H.mode==="floating"){const Se=wo(g);if(Se){const z=L.current[Se];Kh({pointerX:M.clientX,pointerY:M.clientY,slotRect:z})?V.overSlot=Se:V.overSlot=null}else V.overSlot=null}else if(H.mode==="docked"){const Se=M.clientX-H.startX,z=M.clientY-H.startY;!H.escaped&&Math.hypot(Se,z)>=Uh&&(V.escaped=!0)}P(V)},[u,ee,P,g]),W=d.useCallback(M=>{const H=j.current;if(!H||M.pointerId!==H.pointerId)return;const V={...H,currentX:M.clientX,currentY:M.clientY};Q(V)},[Q]);d.useEffect(()=>{if(!A)return;const M=H=>{const V=j.current;!V||H.pointerId!==V.pointerId||P(null)};return window.addEventListener("pointermove",me),window.addEventListener("pointerup",W),window.addEventListener("pointercancel",M),()=>{window.removeEventListener("pointermove",me),window.removeEventListener("pointerup",W),window.removeEventListener("pointercancel",M)}},[A,me,W,P]);const D=!!A?.activated,_=d.useMemo(()=>g==="workspace"&&b!=null?Math.max(0,Math.round(b)):0,[g,b]);d.useEffect(()=>{if(!(typeof document>"u")&&D)return document.body.classList.add(Br),()=>{document.body.classList.remove(Br),ds()}},[D]);const J=d.useCallback(M=>{if(M.button!==0&&M.pointerType==="mouse")return;M.preventDefault(),M.stopPropagation(),T.current=!1,us(),v(Ir(document,{pinnedOnly:!0}));const H=M.currentTarget,V=H.getBoundingClientRect(),Se=V.left+V.width/2,z=V.top+V.height/2;try{H.setPointerCapture(M.pointerId)}catch{}P({mode:"floating",pointerId:M.pointerId,startX:M.clientX,startY:M.clientY,currentX:M.clientX,currentY:M.clientY,basePillX:Se,basePillY:z,activated:!1,overSlot:null,escaped:!1})},[]),X=d.useCallback(M=>{if(M.button!==0&&M.pointerType==="mouse")return;M.preventDefault(),M.stopPropagation(),T.current=!1,us(),v(Ir(document,{pinnedOnly:!0}));const H=M.currentTarget,V=H.getBoundingClientRect(),Se=V.left+V.width/2,z=V.top+V.height/2;try{H.setPointerCapture(M.pointerId)}catch{}P({mode:"docked",pointerId:M.pointerId,startX:M.clientX,startY:M.clientY,currentX:M.clientX,currentY:M.clientY,basePillX:Se,basePillY:z,activated:!1,overSlot:null,escaped:!1})},[]),oe=d.useCallback(()=>{const M=T.current;return T.current=!1,M},[]),we=d.useCallback(()=>{T.current=!1},[]),Ee=d.useCallback(()=>{if(E.kind!=="docked")return;const M=B(E.slot);if(!M)return;const H=(M.left+M.right)/2,V=(M.top+M.bottom)/2;i(q(H,V,!0))},[E,i,q,B]),Ae=d.useMemo(()=>({guideCat:e,projection:E,dockSlotState:$,pillRef:N,registerSlotRef:G,onFloatingPointerDown:J,onDockedPointerDown:X,consumePillClickSuppression:oe,clearPillClickSuppression:we,presentation:u,dragActive:D,panelOriginX:_,getDockSlotRect:B,undock:Ee}),[e,E,$,G,J,X,oe,we,u,D,_,B,Ee]);return r.jsx(xl.Provider,{value:Ae,children:c})}function en(){const e=d.useContext(xl);if(!e)throw new Error("useGuideCatPlacement requires GuideCatPlacementProvider");return e}function zh(e){const{registerSlotRef:t}=en();return d.useCallback(a=>{t(e,a)},[t,e])}function cs(){return typeof window>"u"?{width:0,height:0}:{width:window.innerWidth,height:window.innerHeight}}function Fa(e,t){return t<=0?e:Math.min(t,Math.max(0,e))}function ds(){Ah()}const Tl=Symbol.for("cats.guideCat.dismissTransientChrome");function Vh(e){return!!e[Tl]}function us(){if(typeof document>"u"||typeof MouseEvent>"u")return;const e=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:typeof window<"u"?window:void 0,button:0});e[Tl]=!0,document.body.dispatchEvent(e)}const Br="guideCatDragging";function Fr(e){const t=e.getBoundingClientRect();return{left:t.left,top:t.top,right:t.right,bottom:t.bottom}}function ps(e){const{document:t,selector:a,readValue:o,onChange:n}=e,s=globalThis.ResizeObserver,i=globalThis.MutationObserver,c=t.body??t.documentElement;if(!c)return n(o(t.querySelector(a))),()=>{};let u=null,h=null,g=null;const p=()=>{h?.disconnect(),g?.disconnect(),h=null,g=null},k=()=>{n(o(u))},f=()=>{u&&typeof s=="function"&&(h=new s(k),h.observe(u)),u&&typeof i=="function"&&(g=new i(k),g.observe(u,{attributes:!0,attributeFilter:["class","style"]}))},w=()=>{const m=t.querySelector(a);return m===u?!1:(p(),u=m,f(),k(),!0)};let b=null;return typeof i=="function"&&(b=new i(()=>{u!=null&&(u.isConnected??!0)||w()}),b.observe(c,{childList:!0,subtree:!0})),w()||k(),()=>{p(),b?.disconnect()}}const mr="cats.guide-cat-ui-prefs",Dl=1,Ht={sidecarSeen:!1,sidecarMode:"auto",placement:"floating",floatingAnchor:null},hs=new Set;function fa(){const e=globalThis;return typeof e.addEventListener!="function"||typeof e.removeEventListener!="function"?null:e}function Yh(e,t){(fa()===null?d.useEffect:d.useLayoutEffect)(e,t)}function Qh(e){if(typeof e!="object"||e===null)return null;const t=e,a=t.x,o=t.y;return typeof a!="number"||typeof o!="number"||!Number.isFinite(a)||!Number.isFinite(o)?null:{x:Math.min(1,Math.max(0,a)),y:Math.min(1,Math.max(0,o))}}function Jh(e){return e==="auto"||e==="drawer"||e==="bubble"?e:Ht.sidecarMode}function Xh(e){return e==="floating"||e==="docked"?e:Ht.placement}function Zh(e,t){return{sidecarSeen:t.sidecarSeen??e.sidecarSeen,sidecarMode:t.sidecarMode??e.sidecarMode,placement:t.placement??e.placement,floatingAnchor:t.floatingAnchor!==void 0?t.floatingAnchor:e.floatingAnchor}}function tn(e){if(!e)return null;try{const t=JSON.parse(e);if(typeof t!="object"||t===null)return null;const a=t;return a.version===Dl?{sidecarSeen:a.sidecarSeen===!0,sidecarMode:Jh(a.sidecarMode),placement:Xh(a.placement),floatingAnchor:Qh(a.floatingAnchor)}:null}catch{return null}}function Nl(e){hs.has(e)||(hs.add(e),globalThis.console?.warn?.(`[guide-cat-ui-prefs] Ignoring unsupported or malformed stored prefs during ${e}.`))}function em(e){const t={version:Dl,sidecarSeen:e.sidecarSeen,sidecarMode:e.sidecarMode,placement:e.placement,floatingAnchor:e.floatingAnchor?{...e.floatingAnchor}:null};return JSON.stringify(t)}function tm(e){if(!e)return null;try{return tn(e.getItem(mr))}catch{return null}}function am(e){if(!e)return null;try{return e.getItem(mr)}catch{return null}}function jl(e,t){if(!e)return{persisted:!1,prefs:t};try{e.setItem(mr,em(t));const a=tm(e);if(a)return{persisted:!0,prefs:a}}catch{}return{persisted:!1,prefs:t}}function rm(e){const{storage:t}=e,a=am(t),o=tn(a);if(o)return{prefs:o,source:"local",persisted:!0};if(a!==null)return Nl("bootstrap"),{prefs:{...Ht},source:"defaults",persisted:!1};const n={...Ht},s=jl(t,n).persisted;return{prefs:n,source:"defaults",persisted:s}}function Or(e,t){return e.sidecarSeen===t.sidecarSeen&&e.sidecarMode===t.sidecarMode&&e.placement===t.placement&&e.floatingAnchor?.x===t.floatingAnchor?.x&&e.floatingAnchor?.y===t.floatingAnchor?.y}class om{constructor(t){this.storage=t}prefs={...Ht};hydrated=!1;listeners=new Set;storageListening=!1;getSnapshot=()=>this.prefs;isHydrated(){return this.hydrated}subscribe=t=>(this.listeners.add(t),this.ensureStorageListener(),()=>{this.listeners.delete(t),this.listeners.size===0&&this.teardownStorageListener()});ensureHydrated(){if(this.hydrated)return;const t=rm({storage:this.storage});this.prefs=t.prefs,this.hydrated=!0}update(t){this.hydrated||this.ensureHydrated();const a=Zh(this.prefs,t);if(Or(this.prefs,a))return;const o=jl(this.storage,a).prefs;this.prefs=o,this.hydrated=!0,this.emit()}emit(){this.listeners.forEach(t=>t())}ensureStorageListener(){const t=fa();!t||this.storageListening||(t.addEventListener?.("storage",this.handleStorageEvent),this.storageListening=!0)}teardownStorageListener(){const t=fa();!t||!this.storageListening||(t.removeEventListener?.("storage",this.handleStorageEvent),this.storageListening=!1)}handleStorageEvent=t=>{if(t.key!==mr)return;if(t.newValue===null){const o={...Ht};if(Or(this.prefs,o))return;this.prefs=o,this.hydrated=!0,this.emit();return}const a=tn(t.newValue);if(!a){Nl("storage-event");return}Or(this.prefs,a)||(this.prefs=a,this.hydrated=!0,this.emit())}}function Ml(e){return new om(e)}let Wr=null;function nm(){return Wr||(Wr=Ml(fa()?.localStorage??null)),Wr}function an(e={}){const{hydrate:t=!0}=e,a=d.useMemo(()=>fa()===null?Ml(null):nm(),[]),[,o]=d.useState(0);Yh(()=>{!t||a.isHydrated()||(a.ensureHydrated(),o(i=>i+1))},[t,a]);const n=d.useSyncExternalStore(a.subscribe,a.getSnapshot,a.getSnapshot),s=d.useCallback(i=>{a.update(i)},[a]);return{prefs:n,hydrated:t&&a.isHydrated(),update:s}}const Va=["claude","codex","antigravity","grok","cline","cursor","copilot","opencode","kilo","goose","pi","auggie","junie","kiro","ollama","openclaw"],sm={openclaw:[{value:"openclaw-coder",label:"openclaw-coder (default)",default:!0}],claude:[{value:"opus",label:"Opus 4.7 with 1M context",default:!0},{value:"sonnet",label:"Sonnet 4.6"},{value:"haiku",label:"Haiku 4.5"}],codex:[{value:"gpt-5.4",label:"gpt-5.4",default:!0},{value:"gpt-5.4-mini",label:"gpt-5.4-mini"},{value:"gpt-5.3-codex",label:"gpt-5.3-codex"},{value:"gpt-5.3-codex-spark",label:"gpt-5.3-codex-spark"},{value:"gpt-5.2-codex",label:"gpt-5.2-codex"},{value:"gpt-5.2",label:"gpt-5.2"},{value:"gpt-5.1-codex-max",label:"gpt-5.1-codex-max"},{value:"gpt-5.1-codex-mini",label:"gpt-5.1-codex-mini"}],antigravity:[{value:"antigravity-default",label:"Antigravity default",default:!0}],grok:[{value:"grok-4.5",label:"grok-4.5 (default)",default:!0}],cline:[{value:"cline-default",label:"Cline default",default:!0}],copilot:[{value:"gpt-5.4",label:"gpt-5.4 (default)",default:!0},{value:"claude-opus-4-6",label:"claude-opus-4-6"},{value:"gemini-3-pro-preview",label:"gemini-3-pro-preview"}],opencode:[{value:"opencode-go/glm-5",label:"glm-5 (default)",default:!0},{value:"opencode-go/kimi-k2.5",label:"kimi k2.5"},{value:"opencode-go/minimax-m2.5",label:"minimax m2.5"}],kilo:[{value:"kilo/openai/gpt-5.4",label:"gpt-5.4 (default)",default:!0},{value:"kilo/openai/gpt-5.4-mini",label:"gpt-5.4-mini"},{value:"kilo/anthropic/claude-opus-4.6",label:"claude-opus-4.6"},{value:"kilo/anthropic/claude-sonnet-4.6",label:"claude-sonnet-4.6"},{value:"kilo/google/gemini-3.1-pro-preview",label:"gemini-3.1-pro-preview"},{value:"kilo/z-ai/glm-5",label:"glm-5"}],auggie:[{value:"gpt-5.4",label:"gpt-5.4 (default)",default:!0},{value:"claude opus 4.6",label:"claude opus 4.6"},{value:"sonnet 4.6",label:"sonnet 4.6"}],pi:[{value:"openai-codex/gpt-5.4",label:"openai-codex gpt-5.4 (default)",default:!0}],junie:[{value:"Gemini 3 Flash",label:"Gemini 3 Flash (default)",default:!0},{value:"Claude Opus 4.6",label:"Claude Opus 4.6"},{value:"Claude Opus 4.7",label:"Claude Opus 4.7"},{value:"Claude Sonnet 4.6",label:"Claude Sonnet 4.6"},{value:"Gemini 3.1 Flash Lite",label:"Gemini 3.1 Flash Lite"},{value:"Gemini 3.1 Pro Preview",label:"Gemini 3.1 Pro Preview"},{value:"GPT-5",label:"GPT-5"},{value:"GPT-5.2",label:"GPT-5.2"},{value:"GPT-5.3-codex",label:"GPT-5.3-codex"},{value:"GPT-5.4",label:"GPT-5.4"},{value:"Grok 4.1 Fast Reasoning",label:"Grok 4.1 Fast Reasoning"}],cursor:[{value:"auto",label:"auto"},{value:"composer-2-fast",label:"Composer 2 Fast (default)",default:!0},{value:"gpt-5.4",label:"gpt-5.4"},{value:"claude-opus-4-6",label:"claude 4.6 opus"},{value:"gemini-3.1-pro",label:"gemini 3.1 pro"}],kiro:[{value:"claude-sonnet-4.5",label:"claude-sonnet-4.5 (default)",default:!0},{value:"deepseek-3.2",label:"deepseek-3.2"},{value:"minimax-m2.1",label:"minimax-m2.1"}],goose:[{value:"openai/gpt-5-codex",label:"openai/gpt-5-codex (default)",default:!0},{value:"openai/gpt-5",label:"openai/gpt-5"}],ollama:[{value:"qwen2.5-coder:7b",label:"qwen2.5-coder:7b (default)",default:!0}]},im={claude:[{id:"native",label:"cli/native",target:"cli/native",backend:"cli",default:!0},{id:"sdk",label:"agent/sdk",target:"agent/sdk",backend:"agent"},{id:"sonnet",label:"api/sonnet",target:"api/sonnet",backend:"api"}],codex:[{id:"native",label:"cli/native",target:"cli/native",backend:"cli",default:!0},{id:"main",label:"api/main",target:"api/main",backend:"api"}],antigravity:[{id:"native",label:"cli/native",target:"cli/native",backend:"cli",default:!0}],grok:[{id:"native",label:"cli/native",target:"cli/native",backend:"cli",default:!0}],cline:[{id:"native",label:"cli/native",target:"cli/native",backend:"cli",default:!0}],cursor:[{id:"native",label:"cli/native",target:"cli/native",backend:"cli",default:!0}],copilot:[{id:"native",label:"cli/native",target:"cli/native",backend:"cli",default:!0}],opencode:[{id:"native",label:"cli/native",target:"cli/native",backend:"cli",default:!0}],kilo:[{id:"native",label:"cli/native",target:"cli/native",backend:"cli",default:!0}],goose:[{id:"native",label:"cli/native",target:"cli/native",backend:"cli",default:!0}],pi:[{id:"native",label:"cli/native",target:"cli/native",backend:"cli",default:!0}],auggie:[{id:"native",label:"cli/native",target:"cli/native",backend:"cli",default:!0}],junie:[{id:"native",label:"cli/native",target:"cli/native",backend:"cli",default:!0}],kiro:[{id:"native",label:"cli/native",target:"cli/native",backend:"cli",default:!0}],ollama:[{id:"local",label:"local/local",target:"local/local",backend:"local",default:!0}],openclaw:[{id:"gateway",label:"agent/gateway",target:"agent/gateway",backend:"agent",default:!0}]},lm=Object.fromEntries(Object.entries(sm).map(([e,t])=>[e,t.map(a=>({...a}))]));function ue(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function El(e){const t=ue(e);return t?ue(t.catalog)??t:null}function ae(e){return typeof e=="string"&&e.trim().length>0?e:null}function ea(e){return e==="none"||e==="derived"||e==="native"||e==="unknown"?e:"unknown"}function cm(e){return e==="none"||e==="final"||e==="chunk"||e==="line"||e==="token"||e==="unknown"?e:"unknown"}function dm(e){return e==="final_message"||e==="event_tape"||e==="content_blocks"||e==="unknown"?e:"unknown"}function um(e){const t=ue(e);if(!t)return null;const a=ue(t.normalizedStream),o=ue(a?.text),n=ue(t.transcript),s=ue(t.presentation),i=ue(t.validation),c=ue(i?.observed);return{normalizedStream:{text:{mode:cm(o?.mode),stepwise:o?.stepwise===!0},toolUse:ea(a?.toolUse),toolResult:ea(a?.toolResult),progress:ea(a?.progress),reasoning:ea(a?.reasoning)},transcript:{contentBlocks:ea(n?.contentBlocks)},presentation:{recommended:dm(s?.recommended)},notes:De(t.notes),...i?{validation:{artifactId:typeof i.artifactId=="string"?i.artifactId:"",capturedAt:typeof i.capturedAt=="string"?i.capturedAt:"",transport:typeof i.transport=="string"?i.transport:"",...typeof i.runtimeMode=="string"?{runtimeMode:i.runtimeMode}:{},executionStatus:i.executionStatus==="failed"?"failed":"completed",observed:{incrementalText:c?.incrementalText===!0,toolUse:c?.toolUse===!0,toolResult:c?.toolResult===!0,progress:c?.progress===!0,finalResult:c?.finalResult===!0}}}:{}}}function ko(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function De(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function Oa(e){const t=ue(e);if(!t)return;const a=Object.entries(t).filter(([,o])=>ko(o));return a.length>0?Object.fromEntries(a):void 0}function ms(e){return e==="supported"||e==="unavailable"||e==="available"||e==="preview"||e==="deprecated"?e:void 0}function pm(e){return e==="boolean"||e==="enum"||e==="number"||e==="string"?e:"string"}function hm(e){return e==="session_default"||e==="request"||e==="both"?e:"session_default"}function mm(e){return e==="auto"||e==="explicit"?e:"explicit"}function gs(e){if(!Array.isArray(e))return;const t=e.flatMap(a=>{if(ko(a))return[{value:a,label:String(a)}];const o=ue(a);return!o||!ko(o.value)?[]:[{value:o.value,label:ae(o.label)??String(o.value),...ae(o.description)?{description:ae(o.description)}:{},...De(o.applicableEntryIds).length>0?{applicableEntryIds:De(o.applicableEntryIds)}:{}}]});return t.length>0?t:void 0}function gm(e){return Va.includes(e)}function Bt(e){const t=e?.trim().toLowerCase();if(!t)return null;if(Va.includes(t))return t;if(t.endsWith("-cli")){const a=t.slice(0,-4);if(Va.includes(a))return a}return null}function Il(e){const t=Bt(e)??e.trim();return t==="openclaw"?"OpenClaw":t.charAt(0).toUpperCase()+t.slice(1)}function rn(e){const t=Bt(e);return t?lm[t]??[]:[]}function on(e,t){const a=t?.trim();if(!a)return null;if((Bt(e)??e)==="claude"){const n=a.toLowerCase();if(n==="claude-opus-4-6"||n==="claude-opus-4.6"||n==="opus")return"opus";if(n==="claude-sonnet-4-6"||n==="claude-sonnet-4.6"||n==="sonnet")return"sonnet";if(n==="claude-haiku-4-5"||n==="claude-haiku-4.5"||n==="haiku")return"haiku"}return a}function Bl(e){const t=rn(e);return t.find(a=>a.default)?.value??t[0]?.value??""}function gr(e){const t=Bt(e);return t?im[t]??[]:[]}function nn(e){const t=gr(e);return t.find(a=>a.default)?.id??t[0]?.id??null}function Fl(e){const t=gr(e);return t.find(a=>a.default)?.backend??t[0]?.backend??null}function fm(){return Va.map(e=>({id:e,label:Il(e),defaultModel:Bl(e)||null,defaultInstance:nn(e),defaultBackend:Fl(e),instances:gr(e),modelsPath:`/api/providers/${e}/models`}))}function sn(e){return e.defaultModel||e.models.find(t=>t.default)?.id||e.models[0]?.id||""}function Ol(e,t={}){return{provider:e,backend:null,instance:t.instance??null,defaultModel:Bl(e)||null,source:"static",cache:null,models:rn(e).map(a=>({id:a.value,label:a.label,default:a.default})),warnings:t.warnings??[]}}function wm(e,t={}){const a=Ol(e,t),o=sn(a)||null;return{provider:a.provider,backend:a.backend,instance:a.instance,defaultModel:o,source:a.source,cache:a.cache,entries:a.models.map(n=>({...n})),presets:[],controls:[],defaultSelection:o?{entryId:o,entryMode:"explicit"}:null,support:{tier:"entry_only",notes:[]},warnings:[...a.warnings]}}function km(e){const t=sn(e)||null;return{provider:e.provider,backend:e.backend,instance:e.instance,defaultModel:t,source:e.source,cache:e.cache,entries:e.models.map(a=>({...a})),presets:[],controls:[],defaultSelection:t?{entryId:t,entryMode:"explicit"}:null,support:{tier:"entry_only",notes:[]},warnings:[...e.warnings]}}function bm(e,t){const a=El(e)??{},o=a.source,n=o==="dynamic"||o==="config"||o==="static"?o:"static",s=ue(a.cache),i=Array.isArray(a.models)?a.models:[];return{provider:ae(a.provider)??t,backend:ae(a.backend),instance:ae(a.instance),defaultModel:ae(a.defaultModel),source:n,cache:s?{servedFromCache:!!s.servedFromCache,cachedAt:ae(s.cachedAt),ttlSec:typeof s.ttlSec=="number"?s.ttlSec:null}:null,models:i.map(c=>ue(c)).filter(c=>c!==null).map(c=>({id:ae(c.id)??"",label:ae(c.label)??ae(c.id)??"",default:!!c.default,status:ae(c.status)??void 0})).filter(c=>c.id.length>0),warnings:Array.isArray(a.warnings)?a.warnings.filter(c=>typeof c=="string"):[]}}function ym(e,t){const a=El(e)??{},o=a.source,n=o==="dynamic"||o==="config"||o==="static"?o:"static",s=ue(a.cache),i=Array.isArray(a.entries)?a.entries:[],c=Array.isArray(a.presets)?a.presets:[],u=Array.isArray(a.controls)?a.controls:[],h=ue(a.support),g=ue(a.defaultSelection);return{provider:ae(a.provider)??t,backend:ae(a.backend),instance:ae(a.instance),defaultModel:ae(a.defaultModel),source:n,cache:s?{servedFromCache:!!s.servedFromCache,cachedAt:ae(s.cachedAt),ttlSec:typeof s.ttlSec=="number"?s.ttlSec:null}:null,entries:i.map(p=>ue(p)).filter(p=>p!==null).map(p=>({id:ae(p.id)??"",label:ae(p.label)??ae(p.id)??"",default:!!p.default,...ae(p.status)?{status:ae(p.status)}:{},...De(p.capabilityTags).length>0?{capabilityTags:De(p.capabilityTags)}:{},...ue(p.limits)?{limits:{...typeof ue(p.limits)?.contextWindowTokens=="number"?{contextWindowTokens:Number(ue(p.limits)?.contextWindowTokens)}:typeof ue(p.limits)?.contextWindow=="number"?{contextWindowTokens:Number(ue(p.limits)?.contextWindow)}:{},...typeof ue(p.limits)?.maxOutputTokens=="number"?{maxOutputTokens:Number(ue(p.limits)?.maxOutputTokens)}:{}}}:{},...De(p.notes).length>0?{notes:De(p.notes)}:{}})).filter(p=>p.id.length>0),presets:c.map(p=>ue(p)).filter(p=>p!==null).map(p=>({id:ae(p.id)??"",label:ae(p.label)??ae(p.id)??"",...ae(p.description)?{description:ae(p.description)}:{},...ms(p.availability)?{availability:ms(p.availability)}:{},...De(p.applicableEntryIds).length>0?{applicableEntryIds:De(p.applicableEntryIds)}:{},...ae(p.preferredEntryId)?{preferredEntryId:ae(p.preferredEntryId)}:{},...Oa(p.controlDefaults)?{controlDefaults:Oa(p.controlDefaults)}:{},...De(p.warnings).length>0?{warnings:De(p.warnings)}:{}})).filter(p=>p.id.length>0),controls:u.map(p=>ue(p)).filter(p=>p!==null).map(p=>({key:ae(p.key)??"",label:ae(p.label)??ae(p.key)??"",...ae(p.description)?{description:ae(p.description)}:{},kind:pm(p.kind),scope:hm(p.scope),...gs(p.values)?{values:gs(p.values)}:{},...typeof p.minimum=="number"?{minimum:p.minimum}:{},...typeof p.maximum=="number"?{maximum:p.maximum}:{},...typeof p.step=="number"?{step:p.step}:{},...De(p.applicableEntryIds).length>0?{applicableEntryIds:De(p.applicableEntryIds)}:{},...De(p.semanticTags).length>0?{semanticTags:De(p.semanticTags)}:{}})).filter(p=>p.key.length>0),defaultSelection:g?{...ae(g.entryId)?{entryId:ae(g.entryId)}:{},entryMode:mm(g.entryMode),...ae(g.presetId)?{presetId:ae(g.presetId)}:{},...Oa(g.controls)?{controls:Oa(g.controls)}:{}}:null,support:{tier:h?.tier==="full"||h?.tier==="entry_only"||h?.tier==="read_only"?h.tier:"entry_only",notes:De(h?.notes)},warnings:Array.isArray(a.warnings)?a.warnings.filter(p=>typeof p=="string"):[]}}const ln=new Map;function vm(e){const t=e.trim().toLowerCase();if(t.endsWith("-cli")){const o=t.slice(0,-4);if(gm(o))return{provider:o,backendSuffix:"-CLI"}}return{provider:Bt(t)??e.trim(),backendSuffix:null}}function fr(e){return e.replace(/\s*\((?:default|recommended)\)\s*/giu," ").trim()}function fs(e){const t=e?.toLowerCase();return t==="cli"?"-CLI":t==="agent"?"-AGENT":t==="api"?"-API":t==="local"?"-LOCAL":""}function Cm(e,t){if(!t)return"";const a=t.toLowerCase();if(a.startsWith("cli/")||a==="cli")return"-CLI";if(a.startsWith("agent/")||a==="agent")return"-AGENT";if(a.startsWith("api/")||a==="api")return"-API";if(a.startsWith("local/")||a==="local")return"-LOCAL";if(a==="default")return fs(Fl(e));const o=gr(e).find(i=>i.id===t),n=fs(o?.backend);if(n)return n;const s=o?.target?.toLowerCase();return s?.startsWith("cli/")?"-CLI":s?.startsWith("agent/")?"-AGENT":s?.startsWith("api/")?"-API":s?.startsWith("local/")?"-LOCAL":""}function Sm(e,t){if(!t)return null;const a=on(e,t)??t,o=rn(e).find(s=>s.value===a)?.label,n=e==="claude"&&(a==="opus"||a==="sonnet"||a==="haiku")?a.charAt(0).toUpperCase()+a.slice(1):a;return fr(o??n)}function Lm(e){const t=e?.trim();return t?fr(t):null}function Wl(e){const t=e?.trim();return t?fr(t):null}function Rm(e){return JSON.stringify([typeof e,e])}function Pm(e){if(!e)return"";const t=Object.entries(e).filter(([,a])=>a!==""&&a!==!1).sort(([a],[o])=>a.localeCompare(o)).map(([a,o])=>[a,Rm(o)]);return t.length>0?JSON.stringify(t):""}function Ul(e){const t=Bt(e.provider)??e.provider.trim().toLowerCase(),a=(e.instance?.trim()||nn(e.provider)||"").toLowerCase(),o=(on(e.provider,e.model)??e.model?.trim()??"").toLowerCase();return JSON.stringify([t,a,o,Pm(e.controls)])}function Am(){ln.clear()}function xm(e){return _l(e)}function Hl(e){const t=Wl(e.executionLabel);return t?(ln.set(Ul({provider:e.provider,instance:e.instance,model:e.model,controls:e.modelSelection?.controls??null}),t),t):null}function _l(e){return ln.get(Ul({provider:e.provider,instance:e.instance,model:e.model,controls:e.modelSelection?.controls??null}))??null}const Tm={max:"Max",xhigh:"xHigh",high:"High",medium:"Medium",low:"Low",none:"None"};function Dm(e){return typeof e=="boolean"?e?"On":"Off":typeof e=="number"?String(e):Tm[e]??e.replace(/[_-]/g," ").replace(/\b\w/g,t=>t.toUpperCase())}function Gl(e,t){if(!e)return[];const a=new Map((t??[]).map(o=>[o.key,o]));return Object.entries(e).filter(([,o])=>o!==""&&o!==!1).map(([o,n])=>{const i=a.get(o)?.values?.find(c=>c.value===n);return fr(i?.label??Dm(n))}).filter(o=>o.length>0)}function cn(e,t,a,o,n,s){const i=vm(e),c=o?.trim()||Il(i.provider),u=t?.trim()||nn(i.provider),h=i.backendSuffix??Cm(i.provider,u),g=Lm(s)??Sm(i.provider,a),p=n&&n.length>0?` · ${n.join(" · ")}`:"";return c+h+(g?` · ${g}`:"")+p}function wr(e){const t=Hl({provider:e.provider,instance:e.instance,model:e.model,modelSelection:e.modelSelection??null,executionLabel:e.executionLabel??null});if(t)return t;const a=_l({provider:e.provider,instance:e.instance,model:e.model,modelSelection:e.modelSelection??null});if(a)return a;const o=e.controlLabels??Gl(e.modelSelection?.controls,e.catalogControls);return cn(e.provider,e.instance,e.model,e.providerLabel,o,e.modelLabelOverride)}function Nm(e){const t=e.defaultExecutionTarget;return wr({provider:t.provider,instance:t.instance??null,model:t.model??null,modelSelection:e.defaultModelSelection??null,executionLabel:e.executionLabel??null})}function ES(e){const t=e.execution?.target;return t?.provider?wr({provider:t.provider,instance:t.instance??null,model:t.model??null,modelSelection:e.execution?.modelSelection??null,executionLabel:e.executionLabel??null}):Wl(e.executionLabel)}function Kl(e,t){return t?`${e} · ${t}`:e}const jm="Catlas",Mm=[];function ws(e){return e.trim().toLowerCase()}function Em(e){return Array.isArray(e)?e.map(t=>ws(t)).filter(t=>t.length>0):typeof e!="string"?[]:e.split(",").map(t=>ws(t.split(";",1)[0]??"")).filter(t=>t.length>0)}function Im(){const e=typeof globalThis=="object"&&globalThis!==null&&"navigator"in globalThis?globalThis.navigator:void 0;return e?Array.isArray(e.languages)&&e.languages.length>0?e.languages:typeof e.language=="string"?e.language:null:null}function Bm(e){const t=Em(e);for(const a of t){const o=Mm.find(n=>n.prefixes.some(s=>a===s||a.startsWith(`${s}-`)));if(o)return o.name}return jm}function ct(){return Bm(Im())}function wa(e){return e==null||e==="active"}const Ya=new URL("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20120%20120'%20width='100%25'%20height='100%25'%3e%3cdefs%3e%3cclipPath%20id='circle-clip'%3e%3ccircle%20cx='60'%20cy='60'%20r='60'%20/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23circle-clip)'%3e%3c!--%20Background%20--%3e%3crect%20width='120'%20height='120'%20fill='%238B7E74'%20/%3e%3c!--%20Ears%20--%3e%3cpolygon%20points='25,25%2045,50%2025,60'%20fill='%23F2994A'%20/%3e%3cpolygon%20points='95,25%2075,50%2095,60'%20fill='%23F2994A'%20/%3e%3cpolygon%20points='28,32%2040,50%2030,55'%20fill='%23FDE1D3'%20/%3e%3cpolygon%20points='92,32%2080,50%2090,55'%20fill='%23FDE1D3'%20/%3e%3c!--%20Head%20--%3e%3cellipse%20cx='60'%20cy='65'%20rx='45'%20ry='35'%20fill='%23F2994A'%20/%3e%3c!--%20Face%20marking%20(white%20area)%20--%3e%3cpath%20d='M%2060,65%20Q%2020,65%2025,85%20Q%2060,110%2095,85%20Q%20100,65%2060,65%20Z'%20fill='%23FFFFFF'%20/%3e%3c!--%20Eyes%20--%3e%3ccircle%20cx='42'%20cy='60'%20r='6'%20fill='%23333333'%20/%3e%3ccircle%20cx='78'%20cy='60'%20r='6'%20fill='%23333333'%20/%3e%3c!--%20Catchlights%20--%3e%3ccircle%20cx='44'%20cy='58'%20r='2'%20fill='%23FFFFFF'%20/%3e%3ccircle%20cx='80'%20cy='58'%20r='2'%20fill='%23FFFFFF'%20/%3e%3c!--%20Nose%20--%3e%3cpolygon%20points='56,72%2064,72%2060,77'%20fill='%23EB5757'%20/%3e%3c!--%20Mouth%20--%3e%3cpath%20d='M%2052,80%20Q%2060,85%2068,80'%20fill='none'%20stroke='%23333333'%20stroke-width='2'%20stroke-linecap='round'%20/%3e%3c!--%20Whiskers%20--%3e%3cline%20x1='15'%20y1='65'%20x2='30'%20y2='68'%20stroke='%23333333'%20stroke-width='1.5'%20stroke-linecap='round'%20opacity='0.5'%20/%3e%3cline%20x1='12'%20y1='72'%20x2='28'%20y2='72'%20stroke='%23333333'%20stroke-width='1.5'%20stroke-linecap='round'%20opacity='0.5'%20/%3e%3cline%20x1='105'%20y1='65'%20x2='90'%20y2='68'%20stroke='%23333333'%20stroke-width='1.5'%20stroke-linecap='round'%20opacity='0.5'%20/%3e%3cline%20x1='108'%20y1='72'%20x2='92'%20y2='72'%20stroke='%23333333'%20stroke-width='1.5'%20stroke-linecap='round'%20opacity='0.5'%20/%3e%3c!--%20Guide%20Scarf/Bandana%20--%3e%3cpath%20d='M%2020,85%20Q%2060,105%20100,85%20L%20110,120%20L%2010,120%20Z'%20fill='%232D9CDB'%20/%3e%3cpath%20d='M%2060,100%20L%2075,120%20L%2045,120%20Z'%20fill='%232285C2'%20/%3e%3ccircle%20cx='60'%20cy='95'%20r='7'%20fill='%23F2C94C'%20/%3e%3c/g%3e%3c/svg%3e",import.meta.url).href,ks=14,Fm=36,Om=20,Wm=20;function Um(e,t="floating"){const a=Rl(e,t);return a==="workspace"?"product":a}function bs({name:e,tooltip:t,unreadCount:a,onClick:o,onDismissClick:n,onPointerDown:s,style:i,className:c,dragging:u}){const{t:h}=U(),g=ct();return r.jsxs("div",{className:c??"guideCatPillWrap","data-dragging":u?"true":"false",style:i,children:[r.jsxs("button",{type:"button",className:"guideCatPill",onPointerDown:s,onClick:o,"aria-label":h(l.sharedGuideCatPillOpenLabel,{guideCatName:g}),"data-tooltip":t,"data-tooltip-delay":"1000",children:[r.jsx(ql,{className:"guideCatPillAvatar"}),a>0?r.jsx("span",{className:"guideCatPillBadge",children:a}):null]}),n&&!u?r.jsx("button",{type:"button",className:"guideCatPillDismiss",onClick:p=>{p.stopPropagation(),n()},"aria-label":h(l.sharedGuideCatPillDisableLabel),children:"✕"}):null]})}function Hm({ownerDisplayName:e,onAction:t,onDismiss:a,style:o,anchor:n="anchor-left"}){const{t:s}=U();return r.jsxs("div",{className:`guideCatPeek guideCatPeek--${n}`,style:o,children:[r.jsx("p",{className:"guideCatPeekGreeting",children:s(l.sharedGuideCatWelcomeGreeting,{ownerDisplayName:e})}),r.jsxs("div",{className:"guideCatPeekActions",children:[r.jsx(Ut,{route:"/chat/new",onAction:t,labelKey:l.sharedGuideCatWelcomeStartChat}),r.jsx(Ut,{route:"/settings/cats",onAction:t,labelKey:l.sharedGuideCatWelcomeMeetCats}),r.jsx(Ut,{route:"/lobby",onAction:t,labelKey:l.sharedGuideCatWelcomeExploreProducts})]}),a?r.jsx("button",{type:"button",className:"guideCatPeekDismiss",onClick:a,children:s(l.sharedGuideCatWelcomeHideNow)}):null]})}function Ut({route:e,onAction:t,labelKey:a,className:o="guideCatPeekAction"}){const{t:n}=U();return r.jsx("button",{type:"button",className:o,onClick:()=>t(e),children:n(a)})}function _m({name:e,tooltip:t,ownerDisplayName:a,onAction:o,onClose:n,style:s,surfaceMode:i}){const{t:c}=U(),u=ct();return r.jsxs("div",{className:i==="lobby"?"guideCatPanel guideCatPanel--lobby":"guideCatPanel guideCatPanel--product",style:s,children:[r.jsxs("div",{className:"guideCatPanelHeader","data-tooltip":t,"data-tooltip-delay":"1000",children:[r.jsx(ql,{className:"guideCatPanelAvatar"}),r.jsx("span",{className:"guideCatPanelName",children:u}),r.jsx("button",{type:"button",className:"guideCatPanelClose",onClick:n,"aria-label":c(l.sharedCommonClose),children:"✕"})]}),r.jsxs("div",{className:"guideCatPanelBody",children:[r.jsx("p",{className:"guideCatPanelGreeting",children:c(l.sharedGuideCatPanelGreeting,{ownerDisplayName:a,guideCatName:u})}),r.jsxs("div",{className:"guideCatPanelActions",children:[r.jsx(Ut,{route:"/chat/new",onAction:o,labelKey:l.sharedGuideCatWelcomeStartChat,className:"guideCatPanelAction"}),r.jsx(Ut,{route:"/settings/cats",onAction:o,labelKey:l.sharedGuideCatWelcomeMeetCats,className:"guideCatPanelAction"}),r.jsx(Ut,{route:"/lobby",onAction:o,labelKey:l.sharedGuideCatWelcomeExploreProducts,className:"guideCatPanelAction"})]})]})]})}function ql({className:e}){return r.jsx("img",{className:e,src:Ya,alt:"","aria-hidden":"true"})}function Gm({viewState:e,guideCat:t,ownerDisplayName:a,unreadCount:o,onToggle:n,onAction:s,onCollapse:i,onDismissWelcome:c,onDismissClick:u,onPillPointerDown:h,dragging:g,pillStyle:p,peekStyle:k,panelStyle:f,surfaceMode:w,dialog:b,onDialogClose:m,rootRef:C,pillHostedExternally:v,peekAnchor:y="anchor-left"}){if(e==="hidden"||v&&e==="collapsed")return null;const L=Km(t);let N;return e==="collapsed"?N=r.jsx(bs,{name:t.name,tooltip:L,unreadCount:o,onClick:n,onDismissClick:u,onPointerDown:h,style:p,dragging:g}):e==="welcome-peek"?N=r.jsxs("div",{ref:C,children:[v?null:r.jsx(bs,{name:t.name,tooltip:L,unreadCount:0,onClick:n,onDismissClick:u,onPointerDown:h,style:p,dragging:g}),r.jsx(Hm,{ownerDisplayName:a,onAction:s,onDismiss:c,style:k,anchor:y})]}):N=r.jsx("div",{ref:C,children:r.jsx(_m,{name:t.name,tooltip:L,ownerDisplayName:a,onAction:s,onClose:i,style:f,surfaceMode:w})}),r.jsxs(r.Fragment,{children:[N,r.jsx(It,{dialog:b,onClose:m})]})}function Km(e){const t=ct(),a=wr({provider:e.executionTarget.provider,instance:e.executionTarget.instance,model:e.executionTarget.model,modelSelection:e.modelSelection??null});return Kl(t,a)}function qm({viewState:e,guideCat:t,ownerDisplayName:a,unreadCount:o,proactive:n,toggle:s,collapse:i,dismissWelcome:c,onDismissed:u,onPillPointerDown:h,consumePillClickSuppression:g,pillStyle:p,peekStyle:k,panelStyle:f,surfaceMode:w,dragActive:b,pillHostedExternally:m,peekAnchor:C}){const v=Ne(),y=d.useRef(null),L=an(),{dialog:N,choose:T,handleClose:j}=Et(),A=ct(),{t:R}=U(),P=d.useCallback(E=>{i(),v(E)},[i,v]),I=d.useCallback(async()=>{const E=await T({title:R(l.sharedGuideCatDialogDisableTitle,{guideCatName:A}),message:R(l.sharedGuideCatDialogDisableMessage,{guideCatName:A}),confirmLabel:R(l.sharedGuideCatDialogDisableConfirm),cancelLabel:R(l.sharedGuideCatDialogKeepEnabled),auxiliaryLabel:R(l.sharedGuideCatDialogDockNow),defaultAction:"auxiliary"});if(E==="auxiliary"){L.update({placement:"docked"}),i();return}if(E==="confirm")try{(await fetch("/api/platform/guide-cat",{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({status:"dismissed"})})).ok&&u()}catch{}},[T,i,A,L,u]);d.useEffect(()=>{if(e!=="open"&&e!=="welcome-peek"||e==="welcome-peek"&&n||b)return;function E(G){if(Vh(G))return;const ee=G.target;ee?.closest?.(".guideCatDockSlot")||ee?.closest?.(".guideCatPillWrap")||y.current&&!y.current.contains(G.target)&&i()}function $(G){G.key==="Escape"&&i()}return document.addEventListener("mousedown",E),document.addEventListener("keydown",$),()=>{document.removeEventListener("mousedown",E),document.removeEventListener("keydown",$)}},[e,i,n,b]);const O=d.useCallback(()=>{g()||s()},[g,s]);return r.jsx(Gm,{viewState:e,guideCat:t,ownerDisplayName:a,unreadCount:o,onToggle:O,onAction:P,onCollapse:i,onDismissWelcome:n?c:void 0,onDismissClick:I,onPillPointerDown:h,dragging:b,pillStyle:p,peekStyle:k,panelStyle:f,surfaceMode:w,dialog:N,onDialogClose:j,rootRef:y,pillHostedExternally:m,peekAnchor:C})}function $m({guideCat:e,ownerDisplayName:t,unreadCount:a,onDismissed:o}){const n=ve(),{projection:s,presentation:i,onFloatingPointerDown:c,consumePillClickSuppression:u,dragActive:h,panelOriginX:g,getDockSlotRect:p}=en();if(s.kind==="hidden")return null;const k=s.kind==="docked";if(k&&i.viewState==="collapsed")return null;const f=s.kind==="floating"?s:null,w=f?{left:`${f.x-ks}px`,top:`${f.y-ks}px`,transform:"none"}:{},b=!f&&s.kind==="docked"?zm(s.slot,p(s.slot)):null,m=f?{left:`${f.x+Fm}px`,top:`${f.y}px`,transform:"translateY(-50%)"}:b?.style??{},C=b?.anchor??"anchor-left",v={left:`${g}px`},y=Um(n.pathname,s.kind==="docked"?"docked":"floating");return Wt.createPortal(r.jsx(qm,{viewState:i.viewState,guideCat:e,ownerDisplayName:t,unreadCount:a,proactive:i.proactive,toggle:i.toggle,collapse:i.collapse,dismissWelcome:i.dismissWelcome,onDismissed:o,onPillPointerDown:k?void 0:c,consumePillClickSuppression:u,pillStyle:w,peekStyle:m,panelStyle:v,surfaceMode:y,dragActive:h,pillHostedExternally:k,peekAnchor:C}),document.body)}function zm(e,t){return t?e==="workspace"?{style:{left:`${t.right+Om}px`,top:`${t.bottom}px`,transform:"translateY(-100%)"},anchor:"anchor-bottom-left"}:{style:{left:`${(t.left+t.right)/2}px`,top:`${t.bottom+Wm}px`,transform:"translateX(-50%)"},anchor:"anchor-top"}:null}function Vm(e,t){return e===t||e.startsWith(`${t}/`)}function Ym({envelope:e}){const{t}=U(),a=Ne(),o=ve(),{appId:n=""}=lr(),s=e.installedApps.find(g=>g.id===n),i=s?.lobbyEntries.find(g=>Vm(o.pathname,g.routePath))??s?.lobbyEntries[0]??null;if(!s)return r.jsx("div",{className:"screen screenCentered appHostScreen",children:r.jsxs("section",{className:"appHostPanel",children:[r.jsx("p",{className:"eyebrow",children:t("appHostLabel")}),r.jsx("h1",{children:t("appHostNotInstalledTitle")}),r.jsx("button",{type:"button",className:"secondaryButton appHostBackButton",onClick:()=>a("/lobby"),children:t("appHostBackToLobby")})]})});const c=s.enabled&&s.installState==="enabled",u=i?.title??s.displayName,h=i?.subtitle??t(c?"appHostSubtitleRendererPending":"appHostSubtitleDisabled");return r.jsx("div",{className:"screen screenCentered appHostScreen",children:r.jsxs("section",{className:"appHostPanel",children:[r.jsxs("div",{className:"appHostHeader",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:t("appHostLabel")}),r.jsx("h1",{children:u})]}),r.jsx("button",{type:"button",className:"secondaryButton appHostBackButton",onClick:()=>a("/lobby"),children:t("appHostBackToLobby")})]}),r.jsx("p",{className:"appHostSubtext",children:h}),r.jsxs("dl",{className:"appHostMeta",children:[r.jsxs("div",{children:[r.jsx("dt",{children:t("appHostSectionPackage")}),r.jsx("dd",{children:s.id})]}),r.jsxs("div",{children:[r.jsx("dt",{children:t("appHostSectionStatus")}),r.jsx("dd",{children:s.installState})]}),r.jsxs("div",{children:[r.jsx("dt",{children:t("appHostSectionPublisher")}),r.jsx("dd",{children:s.publisher})]})]})]})})}function Qm(e){return e.roomMode==="direct_message"?"direct_message":"chat_channel"}function dn(e){const t=Qm({roomMode:e.roomMode,participants:e.participants});return e.channelKind==="direct_message"||t==="direct_message"?"direct_message":"chat_channel"}function Jm(e){return e.assignedCats&&e.assignedCats.length>0?e.assignedCats:e.catAssignments??[]}function Xm(e){return dn({channelKind:e.channelKind,roomMode:e.roomRouting?.mode==="direct_message"?"direct_message":"chat_channel",participants:Jm(e)})}function Zm(e){return Xm(e)==="direct_message"}function ys(e){return dn({channelKind:e.channelKind,roomMode:e.roomMode==="direct_message"?"direct_message":"chat_channel",participants:[]})==="direct_message"}const eg=["chat","code","work"];function $l(){return{chat:!1,code:!1,work:!1}}function tg(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function kr(e){const t=$l(),a=tg(e);return a?eg.reduce((o,n)=>({...o,[n]:a[n]===!0}),t):t}function un(e,t){return kr(e)[t]===!0}const ag=["inline_stack","compare_cards","focus_rail","adaptive"],zl=["chat","work","code"];function Qa(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function Ka(){return{showVerboseMessages:!1,showLiveProgressDetails:!1,concurrentPresentationMode:"inline_stack"}}function rg(){return{chat:Ka(),work:Ka(),code:Ka()}}function Vl(e){return typeof e=="string"&&ag.includes(e)?e:"inline_stack"}function og(e){const t=Ka(),a=Qa(e);return{showVerboseMessages:a?.showVerboseMessages===!0,showLiveProgressDetails:a?.showLiveProgressDetails===!0,concurrentPresentationMode:Vl(a?.concurrentPresentationMode??t.concurrentPresentationMode)}}function pn(e){const t=rg(),a=Qa(e);return zl.reduce((o,n)=>(o[n]=og(a?.[n]),o),t)}function ng(e,t){const a=pn(e),o=Qa(t);if(!o)return a;for(const n of zl){const s=Qa(o[n]);s&&(typeof s.showVerboseMessages=="boolean"&&(a[n].showVerboseMessages=s.showVerboseMessages),typeof s.showLiveProgressDetails=="boolean"&&(a[n].showLiveProgressDetails=s.showLiveProgressDetails),s.concurrentPresentationMode!==void 0&&(a[n].concurrentPresentationMode=Vl(s.concurrentPresentationMode)))}return a}function sg(e,t){return pn(e)[t]}const ig=["chat","work","code"];function wt(e){if(typeof e!="string")return null;const t=e.trim();return t||null}function lg(e){return typeof e=="string"&&ig.includes(e)}function Yl(){return{bySurface:{},chatDirectLaneByCatId:{}}}function Ql(e){const t=Yl();if(typeof e!="object"||e===null)return t;const a=e,o=typeof a.bySurface=="object"&&a.bySurface!==null?a.bySurface:{},n=typeof a.chatDirectLaneByCatId=="object"&&a.chatDirectLaneByCatId!==null?a.chatDirectLaneByCatId:{},s={};for(const[c,u]of Object.entries(o)){const h=lg(c)?c:null,g=wt(typeof u=="string"?u:null);h&&g&&(s[h]=g)}const i={};for(const[c,u]of Object.entries(n)){const h=wt(c),g=wt(typeof u=="string"?u:null);h&&g&&(i[h]=g)}return{bySurface:s,chatDirectLaneByCatId:i}}function IS(e,t){const a=Ql(e),o=wt(t.directLaneCatId);return t.surface==="chat"&&o?a.chatDirectLaneByCatId[o]??null:a.bySurface[t.surface]??null}function BS(e,t,a){const o=Ql(e),n=wt(a),s=wt(t.directLaneCatId);if(t.surface==="chat"&&s){const c={...o.chatDirectLaneByCatId};return n?c[s]=n:delete c[s],{bySurface:{...o.bySurface},chatDirectLaneByCatId:c}}const i={...o.bySurface};return n?i[t.surface]=n:delete i[t.surface],{bySurface:i,chatDirectLaneByCatId:{...o.chatDirectLaneByCatId}}}async function FS(e){const t=wt(e.requestedPath),a=wt(e.rememberedPath),o=t??a,n=await e.browse(o??void 0);return!n.error||!a||t?n:e.browse(void 0)}function pe(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function ie(e,t=""){return typeof e=="string"?e:t}function se(e){return typeof e=="string"&&e.trim().length>0?e:null}function Ur(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function Hr(e,t){return typeof e=="boolean"?e:t}function cg(e,t){return typeof e=="number"&&Number.isFinite(e)?e:t}function dg(e){const t=pe(e.desktop)??{};e.desktop=t;const a=pe(t.mobilePairing)??{};t.mobilePairing={enabled:Hr(a.enabled,!1),bindHost:ie(a.bindHost,"127.0.0.1"),bindPort:cg(a.bindPort,0),bindReachability:a.bindReachability==="lan"||a.bindReachability==="all_interfaces"||a.bindReachability==="other_interface"?a.bindReachability:"loopback",canReachFromLan:Hr(a.canReachFromLan,!1),selectedLanIp:se(a.selectedLanIp),selectedLanUrl:se(a.selectedLanUrl),diagnosticManifestUrl:se(a.diagnosticManifestUrl),noLanCandidateReason:a.noLanCandidateReason==="loopback_bound"||a.noLanCandidateReason==="no_lan_candidate"||a.noLanCandidateReason==="bind_host_not_lan_candidate"?a.noLanCandidateReason:Hr(a.enabled,!1)?null:"feature_disabled",bindOverrideEnv:se(a.bindOverrideEnv),pairingUrlStatus:a.pairingUrlStatus==="ready"?"ready":"phase1_pending",pairingUrl:se(a.pairingUrl)}}function vs(e,t){const a=Array.isArray(e.catAssignments)?e.catAssignments:[],o=Array.isArray(e.assignedCats)?e.assignedCats:[],n=(a.length>0?a:o).map(s=>{const i=pe(s)??{};return{catId:ie(i.catId),status:ie(i.status,"active")==="removed"?"removed":"active"}});e.channelKind=dn({channelKind:e.channelKind==="chat_channel"||e.channelKind==="direct_message"||e.channelKind==="chat_channel"?e.channelKind:null,roomMode:t,participants:n})}function Jl(e){const t=structuredClone(e);dg(t);const a=pe(t.chat)??{};t.chat=a;const o=pe(a.globalOrchestrator);o&&!pe(o.executionTarget)&&(o.executionTarget={provider:ie(o.provider,"claude"),instance:se(o.instance),model:se(o.model)});const n=pe(o?.executionTarget);n&&n.instance===void 0&&(n.instance=se(o?.instance)),o&&!pe(o.memory)&&(o.memory={summary:null,facts:[],openLoops:[],updatedAt:null});const s=pe(a.selectedChannel);if(s&&!pe(s.orchestratorLease)){const u=pe(o?.executionTarget);s.orchestratorLease={sessionId:null,status:"not_started",cwd:null,lastError:null,provider:se(u?.provider)??"claude",instance:se(u?.instance),model:se(u?.model),startedAt:null,lastUsedAt:null}}Array.isArray(a.cats)||(a.cats=[]);const i=a.cats.map(u=>{const h=pe(u)??{};pe(h.defaultExecutionTarget)||(h.defaultExecutionTarget={provider:ie(h.provider,"claude"),instance:se(h.instance),model:se(h.model)});const g=pe(h.defaultExecutionTarget);return g&&g.instance===void 0&&(g.instance=se(h.instance)),pe(h.memory)||(h.memory={summary:null,facts:[],openLoops:[],updatedAt:null}),Array.isArray(h.roles)||(h.roles=Ur(h.roles)),h}),c=new Map(i.map(u=>[ie(u.id),u]));if(s){const u=pe(s.roomRouting);vs(s,ie(u?.mode,"chat_channel")==="direct_message"?"direct_message":"chat_channel"),Array.isArray(s.catAssignments)||(s.catAssignments=[]);const h=Array.isArray(s.catAssignments)?s.catAssignments:[];Array.isArray(s.participantAssignments)||(s.participantAssignments=h.map(p=>{const k=pe(p)??{},f=c.get(ie(k.catId))??{};return{participantId:ie(k.participantId,ie(k.catId)),sourceKind:ie(k.sourceKind,"cat")==="cat"?"cat":"adhoc",sourceRefId:se(k.sourceRefId)??se(k.catId),name:ie(k.name,ie(f.name,"Participant")),status:ie(k.status,"active"),roles:Array.isArray(k.roles)?k.roles:[],roleHint:se(k.roleHint),joinedAt:ie(k.joinedAt),leftAt:se(k.leftAt),execution:k.execution}})),(h.length>0||!Array.isArray(s.assignedCats))&&(s.assignedCats=h.map(p=>{const k=pe(p)??{},f=c.get(ie(k.catId))??{};return{participantId:ie(k.participantId,ie(k.catId)),sourceKind:"cat",sourceRefId:ie(k.sourceRefId,ie(k.catId)),catId:ie(k.catId),name:ie(f.name,"Cat"),roles:Array.isArray(k.roles)?k.roles:Ur(f.roles),roleHint:se(k.roleHint),skillProfile:se(f.skillProfile),mcpProfile:se(f.mcpProfile),status:ie(k.status,"active"),joinedAt:ie(k.joinedAt),leftAt:se(k.leftAt),avatarColor:se(f.avatarColor),avatarUrl:se(f.avatarUrl),execution:k.execution,memory:pe(f.memory)??{summary:null,facts:[],openLoops:[],updatedAt:null}}}));const g=Array.isArray(s.participantAssignments)?s.participantAssignments:[];(g.length>0||!Array.isArray(s.assignedParticipants))&&(s.assignedParticipants=g.map(p=>{const k=pe(p)??{},f=se(k.sourceRefId),w=f?c.get(f)??null:null;return{participantId:ie(k.participantId),sourceKind:ie(k.sourceKind,"adhoc")==="cat"?"cat":"adhoc",sourceRefId:f,name:ie(k.name,ie(w?.name,"Participant")),roles:Array.isArray(k.roles)?k.roles:Ur(w?.roles),roleHint:se(k.roleHint),skillProfile:se(w?.skillProfile),mcpProfile:se(w?.mcpProfile),status:ie(k.status,"active"),joinedAt:ie(k.joinedAt),leftAt:se(k.leftAt),avatarColor:se(w?.avatarColor),avatarUrl:se(w?.avatarUrl),execution:k.execution,memory:pe(w?.memory)??{summary:null,facts:[],openLoops:[],updatedAt:null}}}))}return a.cats=Array.from(c.values()),t.setupCompleteAt===void 0&&(t.setupCompleteAt=null),t.ownerDisplayName||(t.ownerDisplayName="Owner"),t.ownerAvatarColor===void 0&&(t.ownerAvatarColor=null),a.bossCatId===void 0&&(a.bossCatId=null),a.conversationBehavior=pn(a.conversationBehavior),pe(a.advancedDraftControls)||(a.advancedDraftControls=$l()),pe(a.folderBrowsePreferences)||(a.folderBrowsePreferences=Yl()),pe(a.newChatDefaults)||(a.newChatDefaults={provider:ie(n?.provider,"claude"),instance:se(n?.instance),model:se(n?.model),modelSelection:null}),Array.isArray(a.channels)&&(a.channels=a.channels.map(u=>{const h=pe(u)??{};return vs(h,ie(h.roomMode,"chat_channel")==="direct_message"?"direct_message":"chat_channel"),h.catCount===void 0&&(h.catCount=0),h.activeCatCount===void 0&&(h.activeCatCount=0),h})),Array.isArray(a.parallelChatGroups)||(a.parallelChatGroups=[]),t}async function hn(e,t){try{const a=await e.json();return typeof a.error=="string"?a.error||t:a.error&&typeof a.error=="object"&&typeof a.error.message=="string"&&a.error.message||t}catch{return t}}async function de(e,t){if(!e.ok)throw new Error(await hn(e,t));return await e.json()}const ug=15e3,Xl="provider_catalog.model.load_failed",Zl="provider_catalog.model.incomplete_response",ec="provider_catalog.advanced.load_failed",tc="provider_catalog.advanced.incomplete_response",Ja={entries:new Map,inflight:new Map},Xa={entries:new Map,inflight:new Map};function pg(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function Aa(e){const t=e?.trim();return t||null}function mn(e,t){return`${e.trim()}\0${Aa(t)??""}`}function ac(e){const t=new URLSearchParams,a=Aa(e.instance);a&&t.set("instance",a);const o=`/api/providers/${encodeURIComponent(e.provider)}/models${e.advanced?"/advanced":""}`,n=t.toString();return n?`${o}?${n}`:o}async function rc(e,t){try{const a=await e.json();if(typeof a.error?.message=="string")return a.error.message}catch{}return t}async function oc(e,t){const a=await e.json();if(!pg(a)?.catalog)throw new Error(t);return a}async function nc(e){const t=Date.now();if(!e.force){const o=e.cache.entries.get(e.cacheKey);if(o&&o.freshUntilMs>t)return o.value;const n=e.cache.inflight.get(e.cacheKey);if(n)return n}const a=e.load().then(o=>(e.cache.entries.set(e.cacheKey,{value:o,freshUntilMs:Date.now()+ug}),o)).finally(()=>{e.cache.inflight.delete(e.cacheKey)});return e.cache.inflight.set(e.cacheKey,a),a}function hg(){Ja.entries.clear(),Ja.inflight.clear(),Xa.entries.clear(),Xa.inflight.clear()}function sc(e,t,a){const o=t.trim();if(!o)return null;const n=mn(o,Aa(a)),s=e.entries.get(n);return s&&s.freshUntilMs>Date.now()?s.value:null}function mg(e){return sc(Ja,e.provider,e.instance)}function gg(e){return sc(Xa,e.provider,e.instance)}async function gn(e){const t=e.provider.trim(),a=Aa(e.instance),o=mn(t,a);return nc({cache:Ja,cacheKey:o,force:e.force,load:async()=>{const n=await(e.fetchImpl??fetch)(ac({provider:t,instance:a}));if(!n.ok)throw new Error(await rc(n,Xl));return bm(await oc(n,Zl),t)}})}async function fn(e){const t=e.provider.trim(),a=Aa(e.instance),o=mn(t,a);return nc({cache:Xa,cacheKey:o,force:e.force,load:async()=>{const n=await(e.fetchImpl??fetch)(ac({provider:t,instance:a,advanced:!0}));if(!n.ok)throw new Error(await rc(n,ec));return ym(await oc(n,tc),t)}})}function fg(e){return Promise.allSettled([gn(e),fn(e)]).then(()=>{})}function wg(e,t={}){return Promise.allSettled(e.providers.map(a=>{const o=a.defaultInstance??a.instances.find(n=>n.default)?.id??a.instances[0]?.id??null;return fg({provider:a.id,instance:o,fetchImpl:t.fetchImpl})})).then(()=>{})}const ic="provider_registry.product_catalog_checking",kg="provider_registry.last_saved_targets",Za="provider_registry.load_failed",lc="provider_registry.refresh_failed",bo="provider_registry.cached_refresh_failed:";function bg(e){return`${bo}${e}`}function yg(e){return e.startsWith(bo)?e.slice(bo.length):null}const vg=15e3,Cg=10*6e4,Pe={value:null,freshUntilMs:0,staleIfErrorUntilMs:0,inflight:null};async function Sg(e,t){try{const a=await e.json();if(typeof a.error?.message=="string")return a.error.message}catch{}return t}function Lg(e){const t=Array.isArray(e.providers)?e.providers:[];return{state:e.state??(t.length>0?"ready":"no_usable_targets"),providers:t.map(a=>({id:a.id,label:a.label,defaultModel:a.defaultModel??null,defaultInstance:a.defaultInstance??null,defaultBackend:a.defaultBackend??null,instances:Array.isArray(a.instances)?a.instances.map(o=>({id:o.id,label:o.label,target:o.target??null,backend:o.backend??null,default:!!o.default,eventCapabilities:um(o.eventCapabilities)})):[],modelsPath:a.modelsPath})),recovery:e.recovery,warnings:Array.isArray(e.warnings)?e.warnings:[]}}function Cs(e){return{state:"runtime_unreachable",providers:[],recovery:{retryable:!0},warnings:[e]}}function Rg(e){return e.state!=="runtime_unreachable"}function Pg(e,t){const a=Array.isArray(e.warnings)?e.warnings:[];return{...e,warnings:a.includes(t)?a:[...a,t]}}function Ag(e){return e.warnings?.[0]??lc}function xg(e){const t=Date.now();Pe.value=e,Pe.freshUntilMs=t+vg,Pe.staleIfErrorUntilMs=t+Cg}function Tg(){Pe.value=null,Pe.freshUntilMs=0,Pe.staleIfErrorUntilMs=0}async function Dg(e,t={}){try{const a=t.force?"/api/providers?force=1":"/api/providers",o=await e(a);if(!o.ok)return Cs(await Sg(o,Za));const n=await o.json();return Lg(n)}catch(a){return Cs(a instanceof Error?a.message:Za)}}function Ng(){const e=Date.now();return Pe.value&&Pe.freshUntilMs>e?Pe.value:null}async function br(e={}){const t=Date.now();if(!e.force&&Pe.value&&Pe.freshUntilMs>t)return Pe.value;if(!e.force&&Pe.inflight)return Pe.inflight;const a=Dg(e.fetchImpl??fetch,{force:e.force}).then(o=>{if(Rg(o))return xg(o),o;const n=Pe.value;return n&&Pe.staleIfErrorUntilMs>Date.now()?Pg(n,bg(Ag(o))):(Tg(),o)}).finally(()=>{Pe.inflight=null});return Pe.inflight=a,a}function jg(e={}){return br(e).then(()=>{})}async function Pt(e){return br(e)}async function At(e,t){return gn({provider:e,instance:t})}async function xt(e,t){return fn({provider:e,instance:t})}const yo="provider_catalog.refresh_failed_status:";function Ss(e){return`${yo}${e}`}function Mg(e){if(!e.startsWith(yo))return null;const t=Number(e.slice(yo.length));return Number.isInteger(t)?t:null}async function Eg(){const e=await fetch("/api/providers/models/refresh",{method:"POST",headers:{Accept:"application/json"}});if(!e.ok){let a=Ss(e.status);try{const o=await e.json();o.error?.code==="provider_catalog_refresh_failed"?a=Ss(e.status):typeof o.error?.message=="string"&&(a=o.error.message)}catch{}throw new Error(a)}const t=await e.json();return hg(),t}async function Ze(e){const t=await fetch("/api/app-shell",{headers:{Accept:"application/json"},signal:e});return Jl(await de(t,`cats app shell returned ${t.status}`))}async function bt(e,t,a){if(!e.ok)throw new Error(await hn(e,t));try{return await Ze(a)}catch{return Ze()}}async function OS(e,t){const a=await fetch("/api/preferences",{method:"PATCH",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify({selectedChannelId:e}),signal:t});return bt(a,`cats chat selection returned ${a.status}`,t)}async function wn(e,t,a){const o=await fetch("/api/preferences",{method:"PATCH",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify({conversationBehavior:{[e]:t}}),signal:a});return bt(o,`cats conversation behavior update returned ${o.status}`,a)}async function kn(e,t){const a=await fetch("/api/preferences",{method:"PATCH",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify({advancedDraftControls:e}),signal:t});return bt(a,`cats advanced draft controls update returned ${a.status}`,t)}async function WS(e,t){const a=await fetch("/api/preferences",{method:"PATCH",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify({newChatDefaults:e}),signal:t});return bt(a,`cats new chat defaults update returned ${a.status}`,t)}async function US(e,t){const a=await fetch("/api/preferences",{method:"PATCH",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify({folderBrowsePreference:{surface:e.surface,directLaneCatId:e.directLaneCatId??null,path:e.path}}),signal:t});return de(a,`cats folder browse preference update returned ${a.status}`)}async function HS(e,t,a){const o=await fetch(`/api/channels/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(t),signal:a});return bt(o,`cats channel update returned ${o.status}`,a)}async function _S(e,t){const a=await fetch(`/api/channels/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify({resetContinuity:!0}),signal:t});return bt(a,`cats channel continuity reset returned ${a.status}`,t)}async function Ig(e,t){const a=await fetch("/api/orchestrator",{method:"PATCH",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(e),signal:t});return bt(a,`cats orchestrator update returned ${a.status}`,t)}async function tt(e,t,a){return bt(e,t,a)}const Bg=6,Fg=12,Og=2;function Wg(){return{activeTurn:null,turnHistory:[],eventHistory:[],lastCheckpointEvent:null,lastOutcomeEvent:null}}function Ug(e={}){return{mode:e.mode??"chat_channel",defaultRecipientId:e.defaultRecipientId??null,maxContinuations:Bg,maxDispatchesPerTurn:Fg,maxTargetVisitsPerTurn:Og,lastOutcome:null,lastCheckpoint:null,lastWakeRequest:null,wakeHistory:[],workflow:Wg()}}function Hg(e){return e?structuredClone(e):Ug()}function Ls(e){switch(e){case"ready":return"awake";case"initializing":return"waking_up";case"error":return"error";default:return"sleeping"}}function cc(e){return e?{...e,roomRouting:Hg(e.roomRouting)}:null}function GS(e){if(!e)return null;if(Zm(e)&&e.roomRouting.defaultRecipientId){const t=e.assignedCats.find(a=>a.status==="active"&&a.catId===e.roomRouting.defaultRecipientId);return t?Ls(t?.execution.lease.status):null}return Ls(e.orchestratorLease.status)}function KS(e){return!e.routeChannelId||!e.routeChannelExists?!1:e.selectedChannelId!==e.routeChannelId||e.selectedChannelViewId!==e.routeChannelId}const Ft="/api/parallel-chat-groups";function _g(e){if(!e||typeof e!="object"||Array.isArray(e))return{attemptedSessionCount:0,retainedSessionCount:0,retainedSessions:[]};const t=e,a=Array.isArray(t.retainedSessions)?t.retainedSessions.flatMap(n=>{if(!n||typeof n!="object"||Array.isArray(n))return[];const s=n,i=typeof s.sessionId=="string"?s.sessionId.trim():"";return i?[{sessionId:i,reason:typeof s.reason=="string"&&s.reason.trim()?s.reason.trim():null}]:[]}):[];return{attemptedSessionCount:typeof t.attemptedSessionCount=="number"&&Number.isFinite(t.attemptedSessionCount)&&t.attemptedSessionCount>0?Math.floor(t.attemptedSessionCount):0,retainedSessionCount:a.length,retainedSessions:a}}function dc(e){const a=[];for(let o=0;o<e.length;o+=32768){const n=e.subarray(o,o+32768);a.push(String.fromCharCode(...n))}return btoa(a.join(""))}async function Gg(e,t){const a=await fetch(`/api/cats/${encodeURIComponent(e)}`,{method:"DELETE",headers:{Accept:"application/json"},signal:t});return tt(a,`cats cat deletion returned ${a.status}`,t)}async function qS(e,t){const a=await fetch("/api/channels",{method:"POST",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(e),signal:t}),{channel:o}=await de(a,`cats chat creation returned ${a.status}`),n=cc(o);if(!n)throw new Error("Created channel payload was invalid.");return n}async function $S(e,t,a){const o=await fetch(`/api/channels/${e}`,{method:"PATCH",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify({title:t}),signal:a});return tt(o,`cats chat rename returned ${o.status}`,a)}async function zS(e,t){const a=await fetch(`/api/channels/${e}`,{method:"DELETE",headers:{Accept:"application/json"},signal:t});if(!a.ok)throw new Error(await hn(a,`cats chat deletion returned ${a.status}`));const o=await a.json();let n;try{n=await Ze(t)}catch{n=await Ze()}return{payload:n,runtimeCleanup:_g(o.runtimeCleanup)}}async function Kg(e,t){const a=await fetch("/api/cats",{method:"POST",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(e),signal:t});return tt(a,`cats chat cat creation returned ${a.status}`,t)}async function VS(e,t,a){const{catId:o,...n}=t,s=await fetch(`/api/channels/${e}/cats/${o}`,{method:"PUT",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(n),signal:a});return tt(s,`cats channel cat assignment returned ${s.status}`,a)}async function YS(e,t,a){const o=await fetch(`/api/channels/${e}/cats/${t}`,{method:"DELETE",headers:{Accept:"application/json"},signal:a});return tt(o,`cats channel cat removal returned ${o.status}`,a)}async function QS(e,t,a,o){const n=await fetch(`/api/channels/${encodeURIComponent(e)}/participants/${encodeURIComponent(t)}`,{method:"PATCH",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(a),signal:o});return tt(n,`cats channel participant update returned ${n.status}`,o)}async function JS(e,t){const a=await fetch(`/api/channels/${e}/activations`,{method:"POST",headers:{Accept:"application/json"},signal:t}),{activation:o}=await de(a,`cats channel activation returned ${a.status}`);let n;try{n=await Ze(t)}catch{n=await Ze()}return{appShell:n,results:o.results}}async function XS(e,t,a){const o=await Promise.all(t.map(async i=>{const c=await i.arrayBuffer(),u=new Uint8Array(c);return{name:i.name,data:dc(u)}})),n=await fetch(`/api/channels/${e}/attachments`,{method:"POST",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify({files:o}),signal:a});return(await de(n,`attachment upload returned ${n.status}`)).attachments}async function ZS(e){return Promise.all(e.map(async t=>{const a=await t.arrayBuffer(),o=new Uint8Array(a);return{name:t.name,data:dc(o)}}))}async function eL(e,t){const a=await fetch(Ft,{method:"POST",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(e),signal:t});return de(a,`parallel chat creation returned ${a.status}`)}async function tL(e,t,a){const o=await fetch(`${Ft}/${encodeURIComponent(e)}/messages`,{method:"POST",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(t),signal:a});return de(o,`parallel chat dispatch returned ${o.status}`)}async function aL(e,t,a){const o=await fetch(`${Ft}/${encodeURIComponent(e)}/relay`,{method:"POST",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(t),signal:a});return de(o,`parallel chat relay returned ${o.status}`)}async function rL(e,t,a){const o=await fetch(`${Ft}/${encodeURIComponent(e)}/cancel`,{method:"POST",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(t),signal:a});return de(o,`parallel chat cancel returned ${o.status}`)}async function oL(e,t,a){const o=await fetch(`${Ft}/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(t),signal:a});return tt(o,`parallel chat rename returned ${o.status}`,a)}async function nL(e,t){const a=await fetch(`${Ft}/${encodeURIComponent(e)}/ungroup`,{method:"POST",headers:{Accept:"application/json"},signal:t});return tt(a,`parallel chat ungroup returned ${a.status}`,t)}async function sL(e,t){const a=await fetch(`${Ft}/${encodeURIComponent(e)}`,{method:"DELETE",headers:{Accept:"application/json"},signal:t});return tt(a,`parallel chat deletion returned ${a.status}`,t)}async function iL(e,t){const a=await fetch(`/api/channels/${e}/cancel`,{method:"POST",headers:{Accept:"application/json"},signal:t});return de(a,`cats channel cancel returned ${a.status}`)}async function lL(e,t,a){const o=await fetch(`/api/channels/${encodeURIComponent(e)}/messages/${encodeURIComponent(t)}/retry`,{method:"POST",headers:{Accept:"application/json"},signal:a});return de(o,`channel message retry returned ${o.status}`)}async function cL(e,t,a){const o=await fetch(`/api/channels/${e}/messages`,{method:"POST",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(t),signal:a});return de(o,`cats channel messaging returned ${o.status}`)}async function Re(e,t,a){const o=await fetch(`/api/cats/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(t),signal:a});return tt(o,`cat profile update returned ${o.status}`,a)}function qg(e){async function t(o,n){const s=await fetch("/api/setup/complete",{method:"POST",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(o),signal:n});return e(await de(s,`setup completion returned ${s.status}`))}async function a(o){const n=await fetch("/api/setup/reset",{method:"POST",headers:{Accept:"application/json"},signal:o});return e(await de(n,`setup reset returned ${n.status}`))}return{completeSetup:t,resetSetup:a}}const $g=qg(Jl),zg=$g.resetSetup;function Vg(e){async function t(n,s){const i=await fetch("/api/bot-bindings",{method:"POST",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify({platform:"telegram",...n}),signal:s});return e.refetchAfterMutation(i,`bot binding create returned ${i.status}`,s)}async function a(n,s){const i=await fetch(`/api/bot-bindings/${encodeURIComponent(n)}`,{method:"DELETE",headers:{Accept:"application/json"},signal:s});return e.refetchAfterMutation(i,`bot binding delete returned ${i.status}`,s)}async function o(n,s,i){const c=await fetch(`/api/bot-bindings/${n}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(s),signal:i});return de(c,`update bot binding returned ${c.status}`)}return{createBotBindingApi:t,deleteBotBindingApi:a,updateBotBindingApi:o}}async function Rs(e){const t=await fetch("/api/transports/telegram",{headers:{Accept:"application/json"},signal:e});return(await de(t,`telegram transport status returned ${t.status}`)).telegram}async function Ps(e){const t=await fetch("/api/transports/telegram/diagnostics",{headers:{Accept:"application/json"},signal:e});return(await de(t,`telegram transport diagnostics returned ${t.status}`)).telegram}const uc=Vg({refetchAfterMutation:tt}),Yg=uc.createBotBindingApi,Qg=uc.deleteBotBindingApi;async function Jg(e,t){const a=await fetch(`/api/cats/${encodeURIComponent(e)}/memory`,{headers:{Accept:"application/json"},signal:t});return(await de(a,`cat memory list returned ${a.status}`)).records??[]}async function Xg(e,t,a){const o=await fetch(`/api/cats/${encodeURIComponent(e)}/memory`,{method:"POST",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(t),signal:a});return(await de(o,`cat memory create returned ${o.status}`)).memory}async function Zg(e,t,a){const o=await fetch(`/api/cats/${encodeURIComponent(e)}/memory/${encodeURIComponent(t)}`,{method:"DELETE",headers:{Accept:"application/json"},signal:a});await de(o,`cat memory delete returned ${o.status}`)}const dL="current",uL="full",pc={read_only:["default"],read_write:["skip","whitelist"]};function ef(e,t){return pc[e].includes(t)}function hc(e){return pc[e][0]}function tf(e){return typeof e=="string"&&e.trim().length>0}function vo(e,t){if(!t)return{...e};const a={...e};for(const o of Object.keys(e)){const n=t[o];n!==void 0&&(a[o]=n)}return a}function bn(){const e="read_write";return{workspaceKind:"sandbox",workspaceAccess:e,permissionMode:hc(e)}}function yn(e){const{workspaceKind:t,workspaceAccess:a}=e,o=ef(a,e.permissionMode)?e.permissionMode:hc(a);return a==="read_only"?{workspaceKind:t,workspaceAccess:a,permissionMode:o}:{workspaceKind:t,workspaceAccess:a,permissionMode:o}}function pL(){return yn(bn())}function af(e){return e.workspaceAccess==="read_only"?{runtimeWorkspaceKind:e.workspaceKind,runtimeWorkspaceAccess:e.workspaceAccess,runtimePermissionMode:e.permissionMode}:{runtimeWorkspaceKind:e.workspaceKind,runtimeWorkspaceAccess:e.workspaceAccess,runtimePermissionMode:e.permissionMode}}function hL(e){return yn(vo(bn(),e))}function rf(e){const t=vo(bn(),{workspaceKind:tf(e.repoPath)?"source":void 0});return yn(vo(t,e.policy))}function mL(e){return e==="worktree"?"worktree":"current"}function gL(e){return e.hasCwd?e.isRepo&&e.workspaceMode==="worktree"?"worktree":"source":"sandbox"}function fL(e){return e==="read_only"?"read_only":"full"}function wL(e){return e==="read_only"?{workspaceAccess:"read_only",permissionMode:"default"}:{workspaceAccess:"read_write",permissionMode:"skip"}}function vn(e){const t=e?.trim();return t==="Chat"||t==="Orchestrator"}function As(e){const t=e?.trim();return!t||vn(t)?null:t}function of(e){return As(e.displayName)??As(e.executionLabel)??(e.provider?cn(e.provider,e.instance??null,null):null)}const et="chat-memory",mc="work-memory",ka=new Map;function kL(e,t){const a=ka.get(e)??null;a&&a!==t&&console.warn("Replacing pending optimistic send for channel.",{feature:"chat_optimistic_message_replaced_in_flight",channelId:e,previousMessageId:a,nextMessageId:t}),ka.set(e,t)}function nf(e,t){const a=ka.get(e)??null;a&&(t&&a!==t||ka.delete(e))}function bL(){return[...ka.entries()].map(([e,t])=>({channelId:e,optimisticMessageId:t}))}function fe(e){const t=e.trim().split(/\s+/);return t.length>=2?(t[0][0]+t[1][0]).toUpperCase():e.slice(0,2).toUpperCase()}const xa=Fe("en");function xs(e){return Bt(e)??e.trim()}function Ts(){return{name:"",provider:"claude",instance:"",model:"",modelSelection:null,makeBoss:!1,products:hr(),skillProfile:"chat-default",mcpProfile:et}}function sf(e){return Xo(e.products,"chat",{fallback:hr()})}function gc(e){return Nm(e)}function lf(e){return Array.isArray(e)?new Set(e.filter(t=>!!t)):e?new Set([e]):new Set}function cf(e,t,a={}){const o=lf(a.bossCatIds);if(a.archivedLast){const c=e.status==="archived"?1:0,u=t.status==="archived"?1:0;if(c!==u)return c-u}const n=o.has(e.id)?0:1,s=o.has(t.id)?0:1;if(n!==s)return n-s;const i=e.createdAt.localeCompare(t.createdAt);return i!==0?i:e.id.localeCompare(t.id)}function _t(e,t={}){return[...e].sort((a,o)=>cf(a,o,t))}function df(e){const t=e.metadata?.executionLabelSnapshot;return typeof t=="string"&&t.trim()?t.trim():null}function uf(e){const t=e?.trim();return!t||vn(t)?null:t}function yL(e,t,a=xa){if(e.senderKind==="user"||e.senderKind==="system")return{kind:"none",label:null,cat:null};const o=e.metadata?.targetKind==="cat"||e.metadata?.targetKind==="orchestrator"?e.metadata.targetKind:null,n=typeof e.metadata?.targetId=="string"&&e.metadata.targetId?e.metadata.targetId:null,s=e.senderName?.trim()??"",i=uf(e.senderName),c=df(e),u=vn(s);if(o==="cat"&&n){const g=t.find(p=>p.id===n)??null;return g?{kind:"cat",label:g.name,cat:g}:{kind:"deleted_cat",label:a(l.sharedTranscriptDeletedCat),cat:null}}const h=i&&i!=="Orchestrator"?t.find(g=>g.name===i)??null:null;return h?{kind:"cat",label:h.name,cat:h}:(c||e.executionProvider)&&(o==="orchestrator"||u)?{kind:"provider",label:of({displayName:e.senderName,executionLabel:c,provider:e.executionProvider,instance:e.executionInstance}),cat:null}:i?{kind:"name",label:i,cat:null}:{kind:"none",label:null,cat:null}}function pf(e,t,a=xa){const o=e.replace(/\s+/g," ").trim();return o?o.slice(0,48):t>0?a(l.chatNewChatDraftGeneratedTitleWithIndex,{index:t+1}):a(l.chatNewChatDraftGeneratedTitle)}function hf(e){return e.replace(/\s+/g," ").trim().slice(0,120)}function vL(e,t){return t.length===0?e:`[Attached files in working directory:]
|
|
39
39
|
${t.map(o=>`- ${o.relativePath}`).join(`
|
|
40
40
|
`)}
|
|
41
41
|
|
|
42
42
|
${e}`}function CL(e){const{body:t,existingCount:a,originSurface:o,entryKind:n,repoPath:s,draftSessionPolicy:i,defaultRecipientCatId:c,participantCatIds:u=[],temporaryParticipants:h=[],draftExecutionTarget:g,assistantResponseLanguage:p,t:k}=e,f=c?.trim()||null,w=u.filter(y=>y!==f),b=n??(f||w.length>0?"group":"default"),m=f??w[0]??null,C=rf({repoPath:s,policy:i}),v={title:pf(t,a,k),topic:hf(t),originSurface:o,entryKind:b,skipBossCatGreeting:!0,repoPath:s??void 0,responseLanguage:p,...af(C),temporaryParticipants:h.length>0?h.map(y=>({participantId:y.participantId,name:y.name,provider:xs(y.provider),instance:y.instance??void 0,model:y.model??void 0,modelSelection:y.modelSelection??null,roleHint:y.roleHint??void 0})):void 0};return b==="direct"&&m?{...v,roomMode:"direct_message",defaultRecipientId:m,participantCatIds:[m,...w.filter(y=>y!==m)]}:f?{...v,defaultRecipientId:f,participantCatIds:[f,...w]}:w.length>0?{...v,participantCatIds:w}:{...v,pendingProvider:g?xs(g.provider):void 0,pendingModel:g?.model??void 0,pendingInstance:g?.instance??void 0,pendingModelSelection:g?.modelSelection??void 0}}function SL(e){switch(e){case"user":return"transcriptMessage transcriptMessageUser";case"orchestrator":return"transcriptMessage transcriptMessageOrchestrator";case"agent":return"transcriptMessage transcriptMessageAgent";default:return"transcriptMessage transcriptMessageSystem"}}function mf(e,t=xa){return e.trim()==="Untitled chat"?t(l.chatNewChatDraftGeneratedTitle):e}function LL(e,t=20){const a=e.replace(/\\/g,"/").split("/").filter(Boolean).pop()??e;return a.length<=t?a:a.slice(0,t-3)+"..."}const gf=[l.chatNewChatDraftDefaultGreeting,l.chatNewChatDraftGreetingNap,l.chatNewChatDraftGreetingKeyboard,l.chatNewChatDraftGreetingLetsGo,l.chatNewChatDraftGreetingStandby,l.chatNewChatDraftGreetingTaskReady,l.chatNewChatDraftGreetingOnDuty];function RL(e=xa){const t=gf.map(a=>e(a));return t[Math.floor(Math.random()*t.length)]}function PL(e){return e.chat.bossCatId?e.chat.cats.find(t=>t.id===e.chat.bossCatId)?.name??null:null}function ff(e,t,a,o){return{id:crypto.randomUUID(),channelId:e,senderKind:"user",senderName:a.trim()||"User",body:t,mentions:[],metadata:{optimistic:!0},usage:null,createdAt:o}}function AL(e,t,a){const o=new Date().toISOString(),n=structuredClone(e),s=n.chat.selectedChannel,i=n.chat.channels.find(u=>u.id===t);if(!s||s.id!==t||!i)throw new Error("No chat is available for optimistic updates.");const c=ff(t,a,n.ownerDisplayName,o);return s.messages.push(c),s.updatedAt=o,s.lastMessageAt=o,s.unreadCount=0,i.lastMessageAt=o,i.unreadCount=0,n.chat.selectedChannelId=t,n.metadata.generatedAt=o,{payload:n,optimisticMessageId:c.id}}function xL(e,t,a){const o=structuredClone(e),n=o.chat.selectedChannel,s=o.chat.channels.find(i=>i.id===t);if(!n||n.id!==t||!s)throw new Error("No chat is available for optimistic execution target updates.");return n.pendingProvider=a.pendingProvider,n.pendingModel=a.pendingModel,n.pendingInstance=a.pendingInstance,n.pendingModelSelection=a.pendingModelSelection,s.pendingProvider=a.pendingProvider,s.pendingModel=a.pendingModel,s.pendingModelSelection=a.pendingModelSelection,o}function TL(e,t){const a=cc(t);if(!a)throw new Error("Created channel payload was invalid.");const o=structuredClone(e),n=a.roomRouting.defaultRecipientId??null,s=a.roomRouting.workflow.activeTurn?.status??a.roomRouting.workflow.lastOutcomeEvent?.status??null,i=s==="pending"?"running":s==="failed"?"error":s,c=a.roomRouting.workflow.activeTurn?.updatedAt??a.roomRouting.workflow.lastOutcomeEvent?.createdAt??a.roomRouting.lastOutcome?.completedAt??a.roomRouting.lastCheckpoint?.createdAt??null,u=Array.isArray(a.assignedParticipants)?a.assignedParticipants:a.assignedCats,h=u.length,g=u.filter(k=>k.status==="active").length,p={id:a.id,containerId:a.containerId,conversationId:a.conversationId,title:a.title,topic:a.topic,originSurface:a.originSurface,channelKind:a.channelKind,status:a.status,unreadCount:a.unreadCount,participantCount:h,activeParticipantCount:g,catCount:a.assignedCats.length,activeCatCount:a.assignedCats.filter(k=>k.status==="active").length,repoPath:a.repoPath,chatCwd:a.chatCwd,runtimeWorkspaceKind:a.runtimeWorkspaceKind??null,runtimeWorkspaceAccess:a.runtimeWorkspaceAccess??null,runtimePermissionMode:a.runtimePermissionMode??null,lastMessageAt:a.lastMessageAt,lastActivatedAt:a.lastActivatedAt,pendingProvider:a.pendingProvider,pendingModel:a.pendingModel,pendingModelSelection:a.pendingModelSelection??null,defaultRecipientCatId:n,roomMode:a.roomRouting.mode,routingStatus:i??void 0,lastRoutingAt:c};return o.chat.channels=[p,...o.chat.channels.filter(k=>k.id!==a.id)],o.chat.selectedChannelId=a.id,o.chat.selectedChannel=a,o.metadata.generatedAt=a.updatedAt,o}function DL(e,t,a,o){const n=e.chat.selectedChannel,s=n?.id===a?n.messages.find(g=>g.id===o&&g.senderKind==="user"&&g.metadata?.optimistic)??null:null;if(!s)return t;const i=structuredClone(t),c=i.chat.selectedChannel,u=i.chat.channels.find(g=>g.id===a);if(!c||c.id!==a||!u)return console.warn("Pending optimistic message channel disappeared during refresh.",{feature:"chat_optimistic_message_orphaned_channel",channelId:a,optimisticMessageId:s.id}),nf(a,s.id),t;const h=c.messages.find(g=>g.id===s.id);if(h){const g=h.senderKind===s.senderKind&&h.senderName===s.senderName&&h.metadata?.clientMessageId===s.id,p=h.senderKind===s.senderKind&&h.senderName===s.senderName&&h.body.trim()===s.body.trim();return!g&&!p&&console.warn("Skipped preserving optimistic message because refreshed row owns the id.",{feature:"chat_optimistic_message_preserve",reason:"id_collision",channelId:a,optimisticMessageId:s.id,existingSenderKind:h.senderKind}),t}return c.messages.push(structuredClone(s)),c.updatedAt=s.createdAt,c.lastMessageAt=s.createdAt,c.unreadCount=0,u.lastMessageAt=s.createdAt,u.unreadCount=0,i.chat.selectedChannelId=a,i.metadata.generatedAt=s.createdAt,i}function NL(e,t=xa){return r.jsx("div",{className:"screen bootShell","aria-label":t(l.sharedProductBootLoadingAria,{productName:e}),children:r.jsx("div",{className:"bootSpinner","aria-hidden":"true"})})}const wf=Fe("en");function jL(e){return sf(e)}function kf(e){return e?e.skillProfile==="companion"||e.roles.includes("companion"):!1}function ML(e,t){return mf(e,t)}const bf=[l.chatNewChatDraftDefaultGreeting,l.chatNewChatDraftGreetingNap,l.chatNewChatDraftGreetingKeyboard,l.chatNewChatDraftGreetingLetsGo,l.chatNewChatDraftGreetingStandby,l.chatNewChatDraftGreetingTaskReady,l.chatNewChatDraftGreetingOnDuty];bf.map(e=>wf(e));function EL(){const{t:e}=U();return r.jsx("div",{className:"screen bootShell","aria-label":e(l.chatBootLoadingAria),children:r.jsx("div",{className:"bootSpinner","aria-hidden":"true"})})}const fc="cat",Cn="preset",wc="group",kc="parallel",yf="/setup";function yr(e){const t=e?.trim();return t||null}function Yt(e){return`${e}/new`}function vf(e){return`${e}/dm`}function IL(e,t){return t?Yt(e):yf}function Cf(e,t){const a=yr(t),o=Yt(e);if(!a)return o;const n=new URLSearchParams([[fc,a]]);return`${o}?${n.toString()}`}function BL(e){const t=new URLSearchParams([[Cn,wc]]);return`${Yt(e)}?${t.toString()}`}function FL(e){const t=new URLSearchParams([[Cn,kc]]);return`${Yt(e)}?${t.toString()}`}function OL(e,t){const a=yr(t),o=vf(e);return a?`${o}/${encodeURIComponent(a)}`:o}function WL(e){const t=new URLSearchParams(e);return yr(t.get(fc))}function UL(e){const t=new URLSearchParams(e),a=yr(t.get(Cn));return a===kc?"parallel":a===wc?"group":"default"}function Ds(e,t){return`${e}/chats/${encodeURIComponent(t)}`}function HL(e){return(e?.trim()??"").startsWith("draft-")}function _L(e,t,a,o){const n=o?t.filter(u=>u.originSurface===o):t,s=a?.trim()??"",i=n.find(u=>u.id===s&&!ys(u));if(i)return Ds(e,i.id);const c=n.find(u=>!ys(u));return c?Ds(e,c.id):Yt(e)}function GL(e,t){return t===Yt(e)}const Ns="direct_message";function bc(e){return e.channelKind===Ns||e.roomMode===Ns}function Sf(e,t){return e.find(a=>bc(a)&&a.defaultRecipientCatId===t)??null}function KL(e,t){const a=new Map;for(const o of t){if(!bc(o))continue;const n=o.defaultRecipientCatId;if(!n)continue;const s=o.lastActivatedAt??o.lastMessageAt??"",i=a.get(n);(!i||i.localeCompare(s)<0)&&a.set(n,s)}return[...e].sort((o,n)=>{const s=a.get(o.id)??o.createdAt;return(a.get(n.id)??n.createdAt).localeCompare(s)})}function Lf(e){const t=e?.trim();return t||null}function Sn(e,t){const a=Lf(t),o=`${e}/dm`;return a?`${o}/${encodeURIComponent(a)}`:o}function qL(e,t){return Sf(e,t)}function $L(e){switch(e){case"ready":return"awake";case"initializing":return"waking_up";case"error":return"error";case"not_started":case"closed":case"removed":return"sleeping";default:return"no_dot"}}function zL(e){switch(e){case"awake":return"myCatDot myCatDotAwake";case"waking_up":return"myCatDot myCatDotWaking";case"sleeping":return"myCatDot myCatDotSleeping";case"error":return"myCatDot myCatDotError";default:return""}}function VL(e){switch(e){case"awake":return l.chatLifecycleAwakeLabel;case"waking_up":return l.chatLifecycleWakingUpLabel;case"sleeping":return l.chatLifecycleSleepingLabel;case"error":return l.chatCatStatusErrorLabel;default:return null}}function YL(e,t,a){return{kind:"direct_message",path:Sn(e,a)}}const Rf=Fe("en");function Pf(e,t=Rf){switch(e){case"overview":return t(l.chatCompanionTabStatus);case"resources":return t(l.chatCompanionTabSources);case"memory":return t(l.chatCompanionTabMemory);case"settings":return t(l.chatCompanionTabBehavior);case"inspector":return t(l.chatCompanionTabInspector)}}const _r=["overview","resources","memory","settings","inspector"],Le=256;function Co(e,t){const a=e.img.naturalWidth*e.scale,o=e.img.naturalHeight*e.scale,n=t-a,s=t-o;return{x:Math.min(0,Math.max(n,e.x)),y:Math.min(0,Math.max(s,e.y))}}function js(e,t,a){e.clearRect(0,0,a,a);const o=t.img.naturalWidth*t.scale,n=t.img.naturalHeight*t.scale,s=Co(t,a);e.drawImage(t.img,s.x,s.y,o,n)}function Gr(e,t){const a=Math.min(e.naturalWidth,e.naturalHeight);return t/a}function Qt({onSave:e,onClose:t,initialDataUrl:a}){const o=d.useRef(null),n=d.useRef(null),s=d.useRef(null),[i,c]=d.useState(null),u=d.useRef(null),{t:h}=U(),g=d.useCallback(()=>{const w=o.current?.getContext("2d");!w||!i||js(w,i,Le)},[i]);d.useEffect(()=>{g()},[g]),d.useEffect(()=>{if(!a)return;let w=!1;const b=new Image;return b.crossOrigin="anonymous",b.onload=()=>{if(w)return;const m=Gr(b,Le),C=b.naturalWidth*m,v=b.naturalHeight*m;c({img:b,x:(Le-C)/2,y:(Le-v)/2,scale:m})},b.src=a,()=>{w=!0}},[a]);function p(w){if(!w.type.startsWith("image/"))return;const b=new Image;b.onload=()=>{const m=Gr(b,Le),C=b.naturalWidth*m,v=b.naturalHeight*m;c({img:b,x:(Le-C)/2,y:(Le-v)/2,scale:m})},b.src=URL.createObjectURL(w)}function k(w){if(!i)return;w.preventDefault(),u.current={startX:w.clientX,startY:w.clientY,origX:i.x,origY:i.y};function b(C){if(!u.current)return;const{startX:v,startY:y,origX:L,origY:N}=u.current,T=C.clientX-v,j=C.clientY-y;c(A=>{if(!A)return A;const R={...A,x:L+T,y:N+j},P=Co(R,Le);return{...R,...P}})}function m(){u.current=null,document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",m)}document.addEventListener("mousemove",b),document.addEventListener("mouseup",m)}d.useEffect(()=>{const w=n.current;if(!w)return;function b(m){m.preventDefault();const C=m.deltaY>0?.95:1.05;c(v=>{if(!v)return v;const y=Gr(v.img,Le),L=Math.max(y,Math.min(v.scale*C,y*5)),N=Le/2,T=Le/2,j=N-(N-v.x)*(L/v.scale),A=T-(T-v.y)*(L/v.scale),R={...v,scale:L,x:j,y:A},P=Co(R,Le);return{...R,...P}})}return w.addEventListener("wheel",b,{passive:!1}),()=>w.removeEventListener("wheel",b)},[i==null]);function f(){if(!o.current||!i)return;const b=document.createElement("canvas");b.width=Le,b.height=Le;const m=b.getContext("2d");m.beginPath(),m.arc(Le/2,Le/2,Le/2,0,Math.PI*2),m.clip(),js(m,i,Le),e(b.toDataURL("image/png"))}return d.useEffect(()=>{function w(b){b.key==="Escape"&&t()}return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[t]),r.jsx("div",{className:"avatarCropOverlay",onClick:t,children:r.jsxs("div",{className:"avatarCropDialog",onClick:w=>w.stopPropagation(),children:[r.jsx("p",{className:"avatarCropTitle",children:h(l.settingsGeneralAvatarUploadLabel)}),i?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:n,className:"avatarCropCanvasWrap",onMouseDown:k,children:r.jsx("canvas",{ref:o,className:"avatarCropCanvas",width:Le,height:Le})}),r.jsx("p",{className:"avatarCropHint",children:h(l.sharedImageUploadDragHint)})]}):r.jsx("div",{className:"avatarCropUploadArea",onClick:()=>s.current?.click(),children:h(l.sharedImageUploadClickHint)}),r.jsx("input",{ref:s,type:"file",accept:"image/*",style:{display:"none"},onChange:w=>{const b=w.target.files?.[0];b&&p(b),w.target.value=""}}),r.jsxs("div",{className:"avatarCropActions",children:[r.jsx("button",{className:"confirmCancelButton",type:"button",onClick:t,children:h(l.sharedCommonCancel)}),i?r.jsx("button",{className:"primaryButton",type:"button",onClick:f,children:h(l.sharedCommonApply)}):null]})]})})}const Kr=960,Ms=360,ze=480,nt=180;function So(e,t,a){const o=e.img.naturalWidth*e.scale,n=e.img.naturalHeight*e.scale;return{x:Math.min(0,Math.max(t-o,e.x)),y:Math.min(0,Math.max(a-n,e.y))}}function Es(e,t,a,o){e.clearRect(0,0,a,o);const n=t.img.naturalWidth*t.scale,s=t.img.naturalHeight*t.scale,i=So(t,a,o);e.drawImage(t.img,i.x,i.y,n,s)}function qr(e,t,a){return Math.max(t/e.naturalWidth,a/e.naturalHeight)}function Ln({onSave:e,onClose:t,title:a,initialDataUrl:o}){const n=d.useRef(null),s=d.useRef(null),i=d.useRef(null),[c,u]=d.useState(null),h=d.useRef(null),{t:g}=U(),p=a??g(l.sharedSettingsCatsUploadCoverPhotoLabel),k=d.useCallback(()=>{const m=n.current?.getContext("2d");!m||!c||Es(m,c,ze,nt)},[c]);d.useEffect(()=>{k()},[k]),d.useEffect(()=>{if(!o)return;let m=!1;const C=new Image;return C.crossOrigin="anonymous",C.onload=()=>{if(m)return;const v=qr(C,ze,nt),y=C.naturalWidth*v,L=C.naturalHeight*v;u({img:C,x:(ze-y)/2,y:(nt-L)/2,scale:v})},C.src=o,()=>{m=!0}},[o]);function f(m){if(!m.type.startsWith("image/"))return;const C=new Image;C.onload=()=>{const v=qr(C,ze,nt),y=C.naturalWidth*v,L=C.naturalHeight*v;u({img:C,x:(ze-y)/2,y:(nt-L)/2,scale:v})},C.src=URL.createObjectURL(m)}function w(m){if(!c)return;m.preventDefault(),h.current={startX:m.clientX,startY:m.clientY,origX:c.x,origY:c.y};function C(y){if(!h.current)return;const{startX:L,startY:N,origX:T,origY:j}=h.current,A=y.clientX-L,R=y.clientY-N;u(P=>{if(!P)return P;const I={...P,x:T+A,y:j+R},O=So(I,ze,nt);return{...I,...O}})}function v(){h.current=null,document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",v)}document.addEventListener("mousemove",C),document.addEventListener("mouseup",v)}d.useEffect(()=>{const m=s.current;if(!m)return;function C(v){v.preventDefault();const y=v.deltaY>0?.95:1.05;u(L=>{if(!L)return L;const N=qr(L.img,ze,nt),T=Math.max(N,Math.min(L.scale*y,N*5)),j=ze/2,A=nt/2,R=j-(j-L.x)*(T/L.scale),P=A-(A-L.y)*(T/L.scale),I={...L,scale:T,x:R,y:P},O=So(I,ze,nt);return{...I,...O}})}return m.addEventListener("wheel",C,{passive:!1}),()=>m.removeEventListener("wheel",C)},[c==null]);function b(){if(!c)return;const m=document.createElement("canvas");m.width=Kr,m.height=Ms;const C=m.getContext("2d"),v=Kr/ze,y={img:c.img,x:c.x*v,y:c.y*v,scale:c.scale*v};Es(C,y,Kr,Ms),e(m.toDataURL("image/jpeg",.85))}return d.useEffect(()=>{function m(C){C.key==="Escape"&&t()}return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[t]),r.jsx("div",{className:"avatarCropOverlay",onClick:t,children:r.jsxs("div",{className:"avatarCropDialog coverCropDialog",onClick:m=>m.stopPropagation(),children:[r.jsx("p",{className:"avatarCropTitle",children:p}),c?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:s,className:"avatarCropCanvasWrap coverCropCanvasWrap",onMouseDown:w,children:r.jsx("canvas",{ref:n,className:"avatarCropCanvas coverCropCanvas",width:ze,height:nt})}),r.jsx("p",{className:"avatarCropHint",children:g(l.sharedImageUploadDragHint)})]}):r.jsx("div",{className:"avatarCropUploadArea coverCropUploadArea",onClick:()=>i.current?.click(),children:g(l.sharedImageUploadClickHint)}),r.jsx("input",{ref:i,type:"file",accept:"image/*",style:{display:"none"},onChange:m=>{const C=m.target.files?.[0];C&&f(C),m.target.value=""}}),r.jsxs("div",{className:"avatarCropActions",children:[r.jsx("button",{className:"confirmCancelButton",type:"button",onClick:t,children:g(l.sharedCommonCancel)}),c?r.jsx("button",{className:"primaryButton",type:"button",onClick:b,children:g(l.sharedCommonApply)}):null]})]})})}const Af="cats:draft-header:cover:",Lo="cats:cat-cover-updated";function er(e){return Af+e}function ba(e){if(!e)return null;try{return window.localStorage.getItem(er(e))}catch{return null}}function Tt(e,t){try{t==null?window.localStorage.removeItem(er(e)):window.localStorage.setItem(er(e),t)}catch{}window.dispatchEvent(new CustomEvent(Lo,{detail:{catId:e}}))}function Rn(e,t){if(!e)return()=>{};const a=e;function o(s){s.detail?.catId===a&&t(ba(a))}function n(s){s.key===er(a)&&t(ba(a))}return window.addEventListener(Lo,o),window.addEventListener("storage",n),()=>{window.removeEventListener(Lo,o),window.removeEventListener("storage",n)}}function Is(e){if(e.avatarUrl)return{backgroundImage:`url(${e.avatarUrl})`,backgroundSize:"cover",backgroundPosition:"center"};if(e.avatarColor)return{background:e.avatarColor}}function Bs(){return r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[r.jsx("path",{d:"M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"}),r.jsx("circle",{cx:"12",cy:"13",r:"4"})]})}function xf({variant:e="intro",eyebrow:t,title:a,description:o,supportingContent:n,actions:s,avatarName:i,avatarUrl:c,avatarColor:u,coverStorageKey:h,onAvatarSave:g,alwaysEditable:p=!1,readOnlyVisuals:k=!1}){const f=e==="profile"&&!!i,w=e==="profile"&&!!h,[b,m]=d.useState(null),[C,v]=d.useState(!1),[y,L]=d.useState(!1),{t:N}=U();d.useEffect(()=>{if(!w||!h){m(null);return}return m(ba(h)),Rn(h,m)},[h,w]);function T($){v(!1),h&&Tt(h,$)}function j($){L(!1),g?.($)}const A=(()=>{const $={};return b&&($.backgroundImage=`url(${b})`),u&&($["--cat-avatar-color"]=u),Object.keys($).length>0?$:void 0})(),R=["draftHeader",e==="profile"?"draftHeaderProfile":"draftHeaderIntro",w?"draftHeaderWithCover":null].filter(Boolean).join(" "),P=f&&!k&&typeof g=="function"&&(p||!c),I=w&&!k&&(p||!b),O=N(b?l.sharedDraftHeaderChangeCoverPhoto:l.sharedDraftHeaderAddCoverPhoto),E=N(c?l.sharedDraftHeaderChangeAvatar:l.sharedDraftHeaderAddAvatar);return r.jsxs("div",{className:R,children:[w?r.jsx("div",{className:`draftHeaderCover${b?" draftHeaderCoverLoaded":""}`,style:A,children:I?r.jsxs("button",{type:"button",className:"draftHeaderCoverAddButton",onClick:()=>v(!0),"aria-label":O,children:[r.jsx(Bs,{}),r.jsx("span",{children:O})]}):null}):null,f?r.jsx("div",{className:"draftHeaderVisual",children:P?r.jsxs("button",{type:"button",className:"draftHeaderAvatar draftHeaderAvatarEditable",style:Is({avatarUrl:c,avatarColor:u}),onClick:()=>L(!0),"aria-label":E,children:[c?null:r.jsx("span",{className:"draftHeaderAvatarInitials","aria-hidden":"true",children:fe(i??"")}),r.jsx("span",{className:"draftHeaderAvatarCameraBadge","aria-hidden":"true",children:r.jsx(Bs,{})})]}):r.jsx("div",{className:"draftHeaderAvatar",style:Is({avatarUrl:c,avatarColor:u}),"aria-hidden":"true",children:c?null:fe(i??"")})}):null,r.jsxs("div",{className:"draftHeaderBody",children:[t?r.jsx("p",{className:"eyebrow",children:t}):null,r.jsxs("div",{className:"draftHeaderTitleRow",children:[r.jsx("h1",{className:"draftHeaderTitle",children:a}),s?r.jsx("div",{className:"draftHeaderActions",children:s}):null]}),o?r.jsx("p",{className:"heroNote",children:o}):null,n?r.jsx("div",{className:"draftHeaderSupportingContent",children:n}):null]}),C?r.jsx(Ln,{onSave:T,onClose:()=>v(!1),initialDataUrl:b}):null,y?r.jsx(Qt,{onSave:j,onClose:()=>L(!1),initialDataUrl:c}):null]})}function Ge(e){return`/api/cats/${encodeURIComponent(e)}/companion-box`}async function Tf(e,t){const a=await fetch(Ge(e),{headers:{Accept:"application/json"},signal:t});return de(a,`companion box summary returned ${a.status}`)}async function Df(e,t){const a=await fetch(`${Ge(e)}/sources`,{headers:{Accept:"application/json"},signal:t});return(await de(a,`companion sources list returned ${a.status}`)).sources??[]}async function Nf(e,t,a){const o=await fetch(`${Ge(e)}/sources`,{method:"POST",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(t),signal:a});return de(o,`companion source create returned ${o.status}`)}async function jf(e,t,a,o){const n=await fetch(`${Ge(e)}/sources/${encodeURIComponent(t)}`,{method:"PUT",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(a),signal:o});return de(n,`companion source update returned ${n.status}`)}async function Mf(e,t,a){const o=await fetch(`${Ge(e)}/sources/${encodeURIComponent(t)}`,{method:"DELETE",headers:{Accept:"application/json"},signal:a});return de(o,`companion source delete returned ${o.status}`)}async function Ef(e,t){const a=await fetch(`${Ge(e)}/profile`,{headers:{Accept:"application/json"},signal:t});return(await de(a,`companion profile read-model returned ${a.status}`)).profile}async function If(e,t){const a=await fetch(`${Ge(e)}/activity`,{headers:{Accept:"application/json"},signal:t});return(await de(a,`companion activity returned ${a.status}`)).activity}async function Fs(e,t){const a=await fetch(`${Ge(e)}/memory`,{headers:{Accept:"application/json"},signal:t});return(await de(a,`companion memory list returned ${a.status}`)).memory??[]}async function Bf(e,t,a){const o=await fetch(`${Ge(e)}/memory`,{method:"POST",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(t),signal:a});return de(o,`companion memory create returned ${o.status}`)}async function Ff(e,t,a){const o=await fetch(`${Ge(e)}/memory/${encodeURIComponent(t)}`,{method:"DELETE",headers:{Accept:"application/json"},signal:a});if(!o.ok)throw new Error(`companion memory delete returned ${o.status}`)}async function Of(e,t){const a=await fetch(`${Ge(e)}/response-profile`,{headers:{Accept:"application/json"},signal:t});return de(a,`companion response profile returned ${a.status}`)}async function Wf(e,t,a){const o=await fetch(`${Ge(e)}/response-profile`,{method:"PATCH",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(t),signal:a});return de(o,`companion response profile update returned ${o.status}`)}const Uf={entries:[],olderHidden:!1};function Hf(e){const[t,a]=d.useState(null),[o,n]=d.useState(!1),[s,i]=d.useState(null),[c,u]=d.useState(0),h=d.useRef(null);return d.useEffect(()=>{if(!e.enabled){a(null),n(!1),i(null);return}h.current?.abort();const g=new AbortController;return h.current=g,n(!0),i(null),If(e.catId,g.signal).then(p=>{g.signal.aborted||(a(p),n(!1))}).catch(p=>{g.signal.aborted||(i(p instanceof Error?p.message:String(p)),n(!1))}),()=>{g.abort()}},[e.catId,e.enabled,c]),{projection:e.enabled?t??Uf:null,loading:o,error:s,refresh:()=>u(g=>g+1)}}const _f=Fe("en");function Gf(e){switch(e){case"ready":return"awake";case"initializing":return"waking_up";case"error":return"error";default:return"sleeping"}}function Kf(e){switch(e){case"awake":return l.chatLifecycleAwakeLabel;case"waking_up":return l.chatLifecycleWakingUpLabel;case"error":return l.chatLifecycleNeedsAttentionLabel;default:return l.chatLifecycleSleepingLabel}}function Os(e,t=_f){return t(Kf(e))}function qf(e){switch(e){case"awake":return"isAwake";case"waking_up":return"isWaking";case"error":return"isErrored";default:return"isSleeping"}}function $f(e,t){const{t:a}=U();return d.useMemo(()=>{const o=t.chat.channels.find(i=>i.channelKind==="direct_message"&&i.defaultRecipientCatId===e);if(!o)return{presence:"sleeping",label:Os("sleeping",a),className:"isSleeping",canWake:!0,canSleep:!1};const n=o.defaultRecipientLeaseStatus??null,s=Gf(n);return{presence:s,label:Os(s,a),className:qf(s),canWake:s==="sleeping"||s==="error",canSleep:s==="awake"}},[e,t.chat.channels,a])}const zf={posts:[],photos:[],videos:[],music:[],files:[]};function Vf(e){const[t,a]=d.useState(null),[o,n]=d.useState(!1),[s,i]=d.useState(null),[c,u]=d.useState(0),h=d.useRef(null);return d.useEffect(()=>{if(!e.enabled){a(null),n(!1),i(null);return}h.current?.abort();const g=new AbortController;return h.current=g,n(!0),i(null),Ef(e.catId,g.signal).then(p=>{g.signal.aborted||(a(p),n(!1))}).catch(p=>{g.signal.aborted||(i(p instanceof Error?p.message:String(p)),n(!1))}),()=>{g.abort()}},[e.catId,e.enabled,c]),{profile:e.enabled?t??zf:null,loading:o,error:s,refresh:()=>u(g=>g+1)}}function Yf(e,t){const[a,o]=d.useState(null),[n,s]=d.useState([]),[i,c]=d.useState([]),[u,h]=d.useState(null),[g,p]=d.useState(!1),[k,f]=d.useState(null),w=d.useRef(null),b=d.useRef(0),{t:m}=U(),C=d.useCallback(async R=>{w.current?.abort();const P=new AbortController;w.current=P;const I=P.signal;p(!0),f(null);try{switch(R){case"overview":{const[O,E]=await Promise.all([Tf(e,I),Fs(e,I)]);I.aborted||(o(O),c(E));break}case"resources":{const O=await Df(e,I);I.aborted||s(O);break}case"memory":{const O=await Fs(e,I);I.aborted||c(O);break}case"settings":{const O=await Of(e,I);I.aborted||h(O);break}}}catch(O){I.aborted||f(O instanceof Error?O.message:m(l.chatCompanionWorkspaceLoadError))}finally{I.aborted||p(!1)}},[e,m]);d.useEffect(()=>(C(t),()=>{w.current?.abort()}),[t,e,C]);const v=d.useCallback(()=>{b.current+=1,C(t)},[t,C]),y=d.useCallback(async R=>{await Nf(e,R),v()},[e,v]),L=d.useCallback(async(R,P)=>{await jf(e,R,P),v()},[e,v]),N=d.useCallback(async R=>{await Mf(e,R),v()},[e,v]),T=d.useCallback(async R=>{await Bf(e,R),v()},[e,v]),j=d.useCallback(async R=>{await Ff(e,R),v()},[e,v]),A=d.useCallback(async R=>{const P=await Wf(e,R);h(P)},[e]);return{summary:a,sources:n,memory:i,responseProfile:u,loading:g,error:k,refreshTab:v,addSource:y,editSource:L,removeSource:N,addMemory:T,removeMemory:j,editResponseProfile:A}}const Ws=[{id:"posts",labelKey:l.chatCompanionFeedTabPosts},{id:"photos",labelKey:l.chatCompanionFeedTabPhotos},{id:"videos",labelKey:l.chatCompanionFeedTabVideos},{id:"music",labelKey:l.chatCompanionFeedTabMusic},{id:"files",labelKey:l.chatCompanionFeedTabFiles},{id:"activity",labelKey:l.chatCompanionFeedTabActivity}],Wa={photo:l.chatCompanionFeedSurfacePhotoLabel,video:l.chatCompanionFeedSurfaceVideoLabel,music:l.chatCompanionFeedSurfaceMusicLabel,file:l.chatCompanionFeedSurfaceFileLabel};function Qf({catName:e,translate:t}){return r.jsx("div",{className:"companionEmptyState",children:r.jsx("p",{children:t(l.chatCompanionFeedPostEmptyState,{catName:e})})})}function yc({surfaceLabel:e,translate:t}){return r.jsx("div",{className:"companionEmptyState",children:r.jsx("p",{children:t(l.chatCompanionFeedMediaEmptyState,{type:e})})})}function Jf({translate:e}){return r.jsx("div",{className:"companionEmptyState",children:r.jsx("p",{children:e(l.chatCompanionFeedActivityEmptyState)})})}function Xf(e){try{return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}}function Zf(e,t){const a=e?.entries??[];return a.length===0?r.jsx(Jf,{translate:t}):r.jsxs("div",{className:"companionActivityList",children:[r.jsx("ul",{children:a.map(o=>r.jsxs("li",{className:"companionActivityEntry","data-group":o.group,children:[r.jsx("time",{className:"companionActivityTimestamp",dateTime:o.occurredAt,children:Xf(o.occurredAt)}),r.jsx("span",{className:"companionActivitySummary",children:o.summary}),o.count>1?r.jsxs("span",{className:"companionActivityCount",children:["×",o.count]}):null]},o.id))}),e?.olderHidden?r.jsx("p",{className:"companionActivityHidden",children:t(l.chatCompanionFeedActivityHiddenState)}):null]})}function ew(e,t,a,o){const s=(e?.posts??[]).filter(i=>i.status==="active");return s.length===0?r.jsx(Qf,{catName:t,translate:a}):r.jsx("div",{className:"companionProfilePostList",children:s.map(i=>r.jsxs("article",{className:"companionProfilePostCard",children:[r.jsxs("header",{className:"companionProfilePostHeader",children:[r.jsx("h3",{className:"companionProfilePostTitle",children:i.title}),r.jsx("time",{className:"companionProfilePostTimestamp",dateTime:i.publishedAt,children:i.publishedAt})]}),i.body?r.jsx("p",{className:"companionProfilePostBody",children:i.body}):null,i.tags.length>0?r.jsx("ul",{className:"companionProfilePostTags",children:i.tags.map(c=>r.jsx("li",{children:c},c))}):null,i.mediaRefs.length>0?r.jsx("div",{className:"companionProfilePostMediaGrid","aria-label":o(i.mediaRefs.length),children:i.mediaRefs.map(c=>r.jsx("span",{className:"companionProfilePostMediaTile","data-kind":c.kind,"data-id":c.id},`${c.kind}:${c.id}`))}):null]},i.id))})}function $r(e,t,a,o,n){const s=e??[];return s.length===0?r.jsx(yc,{surfaceLabel:a,translate:o}):r.jsx("ul",{className:`companionProfileMediaList companionProfileMediaList--${t}`,"aria-label":n,children:s.map(i=>r.jsxs("li",{className:"companionProfileMediaTile",children:[r.jsx("span",{className:"companionProfileMediaTitle",children:i.title}),i.mimeType?r.jsx("span",{className:"companionProfileMediaMime",children:i.mimeType}):null]},i.id))})}function tw(e,t,a,o){const n=e??[];return n.length===0?r.jsx(yc,{surfaceLabel:t,translate:a}):r.jsx("ul",{className:"companionProfileFileList","aria-label":o,children:n.map(s=>r.jsxs("li",{className:"companionProfileFileRow",children:[r.jsx("span",{className:"companionProfileFileTitle",children:s.title}),s.mimeType?r.jsx("span",{className:"companionProfileFileMime",children:s.mimeType}):null]},s.id))})}function aw({cat:e,profile:t=null,activity:a=null}){const[o,n]=d.useState("posts"),{t:s}=U(),i={photo:s(Wa.photo),video:s(Wa.video),music:s(Wa.music),file:s(Wa.file)},c=(h,g)=>s(l.chatCompanionFeedMediaItemsLabel,{count:h,surface:g});d.useEffect(()=>{Ws.some(h=>h.id===o)||n("posts")},[o]);let u;switch(o){case"posts":u=ew(t,e.name,s,h=>c(h,s(l.chatCompanionFeedMediaItemDefaultLabel)));break;case"photos":u=$r(t?.photos,"photo",i.photo,s,c(t?.photos?.length??0,i.photo));break;case"videos":u=$r(t?.videos,"video",i.video,s,c(t?.videos?.length??0,i.video));break;case"music":u=$r(t?.music,"music",i.music,s,c(t?.music?.length??0,i.music));break;case"files":u=tw(t?.files,i.file,s,c(t?.files?.length??0,i.file));break;case"activity":u=Zf(a,s);break}return r.jsxs("div",{className:"companionFeed",children:[r.jsx("nav",{className:"companionFeedTabs",role:"tablist","aria-label":s(l.chatCompanionFeedNavAriaLabel),children:Ws.map(h=>r.jsx("button",{type:"button",role:"tab","aria-selected":o===h.id,className:o===h.id?"companionFeedTab companionFeedTabActive":"companionFeedTab",onClick:()=>n(h.id),children:s(h.labelKey)},h.id))}),r.jsx("div",{className:"companionFeedContent",children:u})]})}function rw({companionMode:e,onToggle:t}){const{t:a}=U();return r.jsxs("div",{className:"companionModeToggle",role:"group","aria-label":a(l.chatCompanionModeToggleDirectLaneAriaLabel),children:[r.jsx("button",{type:"button",className:"channelActionIconButton companionModeToggleSegment","aria-pressed":!e,"aria-label":a(l.chatCompanionModeToggleChatViewAriaLabel),"data-tooltip":a(l.chatCompanionModeToggleChatViewAriaLabel),onClick:()=>{e&&t()},children:r.jsx("svg",{className:"channelActionIconGlyph",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:r.jsx("path",{d:"M2.5 4.5a1.5 1.5 0 0 1 1.5-1.5h8a1.5 1.5 0 0 1 1.5 1.5v5a1.5 1.5 0 0 1-1.5 1.5H7l-3 2.5V11H4a1.5 1.5 0 0 1-1.5-1.5z"})})}),r.jsx("button",{type:"button",className:"channelActionIconButton companionModeToggleSegment","aria-pressed":e,"aria-label":a(l.chatCompanionModeToggleCompanionViewAriaLabel),"data-tooltip":a(l.chatCompanionModeToggleCompanionViewAriaLabel),onClick:()=>{e||t()},children:r.jsxs("svg",{className:"channelActionIconGlyph",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[r.jsx("circle",{cx:"8",cy:"6",r:"2.75"}),r.jsx("path",{d:"M2.75 13.25a5.25 5.25 0 0 1 10.5 0"})]})})]})}function ow(e){try{return new Date(e).toLocaleDateString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}}function nw({summary:e,recentMemory:t,presence:a,onWake:o,onSleep:n,loading:s}){const{t:i}=U(),c={identity:i(l.chatCompanionMemoryCategoryIdentity),preference:i(l.chatCompanionMemoryCategoryPreference),relationship:i(l.chatCompanionMemoryCategoryRelationship),fact:i(l.chatCompanionMemoryCategoryFact),event:i(l.chatCompanionMemoryCategoryEvent),owner_note:i(l.chatCompanionMemoryCategoryOwnerNote),all:i(l.chatCompanionMemoryFilterAll)};if(s&&!e)return r.jsx("div",{className:"companionSection companionLoading",children:i(l.chatCompanionOverviewLoadingState)});const u=t.slice(0,5);return r.jsxs("div",{className:"companionSection companionOverview",children:[r.jsxs("div",{className:"companionCard companionPresenceCard",children:[r.jsx("div",{className:"companionCardHeader",children:i(l.chatCompanionOverviewPresenceTitle)}),r.jsxs("div",{className:"companionPresenceRow",children:[r.jsxs("span",{className:`companionPresenceLarge ${a.className}`,children:[r.jsx("span",{className:"companionPresenceDot"}),a.label]}),a.canWake&&r.jsx("button",{type:"button",className:"companionActionButton",onClick:o,children:i(l.chatCompanionOverviewPresenceWakeButton)}),a.canSleep&&r.jsx("button",{type:"button",className:"companionActionButton companionActionSecondary",onClick:n,children:i(l.chatCompanionOverviewPresenceSleepButton)})]})]}),e&&r.jsxs("div",{className:"companionCard companionStatsCard",children:[r.jsx("div",{className:"companionCardHeader",children:i(l.chatCompanionOverviewSummaryTitle)}),r.jsxs("ul",{className:"companionStatsList",children:[r.jsxs("li",{children:[r.jsx("strong",{children:e.sourceCount})," ",i(l.chatCompanionOverviewSummaryResourceLabel)]}),r.jsxs("li",{children:[r.jsx("strong",{children:e.derivedCount})," ",i(l.chatCompanionOverviewSummaryCreationLabel)]}),r.jsxs("li",{children:[r.jsx("strong",{children:e.memoryCount})," ",i(l.chatCompanionOverviewSummaryMemoryLabel)]})]})]}),r.jsxs("div",{className:"companionCard companionRecentMemoryCard",children:[r.jsx("div",{className:"companionCardHeader",children:i(l.chatCompanionOverviewRecentMemoriesTitle)}),u.length===0?r.jsx("p",{className:"companionEmpty",children:i(l.chatCompanionOverviewEmptyState)}):r.jsx("ul",{className:"companionMemoryList",children:u.map(h=>r.jsxs("li",{className:"companionMemoryItem",children:[r.jsx("span",{className:"companionMemoryCategory",children:c[h.category]??h.category}),r.jsx("span",{className:"companionMemoryContent",children:h.content}),r.jsx("span",{className:"companionMemoryDate",children:ow(h.updatedAt)})]},h.id))})]})]})}function sw(e){try{return new Date(e).toLocaleDateString(void 0,{month:"short",day:"numeric"})}catch{return e}}function iw(e){switch(e){case"note":return"note";case"conversation_log":return"conversation_log";case"article":return"article";case"image":return"image";case"video":return"video";case"audio":return"audio";case"path_ref":return"path_ref";default:return"unknown"}}function lw({sources:e,loading:t,onAddSource:a,onDeleteSource:o}){const[n,s]=d.useState(!1),[i,c]=d.useState(""),[u,h]=d.useState(""),[g,p]=d.useState(""),[k,f]=d.useState(!1),{t:w}=U(),b={note:w(l.chatCompanionResourcesSourceKindNote),conversation_log:w(l.chatCompanionResourcesSourceKindConversationLog),article:w(l.chatCompanionResourcesSourceKindArticle),image:w(l.chatCompanionResourcesSourceKindImage),video:w(l.chatCompanionResourcesSourceKindVideo),audio:w(l.chatCompanionResourcesSourceKindAudio),path_ref:w(l.chatCompanionResourcesSourceKindPath),unknown:w(l.chatCompanionResourcesSourceKindUnknown)};async function m(C){if(C.preventDefault(),!(!i.trim()&&!u.trim()&&!g.trim())){f(!0);try{await a({kind:"note",storageMode:"imported_copy",title:i.trim()||void 0,ownerNote:u.trim()||void 0,textContent:g.trim()||void 0}),c(""),h(""),p(""),s(!1)}finally{f(!1)}}}return t&&e.length===0?r.jsx("div",{className:"companionSection companionLoading",children:w(l.chatCompanionResourcesLoadingState)}):r.jsxs("div",{className:"companionSection companionResources",children:[r.jsxs("div",{className:"companionSectionHeader",children:[r.jsx("span",{children:w(l.chatCompanionResourcesSectionTitle)}),r.jsx("button",{type:"button",className:"companionActionButton",onClick:()=>s(!n),children:w(n?l.chatCompanionResourcesActionCancel:l.chatCompanionResourcesActionShowForm)})]}),n&&r.jsxs("form",{className:"companionCard companionForm",onSubmit:m,children:[r.jsx("input",{type:"text",className:"companionInput",placeholder:w(l.chatCompanionResourcesFormTitlePlaceholder),value:i,onChange:C=>c(C.target.value)}),r.jsx("input",{type:"text",className:"companionInput",placeholder:w(l.chatCompanionResourcesFormNotePlaceholder),value:u,onChange:C=>h(C.target.value)}),r.jsx("textarea",{className:"companionTextarea",placeholder:w(l.chatCompanionResourcesFormContentPlaceholder),value:g,onChange:C=>p(C.target.value),rows:4}),r.jsx("button",{type:"submit",className:"companionActionButton",disabled:k||!i.trim()&&!u.trim()&&!g.trim(),children:w(k?l.chatCompanionResourcesActionBusy:l.chatCompanionResourcesActionAddResource)})]}),e.length===0?r.jsx("p",{className:"companionEmpty",children:w(l.chatCompanionResourcesEmptyState)}):r.jsx("ul",{className:"companionSourceList",children:e.map(C=>r.jsxs("li",{className:"companionCard companionSourceCard",children:[r.jsxs("div",{className:"companionSourceHeader",children:[r.jsx("span",{className:"companionSourceKind",children:b[iw(C.kind)]}),r.jsx("span",{className:"companionSourceTitle",children:C.title||C.originalFileName||w(l.chatCompanionResourcesUntitledSource)}),r.jsx("span",{className:"companionSourceDate",children:sw(C.updatedAt)})]}),C.ownerNote&&r.jsx("p",{className:"companionSourceNote",children:C.ownerNote}),C.linkedPath&&r.jsx("span",{className:"companionSourcePath",children:C.linkedPath}),r.jsx("div",{className:"companionSourceActions",children:r.jsx("button",{type:"button",className:"companionDangerButton",onClick:()=>o(C.id),children:w(l.chatCompanionResourcesActionRemove)})})]},C.id))})]})}const Us=["identity","preference","relationship","fact","event","owner_note"];function cw(e){try{return new Date(e).toLocaleDateString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}}function dw({memory:e,loading:t,onAddMemory:a,onDeleteMemory:o}){const[n,s]=d.useState(null),[i,c]=d.useState(!1),[u,h]=d.useState("fact"),[g,p]=d.useState(""),[k,f]=d.useState(!1),{t:w}=U(),b={identity:w(l.chatCompanionMemoryCategoryIdentity),preference:w(l.chatCompanionMemoryCategoryPreference),relationship:w(l.chatCompanionMemoryCategoryRelationship),fact:w(l.chatCompanionMemoryCategoryFact),event:w(l.chatCompanionMemoryCategoryEvent),owner_note:w(l.chatCompanionMemoryCategoryOwnerNote),all:w(l.chatCompanionMemoryFilterAll)},m=n?e.filter(v=>v.category===n):e;async function C(v){if(v.preventDefault(),!!g.trim()){f(!0);try{await a({category:u,content:g.trim(),summary:null,sourceIds:[],metadata:{}}),p(""),c(!1)}finally{f(!1)}}}return t&&e.length===0?r.jsx("div",{className:"companionSection companionLoading",children:w(l.chatCompanionMemoryLoadingState)}):r.jsxs("div",{className:"companionSection companionMemory",children:[r.jsxs("div",{className:"companionSectionHeader",children:[r.jsx("span",{children:w(l.chatCompanionMemorySectionTitle)}),r.jsx("button",{type:"button",className:"companionActionButton",onClick:()=>c(!i),children:w(i?l.chatCompanionMemoryActionCancel:l.chatCompanionMemoryActionAdd)})]}),i&&r.jsxs("form",{className:"companionCard companionForm",onSubmit:C,children:[r.jsx("select",{className:"companionSelect",value:u,onChange:v=>h(v.target.value),children:Us.map(v=>r.jsx("option",{value:v,children:b[v]},v))}),r.jsx("textarea",{className:"companionTextarea",placeholder:w(l.chatCompanionMemoryFormPlaceholder),value:g,onChange:v=>p(v.target.value),rows:3}),r.jsx("button",{type:"submit",className:"companionActionButton",disabled:k||!g.trim(),children:w(k?l.chatCompanionMemoryActionBusy:l.chatCompanionMemoryActionAddSubmit)})]}),r.jsxs("div",{className:"companionFilterBar",children:[r.jsxs("button",{type:"button",className:`companionFilterPill ${n?"":"isActive"}`,onClick:()=>s(null),children:[b.all," (",e.length,")"]}),Us.map(v=>{const y=e.filter(L=>L.category===v).length;return y===0?null:r.jsxs("button",{type:"button",className:`companionFilterPill ${n===v?"isActive":""}`,onClick:()=>s(n===v?null:v),children:[b[v]," (",y,")"]},v)})]}),m.length===0?r.jsx("p",{className:"companionEmpty",children:e.length===0?w(l.chatCompanionMemoryEmptyState):w(l.chatCompanionMemoryEmptyFilterState)}):r.jsx("ul",{className:"companionMemoryList companionMemoryListFull",children:m.map(v=>r.jsxs("li",{className:"companionCard companionMemoryCard",children:[r.jsxs("div",{className:"companionMemoryCardHeader",children:[r.jsx("span",{className:"companionMemoryCategory",children:b[v.category]??b.all}),r.jsx("span",{className:"companionMemoryDate",children:cw(v.updatedAt)})]}),r.jsx("p",{className:"companionMemoryContent",children:v.content}),v.summary&&r.jsx("p",{className:"companionMemorySummary",children:v.summary}),r.jsx("button",{type:"button",className:"companionDangerButton",onClick:()=>o(v.id),children:w(l.chatCompanionMemoryActionRemove)})]},v.id))})]})}const uw=[{value:"animalistic",label:"animalistic"},{value:"anthropomorphic",label:"anthropomorphic"},{value:"mixed",label:"mixed"}],pw=[{value:"text",label:"text"},{value:"audio_clip",label:"audio_clip"},{value:"tts",label:"tts"},{value:"mixed",label:"mixed"}];function hw({catId:e,responseProfile:t,payload:a,loading:o,onUpdateResponseProfile:n}){const[s,i]=d.useState(t?.notes??""),[c,u]=d.useState(!1),{t:h}=U(),g={animalistic:h(l.chatCompanionSettingsExpressionModeAnimalistic),anthropomorphic:h(l.chatCompanionSettingsExpressionModeAnthropomorphic),mixed:h(l.chatCompanionSettingsExpressionModeMixed)},p={text:h(l.chatCompanionSettingsOutputModeText),audio_clip:h(l.chatCompanionSettingsOutputModeAudioClip),tts:h(l.chatCompanionSettingsOutputModeTts),mixed:h(l.chatCompanionSettingsOutputModeMixed)},k={polling:h(l.sharedSettingsCatsBindingPollingMode),webhook:h(l.sharedSettingsCatsBindingWebhookMode)},f=h(l.chatCompanionSettingsTelegramBindingDefaultMode),w=a.chat.botBindings?.find(v=>v.catId===e);async function b(v){u(!0);try{await n({expressionMode:v})}finally{u(!1)}}async function m(v){u(!0);try{await n({outputMode:v})}finally{u(!1)}}async function C(){u(!0);try{await n({notes:s.trim()||null})}finally{u(!1)}}return o&&!t?r.jsx("div",{className:"companionSection companionLoading",children:h(l.chatCompanionSettingsLoadingState)}):r.jsxs("div",{className:"companionSection companionSettings",children:[r.jsxs("div",{className:"companionCard",children:[r.jsx("div",{className:"companionCardHeader",children:h(l.chatCompanionSettingsResponseProfileTitle)}),r.jsxs("div",{className:"companionFormRow",children:[r.jsx("label",{className:"companionLabel",children:h(l.chatCompanionSettingsExpressionModeLabel)}),r.jsx("div",{className:"companionPillGroup",children:uw.map(({value:v,label:y})=>r.jsx("button",{type:"button",className:`companionPill ${t?.expressionMode===v?"isActive":""}`,onClick:()=>b(v),disabled:c,children:g[y]},v))})]}),r.jsxs("div",{className:"companionFormRow",children:[r.jsx("label",{className:"companionLabel",children:h(l.chatCompanionSettingsOutputModeLabel)}),r.jsx("div",{className:"companionPillGroup",children:pw.map(({value:v,label:y})=>r.jsx("button",{type:"button",className:`companionPill ${t?.outputMode===v?"isActive":""}`,onClick:()=>m(v),disabled:c,children:p[y]},v))})]}),r.jsxs("div",{className:"companionFormRow",children:[r.jsx("label",{className:"companionLabel",children:h(l.chatCompanionSettingsResponseNotesLabel)}),r.jsx("textarea",{className:"companionTextarea",placeholder:h(l.chatCompanionSettingsResponseNotesPlaceholder),value:s,onChange:v=>i(v.target.value),rows:3}),r.jsx("button",{type:"button",className:"companionActionButton",onClick:C,disabled:c||s===(t?.notes??""),children:h(c?l.chatCompanionSettingsResponseNotesSaving:l.chatCompanionSettingsResponseNotesSave)})]})]}),r.jsxs("div",{className:"companionCard",children:[r.jsx("div",{className:"companionCardHeader",children:h(l.chatCompanionSettingsTelegramBindingTitle)}),w?r.jsxs("div",{className:"companionTelegramInfo",children:[r.jsxs("p",{children:[r.jsxs("strong",{children:[h(l.chatCompanionSettingsTelegramBindingBotLabel)," "]}),w.botName??h(l.chatCompanionSettingsTelegramBindingConnected)]}),r.jsxs("p",{children:[r.jsxs("strong",{children:[h(l.chatCompanionSettingsTelegramBindingModeLabel)," "]}),w.inboundMode?k[w.inboundMode]??w.inboundMode:f]}),r.jsxs("p",{className:"companionMuted",children:[h(l.chatCompanionSettingsTelegramBindingManageHint),r.jsx(Nt,{to:"/settings/cats",children:h(l.chatCompanionSettingsTelegramBindingSettingsLabel)}),h(l.chatCompanionSettingsTelegramBindingSuffix)]})]}):r.jsxs("p",{className:"companionEmpty",children:[h(l.chatCompanionSettingsNoTelegramBindingState),r.jsx(Nt,{to:"/settings/cats",children:h(l.chatCompanionSettingsTelegramBindingSettingsLabel)}),h(l.chatCompanionSettingsTelegramBindingSuffix)]})]})]})}function mw({payload:e,cat:t,onBackToChat:a,onWake:o,onSleep:n,onCatAvatarSave:s,onDirectMessage:i,onStartNewChatWithCat:c,hideFeed:u=!1,hideCompanionToggle:h=!1}){const[g,p]=d.useState(!1),[k,f]=d.useState("overview"),{t:w}=U(),b=$f(t.id,e),m=Yf(t.id,k??"overview"),C=Vf({catId:t.id,enabled:!0}),v=Hf({catId:t.id,enabled:!0}),y=d.useCallback(()=>{o(t.id)},[t.id,o]),L=d.useCallback(()=>{n(t.id)},[t.id,n]),N=fe(t.name),T=t.avatarUrl?{backgroundImage:`url(${t.avatarUrl})`,backgroundSize:"cover",backgroundPosition:"center"}:t.avatarColor?{background:t.avatarColor}:void 0;function j(I){return r.jsxs(r.Fragment,{children:[m.error?r.jsxs("div",{className:"companionError",children:[m.error,r.jsx("button",{type:"button",className:"companionActionButton",onClick:m.refreshTab,children:w(l.chatCompanionWorkspaceRetryLabel)})]}):null,I]})}const A={overview:j(r.jsx(nw,{summary:m.summary,recentMemory:m.memory,presence:b,onWake:y,onSleep:L,loading:m.loading})),resources:j(r.jsx(lw,{sources:m.sources,loading:m.loading,onAddSource:m.addSource,onDeleteSource:m.removeSource})),memory:j(r.jsx(dw,{memory:m.memory,loading:m.loading,onAddMemory:m.addMemory,onDeleteMemory:m.removeMemory})),settings:j(r.jsx(hw,{catId:t.id,responseProfile:m.responseProfile,payload:e,loading:m.loading,onUpdateResponseProfile:m.editResponseProfile})),inspector:j(r.jsx("div",{className:"companionEmptyState",children:r.jsx("p",{children:w(l.chatCompanionWorkspaceNoSelectionState)})}))},R=_r.map(I=>({id:I,title:Pf(I,w),children:A[I]}));d.useEffect(()=>{k!==null&&!_r.includes(k)&&f(_r[0]??null)},[k]);function P(I){f(O=>O===I?null:I)}return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"viewShell viewShellChannel","data-conversation-mode":"direct_message","data-layout-mode":"companion",children:[r.jsxs("header",{className:"channelTopBar",children:[r.jsx("div",{className:"channelTopBarStart",children:r.jsx("div",{className:"rosterAvatars rosterAvatarsExpanded",children:r.jsx("div",{className:"catAvatar","data-tooltip":t.name,style:T,children:t.avatarUrl?null:N})})}),r.jsx("div",{className:"channelTopBarCenter",children:r.jsx("span",{className:"channelTopBarTitle channelTopBarTitleDirectLane",children:t.name})}),r.jsxs("div",{className:"channelTopBarEnd",children:[h?null:r.jsx(rw,{companionMode:!0,onToggle:a}),r.jsx("button",{className:"sidePanelToggle",type:"button",onClick:()=>p(I=>!I),"aria-label":w(l.chatTopBarToggleSidePanelAriaLabel),"aria-pressed":g,children:r.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M10 2v12"}),r.jsx("rect",{x:"2",y:"2",width:"12",height:"12",rx:"2"})]})})]})]}),r.jsxs("div",{className:"companionContent",children:[r.jsx(xf,{variant:"profile",title:t.name,avatarName:t.name,avatarUrl:t.avatarUrl,avatarColor:t.avatarColor,coverStorageKey:t.id,onAvatarSave:s?I=>s(t.id,I):void 0,alwaysEditable:!0,actions:r.jsxs(r.Fragment,{children:[r.jsxs("button",{type:"button",className:"companionHeaderAction companionHeaderActionPrimary",onClick:()=>i?.(t.id),disabled:!i,children:[r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:r.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})}),w(l.conversationSidebarDirectMessageButton)]}),r.jsx("button",{type:"button",className:"companionHeaderAction companionHeaderActionIconOnly",onClick:()=>c?.(t.id),disabled:!c,"aria-label":w(l.chatSidebarPrimaryActionNewChat),title:w(l.chatSidebarPrimaryActionNewChat),children:r.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[r.jsx("path",{d:"M8 3v10"}),r.jsx("path",{d:"M3 8h10"})]})})]})}),u?null:r.jsx(aw,{cat:t,profile:C.profile,activity:v.projection})]})]}),g?r.jsx(Ch,{title:w(l.chatCompanionWorkspaceSidePanelTitle),activeSection:k,onSectionToggle:P,onClose:()=>p(!1),position:"side",className:"chatPaneSidePanel chatPaneSidePanelBelowBar",sections:R}):null]})}function gw({catId:e}){const{t}=U();return r.jsx("div",{className:"screen screenCentered entityComingSoonScreen",children:r.jsxs("section",{className:"entityComingSoonPanel",children:[r.jsx("h1",{children:t(l.catProfileNotFoundTitle)}),r.jsx("p",{className:"entityComingSoonBody",children:t(l.catProfileNotFoundBody,{catId:e})})]})})}function fw(){const{catId:e}=lr(),t=Ne(),[a,o]=d.useState(null);if(d.useEffect(()=>{let w=!1;return Ze().then(b=>{w||o(b)}).catch(()=>{}),()=>{w=!0}},[]),!a||!e)return r.jsx("div",{className:"catProfilePageBoot"});const n=a.chat.cats.find(w=>w.id===e);if(!n)return r.jsx(gw,{catId:e});const s=!kf(n),i=()=>{Ze().then(w=>o(w)).catch(()=>{})},c=(w,b)=>{Re(w,{avatarUrl:b}).then(()=>i()).catch(()=>{})},u=()=>{},h=()=>{},g=()=>{t("/entities/cats")},p=pr("chat"),k=w=>{t(Sn(p,w))},f=w=>{t(Cf(p,w))};return r.jsx(mw,{payload:a,cat:n,onBackToChat:g,onWake:u,onSleep:h,onCatAvatarSave:c,onDirectMessage:k,onStartNewChatWithCat:f,hideFeed:s,hideCompanionToggle:!0})}function vc(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function kt(e){if(!e)return;const t=Object.entries(e).filter(([,a])=>vc(a));if(t.length!==0)return Object.fromEntries(t)}function ww(e,t,a){if(!e||!a)return kt(a);const o=e.controls.filter(i=>!i.applicableEntryIds||i.applicableEntryIds.length===0||i.applicableEntryIds.includes(t)),n=new Map(o.map(i=>[i.key,i])),s=Object.entries(a).filter(([i,c])=>{const u=n.get(i);return!u||!vc(c)?!1:u.kind!=="enum"||typeof c!="string"||!u.values?.length?!0:u.values.some(h=>h.value===c&&(!h.applicableEntryIds||h.applicableEntryIds.length===0||h.applicableEntryIds.includes(t)))});return s.length>0?Object.fromEntries(s):void 0}function Ro(e){const t=on(e.provider,e.model)??"";return t?(e.provider==="claude"&&e.backend==="cli"&&e.catalog.models.some(a=>a.id==="opus"),t):null}function kw(e){const t=e.advancedCatalog?.backend??e.catalog.backend,a=Ro({provider:e.target.provider,backend:t,catalog:e.catalog,model:e.target.model}),o=tr(e.target.modelSelection);if(o?.entryId){const n=Ro({provider:e.target.provider,backend:t,catalog:e.catalog,model:o.entryId});n&&(o.entryId=n)}return{...e.target,...a?{model:a}:{},...o?{modelSelection:o}:{}}}function bw(e,t,a){return a?e.presets.some(o=>o.id===a&&(!o.applicableEntryIds||o.applicableEntryIds.length===0||o.applicableEntryIds.includes(t))):!1}function Hs(e,t,a){return!e||!a||!bw(e,t,a)?null:e.presets.find(o=>o.id===a)??null}function tr(e){return e?{...e.entryId?{entryId:e.entryId}:{},entryMode:e.entryMode,...e.presetId?{presetId:e.presetId}:{},...kt(e.controls)?{controls:kt(e.controls)}:{}}:null}function yw(e){return e?{entryId:e.entryId,model:e.model,entryMode:e.entryMode,...e.presetId?{presetId:e.presetId}:{},...kt(e.controls)?{controls:kt(e.controls)}:{},...e.supportTier?{supportTier:e.supportTier}:{},warnings:[...e.warnings]}:null}function Cc(e,t={}){const a=e?.trim();if(!a)return null;const o=kt(t.controls);return{entryId:a,entryMode:"explicit",...t.presetId?.trim()?{presetId:t.presetId.trim()}:{},...o?{controls:o}:{}}}function vw(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;const a=kt(e.controls),o=kt(t.controls);return e.entryMode===t.entryMode&&(e.entryId??null)===(t.entryId??null)&&(e.presetId??null)===(t.presetId??null)&&JSON.stringify(a??null)===JSON.stringify(o??null)}function Pn(e,t){const a=t.trim();return a&&e.instances.some(o=>o.id===a)||a&&e.instances.length===0?a:(a&&e.instances.length>0&&console.warn(`Unknown provider instance "${a}" for ${e.id}, falling back to default`),e.defaultInstance??e.instances[0]?.id??"")}function Sc(e){const t=Ro({provider:e.catalog.provider,backend:e.catalog.backend,catalog:e.catalog,model:e.model})??"";return!t||e.modelSelection?!1:!e.catalog.models.some(a=>a.id===t)}function Cw(e){const t=kw({target:e.target,catalog:e.catalog,advancedCatalog:e.advancedCatalog}),a=(e.catalog.instance??t.instance)||"",o=t.model?.trim()||"",n=e.catalog.models.some(y=>y.id===t.model),s=Sc({catalog:e.catalog,model:t.model,modelSelection:t.modelSelection}),i=e.preserveCurrentModel&&n?t.model:e.preserveCurrentModel&&s?o:sn(e.catalog);if(s&&e.preserveCurrentModel)return{provider:t.provider,instance:a,model:o,modelSelection:null,modelResolution:null};const c=e.advancedCatalog??null,h=e.preserveCurrentSelection??e.preserveCurrentModel?tr(t.modelSelection):tr(c?.defaultSelection)??null,g=h?.entryId?.trim(),p=g&&e.catalog.models.some(y=>y.id===g)?g:i,k=Hs(c,p,h?.presetId),f=k?.preferredEntryId?.trim(),w=h?.entryMode==="auto"&&f&&e.catalog.models.some(y=>y.id===f)?f:p,b=Hs(c,w,k?.id),m=ww(c,w,h?.controls),C=h?{entryId:w,entryMode:h.entryMode,...b?{presetId:b.id}:{},...m?{controls:m}:{}}:Cc(w,{presetId:void 0,controls:m}),v=c?.warnings.length?[...c.warnings]:[];return{provider:t.provider,instance:a,model:w,modelSelection:C,modelResolution:C?{entryId:w,model:w,entryMode:C.entryMode,...b?{presetId:b.id}:{},...m?{controls:m}:{},...c?{supportTier:c.support.tier}:{},warnings:v}:null}}function Sw(e){switch(e){case"token":return"token text";case"chunk":return"chunk text";case"line":return"line text";case"final":return"final-only text";default:return null}}function ta(e,t){switch(t){case"native":return e;case"derived":return`derived ${e}`;default:return null}}function Lw(e){switch(e.presentation.recommended){case"event_tape":return"Recommended host view: event tape.";case"content_blocks":return"Recommended host view: content blocks.";case"final_message":return"Recommended host view: final message.";default:return null}}function Rw(e){if(!e)return null;const t=[Sw(e.normalizedStream.text.mode),ta("tool use",e.normalizedStream.toolUse),ta("tool results",e.normalizedStream.toolResult),ta("progress",e.normalizedStream.progress),ta("reasoning",e.normalizedStream.reasoning),ta("transcript blocks",e.transcript.contentBlocks)].filter(n=>!!n),a=[];t.length>0&&a.push(`Runtime event surface: ${t.join(", ")}.`);const o=Lw(e);return o&&a.push(o),a.length===0&&e.notes[0]?e.notes[0]:a.length>0?a.join(" "):null}const Pw=3e4;function zr(e,t,a){return{provider:e,backend:null,instance:t?.trim()||null,defaultModel:null,source:"config",cache:null,models:[],warnings:a?[a]:[]}}function qa(e,t,a){return{provider:e,backend:null,instance:t?.trim()||null,defaultModel:null,source:"config",cache:null,entries:[],presets:[],controls:[],defaultSelection:null,support:{tier:"entry_only",notes:[]},warnings:a?[a]:[]}}function Aw(e=[]){return{state:"ready",providers:fm(),...e.length>0?{warnings:e}:{}}}function _s(e){return{state:e.state,providers:Array.isArray(e.providers)?e.providers:[],recovery:e.recovery,warnings:Array.isArray(e.warnings)?e.warnings:[]}}function xw(e,t=zt){return e.providersLoaded?(e.providerCount??0)>0?t(l.sharedProviderModelFieldSelectProviderHint):e.registryState==="runtime_unreachable"?t(l.sharedProviderModelFieldProviderLoadFailed):t(l.sharedProviderModelFieldNoProviders):t(l.sharedProviderModelFieldLoadingProviders)}function Tw(e,t=zt){return e.providersLoaded?e.registry.providers.length>0?Po(e.registry.warnings?.[0],t)??t(l.sharedProviderModelFieldRegistryStaleHint):e.registry.state==="runtime_unreachable"?Po(e.registry.warnings?.[0],t)??t(l.sharedProviderModelFieldRegistryLoadFailedHint):t(l.sharedProviderModelFieldRegistryEmptyHint):t(l.sharedProviderModelFieldRegistryCheckingHint)}function Po(e,t=zt){if(!e)return null;const a=yg(e);if(a!==null)return t(l.sharedProviderModelFieldRegistryCachedRefreshFailedHint,{message:Po(a,t)??a});switch(e){case ic:return t(l.sharedProviderModelFieldRegistryUsingProductCatalogHint);case kg:return t(l.sharedProviderModelFieldRegistryStaleHint);case Za:return t(l.sharedProviderModelFieldProviderLoadFailed);case lc:return t(l.sharedProviderModelFieldRegistryLoadFailedHint);default:return e}}function Lc(e){const t=e.recovery?.openRuntimeSetupPath?.trim();return t||null}function Dw(e){return Rc(e)===0}function Rc(e){if(!e.providersLoaded||e.providerCount>0&&e.registryState!=="runtime_unreachable"||e.registryState==="ready"||!e.retryable||!e.documentVisible||e.registryState!=="runtime_unreachable"&&!e.hasSetupHref)return null;const t=e.now-e.lastAutoRecheckAt;return Math.max(0,Pw-t)}function Nw(e,t){return!e.applicableEntryIds||e.applicableEntryIds.length===0||e.applicableEntryIds.includes(t)}function Pc(e,t){return!e.applicableEntryIds||e.applicableEntryIds.length===0||e.applicableEntryIds.includes(t)}function jw(e,t){return!e.applicableEntryIds||e.applicableEntryIds.length===0||e.applicableEntryIds.includes(t)}function Mw(e){return`${typeof e}:${String(e)}`}function Ta(e,t){const a=[],o=new Map,n=[];for(const s of e.values??[]){const i=Mw(s.value);a.includes(i)||a.push(i),jw(s,t)&&o.set(i,s)}for(const s of a){const i=o.get(s);i&&n.push(i)}return n}function Ew(e,t){return Ta(e,t).some(a=>typeof a.label=="string"&&/\(default\)/iu.test(a.label))}function Iw(e,t,a){const o=Ao(a);if(o)return o;const n=Ta(e,t).find(s=>typeof s.label=="string"&&/\(default\)/iu.test(s.label));return n?String(n.value):""}function Bw(e,t){if(e.kind==="number"){const a=Number(t);return Number.isFinite(a)?a:0}return e.kind==="boolean"?t==="true":t}function Ao(e){return typeof e=="boolean"?e?"true":"false":typeof e=="number"?String(e):typeof e=="string"?e:""}function Fw(e,t,a){return Cc(e,{presetId:t,controls:a})}const An="__custom_legacy_model__";function Ow(e){return e==="full"?{labelKey:l.sharedProviderModelSupportAdvanced,tone:"advanced"}:e==="read_only"?{labelKey:l.sharedProviderModelSupportReadOnly,tone:"readOnly"}:null}function Ww(e){const t=e?.trim();if(!t)return"";const a=t.toLowerCase();return a==="available"||a==="supported"?"":a==="preview"||a==="deprecated"||a==="unavailable"?` (${a})`:` (${t})`}function Uw(e){return`${e.label}${Ww(e.status)}`}function Da(e,t){return e.filter(a=>a.scope!=="request"&&Pc(a,t)).map(a=>({...a,...a.kind==="enum"&&a.values?{values:Ta(a,t)}:{}}))}function Hw(e,t){return e.filter(a=>a.scope==="request"&&Pc(a,t)).length}function Ac(e,t,a){if(!a)return;const o=Da(e,t),n=new Map(o.map(i=>[i.key,i])),s=Object.entries(a).filter(([i,c])=>{const u=n.get(i);return u?u.kind!=="enum"||!u.values?.length?!0:Ta(u,t).some(h=>h.value===c):!1});return s.length>0?Object.fromEntries(s):void 0}function _w(e,t){return e.values?.find(o=>o.value===t)?.label??String(t)}function Gw(e){const t=e.modelSelection?.controls;if(!e.entryId||!t)return null;const a=Da(e.controls,e.entryId),o=new Map(a.map(s=>[s.key,s])),n=new Map(e.controls.map(s=>[s.key,s]));for(const[s,i]of Object.entries(t)){const c=o.get(s),u=n.get(s),h=c?.label??u?.label??s;if(!c)return`${h} is not supported by ${e.entryId}; Cats will use the model default instead.`;if(c.kind==="enum"&&c.values?.length&&!c.values.some(g=>g.value===i))return`${h} value ${_w(u??c,i)} is not supported by ${e.entryId}; Cats will use the model default instead.`}return null}function Kw(e){const{entryId:t,modelSelection:a,effectiveAdvancedCatalog:o}=e;if(!t)return;const n=Da(o.controls,t);if(n.length===0)return;const s={},i=o.defaultSelection?.entryId===t?o.defaultSelection.controls:void 0;for(const c of n){const u=a?.controls?.[c.key];if(u!==void 0){s[c.key]=u;continue}const h=i?.[c.key];h!==void 0&&(s[c.key]=h)}return Object.keys(s).length>0?s:void 0}function qw(e){return e.catalog.source==="static"?!1:Sc(e)}function $w(e){const t=tr(e.target.modelSelection);if(!t)return e.target;const a=Ac(e.controls,t.entryId??e.target.model,t.controls);return a?t.controls=a:delete t.controls,{...e.target,modelSelection:t,modelResolution:yw(e.target.modelResolution)}}function xc(e){const t=e.model?.trim()||"",o=(e.effectiveAdvancedCatalog.entries.length>0?e.effectiveAdvancedCatalog.entries:e.effectiveCatalog.models).find(u=>u.id===t)?.label??null,n=t?Da(e.effectiveAdvancedCatalog.controls,t):[],s=Kw({entryId:t,modelSelection:e.modelSelection??null,effectiveAdvancedCatalog:e.effectiveAdvancedCatalog}),i=Gl(s,n),c=cn(e.provider,e.instance,e.model,null,i,o);return Hl({provider:e.provider,instance:e.instance,model:e.model,modelSelection:e.modelSelection??null,executionLabel:c}),c}function ar(e){const t=e.target.model?.trim()??"";return t?{...e.target,executionLabel:xc({provider:e.target.provider,instance:e.target.instance,model:t,modelSelection:e.target.modelSelection??null,effectiveCatalog:e.effectiveCatalog,effectiveAdvancedCatalog:e.effectiveAdvancedCatalog})}:{...e.target,executionLabel:null}}function zw(e){return e.catalogSource==="static"&&e.advancedCatalogSource==="static"&&(!!e.model||!!e.modelSelection)}function Vw(e){return e.entryCount>0||e.isLegacyModelTarget}function Gs(e){return e?.trim()||""}function Yw(e){return e.instanceOptions.length>1}function Qw(e){return e.instanceOptions.find(t=>t.id===e.resolvedInstance)?.eventCapabilities??null}function Ks(e){return e.catalogProvider===e.provider&&Gs(e.catalogInstance)===Gs(e.instance)}function Jw(e){const{provider:t,instance:a,catalog:o,advancedCatalogResult:n,modelsResult:s,translate:i=zt}=e;if(n.status==="fulfilled")return n.value;if(s.status==="fulfilled"){const c=km(o);return{...c,warnings:[...c.warnings,n.reason instanceof Error?n.reason.message:i(l.sharedProviderModelFieldAdvancedCatalogUnavailable)]}}return qa(t,a,n.reason instanceof Error?n.reason.message:i(l.sharedProviderModelFieldAdvancedCatalogUnavailable))}function Xw(e,t,a){return a?[]:e.presets.filter(o=>Nw(o,t))}function Zw(e){const{control:t,currentValues:a,rawValue:o}=e;if(o)return{...a,[t.key]:Bw(t,o)};const n=Object.entries(a).filter(([s])=>s!==t.key);return n.length>0?Object.fromEntries(n):void 0}function ek(e){const{selectedProvider:t,instance:a,model:o,modelSelection:n,catalogLoading:s,providersLoaded:i,providerRegistry:c,effectiveCatalog:u,effectiveAdvancedCatalog:h,isLegacyModelTarget:g,translate:p=zt}=e,k=t?Pn(t,a):"",f=h.entries.length>0?h.entries:u.models,w=Vw({entryCount:f.length,isLegacyModelTarget:g}),b=t?t.instances.some(Q=>Q.id===k)?t.instances:k?[{id:k,label:k,target:k,backend:null},...t.instances]:t.instances:[],m=Yw({instanceOptions:b}),C=Qw({resolvedInstance:k,instanceOptions:b}),v=Rw(C),y=f.some(Q=>Q.id===o)?o:f[0]?.id??"",L=g?An:y||"",N=Xw(h,y,g),T=!g&&N.some(Q=>Q.id===n?.presetId)?n?.presetId??"":"",j=g?[]:Da(h.controls,y),A=g?null:Gw({controls:h.controls,entryId:y,modelSelection:n}),R=g?0:Hw(h.controls,y),P=n?.controls??{},I=Ow(h.support.tier),O=g?[]:f.find(Q=>Q.id===y)?.notes??[],E=h.warnings[0]??u.warnings[0]??null,$=xw({providersLoaded:i,registryState:c.state,providerCount:c.providers.length},p),G=c.providers.length>0,ee=t?p(s?l.sharedProviderModelFieldLoadingModels:w?l.sharedProviderModelFieldSelectModel:l.sharedProviderModelFieldNoModels):i?c.state==="runtime_unreachable"&&!G?p(l.sharedProviderModelFieldRetryProvidersFirst):p(l.sharedProviderModelFieldSelectProviderFirst):p(l.sharedProviderModelFieldWaitingProviders),B=Tw({providersLoaded:i,registry:c},p),q=Lc(c),F=i&&c.providers.length===0&&c.recovery?.retryable!==!1;return{resolvedInstance:k,instanceOptions:b,showInstanceField:m,selectedInstanceCapabilitySummary:v,entryOptions:f,selectedCatalogEntryId:y,selectedEntryId:L,presetOptions:N,selectedPresetId:T,controlOptions:j,unsupportedSelectionWarning:A,requestScopedControlCount:R,controlValues:P,supportBadge:I,selectedEntryNotes:O,primaryCatalogWarning:E,providerPlaceholder:$,modelPlaceholder:ee,providerRegistryHint:B,providerRegistrySetupHref:q,canRetryProviderRegistry:F,allowLegacyManualModelEntry:w}}function tk(e){const{controlOptions:t,selectedCatalogEntryId:a,controlValues:o,onControlChange:n}=e,{t:s}=U();return t.map(i=>{const c=o[i.key];if(i.kind==="boolean")return r.jsxs("label",{className:"fieldLabel providerControlField",children:[r.jsx("span",{children:i.label}),r.jsxs("select",{className:"textInput",value:Ao(c),onChange:u=>n(i,u.target.value),children:[r.jsx("option",{value:"",children:s(l.sharedProviderModelControlDefault)}),r.jsx("option",{value:"true",children:s(l.sharedProviderModelControlEnabled)}),r.jsx("option",{value:"false",children:s(l.sharedProviderModelControlDisabled)})]}),i.description?r.jsx("span",{className:"fieldHint",children:i.description}):null]},i.key);if(i.kind==="enum"&&i.values&&i.values.length>0){const u=Ta(i,a),h=!Ew(i,a),g=Iw(i,a,c);return r.jsxs("label",{className:"fieldLabel providerControlField",children:[r.jsx("span",{children:i.label}),r.jsxs("select",{className:"textInput",value:g,onChange:p=>n(i,p.target.value),children:[h?r.jsx("option",{value:"",children:s(l.sharedProviderModelControlDefault)}):null,u.map((p,k)=>r.jsx("option",{value:String(p.value),children:p.label},`${i.key}-${String(p.value)}-${k}`))]}),i.description?r.jsx("span",{className:"fieldHint",children:i.description}):null]},i.key)}return r.jsxs("label",{className:"fieldLabel providerControlField",children:[r.jsx("span",{children:i.label}),r.jsx("input",{className:"textInput",type:i.kind==="number"?"number":"text",value:Ao(c),min:i.kind==="number"?i.minimum:void 0,max:i.kind==="number"?i.maximum:void 0,step:i.kind==="number"?i.step??1:void 0,placeholder:s(l.sharedProviderModelControlOptionalPlaceholder),onChange:u=>n(i,u.target.value)}),i.description?r.jsx("span",{className:"fieldHint",children:i.description}):null]},i.key)})}function mt(){return globalThis.catsDesktopHost??null}function xn(){return mt()!==null}function ya({href:e,onClick:t,onOpenError:a,...o}){const n=s=>{t?.(s),!(s.defaultPrevented||!mt()?.openBrowserHandoff)&&(s.preventDefault(),ak(e).catch(c=>{if(a){a(c);return}globalThis.console?.error("Failed to open authenticated browser path.",c)}))};return r.jsx("a",{...o,href:e,onClick:n})}async function ak(e){const t=mt();if(!t?.openBrowserHandoff)throw new Error("Desktop browser handoff is unavailable.");const a=await fetch("/api/auth/browser-handoff",{method:"POST",credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({returnTo:e})});if(!a.ok)throw new Error(`Browser handoff request failed with HTTP ${a.status}.`);const o=await a.json();if(typeof o.launchPath!="string"||!o.launchPath.trim())throw new Error("Browser handoff response is invalid.");const n=o.launchMode==="handoff"&&typeof o.expiresAt=="string"&&!!o.expiresAt.trim(),s=o.launchMode==="direct"&&o.expiresAt===null;if(!n&&!s)throw new Error("Browser handoff response is invalid.");await t.openBrowserHandoff(o.launchPath)}function rk(e){const{t}=U(),[a,o]=Ii.useState(!1),{providerRegistryHint:n,canRetryProviderRegistry:s,providerRegistrySetupHref:i,forceReloadProviderRegistry:c,hideRetry:u=!1}=e,h=s&&!u;return r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"fieldHint",children:n}),h?r.jsxs("div",{className:"providerCatalogRecoveryActions",children:[r.jsx("button",{className:"secondaryButton",type:"button",onClick:()=>c(),children:t(l.sharedCommonRetry)}),i?r.jsx(ya,{className:"secondaryButton",href:i,target:"_blank",rel:"noreferrer",onClick:()=>o(!1),onOpenError:()=>o(!0),children:t(l.sharedProviderModelFieldOpenRuntimeSetupLabel)}):null]}):i?r.jsx("div",{className:"providerCatalogRecoveryActions",children:r.jsx(ya,{className:"secondaryButton",href:i,target:"_blank",rel:"noreferrer",onClick:()=>o(!1),onOpenError:()=>o(!0),children:t(l.sharedProviderModelFieldOpenRuntimeSetupLabel)})}):null,a?r.jsx("span",{className:"fieldHint",role:"alert",children:t(l.settingsRuntimeBrowserHandoffError)}):null]})}function Tc(e){return e===Xl||e===Zl||e===ec||e===tc}function ok(e,t){return e instanceof Error?Tc(e.message)?t:e.message:t}function nk(e,t){return e instanceof Error&&Tc(e.message)?new Error(t):e}function Vr(e,t,a){return Ol(e,{instance:t,...a?{warnings:[a]}:{}})}function Yr(e,t,a){return wm(e,{instance:t,...a?{warnings:[a]}:{}})}function qs(e,t,a){const o=a(l.sharedProviderModelFieldRuntimeCatalogUnavailable,{catalogKind:t});return a(l.sharedProviderModelFieldRuntimeCatalogUnavailableWarning,{catalogKind:t,message:ok(e,o)})}function $s(e,t,a){if(!a||!e)return null;const o=t||null,n=mg({provider:e,instance:o}),s=gg({provider:e,instance:o});return n&&s?{models:n,advanced:s}:null}function sk(e){const t=e.translate??zt,a=$s(e.provider,e.resolvedInstance,e.hasSelectedProvider),[o,n]=d.useState(!!e.provider&&!a),[s,i]=d.useState(()=>a?.models??(e.hasSelectedProvider&&e.provider?Vr(e.provider,e.resolvedInstance||null):zr(e.provider,e.resolvedInstance||null))),[c,u]=d.useState(()=>a?.advanced??(e.hasSelectedProvider&&e.provider?Yr(e.provider,e.resolvedInstance||null):qa(e.provider,e.resolvedInstance||null)));d.useEffect(()=>{let f=!1;if(!e.hasSelectedProvider||!e.provider)return i(zr(e.provider,e.resolvedInstance||null)),u(qa(e.provider,e.resolvedInstance||null)),n(!1),()=>{f=!0};const w=$s(e.provider,e.resolvedInstance,e.hasSelectedProvider);return w?(i(w.models),u(w.advanced),n(!1)):(i(Vr(e.provider,e.resolvedInstance||null)),u(Yr(e.provider,e.resolvedInstance||null)),n(!0)),Promise.allSettled([e.fetchProviderModels(e.provider,e.resolvedInstance||null),e.fetchAdvancedProviderModels(e.provider,e.resolvedInstance||null)]).then(([b,m])=>{if(f)return;const C=b.status==="fulfilled"?b.value:Vr(e.provider,e.resolvedInstance||null,qs(b.reason,t(l.sharedProviderModelFieldCatalogKindModel),t));if(i(C),m.status==="fulfilled"||b.status==="fulfilled"){const v=t(l.sharedProviderModelFieldAdvancedCatalogUnavailable);u(Jw({provider:e.provider,instance:e.resolvedInstance||null,catalog:C,advancedCatalogResult:m.status==="rejected"?{status:"rejected",reason:nk(m.reason,v)}:m,modelsResult:b,translate:t}))}else u(Yr(e.provider,e.resolvedInstance||null,qs(m.reason,t(l.sharedProviderModelFieldCatalogKindAdvancedModel),t)));n(!1)}),()=>{f=!0}},[e.fetchAdvancedProviderModels,e.fetchProviderModels,e.hasSelectedProvider,e.provider,e.resolvedInstance,t]);const h=zr(e.provider,e.resolvedInstance||null),g=qa(e.provider,e.resolvedInstance||null),p=Ks({catalogProvider:s.provider,catalogInstance:s.instance,provider:e.provider,instance:e.resolvedInstance})?s:h,k=Ks({catalogProvider:c.provider,catalogInstance:c.instance,provider:e.provider,instance:e.resolvedInstance})?c:g;return{catalogLoading:o,effectiveCatalog:p,effectiveAdvancedCatalog:k}}function ik(e){const{providerOptions:t,provider:a,resolvedInstance:o,model:n,persistedLegacyModelTarget:s,selectedCatalogEntryId:i,selectedPresetId:c,presetOptions:u,controlValues:h,effectiveControls:g,effectiveCatalog:p,effectiveAdvancedCatalog:k,markManualSelection:f,markLegacyManualSelection:w,clearManualSelection:b,onTargetChange:m}=e,C=d.useCallback(R=>{const P=R.model??i,I=Ac(g,P,R.controls),O=R.presetId??null,E=Fw(P,O,I);f(),m(ar({target:{provider:a,instance:R.instance??o,model:P,modelSelection:E},effectiveCatalog:p,effectiveAdvancedCatalog:k}))},[k,p,g,f,m,a,o,i]),v=d.useCallback((R,P)=>{w(),m(ar({target:{provider:a,instance:P??o,model:R,modelSelection:null},effectiveCatalog:p,effectiveAdvancedCatalog:k}))},[k,p,w,m,a,o]),y=d.useCallback(R=>{const P=t.find(O=>O.id===R)??null;if(!P)return;const I=Pn(P,"");b(),m({provider:P.id,instance:I,model:"",modelSelection:null})},[b,m,t]),L=d.useCallback(R=>{b(),m({provider:a,instance:R,model:"",modelSelection:null})},[b,m,a]),N=d.useCallback(R=>{if(R===An){v(s?n:"");return}C({model:R,presetId:null,controls:void 0})},[v,C,n,s]),T=d.useCallback(R=>{v(R)},[v]),j=d.useCallback(R=>{const P=u.find(I=>I.id===R)??null;C({presetId:P?.id??null,controls:P?.controlDefaults?{...P.controlDefaults}:void 0})},[C,u]),A=d.useCallback((R,P)=>{C({presetId:c||null,controls:Zw({control:R,currentValues:h,rawValue:P})})},[h,C,c]);return{onProviderChange:y,onInstanceChange:L,onModelEntryChange:N,onLegacyModelChange:T,onPresetChange:j,onControlChange:A}}function lk(e){const{providersLoaded:t,providerCount:a,registryState:o,retryable:n,providerRegistrySetupHref:s,lastAutoProviderRegistryRecheckAt:i,reloadProviderRegistry:c}=e;d.useEffect(()=>{const u=globalThis,h=u.window,g=u.document;if(!h||!g)return;const p=h,k=g;function f(){const m=Date.now();Dw({providersLoaded:t,providerCount:a,registryState:o,retryable:n,hasSetupHref:!!s,documentVisible:k.visibilityState!=="hidden",lastAutoRecheckAt:i,now:m})&&c({markAutoRecheckAt:m})}const w=Rc({providersLoaded:t,providerCount:a,registryState:o,retryable:n,hasSetupHref:!!s,documentVisible:k.visibilityState!=="hidden",lastAutoRecheckAt:i,now:Date.now()}),b=w===null?null:setTimeout(f,w);return p.addEventListener("focus",f),k.addEventListener("visibilitychange",f),()=>{b!==null&&clearTimeout(b),p.removeEventListener("focus",f),k.removeEventListener("visibilitychange",f)}},[i,a,s,t,o,n,c])}function ck(e){const t=Ng(),a=t?_s(t):Aw([ic]),[o,n]=d.useState(a.providers),[s,i]=d.useState(()=>a),[c,u]=d.useState(!0),[h,g]=d.useState(0),[p,k]=d.useState(0),f=d.useRef(e.onProviderRegistryChange),w=d.useRef(0),b=d.useRef(a.providers);d.useEffect(()=>{f.current=e.onProviderRegistryChange},[e.onProviderRegistryChange]);function m(L,N){if(L!==w.current)return;const T=_s(N),j=T.state==="runtime_unreachable"&&T.providers.length===0&&b.current.length>0?{...T,providers:b.current}:T;b.current=j.providers,n(j.providers),i(j),u(!0),f.current?.(j)}function C(L,N){if(L!==w.current)return;const T=N instanceof Error?N.message:Za;i(j=>{const A=(j.warnings??[]).filter(I=>I!==T),P={state:"runtime_unreachable",providers:j.providers.length>0?j.providers:[],recovery:{retryable:!0},warnings:[...A,T]};return b.current=P.providers,f.current?.(P),P}),u(!0)}d.useEffect(()=>{let L=!1;const N=++w.current;return e.fetchProviderRegistry().then(T=>{L||m(N,T)}).catch(T=>{L||C(N,T)}),()=>{L=!0}},[e.fetchProviderRegistry,h]);function v(L){L?.markAutoRecheckAt!==void 0&&k(L.markAutoRecheckAt),g(N=>N+1)}function y(L){L?.markAutoRecheckAt!==void 0&&k(L.markAutoRecheckAt);const N=++w.current;e.fetchProviderRegistry({force:!0}).then(T=>{m(N,T)}).catch(T=>{C(N,T)})}return{providers:o,providerRegistry:s,providersLoaded:c,lastAutoProviderRegistryRecheckAt:p,reloadProviderRegistry:v,forceReloadProviderRegistry:y}}function dk(e){const[t,a]=d.useState(null),o=d.useRef(null),n=d.useRef(""),s=d.useRef(e.onTargetChange);d.useEffect(()=>{s.current=e.onTargetChange},[e.onTargetChange]);const i=`${e.provider}::${e.resolvedInstance}`,c=!e.catalogLoading&&qw({catalog:e.effectiveCatalog,model:e.model,modelSelection:e.modelSelection}),u=t===i||c,h=t===i&&(e.model?.trim()||"").length===0&&!e.modelSelection,g=o.current===i||!!e.modelSelection||u;d.useEffect(()=>{e.hasSelectedProvider&&(n.current!==i&&(n.current=i,o.current=null,a(null)),e.resolvedInstance&&e.resolvedInstance!==e.instance&&s.current(ar({target:{provider:e.provider,instance:e.resolvedInstance,model:e.model,modelSelection:e.modelSelection},effectiveCatalog:e.effectiveCatalog,effectiveAdvancedCatalog:e.effectiveAdvancedCatalog})))},[e.effectiveAdvancedCatalog,e.effectiveCatalog,e.hasSelectedProvider,e.instance,e.model,e.modelSelection,e.provider,e.resolvedInstance,i]),d.useEffect(()=>{if(e.effectiveCatalog.models.length===0||h||zw({catalogSource:e.effectiveCatalog.source,advancedCatalogSource:e.effectiveAdvancedCatalog.source,model:e.model,modelSelection:e.modelSelection}))return;const b=Cw({target:{provider:e.provider,instance:e.resolvedInstance,model:e.model,modelSelection:e.modelSelection},catalog:e.effectiveCatalog,advancedCatalog:e.effectiveAdvancedCatalog,preserveCurrentModel:g,preserveCurrentSelection:g}),m=$w({target:b,controls:e.effectiveAdvancedCatalog.controls});(m.instance!==e.instance||m.model!==e.model||!vw(m.modelSelection,e.modelSelection))&&s.current(ar({target:m,effectiveCatalog:e.effectiveCatalog,effectiveAdvancedCatalog:e.effectiveAdvancedCatalog}))},[e.effectiveAdvancedCatalog,e.effectiveCatalog,e.instance,e.model,e.modelSelection,e.provider,e.resolvedInstance,g,i,h]);function p(){o.current=null,a(null)}function k(){o.current=i,a(null)}function f(){o.current=i,a(i)}return{persistedLegacyModelTarget:c,isLegacyModelTarget:u,clearManualSelection:p,markManualSelection:k,markLegacyManualSelection:f}}function Dc({provider:e,instance:t,model:a,modelSelection:o,onTargetChange:n,fetchProviderRegistry:s,fetchProviderModels:i,fetchAdvancedProviderModels:c,onProviderRegistryChange:u,hideInlineRetry:h=!1,onRegistryRecoveryChange:g}){const{t:p}=U(),{providers:k,providerRegistry:f,providersLoaded:w,lastAutoProviderRegistryRecheckAt:b,reloadProviderRegistry:m,forceReloadProviderRegistry:C}=ck({fetchProviderRegistry:s,onProviderRegistryChange:u}),v=k,y=v.find(Y=>Y.id===e)??null,L=y?Pn(y,t):"",{catalogLoading:N,effectiveCatalog:T,effectiveAdvancedCatalog:j}=sk({provider:e,resolvedInstance:L,hasSelectedProvider:!!y,fetchProviderModels:i,fetchAdvancedProviderModels:c,translate:p}),{persistedLegacyModelTarget:A,isLegacyModelTarget:R,clearManualSelection:P,markManualSelection:I,markLegacyManualSelection:O}=dk({provider:e,instance:t,model:a,modelSelection:o,resolvedInstance:L,hasSelectedProvider:!!y,catalogLoading:N,effectiveCatalog:T,effectiveAdvancedCatalog:j,onTargetChange:n}),{entryOptions:E,instanceOptions:$,showInstanceField:G,selectedInstanceCapabilitySummary:ee,selectedCatalogEntryId:B,selectedEntryId:q,presetOptions:F,selectedPresetId:Q,controlOptions:me,unsupportedSelectionWarning:W,requestScopedControlCount:D,controlValues:_,supportBadge:J,selectedEntryNotes:X,primaryCatalogWarning:oe,providerPlaceholder:we,modelPlaceholder:Ee,providerRegistryHint:Ae,providerRegistrySetupHref:M,canRetryProviderRegistry:H,allowLegacyManualModelEntry:V}=ek({selectedProvider:y,instance:t,model:a,modelSelection:o,catalogLoading:N,providersLoaded:w,providerRegistry:{...f,providers:v},effectiveCatalog:T,effectiveAdvancedCatalog:j,isLegacyModelTarget:R,translate:p});lk({providersLoaded:w,providerCount:v.length,registryState:f.state,retryable:f.recovery?.retryable!==!1,providerRegistrySetupHref:M,lastAutoProviderRegistryRecheckAt:b,reloadProviderRegistry:m});const Se=d.useRef(C);Se.current=C;const z=d.useMemo(()=>()=>Se.current(),[]),Ke=d.useRef(g);Ke.current=g,d.useEffect(()=>{Ke.current?.({canRetry:H,retry:z,setupHref:M})},[H,M,z]),d.useEffect(()=>()=>{Ke.current?.(null)},[]);const{onProviderChange:dt,onInstanceChange:vt,onModelEntryChange:Jt,onLegacyModelChange:x,onPresetChange:Ct,onControlChange:Xt}=ik({providerOptions:v,provider:e,resolvedInstance:L,model:a,persistedLegacyModelTarget:A,selectedCatalogEntryId:B,selectedPresetId:Q,presetOptions:F,controlValues:_,effectiveControls:j.controls,effectiveCatalog:T,effectiveAdvancedCatalog:j,markManualSelection:I,markLegacyManualSelection:O,clearManualSelection:P,onTargetChange:n});return d.useEffect(()=>{const Y=a.trim();if(!y||!Y)return;const ke=xm({provider:e,instance:L,model:Y,modelSelection:o??null}),Te=xc({provider:e,instance:L,model:Y,modelSelection:o??null,effectiveCatalog:T,effectiveAdvancedCatalog:j});ke!==Te&&n({provider:e,instance:L,model:Y,modelSelection:o??null,executionLabel:Te})},[j,T,a,o,n,e,L,y]),r.jsxs(r.Fragment,{children:[r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:p(l.sharedProviderModelFieldProviderLabel)}),r.jsx("select",{className:"textInput",value:y?.id??"",disabled:v.length===0,onChange:Y=>dt(Y.target.value),children:v.length===0?r.jsx("option",{value:"",children:we}):r.jsxs(r.Fragment,{children:[y?null:r.jsx("option",{value:"",disabled:!0,children:p(l.sharedProviderModelFieldSelectProviderHint)}),v.map(Y=>r.jsx("option",{value:Y.id,children:Y.label},Y.id))]})}),v.length===0?r.jsx(rk,{providerRegistryHint:Ae,canRetryProviderRegistry:H,providerRegistrySetupHref:M,forceReloadProviderRegistry:C,hideRetry:h}):null]}),G?r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:p(l.sharedProviderModelFieldProviderInstanceLabel)}),r.jsx("select",{className:"textInput",value:L,onChange:Y=>vt(Y.target.value),children:$.map(Y=>r.jsx("option",{value:Y.id,children:Y.label},Y.id))})]}):null,ee?r.jsx("span",{className:"fieldHint providerCatalogHint",children:ee}):null,r.jsxs("label",{className:"fieldLabel",children:[r.jsxs("div",{className:"fieldLabelInline",children:[r.jsx("span",{children:p(l.sharedProviderModelFieldModelLabel)}),J?r.jsx("span",{className:`providerSupportBadge providerSupportBadge${J.tone}`,children:p(J.labelKey)}):null]}),r.jsxs("select",{className:"textInput",value:q,disabled:!R&&E.length===0,onChange:Y=>Jt(Y.target.value),children:[!R&&E.length===0?r.jsx("option",{value:"",disabled:!0,children:Ee}):null,E.map(Y=>r.jsx("option",{value:Y.id,children:Uw(Y)},Y.id)),V?r.jsx("option",{value:An,children:p(l.sharedProviderModelFieldCustomLegacyModelLabel)}):null]}),X.length>0?r.jsx("span",{className:"fieldHint",children:X[0]}):oe?r.jsx("span",{className:"fieldHint",children:oe}):null]}),R?r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:p(l.sharedProviderModelFieldLegacyModelIdLabel)}),r.jsx("input",{className:"textInput",type:"text",value:a,placeholder:p(l.sharedProviderModelFieldLegacyModelIdPlaceholder),onChange:Y=>x(Y.target.value)}),r.jsx("span",{className:"fieldHint",children:p(l.sharedProviderModelFieldLegacyModelIdHint)})]}):r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:p(l.sharedProviderModelFieldModeLabel)}),r.jsxs("select",{className:"textInput",value:Q,disabled:F.length===0,onChange:Y=>Ct(Y.target.value),children:[r.jsx("option",{value:"",children:F.length>0?p(l.sharedProviderModelFieldModeStandardLabel):p(l.sharedProviderModelFieldModeStandardOnlyLabel)}),F.map(Y=>r.jsxs("option",{value:Y.id,disabled:Y.availability==="unavailable",children:[Y.label,Y.availability==="preview"?p(l.sharedProviderModelFieldPresetPreviewSuffix):"",Y.availability==="unavailable"?p(l.sharedProviderModelFieldPresetUnavailableSuffix):""]},Y.id))]}),Q?r.jsx("span",{className:"fieldHint",children:F.find(Y=>Y.id===Q)?.description??p(l.sharedProviderModelFieldPresetTuningDescriptionFallback)}):F.length===0?r.jsx("span",{className:"fieldHint",children:p(l.sharedProviderModelFieldModeOnlyBaseHint)}):null]}),r.jsx(tk,{controlOptions:me,selectedCatalogEntryId:B,controlValues:_,onControlChange:Xt}),W?r.jsx("span",{className:"fieldHint providerCatalogHint",children:W}):null,D>0?r.jsx("span",{className:"fieldHint providerCatalogHint",children:p(l.sharedProviderModelFieldRequestScopedWarning)}):null,j.warnings.length>0?r.jsx("span",{className:"fieldHint providerCatalogHint",children:j.warnings[0]}):null]})}function ye(e){const{children:t,className:a,variant:o="default",id:n}=e,s=["contentCard",o==="form"?"contentCardForm":null,"settings-section",a].filter(Boolean).join(" ");return r.jsxs("section",{className:s,"data-variant":o==="form"?"form":void 0,id:n,children:[e.headerless?null:e.header,t]})}function be(e){const{children:t,className:a,id:o}=e,n=["settings-sub-section",a].filter(Boolean).join(" ");return r.jsxs("section",{className:n,id:o,children:[e.headerless?null:e.header,t]})}function re({title:e,eyebrow:t,status:a,description:o,nested:n=!1}){const s=n?"h3":"h2",i=!!t,c=r.jsx(s,{className:"settings-section-header__title","data-nested":n?"true":void 0,children:e});return r.jsxs(r.Fragment,{children:[r.jsxs("header",{className:"contentCardHeader settings-section-header",children:[i?r.jsxs("div",{children:[r.jsx("p",{className:"settings-section-header__eyebrow",children:t}),c]}):c,a?r.jsx("span",{className:"settings-section-header__status",children:a}):null]}),o?r.jsx("p",{className:"settings-section-header__description",children:o}):null]})}function le({label:e,description:t,control:a,layout:o="inline",asChoice:n=!1,className:s}){if(n){const c=["settingsCheckboxRow","settings-option-row",s].filter(Boolean).join(" ");return r.jsxs("label",{className:c,"data-layout":o,"data-choice":"true",children:[a,r.jsxs("span",{className:"settingsCheckboxMeta settings-option-row__meta",children:[r.jsx("span",{className:"settingsCheckboxLabel settings-option-row__label",children:e}),t?r.jsx("span",{className:"heroNote settings-option-row__description",children:t}):null]})]})}const i=["settings-option-row",s].filter(Boolean).join(" ");return o==="stack"?r.jsxs("div",{className:i,"data-layout":"stack",children:[r.jsx("span",{className:"settings-option-row__label",children:e}),t?r.jsx("span",{className:"settings-option-row__description",children:t}):null,r.jsx("div",{className:"settings-option-row__control",children:a})]}):r.jsxs("div",{className:i,"data-layout":"inline",children:[r.jsxs("div",{className:"settings-option-row__meta",children:[r.jsx("span",{className:"settings-option-row__label",children:e}),t?r.jsx("span",{className:"settings-option-row__description",children:t}):null]}),r.jsx("div",{className:"settings-option-row__control",children:a})]})}function Je({children:e,tone:t="default",className:a}){const o=["settingsActionRow","settings-action-bar",a].filter(Boolean).join(" ");return r.jsx("div",{className:o,"data-tone":t==="danger"?"danger":void 0,children:e})}const uk={ready:"statusChipReady",warm:"statusChipWarm",muted:"statusChipMuted"};function Lt({tone:e,children:t,className:a}){const o=["statusChip",uk[e],"settings-status-chip",a].filter(Boolean).join(" ");return r.jsx("span",{className:o,"data-tone":e,children:t})}function pk({title:e,description:t,children:a,className:o}){const n=["contentCard","settings-section","settings-danger-zone",o].filter(Boolean).join(" ");return r.jsxs("section",{className:n,children:[r.jsx("h2",{className:"settings-danger-zone__title",children:e}),t?r.jsx("p",{className:"settings-danger-zone__description",children:t}):null,a]})}function Dt({title:e,className:t="catsSubCard",...a}){const{t:o}=U(),[n,s]=d.useState(null),i=e??o(l.sharedProviderModelBrainCardTitle),c=n?.canRetry?r.jsx("button",{type:"button",className:"secondaryButton",onClick:()=>n.retry(),children:o(l.sharedCommonRetry)}):null;return r.jsx(be,{className:t,header:r.jsx(re,{title:i,nested:!0,status:c}),children:r.jsx(Dc,{...a,hideInlineRetry:!0,onRegistryRecoveryChange:s})})}const hk=3e3,mk=300;let gk=1;function at(){const[e,t]=d.useState([]),a=d.useRef(new Map),o=d.useCallback(n=>{if(!n)return;const s=gk++;t(c=>[...c,{id:s,message:n,fading:!1}]);const i=setTimeout(()=>{t(u=>u.map(h=>h.id===s?{...h,fading:!0}:h));const c=setTimeout(()=>{t(u=>u.filter(h=>h.id!==s)),a.current.delete(s)},mk);a.current.set(s,c)},hk);a.current.set(s,i)},[]);return d.useEffect(()=>()=>{for(const n of a.current.values())clearTimeout(n)},[]),{toasts:e,showToast:o}}function rt({toasts:e}){return e.length===0?null:r.jsx("div",{className:"toastContainer",children:e.map(t=>r.jsx("div",{className:t.fading?"toast toastFading":"toast",children:t.message},t.id))})}const Tn={kind:"idle"};function We(){return Tn}function fk(e){return!e||e.kind==="idle"}function QL(e){return!fk(e)}function JL(){return{kind:"draft"}}function XL(e){return{kind:"channel",channelId:e}}function ZL(e,t){return{kind:"composer",phase:e,scope:t}}function eR(e){return{kind:"parallel-chat",phase:e}}function tR(e,t){if(e==="reset")return{kind:"channel",action:e};if(!t)throw new Error(`channelId is required for channel busy action "${e}"`);return{kind:"channel",action:e,channelId:t}}function aR(e){return{kind:"channel-participant",action:"update",participantId:e}}function rR(e,t){return{kind:"concurrent-group",action:e,groupId:t}}function ft(e,t){if(e==="create"||e==="create-assign")return{kind:"cat",action:e};if(!t)throw new Error(`catId is required for cat busy action "${e}"`);return{kind:"cat",action:e,catId:t}}function wk(){return{kind:"setup",action:"reset"}}function oR(e,t){return{kind:"approval",taskId:e,action:t}}function nR(e,t){return{kind:"choice",sourceMessageId:e,status:t}}function sR(e,t){return{kind:"operator-action",action:e,busyKey:t}}function zs(e,t){if(e==="create")return{kind:"bot",action:e};if(!t)throw new Error("bindingId is required for bot delete busy state");return{kind:"bot",action:e,bindingId:t}}function Vs(e,t){if(e==="create")return{kind:"memory",action:e};if(!t)throw new Error("recordId is required for memory delete busy state");return{kind:"memory",action:e,recordId:t}}function iR(e,t){return e?.kind==="parallel-chat"&&(t==null||e.phase===t)}function lR(e,t,a){return e?.kind!=="channel"||e.action!==t?!1:t==="reset"?!0:"channelId"in e&&e.channelId===a}function cR(e,t){return e?.kind==="channel-participant"&&(t==null||e.participantId===t)}function dR(e,t,a){return e?.kind==="concurrent-group"&&e.action===t&&(a==null||e.groupId===a)}function ce(e,t,a){return e?.kind!=="cat"||e.action!==t?!1:"catId"in e?a==null||e.catId===a:a==null}function kk(e){return e?.kind==="setup"&&e.action==="reset"}function uR(e,t,a){return e?.kind==="approval"&&(t==null||e.taskId===t)&&a==null}function pR(e,t,a){return e?.kind==="choice"&&(t==null||e.sourceMessageId===t)&&(a==null||e.status===a)}function rr(e,t,a){return e?.kind!=="bot"||e.action!==t?!1:"bindingId"in e?a==null||e.bindingId===a:a==null}function Gt(e,t,a){return e?.kind!=="memory"||e.action!==t?!1:"recordId"in e?a==null||e.recordId===a:a==null}function hR(e){if(!e||e.kind==="idle")return"";switch(e.kind){case"composer":return e.scope.kind==="draft"?`composer:${e.phase}:draft`:`composer:${e.phase}:${e.scope.channelId}`;case"parallel-chat":return`parallel-chat:${e.phase}`;case"channel":return e.action==="reset"?`channel:${e.action}`:`channel:${e.action}:${"channelId"in e?e.channelId:""}`;case"channel-participant":return`channel-participant:${e.action}:${e.participantId}`;case"concurrent-group":return`concurrent-group:${e.action}:${e.groupId}`;case"cat":return"catId"in e?`cat:${e.action}:${e.catId}`:`cat:${e.action}`;case"setup":return`setup:${e.action}`;case"approval":return`approval:${e.taskId}:${e.action}`;case"choice":return`choice:${e.sourceMessageId}:${e.status}`;case"operator-action":return`operator-action:${e.action}:${e.busyKey}`;case"bot":return"bindingId"in e?`bot:${e.action}:${e.bindingId}`:`bot:${e.action}`;case"memory":return"recordId"in e?`memory:${e.action}:${e.recordId}`:`memory:${e.action}`}}const bk=new Map([["Memory content is required.",l.sharedSettingsCatsMemoryContentRequired],["Memory content must be a non-empty string.",l.sharedSettingsCatsMemoryContentRequired],["Invalid memory category.",l.sharedSettingsCatsMemoryInvalidCategory]]),yk=[/^cat memory create returned \d+$/u,/^cat memory delete returned \d+$/u];function vk(e,t){const a=bk.get(e);return a?t(a):e.startsWith("Cat memory not found:")?t(l.sharedSettingsCatsMemoryNotFound):e.startsWith("Cat not found:")?t(l.sharedSettingsCatsErrorNotFound):null}function Ys(e,t,a){if(!(e instanceof Error))return t;const o=vk(e.message,a);return o||(yk.some(n=>n.test(e.message))?t:e.message)}function Nc(e){const{t}=U(),[a,o]=d.useState({category:"fact",content:""}),[n,s]=d.useState([]),[i,c]=d.useState(!1);d.useEffect(()=>{if(!e.expandedCatId){s([]),c(!1);return}let g=!1;return c(!0),Jg(e.expandedCatId).then(p=>{g||s(p)}).catch(()=>{g||s([])}).finally(()=>{g||c(!1)}),()=>{g=!0}},[e.expandedCatId]);async function u(g){if(a.content.trim()){e.onBusy(Vs("create"));try{const p=await Xg(g,{category:a.category,content:a.content.trim()});s(k=>[p,...k.filter(f=>f.id!==p.id)]),o({category:"fact",content:""})}catch(p){e.onFeedback(Ys(p,t(l.sharedSettingsCatsMemorySaveError),t))}finally{e.onBusy(We())}}}async function h(g,p){e.onBusy(Vs("delete",p));try{await Zg(g,p),s(k=>k.filter(f=>f.id!==p))}catch(k){e.onFeedback(Ys(k,t(l.sharedSettingsCatsMemoryDeleteError),t))}finally{e.onBusy(We())}}return{memoryForm:a,setMemoryForm:o,catMemory:n,memoryLoading:i,addMemory:u,deleteMemory:h}}const Ck=new Map([["Cat name is required",l.sharedSettingsCatsErrorNameRequired],["Cat provider is required",l.sharedSettingsCatsErrorProviderRequired],["Cat name cannot be empty",l.sharedSettingsCatsErrorNameEmpty],["Cat is already archived",l.sharedSettingsCatsErrorAlreadyArchived],["Cat is already active",l.sharedSettingsCatsErrorAlreadyActive],["Cat cannot be archived and recovered at the same time",l.sharedSettingsCatsErrorArchiveRecoverConflict],["Cat must be available in at least one product",l.sharedSettingsCatsErrorNoProducts],["Bot token is already used by another binding",l.sharedSettingsCatsErrorBotTokenDuplicate]]),Sk=[/^cats chat cat creation returned \d+$/u,/^cat profile update returned \d+$/u,/^cats cat deletion returned \d+$/u,/^bot binding create returned \d+$/u,/^bot binding delete returned \d+$/u,/^update bot binding returned \d+$/u];function Lk(e,t){const a=Ck.get(e);if(a)return t(a);const o=e.match(/^A cat named "(.+)" already exists$/u);if(o)return t(l.sharedSettingsCatsErrorNameDuplicate,{name:o[1]});const n=e.match(/^Cat limit reached \(max (\d+)\)$/u);return n?t(l.sharedSettingsCatsErrorLimitReached,{maxCats:n[1]}):e.startsWith("Cat not found:")?t(l.sharedSettingsCatsErrorNotFound):e.startsWith("Cat is not active:")?t(l.sharedSettingsCatsErrorNotActive):e.startsWith("Cat is not available in Cats Chat:")?t(l.sharedSettingsCatsErrorNotAvailableInChat):e.startsWith("Bot binding not found:")?t(l.sharedSettingsCatsErrorBotBindingNotFound):null}function Be(e,t,a){if(!(e instanceof Error))return t;const o=Lk(e.message,a);return o||(Sk.some(n=>n.test(e.message))?t:e.message)}function jc(){return{botName:"",botToken:"",webhookSecret:"",inboundMode:"polling"}}function Rk(e){const t=e.t??Fe("en");async function a(){e.onBusy(ft("create"));try{const p=await Kg({name:e.catForm.name,provider:e.catForm.provider,instance:e.catForm.instance||void 0,model:e.catForm.model||void 0,modelSelection:e.catForm.modelSelection,makeBoss:e.catForm.makeBoss||void 0,products:e.catForm.products.length>0?e.catForm.products:void 0,skillProfile:e.catForm.skillProfile||void 0,mcpProfile:e.catForm.mcpProfile&&e.catForm.mcpProfile!==et?e.catForm.mcpProfile:void 0});return e.onPayloadUpdate(p),e.setCatForm(e.emptyCatForm()),e.onFeedback(t(l.sharedSettingsCatsSaveSuccess)),p}catch(p){return e.onFeedback(Be(p,t(l.sharedSettingsCatsSaveError),t)),null}finally{e.onBusy(We())}}async function o(p){return p.preventDefault(),a()}async function n(p){const k=e.renameValue.trim();if(k){e.onBusy(ft("rename",p));try{const f=await Re(p,{name:k});e.onPayloadUpdate(f),e.setRenameValue(""),e.onFeedback(t(l.sharedSettingsCatsRenameSuccess))}catch(f){e.onFeedback(Be(f,t(l.sharedSettingsCatsRenameError),t))}finally{e.onBusy(We())}}}async function s(p,k){e.onBusy(ft("delete",p)),e.onFeedback("");try{const f=await Gg(p);e.onPayloadUpdate(f),e.onFeedback(t(l.sharedSettingsCatsDeleteSuccess,{catName:k})),e.expandedCatId===p&&e.setExpandedCatId(null)}catch(f){e.onFeedback(Be(f,t(l.sharedSettingsCatsDeleteError),t))}finally{e.onBusy(We())}}async function i(p){e.onBusy(ft("makeBoss",p));try{const k=await Re(p,{makeBoss:!0});e.onPayloadUpdate(k),e.onFeedback(t(l.sharedSettingsCatsBossUpdated))}catch(k){e.onFeedback(Be(k,t(l.sharedSettingsCatsSetBossCatError),t))}finally{e.onBusy(We())}}async function c(p,k){e.onBusy(ft("skill",p));try{const f=await Re(p,{skillProfile:k==="chat-default"?null:k});e.onPayloadUpdate(f)}catch(f){e.onFeedback(Be(f,t(l.sharedSettingsCatsSkillUpdateError),t))}finally{e.onBusy(We())}}async function u(p,k){e.onBusy(ft("skill",p));try{const f=await Re(p,{mcpProfile:k});e.onPayloadUpdate(f)}catch(f){e.onFeedback(Be(f,t(l.sharedSettingsCatsChangeMcpProfileError),t))}finally{e.onBusy(We())}}async function h(p){if(e.botForm.botName.trim()){e.onBusy(zs("create"));try{const k=await Yg({botName:e.botForm.botName.trim(),catId:p,inboundMode:e.botForm.inboundMode,botToken:e.botForm.botToken.trim()||void 0,webhookSecret:e.botForm.inboundMode==="webhook"&&e.botForm.webhookSecret.trim()||void 0});e.onPayloadUpdate(k),e.setBotForm(jc()),e.onFeedback(t(l.sharedSettingsCatsTelegramBindingCreated))}catch(k){e.onFeedback(Be(k,t(l.sharedSettingsCatsTelegramBindingCreateError),t))}finally{e.onBusy(We())}}}async function g(p){e.onBusy(zs("delete",p));try{const k=await Qg(p);e.onPayloadUpdate(k),e.onFeedback(t(l.sharedSettingsCatsTelegramBindingRemoved))}catch(k){e.onFeedback(Be(k,t(l.sharedSettingsCatsTelegramBindingRemoveError),t))}finally{e.onBusy(We())}}return{onCreateBinding:h,onCreateCat:o,performCreateCat:a,onDeleteBinding:g,onDeleteCat:s,onMakeBossCat:i,onMcpProfileChange:u,onRenameCat:n,onSkillChange:c}}const Mc=Fe("en");function Ec(e,t){const a=e?.trim();return a||t}function mR(e,t=Mc){const a=Ec(e,t(l.sharedDeleteParallelChatGroupFallback));return{title:t(l.sharedDeleteParallelChatGroupTitle),message:t(l.sharedDeleteParallelChatGroupMessage,{groupTitle:a}),confirmLabel:t(l.sharedDeleteParallelChatGroupConfirm)}}function Pk(e,t=Mc){const a=Ec(e,t(l.sharedDeleteCatFallback));return{title:t(l.sharedDeleteCatTitle),message:t(l.sharedDeleteCatMessage,{catName:a}),confirmLabel:t(l.sharedDeleteCatConfirm)}}function Ic(e){const{expandedCatId:t,setExpandedCatId:a,onBusy:o,onFeedback:n,onPayloadUpdate:s,confirm:i}=e,{t:c}=U(),[u,h]=d.useState(Ts),[g,p]=d.useState(""),[k,f]=d.useState(jc),w=d.useRef(!1),{onCreateBinding:b,performCreateCat:m,onDeleteBinding:C,onDeleteCat:v,onMakeBossCat:y,onMcpProfileChange:L,onRenameCat:N,onSkillChange:T}=Rk({expandedCatId:t,setExpandedCatId:a,onBusy:o,onFeedback:n,onPayloadUpdate:s,catForm:u,setCatForm:h,renameValue:g,setRenameValue:p,botForm:k,setBotForm:f,emptyCatForm:Ts,t:c});async function j(O,E){if(!i||await i({title:c(l.sharedSettingsCatsArchiveConfirmTitle),message:c(l.sharedSettingsCatsArchiveConfirmMessage,{catName:E}),confirmLabel:c(l.sharedSettingsCatsArchiveLabel)})){o(ft("archive",O)),n("");try{const G=await Re(O,{archive:!0});s(G),n(c(l.sharedSettingsCatsArchiveSuccess,{catName:E})),t===O&&a(null)}catch(G){n(Be(G,c(l.sharedSettingsCatsArchiveError),c))}finally{o(We())}}}async function A(O,E){if(!i||await i({title:c(l.sharedSettingsCatsRecoverConfirmTitle),message:c(l.sharedSettingsCatsRecoverConfirmMessage,{catName:E}),confirmLabel:c(l.sharedSettingsCatsRecoverConfirmLabel)})){o(ft("unarchive",O)),n("");try{const G=await Re(O,{unarchive:!0});s(G),n(c(l.sharedSettingsCatsRecoverSuccess,{catName:E}))}catch(G){n(Be(G,c(l.sharedSettingsCatsRecoverError),c))}finally{o(We())}}}async function R(O,E){(!i||await i(Pk(E,c)))&&await v(O,E)}async function P(){if(w.current)return null;w.current=!0;try{return await m()}finally{w.current=!1}}async function I(O){return O.preventDefault(),P()}return{botForm:k,catForm:u,renameValue:g,setBotForm:f,setCatForm:h,setRenameValue:p,onArchiveCat:j,onCreateBinding:b,onCreateCat:I,performCreateCat:P,onDeleteBinding:C,onDeleteCat:R,onMakeBossCat:y,onMcpProfileChange:L,onRenameCat:N,onSkillChange:T,onUnarchiveCat:A}}function Ak(){return{started:!1,cancel:()=>{},promise:Promise.resolve()}}function xk(e){const t=[...e.botBindings??[]].map(a=>`${a.id}:${a.status}:${a.updatedAt}`).sort().join("|");return`${e.bossCatId??"no-boss-cat"}::${t}`}async function Bc(e){const[t,a]=await Promise.all([e.fetchStatus(),e.fetchDiagnostics()]);return{status:t,diagnostics:a}}function Tk(e,t,a){let o=!1;a.onStart();const n=Bc(e).then(s=>{o||a.onSuccess(s)}).catch(s=>{o||a.onError(s instanceof Error?s.message:t)}).finally(()=>{o||a.onFinish()});return{started:!0,cancel:()=>{o=!0},promise:n}}function Dk(e){let t=null;return{loadForScope(a,o,n){return a===t?Ak():(t=a,Tk(e,o,n))},resetScope(){t=null}}}function Nk(e,t,a,o){const n=e.loadForScope(t,a,o);return{...n,cancel(){n.cancel(),e.resetScope()}}}const jk=[/^telegram transport status returned \d+$/u,/^telegram transport diagnostics returned \d+$/u,/^polling reconnect returned \d+$/u];function Qs(e,t){if(!(e instanceof Error)&&typeof e!="string")return t;const a=e instanceof Error?e.message:e;return jk.some(o=>o.test(a))?t:a}function Fc(e){const{t}=U(),a=e.chat.botBindings??[],o=xk({bossCatId:e.chat.bossCatId,botBindings:a}),n=t(l.sharedSettingsCatsTelegramDiagnosticsLoadError),[s,i]=d.useState(null),[c,u]=d.useState(null),[h,g]=d.useState(!1),[p,k]=d.useState(""),[f]=d.useState(()=>Dk({fetchStatus:Rs,fetchDiagnostics:Ps}));d.useEffect(()=>Nk(f,o,n,{onStart(){g(!0),k("")},onSuccess(m){i(m.status),u(m.diagnostics)},onError(m){i(null),u(null),k(Qs(m,n))},onFinish(){g(!1)}}).cancel,[f,n,o]);async function w(){g(!0),k("");try{const b=await Bc({fetchStatus:Rs,fetchDiagnostics:Ps});i(b.status),u(b.diagnostics)}catch(b){i(null),u(null),k(Qs(b,n))}finally{g(!1)}}return{botBindings:a,telegramStatus:s,telegramDiagnostics:c,telegramLoading:h,telegramError:p,refreshTelegramDiagnostics:w}}const Kt=[{value:"chat-default",label:l.sharedSettingsCatsSkillProfileDefaultLabel},{value:"companion",label:l.sharedSettingsCatsSkillProfileCompanionLabel}],jt=[{value:et,label:l.sharedSettingsCatsMcpProfileChatMemoryLabel},{value:mc,label:l.sharedSettingsCatsMcpProfileWorkMemoryLabel}],Dn=[{value:"preference",label:l.sharedSettingsCatsMemoryCategoryPreferenceLabel},{value:"fact",label:l.sharedSettingsCatsMemoryCategoryFactLabel},{value:"policy",label:l.sharedSettingsCatsMemoryCategoryPolicyLabel},{value:"style",label:l.sharedSettingsCatsMemoryCategoryStyleLabel},{value:"relationship",label:l.sharedSettingsCatsMemoryCategoryRelationshipLabel},{value:"lesson",label:l.sharedSettingsCatsMemoryCategoryLessonLabel}];function Oc(e){return e==="chat-default"?l.sharedSettingsCatsSkillProfileDefaultLabel:e==="companion"?l.sharedSettingsCatsSkillProfileCompanionLabel:null}function Wc(e){return!e||e===et?l.sharedSettingsCatsMcpProfileChatMemoryLabel:e===mc?l.sharedSettingsCatsMcpProfileWorkMemoryLabel:null}function Uc(e){const t=Dn.find(a=>a.value===e);return t?t.label:null}function Hc(e){return e==="active"?l.sharedSettingsCatsStatusActive:e==="archived"?l.sharedSettingsCatsStatusArchived:null}function _c(e){return e==="chat"?l.platformProductChatSettingsLabel:e==="code"?l.platformProductCodeSettingsLabel:e==="work"?l.platformProductWorkSettingsLabel:null}function Gc(e){if(!e)return"—";try{return new Date(e).toLocaleString()}catch{return e}}function Mk({memoryForm:e,setMemoryForm:t,busyCreating:a,onSubmit:o,onClose:n}){const{t:s}=U();d.useEffect(()=>{function c(u){u.key==="Escape"&&!a&&n()}return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[a,n]);const i=!e.content.trim()||a;return r.jsx("div",{className:"catsDialogOverlay",onClick:()=>{a||n()},children:r.jsxs("form",{className:"catsDialog",onClick:c=>c.stopPropagation(),onSubmit:c=>{c.preventDefault(),!i&&o()},children:[r.jsx("p",{className:"catsDialogTitle",children:s(l.sharedMemoryEditorDialogTitle)}),r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:s(l.sharedMemoryEditorDialogCategoryLabel)}),r.jsx("select",{className:"textInput",value:e.category,onChange:c=>t({...e,category:c.target.value}),children:Dn.map(c=>r.jsx("option",{value:c.value,children:s(c.label)},c.value))})]}),r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:s(l.sharedMemoryEditorDialogContentLabel)}),r.jsx("textarea",{className:"textInput",rows:4,placeholder:s(l.sharedMemoryEditorDialogMemoryPlaceholder),value:e.content,onChange:c=>t({...e,content:c.target.value}),autoFocus:!0})]}),r.jsxs("div",{className:"catsDialogActions",children:[r.jsx("button",{className:"confirmCancelButton",type:"button",onClick:n,disabled:a,children:s(l.sharedMemoryEditorDialogCancel)}),r.jsx("button",{className:"primaryButton",type:"submit",disabled:i,children:s(a?l.sharedMemoryEditorDialogSaving:l.sharedMemoryEditorDialogAdd)})]})]})})}function Ek({botForm:e,setBotForm:t,busyCreating:a,onSubmit:o,onClose:n}){const{t:s}=U();d.useEffect(()=>{function c(u){u.key==="Escape"&&!a&&n()}return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[a,n]);const i=!e.botName.trim()||!e.botToken.trim()||a;return r.jsx("div",{className:"catsDialogOverlay",onClick:()=>{a||n()},children:r.jsxs("form",{className:"catsDialog",onClick:c=>c.stopPropagation(),onSubmit:c=>{c.preventDefault(),!i&&o()},children:[r.jsx("p",{className:"catsDialogTitle",children:s(l.sharedTelegramConnectDialogTitle)}),r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:s(l.sharedTelegramConnectBotUsernameLabel)}),r.jsx("input",{className:"textInput",placeholder:s(l.sharedTelegramConnectBotUsernamePlaceholder),value:e.botName,onChange:c=>t({...e,botName:c.target.value}),autoFocus:!0})]}),r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:s(l.sharedTelegramConnectBotTokenLabel)}),r.jsx("input",{className:"textInput",type:"password",placeholder:s(l.sharedTelegramConnectBotTokenPlaceholder),value:e.botToken,onChange:c=>t({...e,botToken:c.target.value})})]}),r.jsxs("div",{className:"fieldLabel",children:[r.jsx("span",{children:s(l.sharedTelegramConnectModeLabel)}),r.jsxs("div",{className:"skillPills",children:[r.jsx("button",{type:"button",className:e.inboundMode==="polling"?"draftLeadPill draftLeadPillActive":"draftLeadPill",onClick:()=>t({...e,inboundMode:"polling"}),children:s(l.sharedTelegramConnectModePolling)}),r.jsx("button",{type:"button",className:e.inboundMode==="webhook"?"draftLeadPill draftLeadPillActive":"draftLeadPill",onClick:()=>t({...e,inboundMode:"webhook"}),children:s(l.sharedTelegramConnectModeWebhook)})]})]}),e.inboundMode==="webhook"?r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:s(l.sharedTelegramConnectWebhookSecretLabel)}),r.jsx("input",{className:"textInput",placeholder:s(l.sharedTelegramConnectWebhookSecretPlaceholder),value:e.webhookSecret,onChange:c=>t({...e,webhookSecret:c.target.value})})]}):null,r.jsxs("div",{className:"catsDialogActions",children:[r.jsx("button",{className:"confirmCancelButton",type:"button",onClick:n,disabled:a,children:s(l.sharedTelegramConnectCancel)}),r.jsx("button",{className:"primaryButton",type:"submit",disabled:i,children:s(a?l.sharedTelegramConnectConnecting:l.sharedTelegramConnectConnect)})]})]})})}function xo({busy:e,botBindings:t,cat:a,isBossCat:o,memoryController:n,registryController:s,telegramDiagnostics:i,confirm:c,sections:u}){const h=F=>u===void 0||u.includes(F),{botForm:g,renameValue:p,setBotForm:k,setRenameValue:f,onCreateBinding:w,onDeleteBinding:b,onMakeBossCat:m,onMcpProfileChange:C,onRenameCat:v,onSkillChange:y}=s,{memoryForm:L,setMemoryForm:N,catMemory:T,memoryLoading:j,addMemory:A,deleteMemory:R}=n,P=t.filter(F=>F.catId===a.id),I=i?.bindings.filter(F=>F.bindingId&&P.some(Q=>Q.id===F.bindingId))??[],O=a.status==="active"&&Xo(a.products,"chat",{fallback:hr()}),{t:E}=U(),[$,G]=d.useState(!1);d.useEffect(()=>{P.length>0&&G(!1)},[P.length]),d.useEffect(()=>{G(!1)},[a.id]);const[ee,B]=d.useState(!1),q=d.useRef(T.length);return d.useEffect(()=>{const F=q.current;ee&&T.length>F&&B(!1),q.current=T.length},[ee,T.length]),d.useEffect(()=>{B(!1)},[a.id]),r.jsxs(r.Fragment,{children:[h("rename")?r.jsxs("div",{className:"catDetailSection",children:[r.jsx("p",{className:"sectionLabel",children:E(l.sharedSettingsCatsRenameLabel)}),r.jsxs("div",{style:{display:"flex",gap:8},children:[r.jsx("input",{className:"textInput",placeholder:a.name,value:p,onChange:F=>f(F.target.value),onFocus:()=>f(a.name)}),r.jsx("button",{className:"primaryButton",type:"button",disabled:!p.trim()||p.trim()===a.name||ce(e,"rename",a.id),onClick:()=>{v(a.id)},children:ce(e,"rename",a.id)?E(l.sharedSettingsCatsSaving):E(l.sharedSettingsCatsSave)})]})]}):null,h("makeBoss")&&!o?r.jsxs("div",{className:"catDetailSection",children:[r.jsx("p",{className:"sectionLabel",children:E(l.sharedSettingsCatsBossCatLabel)}),r.jsx("button",{className:"primaryButton",type:"button",disabled:ce(e,"makeBoss",a.id),onClick:async()=>{(!c||await c({title:E(l.sharedSettingsCatsChangeBossCatTitle),message:E(l.sharedSettingsCatsChangeBossCatMessage,{name:a.name}),confirmLabel:E(l.sharedSettingsCatsConfirm)}))&&m(a.id)},children:ce(e,"makeBoss",a.id)?E(l.sharedSettingsCatsSetting):E(l.sharedSettingsCatsMakeBossCatLabel,{name:a.name})})]}):null,h("skill")?r.jsxs("div",{className:"catDetailSection",children:[r.jsx("p",{className:"sectionLabel",children:E(l.sharedSettingsCatsSkillProfileLabel)}),r.jsx("div",{className:"skillPills",children:Kt.map(F=>r.jsx("button",{className:(a.skillProfile??"chat-default")===F.value?"draftLeadPill draftLeadPillActive":"draftLeadPill",type:"button",disabled:ce(e,"skill",a.id),onClick:()=>{y(a.id,F.value)},children:E(F.label)},F.value))})]}):null,h("mcp")?r.jsxs("div",{className:"catDetailSection",children:[r.jsx("p",{className:"sectionLabel",children:E(l.sharedSettingsCatsMcpProfileLabel)}),r.jsx("div",{className:"skillPills",children:jt.map(F=>r.jsx("button",{className:(a.mcpProfile??et)===F.value?"draftLeadPill draftLeadPillActive":"draftLeadPill",type:"button",disabled:ce(e,"skill",a.id),onClick:()=>{C(a.id,F.value)},children:E(F.label)},F.value))})]}):null,h("telegram")?P.length>0?r.jsx("div",{className:"catsTelegramConnected",children:P.map(F=>{const Q=I.find(me=>me.bindingId===F.id);return r.jsxs("div",{className:"catsTelegramBinding",children:[r.jsxs("div",{className:"catsTelegramBindingHeader",children:[r.jsx("span",{className:"catsTelegramBindingIcon","aria-hidden":"true",children:r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M20.66 3.88 2.92 10.9a.73.73 0 0 0 .04 1.38l4.45 1.4 1.72 5.52a.78.78 0 0 0 1.24.37l2.48-2.02 4.87 3.6a.78.78 0 0 0 1.2-.46L21.7 4.76c.17-.7-.52-1.27-1.04-0.88ZM10.1 14.6l-.44 3.15-1.34-4.3 9.38-6.2Z"})})}),r.jsxs("strong",{className:"catsTelegramBindingName","data-tooltip":`@${F.botName}`,children:["@",F.botName]}),r.jsx("button",{type:"button",className:"catsInlineDeleteButton catsTelegramBindingDisconnect",disabled:rr(e,"delete",F.id),onClick:()=>{b(F.id)},"aria-label":E(l.sharedSettingsCatsDisconnectTelegramAria),"data-tooltip":E(l.sharedSettingsCatsDisconnectTelegram),children:r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),r.jsxs("div",{className:"catsTelegramBindingMeta",children:[r.jsx("span",{className:`statusChip ${F.status==="active"?"statusChipReady":"statusChipMuted"}`,children:F.status==="active"?E(l.sharedSettingsCatsBindingActive):E(l.sharedSettingsCatsBindingDisabled)}),r.jsx("span",{className:"statusChip statusChipMuted",children:F.inboundMode==="polling"?E(l.sharedSettingsCatsBindingPollingMode):E(l.sharedSettingsCatsBindingWebhookMode)}),Q?.lastInboundAt?r.jsx("span",{className:"catsTelegramBindingLastInbound",children:E(l.sharedSettingsCatsLastInboundLabel,{time:Gc(Q.lastInboundAt)})}):null]})]},F.id)})}):r.jsxs("div",{className:"catsTelegramEmpty",children:[r.jsx("button",{type:"button",className:"primaryButton",disabled:!O,onClick:()=>G(!0),children:E(l.sharedSettingsCatsConnectTelegramLabel)}),O?null:r.jsx("p",{className:"catsTelegramHint",children:E(l.sharedSettingsCatsUnavailableHint)})]}):null,$?r.jsx(Ek,{botForm:g,setBotForm:k,busyCreating:rr(e,"create"),onSubmit:()=>{w(a.id)},onClose:()=>G(!1)}):null,h("memory")?r.jsxs("div",{className:"catsMemorySection",children:[T.length>0?r.jsx("div",{className:"memoryList",children:T.map(F=>r.jsx(Ik,{busy:e,memoryRecord:F,onDelete:()=>{R(a.id,F.id)}},F.id))}):null,r.jsx("button",{type:"button",className:"primaryButton",disabled:Gt(e,"create"),onClick:()=>B(!0),children:E(l.sharedSettingsCatsAddMemoryLabel)})]}):null,ee?r.jsx(Mk,{memoryForm:L,setMemoryForm:N,busyCreating:Gt(e,"create"),onSubmit:()=>{A(a.id)},onClose:()=>B(!1)}):null]})}function Ik({busy:e,memoryRecord:t,onDelete:a}){const{t:o}=U(),n=Uc(t.category);return r.jsxs("div",{className:"memoryItem",children:[r.jsxs("div",{children:[r.jsx("span",{className:"statusChip statusChipMuted",children:n?o(n):t.category}),r.jsxs("span",{style:{marginLeft:8},children:[t.content.slice(0,100),t.content.length>100?"...":""]})]}),r.jsx("button",{className:"catsInlineDeleteButton",type:"button",disabled:Gt(e,"delete",t.id),onClick:a,"aria-label":o(l.sharedSettingsCatsDeleteMemoryAria),children:r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})}function Bk({busy:e,botBindings:t,cat:a,isBossCat:o,memoryController:n,registryController:s,telegramDiagnostics:i,onPayloadUpdate:c,confirm:u}){const[h,g]=d.useState(!1),{t:p}=U();async function k(w){g(!1);try{const b=await Re(a.id,{avatarUrl:w});c?.(b)}catch{}}async function f(){try{const w=await Re(a.id,{avatarUrl:null});c?.(w)}catch{}}return r.jsxs("div",{className:"catDetailPanel",children:[r.jsxs("div",{className:"catDetailSection",children:[r.jsx("p",{className:"sectionLabel",children:p(l.settingsGeneralAvatarLabel)}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[r.jsx("div",{className:"catAvatar",style:{width:40,height:40,fontSize:"0.85rem",cursor:"pointer",...a.avatarUrl?{backgroundImage:`url(${a.avatarUrl})`,backgroundSize:"cover",backgroundPosition:"center",color:"transparent"}:a.avatarColor?{background:a.avatarColor}:{}},onClick:()=>g(!0),role:"button",tabIndex:0,children:a.avatarUrl?"":fe(a.name)}),r.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[r.jsx("button",{type:"button",className:"primaryButton",onClick:()=>g(!0),children:a.avatarUrl?p(l.settingsGeneralAvatarChangeLabel):p(l.settingsGeneralAvatarUploadLabel)}),a.avatarUrl?r.jsx("button",{type:"button",className:"secondaryButton",onClick:()=>{f()},children:p(l.settingsGeneralAvatarRemoveLabel)}):null]})]})]}),h?r.jsx(Qt,{onSave:w=>{k(w)},onClose:()=>g(!1)}):null,r.jsx(xo,{busy:e,botBindings:t,cat:a,isBossCat:o,memoryController:n,registryController:s,telegramDiagnostics:i,confirm:u})]})}function Fk({botBindings:e,busy:t,expandedCatId:a,memoryController:o,payload:n,registryController:s,setExpandedCatId:i,telegramDiagnostics:c,availableSurfaces:u,enabledSurfaces:h,onPayloadUpdate:g,confirm:p,CatsDetailPanelComponent:k}){const{t:f}=U(),[w,b]=d.useState(!1),m=n.chat.cats.filter(y=>y.status==="archived").length,C=w?n.chat.cats:n.chat.cats.filter(y=>y.status!=="archived"),v=_t(C,{bossCatIds:n.chat.bossCatId,archivedLast:!0});return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"contentCardHeader",children:[r.jsxs("div",{children:[r.jsx("p",{className:"sectionLabel",children:f(l.sharedSettingsCatsRegistrySectionLabel)}),r.jsx("h2",{children:n.chat.cats.length>0?f(l.sharedSettingsCatsRegistrySavedCatsLabel):f(l.sharedSettingsCatsRegistryNoCatsYetLabel)})]}),r.jsx("span",{className:"countBadge",children:C.length})]}),m>0?r.jsxs("label",{className:"fieldLabel fieldLabelInline",style:{marginBottom:4},children:[r.jsx("input",{type:"checkbox",checked:w,onChange:y=>b(y.target.checked)}),r.jsx("span",{children:f(l.sharedSettingsCatsRegistryShowArchivedLabel,{count:m})})]}):null,r.jsx("div",{className:"catList",children:v.length>0?v.map(y=>{const L=y.id===n.chat.bossCatId,N=a===y.id,T=e.filter(P=>P.catId===y.id),j=Hc(y.status),A=y.skillProfile?Oc(y.skillProfile):l.sharedSettingsCatsRegistryDefaultSkillProfileLabel,R=Wc(y.mcpProfile);return r.jsxs("article",{className:"catCard",children:[r.jsxs("div",{className:"catCardTop",style:{cursor:"pointer"},onClick:()=>i(N?null:y.id),children:[r.jsxs("div",{children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[r.jsx("strong",{children:y.name}),L?r.jsx("span",{className:"statusChip statusChipAccent",children:f(l.sharedSettingsCatsRegistryBossCatLabel)}):null]}),r.jsx("p",{children:gc(y)}),y.products.length>0?r.jsx("div",{className:"chipRow",style:{marginTop:4},children:y.products.map(P=>{const I=_c(P);return r.jsx("span",{className:"productBadge",children:I?f(I):P},P)})}):null]}),r.jsxs("div",{style:{display:"flex",alignSelf:"start",alignItems:"center",gap:8},children:[r.jsx("span",{className:y.status==="active"?"statusChip statusChipReady":"statusChip statusChipMuted",children:j?f(j):y.status}),y.status==="archived"?r.jsxs(r.Fragment,{children:[r.jsx("button",{className:"chromeButton",type:"button",disabled:ce(t,"unarchive",y.id)||ce(t,"delete",y.id),onClick:P=>{P.stopPropagation(),s.onUnarchiveCat(y.id,y.name)},"data-tooltip":f(l.sharedSettingsCatsRegistryRecoverTooltip,{name:y.name}),children:r.jsx("span",{className:"srOnly",children:f(l.sharedSettingsCatsRegistryRecoverLabel)})}),r.jsx("button",{className:"chromeButton",type:"button",disabled:ce(t,"delete",y.id),onClick:P=>{P.stopPropagation(),s.onDeleteCat(y.id,y.name)},"data-tooltip":f(l.sharedSettingsCatsRegistryDeleteTooltip,{name:y.name}),children:"✕"})]}):r.jsx("button",{className:"chromeButton",type:"button",disabled:ce(t,"archive",y.id),onClick:P=>{P.stopPropagation(),s.onArchiveCat(y.id,y.name)},"data-tooltip":f(l.sharedSettingsCatsRegistryArchiveTooltip,{name:y.name}),children:"✕"})]})]}),r.jsxs("div",{className:"catMeta",children:[r.jsx("span",{children:A?f(A):y.skillProfile}),r.jsx("span",{children:R?f(R):y.mcpProfile}),r.jsx("span",{children:y.memory.updatedAt?f(l.sharedSettingsCatsRegistryMemorySavedLabel):f(l.sharedSettingsCatsRegistryNoMemoryYetLabel)}),T.length>0?r.jsx("span",{children:f(l.sharedSettingsCatsRegistryBotBindingCount,{count:T.length,pluralSuffix:T.length>1?"s":""})}):null]}),N?r.jsx(k,{busy:t,botBindings:e,cat:y,isBossCat:L,memoryController:o,registryController:s,telegramDiagnostics:c,availableSurfaces:u,enabledSurfaces:h,onPayloadUpdate:g,confirm:p}):null]},y.id)}):r.jsx("div",{className:"emptyStateCard",children:r.jsx("p",{children:f(l.sharedSettingsCatsRegistryEmptyStateHint)})})})]})}function Ok(e){return r.jsx(Fk,{...e,CatsDetailPanelComponent:Bk})}function Wk(e,t){const a=new Set(e.map(o=>o.id));return t.find(o=>o.status==="active"&&!a.has(o.id))??null}function Uk({payload:e,busy:t,onPayloadUpdate:a,onFeedback:o,onBusy:n,useSettingsCatsRegistryActionsHook:s}){const[i,c]=d.useState(null),{toasts:u,showToast:h}=at(),{dialog:g,confirm:p,handleClose:k}=Et(),f=ve(),w=Ne(),b=f.pathname.endsWith("/cats/new"),{t:m}=U();d.useEffect(()=>{o("")},[]);const C=d.useCallback(S=>{S&&h(S)},[h]),v=s({expandedCatId:i,setExpandedCatId:c,onBusy:n,onFeedback:C,onPayloadUpdate:a,confirm:p}),{botForm:y,catForm:L,renameValue:N,setBotForm:T,setCatForm:j,setRenameValue:A,onCreateBinding:R,onCreateCat:P,performCreateCat:I,onDeleteBinding:O,onDeleteCat:E,onMakeBossCat:$,onMcpProfileChange:G,onArchiveCat:ee,onUnarchiveCat:B,onRenameCat:q,onSkillChange:F}=v,{botBindings:Q,telegramDiagnostics:me,telegramError:W}=Fc(e);d.useEffect(()=>{W&&C(W)},[W,C]);const D=Nc({expandedCatId:i,onBusy:n,onFeedback:C}),_=d.useMemo(()=>e.chat.cats.filter(S=>S.status==="active"),[e.chat.cats]),J=d.useMemo(()=>e.chat.cats.filter(S=>S.status==="archived"),[e.chat.cats]),X=_.length,oe=d.useMemo(()=>_t(_,{bossCatIds:e.chat.bossCatId}),[_,e.chat.bossCatId]),we=d.useMemo(()=>_t(J,{bossCatIds:null}),[J]),Ee=X>=e.chat.capabilities.maxCats,[Ae,M]=d.useState(()=>e.chat.cats.filter(S=>S.status==="active").length===0&&e.chat.cats.some(S=>S.status==="archived")),[H,V]=d.useState(()=>oe[0]?.id??we[0]?.id??null),Se=X>0||we.length>0,z=b||!Se?"create":"view";d.useEffect(()=>{if(z!=="view")return;const S=H?e.chat.cats.find(te=>te.id===H)??null:null,K=S?.status==="archived"&&!Ae;if(!S||K){const te=oe[0]??(Ae?we[0]:null);te?V(te.id):(V(null),f.pathname.endsWith("/cats/new")||w("/settings/cats/new",{replace:!0}))}},[z,f.pathname,w,e.chat.cats,H,Ae,oe,we]),d.useEffect(()=>{z==="view"&&H&&c(H)},[z,H]);const Ke=d.useMemo(()=>({current:X}),[]),dt=d.useMemo(()=>({current:new Set(_.map(S=>S.id))}),[]);d.useEffect(()=>{if(X>Ke.current){const S=dt.current,K=oe.find(te=>!S.has(te.id))??oe[oe.length-1];K&&V(K.id),f.pathname.endsWith("/cats/new")&&w("/settings/cats",{replace:!0})}Ke.current=X,dt.current=new Set(_.map(S=>S.id))},[X,_,f.pathname,w,a,Ke,dt,oe]);const vt=S=>{V(S),f.pathname.endsWith("/cats/new")&&w("/settings/cats",{replace:!0})},Jt=()=>{Ee||w("/settings/cats/new")},x=d.useMemo(()=>H?e.chat.cats.find(S=>S.id===H)??null:null,[e.chat.cats,H]);d.useEffect(()=>{x?.status==="archived"&&M(!0)},[x]);const Ct=d.useRef(null);d.useEffect(()=>{if(z==="create"&&b){const S=Ct.current;S?.focus(),S?.select()}},[z,b]);const[Xt,Y]=d.useState(!1),[ke,Te]=d.useState(null),[Ce,qe]=d.useState(null);d.useEffect(()=>{b||(Te(null),qe(null))},[b]);const Sr=async S=>{if(Y(!1),z==="create"){Te(S);return}if(x)try{const K=await Re(x.id,{avatarUrl:S});a(K)}catch{}},Lr=async()=>{if(z==="create"){Te(null);return}if(x)try{const S=await Re(x.id,{avatarUrl:null});a(S)}catch{}},[je,St]=d.useState(null),[Rr,ut]=d.useState(!1);d.useEffect(()=>{if(!x){St(null);return}return St(ba(x.id)),Rn(x.id,St)},[x?.id]);const Pr=S=>{if(ut(!1),z==="create"){qe(S);return}x&&Tt(x.id,S)},Ar=()=>{if(z==="create"){qe(null);return}x&&Tt(x.id,null)},ne=x?.status==="archived",$e=d.useCallback(async(S,K,te)=>{try{const Oe=await Re(S,K);return a(Oe),!0}catch(Oe){return C(Be(Oe,te,m)),!1}},[a,m,C]),xr=async()=>{const S=await I(),K=S?Wk(_,S.chat.cats):null;if(K){if(V(K.id),f.pathname.endsWith("/cats/new")&&w("/settings/cats",{replace:!0}),ke)try{const te=await Re(K.id,{avatarUrl:ke});a(te),Te(null)}catch(te){Te(null),C(Be(te,m(l.settingsGeneralSaveAvatarError),m))}Ce&&(Tt(K.id,Ce),qe(null))}};return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"catsLayout catsLayoutSidePanel",children:[r.jsxs("nav",{className:"catsSelectorStrip",role:"tablist","aria-label":m(l.sharedSettingsCatsSelectCatAria),children:[oe.map(S=>{const K=z==="view"&&S.id===H,Oe=["catAvatar","catsSelectorAvatar",S.id===e.chat.bossCatId?"catsSelectorAvatarBoss":"",K?"catsSelectorAvatarActive":""].filter(Boolean).join(" ");return r.jsx("button",{type:"button",role:"tab","aria-selected":K,className:Oe,style:S.avatarUrl?{backgroundImage:`url(${S.avatarUrl})`,backgroundSize:"cover",backgroundPosition:"center"}:S.avatarColor?{background:S.avatarColor}:void 0,onClick:()=>vt(S.id),"data-tooltip":S.name,"aria-label":S.name,children:S.avatarUrl?null:fe(S.name)},S.id)}),r.jsx("button",{type:"button",className:["catAvatar","catsSelectorAvatar","catsSelectorNewAvatar",z==="create"?"catsSelectorAvatarActive":""].filter(Boolean).join(" "),onClick:Jt,disabled:Ee&&z!=="create","aria-label":m(l.sharedSettingsCatsAddNewCatLabel),"data-tooltip":m(Ee?l.sharedCatsCreateCatLimitReached:l.sharedSettingsCatsAddNewCatLabel),children:r.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.25",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),r.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),Ae&&we.length>0?r.jsx("span",{className:"catsSelectorDivider","aria-hidden":"true"}):null,Ae?we.map(S=>{const K=z==="view"&&S.id===H,te=["catAvatar","catsSelectorAvatar","catsSelectorAvatarArchived",K?"catsSelectorAvatarActive":""].filter(Boolean).join(" ");return r.jsx("button",{type:"button",role:"tab","aria-selected":K,className:te,style:S.avatarUrl?{backgroundImage:`url(${S.avatarUrl})`,backgroundSize:"cover",backgroundPosition:"center"}:S.avatarColor?{background:S.avatarColor}:void 0,onClick:()=>vt(S.id),"data-tooltip":`${S.name} (${m(l.workObjectStatusArchived)})`,"aria-label":`${S.name} (${m(l.workObjectStatusArchived)})`,children:S.avatarUrl?null:fe(S.name)},S.id)}):null,J.length>0?r.jsxs("label",{className:"catsSelectorArchiveToggle",children:[r.jsx("input",{type:"checkbox",checked:Ae,onChange:S=>M(S.target.checked)}),r.jsx("span",{children:m(l.sharedSettingsCatsShowArchivedLabel,{count:J.length})})]}):null]}),r.jsx(ye,{className:"catsDetailCard",header:r.jsx(re,{title:z==="create"?m(l.sharedCatsCreateNewCat):x?r.jsxs(r.Fragment,{children:[x.name,x.id===e.chat.bossCatId?r.jsx("span",{className:"catsDetailBossTag",children:m(l.sharedCatInspectBossLabel)}):null,x.status==="archived"?r.jsx("span",{className:"catsDetailArchivedTag",children:m(l.workObjectStatusArchived)}):null]}):"",status:z==="view"&&x?r.jsx(Je,{children:x.status==="active"?r.jsx("button",{type:"button",className:"secondaryButton",disabled:ce(t,"archive",x.id),onClick:()=>{ee(x.id,x.name)},children:m(l.sharedSettingsCatsArchiveLabel)}):r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",className:"secondaryButton",disabled:ce(t,"unarchive",x.id),onClick:()=>{B(x.id,x.name)},children:m(l.sharedSettingsCatsRegistryRecoverLabel)}),r.jsx("button",{type:"button",className:"dangerButton",disabled:ce(t,"delete",x.id),onClick:()=>{E(x.id,x.name)},children:m(l.sharedSettingsCatsDeleteLabel)})]})}):z==="create"?r.jsxs(Je,{children:[X>0?r.jsx("button",{type:"button",className:"secondaryButton",onClick:()=>w("/settings/cats",{replace:!0}),disabled:ce(t,"create"),children:m(l.sharedCatsCreateCancel)}):null,r.jsx("button",{type:"button",className:"primaryButton",disabled:!L.name.trim()||!L.provider.trim()||!L.model.trim()||Ee||ce(t,"create"),onClick:()=>{xr()},children:ce(t,"create")?m(l.sharedSettingsCatsSaving):m(l.sharedCatsCreateSaveCat)})]}):null}),children:z==="create"?r.jsxs("div",{className:"catsDetailBody",children:[r.jsxs("div",{className:"catsDetailColumn",children:[r.jsxs(be,{headerless:!0,className:"catsSubCard catsIdentityCard",children:[r.jsxs("div",{className:"fieldLabel",children:[r.jsx("span",{children:m(l.settingsGeneralAvatarLabel)}),r.jsxs("div",{className:"catsIdentityAvatarRow",children:[r.jsxs("div",{className:"catsAvatarDock",children:[r.jsx("button",{type:"button",className:["catAvatar","catsIdentityAvatar",ke?"":"catsIdentityAvatarPlaceholder"].filter(Boolean).join(" "),style:ke?{backgroundImage:`url(${ke})`,backgroundSize:"cover",backgroundPosition:"center",color:"transparent"}:void 0,onClick:()=>Y(!0),"aria-label":m(ke?l.settingsGeneralAvatarChangeLabel:l.settingsGeneralAvatarUploadLabel),"data-tooltip":m(ke?l.settingsGeneralAvatarChangeLabel:l.settingsGeneralAvatarUploadLabel),children:ke?"":L.name.trim()?fe(L.name):r.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[r.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),r.jsx("circle",{cx:"8.5",cy:"8.5",r:"1.5"}),r.jsx("polyline",{points:"21 15 16 10 5 21"})]})}),r.jsx("span",{className:"catsAvatarCameraBadge","aria-hidden":"true",children:r.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"}),r.jsx("circle",{cx:"12",cy:"13",r:"4"})]})}),ke?r.jsx("button",{type:"button",className:"catsAvatarRemoveBadge",onClick:S=>{S.stopPropagation(),Te(null)},"aria-label":m(l.settingsGeneralAvatarRemoveLabel),"data-tooltip":m(l.settingsGeneralAvatarRemoveLabel),children:r.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}):null]}),r.jsxs("label",{className:"fieldLabelInline catsIdentityBossToggle",children:[r.jsx("input",{type:"checkbox",checked:L.makeBoss,onChange:async S=>{const K=S.target.checked;if(K&&e.chat.bossCatId){const te=e.chat.cats.find(Tr=>Tr.id===e.chat.bossCatId);if(!await p({title:m(l.sharedSettingsCatsChangeBossCatTitle),message:m(l.sharedSettingsCatsChangeBossCatMessage,{name:te?.name??(L.name.trim()||m(l.sharedCatsCreateNewCat))}),confirmLabel:m(l.sharedSettingsCatsConfirm)}))return}j({...L,makeBoss:K})}}),r.jsx("span",{children:m(l.sharedSettingsCatsMakeBossCatLabel,{name:L.name.trim()||m(l.sharedCatsCreateNewCat)})})]})]})]}),r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:m(l.settingsGeneralNameLabel)}),r.jsx("input",{ref:Ct,className:"textInput",value:L.name,placeholder:m(l.sharedCatsCreateCatNamePlaceholder),onChange:S=>j({...L,name:S.target.value})})]}),r.jsxs("div",{className:"fieldLabel catsCoverField",children:[r.jsx("span",{children:m(l.sharedSettingsCatsCoverPhotoLabel)}),r.jsxs("div",{className:"catsCoverDock",children:[r.jsx("button",{type:"button",className:`catsCoverThumb${Ce?" catsCoverThumbLoaded":" catsCoverThumbPlaceholder"}`,style:Ce?{backgroundImage:`url(${Ce})`}:void 0,onClick:()=>ut(!0),"aria-label":m(Ce?l.sharedSettingsCatsChangeCoverPhotoLabel:l.sharedSettingsCatsUploadCoverPhotoLabel),"data-tooltip":m(Ce?l.sharedSettingsCatsChangeCoverLabel:l.sharedSettingsCatsUploadCoverLabel),children:Ce?null:r.jsxs("svg",{className:"catsCoverPlaceholderIcon",width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[r.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),r.jsx("circle",{cx:"8.5",cy:"8.5",r:"1.5"}),r.jsx("polyline",{points:"21 15 16 10 5 21"})]})}),r.jsx("span",{className:"catsCoverCameraBadge","aria-hidden":"true",children:r.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"}),r.jsx("circle",{cx:"12",cy:"13",r:"4"})]})}),Ce?r.jsx("button",{type:"button",className:"catsCoverRemoveBadge",onClick:S=>{S.stopPropagation(),qe(null)},"aria-label":m(l.sharedSettingsCatsRemoveCoverLabel),"data-tooltip":m(l.sharedSettingsCatsRemoveCoverLabel),children:r.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}):null]})]})]}),r.jsx(be,{className:"catsSubCard",header:r.jsx(re,{title:m(l.sharedSettingsCatsSkillProfileLabel),nested:!0}),children:r.jsx("div",{className:"skillPills",children:Kt.map(S=>r.jsx("button",{type:"button",className:(L.skillProfile||"chat-default")===S.value?"draftLeadPill draftLeadPillActive":"draftLeadPill",onClick:()=>j({...L,skillProfile:S.value}),children:m(S.label)},S.value))})}),r.jsx(be,{className:"catsSubCard",header:r.jsx(re,{title:m(l.sharedSettingsCatsMcpProfileLabel),nested:!0}),children:r.jsx("div",{className:"skillPills",children:jt.map(S=>r.jsx("button",{type:"button",className:(L.mcpProfile||et)===S.value?"draftLeadPill draftLeadPillActive":"draftLeadPill",onClick:()=>j({...L,mcpProfile:S.value}),children:m(S.label)},S.value))})})]}),r.jsx("div",{className:"catsDetailColumn",children:r.jsx(Dt,{provider:L.provider,instance:L.instance,model:L.model,modelSelection:L.modelSelection,onTargetChange:S=>j({...L,provider:S.provider,instance:S.instance,model:S.model,modelSelection:S.modelSelection??null}),fetchProviderRegistry:Pt,fetchProviderModels:At,fetchAdvancedProviderModels:xt})})]}):x?r.jsxs("fieldset",{className:ne?"catsDetailBody catsDetailBodyReadOnly":"catsDetailBody",disabled:ne,children:[r.jsxs("div",{className:"catsDetailColumn",children:[r.jsxs(be,{headerless:!0,className:"catsSubCard catsIdentityCard",children:[r.jsxs("div",{className:"fieldLabel",children:[r.jsx("span",{children:m(l.settingsGeneralAvatarLabel)}),r.jsxs("div",{className:"catsIdentityAvatarRow",children:[r.jsxs("div",{className:"catsAvatarDock",children:[r.jsx("button",{type:"button",className:"catAvatar catsIdentityAvatar",style:x.avatarUrl?{backgroundImage:`url(${x.avatarUrl})`,backgroundSize:"cover",backgroundPosition:"center",color:"transparent"}:x.avatarColor?{background:x.avatarColor}:void 0,onClick:()=>{ne||Y(!0)},disabled:ne,"aria-label":x.avatarUrl?m(l.settingsGeneralAvatarChangeLabel):m(l.settingsGeneralAvatarUploadLabel),"data-tooltip":ne?void 0:x.avatarUrl?m(l.settingsGeneralAvatarChangeLabel):m(l.settingsGeneralAvatarUploadLabel),children:x.avatarUrl?"":fe(x.name)}),ne?null:r.jsx("span",{className:"catsAvatarCameraBadge","aria-hidden":"true",children:r.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"}),r.jsx("circle",{cx:"12",cy:"13",r:"4"})]})}),x.avatarUrl&&!ne?r.jsx("button",{type:"button",className:"catsAvatarRemoveBadge",onClick:S=>{S.stopPropagation(),Lr()},"aria-label":m(l.settingsGeneralAvatarRemoveLabel),"data-tooltip":m(l.settingsGeneralAvatarRemoveLabel),children:r.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}):null]}),!ne&&x.id!==e.chat.bossCatId?r.jsxs("label",{className:"fieldLabelInline catsIdentityBossToggle",children:[r.jsx("input",{type:"checkbox",checked:!1,onChange:async S=>{S.target.checked&&(e.chat.bossCatId&&e.chat.bossCatId!==x.id&&(e.chat.cats.find(te=>te.id===e.chat.bossCatId),!await p({title:m(l.sharedSettingsCatsChangeBossCatTitle),message:m(l.sharedSettingsCatsChangeBossCatMessage,{name:x.name}),confirmLabel:m(l.sharedSettingsCatsConfirm)}))||await $e(x.id,{makeBoss:!0},m(l.sharedSettingsCatsSetBossCatError)))}}),r.jsx("span",{children:m(l.sharedSettingsCatsMakeBossCatLabel,{name:x.name})})]}):null]})]}),r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:m(l.settingsGeneralNameLabel)}),r.jsx("input",{className:"textInput",defaultValue:x.name,placeholder:x.name,disabled:ne,onBlur:async S=>{const K=S.currentTarget.value.trim();if(!K){S.currentTarget.value=x.name;return}if(K===x.name)return;await $e(x.id,{name:K},m(l.settingsGeneralUpdateNameError))||(S.currentTarget.value=x.name)}},x.id)]}),r.jsxs("div",{className:"fieldLabel catsCoverField",children:[r.jsx("span",{children:m(l.sharedSettingsCatsCoverPhotoLabel)}),r.jsxs("div",{className:"catsCoverDock",style:x.avatarColor?{"--cat-avatar-color":x.avatarColor}:void 0,children:[r.jsx("button",{type:"button",className:`catsCoverThumb${je?" catsCoverThumbLoaded":""}`,style:je?{backgroundImage:`url(${je})`}:void 0,onClick:()=>{ne||ut(!0)},disabled:ne,"aria-label":m(je?l.sharedSettingsCatsChangeCoverPhotoLabel:l.sharedSettingsCatsUploadCoverPhotoLabel),"data-tooltip":ne?void 0:m(je?l.sharedSettingsCatsChangeCoverLabel:l.sharedSettingsCatsUploadCoverLabel)}),ne?null:r.jsx("span",{className:"catsCoverCameraBadge","aria-hidden":"true",children:r.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"}),r.jsx("circle",{cx:"12",cy:"13",r:"4"})]})}),je&&!ne?r.jsx("button",{type:"button",className:"catsCoverRemoveBadge",onClick:S=>{S.stopPropagation(),Ar()},"aria-label":m(l.sharedSettingsCatsRemoveCoverLabel),"data-tooltip":m(l.sharedSettingsCatsRemoveCoverLabel),children:r.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}):null]})]})]}),r.jsx(be,{className:"catsSubCard",header:r.jsx(re,{title:m(l.sharedSettingsCatsSkillProfileLabel),nested:!0}),children:r.jsx("div",{className:"skillPills",children:Kt.map(S=>{const K=(x.skillProfile??"chat-default")===S.value;return r.jsx("button",{type:"button",className:K?"draftLeadPill draftLeadPillActive":"draftLeadPill",disabled:ne||K,onClick:()=>{$e(x.id,{skillProfile:S.value},m(l.sharedSettingsCatsChangeSkillProfileError))},children:m(S.label)},S.value)})})}),r.jsx(be,{className:"catsSubCard",header:r.jsx(re,{title:m(l.sharedSettingsCatsMcpProfileLabel),nested:!0}),children:r.jsx("div",{className:"skillPills",children:jt.map(S=>{const K=(x.mcpProfile??et)===S.value;return r.jsx("button",{type:"button",className:K?"draftLeadPill draftLeadPillActive":"draftLeadPill",disabled:ne||K,onClick:()=>{$e(x.id,{mcpProfile:S.value},m(l.sharedSettingsCatsChangeMcpProfileError))},children:m(S.label)},S.value)})})}),r.jsx(be,{className:"catsSubCard",header:r.jsx(re,{title:m(l.sharedSettingsCatsChannelLabel),nested:!0}),children:r.jsx(xo,{busy:t,botBindings:Q,cat:x,isBossCat:x.id===e.chat.bossCatId,memoryController:D,registryController:{botForm:y,renameValue:N,setBotForm:T,setRenameValue:A,onCreateBinding:R,onDeleteBinding:O,onMakeBossCat:$,onMcpProfileChange:G,onRenameCat:q,onSkillChange:F},telegramDiagnostics:me,confirm:p,sections:["telegram"]})}),r.jsx(be,{className:"catsSubCard",header:r.jsx(re,{title:m(l.sharedSettingsCatsMemoryLabel),nested:!0}),children:r.jsx(xo,{busy:t,botBindings:Q,cat:x,isBossCat:x.id===e.chat.bossCatId,memoryController:D,registryController:{botForm:y,renameValue:N,setBotForm:T,setRenameValue:A,onCreateBinding:R,onDeleteBinding:O,onMakeBossCat:$,onMcpProfileChange:G,onRenameCat:q,onSkillChange:F},telegramDiagnostics:me,confirm:p,sections:["memory"]})})]}),r.jsx("div",{className:"catsDetailColumn",children:r.jsx(Dt,{provider:x.defaultExecutionTarget.provider??"",instance:x.defaultExecutionTarget.instance??"",model:x.defaultExecutionTarget.model??"",modelSelection:x.defaultModelSelection??null,onTargetChange:S=>{$e(x.id,{provider:S.provider,instance:S.instance||null,model:S.model||null,modelSelection:S.modelSelection??null},m(l.sharedSettingsCatsUpdateBrainError))},fetchProviderRegistry:Pt,fetchProviderModels:At,fetchAdvancedProviderModels:xt})})]}):null})]}),r.jsx(It,{dialog:g,onClose:k}),r.jsx(rt,{toasts:u}),Xt?r.jsx(Qt,{onSave:S=>{Sr(S)},onClose:()=>Y(!1),initialDataUrl:z==="create"?ke:x?.avatarUrl??null}):null,Rr?r.jsx(Ln,{onSave:Pr,onClose:()=>ut(!1),initialDataUrl:z==="create"?Ce:je}):null]})}function Hk(e){return r.jsx(Uk,{...e,useSettingsCatsRegistryActionsHook:Ic,CatsRegistryComponent:Ok})}function _k(){const[e,t]=d.useState(null),[a,o]=d.useState(Tn),[,n]=d.useState("");return d.useEffect(()=>{let s=!1;return Ze().then(i=>{s||t(i)}).catch(()=>{}),()=>{s=!0}},[]),e?r.jsx(Hk,{payload:e,busy:a,onPayloadUpdate:t,onFeedback:n,onBusy:o}):r.jsx("div",{className:"catsCanvasPageBoot"})}function Kc({ariaLabel:e,avatar:t,title:a,subtitle:o,actions:n,tabs:s,children:i}){return r.jsxs("div",{className:"entityDetailPane","aria-label":e,children:[r.jsxs("header",{className:"entityDetailHeader",children:[r.jsx("span",{className:"entityDetailAvatar",children:t}),r.jsxs("div",{className:"entityDetailHeading",children:[r.jsx("h1",{className:"entityDetailTitle",children:a}),o?r.jsx("p",{className:"entityDetailSubtitle",children:o}):null]}),n?r.jsx("div",{className:"entityDetailActions",children:n}):null]}),r.jsx("nav",{className:"entityDetailTabs","aria-label":e,children:s.map(c=>r.jsx(Nt,{to:c.href,className:c.active?"entityDetailTab entityDetailTabActive":"entityDetailTab","aria-current":c.active?"page":void 0,children:c.label},c.key))}),r.jsx("section",{className:"entityDetailBody",children:i})]})}const qc=["members","clowders","cats","settings"],Gk={members:l.catteryHomeTabMembers,clowders:l.catteryHomeTabClowders,cats:l.catteryHomeTabCats,settings:l.catteryHomeTabSettings},Kk={members:l.catteryHomeEmptyMembers,clowders:l.catteryHomeEmptyClowders,cats:l.catteryHomeEmptyCats};function qk(e){return typeof e=="string"&&qc.includes(e)}function $k(e,t){return(e.lobby.catteries??[]).find(a=>a.id===t)??null}function zk({cattery:e}){const t=e.avatarUrl?{backgroundImage:`url(${e.avatarUrl})`,backgroundSize:"cover",backgroundPosition:"center"}:void 0;return r.jsx("span",{className:"entityDetailAvatarBubble",style:t,children:e.avatarUrl?null:fe(e.name)})}function Vk({tab:e}){const{t}=U();return r.jsx("div",{className:"entityDetailLensStub",children:r.jsx("p",{children:t(Kk[e])})})}function Yk(){const{t:e}=U();return r.jsx("div",{className:"entityDetailLensStub",children:r.jsx("p",{children:e(l.catteryHomeSettingsBody)})})}function Qk({catteryId:e}){const{t}=U();return r.jsx("div",{className:"screen screenCentered entityComingSoonScreen",children:r.jsxs("section",{className:"entityComingSoonPanel",children:[r.jsx("h1",{children:t(l.catteryHomeNotFoundTitle)}),r.jsx("p",{className:"entityComingSoonBody",children:t(l.catteryHomeNotFoundBody,{catteryId:e})})]})})}function Js({envelope:e}){const{t}=U(),a=lr(),o=a.catteryId??"",n=$k(e,o),s=qk(a.tab)?a.tab:"members";if(!n)return r.jsx(Qk,{catteryId:o});const i=qc.map(c=>({key:c,label:t(Gk[c]),href:`/entities/catteries/${encodeURIComponent(n.id)}/${c}`,active:c===s}));return r.jsx(Kc,{ariaLabel:t(l.catteryHomeAriaLabel),avatar:r.jsx(zk,{cattery:n}),title:n.name,tabs:i,children:s==="settings"?r.jsx(Yk,{}):r.jsx(Vk,{tab:s})})}const $c=["cats","settings"],Jk={cats:l.clowderHomeTabCats,settings:l.clowderHomeTabSettings};function Xk(e){return typeof e=="string"&&$c.includes(e)}function Zk(e,t){return(e.lobby.clowders??[]).find(a=>a.id===t)??null}function eb(e,t){return(e.lobby.catteries??[]).find(o=>o.id===t)?.name??null}function tb({clowder:e}){const t=e.avatarUrl?{backgroundImage:`url(${e.avatarUrl})`,backgroundSize:"cover",backgroundPosition:"center"}:void 0;return r.jsx("span",{className:"entityDetailAvatarBubble",style:t,children:e.avatarUrl?null:fe(e.name)})}function ab(){const{t:e}=U();return r.jsx("div",{className:"entityDetailLensStub",children:r.jsx("p",{children:e(l.clowderHomeEmptyCats)})})}function rb(){const{t:e}=U();return r.jsx("div",{className:"entityDetailLensStub",children:r.jsx("p",{children:e(l.clowderHomeSettingsBody)})})}function ob({clowderId:e}){const{t}=U();return r.jsx("div",{className:"screen screenCentered entityComingSoonScreen",children:r.jsxs("section",{className:"entityComingSoonPanel",children:[r.jsx("h1",{children:t(l.clowderHomeNotFoundTitle)}),r.jsx("p",{className:"entityComingSoonBody",children:t(l.clowderHomeNotFoundBody,{clowderId:e})})]})})}function Xs({envelope:e}){const{t}=U(),a=lr(),o=a.clowderId??"",n=Zk(e,o),s=Xk(a.tab)?a.tab:"cats";if(!n)return r.jsx(ob,{clowderId:o});const i=$c.map(h=>({key:h,label:t(Jk[h]),href:`/entities/clowders/${encodeURIComponent(n.id)}/${h}`,active:h===s})),c=n.parentCatteryId!==null?eb(e,n.parentCatteryId):null,u=n.parentCatteryId!==null?t(l.clowderHomeChipPartOf,{catteryName:c??n.parentCatteryId}):t(l.clowderHomeChipCrossUnit);return r.jsx(Kc,{ariaLabel:t(l.clowderHomeAriaLabel),avatar:r.jsx(tb,{clowder:n}),title:n.name,subtitle:u,tabs:i,children:s==="cats"?r.jsx(ab,{}):r.jsx(rb,{})})}function nb({className:e,menuRef:t,style:a,onClick:o,children:n}){const s=r.jsx("div",{ref:t,className:e,style:a,onClick:o,children:n});return typeof document>"u"?s:Wt.createPortal(s,document.body)}function sb(e,t,a){const[o,n]=d.useState(void 0);if(d.useLayoutEffect(()=>{if(!a){n(void 0);return}function s(){const c=e.current;if(!c)return;const u=c.getBoundingClientRect(),h=t.current?.offsetWidth??136,g=t.current?.offsetHeight??0;let p=u.right+8;p+h>window.innerWidth-8&&(p=Math.max(8,u.left-h-8));let k=u.top-4;g>0&&k+g>window.innerHeight-8&&(k=Math.max(8,window.innerHeight-g-8)),n({position:"fixed",top:k,left:p})}s();const i=e.current?.closest(".sidebarScrollable");return window.addEventListener("resize",s),i?.addEventListener("scroll",s,{passive:!0}),()=>{window.removeEventListener("resize",s),i?.removeEventListener("scroll",s)}},[e,t,a]),!!a)return o??{position:"fixed",top:0,left:0,visibility:"hidden",pointerEvents:"none"}}function ib({cat:e,isBoss:t,isActive:a,hasTelegramBinding:o,dotClass:n,dotTitle:s,overflowOpen:i,catInitials:c,onDirectChat:u,onArchive:h,onOverflowToggle:g,onDirectMessage:p,terminalActionLabelKey:k,terminalActionDisabled:f}){const{t:w}=U(),b=d.useRef(null),m=d.useRef(null),C=sb(b,m,i);return r.jsxs("div",{className:["myCatRow",a?"myCatRowActive":"",i?"myCatRowOverflowOpen":""].filter(Boolean).join(" "),onClick:u,children:[r.jsxs("button",{className:a?"myCatItem myCatItemActive":"myCatItem",type:"button",onClick:v=>{v.stopPropagation(),u()},children:[r.jsxs("span",{className:t?"myCatAvatarWrap catAvatar catAvatarBoss":"myCatAvatarWrap catAvatar",style:e.avatarUrl?{backgroundImage:`url(${e.avatarUrl})`,backgroundSize:"cover",backgroundPosition:"center"}:e.avatarColor?{background:e.avatarColor}:void 0,children:[e.avatarUrl?null:c(e.name),n?r.jsx("span",{className:n,"data-tooltip":s}):null]}),r.jsx("span",{className:"myCatName",children:e.name})]}),r.jsxs("span",{className:"myCatTrailing",children:[o?r.jsx("span",{className:"myCatTelegramIcon","data-tooltip":w(l.conversationSidebarTelegramBoundTooltip),"aria-label":w(l.conversationSidebarTelegramBoundTooltip),children:r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M20.66 3.88 2.92 10.9a.73.73 0 0 0 .04 1.38l4.45 1.4 1.72 5.52a.78.78 0 0 0 1.24.37l2.48-2.02 4.87 3.6a.78.78 0 0 0 1.2-.46L21.7 4.76c.17-.7-.52-1.27-1.04-0.88ZM10.1 14.6l-.44 3.15-1.34-4.3 9.38-6.2Z"})})}):null,r.jsx("button",{ref:b,className:"myCatOverflowButton",type:"button",onClick:v=>{v.stopPropagation(),g()},children:"⋯"})]}),i?r.jsxs(nb,{menuRef:m,className:"myCatOverflowMenu",style:C,onClick:v=>v.stopPropagation(),children:[p?r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",onClick:p,children:w(l.conversationSidebarDirectMessageButton)}),r.jsx("hr",{className:"myCatOverflowMenuDivider","aria-hidden":"true"})]}):null,r.jsx("button",{type:"button",disabled:f===!0,onClick:h,children:w(k??l.conversationSidebarArchiveButton)})]}):null]})}function zc({iconKind:e}){const t={className:"myCatPlaceholderIcon",width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};return e==="groupPeople"?r.jsxs("svg",{...t,children:[r.jsx("circle",{cx:"6",cy:"10",r:"2.5"}),r.jsx("circle",{cx:"13",cy:"10",r:"2.5"}),r.jsx("path",{d:"M2 19v-1a3 3 0 0 1 3-3h9a3 3 0 0 1 3 3v1"}),r.jsx("line",{x1:"20",y1:"3",x2:"20",y2:"9"}),r.jsx("line",{x1:"23",y1:"6",x2:"17",y2:"6"})]}):e==="orgChart"?r.jsxs("svg",{...t,children:[r.jsx("rect",{x:"6",y:"9",width:"6",height:"4"}),r.jsx("rect",{x:"1",y:"18",width:"5",height:"4"}),r.jsx("rect",{x:"12",y:"18",width:"5",height:"4"}),r.jsx("line",{x1:"9",y1:"13",x2:"9",y2:"16"}),r.jsx("line",{x1:"3.5",y1:"16",x2:"14.5",y2:"16"}),r.jsx("line",{x1:"3.5",y1:"16",x2:"3.5",y2:"18"}),r.jsx("line",{x1:"14.5",y1:"16",x2:"14.5",y2:"18"}),r.jsx("line",{x1:"20",y1:"3",x2:"20",y2:"9"}),r.jsx("line",{x1:"23",y1:"6",x2:"17",y2:"6"})]}):r.jsxs("svg",{...t,children:[r.jsx("path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"}),r.jsx("circle",{cx:"9",cy:"7",r:"4"}),r.jsx("line",{x1:"19",y1:"8",x2:"19",y2:"14"}),r.jsx("line",{x1:"22",y1:"11",x2:"16",y2:"11"})]})}function lb({label:e,onClick:t,iconKind:a}){const o=typeof t=="function",n=()=>{o&&t?.()};return r.jsx("div",{className:["myCatRow","myCatRowPlaceholder",o?"":"myCatRowPlaceholderStatic"].filter(Boolean).join(" "),onClick:n,children:r.jsxs("button",{className:"myCatItem myCatItemPlaceholder",type:"button",onClick:s=>{s.stopPropagation(),n()},disabled:!o,children:[r.jsx("span",{className:"myCatAvatarWrap catAvatar catAvatarPlaceholder","aria-hidden":"true",children:r.jsx(zc,{iconKind:a??"singlePerson"})}),r.jsx("span",{className:"myCatName myCatNamePlaceholder",children:e})]})})}function Qr({label:e,cats:t,bossCatId:a,payloadChannels:o,activeMyCatId:n,telegramBoundCatIds:s,helpers:i,overflowMenuOpenId:c,onOverflowMenuToggle:u,onDirectChatCat:h,onArchiveCat:g,emptyStatePlaceholder:p,onDirectMessageCat:k,terminalActionLabelKey:f,disableTerminalActionWhenDraft:w=!1,hideLabel:b=!1}){const{t:m}=U(),C=i.sortCatsForDisplay(t.filter(y=>y.status==="active"),{bossCatIds:a}),v=C.length===0&&p!=null;return r.jsxs("section",{className:b?"myCatsSection myCatsSectionHeaderless":"myCatsSection",children:[b?null:r.jsx("p",{className:"sectionLabel",children:e??m(l.conversationSidebarDirectMessagesLabel)}),r.jsxs("div",{className:"myCatsList",children:[v?r.jsx(lb,{label:p.label,onClick:p.onClick,iconKind:p.iconKind}):null,C.map(y=>{const L=y.id===a,N=n===y.id,T=s.has(y.id),j=i.findDirectLaneForCat(o,y.id),A=i.resolveMyCatStatusDot(j?.defaultRecipientLeaseStatus),R=i.statusDotClassName(A),P=i.statusDotLabel(A),I=P?m(P):"",O=`cat:${y.id}`,E=c===O,$=w&&!j;return r.jsx(ib,{cat:y,isBoss:L,isActive:N,hasTelegramBinding:T,dotClass:R,dotTitle:I,overflowOpen:E,catInitials:i.catInitials,onDirectChat:()=>h(y.id),onArchive:()=>{u(null),g(y.id)},onOverflowToggle:()=>u(E?null:O),onDirectMessage:k?()=>{u(null),k(y.id)}:void 0,terminalActionLabelKey:f,terminalActionDisabled:$},y.id)})]})]})}const st=3,Jr=5;function Zs(e){return{id:e.id,name:e.name,avatarUrl:e.avatarUrl,avatarColor:e.avatarColor,isBoss:e.isBoss}}function cb(e){return[...e].sort((t,a)=>{const o=t.isBoss?0:1,n=a.isBoss?0:1;return o!==n?o-n:t.createdAt.localeCompare(a.createdAt)})}function ei(e){return[...e].sort((t,a)=>{const o=t.createdAt.localeCompare(a.createdAt);if(o!==0)return o;const n=t.name.localeCompare(a.name);return n!==0?n:t.id.localeCompare(a.id)})}function ti(e){return{id:e.id,name:e.name,avatarUrl:e.avatarUrl,avatarColor:null,isBoss:!1}}function ai(e){return{id:e.id,name:e.name,avatarUrl:e.avatarUrl,avatarColor:null,isBoss:!1}}function db({row:e}){const t=e.avatarUrl?{backgroundImage:`url(${e.avatarUrl})`,backgroundSize:"cover",backgroundPosition:"center"}:e.avatarColor?{background:e.avatarColor}:void 0;return r.jsx("span",{className:e.isBoss?"entityIndexAvatar catAvatarBoss":"entityIndexAvatar",style:t,children:e.avatarUrl?null:fe(e.name)})}function ub(e){const t=cb(e.lobby.cats),a=ei(e.lobby.clowders??[]),o=ei(e.lobby.catteries??[]);return[{key:"cats",headerLabelKey:l.entityIndexColumnHeaderCats,rows:t.slice(0,st).map(Zs),overflowAvatarRows:t.slice(st,st+Jr).map(Zs),totalCount:t.length,routePath:"/entities/cats",detailPathPrefix:"/entities/cats/",placeholderLabelKey:l.entitiesSidebarNewCat,placeholderIconKind:"singlePerson",placeholderTarget:"/settings/cats/new"},{key:"clowders",headerLabelKey:l.entityIndexColumnHeaderClowders,rows:a.slice(0,st).map(ti),overflowAvatarRows:a.slice(st,st+Jr).map(ti),totalCount:a.length,routePath:"/entities/clowders",detailPathPrefix:"/entities/clowders/",placeholderLabelKey:l.entitiesSidebarNewClowder,placeholderIconKind:"groupPeople",placeholderTarget:null},{key:"catteries",headerLabelKey:l.entityIndexColumnHeaderCatteries,rows:o.slice(0,st).map(ai),overflowAvatarRows:o.slice(st,st+Jr).map(ai),totalCount:o.length,routePath:"/entities/catteries",detailPathPrefix:"/entities/catteries/",placeholderLabelKey:l.entitiesSidebarNewCattery,placeholderIconKind:"orgChart",placeholderTarget:null}]}function Vc({envelope:e}){const{t}=U(),a=Ne(),o=ub(e);return r.jsx("div",{className:"entityIndexCards",children:o.map(n=>r.jsxs("div",{className:`entityIndexColumn entityIndexColumn--${n.key}`,children:[r.jsx("p",{className:"entityIndexColumnHeader",children:t(n.headerLabelKey)}),r.jsxs("div",{className:["contentCard","platformLobbyCard","platformLobbyCard--entity",`platformLobbyCard--entity-${n.key}`].join(" "),children:[r.jsx("button",{type:"button",className:"entityIndexCardLink","aria-label":t(l.entityIndexCardOpenCanvasAriaLabel,{label:t(n.headerLabelKey)}),onClick:()=>a(n.routePath)}),r.jsx("div",{className:"platformLobbyCardAccent"}),r.jsx("ul",{className:"entityIndexCardItems",children:Array.from({length:st},(s,i)=>{const c=n.rows[i];if(c)return r.jsx("li",{className:"entityIndexRow",children:r.jsxs("button",{type:"button",className:"entityIndexItem",onClick:()=>a(`${n.detailPathPrefix}${encodeURIComponent(c.id)}`),children:[r.jsx(db,{row:c}),r.jsx("span",{className:"entityIndexName",children:c.name})]})},c.id);if(i===0&&n.totalCount===0){const u=n.placeholderTarget;return r.jsx("li",{className:"entityIndexRow entityIndexRowPlaceholder",children:r.jsxs("button",{type:"button",className:"entityIndexItem entityIndexItemPlaceholder",disabled:u===null,onClick:u===null?void 0:h=>{h.stopPropagation(),a(u)},children:[r.jsx("span",{className:"entityIndexAvatar entityIndexAvatarPlaceholder","aria-hidden":"true",children:r.jsx(zc,{iconKind:n.placeholderIconKind})}),r.jsx("span",{className:"entityIndexName entityIndexNamePlaceholder",children:t(n.placeholderLabelKey)})]})},`${n.key}-placeholder`)}return r.jsx("li",{className:"entityIndexRow entityIndexRowEmpty","aria-hidden":"true"},`${n.key}-empty-${i}`)})}),n.totalCount>0?r.jsxs("div",{className:"entityIndexCardFooter",children:[n.overflowAvatarRows.length>0?r.jsx("div",{className:"entityIndexAvatarStack","aria-hidden":"true",children:n.overflowAvatarRows.map(s=>r.jsx("span",{className:"entityIndexAvatar entityIndexAvatarStacked",style:s.avatarUrl?{backgroundImage:`url(${s.avatarUrl})`,backgroundSize:"cover",backgroundPosition:"center"}:s.avatarColor?{background:s.avatarColor}:void 0,children:s.avatarUrl?null:fe(s.name)},s.id))}):null,r.jsx("span",{className:"entityIndexCardTotal",children:t(l.entityIndexCardTotal,{count:n.totalCount})})]}):null]})]},n.key))})}function pb({envelope:e}){const{t}=U();return r.jsxs("div",{className:"entityCanvas entityCanvas--index","aria-label":t(l.entitiesShellAriaLabel),children:[r.jsx("header",{className:"entityCanvasHeader",children:r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:t(l.entityIndexEyebrow)}),r.jsx("h1",{className:"entityCanvasTitle",children:t(l.entityIndexTitle)})]})}),r.jsx(Vc,{envelope:e})]})}function hb(e,t){const a=e.createdAt.localeCompare(t.createdAt);if(a!==0)return a;const o=e.name.localeCompare(t.name);return o!==0?o:e.id.localeCompare(t.id)}function mb(e){return e.slice(0,10)||e}function ri({entry:e}){const t=e.avatarUrl?{backgroundImage:`url(${e.avatarUrl})`,backgroundSize:"cover",backgroundPosition:"center"}:void 0;return r.jsx("span",{className:"entityCanvasAvatar",style:t,children:e.avatarUrl?null:fe(e.name)})}function Xr({metrics:e,className:t}){return r.jsx("dl",{className:t,children:e.map(a=>r.jsxs("div",{children:[r.jsx("dt",{children:a.label}),r.jsx("dd",{children:a.value})]},a.key))})}function gb({relations:e,emptyLabel:t}){return e.length===0?r.jsx("p",{className:"entityCanvasDetailEmpty",children:t}):r.jsx("ul",{className:"entityCanvasRelationList",children:e.map(a=>r.jsxs("li",{children:[r.jsx("span",{children:a.label}),a.href?r.jsx(Nt,{to:a.href,children:a.value}):r.jsx("strong",{children:a.value})]},a.key))})}function Yc({kind:e,entries:t,titleKey:a,eyebrowKey:o,emptyStateKey:n,ariaLabelKey:s,detailHeadingKey:i,relationHeadingKey:c,relationEmptyKey:u,openActionKey:h,totals:g}){const{t:p}=U(),k=d.useMemo(()=>[...t].sort(hb),[t]),[f,w]=d.useState(null),b=k.find(m=>m.id===f)??k[0]??null;return r.jsxs("div",{className:`entityCanvas entityCanvas--${e}`,"aria-label":p(s),children:[r.jsxs("header",{className:"entityCanvasHeader",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:p(o)}),r.jsx("h1",{className:"entityCanvasTitle",children:p(a)})]}),g.length>0?r.jsx(Xr,{metrics:g,className:"entityCanvasTotals"}):null]}),k.length===0?r.jsx("section",{className:"contentCard entityCanvasEmpty",children:r.jsx("p",{children:p(n)})}):r.jsxs("div",{className:"entityCanvasBody",children:[r.jsx("section",{className:"contentCard entityCanvasRegistry","aria-label":p(a),children:r.jsx("ul",{className:"entityCanvasRows",children:k.map(m=>r.jsx("li",{children:r.jsxs("button",{type:"button",className:b?.id===m.id?"entityCanvasRow entityCanvasRowActive":"entityCanvasRow",onClick:()=>w(m.id),"aria-current":b?.id===m.id?"page":void 0,children:[r.jsx(ri,{entry:m}),r.jsxs("span",{className:"entityCanvasRowText",children:[r.jsx("span",{className:"entityCanvasRowName",children:m.name}),r.jsx("span",{className:"entityCanvasRowSubtitle",children:m.subtitle})]}),r.jsx(Xr,{metrics:m.metrics,className:"entityCanvasRowMetrics"})]})},m.id))})}),b?r.jsxs("aside",{className:"contentCard entityCanvasDetail","aria-label":b.name,children:[r.jsxs("header",{className:"entityCanvasDetailHeader",children:[r.jsx(ri,{entry:b}),r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:p(i)}),r.jsx("h2",{children:b.name})]})]}),r.jsx(Xr,{metrics:[...b.detailMetrics,{key:"createdAt",label:p(l.entityCanvasCreatedLabel),value:mb(b.createdAt)},{key:"id",label:p(l.entityCanvasIdLabel),value:b.id}],className:"entityCanvasDetailMeta"}),r.jsxs("section",{className:"entityCanvasRelationSection",children:[r.jsx("h3",{children:p(c)}),r.jsx(gb,{relations:b.relations,emptyLabel:p(u)})]}),r.jsx(Nt,{className:"secondaryButton entityCanvasOpenLink",to:b.routePath,children:p(h)})]}):null]})]})}function Qc(e){return e.filter(t=>Number(t.value)>0)}function fb({envelope:e}){const{t}=U(),a=new Map((e.lobby.catteries??[]).map(s=>[s.id,s])),o=e.lobby.clowders??[],n=o.map(s=>{const i=s.parentCatteryId?a.get(s.parentCatteryId)??null:null,c=i?.name??s.parentCatteryId;return{id:s.id,name:s.name,avatarUrl:s.avatarUrl,createdAt:s.createdAt,routePath:`/entities/clowders/${encodeURIComponent(s.id)}`,subtitle:c?t(l.clowderHomeChipPartOf,{catteryName:c}):t(l.clowderHomeChipCrossUnit),metrics:[{key:"cats",label:t(l.entityCanvasCatsLabel),value:s.catCount},{key:"members",label:t(l.entityCanvasMembersLabel),value:s.memberCount}],detailMetrics:[{key:"cats",label:t(l.entityCanvasCatsLabel),value:s.catCount},{key:"members",label:t(l.entityCanvasMembersLabel),value:s.memberCount}],relations:[c?{key:"parentCattery",label:t(l.entityCanvasParentCatteryLabel),value:c,href:i?`/entities/catteries/${encodeURIComponent(i.id)}`:void 0}:{key:"parentCattery",label:t(l.entityCanvasParentCatteryLabel),value:t(l.clowderHomeChipCrossUnit)}]}});return r.jsx(Yc,{kind:"clowders",entries:n,titleKey:l.clowdersListTitle,eyebrowKey:l.clowdersListEyebrow,emptyStateKey:l.clowdersListEmptyState,ariaLabelKey:l.clowdersCanvasAriaLabel,detailHeadingKey:l.entityCanvasSelectedClowderLabel,relationHeadingKey:l.entityCanvasOrganizationLabel,relationEmptyKey:l.entityCanvasNoOrganizationLabel,openActionKey:l.entityCanvasOpenClowderAction,totals:Qc([{key:"total",label:t(l.entityCanvasTotalLabel),value:o.length},{key:"cats",label:t(l.entityCanvasCatsLabel),value:o.reduce((s,i)=>s+i.catCount,0)},{key:"members",label:t(l.entityCanvasMembersLabel),value:o.reduce((s,i)=>s+i.memberCount,0)}])})}function wb({envelope:e}){const{t}=U(),a=e.lobby.clowders??[],o=e.lobby.catteries??[],n=o.map(s=>{const i=a.filter(c=>c.parentCatteryId===s.id);return{id:s.id,name:s.name,avatarUrl:s.avatarUrl,createdAt:s.createdAt,routePath:`/entities/catteries/${encodeURIComponent(s.id)}`,subtitle:t(l.entityCanvasCatterySubtitle,{clowderCount:String(s.clowderCount),memberCount:String(s.memberCount)}),metrics:[{key:"members",label:t(l.entityCanvasMembersLabel),value:s.memberCount},{key:"clowders",label:t(l.entityCanvasClowdersLabel),value:s.clowderCount}],detailMetrics:[{key:"members",label:t(l.entityCanvasMembersLabel),value:s.memberCount},{key:"clowders",label:t(l.entityCanvasClowdersLabel),value:s.clowderCount},{key:"cats",label:t(l.entityCanvasCatsLabel),value:s.catCount}],relations:i.map(c=>({key:c.id,label:t(l.entityCanvasFormalClowderLabel),value:c.name,href:`/entities/clowders/${encodeURIComponent(c.id)}`}))}});return r.jsx(Yc,{kind:"catteries",entries:n,titleKey:l.catteriesListTitle,eyebrowKey:l.catteriesListEyebrow,emptyStateKey:l.catteriesListEmptyState,ariaLabelKey:l.catteriesCanvasAriaLabel,detailHeadingKey:l.entityCanvasSelectedCatteryLabel,relationHeadingKey:l.entityCanvasOrganizationLabel,relationEmptyKey:l.entityCanvasNoFormalClowdersLabel,openActionKey:l.entityCanvasOpenCatteryAction,totals:Qc([{key:"total",label:t(l.entityCanvasTotalLabel),value:o.length},{key:"members",label:t(l.entityCanvasMembersLabel),value:o.reduce((s,i)=>s+i.memberCount,0)},{key:"clowders",label:t(l.entityCanvasClowdersLabel),value:o.reduce((s,i)=>s+i.clowderCount,0)}])})}const Jc="cats.sidebar-open";function kb(e){return e!=="collapsed"}function Xc(e){if(!e)return!0;try{return kb(e.getItem(Jc))}catch{return!0}}function Zc(e,t){if(e)try{e.setItem(Jc,t?"open":"collapsed")}catch{}}function Nn({slotKind:e}){const t=d.useRef(null),{guideCat:a,projection:o,dockSlotState:n,presentation:s,onDockedPointerDown:i,consumePillClickSuppression:c,clearPillClickSuppression:u,dragActive:h,undock:g}=en(),p=zh(e),{t:k}=U(),f=d.useCallback(P=>{t.current=P,p(P)},[p]);if(!a)return null;const w=n[e],b=o.kind==="docked"&&o.slot===e,m=w.preview,C=ct(),v=k(l.sharedGuideCatPillOpenLabel,{guideCatName:C}),y=k(l.sharedGuideCatDockUndockLabel,{guideCatName:C}),L=bb(a),N=P=>{i(P)},T=()=>{c()||s.toggle()},j=b?T:void 0,A=b?()=>{u()}:void 0,R=P=>{P.stopPropagation(),T()};return r.jsxs("div",{ref:f,className:`guideCatDockSlot guideCatDockSlot--${e}`,"data-active":b?"true":"false","data-preview":m?"true":"false","data-dragging":h?"true":"false",onClick:j,onPointerDown:A,children:[b?r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",className:"guideCatPill guideCatPill--docked",onPointerDown:N,onClick:R,"aria-label":v,"data-tooltip":L,"data-tooltip-delay":"1000",children:r.jsx("img",{className:"guideCatPillAvatar",src:Ya,alt:"","aria-hidden":"true"})}),e==="workspace"?r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"guideCatDockName",children:C}),r.jsx("button",{type:"button",className:"guideCatDockUndockSlot","aria-label":y,onClick:P=>{P.stopPropagation(),g()},children:r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M4 4h8v8"}),r.jsx("path",{d:"M4 12 12 4"})]})})]}):null]}):null,m&&!b?r.jsx("div",{className:"guideCatDockSlotGhost","aria-hidden":"true",children:r.jsx("img",{className:"guideCatPillAvatar",src:Ya,alt:"","aria-hidden":"true"})}):null]})}function bb(e){const t=ct(),a=wr({provider:e.executionTarget.provider,instance:e.executionTarget.instance,model:e.executionTarget.model,modelSelection:e.modelSelection??null});return Kl(t,a)}const yb={setup:"/runtime/setup"},ed=yb.setup,vb=new Set(["ok","healthy","ready"]),Cb=new Set(["degraded","warming","starting"]),Sb=new Set(["error","unavailable","failed"]);function vr(e){if(!e||typeof e.reachable!="boolean")return"unknown";if(!e.reachable)return"unavailable";const t=typeof e.status=="string"?e.status.toLowerCase():"";return vb.has(t)?"ready":Cb.has(t)?"degraded":Sb.has(t)?"unavailable":e.reachable?"ready":"unknown"}function Lb(e){switch(e){case"ready":return"sharedRuntimeStatusTooltipReady";case"degraded":return"sharedRuntimeStatusTooltipDegraded";case"unavailable":return"sharedRuntimeStatusTooltipUnavailable";default:return"sharedRuntimeStatusTooltipUnknown"}}const Rb={ready:"Cats Runtime is connected",degraded:"Cats Runtime is starting up",unavailable:"Cats Runtime is offline",unknown:"Checking Cats Runtime status…"};function jn(e,t){return t?t(Lb(e)):Rb[e]}function Pb(e){switch(e){case"ready":return"runtimeStatusDot isConnected";case"degraded":return"runtimeStatusDot isDegraded";case"unavailable":return"runtimeStatusDot isUnavailable";default:return"runtimeStatusDot isUnknown"}}function Ab(e){switch(e){case"ready":return"lobbyIdentityDot lobbyIdentityDot--ok";case"unavailable":case"degraded":return"lobbyIdentityDot lobbyIdentityDot--warn";default:return"lobbyIdentityDot lobbyIdentityDot--warn"}}function td({payload:e,accountMenuRef:t,runtimeFooterStatus:a,runtimeFooterLabel:o,onNavigateSettings:n,onNavigateRuntime:s,catInitials:i,accountMenuOpen:c,onAccountMenuToggle:u}){const{t:h}=U();return r.jsxs("div",{className:"sidebarFooter",ref:t,children:[r.jsxs("button",{type:"button",className:"sidebarFooterMainButton",onClick:n,"aria-label":h(l.conversationSidebarOpenAccountSettingsLabel),children:[r.jsx("div",{className:"profileBadge",style:e.ownerAvatarUrl?{backgroundImage:`url(${e.ownerAvatarUrl})`,backgroundSize:"cover",backgroundPosition:"center"}:void 0,children:e.ownerAvatarUrl?null:i(e.ownerDisplayName)}),r.jsx("div",{className:"sidebarFooterMeta",children:r.jsx("strong",{children:e.ownerDisplayName})})]}),r.jsxs("button",{type:"button",className:"sidebarFooterTrailing",onClick:s,"aria-label":h(l.conversationSidebarRuntimeStatusAriaLabel,{status:o}),"data-tooltip":o,children:[r.jsx("span",{className:Pb(a),"aria-hidden":"true"}),r.jsx("span",{className:"sidebarFooterRuntimeLink","aria-hidden":"true",children:r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M4 4h8v8"}),r.jsx("path",{d:"M4 12 12 4"})]})})]})]})}function xb(e,t){d.useEffect(()=>{if(!e)return;function a(o){const n=o.target;if(!(n instanceof Element))return;const s=document.querySelector(".myCatOverflowMenu")??document.querySelector(".recentOverflowMenu"),i=n.closest(".myCatOverflowButton, .recentOverflowButton");s?.contains(n)||i||t(null)}return document.addEventListener("mousedown",a),()=>document.removeEventListener("mousedown",a)},[e,t])}function ad(e){let t=null,a=!1,o=!1;return{record(n,s){const i=e.isInside(n);i?a||(t=o&&typeof s=="number"&&s>0?s-1:null):(o=!0,t=null),a=i},getExitDelta(n){return typeof n=="number"&&typeof t=="number"&&n>t?-(n-t):null},__resetForTests(){t=null,a=!1,o=!1}}}const rd=ad({isInside:Cl});function Tb(e,t){rd.record(e,t)}function Db(e){return rd.getExitDelta(e)}const Nb="no_dot",Zr={catInitials:e=>fe(e),presentChannelTitle:e=>e,isVisibleCat:()=>!0,sortCatsForDisplay:(e,t)=>{const a=Array.isArray(t.bossCatIds)?t.bossCatIds[0]??null:t.bossCatIds??null;return[...e].sort((o,n)=>{const s=o.id===a?0:1,i=n.id===a?0:1;return s!==i?s-i:o.createdAt.localeCompare(n.createdAt)})},isDirectLaneSummary:()=>!1,findDirectLaneForCat:()=>null,resolveMyCatStatusDot:()=>Nb,statusDotClassName:()=>"",statusDotLabel:()=>null};function jb(e){const t=e.lobby.cats.map(s=>({id:s.id,name:s.name,status:"active",avatarColor:s.avatarColor,avatarUrl:s.avatarUrl,createdAt:s.createdAt})),a=e.lobby.cats.find(s=>s.isBoss),o=a?a.id:null;return{payload:{ownerDisplayName:e.ownerDisplayName,ownerAvatarUrl:e.ownerAvatarUrl,runtime:e.runtime,runtimeSetup:e.runtimeSetup?{status:e.runtimeSetup.status}:null,chat:{bossCatId:o,cats:t,channels:[]}},cats:t,bossCatId:o}}function Mb({envelope:e,sidebarOpen:t,onToggleSidebar:a,onCollapsedSidebarClick:o,confirmDialog:n}){const{t:s}=U(),i=Ne(),c=d.useRef(null),[u,h]=d.useState(null);xb(u,h);const p=ru("/entities/cats/:catId/*")?.params.catId??null,k=ve().pathname,f=k==="/entities/cats"||k.startsWith("/entities/cats/"),w=k==="/entities/clowders"||k.startsWith("/entities/clowders/"),b=k==="/entities/catteries"||k.startsWith("/entities/catteries/"),{payload:m,cats:C,bossCatId:v}=jb(e),y=async G=>{const B=e.lobby.cats.find(F=>F.id===G)?.name??G;if(await n({title:s(l.sharedSettingsCatsArchiveConfirmTitle),message:s(l.sharedSettingsCatsArchiveWithTelegramConfirmMessage,{catName:B}),confirmLabel:s(l.sharedSettingsCatsArchiveLabel)})){try{await Re(G,{archive:!0})}catch(F){console.error("[EntitiesAppShellSidebar] archive failed",F);return}window.location.reload()}},L=vr(m.runtime),N=jn(L,s),j={platformShellSurface:e.lastProductSurface??"chat"},A=d.useCallback(()=>{const G=window.history.state,ee=Db(G?.idx);ee!==null?i(ee):i("/lobby",{replace:!0})},[i]),R=r.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("circle",{cx:"8",cy:"6",r:"2.5"}),r.jsx("path",{d:"M3 13.5a5 5 0 0 1 10 0"})]}),P=r.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("circle",{cx:"5",cy:"6",r:"2"}),r.jsx("circle",{cx:"11",cy:"6",r:"2"}),r.jsx("path",{d:"M2 13a3 3 0 0 1 3-3h6a3 3 0 0 1 3 3"})]}),I=r.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("rect",{x:"6",y:"2",width:"4",height:"3",rx:"0.5"}),r.jsx("rect",{x:"1",y:"11",width:"4",height:"3",rx:"0.5"}),r.jsx("rect",{x:"11",y:"11",width:"4",height:"3",rx:"0.5"}),r.jsx("path",{d:"M8 5v3"}),r.jsx("path",{d:"M3 8h10"}),r.jsx("path",{d:"M3 8v3"}),r.jsx("path",{d:"M13 8v3"})]}),O={label:s(l.entitiesSidebarNewCat),onClick:()=>i("/settings/cats/new",{state:j}),iconKind:"singlePerson"},E={label:s(l.entitiesSidebarNewClowder),iconKind:"groupPeople"},$={label:s(l.entitiesSidebarNewCattery),iconKind:"orgChart"};return r.jsxs("aside",{className:t?"sidebar":"sidebar sidebarCollapsed","data-shell-surface":"entities",onClick:o,children:[r.jsxs("div",{className:"sidebarInner",children:[r.jsxs("div",{className:"brandRow",children:[r.jsxs("div",{className:"brandCopy entitiesBrandCopy",children:[r.jsx("button",{type:"button",className:"surfaceExitButton","aria-label":s(l.entitiesShellExitButtonAriaLabel),onClick:A,children:r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:r.jsx("path",{d:"M10 3L5 8l5 5"})})}),r.jsx("span",{className:"brandLabel entitiesBrandLabel",children:s(l.entitiesShellBrandLabel)})]}),r.jsx("button",{className:"chromeButton",type:"button","aria-label":s(t?l.conversationSidebarCloseSidebarLabel:l.conversationSidebarOpenSidebarLabel),onClick:a,children:r.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("rect",{x:"1",y:"2",width:"14",height:"12",rx:"2"}),r.jsx("path",{d:"M6 2v12"})]})})]}),r.jsxs("div",{className:"sidebarScrollable",children:[r.jsxs("nav",{className:"navGroup","data-lens-kind":"cats",children:[r.jsxs("button",{type:"button",className:f?"navItem navItemActive":"navItem",onClick:()=>i("/entities/cats"),children:[r.jsx("span",{className:"navGlyph","aria-hidden":"true",children:R}),r.jsx("span",{className:"navLabel",children:s(l.entitiesSidebarSectionCats)})]}),r.jsx(Qr,{hideLabel:!0,cats:C,bossCatId:v,payloadChannels:[],activeMyCatId:p,telegramBoundCatIds:new Set,helpers:Zr,overflowMenuOpenId:u,onOverflowMenuToggle:h,onDirectChatCat:G=>i(`/entities/cats/${encodeURIComponent(G)}`),onArchiveCat:G=>{y(G)},emptyStatePlaceholder:O,onDirectMessageCat:G=>i(Sn(pr("chat"),G))})]}),r.jsxs("nav",{className:"navGroup","data-lens-kind":"clowders",children:[r.jsxs("button",{type:"button",className:w?"navItem navItemActive":"navItem",onClick:()=>i("/entities/clowders"),children:[r.jsx("span",{className:"navGlyph","aria-hidden":"true",children:P}),r.jsx("span",{className:"navLabel",children:s(l.entitiesSidebarSectionClowders)})]}),r.jsx(Qr,{hideLabel:!0,cats:[],bossCatId:null,payloadChannels:[],activeMyCatId:null,telegramBoundCatIds:new Set,helpers:Zr,overflowMenuOpenId:null,onOverflowMenuToggle:()=>{},onDirectChatCat:()=>{},onArchiveCat:()=>{},emptyStatePlaceholder:E})]}),r.jsxs("nav",{className:"navGroup","data-lens-kind":"catteries",children:[r.jsxs("button",{type:"button",className:b?"navItem navItemActive":"navItem",onClick:()=>i("/entities/catteries"),children:[r.jsx("span",{className:"navGlyph","aria-hidden":"true",children:I}),r.jsx("span",{className:"navLabel",children:s(l.entitiesSidebarSectionCatteries)})]}),r.jsx(Qr,{hideLabel:!0,cats:[],bossCatId:null,payloadChannels:[],activeMyCatId:null,telegramBoundCatIds:new Set,helpers:Zr,overflowMenuOpenId:null,onOverflowMenuToggle:()=>{},onDirectChatCat:()=>{},onArchiveCat:()=>{},emptyStatePlaceholder:$})]})]})]}),r.jsx(Nn,{slotKind:"workspace"}),r.jsx(td,{payload:m,accountMenuOpen:!1,accountMenuRef:c,runtimeFooterStatus:L,runtimeFooterLabel:N,onAccountMenuToggle:()=>{},onNavigateSettings:()=>i("/settings/general",{state:j}),onNavigateRuntime:()=>i("/settings/runtime",{state:j}),catInitials:fe})]})}function Eb({envelope:e}){const[t,a]=d.useState(()=>Xc(typeof window>"u"?null:window.localStorage)),{dialog:o,confirm:n,handleClose:s}=Et();d.useEffect(()=>{Zc(typeof window>"u"?null:window.localStorage,t)},[t]);const i=d.useCallback(()=>{a(u=>!u)},[]),c=d.useCallback(u=>{if(t)return;const h=u.target;h.closest('button, a, input, textarea, select, [role="button"]')||h.closest(".accountMenu")||a(!0)},[t]);return r.jsxs("div",{className:t?"screen claudeShell":"screen claudeShell claudeShellSidebarCollapsed",children:[r.jsx(Mb,{envelope:e,sidebarOpen:t,onToggleSidebar:i,onCollapsedSidebarClick:c,confirmDialog:n}),r.jsx("main",{className:"canvas",children:r.jsx(al,{})}),r.jsx(It,{dialog:o,onClose:s})]})}function Ib(e,t){return e.filter(a=>a.installState!=="available"&&(a.settings?.length??0)>0).flatMap(a=>(a.settings??[]).map(o=>({...o,label:oh(a.id,o,t),productId:a.id})))}function Bb({title:e,children:t}){return r.jsxs("section",{className:"settingsContent",children:[r.jsx("header",{className:"settingsHeader",children:r.jsx("h1",{children:e})}),r.jsx("div",{className:"settingsBody",children:t})]})}const od=ad({isInside:Pa});function Fb(e,t){od.record(e,t)}function Ob(e){return od.getExitDelta(e)}function Wb(e){return{payload:{ownerDisplayName:e.ownerDisplayName,ownerAvatarUrl:e.ownerAvatarUrl,runtime:e.runtime,runtimeSetup:e.runtimeSetup?{status:e.runtimeSetup.status}:null,chat:{bossCatId:null,cats:[],channels:[]}}}}function Ub({envelope:e,settingsPayload:t,sidebarOpen:a,onToggleSidebar:o,onCollapsedSidebarClick:n}){const{t:s}=U(),i=Ne(),c=d.useRef(null),u=xn(),h=t??e,g=Ib(h.products,s),p=ve().pathname,k=d.useCallback(()=>{const L=window.history.state,N=Ob(L?.idx);N!==null?i(N):i("/lobby",{replace:!0})},[i]),f=L=>p===L||p.startsWith(`${L}/`),w=p==="/settings/cats"||p==="/settings/cats/new",b=f("/settings/assistants"),{payload:m}=Wb(h),C=vr(m.runtime),v=jn(C,s),y=L=>L?"navItem navItemActive":"navItem";return r.jsxs("aside",{className:a?"sidebar":"sidebar sidebarCollapsed","data-shell-surface":"settings",onClick:n,children:[r.jsxs("div",{className:"sidebarInner",children:[r.jsxs("div",{className:"brandRow",children:[r.jsxs("div",{className:"brandCopy settingsBrandCopy",children:[r.jsx("button",{type:"button",className:"surfaceExitButton","aria-label":s(l.settingsShellCloseButtonLabel),onClick:k,children:r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:r.jsx("path",{d:"M10 3L5 8l5 5"})})}),r.jsx("span",{className:"brandLabel settingsBrandLabel",children:s(l.settingsShellHeading)})]}),r.jsx("button",{className:"chromeButton",type:"button","aria-label":s(a?l.conversationSidebarCloseSidebarLabel:l.conversationSidebarOpenSidebarLabel),onClick:o,children:r.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("rect",{x:"1",y:"2",width:"14",height:"12",rx:"2"}),r.jsx("path",{d:"M6 2v12"})]})})]}),r.jsxs("div",{className:"sidebarScrollable",children:[r.jsx("nav",{className:"navGroup",children:r.jsx("button",{type:"button",className:y(f("/settings/general")),onClick:()=>i("/settings/general"),children:r.jsx("span",{className:"navLabel",children:s(l.settingsShellSectionGeneral)})})}),r.jsx("p",{className:"settingsSidebarGroupHeading",children:s(l.settingsShellSectionCats)}),r.jsxs("nav",{className:"navGroup settingsSidebarGroupNav",children:[r.jsx("button",{type:"button",className:y(w),onClick:()=>i("/settings/cats"),children:r.jsx("span",{className:"navLabel",children:s(l.settingsShellSubsectionMyCats)})}),r.jsx("button",{type:"button",className:y(b),onClick:()=>i("/settings/assistants"),children:r.jsx("span",{className:"navLabel",children:s(l.settingsShellSubsectionAssistants)})})]}),g.length>0?r.jsx("nav",{className:"navGroup",children:g.map(L=>r.jsx("button",{type:"button",className:y(f(L.path)),onClick:()=>i(L.path),children:r.jsx("span",{className:"navLabel",children:L.label})},`${L.productId}:${L.id}`))}):null,r.jsxs("nav",{className:"navGroup",children:[r.jsx("button",{type:"button",className:y(f("/settings/apps")),onClick:()=>i("/settings/apps"),children:r.jsx("span",{className:"navLabel",children:s(l.settingsShellSectionApps)})}),u?r.jsx("button",{type:"button",className:y(f("/settings/desktop")),onClick:()=>i("/settings/desktop"),children:r.jsx("span",{className:"navLabel",children:s(l.settingsShellSectionDesktop)})}):null,r.jsx("button",{type:"button",className:y(f("/settings/runtime")),onClick:()=>i("/settings/runtime"),children:r.jsx("span",{className:"navLabel",children:s(l.settingsShellSectionRuntime)})}),r.jsx("button",{type:"button",className:y(f("/settings/data")),onClick:()=>i("/settings/data"),children:r.jsx("span",{className:"navLabel",children:s(l.settingsShellSectionData)})})]})]})]}),r.jsx(Nn,{slotKind:"workspace"}),r.jsx(td,{payload:m,accountMenuOpen:!1,accountMenuRef:c,runtimeFooterStatus:C,runtimeFooterLabel:v,onAccountMenuToggle:()=>{},onNavigateSettings:()=>{},onNavigateRuntime:()=>i("/settings/runtime"),catInitials:fe})]})}const Hb=5e3;function _b(e,t){const a=Date.parse(e.metadata.generatedAt),o=Date.parse(t.metadata.generatedAt);return Number.isNaN(a)||Number.isNaN(o)?!0:o>=a}function Gb(e,t){return{...e,runtime:t.runtime,runtimeSetup:t.runtimeSetup,metadata:t.metadata,bootstrapAttemptId:t.bootstrapAttemptId}}function Kb({envelope:e}){const[t,a]=d.useState({status:"loading"}),[o,n]=d.useState(0),s=d.useRef(a);s.current=a;const[i,c]=d.useState(()=>Xc(typeof window>"u"?null:window.localStorage));d.useEffect(()=>{Zc(typeof window>"u"?null:window.localStorage,i)},[i]);const u=d.useCallback(()=>{c(w=>!w)},[]);d.useEffect(()=>{const w=new AbortController;return a(b=>b.status==="ready"?b:{status:"loading"}),Ze(w.signal).then(b=>{w.signal.aborted||a({status:"ready",payload:b})}).catch(b=>{if(w.signal.aborted)return;const m=b instanceof Error?b.message:null;a({status:"error",message:m})}),()=>{w.abort()}},[o]);const h=t.status==="ready";d.useEffect(()=>{if(!h||typeof window>"u"||typeof document>"u")return;let w=null;const b=()=>{if(document.visibilityState==="hidden"||w)return;const y=new AbortController;w=y,Ze(y.signal).then(L=>{y.signal.aborted||s.current(N=>N.status!=="ready"||!_b(N.payload,L)?N:{status:"ready",payload:Gb(N.payload,L)})}).catch(()=>{}).finally(()=>{w===y&&(w=null)})},m=window.setInterval(b,Hb),C=()=>b(),v=()=>{document.visibilityState==="visible"&&b()};return window.addEventListener("focus",C),document.addEventListener("visibilitychange",v),()=>{w&&w.abort(),window.clearInterval(m),window.removeEventListener("focus",C),document.removeEventListener("visibilitychange",v)}},[h]);const g=d.useCallback(w=>{a({status:"ready",payload:w})},[]),p=d.useCallback(()=>{n(w=>w+1)},[]),k=d.useCallback(w=>{if(i)return;const b=w.target;b.closest('button, a, input, textarea, select, [role="button"]')||b.closest(".accountMenu")||c(!0)},[i]),f=t.status==="ready"?t.payload:null;return r.jsxs("div",{className:i?"screen claudeShell":"screen claudeShell claudeShellSidebarCollapsed",children:[r.jsx(Ub,{envelope:e,settingsPayload:f,sidebarOpen:i,onToggleSidebar:u,onCollapsedSidebarClick:k}),r.jsx("main",{className:"canvas",children:r.jsx(al,{context:{loadState:t,onPayloadUpdate:g,onRetryLoad:p}})})]})}function qb(){return window.catsDesktopHost??null}async function nd(e){const t=qb();t?.updatePlatformShell&&await t.updatePlatformShell(e)}async function $b(e){await nd({bootstrapAttemptId:e.bootstrapAttemptId??null,setupCompleteAt:e.setupCompleteAt??null,products:e.products})}function zb({memoryForm:e,setMemoryForm:t,busyCreating:a,onSubmit:o,onClose:n}){const{t:s}=U();d.useEffect(()=>{function c(u){u.key==="Escape"&&!a&&n()}return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[a,n]);const i=!e.content.trim()||a;return r.jsx("div",{className:"catsDialogOverlay",onClick:()=>{a||n()},children:r.jsxs("form",{className:"catsDialog",onClick:c=>c.stopPropagation(),onSubmit:c=>{c.preventDefault(),!i&&o()},children:[r.jsx("p",{className:"catsDialogTitle",children:s(l.sharedMemoryEditorDialogTitle)}),r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:s(l.sharedMemoryEditorDialogCategoryLabel)}),r.jsx("select",{className:"textInput",value:e.category,onChange:c=>t({...e,category:c.target.value}),children:Dn.map(c=>r.jsx("option",{value:c.value,children:s(c.label)},c.value))})]}),r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:s(l.sharedMemoryEditorDialogContentLabel)}),r.jsx("textarea",{className:"textInput",rows:4,placeholder:s(l.sharedMemoryEditorDialogMemoryPlaceholder),value:e.content,onChange:c=>t({...e,content:c.target.value}),autoFocus:!0})]}),r.jsxs("div",{className:"catsDialogActions",children:[r.jsx("button",{className:"confirmCancelButton",type:"button",onClick:n,disabled:a,children:s(l.sharedMemoryEditorDialogCancel)}),r.jsx("button",{className:"primaryButton",type:"submit",disabled:i,children:s(a?l.sharedMemoryEditorDialogSaving:l.sharedMemoryEditorDialogAdd)})]})]})})}function Vb({botForm:e,setBotForm:t,busyCreating:a,onSubmit:o,onClose:n}){const{t:s}=U();d.useEffect(()=>{function c(u){u.key==="Escape"&&!a&&n()}return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[a,n]);const i=!e.botName.trim()||!e.botToken.trim()||a;return r.jsx("div",{className:"catsDialogOverlay",onClick:()=>{a||n()},children:r.jsxs("form",{className:"catsDialog",onClick:c=>c.stopPropagation(),onSubmit:c=>{c.preventDefault(),!i&&o()},children:[r.jsx("p",{className:"catsDialogTitle",children:s(l.sharedTelegramConnectDialogTitle)}),r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:s(l.sharedTelegramConnectBotUsernameLabel)}),r.jsx("input",{className:"textInput",placeholder:s(l.sharedTelegramConnectBotUsernamePlaceholder),value:e.botName,onChange:c=>t({...e,botName:c.target.value}),autoFocus:!0})]}),r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:s(l.sharedTelegramConnectBotTokenLabel)}),r.jsx("input",{className:"textInput",type:"password",placeholder:s(l.sharedTelegramConnectBotTokenPlaceholder),value:e.botToken,onChange:c=>t({...e,botToken:c.target.value})})]}),r.jsxs("div",{className:"fieldLabel",children:[r.jsx("span",{children:s(l.sharedTelegramConnectModeLabel)}),r.jsxs("div",{className:"skillPills",children:[r.jsx("button",{type:"button",className:e.inboundMode==="polling"?"draftLeadPill draftLeadPillActive":"draftLeadPill",onClick:()=>t({...e,inboundMode:"polling"}),children:s(l.sharedTelegramConnectModePolling)}),r.jsx("button",{type:"button",className:e.inboundMode==="webhook"?"draftLeadPill draftLeadPillActive":"draftLeadPill",onClick:()=>t({...e,inboundMode:"webhook"}),children:s(l.sharedTelegramConnectModeWebhook)})]})]}),e.inboundMode==="webhook"?r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:s(l.sharedTelegramConnectWebhookSecretLabel)}),r.jsx("input",{className:"textInput",placeholder:s(l.sharedTelegramConnectWebhookSecretPlaceholder),value:e.webhookSecret,onChange:c=>t({...e,webhookSecret:c.target.value})})]}):null,r.jsxs("div",{className:"catsDialogActions",children:[r.jsx("button",{className:"confirmCancelButton",type:"button",onClick:n,disabled:a,children:s(l.sharedTelegramConnectCancel)}),r.jsx("button",{className:"primaryButton",type:"submit",disabled:i,children:s(a?l.sharedTelegramConnectConnecting:l.sharedTelegramConnectConnect)})]})]})})}function To({busy:e,botBindings:t,cat:a,isBossCat:o,memoryController:n,registryController:s,telegramDiagnostics:i,confirm:c,sections:u}){const h=F=>u===void 0||u.includes(F),{botForm:g,renameValue:p,setBotForm:k,setRenameValue:f,onCreateBinding:w,onDeleteBinding:b,onMakeBossCat:m,onMcpProfileChange:C,onRenameCat:v,onSkillChange:y}=s,{memoryForm:L,setMemoryForm:N,catMemory:T,memoryLoading:j,addMemory:A,deleteMemory:R}=n,P=t.filter(F=>F.catId===a.id),I=i?.bindings.filter(F=>F.bindingId&&P.some(Q=>Q.id===F.bindingId))??[],O=a.status==="active"&&Xo(a.products,"chat",{fallback:hr()}),{t:E}=U(),[$,G]=d.useState(!1);d.useEffect(()=>{P.length>0&&G(!1)},[P.length]),d.useEffect(()=>{G(!1)},[a.id]);const[ee,B]=d.useState(!1),q=d.useRef(T.length);return d.useEffect(()=>{const F=q.current;ee&&T.length>F&&B(!1),q.current=T.length},[ee,T.length]),d.useEffect(()=>{B(!1)},[a.id]),r.jsxs(r.Fragment,{children:[h("rename")?r.jsxs("div",{className:"catDetailSection",children:[r.jsx("p",{className:"sectionLabel",children:E(l.sharedSettingsCatsRenameLabel)}),r.jsxs("div",{style:{display:"flex",gap:8},children:[r.jsx("input",{className:"textInput",placeholder:a.name,value:p,onChange:F=>f(F.target.value),onFocus:()=>f(a.name)}),r.jsx("button",{className:"primaryButton",type:"button",disabled:!p.trim()||p.trim()===a.name||ce(e,"rename",a.id),onClick:()=>{v(a.id)},children:ce(e,"rename",a.id)?E(l.sharedSettingsCatsSaving):E(l.sharedSettingsCatsSave)})]})]}):null,h("makeBoss")&&!o?r.jsxs("div",{className:"catDetailSection",children:[r.jsx("p",{className:"sectionLabel",children:E(l.sharedSettingsCatsBossCatLabel)}),r.jsx("button",{className:"primaryButton",type:"button",disabled:ce(e,"makeBoss",a.id),onClick:async()=>{(!c||await c({title:E(l.sharedSettingsCatsChangeBossCatTitle),message:E(l.sharedSettingsCatsChangeBossCatMessage,{name:a.name}),confirmLabel:E(l.sharedSettingsCatsConfirm)}))&&m(a.id)},children:ce(e,"makeBoss",a.id)?E(l.sharedSettingsCatsSetting):E(l.sharedSettingsCatsMakeBossCatLabel,{name:a.name})})]}):null,h("skill")?r.jsxs("div",{className:"catDetailSection",children:[r.jsx("p",{className:"sectionLabel",children:E(l.sharedSettingsCatsSkillProfileLabel)}),r.jsx("div",{className:"skillPills",children:Kt.map(F=>r.jsx("button",{className:(a.skillProfile??"chat-default")===F.value?"draftLeadPill draftLeadPillActive":"draftLeadPill",type:"button",disabled:ce(e,"skill",a.id),onClick:()=>{y(a.id,F.value)},children:E(F.label)},F.value))})]}):null,h("mcp")?r.jsxs("div",{className:"catDetailSection",children:[r.jsx("p",{className:"sectionLabel",children:E(l.sharedSettingsCatsMcpProfileLabel)}),r.jsx("div",{className:"skillPills",children:jt.map(F=>r.jsx("button",{className:(a.mcpProfile??et)===F.value?"draftLeadPill draftLeadPillActive":"draftLeadPill",type:"button",disabled:ce(e,"skill",a.id),onClick:()=>{C(a.id,F.value)},children:E(F.label)},F.value))})]}):null,h("telegram")?P.length>0?r.jsx("div",{className:"catsTelegramConnected",children:P.map(F=>{const Q=I.find(me=>me.bindingId===F.id);return r.jsxs("div",{className:"catsTelegramBinding",children:[r.jsxs("div",{className:"catsTelegramBindingHeader",children:[r.jsx("span",{className:"catsTelegramBindingIcon","aria-hidden":"true",children:r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M20.66 3.88 2.92 10.9a.73.73 0 0 0 .04 1.38l4.45 1.4 1.72 5.52a.78.78 0 0 0 1.24.37l2.48-2.02 4.87 3.6a.78.78 0 0 0 1.2-.46L21.7 4.76c.17-.7-.52-1.27-1.04-0.88ZM10.1 14.6l-.44 3.15-1.34-4.3 9.38-6.2Z"})})}),r.jsxs("strong",{className:"catsTelegramBindingName","data-tooltip":`@${F.botName}`,children:["@",F.botName]}),r.jsx("button",{type:"button",className:"catsInlineDeleteButton catsTelegramBindingDisconnect",disabled:rr(e,"delete",F.id),onClick:()=>{b(F.id)},"aria-label":E(l.sharedSettingsCatsDisconnectTelegramAria),"data-tooltip":E(l.sharedSettingsCatsDisconnectTelegram),children:r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),r.jsxs("div",{className:"catsTelegramBindingMeta",children:[r.jsx("span",{className:`statusChip ${F.status==="active"?"statusChipReady":"statusChipMuted"}`,children:F.status==="active"?E(l.sharedSettingsCatsBindingActive):E(l.sharedSettingsCatsBindingDisabled)}),r.jsx("span",{className:"statusChip statusChipMuted",children:F.inboundMode==="polling"?E(l.sharedSettingsCatsBindingPollingMode):E(l.sharedSettingsCatsBindingWebhookMode)}),Q?.lastInboundAt?r.jsx("span",{className:"catsTelegramBindingLastInbound",children:E(l.sharedSettingsCatsLastInboundLabel,{time:Gc(Q.lastInboundAt)})}):null]})]},F.id)})}):r.jsxs("div",{className:"catsTelegramEmpty",children:[r.jsx("button",{type:"button",className:"primaryButton",disabled:!O,onClick:()=>G(!0),children:E(l.sharedSettingsCatsConnectTelegramLabel)}),O?null:r.jsx("p",{className:"catsTelegramHint",children:E(l.sharedSettingsCatsUnavailableHint)})]}):null,$?r.jsx(Vb,{botForm:g,setBotForm:k,busyCreating:rr(e,"create"),onSubmit:()=>{w(a.id)},onClose:()=>G(!1)}):null,h("memory")?r.jsxs("div",{className:"catsMemorySection",children:[T.length>0?r.jsx("div",{className:"memoryList",children:T.map(F=>r.jsx(Yb,{busy:e,memoryRecord:F,onDelete:()=>{R(a.id,F.id)}},F.id))}):null,r.jsx("button",{type:"button",className:"primaryButton",disabled:Gt(e,"create"),onClick:()=>B(!0),children:E(l.sharedSettingsCatsAddMemoryLabel)})]}):null,ee?r.jsx(zb,{memoryForm:L,setMemoryForm:N,busyCreating:Gt(e,"create"),onSubmit:()=>{A(a.id)},onClose:()=>B(!1)}):null]})}function Yb({busy:e,memoryRecord:t,onDelete:a}){const{t:o}=U(),n=Uc(t.category);return r.jsxs("div",{className:"memoryItem",children:[r.jsxs("div",{children:[r.jsx("span",{className:"statusChip statusChipMuted",children:n?o(n):t.category}),r.jsxs("span",{style:{marginLeft:8},children:[t.content.slice(0,100),t.content.length>100?"...":""]})]}),r.jsx("button",{className:"catsInlineDeleteButton",type:"button",disabled:Gt(e,"delete",t.id),onClick:a,"aria-label":o(l.sharedSettingsCatsDeleteMemoryAria),children:r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})}function Qb({busy:e,botBindings:t,cat:a,isBossCat:o,memoryController:n,registryController:s,telegramDiagnostics:i,onPayloadUpdate:c,confirm:u}){const[h,g]=d.useState(!1),{t:p}=U();async function k(w){g(!1);try{const b=await Re(a.id,{avatarUrl:w});c?.(b)}catch{}}async function f(){try{const w=await Re(a.id,{avatarUrl:null});c?.(w)}catch{}}return r.jsxs("div",{className:"catDetailPanel",children:[r.jsxs("div",{className:"catDetailSection",children:[r.jsx("p",{className:"sectionLabel",children:p(l.settingsGeneralAvatarLabel)}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[r.jsx("div",{className:"catAvatar",style:{width:40,height:40,fontSize:"0.85rem",cursor:"pointer",...a.avatarUrl?{backgroundImage:`url(${a.avatarUrl})`,backgroundSize:"cover",backgroundPosition:"center",color:"transparent"}:a.avatarColor?{background:a.avatarColor}:{}},onClick:()=>g(!0),role:"button",tabIndex:0,children:a.avatarUrl?"":fe(a.name)}),r.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[r.jsx("button",{type:"button",className:"primaryButton",onClick:()=>g(!0),children:a.avatarUrl?p(l.settingsGeneralAvatarChangeLabel):p(l.settingsGeneralAvatarUploadLabel)}),a.avatarUrl?r.jsx("button",{type:"button",className:"secondaryButton",onClick:()=>{f()},children:p(l.settingsGeneralAvatarRemoveLabel)}):null]})]})]}),h?r.jsx(Qt,{onSave:w=>{k(w)},onClose:()=>g(!1)}):null,r.jsx(To,{busy:e,botBindings:t,cat:a,isBossCat:o,memoryController:n,registryController:s,telegramDiagnostics:i,confirm:u})]})}function Jb({botBindings:e,busy:t,expandedCatId:a,memoryController:o,payload:n,registryController:s,setExpandedCatId:i,telegramDiagnostics:c,availableSurfaces:u,enabledSurfaces:h,onPayloadUpdate:g,confirm:p,SettingsCatsDetailPanelComponent:k}){const{t:f}=U(),[w,b]=d.useState(!1),m=n.chat.cats.filter(y=>y.status==="archived").length,C=w?n.chat.cats:n.chat.cats.filter(y=>y.status!=="archived"),v=_t(C,{bossCatIds:n.chat.bossCatId,archivedLast:!0});return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"contentCardHeader",children:[r.jsxs("div",{children:[r.jsx("p",{className:"sectionLabel",children:f(l.sharedSettingsCatsRegistrySectionLabel)}),r.jsx("h2",{children:n.chat.cats.length>0?f(l.sharedSettingsCatsRegistrySavedCatsLabel):f(l.sharedSettingsCatsRegistryNoCatsYetLabel)})]}),r.jsx("span",{className:"countBadge",children:C.length})]}),m>0?r.jsxs("label",{className:"fieldLabel fieldLabelInline",style:{marginBottom:4},children:[r.jsx("input",{type:"checkbox",checked:w,onChange:y=>b(y.target.checked)}),r.jsx("span",{children:f(l.sharedSettingsCatsRegistryShowArchivedLabel,{count:m})})]}):null,r.jsx("div",{className:"catList",children:v.length>0?v.map(y=>{const L=y.id===n.chat.bossCatId,N=a===y.id,T=e.filter(P=>P.catId===y.id),j=Hc(y.status),A=y.skillProfile?Oc(y.skillProfile):l.sharedSettingsCatsRegistryDefaultSkillProfileLabel,R=Wc(y.mcpProfile);return r.jsxs("article",{className:"catCard",children:[r.jsxs("div",{className:"catCardTop",style:{cursor:"pointer"},onClick:()=>i(N?null:y.id),children:[r.jsxs("div",{children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[r.jsx("strong",{children:y.name}),L?r.jsx("span",{className:"statusChip statusChipAccent",children:f(l.sharedSettingsCatsRegistryBossCatLabel)}):null]}),r.jsx("p",{children:gc(y)}),y.products.length>0?r.jsx("div",{className:"chipRow",style:{marginTop:4},children:y.products.map(P=>{const I=_c(P);return r.jsx("span",{className:"productBadge",children:I?f(I):P},P)})}):null]}),r.jsxs("div",{style:{display:"flex",alignSelf:"start",alignItems:"center",gap:8},children:[r.jsx("span",{className:y.status==="active"?"statusChip statusChipReady":"statusChip statusChipMuted",children:j?f(j):y.status}),y.status==="archived"?r.jsxs(r.Fragment,{children:[r.jsx("button",{className:"chromeButton",type:"button",disabled:ce(t,"unarchive",y.id)||ce(t,"delete",y.id),onClick:P=>{P.stopPropagation(),s.onUnarchiveCat(y.id,y.name)},"data-tooltip":f(l.sharedSettingsCatsRegistryRecoverTooltip,{name:y.name}),children:r.jsx("span",{className:"srOnly",children:f(l.sharedSettingsCatsRegistryRecoverLabel)})}),r.jsx("button",{className:"chromeButton",type:"button",disabled:ce(t,"delete",y.id),onClick:P=>{P.stopPropagation(),s.onDeleteCat(y.id,y.name)},"data-tooltip":f(l.sharedSettingsCatsRegistryDeleteTooltip,{name:y.name}),children:"✕"})]}):r.jsx("button",{className:"chromeButton",type:"button",disabled:ce(t,"archive",y.id),onClick:P=>{P.stopPropagation(),s.onArchiveCat(y.id,y.name)},"data-tooltip":f(l.sharedSettingsCatsRegistryArchiveTooltip,{name:y.name}),children:"✕"})]})]}),r.jsxs("div",{className:"catMeta",children:[r.jsx("span",{children:A?f(A):y.skillProfile}),r.jsx("span",{children:R?f(R):y.mcpProfile}),r.jsx("span",{children:y.memory.updatedAt?f(l.sharedSettingsCatsRegistryMemorySavedLabel):f(l.sharedSettingsCatsRegistryNoMemoryYetLabel)}),T.length>0?r.jsx("span",{children:f(l.sharedSettingsCatsRegistryBotBindingCount,{count:T.length,pluralSuffix:T.length>1?"s":""})}):null]}),N?r.jsx(k,{busy:t,botBindings:e,cat:y,isBossCat:L,memoryController:o,registryController:s,telegramDiagnostics:c,availableSurfaces:u,enabledSurfaces:h,onPayloadUpdate:g,confirm:p}):null]},y.id)}):r.jsx("div",{className:"emptyStateCard",children:r.jsx("p",{children:f(l.sharedSettingsCatsRegistryEmptyStateHint)})})})]})}function Xb(e){return r.jsx(Jb,{...e,SettingsCatsDetailPanelComponent:Qb})}function Zb(e,t){const a=new Set(e.map(o=>o.id));return t.find(o=>o.status==="active"&&!a.has(o.id))??null}function ey({payload:e,busy:t,onPayloadUpdate:a,onFeedback:o,onBusy:n,useSettingsCatsRegistryActionsHook:s}){const[i,c]=d.useState(null),{toasts:u,showToast:h}=at(),{dialog:g,confirm:p,handleClose:k}=Et(),f=ve(),w=Ne(),b=f.pathname.endsWith("/cats/new"),{t:m}=U();d.useEffect(()=>{o("")},[]);const C=d.useCallback(S=>{S&&h(S)},[h]),v=s({expandedCatId:i,setExpandedCatId:c,onBusy:n,onFeedback:C,onPayloadUpdate:a,confirm:p}),{botForm:y,catForm:L,renameValue:N,setBotForm:T,setCatForm:j,setRenameValue:A,onCreateBinding:R,onCreateCat:P,performCreateCat:I,onDeleteBinding:O,onDeleteCat:E,onMakeBossCat:$,onMcpProfileChange:G,onArchiveCat:ee,onUnarchiveCat:B,onRenameCat:q,onSkillChange:F}=v,{botBindings:Q,telegramDiagnostics:me,telegramError:W}=Fc(e);d.useEffect(()=>{W&&C(W)},[W,C]);const D=Nc({expandedCatId:i,onBusy:n,onFeedback:C}),_=d.useMemo(()=>e.chat.cats.filter(S=>S.status==="active"),[e.chat.cats]),J=d.useMemo(()=>e.chat.cats.filter(S=>S.status==="archived"),[e.chat.cats]),X=_.length,oe=d.useMemo(()=>_t(_,{bossCatIds:e.chat.bossCatId}),[_,e.chat.bossCatId]),we=d.useMemo(()=>_t(J,{bossCatIds:null}),[J]),Ee=X>=e.chat.capabilities.maxCats,[Ae,M]=d.useState(()=>e.chat.cats.filter(S=>S.status==="active").length===0&&e.chat.cats.some(S=>S.status==="archived")),[H,V]=d.useState(()=>oe[0]?.id??we[0]?.id??null),Se=X>0||we.length>0,z=b||!Se?"create":"view";d.useEffect(()=>{if(z!=="view")return;const S=H?e.chat.cats.find(te=>te.id===H)??null:null,K=S?.status==="archived"&&!Ae;if(!S||K){const te=oe[0]??(Ae?we[0]:null);te?V(te.id):(V(null),f.pathname.endsWith("/cats/new")||w("/settings/cats/new",{replace:!0}))}},[z,f.pathname,w,e.chat.cats,H,Ae,oe,we]),d.useEffect(()=>{z==="view"&&H&&c(H)},[z,H]);const Ke=d.useMemo(()=>({current:X}),[]),dt=d.useMemo(()=>({current:new Set(_.map(S=>S.id))}),[]);d.useEffect(()=>{if(X>Ke.current){const S=dt.current,K=oe.find(te=>!S.has(te.id))??oe[oe.length-1];K&&V(K.id),f.pathname.endsWith("/cats/new")&&w("/settings/cats",{replace:!0})}Ke.current=X,dt.current=new Set(_.map(S=>S.id))},[X,_,f.pathname,w,a,Ke,dt,oe]);const vt=S=>{V(S),f.pathname.endsWith("/cats/new")&&w("/settings/cats",{replace:!0})},Jt=()=>{Ee||w("/settings/cats/new")},x=d.useMemo(()=>H?e.chat.cats.find(S=>S.id===H)??null:null,[e.chat.cats,H]);d.useEffect(()=>{x?.status==="archived"&&M(!0)},[x]);const Ct=d.useRef(null);d.useEffect(()=>{if(z==="create"&&b){const S=Ct.current;S?.focus(),S?.select()}},[z,b]);const[Xt,Y]=d.useState(!1),[ke,Te]=d.useState(null),[Ce,qe]=d.useState(null);d.useEffect(()=>{b||(Te(null),qe(null))},[b]);const Sr=async S=>{if(Y(!1),z==="create"){Te(S);return}if(x)try{const K=await Re(x.id,{avatarUrl:S});a(K)}catch{}},Lr=async()=>{if(z==="create"){Te(null);return}if(x)try{const S=await Re(x.id,{avatarUrl:null});a(S)}catch{}},[je,St]=d.useState(null),[Rr,ut]=d.useState(!1);d.useEffect(()=>{if(!x){St(null);return}return St(ba(x.id)),Rn(x.id,St)},[x?.id]);const Pr=S=>{if(ut(!1),z==="create"){qe(S);return}x&&Tt(x.id,S)},Ar=()=>{if(z==="create"){qe(null);return}x&&Tt(x.id,null)},ne=x?.status==="archived",$e=d.useCallback(async(S,K,te)=>{try{const Oe=await Re(S,K);return a(Oe),!0}catch(Oe){return C(Be(Oe,te,m)),!1}},[a,m,C]),xr=async()=>{const S=await I(),K=S?Zb(_,S.chat.cats):null;if(K){if(V(K.id),f.pathname.endsWith("/cats/new")&&w("/settings/cats",{replace:!0}),ke)try{const te=await Re(K.id,{avatarUrl:ke});a(te),Te(null)}catch(te){Te(null),C(Be(te,m(l.settingsGeneralSaveAvatarError),m))}Ce&&(Tt(K.id,Ce),qe(null))}};return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"catsLayout catsLayoutSidePanel",children:[r.jsxs("nav",{className:"catsSelectorStrip",role:"tablist","aria-label":m(l.sharedSettingsCatsSelectCatAria),children:[oe.map(S=>{const K=z==="view"&&S.id===H,Oe=["catAvatar","catsSelectorAvatar",S.id===e.chat.bossCatId?"catsSelectorAvatarBoss":"",K?"catsSelectorAvatarActive":""].filter(Boolean).join(" ");return r.jsx("button",{type:"button",role:"tab","aria-selected":K,className:Oe,style:S.avatarUrl?{backgroundImage:`url(${S.avatarUrl})`,backgroundSize:"cover",backgroundPosition:"center"}:S.avatarColor?{background:S.avatarColor}:void 0,onClick:()=>vt(S.id),"data-tooltip":S.name,"aria-label":S.name,children:S.avatarUrl?null:fe(S.name)},S.id)}),r.jsx("button",{type:"button",className:["catAvatar","catsSelectorAvatar","catsSelectorNewAvatar",z==="create"?"catsSelectorAvatarActive":""].filter(Boolean).join(" "),onClick:Jt,disabled:Ee&&z!=="create","aria-label":m(l.sharedSettingsCatsAddNewCatLabel),"data-tooltip":m(Ee?l.sharedCatsCreateCatLimitReached:l.sharedSettingsCatsAddNewCatLabel),children:r.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.25",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),r.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),Ae&&we.length>0?r.jsx("span",{className:"catsSelectorDivider","aria-hidden":"true"}):null,Ae?we.map(S=>{const K=z==="view"&&S.id===H,te=["catAvatar","catsSelectorAvatar","catsSelectorAvatarArchived",K?"catsSelectorAvatarActive":""].filter(Boolean).join(" ");return r.jsx("button",{type:"button",role:"tab","aria-selected":K,className:te,style:S.avatarUrl?{backgroundImage:`url(${S.avatarUrl})`,backgroundSize:"cover",backgroundPosition:"center"}:S.avatarColor?{background:S.avatarColor}:void 0,onClick:()=>vt(S.id),"data-tooltip":`${S.name} (${m(l.workObjectStatusArchived)})`,"aria-label":`${S.name} (${m(l.workObjectStatusArchived)})`,children:S.avatarUrl?null:fe(S.name)},S.id)}):null,J.length>0?r.jsxs("label",{className:"catsSelectorArchiveToggle",children:[r.jsx("input",{type:"checkbox",checked:Ae,onChange:S=>M(S.target.checked)}),r.jsx("span",{children:m(l.sharedSettingsCatsShowArchivedLabel,{count:J.length})})]}):null]}),r.jsx(ye,{className:"catsDetailCard",header:r.jsx(re,{title:z==="create"?m(l.sharedCatsCreateNewCat):x?r.jsxs(r.Fragment,{children:[x.name,x.id===e.chat.bossCatId?r.jsx("span",{className:"catsDetailBossTag",children:m(l.sharedCatInspectBossLabel)}):null,x.status==="archived"?r.jsx("span",{className:"catsDetailArchivedTag",children:m(l.workObjectStatusArchived)}):null]}):"",status:z==="view"&&x?r.jsx(Je,{children:x.status==="active"?r.jsx("button",{type:"button",className:"secondaryButton",disabled:ce(t,"archive",x.id),onClick:()=>{ee(x.id,x.name)},children:m(l.sharedSettingsCatsArchiveLabel)}):r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",className:"secondaryButton",disabled:ce(t,"unarchive",x.id),onClick:()=>{B(x.id,x.name)},children:m(l.sharedSettingsCatsRegistryRecoverLabel)}),r.jsx("button",{type:"button",className:"dangerButton",disabled:ce(t,"delete",x.id),onClick:()=>{E(x.id,x.name)},children:m(l.sharedSettingsCatsDeleteLabel)})]})}):z==="create"?r.jsxs(Je,{children:[X>0?r.jsx("button",{type:"button",className:"secondaryButton",onClick:()=>w("/settings/cats",{replace:!0}),disabled:ce(t,"create"),children:m(l.sharedCatsCreateCancel)}):null,r.jsx("button",{type:"button",className:"primaryButton",disabled:!L.name.trim()||!L.provider.trim()||!L.model.trim()||Ee||ce(t,"create"),onClick:()=>{xr()},children:ce(t,"create")?m(l.sharedSettingsCatsSaving):m(l.sharedCatsCreateSaveCat)})]}):null}),children:z==="create"?r.jsxs("div",{className:"catsDetailBody",children:[r.jsxs("div",{className:"catsDetailColumn",children:[r.jsxs(be,{headerless:!0,className:"catsSubCard catsIdentityCard",children:[r.jsxs("div",{className:"fieldLabel",children:[r.jsx("span",{children:m(l.settingsGeneralAvatarLabel)}),r.jsxs("div",{className:"catsIdentityAvatarRow",children:[r.jsxs("div",{className:"catsAvatarDock",children:[r.jsx("button",{type:"button",className:["catAvatar","catsIdentityAvatar",ke?"":"catsIdentityAvatarPlaceholder"].filter(Boolean).join(" "),style:ke?{backgroundImage:`url(${ke})`,backgroundSize:"cover",backgroundPosition:"center",color:"transparent"}:void 0,onClick:()=>Y(!0),"aria-label":m(ke?l.settingsGeneralAvatarChangeLabel:l.settingsGeneralAvatarUploadLabel),"data-tooltip":m(ke?l.settingsGeneralAvatarChangeLabel:l.settingsGeneralAvatarUploadLabel),children:ke?"":L.name.trim()?fe(L.name):r.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[r.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),r.jsx("circle",{cx:"8.5",cy:"8.5",r:"1.5"}),r.jsx("polyline",{points:"21 15 16 10 5 21"})]})}),r.jsx("span",{className:"catsAvatarCameraBadge","aria-hidden":"true",children:r.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"}),r.jsx("circle",{cx:"12",cy:"13",r:"4"})]})}),ke?r.jsx("button",{type:"button",className:"catsAvatarRemoveBadge",onClick:S=>{S.stopPropagation(),Te(null)},"aria-label":m(l.settingsGeneralAvatarRemoveLabel),"data-tooltip":m(l.settingsGeneralAvatarRemoveLabel),children:r.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}):null]}),r.jsxs("label",{className:"fieldLabelInline catsIdentityBossToggle",children:[r.jsx("input",{type:"checkbox",checked:L.makeBoss,onChange:async S=>{const K=S.target.checked;if(K&&e.chat.bossCatId){const te=e.chat.cats.find(Tr=>Tr.id===e.chat.bossCatId);if(!await p({title:m(l.sharedSettingsCatsChangeBossCatTitle),message:m(l.sharedSettingsCatsChangeBossCatMessage,{name:te?.name??(L.name.trim()||m(l.sharedCatsCreateNewCat))}),confirmLabel:m(l.sharedSettingsCatsConfirm)}))return}j({...L,makeBoss:K})}}),r.jsx("span",{children:m(l.sharedSettingsCatsMakeBossCatLabel,{name:L.name.trim()||m(l.sharedCatsCreateNewCat)})})]})]})]}),r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:m(l.settingsGeneralNameLabel)}),r.jsx("input",{ref:Ct,className:"textInput",value:L.name,placeholder:m(l.sharedCatsCreateCatNamePlaceholder),onChange:S=>j({...L,name:S.target.value})})]}),r.jsxs("div",{className:"fieldLabel catsCoverField",children:[r.jsx("span",{children:m(l.sharedSettingsCatsCoverPhotoLabel)}),r.jsxs("div",{className:"catsCoverDock",children:[r.jsx("button",{type:"button",className:`catsCoverThumb${Ce?" catsCoverThumbLoaded":" catsCoverThumbPlaceholder"}`,style:Ce?{backgroundImage:`url(${Ce})`}:void 0,onClick:()=>ut(!0),"aria-label":m(Ce?l.sharedSettingsCatsChangeCoverPhotoLabel:l.sharedSettingsCatsUploadCoverPhotoLabel),"data-tooltip":m(Ce?l.sharedSettingsCatsChangeCoverLabel:l.sharedSettingsCatsUploadCoverLabel),children:Ce?null:r.jsxs("svg",{className:"catsCoverPlaceholderIcon",width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[r.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),r.jsx("circle",{cx:"8.5",cy:"8.5",r:"1.5"}),r.jsx("polyline",{points:"21 15 16 10 5 21"})]})}),r.jsx("span",{className:"catsCoverCameraBadge","aria-hidden":"true",children:r.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"}),r.jsx("circle",{cx:"12",cy:"13",r:"4"})]})}),Ce?r.jsx("button",{type:"button",className:"catsCoverRemoveBadge",onClick:S=>{S.stopPropagation(),qe(null)},"aria-label":m(l.sharedSettingsCatsRemoveCoverLabel),"data-tooltip":m(l.sharedSettingsCatsRemoveCoverLabel),children:r.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}):null]})]})]}),r.jsx(be,{className:"catsSubCard",header:r.jsx(re,{title:m(l.sharedSettingsCatsSkillProfileLabel),nested:!0}),children:r.jsx("div",{className:"skillPills",children:Kt.map(S=>r.jsx("button",{type:"button",className:(L.skillProfile||"chat-default")===S.value?"draftLeadPill draftLeadPillActive":"draftLeadPill",onClick:()=>j({...L,skillProfile:S.value}),children:m(S.label)},S.value))})}),r.jsx(be,{className:"catsSubCard",header:r.jsx(re,{title:m(l.sharedSettingsCatsMcpProfileLabel),nested:!0}),children:r.jsx("div",{className:"skillPills",children:jt.map(S=>r.jsx("button",{type:"button",className:(L.mcpProfile||et)===S.value?"draftLeadPill draftLeadPillActive":"draftLeadPill",onClick:()=>j({...L,mcpProfile:S.value}),children:m(S.label)},S.value))})})]}),r.jsx("div",{className:"catsDetailColumn",children:r.jsx(Dt,{provider:L.provider,instance:L.instance,model:L.model,modelSelection:L.modelSelection,onTargetChange:S=>j({...L,provider:S.provider,instance:S.instance,model:S.model,modelSelection:S.modelSelection??null}),fetchProviderRegistry:Pt,fetchProviderModels:At,fetchAdvancedProviderModels:xt})})]}):x?r.jsxs("fieldset",{className:ne?"catsDetailBody catsDetailBodyReadOnly":"catsDetailBody",disabled:ne,children:[r.jsxs("div",{className:"catsDetailColumn",children:[r.jsxs(be,{headerless:!0,className:"catsSubCard catsIdentityCard",children:[r.jsxs("div",{className:"fieldLabel",children:[r.jsx("span",{children:m(l.settingsGeneralAvatarLabel)}),r.jsxs("div",{className:"catsIdentityAvatarRow",children:[r.jsxs("div",{className:"catsAvatarDock",children:[r.jsx("button",{type:"button",className:"catAvatar catsIdentityAvatar",style:x.avatarUrl?{backgroundImage:`url(${x.avatarUrl})`,backgroundSize:"cover",backgroundPosition:"center",color:"transparent"}:x.avatarColor?{background:x.avatarColor}:void 0,onClick:()=>{ne||Y(!0)},disabled:ne,"aria-label":x.avatarUrl?m(l.settingsGeneralAvatarChangeLabel):m(l.settingsGeneralAvatarUploadLabel),"data-tooltip":ne?void 0:x.avatarUrl?m(l.settingsGeneralAvatarChangeLabel):m(l.settingsGeneralAvatarUploadLabel),children:x.avatarUrl?"":fe(x.name)}),ne?null:r.jsx("span",{className:"catsAvatarCameraBadge","aria-hidden":"true",children:r.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"}),r.jsx("circle",{cx:"12",cy:"13",r:"4"})]})}),x.avatarUrl&&!ne?r.jsx("button",{type:"button",className:"catsAvatarRemoveBadge",onClick:S=>{S.stopPropagation(),Lr()},"aria-label":m(l.settingsGeneralAvatarRemoveLabel),"data-tooltip":m(l.settingsGeneralAvatarRemoveLabel),children:r.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}):null]}),!ne&&x.id!==e.chat.bossCatId?r.jsxs("label",{className:"fieldLabelInline catsIdentityBossToggle",children:[r.jsx("input",{type:"checkbox",checked:!1,onChange:async S=>{S.target.checked&&(e.chat.bossCatId&&e.chat.bossCatId!==x.id&&(e.chat.cats.find(te=>te.id===e.chat.bossCatId),!await p({title:m(l.sharedSettingsCatsChangeBossCatTitle),message:m(l.sharedSettingsCatsChangeBossCatMessage,{name:x.name}),confirmLabel:m(l.sharedSettingsCatsConfirm)}))||await $e(x.id,{makeBoss:!0},m(l.sharedSettingsCatsSetBossCatError)))}}),r.jsx("span",{children:m(l.sharedSettingsCatsMakeBossCatLabel,{name:x.name})})]}):null]})]}),r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:m(l.settingsGeneralNameLabel)}),r.jsx("input",{className:"textInput",defaultValue:x.name,placeholder:x.name,disabled:ne,onBlur:async S=>{const K=S.currentTarget.value.trim();if(!K){S.currentTarget.value=x.name;return}if(K===x.name)return;await $e(x.id,{name:K},m(l.settingsGeneralUpdateNameError))||(S.currentTarget.value=x.name)}},x.id)]}),r.jsxs("div",{className:"fieldLabel catsCoverField",children:[r.jsx("span",{children:m(l.sharedSettingsCatsCoverPhotoLabel)}),r.jsxs("div",{className:"catsCoverDock",style:x.avatarColor?{"--cat-avatar-color":x.avatarColor}:void 0,children:[r.jsx("button",{type:"button",className:`catsCoverThumb${je?" catsCoverThumbLoaded":""}`,style:je?{backgroundImage:`url(${je})`}:void 0,onClick:()=>{ne||ut(!0)},disabled:ne,"aria-label":m(je?l.sharedSettingsCatsChangeCoverPhotoLabel:l.sharedSettingsCatsUploadCoverPhotoLabel),"data-tooltip":ne?void 0:m(je?l.sharedSettingsCatsChangeCoverLabel:l.sharedSettingsCatsUploadCoverLabel)}),ne?null:r.jsx("span",{className:"catsCoverCameraBadge","aria-hidden":"true",children:r.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"}),r.jsx("circle",{cx:"12",cy:"13",r:"4"})]})}),je&&!ne?r.jsx("button",{type:"button",className:"catsCoverRemoveBadge",onClick:S=>{S.stopPropagation(),Ar()},"aria-label":m(l.sharedSettingsCatsRemoveCoverLabel),"data-tooltip":m(l.sharedSettingsCatsRemoveCoverLabel),children:r.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}):null]})]})]}),r.jsx(be,{className:"catsSubCard",header:r.jsx(re,{title:m(l.sharedSettingsCatsSkillProfileLabel),nested:!0}),children:r.jsx("div",{className:"skillPills",children:Kt.map(S=>{const K=(x.skillProfile??"chat-default")===S.value;return r.jsx("button",{type:"button",className:K?"draftLeadPill draftLeadPillActive":"draftLeadPill",disabled:ne||K,onClick:()=>{$e(x.id,{skillProfile:S.value},m(l.sharedSettingsCatsChangeSkillProfileError))},children:m(S.label)},S.value)})})}),r.jsx(be,{className:"catsSubCard",header:r.jsx(re,{title:m(l.sharedSettingsCatsMcpProfileLabel),nested:!0}),children:r.jsx("div",{className:"skillPills",children:jt.map(S=>{const K=(x.mcpProfile??et)===S.value;return r.jsx("button",{type:"button",className:K?"draftLeadPill draftLeadPillActive":"draftLeadPill",disabled:ne||K,onClick:()=>{$e(x.id,{mcpProfile:S.value},m(l.sharedSettingsCatsChangeMcpProfileError))},children:m(S.label)},S.value)})})}),r.jsx(be,{className:"catsSubCard",header:r.jsx(re,{title:m(l.sharedSettingsCatsChannelLabel),nested:!0}),children:r.jsx(To,{busy:t,botBindings:Q,cat:x,isBossCat:x.id===e.chat.bossCatId,memoryController:D,registryController:{botForm:y,renameValue:N,setBotForm:T,setRenameValue:A,onCreateBinding:R,onDeleteBinding:O,onMakeBossCat:$,onMcpProfileChange:G,onRenameCat:q,onSkillChange:F},telegramDiagnostics:me,confirm:p,sections:["telegram"]})}),r.jsx(be,{className:"catsSubCard",header:r.jsx(re,{title:m(l.sharedSettingsCatsMemoryLabel),nested:!0}),children:r.jsx(To,{busy:t,botBindings:Q,cat:x,isBossCat:x.id===e.chat.bossCatId,memoryController:D,registryController:{botForm:y,renameValue:N,setBotForm:T,setRenameValue:A,onCreateBinding:R,onDeleteBinding:O,onMakeBossCat:$,onMcpProfileChange:G,onRenameCat:q,onSkillChange:F},telegramDiagnostics:me,confirm:p,sections:["memory"]})})]}),r.jsx("div",{className:"catsDetailColumn",children:r.jsx(Dt,{provider:x.defaultExecutionTarget.provider??"",instance:x.defaultExecutionTarget.instance??"",model:x.defaultExecutionTarget.model??"",modelSelection:x.defaultModelSelection??null,onTargetChange:S=>{$e(x.id,{provider:S.provider,instance:S.instance||null,model:S.model||null,modelSelection:S.modelSelection??null},m(l.sharedSettingsCatsUpdateBrainError))},fetchProviderRegistry:Pt,fetchProviderModels:At,fetchAdvancedProviderModels:xt})})]}):null})]}),r.jsx(It,{dialog:g,onClose:k}),r.jsx(rt,{toasts:u}),Xt?r.jsx(Qt,{onSave:S=>{Sr(S)},onClose:()=>Y(!1),initialDataUrl:z==="create"?ke:x?.avatarUrl??null}):null,Rr?r.jsx(Ln,{onSave:Pr,onClose:()=>ut(!1),initialDataUrl:z==="create"?Ce:je}):null]})}function ty(e){return r.jsx(ey,{...e,useSettingsCatsRegistryActionsHook:Ic,SettingsCatsRegistryComponent:Xb})}const Do="cats:platform-envelope-refresh";function lt(){const e=globalThis;e.document===void 0||typeof e.dispatchEvent!="function"||typeof e.CustomEvent!="function"||e.dispatchEvent(new e.CustomEvent(Do))}const ay=new Map([["Invalid request body",l.settingsAssistantsApiInvalidRequestBody],["Assistant name is required",l.settingsAssistantsApiAssistantNameRequired],["Assistant provider is required",l.settingsAssistantsApiAssistantProviderRequired],["Assistant model is required",l.settingsAssistantsApiAssistantModelRequired],["Assistant not found",l.settingsAssistantsApiAssistantNotFound],["Unexpected name field. Guide Cat name is system-managed.",l.settingsAssistantsApiGuideCatNameManaged],["status must be active or dismissed",l.settingsAssistantsApiGuideCatStatusInvalid],["No Guide Cat exists",l.settingsAssistantsApiGuideCatNotFound]]);function oi(e,t){const a=ay.get(e);return a?t(a):null}async function aa(e,t,a){try{const o=await e.json();if(typeof o.error=="string")return oi(o.error,t)??(o.error||a);if(o.error&&typeof o.error=="object"){const n=typeof o.error.code=="string"?o.error.code:"",s=typeof o.error.message=="string"?o.error.message:"",i=s?oi(s,t):null;return i||(n?a:s||a)}}catch{}return a}function ry(e){const t=e.trim();if(!t)return"?";const a=t.split(/\s+/);return a.length===1?a[0].slice(0,2).toUpperCase():`${a[0].charAt(0)}${a[a.length-1].charAt(0)}`.toUpperCase()}function oy({payload:e,onPayloadUpdate:t}){const a=e.guideCat??null,o=ct(),n=a?wa(a.status):!1,s=e.assistantPresets??[],{t:i}=U(),c=i(l.settingsAssistantsNamePlaceholder),u=d.useCallback(()=>({name:c,roleHint:"",provider:"claude",instance:"",model:"",modelSelection:null}),[c]),{toasts:h,showToast:g}=at(),{dialog:p,confirm:k,handleClose:f}=Et(),[w,b]=d.useState(!1),[m,C]=d.useState(!1),[v,y]=d.useState(s[0]?.id??null),L=d.useMemo(()=>s.find(W=>W.id===v)??null,[s,v]),[N,T]=d.useState(()=>s.length===0),[j,A]=d.useState(u);d.useEffect(()=>{v&&!s.some(W=>W.id===v)&&y(s[0]?.id??null),s.length===0&&!N&&T(!0)},[s,N,v]);const R=d.useCallback(W=>{g(W)},[g]),P=d.useCallback(async W=>{b(!0);try{const D={provider:W.provider??a?.executionTarget.provider??"claude",instance:W.instance!==void 0?W.instance:a?.executionTarget.instance??null,model:W.model!==void 0?W.model:a?.executionTarget.model??null,modelSelection:W.modelSelection!==void 0?W.modelSelection:a?.modelSelection??null},_=await fetch("/api/platform/guide-cat",{method:"PUT",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(D)});if(!_.ok)throw new Error(await aa(_,i,i(l.settingsAssistantsSaveFailedWithError,{status:_.status})));const J=await _.json();return t({...e,guideCat:J.guideCat}),lt(),!0}catch(D){return R(D instanceof Error?D.message:i(l.settingsAssistantsGuideCatSaveFailed)),!1}finally{b(!1)}},[a,t,e,R,i]),I=d.useCallback(async W=>{b(!0);try{const D=await fetch("/api/platform/guide-cat",{method:"PATCH",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify({status:W})});if(!D.ok)throw new Error(await aa(D,i,i(l.settingsAssistantsStatusUpdateFailed,{status:D.status})));const _=await D.json();return t({...e,guideCat:_.guideCat}),lt(),!0}catch(D){return R(D instanceof Error?D.message:i(l.settingsAssistantsGuideCatUpdateFailed)),!1}finally{b(!1)}},[t,e,R,i]),O=d.useCallback(async()=>{if(!a){await P({})&&await I("active");return}wa(a.status)||await I("active")},[P,a,I]),E=d.useCallback(()=>{a&&I("dismissed")},[a,I]),$=d.useCallback(async(W,D,_)=>{const J=s.find(X=>X.id===W);if(!J)return!1;C(!0);try{const X={name:D.name!==void 0?D.name:J.name,provider:D.provider!==void 0?D.provider:J.executionTarget.provider,instance:D.instance!==void 0?D.instance:J.executionTarget.instance??null,model:D.model!==void 0?D.model:J.executionTarget.model??null,modelSelection:D.modelSelection!==void 0?D.modelSelection:J.modelSelection,roleHint:D.roleHint!==void 0?D.roleHint:J.roleHint},oe=await fetch(`/api/platform/assistants/${W}`,{method:"PUT",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(X)});if(!oe.ok)throw new Error(await aa(oe,i,i(l.settingsAssistantsSaveFailedWithError,{status:oe.status})));const we=await oe.json();return t({...e,assistantPresets:we.assistants}),!0}catch(X){return R(X instanceof Error?X.message:_),!1}finally{C(!1)}},[s,t,e,R,i]),G=d.useCallback(async()=>{C(!0);try{const W=await fetch("/api/platform/assistants",{method:"POST",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify({name:j.name.trim(),provider:j.provider,instance:j.instance||null,model:j.model||null,modelSelection:j.modelSelection,roleHint:j.roleHint.trim()||null})});if(!W.ok)throw new Error(await aa(W,i,i(l.settingsAssistantsSaveFailedWithError,{status:W.status})));const D=await W.json();t({...e,assistantPresets:D.assistants}),y(D.assistant.id),T(!1),A(u())}catch(W){R(W instanceof Error?W.message:i(l.settingsAssistantsCreateFailed))}finally{C(!1)}},[j,u,t,e,i,R]),ee=d.useCallback(async()=>{if(!(!L||!await k({title:i(l.settingsAssistantsRemoveTitle),message:i(l.settingsAssistantsRemoveMessage,{title:L.name}),confirmLabel:i(l.settingsAssistantsRemoveButton)}))){C(!0);try{const D=await fetch(`/api/platform/assistants/${L.id}`,{method:"DELETE",headers:{Accept:"application/json"}});if(!D.ok)throw new Error(await aa(D,i,i(l.settingsAssistantsStatusFailed,{status:D.status})));const _=await D.json();t({...e,assistantPresets:_.assistants}),y(_.assistants[0]?.id??null),_.assistants.length===0&&T(!0)}catch(D){R(D instanceof Error?D.message:i(l.settingsAssistantsRemoveFailed))}finally{C(!1)}}},[k,t,e,L,i,R]),B=d.useCallback(W=>{y(W),T(!1)},[]),q=d.useCallback(()=>{T(!0),A(u())},[u]),F=d.useCallback(()=>{s.length!==0&&(T(!1),v||y(s[0]?.id??null))},[s,v]),Q=j.name.trim().length>0&&j.provider.trim().length>0&&j.model.trim().length>0,me=N||!L;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"catsLayout catsLayoutSidePanel",children:[r.jsx(ye,{className:"catsDetailCard",header:r.jsx(re,{title:o,status:r.jsx(Je,{children:n?r.jsx("button",{type:"button",className:"secondaryButton",disabled:w,onClick:()=>{E()},children:i(l.settingsAssistantsDisableButton)}):r.jsx("button",{type:"button",className:"primaryButton",disabled:w,onClick:()=>{O()},children:i(w?l.sharedCommonSaving:l.settingsAssistantsEnableButton)})})}),children:r.jsxs("div",{className:"catsDetailBody",children:[r.jsx("div",{className:"catsDetailColumn",children:r.jsxs(be,{headerless:!0,className:"catsSubCard catsIdentityCard",children:[r.jsxs("div",{className:"fieldLabel",children:[r.jsx("span",{children:i(l.settingsAssistantsAvatarLabel)}),r.jsx("div",{className:"catsAvatarDock",children:r.jsx("div",{className:"catAvatar catsIdentityAvatar catsIdentityAvatarStatic","aria-label":o,children:r.jsx("img",{className:"catsIdentityAvatarImage",src:Ya,alt:"","aria-hidden":"true"})})})]}),r.jsxs("div",{className:"fieldLabel",children:[r.jsx("span",{children:i(l.settingsAssistantsNameLabel)}),r.jsx("div",{className:"catsIdentityNameStatic",children:o})]})]})}),r.jsx("div",{className:"catsDetailColumn",children:r.jsx(Dt,{provider:a?.executionTarget.provider??"claude",instance:a?.executionTarget.instance??"",model:a?.executionTarget.model??"",modelSelection:a?.modelSelection??null,onTargetChange:W=>{P({provider:W.provider,instance:W.instance||null,model:W.model||null,modelSelection:W.modelSelection??null})},fetchProviderRegistry:Pt,fetchProviderModels:At,fetchAdvancedProviderModels:xt})})]})}),r.jsxs("nav",{className:"catsSelectorStrip",role:"tablist","aria-label":i(l.settingsAssistantsSelectAriaLabel),children:[s.map(W=>{const D=!N&&W.id===v,_=["catAvatar","catsSelectorAvatar",D?"catsSelectorAvatarActive":""].filter(Boolean).join(" ");return r.jsx("button",{type:"button",role:"tab","aria-selected":D,className:_,onClick:()=>B(W.id),"data-tooltip":W.name,"aria-label":W.name,children:ry(W.name)},W.id)}),r.jsx("button",{type:"button",className:["catAvatar","catsSelectorAvatar","catsSelectorNewAvatar",N?"catsSelectorAvatarActive":""].filter(Boolean).join(" "),onClick:q,"aria-label":i(l.settingsAssistantsAddNewLabel),"data-tooltip":i(l.settingsAssistantsAddNewLabel),children:r.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.25",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),r.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})})]}),r.jsx(ye,{className:"catsDetailCard",header:r.jsx(re,{title:me?i(l.settingsAssistantsNewAssistantTitle):L?.name??"",status:me?r.jsxs(Je,{children:[s.length>0?r.jsx("button",{type:"button",className:"secondaryButton",disabled:m,onClick:F,children:i(l.settingsAssistantsCancelButton)}):null,r.jsx("button",{type:"button",className:"primaryButton",disabled:m||!Q,onClick:()=>{G()},children:i(m?l.sharedCommonSaving:l.settingsAssistantsCreateButton)})]}):r.jsx(Je,{children:r.jsx("button",{type:"button",className:"dangerButton",disabled:m,onClick:()=>{ee()},children:i(l.settingsAssistantsDeleteButton)})})}),children:me?r.jsxs("div",{className:"catsDetailBody",children:[r.jsxs("div",{className:"catsDetailColumn",children:[r.jsx(be,{headerless:!0,className:"catsSubCard catsIdentityCard",children:r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:i(l.settingsAssistantsNameLabel)}),r.jsx("input",{className:"textInput",value:j.name,placeholder:i(l.settingsAssistantsNamePlaceholder),onChange:W=>A(D=>({...D,name:W.target.value}))})]})}),r.jsx(be,{className:"catsSubCard",header:r.jsx(re,{title:i(l.settingsAssistantsRoleHintTitle),nested:!0}),children:r.jsx("textarea",{className:"textInput",rows:3,value:j.roleHint,placeholder:i(l.settingsAssistantsRoleHintPlaceholder),onChange:W=>A(D=>({...D,roleHint:W.target.value}))})})]}),r.jsx("div",{className:"catsDetailColumn",children:r.jsx(Dt,{provider:j.provider,instance:j.instance,model:j.model,modelSelection:j.modelSelection,onTargetChange:W=>A(D=>({...D,provider:W.provider,instance:W.instance,model:W.model,modelSelection:W.modelSelection??null})),fetchProviderRegistry:Pt,fetchProviderModels:At,fetchAdvancedProviderModels:xt})})]}):L?r.jsxs("div",{className:"catsDetailBody",children:[r.jsxs("div",{className:"catsDetailColumn",children:[r.jsx(be,{headerless:!0,className:"catsSubCard catsIdentityCard",children:r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:i(l.settingsAssistantsNameLabel)}),r.jsx("input",{className:"textInput",defaultValue:L.name,placeholder:i(l.settingsAssistantsNamePlaceholder),onBlur:async W=>{const D=W.currentTarget.value.trim();if(!D){W.currentTarget.value=L.name;return}if(D===L.name)return;await $(L.id,{name:D},i(l.settingsAssistantsRenameFailed))||(W.currentTarget.value=L.name)}},L.id)]})}),r.jsx(be,{className:"catsSubCard",header:r.jsx(re,{title:i(l.settingsAssistantsRoleHintTitle),nested:!0}),children:r.jsx("textarea",{className:"textInput",rows:3,defaultValue:L.roleHint??"",placeholder:i(l.settingsAssistantsRoleHintPlaceholder),onBlur:async W=>{const D=W.currentTarget.value.trim(),_=D||null,J=L.roleHint??null;if(_===J)return;await $(L.id,{roleHint:_},i(l.settingsAssistantsRoleHintUpdateFailed))||(W.currentTarget.value=L.roleHint??"")}},L.id)})]}),r.jsx("div",{className:"catsDetailColumn",children:r.jsx(Dt,{provider:L.executionTarget.provider,instance:L.executionTarget.instance??"",model:L.executionTarget.model??"",modelSelection:L.modelSelection,onTargetChange:W=>{$(L.id,{provider:W.provider,instance:W.instance||null,model:W.model||null,modelSelection:W.modelSelection??null},i(l.settingsAssistantsBrainUpdateFailed))},fetchProviderRegistry:Pt,fetchProviderModels:At,fetchAdvancedProviderModels:xt})})]}):null})]}),r.jsx(It,{dialog:p,onClose:f}),r.jsx(rt,{toasts:h})]})}function ni(e,t){const a=e?.[t];return typeof a=="string"&&a.trim()?a:null}function ny(e,t){if(!e)return t(l.settingsAppsValidationFailed);if(e.message==="packagePath is required.")return t(l.settingsAppsPackagePathRequired);const a=e.message.match(/^Package path does not exist: (.+)\.$/u);return a?t(l.settingsAppsErrorPackagePathNotFound,{path:a[1]}):e.message==="Invalid cats.app.json JSON."?t(l.settingsAppsErrorInvalidManifestJson):e.message==="Cannot read cats.app.json."?t(l.settingsAppsErrorCannotReadManifest):e.message==="Cats app manifest must be an object."?t(l.settingsAppsErrorManifestInvalid):e.code==="reserved_cats_app_id"?t(l.settingsAppsErrorReservedAppId,{appId:ni(e.details,"appId")??e.path??""}):e.code==="duplicate_cats_app_id"?t(l.settingsAppsErrorDuplicateAppId,{appId:ni(e.details,"appId")??e.path??""}):t(e.path?l.settingsAppsErrorValidationIssueWithPath:l.settingsAppsErrorValidationIssue,{code:e.code,path:e.path??""})}function sy(e,t){const a=e.match(/^Cats app "(.+)" is not installed\.$/u);if(a)return t(l.settingsAppsErrorNotInstalled,{appId:a[1]});const o=e.match(/^Cats app "(.+)" is not enabled\.$/u);return o?t(l.settingsAppsErrorNotEnabled,{appId:o[1]}):null}function eo(e,t,a){return e instanceof Error?sy(e.message,a)??e.message:t}const si={"capability-connector":"settingsAppsCategoryConnector","product-module":"settingsAppsCategoryProductModule","user-app":"settingsAppsCategoryUserApp"},iy={enabled:"settingsAppsInstallStateEnabled",installed:"settingsAppsInstallStateInstalled",disabled:"settingsAppsInstallStateDisabled",error:"settingsAppsInstallStateError","upgrade-pending":"settingsAppsInstallStateUpgradePending",uninstalled:"settingsAppsInstallStateUninstalled"},ii={"local-user":"settingsAppsTrustTierLocalUser",system:"settingsAppsTrustTierSystem","third-party":"settingsAppsTrustTierThirdParty"},ly={uninstall:"settingsAppsUninstallTitle",enable:"settingsAppsEnableTitle",disable:"settingsAppsDisableTitle"},cy={uninstall:"settingsAppsUninstallMessage",enable:"settingsAppsEnableMessage",disable:"settingsAppsDisableMessage"};function Mn(e){return e===1?"":"s"}function li(e,t){return t("settingsAppsPermissionCount",{count:e,pluralSuffix:Mn(e)})}function dy(e,t){return t("settingsAppsToolCount",{count:e,pluralSuffix:Mn(e)})}function uy(e,t){if(e.connectors.length===0)return null;const a=e.connectors.reduce((n,s)=>n+s.capabilities.length,0),o=t(a===1?"settingsAppsCapabilitySingular":"settingsAppsCapabilityPlural");return e.connectors.length===1?t("settingsAppsConnectorCountSingle",{connector:e.connectors[0].service,count:a,capabilityLabel:o}):t("settingsAppsConnectorCountMany",{connectorCount:e.connectors.length,count:a,capabilityLabel:o})}function py(e,t){const a=Array.from(new Set(e.connectors.map(o=>o.auth?.kind??"none").filter(o=>o!=="none")));return a.length>0?`${t("settingsAppsAuthLabel")}: ${a.join(", ")}`:null}function hy(e){return e==="enabled"?"ready":e==="error"||e==="upgrade-pending"?"warm":"muted"}function ci(e=[],t){return ny(e[0],t)}async function my(e,t){return(await e.json().catch(()=>null))?.error?.message??t}function di(e,t){return e.findIndex(o=>o.id===t.id)<0?[...e,t]:e.map(o=>o.id===t.id?t:o)}function gy(e,t){return e.filter(a=>a.id!==t)}function ui(e){return!e.enabled||e.installState!=="enabled"?null:e.lobbyEntries[0]?.routePath??null}function fy(e){return e.connectors.find(t=>t.setupPath)?.setupPath??e.settings?.[0]?.path??null}function wy({installedApps:e,onInstalledAppsUpdate:t}){const{t:a}=U(),o=Ne(),n=e.filter(A=>A.category==="capability-connector").length,{toasts:s,showToast:i}=at(),{dialog:c,confirm:u,handleClose:h}=Et(),[g,p]=d.useState(null),[k,f]=d.useState(""),[w,b]=d.useState(null),[m,C]=d.useState(!1);async function v(A,R){if(!await u({title:a(ly[R]),message:a(cy[R],{appDisplayName:A.displayName}),confirmLabel:a(R==="uninstall"?"settingsAppsUninstallAction":R==="enable"?"settingsAppsEnableAction":"settingsAppsDisableAction"),defaultAction:"cancel"}))return;const I=`${A.id}:${R}`;p(I);try{const O=await fetch(R==="uninstall"?`/api/apps/${encodeURIComponent(A.id)}`:`/api/apps/${encodeURIComponent(A.id)}/${R}`,{method:R==="uninstall"?"DELETE":"POST",headers:{Accept:"application/json"}});if(!O.ok)throw new Error(await my(O,a("settingsAppsMutationFailed",{action:a(R==="uninstall"?"settingsAppsUninstallAction":R==="enable"?"settingsAppsEnableAction":"settingsAppsDisableAction"),status:O.status})));const E=await O.json();R==="uninstall"?t?.(gy(e,E.appId??A.id)):E.app&&t?.(di(e,E.app)),lt()}catch(O){i(eo(O,a("settingsAppsMutationFailedFallback"),a))}finally{p(null)}}async function y(){const A=k.trim();if(!A){i(a("settingsAppsPackagePathRequired"));return}C(!0);try{const R=await fetch("/api/apps/validate",{method:"POST",headers:{Accept:"application/json","content-type":"application/json"},body:JSON.stringify({packagePath:A})}),P=await R.json();if(!R.ok||!P.ok||!P.manifest)throw new Error(ci(P.issues,a));b({packagePath:P.packagePath??A,manifestPath:P.manifestPath??null,manifest:P.manifest})}catch(R){b(null),i(eo(R,a("settingsAppsValidationFailed"),a))}finally{C(!1)}}async function L(){if(!(!w||!await u({title:a("settingsAppsInstallTitle"),message:a("settingsAppsInstallMessage",{appDisplayName:w.manifest.displayName}),confirmLabel:a("settingsAppsInstallButton"),defaultAction:"cancel"}))){C(!0);try{const R=await fetch("/api/apps/install",{method:"POST",headers:{Accept:"application/json","content-type":"application/json"},body:JSON.stringify({packagePath:w.packagePath,enable:!0})}),P=await R.json();if(!R.ok||!P.app)throw new Error(P.issues?ci(P.issues,a):a("settingsAppsMutationFailed",{action:a("settingsAppsInstallButton"),status:R.status}));t?.(di(e,P.app)),f(""),b(null),lt();const I=ui(P.app);I&&o(I)}catch(R){i(eo(R,a("settingsAppsMutationFailed",{action:a("settingsAppsInstallButton")}),a))}finally{C(!1)}}}const N=a("settingsAppsSectionTitle"),T=a("settingsAppsSectionDescription"),j=a("settingsAppsInstalledPackagesDescription",{count:n,pluralSuffix:Mn(n)});return r.jsxs(r.Fragment,{children:[r.jsx(ye,{header:r.jsx(re,{title:N,description:T}),children:r.jsxs("div",{className:"settings-sub-card settingsAppsList",children:[r.jsx(le,{label:a("settingsAppsInstalledPackagesLabel"),description:j,control:r.jsx(Lt,{tone:e.length>0?"ready":"muted",children:e.length})}),e.length>0?e.map(A=>{const R=ui(A),P=A.installState==="installed"||A.installState==="disabled",I=A.installState==="enabled",O=g?.startsWith(`${A.id}:`)??!1,E=uy(A,a),$=py(A,a),G=fy(A);return r.jsx(le,{label:A.displayName,description:r.jsxs("span",{className:"settingsAppsMeta",children:[r.jsx("span",{children:a(si[A.category],{})}),r.jsx("span",{children:a(ii[A.trustTier],{})}),r.jsx("span",{children:A.version}),r.jsx("span",{children:A.publisher}),r.jsx("span",{children:li(A.permissions.length,a)}),E?r.jsx("span",{children:E}):null,$?r.jsx("span",{children:$}):null,A.tools.length>0?r.jsx("span",{children:dy(A.tools.length,a)}):null]}),control:r.jsxs(Je,{children:[R?r.jsx("a",{className:"secondaryButton settingsInlineLink",href:R,children:a("settingsAppsOpenAction")}):null,G?r.jsx("a",{className:"secondaryButton settingsInlineLink",href:G,children:a("settingsAppsSettingsAction")}):null,P?r.jsx("button",{type:"button",className:"secondaryButton",disabled:O,onClick:()=>{v(A,"enable")},children:a("settingsAppsEnableAction")}):null,I?r.jsx("button",{type:"button",className:"secondaryButton",disabled:O,onClick:()=>{v(A,"disable")},children:a("settingsAppsDisableAction")}):null,r.jsx("button",{type:"button",className:"dangerButton",disabled:O,onClick:()=>{v(A,"uninstall")},children:a("settingsAppsUninstallAction")}),r.jsx(Lt,{tone:hy(A.installState),children:a(iy[A.installState],{})})]})},A.id)}):r.jsx(le,{label:a("settingsAppsNoInstalledAppsLabel"),description:a("settingsAppsNoInstalledAppsDescription"),control:r.jsx(Lt,{tone:"muted",children:a("settingsAppsEmptyStateChipLabel")})}),r.jsx(le,{label:a("settingsAppsLocalInstallTitle"),description:a("settingsAppsLocalInstallDescription"),layout:"stack",control:r.jsxs("div",{className:"settingsAppsInstall",children:[r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:a("settingsAppsPackagePathLabel")}),r.jsx("input",{className:"textInput",value:k,placeholder:a("settingsAppsPackagePathPlaceholder"),disabled:m,onChange:A=>{f(A.target.value),b(null)}})]}),r.jsxs(Je,{children:[r.jsx("button",{type:"button",className:"secondaryButton",disabled:m,onClick:()=>{y()},children:a("settingsAppsReviewButton")}),r.jsx(Lt,{tone:w?"ready":"warm",children:a(w?"settingsAppsLocalInstallReady":"settingsAppsLocalInstallNeedsReview")})]}),w?r.jsxs("div",{className:"settingsAppsReview",children:[r.jsx("span",{children:w.manifest.displayName}),r.jsx("span",{children:w.manifest.id}),r.jsx("span",{children:w.manifest.contributions.lobbyApps?.[0]?.routePath??a("settingsAppsNoLobbyRoute")}),r.jsx("span",{children:a(si[w.manifest.category],{})}),r.jsx("span",{children:a(ii[w.manifest.trustTier],{})}),r.jsx("span",{children:li(w.manifest.permissions.length,a)}),r.jsx(Je,{children:r.jsx("button",{type:"button",className:"primaryButton",disabled:m,onClick:()=>{L()},children:a("settingsAppsInstallButton")})})]}):null]})})]})}),r.jsx(It,{dialog:c,onClose:h}),r.jsx(rt,{toasts:s})]})}const ky={chat:{title:"settingsAdvancedDraftControlsTitle",description:"settingsAdvancedDraftControlsDescription",toggleDescription:"settingsAdvancedDraftControlsToggleDescription"},code:{title:"settingsAdvancedDraftControlsTitle",description:"settingsAdvancedDraftControlsDescription",toggleDescription:"settingsAdvancedDraftControlsToggleDescription"},work:{title:"settingsAdvancedDraftControlsTitle",description:"settingsAdvancedDraftControlsDescription",toggleDescription:"settingsAdvancedDraftControlsToggleDescription"}};function En({surface:e,enabled:t,disabled:a=!1,onToggle:o}){if(e!=="chat"&&e!=="code"&&e!=="work")return null;const{t:n}=U(),s=ky[e];return r.jsx(ye,{header:r.jsx(re,{title:n(s.title),description:n(s.description,{surface:n(`settingsConversationProductLabel${e==="chat"?"Chat":e==="code"?"Code":"Work"}`)})}),children:r.jsx(le,{label:n("settingsAdvancedDraftControlsEnableLabel"),description:n(s.toggleDescription,{surface:n(`settingsConversationProductLabel${e==="chat"?"Chat":e==="code"?"Code":"Work"}`)}),control:r.jsx("input",{type:"checkbox",checked:t,disabled:a,onChange:i=>o(i.target.checked)})})})}async function by(e,t){return wn("chat",e,t)}async function yy(e,t){return wn("code",e,t)}async function vy(e,t){return wn("work",e,t)}const Cy={chat:by,code:yy,work:vy};function Sy(e,t,a){return Cy[e](t,a)}const Ly=[/^cats chat rename returned \d+$/u,/^cats chat deletion returned \d+$/u,/^parallel chat rename returned \d+$/u,/^parallel chat ungroup returned \d+$/u,/^parallel chat deletion returned \d+$/u];function sd(e,t){return e.startsWith("Chat not found:")?t(l.sharedWorkspaceNavigationErrorChatNotFound):e.startsWith("Channel not found:")||e==="Channel not found."?t(l.sharedWorkspaceNavigationErrorChannelNotFound):e.startsWith("Parallel chat group not found:")?t(l.sharedWorkspaceNavigationErrorParallelChatGroupNotFound):e==="Title must not be empty."?t(l.sharedWorkspaceNavigationErrorTitleRequired):e==="Parallel chat title must not be empty."?t(l.sharedWorkspaceNavigationErrorParallelChatTitleRequired):null}function gR(e,t,a){if(!(e instanceof Error))return t;const o=sd(e.message,a);return o||(Ly.some(n=>n.test(e.message))?t:e.message)}const Ry=[/^cats conversation behavior update returned \d+$/u,/^cats advanced draft controls update returned \d+$/u];function va(e,t,a){if(!(e instanceof Error))return t;const o=sd(e.message,a);return o||(Ry.some(n=>n.test(e.message))?t:e.message)}const Py={chat:"settingsConversationProductLabelChat",code:"settingsConversationProductLabelCode",work:"settingsConversationProductLabelWork"};function Ay(e,t,a){return{...e,chat:{...e.chat,conversationBehavior:ng(e.chat.conversationBehavior,{[t]:a})}}}function In({surface:e,payload:t,onPayloadUpdate:a,onError:o}){const{t:n}=U(),s=n(Py[e]),i=sg(t.chat.conversationBehavior,e);async function c(u,h){a(Ay(t,e,u));try{const g=await Sy(e,u);d.startTransition(()=>a(g))}catch(g){a(t),o(va(g,h,n))}}return r.jsxs(ye,{header:r.jsx(re,{title:n("settingsConversationBehaviorTitle"),description:n("settingsConversationBehaviorDescription",{product:s})}),children:[r.jsx(le,{label:n("settingsConversationShowVerboseLabel"),description:n("settingsConversationShowVerboseDescription"),control:r.jsx("input",{type:"checkbox",checked:i.showVerboseMessages,onChange:()=>{c({showVerboseMessages:!i.showVerboseMessages},n("settingsConversationUpdateFailure"))}})}),r.jsx(le,{label:n("settingsConversationShowLiveProgressLabel"),description:n("settingsConversationShowLiveProgressDescription"),control:r.jsx("input",{type:"checkbox",checked:i.showLiveProgressDetails,onChange:()=>{c({showLiveProgressDetails:!i.showLiveProgressDetails},n("settingsConversationUpdateFailure"))}})}),r.jsx(le,{label:n("settingsConversationConcurrentLayoutLabel"),description:n("settingsConversationConcurrentLayoutDescription",{product:s}),layout:"stack",control:r.jsxs("select",{className:"textInput",value:i.concurrentPresentationMode,onChange:u=>{c({concurrentPresentationMode:u.target.value},n("settingsConversationUpdateFailure"))},children:[r.jsx("option",{value:"inline_stack",children:n("settingsConversationLayoutInlineStack")}),r.jsx("option",{value:"compare_cards",children:n("settingsConversationLayoutCompareCards")}),r.jsx("option",{value:"focus_rail",children:n("settingsConversationLayoutFocusRail")}),r.jsx("option",{value:"adaptive",children:n("settingsConversationLayoutAdaptive")})]})})]})}function xy({payload:e,onPayloadUpdate:t}){const{toasts:a,showToast:o}=at(),{t:n}=U();async function s(h){const g=e.chat.advancedDraftControls,p=kr(g);p.chat=h,t({...e,chat:{...e.chat,advancedDraftControls:p}});try{const k=await kn({chat:h});d.startTransition(()=>t(k))}catch(k){t({...e,chat:{...e.chat,advancedDraftControls:g}}),o(va(k,n("settingsChatAdvancedControlsFailure"),n))}}async function i(h){const g=e,p=e.chat.globalOrchestrator;t({...e,chat:{...e.chat,globalOrchestrator:{...p,mcpProfile:h}}});try{const k=await Ig({mcpProfile:h});d.startTransition(()=>t(k))}catch(k){t(g),o(va(k,n(l.settingsChatBossToolProfileUpdateFailure),n))}}const c=un(e.chat.advancedDraftControls,"chat"),u=e.chat.globalOrchestrator.mcpProfile??et;return r.jsxs(r.Fragment,{children:[r.jsx(ye,{header:r.jsx(re,{title:n(l.settingsChatBossToolProfileTitle)}),children:r.jsx(le,{label:n(l.sharedSettingsCatsMcpProfileLabel),layout:"stack",control:r.jsx("div",{className:"settingsSegmentedControl",role:"radiogroup","aria-label":n(l.sharedSettingsCatsMcpProfileLabel),children:jt.map(h=>r.jsx("button",{type:"button",role:"radio","aria-checked":u===h.value,className:"settingsSegmentedOption","data-active":u===h.value?"true":"false",onClick:()=>{u!==h.value&&i(h.value)},children:n(h.label)},h.value))})})}),r.jsx(In,{surface:"chat",payload:e,onPayloadUpdate:t,onError:o}),r.jsx(En,{surface:"chat",enabled:c,onToggle:h=>{s(h)}}),r.jsx(rt,{toasts:a})]})}function Ty({payload:e,onPayloadUpdate:t}){const{toasts:a,showToast:o}=at(),{t:n}=U(),s=un(e.chat.advancedDraftControls,"code");async function i(c){const u=e.chat.advancedDraftControls,h=kr(u);h.code=c,t({...e,chat:{...e.chat,advancedDraftControls:h}});try{const g=await kn({code:c});d.startTransition(()=>t(g))}catch(g){t({...e,chat:{...e.chat,advancedDraftControls:u}}),o(va(g,n("settingsConversationPreferenceUpdateFailure"),n))}}return r.jsxs(r.Fragment,{children:[r.jsx(In,{surface:"code",payload:e,onPayloadUpdate:t,onError:o}),r.jsx(En,{surface:"code",enabled:s,onToggle:c=>{i(c)}}),r.jsx(rt,{toasts:a})]})}const Dy=[/^setup reset returned \d+$/u];function Ny(e,t){return e instanceof Error?Dy.some(a=>a.test(e.message))?t:e.message:t}function jy({busy:e,onResetSetup:t}){const a=kk(e),{toasts:o,showToast:n}=at(),{t:s}=U();async function i(){try{await t()}catch(c){n(Ny(c,s("settingsDataResetFailure")))}}return r.jsxs(r.Fragment,{children:[r.jsx(pk,{title:s("settingsDataResetAllDataTitle"),description:s("settingsDataResetAllDataDescription"),children:r.jsx("button",{className:"dangerButton",type:"button",disabled:a,onClick:()=>{i()},children:s(a?"settingsDataResetButtonResetting":"settingsDataResetButtonLabel")})}),r.jsx(rt,{toasts:o})]})}const My=[{version:1,size:21,dataCodewords:19,errorCodewords:7,alignmentCenters:[]},{version:2,size:25,dataCodewords:34,errorCodewords:10,alignmentCenters:[6,18]},{version:3,size:29,dataCodewords:55,errorCodewords:15,alignmentCenters:[6,22]},{version:4,size:33,dataCodewords:80,errorCodewords:20,alignmentCenters:[6,26]},{version:5,size:37,dataCodewords:108,errorCodewords:26,alignmentCenters:[6,30]}],Ey=4,Iy=1,By=0,Fy=21522,Oy=1335,pi=[236,17],ca=new Array(512),No=new Array(256);let ra=1;for(let e=0;e<255;e+=1)ca[e]=ra,No[ra]=e,ra<<=1,(ra&256)!==0&&(ra^=285);for(let e=255;e<ca.length;e+=1)ca[e]=ca[e-255]??1;function jo(e,t){return e===0||t===0?0:ca[(No[e]??0)+(No[t]??0)]??0}function Wy(e){const t=new Array(e).fill(0);t[e-1]=1;let a=1;for(let o=0;o<e;o+=1){for(let n=0;n<e;n+=1)t[n]=jo(t[n]??0,a),n+1<e&&(t[n]^=t[n+1]??0);a=jo(a,2)}return t}function Uy(e,t){const a=new Array(t.length).fill(0);for(const o of e){const n=o^(a.shift()??0);a.push(0);for(let s=0;s<t.length;s+=1)a[s]=(a[s]??0)^jo(t[s]??0,n)}return a}function ia(e,t,a){for(let o=a-1;o>=0;o-=1)e.push(t>>>o&1)}function Hy(e){const t=[];for(let a=0;a<e.length;a+=8){let o=0;for(let n=0;n<8;n+=1)o=o<<1|(e[a+n]??0);t.push(o)}return t}function _y(e){return My.find(t=>12+e*8<=t.dataCodewords*8)??null}function Gy(e,t){const a=Array.from(new TextEncoder().encode(e)),o=[],n=t.dataCodewords*8;ia(o,Ey,4),ia(o,a.length,8);for(const c of a)ia(o,c,8);for(ia(o,0,Math.min(4,n-o.length));o.length%8!==0;)o.push(0);const s=Hy(o);let i=0;for(;s.length<t.dataCodewords;)s.push(pi[i%pi.length]??236),i+=1;return s}function Ky(e){return{modules:Array.from({length:e},()=>new Array(e).fill(!1)),functionModules:Array.from({length:e},()=>new Array(e).fill(!1))}}function xe(e,t,a,o,n){o<0||o>=e.length||a<0||a>=e.length||(e[o][a]=n,t[o][a]=!0)}function to(e,t,a,o){for(let n=-4;n<=4;n+=1)for(let s=-4;s<=4;s+=1){const i=Math.max(Math.abs(s),Math.abs(n));xe(e,t,a+s,o+n,i!==2&&i!==4)}}function qy(e,t,a,o){for(let n=-2;n<=2;n+=1)for(let s=-2;s<=2;s+=1){const i=Math.max(Math.abs(s),Math.abs(n));xe(e,t,a+s,o+n,i!==1)}}function $y(e,t){const a=e.length;for(let o=0;o<=8;o+=1)o!==6&&(xe(e,t,8,o,!1),xe(e,t,o,8,!1));for(let o=0;o<8;o+=1)xe(e,t,a-1-o,8,!1);for(let o=8;o<15;o+=1)xe(e,t,8,a-15+o,!1)}function zy(e,t,a){const o=e.length;to(e,t,3,3),to(e,t,o-4,3),to(e,t,3,o-4);for(const n of a.alignmentCenters)for(const s of a.alignmentCenters)t[n]?.[s]||qy(e,t,s,n);for(let n=0;n<o;n+=1)t[6][n]||xe(e,t,n,6,n%2===0),t[n][6]||xe(e,t,6,n,n%2===0);xe(e,t,8,o-8,!0),$y(e,t)}function Vy(e,t){return(e+t)%2===0}function Yy(e,t,a){const o=e.length,n=[];for(const c of a)ia(n,c,8);let s=0,i=!0;for(let c=o-1;c>=1;c-=2){c===6&&(c-=1);for(let u=0;u<o;u+=1){const h=i?o-1-u:u;for(let g=0;g<2;g+=1){const p=c-g;if(t[h][p])continue;const k=(n[s]??0)===1;e[h][p]=Vy(p,h)?!k:k,s+=1}}i=!i}}function Qy(){const e=Iy<<3|By;let t=e<<10;for(let a=14;a>=10;a-=1)(t>>>a&1)!==0&&(t^=Oy<<a-10);return(e<<10|t)^Fy}function Jy(e,t){const a=e.length,o=Qy(),n=s=>(o>>>s&1)!==0;for(let s=0;s<=5;s+=1)xe(e,t,8,s,n(s));xe(e,t,8,7,n(6)),xe(e,t,8,8,n(7)),xe(e,t,7,8,n(8));for(let s=9;s<15;s+=1)xe(e,t,14-s,8,n(s));for(let s=0;s<8;s+=1)xe(e,t,a-1-s,8,n(s));for(let s=8;s<15;s+=1)xe(e,t,8,a-15+s,n(s));xe(e,t,8,a-8,!0)}function Xy(e){const t=new TextEncoder().encode(e),a=_y(t.length);if(!a)return null;const o=Gy(e,a),n=Uy(o,Wy(a.errorCodewords)),{modules:s,functionModules:i}=Ky(a.size);return zy(s,i,a),Yy(s,i,[...o,...n]),Jy(s,i),{size:a.size,cells:s}}const Zy=new Set(["Desktop host is not initialized.","Invalid desktop startup preferences payload."]);function id(e,t,a){return e instanceof Error?Zy.has(e.message)?t:e.message:t}const ld={enabled:!1,bindHost:"127.0.0.1",bindPort:0,bindReachability:"loopback",canReachFromLan:!1,selectedLanIp:null,selectedLanUrl:null,diagnosticManifestUrl:null,noLanCandidateReason:"feature_disabled",bindOverrideEnv:"CATS_DESKTOP_APP_HOST=0.0.0.0",pairingUrlStatus:"phase1_pending",pairingUrl:null};function Mo(){return{startAtLogin:!0,openWindowOnStartup:!1,systemTrayEnabled:!0,mobilePairing:ld}}function ev(e,t){return e.noLanCandidateReason==="loopback_bound"?t("settingsDesktopMobilePairingReachabilityLoopback"):e.noLanCandidateReason==="no_lan_candidate"?t("settingsDesktopMobilePairingReachabilityLan"):e.noLanCandidateReason==="bind_host_not_lan_candidate"?t("settingsDesktopMobilePairingReachabilityOtherInterface"):t("settingsDesktopMobilePairingReachabilityAllInterfaces")}function tv(e,t){return e.enabled?e.noLanCandidateReason==="loopback_bound"?{tone:"warm",label:t("settingsDesktopMobilePairingStatusLoopbackOnly")}:e.noLanCandidateReason==="no_lan_candidate"||e.noLanCandidateReason==="bind_host_not_lan_candidate"?{tone:"warm",label:t("settingsDesktopMobilePairingStatusNoLanAddress")}:e.pairingUrlStatus==="ready"?{tone:"ready",label:t("settingsDesktopMobilePairingStatusReady")}:{tone:"warm",label:t("settingsDesktopMobilePairingStatusValidationPending")}:{tone:"muted",label:t("settingsDesktopMobilePairingStatusDisabled")}}function av({t:e,url:t}){const a=Xy(t);if(!a)return r.jsx("span",{children:e("settingsDesktopMobilePairingQrUrlTooLong")});const o=[];for(let n=0;n<a.size;n+=1)for(let s=0;s<a.size;s+=1)a.cells[n]?.[s]&&o.push(r.jsx("rect",{x:s,y:n,width:"1",height:"1"},`${s}:${n}`));return r.jsxs("svg",{className:"settingsMobilePairingQrCode",viewBox:`-4 -4 ${a.size+8} ${a.size+8}`,role:"img","aria-label":e("settingsDesktopMobilePairingQrCodeLabel"),shapeRendering:"crispEdges",children:[r.jsx("rect",{x:"-4",y:"-4",width:a.size+8,height:a.size+8,className:"qrLight"}),r.jsx("g",{className:"qrDark",children:o})]})}function rv({payload:e,showToast:t}){const{t:a}=U(),[o,n]=d.useState(!1),i=(e.desktop??Mo()).mobilePairing??ld,c=tv(i,a);async function u(g,p){try{await navigator.clipboard.writeText(g),t(p)}catch{t(a("settingsConversationPreferenceUpdateFailure"))}}async function h(){const g=`CATS_DESKTOP_MOBILE_PAIRING_ENABLED=true
|
|
43
|
-
CATS_DESKTOP_APP_HOST=0.0.0.0`,p=window.catsDesktopHost;if(!p?.enableMobilePairing){await u(g,a("settingsDesktopMobilePairingCopyEnvValuesSuccess"));return}if(window.confirm(a("settingsDesktopMobilePairingConfirmRestart"))){n(!0);try{const f=await p.enableMobilePairing();t(a("settingsDesktopMobilePairingDesktopUpdateSuccess",{envPath:f.envPath})),p.relaunch&&await p.relaunch()}catch(f){t(id(f,a("settingsDesktopMobilePairingDesktopUpdateFailure"))),n(!1)}}}return r.jsx(ye,{className:"settingsMobilePairing",header:r.jsx(re,{title:a("settingsDesktopMobilePairingTitle"),description:a("settingsDesktopMobilePairingDescription"),status:r.jsx(Lt,{tone:c.tone,children:c.label})}),children:i.enabled?r.jsxs("div",{className:"settingsMobilePairingGrid",children:[r.jsxs("div",{className:"settingsMobilePairingDetails",children:[r.jsxs("dl",{className:"settingsMobilePairingFacts",children:[r.jsxs("div",{children:[r.jsx("dt",{children:a("settingsDesktopMobilePairingBindLabel")}),r.jsxs("dd",{children:[i.bindHost,":",i.bindPort]})]}),r.jsxs("div",{children:[r.jsx("dt",{children:a("settingsDesktopMobilePairingReachabilityLabel")}),r.jsx("dd",{children:ev(i,a)})]}),r.jsxs("div",{children:[r.jsx("dt",{children:a("settingsDesktopMobilePairingLanAddressLabel")}),r.jsx("dd",{children:i.selectedLanIp??a("settingsDesktopMobilePairingNoneLabel")})]})]}),i.noLanCandidateReason==="loopback_bound"&&i.bindOverrideEnv?r.jsx(le,{label:a("settingsDesktopMobilePairingAllowLanLabel"),description:a("settingsDesktopMobilePairingAllowLanDescription",{bindOverrideEnv:i.bindOverrideEnv}),control:r.jsx("button",{type:"button",className:"secondaryButton",disabled:o,onClick:()=>{h()},children:a(o?"settingsDesktopMobilePairingApplyingButton":"settingsDesktopMobilePairingApplyAndRestartButton")})}):null,i.noLanCandidateReason==="no_lan_candidate"?r.jsx("p",{className:"settingsMobilePairingNote",children:a("settingsDesktopMobilePairingNoLanAddressNote")}):null,i.noLanCandidateReason==="bind_host_not_lan_candidate"?r.jsx("p",{className:"settingsMobilePairingNote",children:a("settingsDesktopMobilePairingHostMismatchNote")}):null,i.diagnosticManifestUrl?r.jsx(le,{label:a("settingsDesktopMobilePairingDiagnosticLabel"),description:i.diagnosticManifestUrl,control:r.jsx("button",{type:"button",className:"secondaryButton",onClick:()=>{u(i.diagnosticManifestUrl??"",a("settingsDesktopMobilePairingDiagnosticCopiedMessage"))},children:a("settingsDesktopMobilePairingDiagnosticCopyButton")}),layout:"stack"}):null,i.pairingUrlStatus==="ready"&&i.pairingUrl?r.jsx(le,{label:a("settingsDesktopMobilePairingExpoUrlLabel"),description:i.pairingUrl,control:r.jsx("button",{type:"button",className:"secondaryButton",onClick:()=>{u(i.pairingUrl??"",a("settingsDesktopMobilePairingExpoUrlCopiedMessage"))},children:a("settingsDesktopMobilePairingCopyUrlButton")}),layout:"stack"}):null]}),r.jsx("div",{className:"settingsMobilePairingQr","data-state":i.pairingUrlStatus,children:i.pairingUrlStatus==="ready"&&i.pairingUrl?r.jsxs("div",{className:"settingsMobilePairingQrContent",children:[r.jsx(av,{t:a,url:i.pairingUrl}),r.jsx("code",{className:"settingsMobilePairingQrUrl",children:i.pairingUrl})]}):r.jsx("span",{children:a("settingsDesktopMobilePairingNoPairingUrlStatus")})})]}):r.jsx(le,{label:a("settingsDesktopMobilePairingEnableLabel"),description:a("settingsDesktopMobilePairingEnableDescription"),control:r.jsx("button",{type:"button",className:"secondaryButton",disabled:o,onClick:()=>{h()},children:a(o?"settingsDesktopMobilePairingApplyingButton":"settingsDesktopMobilePairingEnableButton")}),layout:"stack"})})}function ov({payload:e,onPayloadUpdate:t,showToast:a}){const{t:o}=U(),[n,s]=d.useState(!1),i=e.desktop??Mo();async function c(u){const h=e.desktop??Mo(),g=o("settingsConversationPreferenceUpdateFailure");t({...e,desktop:u}),s(!0);try{const p=window.catsDesktopHost;let k=u;if(p?.updateDesktopPreferences)k=await p.updateDesktopPreferences(u);else{const f=await fetch("/api/platform/preferences",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(u)});if(!f.ok)throw new Error(g);const w=await f.json();k={...i,startAtLogin:w.startAtLogin!==!1,openWindowOnStartup:w.openWindowOnStartup===!0,systemTrayEnabled:w.systemTrayEnabled!==!1}}t({...e,desktop:k}),lt()}catch(p){t({...e,desktop:h}),a(id(p,g))}finally{s(!1)}}return r.jsxs(ye,{header:r.jsx(re,{title:o("settingsDesktopStartupTitle"),description:o("settingsDesktopStartupDescription")}),children:[r.jsx(le,{asChoice:!0,label:o("settingsDesktopStartupSignInLabel"),description:o("settingsDesktopStartupSignInDescription"),control:r.jsx("input",{type:"checkbox",checked:i.startAtLogin,disabled:n,onChange:()=>{c({...i,startAtLogin:!i.startAtLogin})}})}),r.jsx(le,{asChoice:!0,label:o("settingsDesktopStartupTrayLabel"),description:o("settingsDesktopStartupTrayDescription"),control:r.jsx("input",{type:"checkbox",checked:i.systemTrayEnabled,disabled:n,onChange:()=>{c({...i,systemTrayEnabled:!i.systemTrayEnabled})}})}),r.jsx(le,{asChoice:!0,label:o("settingsDesktopStartupOpenWindowLabel"),description:o("settingsDesktopStartupOpenWindowDescription"),control:r.jsx("input",{type:"checkbox",checked:i.openWindowOnStartup,disabled:n,onChange:()=>{c({...i,openWindowOnStartup:!i.openWindowOnStartup})}})})]})}const hi={unavailable:"settingsDesktopUpdatesStatusUnavailable",idle:"settingsDesktopUpdatesStatusIdle",checking:"settingsDesktopUpdatesStatusChecking",up_to_date:"settingsDesktopUpdatesStatusUpToDate",update_available:"settingsDesktopUpdatesStatusAvailable",downloading:"settingsDesktopUpdatesStatusDownloading",downloaded:"settingsDesktopUpdatesStatusDownloaded",installing:"settingsDesktopUpdatesStatusInstalling",failed:"settingsDesktopUpdatesStatusFailed"},nv={unavailable:"muted",idle:"muted",checking:"muted",up_to_date:"ready",update_available:"warm",downloading:"muted",downloaded:"ready",installing:"muted",failed:"warm"},mi={offline:"settingsDesktopUpdatesErrorOffline",timeout:"settingsDesktopUpdatesErrorTimeout",provider_rejected:"settingsDesktopUpdatesErrorProviderRejected",metadata_invalid:"settingsDesktopUpdatesErrorMetadataInvalid",checksum_mismatch:"settingsDesktopUpdatesErrorChecksumMismatch",signature_rejected:"settingsDesktopUpdatesErrorSignatureRejected",unsupported_package:"settingsDesktopUpdatesErrorUnsupportedPackage",download_cancelled:"settingsDesktopUpdatesErrorDownloadCancelled",install_handoff_failed:"settingsDesktopUpdatesErrorInstallHandoffFailed",unknown:"settingsDesktopUpdatesErrorUnknown"},sv={none:null,check:"settingsDesktopUpdatesActionCheck",download:"settingsDesktopUpdatesActionDownload",restart_install:"settingsDesktopUpdatesActionRestartInstall"},iv={checking:"settingsDesktopUpdatesActionChecking",downloading:"settingsDesktopUpdatesActionDownloading",installing:"settingsDesktopUpdatesActionInstalling"};function lv(e){return hi[e]??hi.unavailable}function cv(e){return nv[e]??"muted"}function dv(e){return mi[e]??mi.unknown}function uv(e){const t=iv[e.status];if(t)return{messageKey:t,action:"none",disabled:!0};const a=sv[e.nextAction];return a?{messageKey:a,action:e.nextAction,disabled:!1}:null}function pv(e){if(e.status!=="downloading"||e.progress===null)return null;const t=Math.round(e.progress.percent);return Math.min(100,Math.max(0,t))}function hv(e,t){return e.status==="downloaded"&&t.toLowerCase().startsWith("win")}function mv(e){return e.capability.distribution==="preview_packaged"}function gv({showToast:e,platform:t=typeof navigator>"u"?"":navigator.platform}){const{t:a}=U(),[o,n]=d.useState(null),[s,i]=d.useState(!1);d.useEffect(()=>{const p=mt();if(!p?.getUpdateSnapshot)return;let k=!0;p.getUpdateSnapshot().then(w=>{k&&n(w)}).catch(()=>{});const f=p.onUpdateSnapshot?.(w=>{k&&n(w)});return()=>{k=!1,f?.()}},[]);const c=d.useCallback(async p=>{const k=mt();if(k){i(!0);try{if(p==="restart_install"){await k.restartAndInstall?.();return}const f=p==="check"?await k.checkForUpdates?.():await k.downloadUpdate?.();if(!f)return;n(f),p==="check"&&f.status==="up_to_date"&&e(a("settingsDesktopUpdatesToastUpToDate")),f.error&&e(a(dv(f.error.code)))}finally{i(!1)}}},[e,a]);if(o===null)return null;const{capability:u}=o,h=uv(o),g=pv(o);return r.jsxs(ye,{className:"settingsDesktopUpdates",header:r.jsx(re,{title:a("settingsDesktopUpdatesTitle"),description:a("settingsDesktopUpdatesDescription"),status:u.canCheck?r.jsx(Lt,{tone:cv(o.status),children:a(lv(o.status))}):void 0}),children:[r.jsx(le,{label:a("settingsDesktopUpdatesCurrentVersionLabel"),control:r.jsx("span",{className:"settingsFactValue",children:o.currentVersion})}),r.jsx(le,{label:a("settingsDesktopUpdatesChannelLabel"),control:r.jsx("span",{className:"settingsFactValue",children:u.channel})}),mv(o)&&r.jsx(le,{layout:"stack",label:a("settingsDesktopUpdatesPreviewNotice"),control:null}),u.canCheck&&r.jsxs(r.Fragment,{children:[r.jsx(le,{label:a("settingsDesktopUpdatesLastCheckedLabel"),control:r.jsx("span",{className:"settingsFactValue",children:o.lastCheckedAt?new Date(o.lastCheckedAt).toLocaleString():a("settingsDesktopUpdatesLastCheckedNever")})}),o.availableVersion!==null&&r.jsx(le,{label:a("settingsDesktopUpdatesAvailableVersionLabel"),description:o.releaseSummary??void 0,control:r.jsx("span",{className:"settingsFactValue",children:o.availableVersion})}),g!==null&&r.jsx(le,{label:a("settingsDesktopUpdatesStatusDownloading"),control:r.jsxs("progress",{className:"settingsUpdateProgress",max:100,value:g,children:[g,"%"]})}),hv(o,t)&&r.jsx(le,{layout:"stack",label:a("settingsDesktopUpdatesWindowsInstallerNotice"),control:null}),h!==null&&r.jsx(le,{label:"",control:r.jsx("button",{type:"button",className:"settingsPrimaryAction",disabled:h.disabled||s,onClick:()=>{h.action!=="none"&&c(h.action)},children:a(h.messageKey)})})]})]})}function fv({payload:e,onPayloadUpdate:t}){const{toasts:a,showToast:o}=at();return r.jsxs(r.Fragment,{children:[r.jsx(gv,{showToast:o}),r.jsx(rv,{payload:e,showToast:o}),r.jsx(ov,{payload:e,onPayloadUpdate:t,showToast:o}),r.jsx(rt,{toasts:a})]})}const cd=["en","zh-TW","zh-CN","ja","ko","fr","de","es","pt-BR","it","nl","pl","tr","id","vi","th","hi","ar"];function gi(e){return e==="unspecified"||cd.includes(e)}const wv=new Set(["POST","PUT","PATCH","DELETE"]),Eo="x-cats-csrf-token";let Cr=null,oa=null,Ye=null,fi=!1;function kv(e){const t=e?.trim();Cr=t||null}function bv(){Cr=null}async function wi(){if(!Ye)return null;if(oa)return oa;oa=(async()=>{try{const t=await Ye("/api/auth/status",{headers:{Accept:"application/json"},credentials:"same-origin"});if(!t.ok)return null;const o=(await t.json())?.csrfToken?.trim();return o||null}catch{return null}finally{oa=null}})();const e=await oa;return e&&(Cr=e),e}function yv(e,t){return t?.method?t.method.toUpperCase():e instanceof Request?e.method.toUpperCase():"GET"}function vv(e){return typeof e=="string"?e:e instanceof URL?e.href:e.url}function Cv(e){try{const t=new URL(e,window.location.origin);return t.origin===window.location.origin&&t.pathname.startsWith("/api/")}catch{return!1}}function ki(e){if(!e)return[];if(e instanceof Headers){const t=[];return e.forEach((a,o)=>{t.push([o,a])}),t}return Array.isArray(e)?e.map(([t,a])=>[t,a]):Object.entries(e)}function Sv(e,t){return e instanceof Request?ki(e.headers):ki(t?.headers)}function Lv(e,t){const a=t.toLowerCase();return e.some(([o])=>o.toLowerCase()===a)}function Rv(e){return e.some(([t,a])=>t.toLowerCase()==="authorization"&&/^bearer\s/i.test(a))}function bi(e,t,a){if(e instanceof Request){const n=new Headers(e.headers);return n.set(Eo,a),{input:new Request(e,{headers:n}),init:t}}const o=new Headers(t?.headers);return o.set(Eo,a),{input:e,init:{...t,headers:o}}}async function Pv(e){if(e.status!==403)return!1;try{return(await e.clone().json())?.error?.code==="E_CSRF_MISMATCH"}catch{return!1}}async function Av(e,t){if(!Ye)throw new Error("csrfAwareFetch invoked before installation");const a=yv(e,t);if(!wv.has(a))return Ye(e,t);const o=vv(e);if(!Cv(o))return Ye(e,t);const n=Sv(e,t);if(Lv(n,Eo)||Rv(n))return Ye(e,t);let s=Cr??await wi();if(!s)return Ye(e,t);const i=bi(e,t,s),c=await Ye(i.input,i.init);if(!await Pv(c)||(bv(),s=await wi(),!s))return c;const u=bi(e,t,s);return Ye(u.input,u.init)}function xv(){fi||typeof window>"u"||(fi=!0,Ye=window.fetch.bind(window),window.fetch=((e,t)=>Av(e,t)))}class Bn extends Error{constructor(t,a,o){super(t),this.status=a,this.code=o,this.name="PlatformAuthApiError"}}function Tv(e,t){return e instanceof Bn&&e.code===t}async function Dv(e,t){try{const a=await e.json(),o=Bv(a);if(typeof o?.code=="string"){const n=o.code,s=t.errorMessagesByCode?.[n];return s?{message:s,code:n}:{message:t.fallbackMessageForStatus(e.status),code:n}}if(typeof o?.message=="string")return{message:o.message,code:null}}catch{}return{message:t.fallbackMessageForStatus(e.status),code:null}}async function Io(e){const t=await fetch("/api/auth/status",{headers:{Accept:"application/json"},signal:e.signal});return Na(t,e)}async function Nv(e,t){const a=await fetch("/api/auth/login",{method:"POST",headers:{Accept:"application/json","content-type":"application/json"},body:JSON.stringify(e),signal:t.signal});return Na(a,t)}async function jv(e,t){const a=await fetch("/api/auth/google/login",{method:"POST",headers:{Accept:"application/json","content-type":"application/json"},body:JSON.stringify(e),signal:t.signal});return Na(a,t)}async function Mv(e,t){const a=await fetch("/api/auth/repair/first-admin",{method:"POST",headers:{Accept:"application/json","content-type":"application/json"},body:JSON.stringify(e),signal:t.signal});return Na(a,t)}async function Ev(e,t){const a=await fetch("/api/auth/logout",{method:"POST",headers:{Accept:"application/json","content-type":"application/json","x-cats-csrf-token":e},body:JSON.stringify({}),signal:t.signal});return Na(a,t)}async function Iv(e,t){const a=await Io(t),o=yi(a);try{return await e(o)}catch(s){if(!Tv(s,"E_CSRF_MISMATCH"))throw s}const n=await Io(t);return e(yi(n))}async function Na(e,t){if(!e.ok){const o=await Dv(e,t);throw new Bn(o.message,e.status,o.code)}const a=await e.json();return kv(a.csrfToken),a}function yi(e){const t=e.csrfToken?.trim();if(!t)throw new Bn("Authenticated session did not return a Cats CSRF token.",403,"E_CSRF_MISMATCH");return t}function Bv(e){if(typeof e!="object"||e===null||!("error"in e))return null;const t=e.error;return typeof t=="object"&&t!==null?t:null}const Xe={unauthenticated:"E_UNAUTHENTICATED",forbidden:"E_FORBIDDEN",csrfMismatch:"E_CSRF_MISMATCH"};function Fv(e){return e==="auto"||e==="en"||e==="zh-TW"}function ao(e,t){return{assistantResponseLanguage:e?.assistantResponseLanguage??"unspecified",uiLanguagePreference:e?.uiLanguagePreference??t}}function Ov(e,t){const a=e==="zh-TW"?"zh-Hant":e==="zh-CN"?"zh-Hans":e;try{return new Intl.DisplayNames([t],{type:"language"}).of(a)??e}catch{return e}}function Wv({payload:e,onPayloadUpdate:t}){const a=Ne(),{languagePreference:o,locale:n,setLanguagePreference:s,t:i}=U(),[c,u]=d.useState(!1),[h,g]=d.useState(!1),[p,k]=d.useState(!1),[f,w]=d.useState(!1),[b,m]=d.useState(!1),[C,v]=d.useState(e.ownerDisplayName),[y,L]=d.useState(!1),N=d.useRef(!1),T=an(),{toasts:j,showToast:A}=at();d.useEffect(()=>{v(e.ownerDisplayName)},[e.ownerDisplayName]);async function R(D,_){try{if(!(await fetch("/api/core/owner-profile",{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({avatarUrl:D})})).ok)throw new Error(_);t({...e,ownerAvatarUrl:D}),lt()}catch(J){A(J instanceof Error?J.message:_)}}async function P(){if(N.current){N.current=!1;return}const D=C.trim();if(!D){v(e.ownerDisplayName);return}if(D===e.ownerDisplayName){v(e.ownerDisplayName);return}L(!0);try{if(!(await fetch("/api/core/owner-profile",{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({displayName:D})})).ok)throw new Error(i("settingsGeneralUpdateNameError"));t({...e,ownerDisplayName:D}),lt()}catch(_){A(_ instanceof Error?_.message:i("settingsGeneralUpdateNameError"))}finally{L(!1)}}async function I(D,_){const J=e.lobby;t({...e,lobby:{...e.lobby,animationMode:D}}),g(!0);try{const X=await fetch("/api/platform/preferences",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({lobbyAnimationMode:D})});if(!X.ok)throw new Error(_);const oe=await X.json();t({...e,lobby:{...e.lobby,animationMode:oe.lobbyAnimationMode??D}}),lt()}catch(X){t({...e,lobby:J}),A(X instanceof Error?X.message:_)}finally{g(!1)}}async function O(D){if(D===o)return;const _=o,J=ao(e.language,_);s(D),t({...e,language:{...J,uiLanguagePreference:D}}),k(!0);try{const X=await fetch("/api/platform/preferences",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({uiLanguagePreference:D})});if(!X.ok)throw new Error(i("settingsGeneralUpdateLanguageError"));const oe=await X.json(),we=Fv(oe.uiLanguagePreference)?oe.uiLanguagePreference:D;s(we),t({...e,language:{...J,uiLanguagePreference:we}}),lt()}catch(X){s(_),t({...e,language:J}),A(X instanceof Error?X.message:i("settingsGeneralUpdateLanguageError"))}finally{k(!1)}}async function E(D){const _=ao(e.language,o);if(D!==_.assistantResponseLanguage){t({...e,language:{..._,assistantResponseLanguage:D}}),w(!0);try{const J=await fetch("/api/platform/preferences",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({assistantResponseLanguage:D})});if(!J.ok)throw new Error(i("settingsGeneralUpdateAssistantLanguageError"));const X=await J.json(),oe=gi(X.assistantResponseLanguage)?X.assistantResponseLanguage:D;t({...e,language:{..._,assistantResponseLanguage:oe}}),lt()}catch(J){t({...e,language:_}),A(J instanceof Error?J.message:i("settingsGeneralUpdateAssistantLanguageError"))}finally{w(!1)}}}async function $(D){try{T.update({sidecarMode:D})}catch(_){A(_ instanceof Error?_.message:i("settingsGeneralUpdateGuideCatModeError"))}}async function G(){m(!0);try{const D={fallbackMessageForStatus:_=>i("settingsGeneralSignOutFailedWithStatus",{status:_}),errorMessagesByCode:{[Xe.csrfMismatch]:i("settingsGeneralSignOutCsrfError"),[Xe.forbidden]:i("settingsGeneralSignOutForbiddenError"),[Xe.unauthenticated]:i("settingsGeneralSignOutUnauthenticated")}};await Iv(_=>Ev(_,D),D),a("/login",{replace:!0})}catch(D){A(D instanceof Error?D.message:i("settingsGeneralSignOutFailed"))}finally{m(!1)}}const ee=e.ownerAvatarUrl,B=fe(C||e.ownerDisplayName),q=ct(),F=wa(e.guideCat?.status),Q=e.lobby??{animationMode:"reduced"},me=ao(e.language,o).assistantResponseLanguage,W=d.useMemo(()=>cd.map(D=>({code:D,label:Ov(D,n)})),[n]);return r.jsxs(r.Fragment,{children:[r.jsx(ye,{header:r.jsx(re,{title:i("settingsGeneralProfileTitle"),description:i("settingsGeneralProfileDescription")}),children:r.jsxs("div",{className:"settings-sub-card",children:[r.jsxs("div",{className:"fieldLabel",children:[r.jsx("span",{children:i("settingsGeneralAvatarLabel")}),r.jsxs("div",{className:"settingsOwnerAvatarDock",children:[r.jsx("button",{type:"button",className:"settingsOwnerAvatar",style:ee?{backgroundImage:`url(${ee})`,backgroundSize:"cover",backgroundPosition:"center",color:"transparent"}:void 0,onClick:()=>u(!0),"aria-label":i(ee?"settingsGeneralAvatarChangeLabel":"settingsGeneralAvatarUploadLabel"),"data-tooltip":i(ee?"settingsGeneralAvatarChangeLabel":"settingsGeneralAvatarUploadLabel"),children:ee?"":B}),r.jsx("span",{className:"settingsOwnerAvatarCamera","aria-hidden":"true",children:r.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"}),r.jsx("circle",{cx:"12",cy:"13",r:"4"})]})}),ee?r.jsx("button",{type:"button",className:"settingsOwnerAvatarRemove",onClick:D=>{D.stopPropagation(),R(null,i("settingsGeneralRemoveAvatarError"))},"aria-label":i("settingsGeneralAvatarRemoveLabel"),"data-tooltip":i("settingsGeneralAvatarRemoveLabel"),children:r.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}):null]})]}),r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:i("settingsGeneralNameLabel")}),r.jsx("input",{className:"textInput",value:C,onChange:D=>v(D.target.value),onBlur:()=>{P()},onKeyDown:D=>{D.key==="Enter"?(D.preventDefault(),P()):D.key==="Escape"&&(D.preventDefault(),N.current=!0,v(e.ownerDisplayName),D.currentTarget.blur())},disabled:y,"aria-busy":y})]})]})}),r.jsx(ye,{header:r.jsx(re,{title:i("settingsGeneralAccountTitle"),description:i("settingsGeneralAccountDescription")}),children:r.jsx("div",{className:"setupActionGroup",children:r.jsx("button",{type:"button",className:"secondaryButton",disabled:b,onClick:()=>{G()},children:i(b?"settingsGeneralSigningOutButton":"settingsGeneralSignOutButton")})})}),r.jsxs(ye,{header:r.jsx(re,{title:i("settingsGeneralLanguageTitle"),description:i("settingsGeneralLanguageDescription")}),children:[r.jsx(le,{label:i("settingsGeneralLanguagePreferenceLabel"),description:i("settingsGeneralLanguagePreferenceDescription"),layout:"stack",control:r.jsxs("select",{className:"textInput",value:o,disabled:p,onChange:D=>{O(D.target.value)},"aria-label":i("settingsGeneralLanguageSelectAriaLabel"),children:[r.jsx("option",{value:"auto",children:i("settingsGeneralLanguageAutoOption")}),r.jsx("option",{value:"en",children:i("settingsGeneralLanguageEnglishOption")}),r.jsx("option",{value:"zh-TW",children:i("settingsGeneralLanguageTraditionalChineseOption")})]})}),r.jsx(le,{label:i("settingsGeneralAssistantLanguagePreferenceLabel"),description:i("settingsGeneralAssistantLanguagePreferenceDescription"),layout:"stack",control:r.jsxs("select",{className:"textInput",value:me,disabled:f,onChange:D=>{const _=D.target.value;gi(_)&&E(_)},"aria-label":i("settingsGeneralAssistantLanguageSelectAriaLabel"),children:[r.jsx("option",{value:"unspecified",children:i("settingsGeneralAssistantLanguageUnspecifiedOption")}),W.map(D=>r.jsx("option",{value:D.code,children:D.label},D.code))]})})]}),r.jsxs(ye,{header:r.jsx(re,{title:i("settingsGeneralLobbyMotionTitle"),description:i("settingsGeneralLobbyMotionDescription")}),children:[r.jsx(le,{asChoice:!0,label:i("settingsGeneralLobbyMotionOffLabel"),description:i("settingsGeneralLobbyMotionOffDescription"),control:r.jsx("input",{type:"radio",name:"lobby-animation-mode",checked:Q.animationMode==="off",disabled:h,onChange:()=>{I("off",i("settingsGeneralUpdateLobbyAnimationError"))}})}),r.jsx(le,{asChoice:!0,label:i("settingsGeneralLobbyMotionReducedLabel"),description:i("settingsGeneralLobbyMotionReducedDescription"),control:r.jsx("input",{type:"radio",name:"lobby-animation-mode",checked:Q.animationMode==="reduced",disabled:h,onChange:()=>{I("reduced",i("settingsGeneralUpdateLobbyAnimationError"))}})}),r.jsx(le,{asChoice:!0,label:i("settingsGeneralLobbyMotionFullLabel"),description:i("settingsGeneralLobbyMotionFullDescription"),control:r.jsx("input",{type:"radio",name:"lobby-animation-mode",checked:Q.animationMode==="full",disabled:h,onChange:()=>{I("full",i("settingsGeneralUpdateLobbyAnimationError"))}})})]}),e.guideCat?r.jsx(ye,{header:r.jsx(re,{title:i("settingsGeneralGuideCatAssistTitle"),description:F?i("settingsGeneralGuideCatAssistEnabledDescription",{guideCatName:q}):i("settingsGeneralGuideCatAssistDisabledDescription",{guideCatName:q})}),children:F?r.jsxs(r.Fragment,{children:[r.jsx(le,{asChoice:!0,label:i("settingsGeneralGuideCatAutoLabel"),description:i("settingsGeneralGuideCatAutoDescription"),control:r.jsx("input",{type:"radio",name:"guide-cat-sidecar-mode",checked:T.prefs.sidecarMode==="auto",onChange:()=>{$("auto")}})}),r.jsx(le,{asChoice:!0,label:i("settingsGeneralGuideCatSidePanelLabel"),description:i("settingsGeneralGuideCatSidePanelDescription"),control:r.jsx("input",{type:"radio",name:"guide-cat-sidecar-mode",checked:T.prefs.sidecarMode==="drawer",onChange:()=>{$("drawer")}})}),r.jsx(le,{asChoice:!0,label:i("settingsGeneralGuideCatBubbleLabel"),description:i("settingsGeneralGuideCatBubbleDescription"),control:r.jsx("input",{type:"radio",name:"guide-cat-sidecar-mode",checked:T.prefs.sidecarMode==="bubble",onChange:()=>{$("bubble")}})})]}):r.jsx("div",{className:"setupActionGroup",children:r.jsx("button",{type:"button",className:"secondaryButton",onClick:()=>a("/settings/assistants"),children:i("settingsGeneralOpenAssistantsButton")})})}):null,c?r.jsx(Qt,{onSave:D=>{u(!1),R(D,i("settingsGeneralSaveAvatarError"))},onClose:()=>u(!1),initialDataUrl:ee??null}):null,r.jsx(rt,{toasts:j})]})}function Uv(){const e=Ne(),{t}=U();return r.jsx(ye,{header:r.jsx(re,{title:t(l.settingsRouteTitleNotFound),description:t(l.settingsRouteNotFoundDescription)}),children:r.jsx("div",{className:"settingsActionRow",children:r.jsx("button",{type:"button",className:"secondaryButton",onClick:()=>e("/settings/general"),children:t(l.settingsRouteNotFoundOpenGeneral)})})})}let dd={inflight:!1};const Bo=new Set,Fo=new Set;let Ua=null;function vi(e){dd=e;for(const t of Bo)t()}function Ci(e){for(const t of Fo)t(e)}function Hv(e){return Bo.add(e),()=>{Bo.delete(e)}}function _v(e){return Fo.add(e),()=>{Fo.delete(e)}}function Si(){return dd}function ud(){if(Ua)return Ua;vi({inflight:!0});const e=Eg().then(t=>(Ci({type:"success",value:t}),t),t=>{throw Ci({type:"error",error:t}),t}).finally(()=>{Ua=null,vi({inflight:!1})});return Ua=e,e}const pd={check:"check",install:"apply",upgrade:"upgrade",repair:"force",uninstall:"uninstall"},yt=Fe("en");function Li(e,t){switch(t){case"check":return e.supportsCheckOnly;case"install":return e.supportsApply;case"upgrade":return e.supportsUpgrade;case"repair":return e.supportsForce;case"uninstall":return e.supportsUninstall}}function Gv(e,t=yt){const a=["check","install","upgrade","repair","uninstall"],o=ja(e,t);return a.map(n=>({action:n,label:or(n,t),available:e.supported&&e.available&&Li(e,n),reason:e.supported?e.available?Li(e,n)?null:t(l.settingsRuntimeHelperUnsupportedActionReason,{helperLabel:o,actionLabel:or(n,t).toLowerCase()}):t(l.settingsRuntimeHelperUnavailableReason,{helperLabel:o}):qv(e.unsupportedReason,t)}))}function or(e,t=yt){switch(e){case"check":return t(l.settingsRuntimeActionCheckLabel);case"install":return t(l.settingsRuntimeActionInstallLabel);case"upgrade":return t(l.settingsRuntimeActionUpgradeLabel);case"repair":return t(l.settingsRuntimeActionRepairLabel);case"uninstall":return t(l.settingsRuntimeActionUninstallLabel)}}function ja(e,t=yt){return Ie(e.label,t)}function Kv(e,t){switch(e){case"Windows, macOS, or Linux hosts":return t(l.settingsRuntimePlatformSupportAllDesktop);case"Windows hosts":return t(l.settingsRuntimePlatformSupportWindows);case"Windows hosts with WSL support":return t(l.settingsRuntimePlatformSupportWindowsWsl);case"macOS hosts":return t(l.settingsRuntimePlatformSupportMacos);case"Linux hosts":return t(l.settingsRuntimePlatformSupportLinux);default:return e}}function qv(e,t=yt){const a=String(e??"").trim();if(!a)return null;const o=a.match(/^(.+) is currently only supported on (.+)\.$/u);return o?t(l.settingsRuntimeHelperUnsupportedPlatformReason,{helperLabel:Ie(o[1],t),platformSupport:Kv(o[2],t)}):a}function nr(e,t=yt){switch(e){case"auth_required":return t(l.settingsRuntimeLifecycleStatusAuthRequired);case"blocked":return t(l.settingsRuntimeLifecycleStatusBlocked);case"changes_required":return t(l.settingsRuntimeLifecycleStatusChangesRequired);case"failed":return t(l.settingsRuntimeLifecycleStatusFailed);case"not_installed":return t(l.settingsRuntimeLifecycleStatusNotInstalled);case"preview":return t(l.settingsRuntimeLifecycleStatusPreview);case"ready":return t(l.settingsRuntimeLifecycleStatusReady);case"restart_required":return t(l.settingsRuntimeLifecycleStatusRestartRequired);case"uninstalled":return t(l.settingsRuntimeLifecycleStatusUninstalled);default:return String(e??"")}}function ro(e,t){switch(e){case"apply":return t(l.settingsRuntimeLifecycleModeApply);case"check":return t(l.settingsRuntimeLifecycleModeCheck);case"force":return t(l.settingsRuntimeLifecycleModeForce);case"uninstall":return t(l.settingsRuntimeLifecycleModeUninstall);case"upgrade":return t(l.settingsRuntimeLifecycleModeUpgrade);default:return String(e??"")}}function Ri(e,t=yt){const a=String(e??"").trim();let o;switch(a){case"Launch the target WSL distro once to finish first-user setup, then rerun the packaged setup check.":return t(l.settingsRuntimeLifecycleDetailLaunchWslFirstBoot);case"Start Docker Desktop and wait for the engine to become ready, then rerun the packaged setup check.":return t(l.settingsRuntimeLifecycleDetailStartDockerWarmUp)}return o=a.match(/^Run (.+) to install the missing host substrate flagged by the readiness audit\.$/u),o?t(l.settingsRuntimeLifecycleDetailRunMissingHostSubstrate,{helperLabel:Ie(o[1],t)}):(o=a.match(/^Restart the host or Windows session, then rerun (.+) in (.+) mode\.$/u),o?t(l.settingsRuntimeLifecycleDetailRestartThenRerunMode,{helperLabel:Ie(o[1],t),mode:ro(o[2],t)}):(o=a.match(/^Restart Windows or the current session, then rerun (.+)\.$/u),o?t(l.settingsRuntimeLifecycleDetailRestartThenRerun,{helperLabel:Ie(o[1],t)}):(o=a.match(/^Relaunch Cats Desktop Host, then rerun (.+) to verify the updated packaged setup state\.$/u),o?t(l.settingsRuntimeLifecycleDetailRelaunchThenVerify,{helperLabel:Ie(o[1],t)}):(o=a.match(/^(.+) requires an elevated host step before it can continue\.$/u),o?t(l.settingsRuntimeLifecycleDetailElevationRequired,{helperLabel:Ie(o[1],t)}):(o=a.match(/^Complete the required sign-in flow, then rerun (.+) in (.+) mode\.$/u),o?t(l.settingsRuntimeLifecycleDetailAuthThenRerunMode,{helperLabel:Ie(o[1],t),mode:ro(o[2],t)}):(o=a.match(/^Retry (.+) after addressing the last failure\.$/u),o?t(l.settingsRuntimeLifecycleDetailRetryAfterFailure,{helperLabel:Ie(o[1],t)}):(o=a.match(/^Run (.+) to install the missing packaged setup requirement\.$/u),o?t(l.settingsRuntimeLifecycleDetailRunMissingRequirement,{helperLabel:Ie(o[1],t)}):(o=a.match(/^Finish the manual follow-through for (.+), then rerun a verification step\.$/u),o?t(l.settingsRuntimeLifecycleDetailFinishManualFollowThrough,{helperLabel:Ie(o[1],t)}):(o=a.match(/^Run (.+) again to apply the remaining packaged setup changes\.$/u),o?t(l.settingsRuntimeLifecycleDetailRunApplyRemainingChanges,{helperLabel:Ie(o[1],t)}):(o=a.match(/^Rerun (.+) in check mode if you want to verify the packaged setup state again\.$/u),o?t(l.settingsRuntimeLifecycleDetailRerunCheckToVerify,{helperLabel:Ie(o[1],t)}):(o=a.match(/^(.+) (check|apply|upgrade|force|uninstall) finished with (.+)\.$/u),o?t(l.settingsRuntimeLifecycleDetailFinishedWithStatus,{helperLabel:Ie(o[1],t),mode:ro(o[2],t),status:nr(o[3],t)||o[3]}):nr(a,t)||a)))))))))))}function Ie(e,t){if(e==="Windows PowerShell + PATH readiness helper")return t(l.settingsRuntimeHelperLabelWindowsCliReadiness);if(e==="Windows Microsoft Visual C++ 2015-2022 Redistributable (x64)")return t(l.settingsRuntimeHelperLabelWindowsVcRedist);let a=e.match(/^(Windows|Linux|macOS) Node\.js LTS host installer$/u);return a?t(l.settingsRuntimeHelperLabelNodeHostInstaller,{platform:a[1]}):(a=e.match(/^(Windows|Linux|macOS) GitHub CLI host installer$/u),a?t(l.settingsRuntimeHelperLabelGithubCliHostInstaller,{platform:a[1]}):(a=e.match(/^(Windows|Linux|macOS) npm prefix and PATH prerequisite helper$/u),a?t(l.settingsRuntimeHelperLabelNpmPrefixHelper,{platform:a[1]}):(a=e.match(/^(Windows|Linux|macOS) setup readiness audit$/u),a?t(l.settingsRuntimeHelperLabelSetupReadinessAudit,{platform:a[1]}):(a=e.match(/^(Windows|Linux|macOS) packaged setup background process helper$/u),a?t(l.settingsRuntimeHelperLabelPackagedBackgroundProcessHelper,{platform:a[1]}):(a=e.match(/^(Windows|Linux|macOS) packaged provider uninstall helper$/u),a?t(l.settingsRuntimeHelperLabelPackagedProviderUninstallHelper,{platform:a[1]}):(a=e.match(/^(Windows|Linux|macOS) packaged npm-global CLI installer helper$/u),a?t(l.settingsRuntimeHelperLabelPackagedNpmGlobalCliInstallerHelper,{platform:a[1]}):(a=e.match(/^(Windows|Linux|macOS) native (.+) installer$/u),a?t(l.settingsRuntimeHelperLabelNativeProviderInstaller,{platform:a[1],providerLabel:a[2]}):(a=e.match(/^(Windows|Linux|macOS) (.+) local-model installer$/u),a?t(l.settingsRuntimeHelperLabelLocalModelInstaller,{platform:a[1],providerLabel:a[2]}):(a=e.match(/^(Windows|Linux|macOS) (.+) installer$/u),a?t(l.settingsRuntimeHelperLabelProviderInstaller,{platform:a[1],providerLabel:a[2]}):e)))))))))}const $v={check:new Set(["ready","not_installed","changes_required","auth_required"]),install:new Set(["ready"]),upgrade:new Set(["ready"]),repair:new Set(["ready"]),uninstall:new Set(["uninstalled","not_installed"])},zv={check:new Set(["failed"]),install:new Set(["changes_required","auth_required","restart_required","not_installed"]),upgrade:new Set(["changes_required","auth_required","restart_required"]),repair:new Set(["changes_required","auth_required","restart_required"]),uninstall:new Set(["changes_required","blocked","preview"])};function Vv(e,t){if(e.runState==="failed")return"failure";const a=e.status??"";return a==="failed"?"failure":zv[t].has(a)?t==="check"?"failure":"partial":$v[t].has(a)?"success":"partial"}function Yv(e,t,a,o){const n=a?.state?.lastAction??null,s=or(t,o).toLowerCase(),i=pd[t];if(!n||n.helperId!==e.id||n.mode!==i)return{kind:"failure",helperId:e.id,action:t,status:null,summary:"",plannedActions:[],appliedChanges:[],warnings:[],manualSteps:[],message:o(l.settingsRuntimeActionNoResult,{helperLabel:e.label,actionLabel:s})};const c=Vv(n,t),u=n.status,h=ja(e,o),g=(()=>{if(c==="success")return o(u==="not_installed"&&t==="uninstall"?l.settingsRuntimeActionSuccessNothingToRemove:l.settingsRuntimeActionSuccessComplete,{helperLabel:h,actionLabel:s});if(c==="partial"){const k=u??"changes_required",f=n.warnings[0]??n.manualSteps[0];return f?o(l.settingsRuntimeActionPartialWithDetail,{helperLabel:h,actionLabel:s,status:nr(k,o),detail:Ri(f,o)}):o(l.settingsRuntimeActionPartial,{helperLabel:h,actionLabel:s,status:nr(k,o)})}const p=n.summary||n.warnings[0]||u;return p?o(l.settingsRuntimeActionFailedWithDetail,{helperLabel:h,actionLabel:s,detail:Ri(p,o)}):o(l.settingsRuntimeActionFailed,{helperLabel:h,actionLabel:s})})();return{kind:c,helperId:e.id,action:t,status:u,summary:n.summary??"",plannedActions:n.plannedActions??[],appliedChanges:n.appliedChanges??[],warnings:n.warnings??[],manualSteps:n.manualSteps??[],message:g}}async function hd(e,t,a){const o=mt();if(o?.runSetupHelper)return await o.runSetupHelper(e,t,a)}async function Qv(e,t,a=yt){if(!mt()?.runSetupHelper)return{kind:"failure",helperId:e.id,action:t,status:null,summary:"",plannedActions:[],appliedChanges:[],warnings:[],manualSteps:[],message:a(l.settingsRuntimeHostBridgeUnavailableClient)};try{const n=await hd(e.id,pd[t]),s=Yv(e,t,n,a);return(s.kind==="success"||s.kind==="partial")&&ud().catch(()=>{}),s}catch(n){return{kind:"failure",helperId:e.id,action:t,status:null,summary:"",plannedActions:[],appliedChanges:[],warnings:[],manualSteps:[],message:n instanceof Error?n.message:a(l.settingsRuntimeActionFailed,{helperLabel:ja(e,a),actionLabel:or(t,a).toLowerCase()})}}}async function Jv(e,t=yt){if(!mt()?.runSetupHelper)return{helperId:e.id,status:null,plannedActions:[],warnings:[],manualSteps:[],systemInstallPath:null,available:!1,message:t(l.settingsRuntimeHostBridgeUnavailable)};try{const n=(await hd(e.id,"uninstall",{dryRun:!0}))?.state?.lastAction??null;if(!n||n.helperId!==e.id||n.mode!=="uninstall")return{helperId:e.id,status:null,plannedActions:[],warnings:[],manualSteps:[],systemInstallPath:null,available:!1,message:t(l.settingsRuntimePreviewMissingResult)};const s=(n.warnings??[]).find(i=>i.startsWith("system_install_remains_at:"));return{helperId:e.id,status:n.status,plannedActions:n.plannedActions??[],warnings:n.warnings??[],manualSteps:n.manualSteps??[],systemInstallPath:s?s.slice(26):null,available:!0,message:null}}catch(o){return{helperId:e.id,status:null,plannedActions:[],warnings:[],manualSteps:[],systemInstallPath:null,available:!1,message:o instanceof Error?o.message:t(l.settingsRuntimePreviewFailed)}}}async function Xv(){const e=mt();if(!e?.getSetupSnapshot)return[];try{const t=await e.getSetupSnapshot();return Array.isArray(t.helpers)?t.helpers:[]}catch{return[]}}function Zv(e){return e.filter(t=>!t.supported||!t.available?!1:t.supportsApply||t.supportsUpgrade||t.supportsForce||t.supportsUninstall)}function eC(e,t,a){const o=vr(e);if(o==="unavailable"||o==="unknown")return{tone:"warm",label:a("settingsRuntimeStatusChipRuntimeUnavailable")};if(o==="degraded")return{tone:"warm",label:a("settingsRuntimeStatusChipRuntimeDegraded")};switch(t.status){case"ready":return{tone:"ready",label:a("settingsRuntimeStatusChipRuntimeReady")};case"ready_to_apply":return{tone:"warm",label:a("settingsRuntimeStatusChipSetupReadyToApply")};case"attention_required":return{tone:"warm",label:a("settingsRuntimeStatusChipSetupNeedsRemediation")};case"scan_required":return{tone:"warm",label:a("settingsRuntimeStatusChipProviderScanRequired")};default:return{tone:"warm",label:a("settingsRuntimeStatusChipSetupUnavailable")}}}function tC(e){return e.loading||!e.preview||!e.preview.available?!1:e.preview.plannedActions.length>0}function aC({payload:e}){const{toasts:t,showToast:a}=at(),{t:o}=U(),s=d.useSyncExternalStore(Hv,Si,Si).inflight,i=d.useMemo(()=>xn(),[]),[c,u]=d.useState([]),[h,g]=d.useState(!1),[p,k]=d.useState(null),[f,w]=d.useState(null),b=eC(e.runtime,e.runtimeSetup,o),m=R=>{switch(R){case"check":return o("settingsRuntimeActionCheckLabel");case"install":return o("settingsRuntimeActionInstallLabel");case"upgrade":return o("settingsRuntimeActionUpgradeLabel");case"repair":return o("settingsRuntimeActionRepairLabel");case"uninstall":return o("settingsRuntimeActionUninstallLabel")}},C=R=>R===1?"":"s",v=d.useCallback(R=>{if(!(R instanceof Error))return o("settingsRuntimeRefreshFailure");const P=Mg(R.message);return P===null?R.message:o("settingsRuntimeRefreshFailureWithStatus",{status:P})},[o]),y=d.useCallback(async()=>{if(i){g(!0);try{const R=await Xv();u(R)}finally{g(!1)}}},[i]);d.useEffect(()=>{y()},[y]),d.useEffect(()=>{_v(R=>{if(R.type==="success"){const{refreshed:P,failures:I}=R.value;I.length>0?a(o("settingsRuntimeRefreshSummaryWithFailures",{refreshed:P,failed:I.length})):a(o("settingsRuntimeRefreshSummary",{refreshed:P,pluralSuffix:C(P)}))}else a(v(R.error))})},[v,a,o]);const L=()=>{ud().catch(()=>{})},N=d.useMemo(()=>Zv(c),[c]),T=d.useCallback(async(R,P)=>{k(R.id);try{const I=await Qv(R,P,o);return a(I.message),I.kind!=="failure"&&await y(),I}finally{k(null)}},[y,a,o]),j=d.useCallback(async R=>{w({helper:R,preview:null,loading:!0});const P=await Jv(R,o);w(I=>!I||I.helper.id!==R.id?I:{helper:R,preview:P,loading:!1})},[o]),A=d.useCallback(async()=>{if(!f||f.loading)return;const R=f.helper;w(null),await T(R,"uninstall")},[f,T]);return r.jsxs(r.Fragment,{children:[r.jsxs(ye,{header:r.jsx(re,{title:o("settingsRuntimeStatusTitle"),description:o("settingsRuntimeStatusDescription")}),children:[r.jsx("div",{className:"settingsChipRow",children:r.jsx(Lt,{tone:b.tone,children:b.label})}),r.jsxs("div",{className:"settingsRuntimeMetrics",children:[r.jsxs("div",{className:"settingsRuntimeMetric",children:[r.jsx("strong",{children:e.runtimeSetup.availableCount}),r.jsx("span",{children:o("settingsRuntimeMetricReadyProviders")})]}),r.jsxs("div",{className:"settingsRuntimeMetric",children:[r.jsx("strong",{children:e.runtimeSetup.providerCount}),r.jsx("span",{children:o("settingsRuntimeMetricProvidersScanned")})]}),r.jsxs("div",{className:"settingsRuntimeMetric",children:[r.jsx("strong",{children:e.runtimeSetup.providersNeedingAttention.length}),r.jsx("span",{children:o("settingsRuntimeMetricNeedAttention")})]})]})]}),e.runtimeSetup.providersNeedingAttention.length>0?r.jsx(ye,{header:r.jsx(re,{title:o("settingsRuntimeNeedAttentionTitle"),description:o("settingsRuntimeNeedAttentionDescription")}),children:r.jsx("ul",{className:"settingsRuntimeList",children:e.runtimeSetup.providersNeedingAttention.map(R=>r.jsxs("li",{children:[r.jsx("strong",{children:R.provider}),r.jsxs("span",{children:[R.family,typeof R.remediationCount=="number"?` • ${o("settingsRuntimeFixStepCount",{count:R.remediationCount,pluralSuffix:R.remediationCount===1?"":"s"})}`:""]})]},R.provider))})}):null,i?r.jsx(ye,{header:r.jsx(re,{title:o("settingsRuntimeProviderHelpersTitle"),description:o("settingsRuntimeProviderHelpersDescription")}),children:h&&N.length===0?r.jsx("p",{className:"settingsRuntimeNote",children:o("settingsRuntimeLoadingHelpers")}):N.length===0?r.jsx("p",{className:"settingsRuntimeNote",children:o("settingsRuntimeNoProviderHelpers")}):r.jsx("ul",{className:"settingsRuntimeList settingsRuntimeHelperList",children:N.map(R=>{const P=Gv(R,o),I=p===R.id,O=ja(R,o);return r.jsxs("li",{className:"settingsRuntimeHelperRow",children:[r.jsxs("div",{className:"settingsRuntimeHelperHead",children:[r.jsx("strong",{children:O}),r.jsx("span",{children:R.packagedRelativePath})]}),r.jsxs("div",{className:"settingsRuntimeHelperActions",children:[P.filter(E=>E.action!=="uninstall"&&E.available).map(E=>r.jsx("button",{type:"button",className:"secondaryButton",disabled:I,onClick:()=>{T(R,E.action)},children:I?o("settingsRuntimeWorkingState"):m(E.action)},E.action)),R.supportsUninstall?r.jsx("button",{type:"button",className:"dangerButton",disabled:I,onClick:()=>{j(R)},children:o("settingsRuntimeUninstallButtonLabel")}):null]})]},R.id)})})}):null,r.jsx(ye,{header:r.jsx(re,{title:o("settingsRuntimeModelCatalogsTitle"),description:o("settingsRuntimeModelCatalogsDescription")}),children:r.jsx("button",{type:"button",className:"secondaryButton settingsRefreshButton",onClick:L,disabled:s,children:s?r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"settingsRefreshSpinner","aria-hidden":"true"}),r.jsx("span",{children:o("settingsRuntimeRefreshingState")})]}):o("settingsRuntimeRefreshCatalogsButton")})}),r.jsx(ye,{header:r.jsx(re,{title:o("settingsRuntimeStandaloneSetupTitle"),description:o("settingsRuntimeStandaloneSetupDescription")}),children:r.jsx(ya,{className:"secondaryButton settingsInlineLink",href:ed,target:"_blank",rel:"noreferrer",onOpenError:()=>a(o("settingsRuntimeBrowserHandoffError")),children:o("settingsRuntimeOpenStandaloneSetup")})}),f?(()=>{const R=tC(f),P=!R&&!f.loading;return r.jsx("div",{className:"settingsRuntimeConfirmOverlay",role:"dialog","aria-modal":"true",children:r.jsxs("div",{className:"settingsRuntimeConfirmCard",children:[r.jsx(rC,{prompt:f,t:o}),r.jsxs(Je,{children:[r.jsx("button",{type:"button",className:"secondaryButton",onClick:()=>w(null),children:o(P?"settingsRuntimeCancelActionFallbackLabel":"settingsRuntimeCancelActionLabel")}),r.jsx("button",{type:"button",className:"dangerButton",disabled:!R,onClick:()=>{A()},children:o("settingsRuntimeUninstallButtonLabel")})]})]})})})():null,r.jsx(rt,{toasts:t})]})}function rC({prompt:e,t}){const a=ja(e.helper,t);return r.jsxs(r.Fragment,{children:[r.jsxs("h3",{children:[t("settingsRuntimeUninstallTitle",{label:a}),"?"]}),r.jsxs("p",{children:[t("settingsRuntimeUninstallDescriptionPrefix"),r.jsxs("strong",{children:[" ",a]}),"."," ",t("settingsRuntimeUninstallDescriptionSuffix")]}),r.jsxs("p",{className:"settingsRuntimeNote",children:[t("settingsRuntimeUninstallHelperLabel",{helperId:e.helper.id}),r.jsx("br",{}),t("settingsRuntimeUninstallScriptLabel",{scriptPath:e.helper.packagedRelativePath})]}),r.jsx(oC,{preview:e.preview,loading:e.loading,t})]})}function oC({preview:e,loading:t,t:a}){return t?r.jsx("p",{className:"settingsRuntimeNote",children:a("settingsRuntimeComputingPlannedRemovals")}):!e||!e.available?r.jsx("p",{className:"settingsRuntimeNote",children:e?.message??a("settingsRuntimePreviewUnavailable")}):e.status==="not_installed"?r.jsxs("p",{className:"settingsRuntimeNote",children:[a("settingsRuntimeNothingToRemove"),e.systemInstallPath?r.jsxs(r.Fragment,{children:[r.jsx("br",{}),a("settingsRuntimeSystemInstallDetected",{installPath:e.systemInstallPath})]}):null]}):r.jsxs("div",{className:"settingsRuntimePreview",children:[r.jsx("p",{className:"settingsRuntimeNote",children:a("settingsRuntimeWillRemoveItems",{itemCount:e.plannedActions.length,pluralSuffix:e.plannedActions.length===1?"":"s"})}),r.jsx("ul",{className:"settingsRuntimePreviewList",children:e.plannedActions.map(o=>r.jsx("li",{children:r.jsx("code",{children:o})},o))}),e.systemInstallPath?r.jsx("p",{className:"settingsRuntimeNote",children:a("settingsRuntimeSystemInstallCannotRemove",{installPath:e.systemInstallPath})}):null,e.manualSteps.length>0?r.jsx("ul",{className:"settingsRuntimePreviewList settingsRuntimePreviewManual",children:e.manualSteps.map(o=>r.jsx("li",{children:o},o))}):null]})}function nC({payload:e,onPayloadUpdate:t}){const{toasts:a,showToast:o}=at(),{t:n}=U(),s=un(e.chat.advancedDraftControls,"work");async function i(c){const u=e.chat.advancedDraftControls,h=kr(u);h.work=c,t({...e,chat:{...e.chat,advancedDraftControls:h}});try{const g=await kn({work:c});d.startTransition(()=>t(g))}catch(g){t({...e,chat:{...e.chat,advancedDraftControls:u}}),o(va(g,n("settingsConversationPreferenceUpdateFailure"),n))}}return r.jsxs(r.Fragment,{children:[r.jsx(In,{surface:"work",payload:e,onPayloadUpdate:t,onError:o}),r.jsx(En,{surface:"work",enabled:s,onToggle:c=>{i(c)}}),r.jsx(rt,{toasts:a})]})}function sC(e,t){return e==="/settings"||e==="/settings/"||pt(e,"/settings/general")?{section:"general",title:t("settingsRouteTitleGeneral")}:pt(e,"/settings/assistants")?{section:"assistants",title:t("settingsRouteTitleAssistants")}:iC(e)?{section:"cats",title:t("settingsRouteTitleMyCats")}:pt(e,"/settings/chat")?{section:"chat",title:t("settingsRouteTitleChat")}:pt(e,"/settings/work")?{section:"work",title:t("settingsRouteTitleWork")}:pt(e,"/settings/code")?{section:"code",title:t("settingsRouteTitleCode")}:pt(e,"/settings/apps")?{section:"apps",title:t("settingsRouteTitleApps")}:pt(e,"/settings/desktop")?{section:"desktop",title:t("settingsRouteTitleDesktop")}:pt(e,"/settings/runtime")?{section:"runtime",title:t("settingsRouteTitleRuntime")}:pt(e,"/settings/data")?{section:"data",title:t("settingsRouteTitleData")}:{section:"not-found",title:t("settingsRouteTitleNotFound")}}function pt(e,t){return e===t||e.startsWith(`${t}/`)}function iC(e){return e==="/settings/cats"||e==="/settings/cats/new"}function lC({payload:e,onPayloadUpdate:t,busy:a,onFeedback:o,onBusy:n,onResetSetup:s}){const i=e.products.find(p=>p.id==="work"),c=e.products.find(p=>p.id==="code"),u=xn(),h=p=>{t(p)},g=r.jsx(ty,{payload:e,busy:a,onPayloadUpdate:h,onFeedback:o,onBusy:n});return r.jsxs(na,{children:[r.jsx(Z,{index:!0,element:r.jsx(gt,{to:"/settings/general",replace:!0})}),r.jsx(Z,{path:"general",element:r.jsx(Wv,{payload:e,onPayloadUpdate:h})}),r.jsx(Z,{path:"cats",element:g}),r.jsx(Z,{path:"cats/new",element:g}),r.jsx(Z,{path:"assistants",element:r.jsx(oy,{payload:e,onPayloadUpdate:h})}),r.jsx(Z,{path:"chat",element:r.jsx(xy,{payload:e,onPayloadUpdate:h})}),i?r.jsx(Z,{path:"work",element:r.jsx(nC,{payload:e,onPayloadUpdate:h})}):null,c?r.jsx(Z,{path:"code",element:r.jsx(Ty,{payload:e,onPayloadUpdate:h})}):null,r.jsx(Z,{path:"apps/*",element:r.jsx(wy,{installedApps:e.installedApps??[],onInstalledAppsUpdate:p=>{h({...e,installedApps:p})}})}),u?r.jsx(Z,{path:"desktop",element:r.jsx(fv,{payload:e,onPayloadUpdate:h})}):null,r.jsx(Z,{path:"runtime",element:r.jsx(aC,{payload:e})}),r.jsx(Z,{path:"data",element:r.jsx(jy,{payload:e,busy:a,onResetSetup:s})}),r.jsx(Z,{path:"*",element:r.jsx(Uv,{})})]})}function cC(e){const t=ve(),{t:a}=U(),{section:o,title:n}=sC(t.pathname,a);return r.jsx(Bb,{section:o,title:n,products:e.payload.products,children:lC(e)})}function dC(){const{t:e}=U(),{loadState:t,onPayloadUpdate:a,onRetryLoad:o}=nu(),[n,s]=d.useState(Tn),[i,c]=d.useState(""),{dialog:u,confirm:h,handleClose:g}=Et(),p=d.useCallback(async()=>{if(await h({title:e(l.settingsDataResetAllDataTitle),message:e(l.settingsDataResetAllDataDescription),confirmLabel:e(l.settingsDataResetButtonLabel)})){s(wk());try{const f=await zg();Am(),await nd({bootstrapAttemptId:f.bootstrapAttemptId??null,setupCompleteAt:f.setupCompleteAt??null,products:Array.isArray(f.products)?[...f.products]:[]}),window.location.href="/"}catch(f){throw s(We()),f}}},[h,e]);return t.status==="loading"?r.jsx("div",{className:"settingsCanvasBoot",role:"status","aria-live":"polite","aria-label":e(l.settingsCanvasLoadingLabel)}):t.status==="error"?r.jsxs("section",{className:"settingsCanvasError",role:"alert","aria-live":"assertive",children:[r.jsx("h1",{className:"settingsCanvasErrorTitle",children:e(l.settingsCanvasLoadErrorTitle)}),r.jsx("p",{className:"settingsCanvasErrorBody",children:e(l.settingsCanvasLoadErrorBody)}),t.message?r.jsx("p",{className:"settingsCanvasErrorDetail",children:t.message}):null,r.jsx("div",{className:"settingsCanvasErrorActions",children:r.jsx("button",{type:"button",className:"primaryButton",onClick:o,children:e(l.sharedCommonRetry)})})]}):r.jsxs(r.Fragment,{children:[r.jsx(cC,{payload:t.payload,onPayloadUpdate:a,busy:n,onFeedback:c,onBusy:s,onResetSetup:p}),i?r.jsx("p",{className:"settingsFeedback",role:"status",children:i}):null,r.jsx(It,{dialog:u,onClose:g})]})}const ge=14,uC=.6,Pi=.18,pC=.18,Ai=2,hC="#e8c84a",md="#8B7E74";function mC(e){return new Promise((t,a)=>{const o=new Image;o.crossOrigin="anonymous",o.onload=()=>t(o),o.onerror=a,o.src=e})}function gC(e,t,a){return e.map(o=>{const n=Math.random()*Math.PI*2,s=uC+Math.random()*.3;return{id:o.id,x:ge+Math.random()*(t-ge*2),y:ge+Math.random()*(a-ge*2),vx:Math.cos(n)*s,vy:Math.sin(n)*s,color:o.avatarColor??md,initials:fe(o.name),isBoss:o.isBoss,avatarUrl:o.avatarUrl??null,image:null}})}function fC(e,t){return!e||e.length!==t.length?!0:e.some((a,o)=>{const n=t[o];return n?a.id!==n.id||a.color!==(n.avatarColor??md)||a.isBoss!==n.isBoss||a.avatarUrl!==(n.avatarUrl??null):!0})}function wC(e,t,a,o){for(const n of e)n.x+=n.vx*o,n.y+=n.vy*o,n.x-ge<=0?(n.x=ge,n.vx=Math.abs(n.vx)):n.x+ge>=t&&(n.x=t-ge,n.vx=-Math.abs(n.vx)),n.y-ge<=0?(n.y=ge,n.vy=Math.abs(n.vy)):n.y+ge>=a&&(n.y=a-ge,n.vy=-Math.abs(n.vy))}function kC(e,t,a){for(const o of e)o.x=Math.min(Math.max(ge,o.x),t-ge),o.y=Math.min(Math.max(ge,o.y),a-ge)}function bC(e,t,a,o){e.clearRect(0,0,a,o);for(const n of t)e.globalAlpha=Pi,n.isBoss&&(e.beginPath(),e.arc(n.x,n.y,ge+Ai,0,Math.PI*2),e.strokeStyle=hC,e.lineWidth=Ai,e.stroke()),n.image?(e.save(),e.beginPath(),e.arc(n.x,n.y,ge,0,Math.PI*2),e.clip(),e.drawImage(n.image,n.x-ge,n.y-ge,ge*2,ge*2),e.restore()):(e.beginPath(),e.arc(n.x,n.y,ge,0,Math.PI*2),e.fillStyle=n.color,e.fill(),e.globalAlpha=Pi*1.8,e.font=`700 ${ge*.65}px sans-serif`,e.textAlign="center",e.textBaseline="middle",e.fillStyle="#fff",e.fillText(n.initials,n.x,n.y));e.globalAlpha=1}function yC({animationMode:e,cats:t}){const a=d.useRef(null),o=d.useRef(null),n=d.useRef(0);return d.useEffect(()=>{if(e==="off"||t.length===0)return;const s=a.current;if(!s)return;const i=s,c=i.getContext("2d");if(!c)return;const u=e==="reduced"?pC:1;function h(){if(i.width=window.innerWidth,i.height=window.innerHeight,fC(o.current,t)){o.current=gC([...t],i.width,i.height);return}const f=o.current;f&&kC(f,i.width,i.height)}function g(){n.current!==0&&(cancelAnimationFrame(n.current),n.current=0)}function p(){const f=i.width,w=i.height,b=o.current;!c||!b||(wC(b,f,w,u),bC(c,b,f,w),n.current=requestAnimationFrame(p))}h(),n.current=requestAnimationFrame(p);const k=o.current;if(k)for(let f=0;f<t.length;f++){const w=t[f]?.avatarUrl;w&&k[f]&&mC(w).then(b=>{k[f].image=b}).catch(()=>{})}return window.addEventListener("resize",h),()=>{g(),window.removeEventListener("resize",h)}},[e,t]),e==="off"||t.length===0?null:r.jsx("canvas",{ref:a,className:"lobbyBouncingCanvas","aria-hidden":"true"})}const gd=Fe("en");function vC(e,t=gd){return e.products.map(a=>({productId:a.id,surface:a.surface,productName:eh(a,t),subtitle:th(a,t),routePrefix:a.routePrefix,lastUsed:a.surface!==null&&a.surface===e.lastUsedSurface,available:a.installState==="available"}))}function CC(e){return e.installedApps.flatMap(t=>!t.enabled||t.installState!=="enabled"?[]:t.lobbyEntries.map(a=>({appId:t.id,entryId:a.id,title:a.title,subtitle:a.subtitle??null,routePath:a.routePath,publisher:t.publisher,installState:t.installState,trustTier:t.trustTier})))}const SC=[l.lobbyGreetingChooseSurface,l.lobbyGreetingHomeReady,l.lobbyGreetingPickProduct,l.lobbyGreetingEverythingStaged,l.lobbyGreetingOpenSurface,l.lobbyGreetingAwake,l.lobbyGreetingContinue];function LC(e){return(e??[]).map(t=>t.trim()).filter(t=>t.length>0)}function RC(e,t=Math.random,a=gd){const o=LC(e),n=SC.map(i=>a(i)),s=o.length>0?o:n;return s[Math.floor(t()*s.length)]}const Oo=Fe("en"),PC=[l.lobbyGreetingChooseSurface,l.lobbyGreetingHomeReady,l.lobbyGreetingPickProduct,l.lobbyGreetingEverythingStaged,l.lobbyGreetingOpenSurface,l.lobbyGreetingAwake,l.lobbyGreetingContinue],AC=[l.chatNewChatDraftDefaultGreeting,l.chatNewChatDraftGreetingNap,l.chatNewChatDraftGreetingKeyboard,l.chatNewChatDraftGreetingLetsGo,l.chatNewChatDraftGreetingStandby,l.chatNewChatDraftGreetingTaskReady,l.chatNewChatDraftGreetingOnDuty],xC=[l.codeNewDraftGreeting,l.codeNewDraftGreetingOpenRepo,l.codeNewDraftGreetingBuildFixRefactor,l.codeNewDraftGreetingShipImprovement,l.codeNewDraftGreetingSmallestChange];function TC(e,t=Oo){return e.map(a=>t(a))}function DC(e){switch(e.bundle.scope.surfaceId){case"lobby":return PC;case"chat:new":return AC;case"code:new":return xC;default:return null}}function NC(e,t=Oo){if(!e)return null;const a=e.bundle.content.greeting?.trim();if(!a)return null;if(e.bundle.provenance.originMode!=="deterministic")return a;const o=DC(e);if(!o)return a;const s=TC(o,Oo).findIndex(c=>c===a);if(s<0)return a;const i=o[s];return i?t(i):a}function jC({envelope:e}){const{t}=U(),a=Ne(),[o]=d.useState(()=>RC(null,Math.random,t)),n=vC({products:e.products,lastUsedSurface:e.lastProductSurface??null},t),s=CC({installedApps:e.installedApps??[]}),i=NC(e.lobby.guideCatAssist,t)??o,c=vr(e.runtime),u=Ab(c),h=jn(c,t),g=t("lobbyRuntimeStatusLabel",{runtimeStatus:h}),p=e.ownerAvatarUrl?{backgroundImage:`url(${e.ownerAvatarUrl})`,backgroundSize:"cover",backgroundPosition:"center"}:void 0,k={platformShellSurface:e.lastProductSurface??"chat"};return r.jsxs("div",{className:"screen lobbyScreen",children:[r.jsx(yC,{animationMode:e.lobby.animationMode,cats:e.lobby.cats}),r.jsxs("div",{className:"platformLobby",children:[r.jsxs("div",{className:"lobbyTopBar",children:[r.jsx("span",{className:"lobbyBrand",children:t("appBrandName")}),r.jsxs("div",{className:"lobbyTopBarEnd",children:[r.jsx(Nn,{slotKind:"lobby"}),r.jsxs("div",{className:"lobbyIdentity",role:"group","aria-label":t("lobbyAccountSettingsAriaLabel"),children:[r.jsxs("button",{type:"button",className:"lobbyIdentityMainButton",onClick:()=>a("/settings/general",{state:k}),"aria-label":t("lobbyOpenAccountSettings"),children:[r.jsx("span",{className:"lobbyAvatar",style:p,children:e.ownerAvatarUrl?null:fe(e.ownerDisplayName)}),r.jsx("span",{className:"lobbyOwnerName",children:e.ownerDisplayName})]}),r.jsx("button",{type:"button",className:"lobbyIdentityRuntime",onClick:()=>a("/settings/runtime",{state:k}),"data-tooltip":h,"aria-label":g,children:r.jsx("span",{className:u,"aria-hidden":"true"})})]})]})]}),r.jsx("div",{className:"lobbyHero",children:r.jsx("h1",{className:"lobbyGreeting",children:i})}),r.jsx(Vc,{envelope:e}),r.jsxs("div",{className:"lobbyProducts",children:[r.jsx("p",{className:"lobbyProductsEyebrow",children:t("lobbyProductsSectionTitle")}),r.jsx("div",{className:"platformLobbyGrid",children:n.map(f=>{const w=`contentCard platformLobbyCard platformLobbyCard--${f.surface??"module"}`+(f.lastUsed?" platformLobbyCard--recent":"")+(f.available?" platformLobbyCard--mock":""),b=r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"platformLobbyCardAccent"}),r.jsx("span",{className:"platformLobbyCardName",children:f.productName}),r.jsx("span",{className:"platformLobbyCardSub",children:f.subtitle}),f.lastUsed?r.jsx("span",{className:"platformLobbyCardHint",children:t("lobbyContinueText")}):null]});return f.available?r.jsx("div",{className:w,children:b},f.productId):r.jsx("button",{type:"button",className:w,onClick:()=>a(f.routePrefix),children:b},f.productId)})})]}),s.length>0?r.jsxs("div",{className:"lobbyProducts",children:[r.jsx("p",{className:"lobbyProductsEyebrow",children:t("lobbyAppsSectionTitle")}),r.jsx("div",{className:"platformLobbyGrid",children:s.map(f=>r.jsxs("button",{type:"button",className:"contentCard platformLobbyCard platformLobbyCard--app",onClick:()=>a(f.routePath),"aria-label":t("lobbyOpenEntry",{entryTitle:f.title}),children:[r.jsx("div",{className:"platformLobbyCardAccent"}),r.jsx("span",{className:"platformLobbyCardName",children:f.title}),f.subtitle?r.jsx("span",{className:"platformLobbyCardSub",children:f.subtitle}):null]},`${f.appId}:${f.entryId}`))})]}):null]})]})}class da extends Error{constructor(t,a,o){super(t),this.status=a,this.code=o,this.name="PlatformSetupApiError"}}function MC(e){return e instanceof da&&e.status===401&&(e.code===null||e.code===Xe.unauthenticated)}function EC(e){return e instanceof da&&e.status===403&&e.code===Xe.forbidden&&e.message==="Auth repair is required."}async function fd(e,t){return(await wd(e,t)).message}async function wd(e,t){try{const a=await e.json(),o=IC(a);if(typeof o?.code=="string"){const n=t.errorMessagesByCode?.[o.code];return n?{message:n,code:o.code}:{message:t.fallbackMessageForStatus(e.status),code:o.code}}if(typeof o?.message=="string")return{message:o.message,code:null}}catch{}return{message:t.fallbackMessageForStatus(e.status),code:null}}function IC(e){if(typeof e!="object"||e===null)return null;const t=e.error;return typeof t=="object"&&t!==null?t:null}function BC(e){if(typeof e!="object"||e===null||!("routeTarget"in e)||!("auth"in e)||!("setup"in e))return null;const t=e.routeTarget;return t==="setup"||t==="login"||t==="repair"?t:null}async function FC(e,t){const a=await fetch("/api/platform/setup/complete",{method:"POST",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(e),signal:t.signal});if(!a.ok)throw new Error(await fd(a,t));return await a.json()}async function Ca(e){const t=await fetch("/api/app-shell",{headers:{Accept:"application/json"},signal:e.signal});if(!t.ok){const n=await wd(t,e);throw new da(n.message,t.status,n.code)}const a=await t.json(),o=BC(a);if(o==="login")throw new da("Authentication is required.",401,Xe.unauthenticated);if(o==="repair")throw new da("Auth repair is required.",403,Xe.forbidden);return a}async function OC(e,t){const a=await fetch("/api/platform/bootstrap-diagnostics/opened",{method:"POST",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify({attemptId:e??null}),signal:t.signal});if(!a.ok)throw new Error(await fd(a,t));return await a.json()}async function WC(e){return br(e)}async function UC(e,t){return gn({provider:e,instance:t})}async function HC(e,t){return fn({provider:e,instance:t})}function _C({name:e,onNameChange:t,nameReadOnly:a,provider:o,instance:n,model:s,modelSelection:i,onTargetChange:c,nameLabel:u,namePlaceholder:h,nameHint:g,autoFocusName:p,makeBoss:k,onMakeBossChange:f,hideMakeBoss:w,fetchProviderRegistry:b,fetchProviderModels:m,fetchAdvancedProviderModels:C,onProviderRegistryChange:v}){const{t:y}=U();return r.jsxs(r.Fragment,{children:[r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:u??y(l.settingsGeneralNameLabel)}),r.jsx("input",{className:"textInput",value:e,onChange:L=>t(L.target.value),placeholder:h,autoFocus:p&&!a,readOnly:a,"aria-readonly":a?"true":void 0}),g?r.jsx("span",{className:"fieldHint",children:g}):null]}),!w&&f?r.jsxs("label",{className:"fieldLabel fieldLabelInline",children:[r.jsx("input",{type:"checkbox",checked:k??!1,onChange:L=>f(L.target.checked)}),r.jsx("span",{children:y(l.sharedSettingsCatsSetBossCatLabel)})]}):null,r.jsx(Dc,{provider:o,instance:n,model:s,modelSelection:i,onTargetChange:c,fetchProviderRegistry:b,fetchProviderModels:m,fetchAdvancedProviderModels:C,onProviderRegistryChange:v})]})}function GC(e){return r.jsx(_C,{...e,fetchProviderRegistry:WC,fetchProviderModels:UC,fetchAdvancedProviderModels:HC})}function KC({provider:e,instance:t,model:a,modelSelection:o,runtimeReachable:n,onTargetChange:s}){const i=ct(),{t:c}=U(),[u,h]=d.useState({state:"ready",providers:[]}),[g,p]=d.useState(!1),k=Lc(u)??ed,f=u.state==="runtime_unreachable"?{className:"statusChip statusChipWarm",label:c(l.setupGuideCatRuntimeUnavailable)}:u.state==="no_usable_targets"?{className:"statusChip statusChipWarm",label:c(l.setupGuideCatNoUsableTargets)}:n?{className:"statusChip statusChipReady",label:c(l.setupGuideCatRuntimeConnected)}:{className:"statusChip statusChipWarm",label:c(l.setupGuideCatRuntimeNotDetected)};return r.jsxs(r.Fragment,{children:[r.jsx(GC,{name:i,onNameChange:()=>{},nameReadOnly:!0,provider:e,instance:t,model:a,modelSelection:o,onTargetChange:s,nameLabel:c(l.setupGuideCatNameLabel),namePlaceholder:i,nameHint:c(l.setupGuideCatNameHint),hideMakeBoss:!0,hideProductToggles:!0,onProviderRegistryChange:h}),r.jsxs("div",{className:"setupRuntimeStatus",children:[r.jsx("span",{className:f.className,children:f.label}),u.state==="runtime_unreachable"?r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"setupRuntimeNote",children:c(l.setupGuideCatUnavailableNote)}),r.jsx(ya,{className:"secondaryButton setupInlineLink",href:k,target:"_blank",rel:"noreferrer",onClick:()=>p(!1),onOpenError:()=>p(!0),children:c(l.setupGuideCatOpenRuntimeSetup)})]}):null,u.state==="no_usable_targets"?r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"setupRuntimeNote",children:c(l.setupGuideCatNoUsableTargetsNote)}),r.jsx(ya,{className:"secondaryButton setupInlineLink",href:k,target:"_blank",rel:"noreferrer",onClick:()=>p(!1),onOpenError:()=>p(!0),children:c(l.setupGuideCatOpenRuntimeSetup)})]}):null,g?r.jsx("span",{className:"setupRuntimeNote",role:"alert",children:c(l.settingsRuntimeBrowserHandoffError)}):null]})]})}function qC(e){return!!e.model.trim()}function $C(e){return!e.createGuideCat||qC({model:e.model})}const Sa=[1,2],zC=Sa.length;function xi(e){const t=Sa.indexOf(e);return Sa[t+1]??e}function VC(e){const t=Sa.indexOf(e);return Sa[t-1]??e}const YC=new Set(["Invalid desktop platform shell payload."]);function QC(e,t,a){return e instanceof Error?YC.has(e.message)?t:e.message:t}function JC(e){return e.step===2&&e.createGuideCat}function XC({envelope:e,onComplete:t}){const[a,o]=d.useState(1),[n,s]=d.useState(""),[i,c]=d.useState(""),[u,h]=d.useState(""),[g,p]=d.useState(!1),[k,f]=d.useState("claude"),[w,b]=d.useState(""),[m,C]=d.useState(""),[v,y]=d.useState(null),[L,N]=d.useState(null),[T,j]=d.useState(""),A=d.useRef(!1),{t:R}=U(),P=L!==null,I=ct(),O=!!(n.trim()&&i.trim()&&u),E=$C({createGuideCat:g,model:m}),$=e.bootstrapAttemptId??null,G=d.useCallback(async()=>{N("complete"),j("");try{const B=await FC({attemptId:$,ownerDisplayName:n.trim(),adminIdentifier:i.trim(),adminPassword:u,createGuideCat:g,guideCatProvider:g?k:void 0,guideCatInstance:g&&w||void 0,guideCatModel:g&&m||void 0,guideCatModelSelection:g?v:void 0},{fallbackMessageForStatus:q=>R(l.setupWizardFailedWithStatus,{status:q}),errorMessagesByCode:{already_complete:R(l.setupWizardAlreadyCompleteError),bad_request:R(l.setupWizardInvalidRequestError),configuration_error:R(l.setupWizardServerError),internal_error:R(l.setupWizardServerError)}});await $b(B),t(B)}catch(B){j(QC(B,R(l.setupWizardFailedMessage)))}finally{N(null)}},[g,i,u,w,m,v,t,n,k,$,R]);d.useEffect(()=>{A.current||(A.current=!0,OC($,{fallbackMessageForStatus:B=>R(l.setupWizardRecordOpenFailedWithStatus,{status:B})}).catch(()=>{}))},[$,R]),d.useEffect(()=>{function B(q){q.key!=="Enter"||P||q.target instanceof HTMLSelectElement||q.target instanceof HTMLTextAreaElement||a===1&&!O||a===2&&!E||(q.preventDefault(),a===1?o(xi(a)):a===2&&G())}return document.addEventListener("keydown",B),()=>document.removeEventListener("keydown",B)},[P,E,O,G,a]),d.useEffect(()=>{JC({step:a,createGuideCat:g})&&jg()},[g,a]);const ee=Array.from({length:zC},(B,q)=>q+1);return r.jsx("div",{className:"screen screenCentered",children:r.jsxs("div",{className:"setupWizard",children:[r.jsx("div",{className:"setupStepIndicator",children:ee.map(B=>r.jsx("span",{className:B<=a?"setupDot setupDotActive":"setupDot"},B))}),a===1?r.jsxs("div",{className:"contentCard setupCard",children:[r.jsx("p",{className:"eyebrow",children:R(l.appBrandName)}),r.jsx("h1",{children:R(l.setupWizardWelcomeTitle)}),r.jsx("p",{className:"heroNote",children:R(l.setupWizardWelcomeIntro)}),r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:R(l.setupWizardOwnerNameLabel)}),r.jsx("input",{className:"textInput",value:n,onChange:B=>s(B.target.value),placeholder:R(l.setupWizardOwnerNamePlaceholder),autoFocus:!0})]}),r.jsx("p",{className:"setupRuntimeNote",children:R(l.setupWizardAdminCredentialsHint)}),r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:R(l.setupWizardAdminIdentifierLabel)}),r.jsx("input",{className:"textInput",value:i,onChange:B=>c(B.target.value),placeholder:R(l.setupWizardAdminIdentifierPlaceholder),autoComplete:"username"})]}),r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:R(l.setupWizardAdminPasswordLabel)}),r.jsx("input",{className:"textInput",type:"password",value:u,onChange:B=>h(B.target.value),placeholder:R(l.setupWizardAdminPasswordPlaceholder),autoComplete:"new-password"})]}),T?r.jsx("p",{className:"feedbackText",children:T}):null,r.jsx("button",{className:"primaryButton setupPrimaryButton",disabled:!O,type:"button",onClick:()=>o(xi(a)),children:R(l.setupWizardGetStartedButton)})]}):null,a===2?r.jsxs("div",{className:"contentCard setupCard",children:[r.jsx("p",{className:"eyebrow",children:R(l.setupWizardStepIndicator,{step:2,total:2})}),r.jsx("h1",{children:R(l.setupWizardEnableGuideTitle,{guideCatName:I})}),r.jsx("p",{className:"heroNote",children:R(l.setupWizardEnableGuideSubtitle)}),r.jsxs("label",{className:"setupCheckboxLabel",children:[r.jsx("input",{type:"checkbox",className:"setupCheckbox",checked:g,onChange:B=>p(B.target.checked)}),r.jsx("span",{children:R(l.setupWizardEnableGuideLabel,{guideCatName:I})})]}),g?r.jsx(KC,{provider:k,instance:w,model:m,modelSelection:v,runtimeReachable:e.runtime.reachable,onTargetChange:B=>{f(B.provider),b(B.instance),C(B.model),y(B.modelSelection??null)}}):r.jsx("p",{className:"setupRuntimeNote",children:R(l.setupWizardSkipGuideMessage,{guideCatName:I})}),T?r.jsx("p",{className:"feedbackText",children:T}):null,r.jsxs("div",{className:"setupActions",children:[r.jsx("button",{className:"setupBackButton",type:"button",disabled:P,onClick:()=>o(VC(a)),children:R(l.setupWizardBackButton)}),r.jsx("button",{className:"primaryButton setupPrimaryButton",disabled:P||!E,type:"button",onClick:()=>{G()},children:R(L==="complete"?l.setupWizardOpeningCatsAction:l.setupWizardOpenCatsAction)})]})]}):null]})})}const Ti="https://accounts.google.com/gsi/client",ZC="g_csrf_token";let Ha=null;function eS(e=document,t=window){return t.google?.accounts?.id?Promise.resolve(t.google):Ha||(Ha=new Promise((a,o)=>{const n=e.querySelector(`script[src="${Ti}"]`),s=n??e.createElement("script");s.src=Ti,s.async=!0,s.defer=!0,s.onload=()=>{if(t.google?.accounts?.id){a(t.google);return}o(new Error("Google Identity Services did not initialize."))},s.onerror=()=>{o(new Error("Google Identity Services could not be loaded."))},n||e.head.appendChild(s)}),Ha)}function tS(){const e=new Uint8Array(24);globalThis.crypto.getRandomValues(e);let t="";for(const a of e)t+=String.fromCharCode(a);return btoa(t).replace(/\+/gu,"-").replace(/\//gu,"_").replace(/=+$/u,"")}function aS(e,t=document){const a=t.location.protocol==="https:"?"; Secure":"";t.cookie=`${ZC}=${encodeURIComponent(e)}; Path=/; SameSite=Lax${a}`}function rS({clientId:e,disabled:t,onCredential:a,onError:o}){const n=d.useRef(null);return d.useEffect(()=>{if(t)return;let s=!1;const i=tS();return aS(i),eS().then(c=>{s||!n.current||(c.accounts.id.initialize({client_id:e,callback:u=>{const h=u.credential?.trim();if(!h){o(new Error("Google did not return an ID token."));return}a({credential:h,csrfToken:i})}}),n.current.innerHTML="",c.accounts.id.renderButton(n.current,{type:"standard",theme:"outline",size:"large",text:"signin_with",shape:"rectangular",logo_alignment:"left",width:320}))}).catch(c=>{s||o(c instanceof Error?c:new Error("Google sign-in failed."))}),()=>{s=!0}},[e,t,a,o]),r.jsx("div",{className:"googleSignInButton",ref:n})}function Di({onAuthenticated:e}){const{t}=U(),[a,o]=d.useState(""),[n,s]=d.useState(""),[i,c]=d.useState(!1),[u,h]=d.useState(""),[g,p]=d.useState(null),k=!!(a.trim()&&n&&!i),f=d.useCallback(()=>({fallbackMessageForStatus:C=>t(l.authLoginFailedWithStatus,{status:C}),errorMessagesByCode:{[Xe.unauthenticated]:t(l.authLoginInvalidCredentials),[Xe.forbidden]:t(l.authLoginForbidden),[Xe.csrfMismatch]:t(l.authLoginCsrfMismatch)}}),[t]);d.useEffect(()=>{let C=!0;return Io(f()).then(v=>{if(!C)return;const y=v.providers.google.enabled&&v.providers.google.clientId?.trim()||null;p(y)}).catch(()=>{C&&p(null)}),()=>{C=!1}},[f]);async function w(C){if(C.preventDefault(),!!k){c(!0),h("");try{await Nv({identifier:a.trim(),password:n},f());const v=await Ca({fallbackMessageForStatus:y=>t(l.appLoadStateFailedWithStatus,{status:y})});e(v)}catch(v){h(v instanceof Error?v.message:t(l.authLoginFailed))}finally{c(!1)}}}const b=d.useCallback(async C=>{if(!i){c(!0),h("");try{await jv({credential:C.credential,csrfToken:C.csrfToken},f());const v=await Ca({fallbackMessageForStatus:y=>t(l.appLoadStateFailedWithStatus,{status:y})});e(v)}catch(v){h(v instanceof Error?v.message:t(l.authLoginFailed))}finally{c(!1)}}},[f,i,e,t]),m=d.useCallback(()=>{h(t(l.authLoginGoogleUnavailable))},[t]);return r.jsx("div",{className:"screen screenCentered",children:r.jsxs("form",{className:"contentCard setupCard",onSubmit:C=>{w(C)},children:[r.jsx("p",{className:"eyebrow",children:t(l.appBrandName)}),r.jsx("h1",{children:t(l.authLoginTitle)}),r.jsx("p",{className:"heroNote",children:t(l.authLoginSubtitle)}),r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:t(l.authLoginIdentifierLabel)}),r.jsx("input",{className:"textInput",value:a,onChange:C=>o(C.target.value),placeholder:t(l.authLoginIdentifierPlaceholder),autoComplete:"username",autoFocus:!0})]}),r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:t(l.authLoginPasswordLabel)}),r.jsx("input",{className:"textInput",type:"password",value:n,onChange:C=>s(C.target.value),placeholder:t(l.authLoginPasswordPlaceholder),autoComplete:"current-password"})]}),u?r.jsx("p",{className:"feedbackText",children:u}):null,r.jsx("button",{className:"primaryButton setupPrimaryButton",disabled:!k,type:"submit",children:t(i?l.authLoginSubmitting:l.authLoginSubmit)}),g?r.jsxs("div",{className:"googleSignInSection",children:[r.jsx("div",{className:"setupRuntimeNote",children:t(l.authLoginGoogleOriginHint)}),r.jsx(rS,{clientId:g,disabled:i,onCredential:C=>{b(C)},onError:m})]}):null]})})}function oS({onRepaired:e}){const{t}=U(),[a,o]=d.useState(""),[n,s]=d.useState(""),[i,c]=d.useState(""),[u,h]=d.useState(""),[g,p]=d.useState(!1),[k,f]=d.useState(""),w=!!(n.trim()&&i&&u.trim()&&!g);async function b(m){if(m.preventDefault(),!w){f(t(l.authRepairFailed));return}p(!0),f("");try{const C=a.trim(),v=u.trim();await Mv({displayName:C||void 0,identifier:n.trim(),password:i,recoveryToken:v||void 0},{fallbackMessageForStatus:L=>t(l.authRepairFailedWithStatus,{status:L}),errorMessagesByCode:{[Xe.forbidden]:t(l.authRepairForbidden)}});const y=await Ca({fallbackMessageForStatus:L=>t(l.appLoadStateFailedWithStatus,{status:L})});e(y)}catch(C){f(C instanceof Error?C.message:t(l.authRepairFailed))}finally{p(!1)}}return r.jsx("div",{className:"screen screenCentered",children:r.jsxs("form",{className:"contentCard setupCard",onSubmit:m=>{b(m)},children:[r.jsx("p",{className:"eyebrow",children:t(l.appBrandName)}),r.jsx("h1",{children:t(l.authRepairTitle)}),r.jsx("p",{className:"heroNote",children:t(l.authRepairSubtitle)}),r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:t(l.authRepairDisplayNameLabel)}),r.jsx("input",{className:"textInput",value:a,onChange:m=>o(m.target.value),placeholder:t(l.authRepairDisplayNamePlaceholder),autoComplete:"name",autoFocus:!0})]}),r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:t(l.authRepairIdentifierLabel)}),r.jsx("input",{className:"textInput",value:n,onChange:m=>s(m.target.value),placeholder:t(l.authRepairIdentifierPlaceholder),autoComplete:"username"})]}),r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:t(l.authRepairPasswordLabel)}),r.jsx("input",{className:"textInput",type:"password",value:i,onChange:m=>c(m.target.value),placeholder:t(l.authRepairPasswordPlaceholder),autoComplete:"new-password"})]}),r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:t(l.authRepairRecoveryTokenLabel)}),r.jsx("input",{className:"textInput",value:u,onChange:m=>h(m.target.value),placeholder:t(l.authRepairRecoveryTokenPlaceholder),autoComplete:"off"})]}),r.jsx("p",{className:"setupRuntimeNote",children:t(l.authRepairRecoveryTokenHint)}),k?r.jsx("p",{className:"feedbackText",role:"alert",children:k}):null,r.jsx("button",{className:"primaryButton setupPrimaryButton",disabled:!w,type:"submit",children:t(g?l.authRepairSubmitting:l.authRepairSubmit)})]})})}const Ni="/login",ji="/repair",nS="/lobby";function sS(e,t){return MC(e)?{status:"unauthenticated"}:EC(e)?{status:"repairRequired"}:{status:"error",message:e instanceof Error?e.message:t}}function Mi(e){return e.lastProductSurface?pr(e.lastProductSurface):nS}const iS="modulepreload",lS=function(e){return"/"+e},Ei={},Fn=function(t,a,o){let n=Promise.resolve();if(a&&a.length>0){let u=function(h){return Promise.all(h.map(g=>Promise.resolve(g).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),c=i?.nonce||i?.getAttribute("nonce");n=u(a.map(h=>{if(h=lS(h),h in Ei)return;Ei[h]=!0;const g=h.endsWith(".css"),p=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${p}`))return;const k=document.createElement("link");if(k.rel=g?"stylesheet":iS,g||(k.as="script"),k.crossOrigin="",k.href=h,c&&k.setAttribute("nonce",c),document.head.appendChild(k),g)return new Promise((f,w)=>{k.addEventListener("load",f),k.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${h}`)))})}))}function s(i){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=i,window.dispatchEvent(c),!c.defaultPrevented)throw i}return n.then(i=>{for(const c of i||[])c.status==="rejected"&&s(c.reason);return t().catch(s)})},cS=()=>Fn(()=>import("./App-Dl5FLaR_.js"),__vite__mapDeps([0,1,2,3,4,5])),dS=()=>Fn(()=>import("./App-BM2nzo6s.js"),__vite__mapDeps([6,1,2,3,7,8])),uS=()=>Fn(()=>import("./App-CVQAwCMi.js"),__vite__mapDeps([9,1,2,7,4,10])),pS={chat:cS,work:dS,code:uS};function kd(e){return pS[e]}function On(e){return d.lazy(kd(e))}function hS(e,t=kd){return t(e)()}function fR(e){return hS(e)}const mS=5e3,gS=On("chat"),fS=On("work"),wS=On("code");function kS(){if(typeof navigator>"u")return"en";const e=Array.isArray(navigator.languages)&&navigator.languages.length>0?navigator.languages:[navigator.language];for(const t of e){const a=ml(t);if(a)return a}return"en"}function bS(e){return e?.language?.uiLanguagePreference??"auto"}function yS(e){return e==="auto"?kS():Jp(e)}function vS(e){return!!(e.guideCat&&wa(e.guideCat.status)&&!e.productSurfaceFallbackActive)}function CS({surface:e,translate:t,onVisibilityChange:a}){const o=gl(e,Op(e),t);return d.useEffect(()=>(a(!0),()=>a(!1)),[a]),r.jsx("div",{className:"screen screenCentered",children:r.jsxs("div",{className:"loadingPanel",children:[r.jsx("p",{className:"eyebrow",children:t("appBrandName")}),r.jsx("h1",{children:t("appLoadingWithSurface",{surface:o})})]})})}function oo(e,t,a){const o=e==="work"?fS:e==="code"?wS:gS;return r.jsx(d.Suspense,{fallback:r.jsx(CS,{surface:e,translate:a,onVisibilityChange:t}),children:r.jsx(o,{})})}function SS(e){return typeof e!="object"||e===null?null:sa(e.platformShellSurface)}function LS(e){return e.loadStatus!=="ready"||!e.setupComplete||ga(e.pathname)||vl(e.pathname)?e.t("appTitle"):null}function RS(e,t){const a=Date.parse(e.metadata.generatedAt),o=Date.parse(t.metadata.generatedAt);return Number.isNaN(a)||Number.isNaN(o)?!0:o>=a}function PS(){const e=ve(),t=Ne(),[a,o]=d.useState({status:"loading"}),[n,s]=d.useState(!1),[i,c]=d.useState(0),u=bS(a.status==="ready"?a.envelope:null),[h,g]=d.useState(null),p=h??u,k=yS(p),f=d.useMemo(()=>Fe(k),[k]),w=d.useRef(null),b=d.useRef(e.pathname),[m,C]=d.useState("chat");d.useEffect(()=>{g(null)},[u]);const v=d.useCallback(async(B,q)=>{try{const F=await Ca({signal:B,fallbackMessageForStatus:Q=>f("appLoadStateFailedWithStatus",{status:Q})});B?.aborted||d.startTransition(()=>o({status:"ready",envelope:F}))}catch(F){if(B?.aborted)return;const Q=sS(F,f("appLoadErrorMessage"));if(Q.status==="unauthenticated"){d.startTransition(()=>o({status:"unauthenticated"}));return}if(Q.status==="repairRequired"){d.startTransition(()=>o({status:"repairRequired"}));return}q?.suppressErrors||o(Q)}},[f]);d.useEffect(()=>{const B=new AbortController;return v(B.signal),()=>B.abort()},[v]),d.useEffect(()=>{function B(){v(void 0,{suppressErrors:!0})}return window.addEventListener(Do,B),()=>{window.removeEventListener(Do,B)}},[v]);const y=ga(e.pathname),L=an({hydrate:a.status==="ready"}),N=d.useCallback(()=>{L.update({sidecarSeen:!0})},[L.update]);d.useEffect(()=>{const B=b.current;b.current=e.pathname,!(!(y&&!ga(B))||a.status!=="ready")&&v(void 0,{suppressErrors:!0})},[y,e.pathname,v,a.status]),d.useEffect(()=>{const B=window.history.state;Fb(e.pathname,B?.idx),Tb(e.pathname,B?.idx)},[e.pathname]),d.useEffect(()=>{if(a.status!=="ready"||!y||typeof window>"u"||typeof document>"u")return;let B=null;const q=()=>{if(document.visibilityState==="hidden"||B)return;const W=new AbortController;B=W,Ca({signal:W.signal,fallbackMessageForStatus:D=>f("appLoadStateFailedWithStatus",{status:D})}).then(D=>{W.signal.aborted||d.startTransition(()=>{o(_=>_.status!=="ready"||!RS(_.envelope,D)?_:{status:"ready",envelope:{..._.envelope,runtime:D.runtime,runtimeSetup:D.runtimeSetup,metadata:D.metadata,bootstrapAttemptId:D.bootstrapAttemptId}})})}).catch(()=>{}).finally(()=>{B===W&&(B=null)})},F=window.setInterval(q,mS),Q=()=>{q()},me=()=>{document.visibilityState==="visible"&&q()};return window.addEventListener("focus",Q),document.addEventListener("visibilitychange",me),()=>{B&&B.abort(),window.clearInterval(F),window.removeEventListener("focus",Q),document.removeEventListener("visibilitychange",me)}},[y,a.status,f]);const T=a.status==="ready"?a.envelope:null,j=!!T?.setupCompleteAt,A=T?.lastProductSurface??null,R=SS(e.state),P=w.current,I=bh(R,P,A,m);if(d.useEffect(()=>{const B=LS({loadStatus:a.status,pathname:e.pathname,setupComplete:j,t:f});B&&(document.title=B)},[e.pathname,j,a.status]),d.useEffect(()=>{a.status!=="ready"||!j||br().then(B=>wg(B)).catch(()=>{})},[j,a.status]),d.useEffect(()=>{if(a.status!=="ready")return;const B=a.envelope.lastProductSurface??null;B&&C(q=>q===B?q:B)},[a.status,a.status==="ready"?a.envelope.lastProductSurface:null]),d.useEffect(()=>{if(Pa(e.pathname)){C(B=>B===I?B:I);return}},[e.pathname,I]),d.useEffect(()=>{if(!j)return;const B=kh(e.pathname);if(!(e.pathname==="/"&&A!=="chat")&&!(e.pathname==="/"&&!A)&&!wh(e.pathname)){if(C(q=>q===B?q:B),w.current===null){w.current=B,B!==A&&(d.startTransition(()=>{o(q=>q.status==="ready"?{status:"ready",envelope:{...q.envelope,lastProductSurface:B}}:q)}),fetch("/api/platform/preferences",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({lastProductSurface:B})}).catch(()=>{}));return}B!==w.current&&(w.current=B,d.startTransition(()=>{o(q=>q.status==="ready"?{status:"ready",envelope:{...q.envelope,lastProductSurface:B}}:q)}),fetch("/api/platform/preferences",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({lastProductSurface:B})}).catch(()=>{}))}},[j,A,e.pathname]),a.status==="loading")return r.jsx(Ot,{languagePreference:p,locale:k,setLanguagePreference:g,children:r.jsx("div",{className:"screen screenCentered",children:r.jsxs("div",{className:"loadingPanel",children:[r.jsx("p",{className:"eyebrow",children:f("appBrandName")}),r.jsx("h1",{children:f("appLoadingEllipsis")})]})})});if(a.status==="error")return r.jsx(Ot,{languagePreference:p,locale:k,setLanguagePreference:g,children:r.jsx("div",{className:"screen screenCentered",children:r.jsxs("div",{className:"errorPanel",children:[r.jsx("p",{className:"eyebrow",children:f("appErrorEyebrow")}),r.jsx("h1",{children:f("appErrorTitle")}),r.jsx("p",{children:a.message})]})})});if(a.status==="unauthenticated")return r.jsx(Ot,{languagePreference:p,locale:k,setLanguagePreference:g,children:r.jsxs(na,{children:[r.jsx(Z,{path:Ni,element:r.jsx(Di,{onAuthenticated:B=>{const q=Mi(B);Wt.flushSync(()=>o({status:"ready",envelope:B})),t(q,{replace:!0})}})}),r.jsx(Z,{path:"*",element:r.jsx(gt,{to:Ni,replace:!0})})]})});if(a.status==="repairRequired")return r.jsx(Ot,{languagePreference:p,locale:k,setLanguagePreference:g,children:r.jsxs(na,{children:[r.jsx(Z,{path:ji,element:r.jsx(oS,{onRepaired:B=>{const q=Mi(B);Wt.flushSync(()=>o({status:"ready",envelope:B})),t(q,{replace:!0})}})}),r.jsx(Z,{path:"*",element:r.jsx(gt,{to:ji,replace:!0})})]})});const{envelope:O}=a;if(!O.setupCompleteAt)return r.jsx(Ot,{languagePreference:p,locale:k,setLanguagePreference:g,children:r.jsxs(na,{children:[r.jsx(Z,{path:"/setup",element:r.jsx(XC,{envelope:O,onComplete:B=>{Wt.flushSync(()=>{o({status:"ready",envelope:B}),B.guideCat&&wa(B.guideCat.status)&&L.hydrated&&!L.prefs.sidecarSeen&&c(q=>q+1)}),t("/lobby",{replace:!0})}})}),r.jsx(Z,{path:"*",element:r.jsx(gt,{to:"/setup",replace:!0})})]})});const $=!!O.lastProductSurface?pr(I):"/lobby",G={guideCat:O.guideCat,productSurfaceFallbackActive:n},ee=vS(G);return r.jsx(Ot,{languagePreference:p,locale:k,setLanguagePreference:g,children:r.jsxs($h,{guideCat:ee?G.guideCat:null,placement:L.prefs.placement,floatingAnchor:L.prefs.floatingAnchor,sidecarMode:L.prefs.sidecarMode,proactiveGreetingToken:i,onPersistSeen:N,onCommit:L.update,children:[ee?r.jsx($m,{guideCat:G.guideCat,ownerDisplayName:O.ownerDisplayName,unreadCount:0,onDismissed:()=>{v()}}):null,r.jsxs(na,{children:[r.jsx(Z,{path:"/lobby",element:r.jsx(jC,{envelope:O})}),r.jsxs(Z,{element:r.jsx(Eb,{envelope:O}),children:[r.jsx(Z,{path:"/entities",element:r.jsx(pb,{envelope:O})}),r.jsx(Z,{path:"/entities/cats",element:r.jsx(_k,{})}),r.jsx(Z,{path:"/entities/cats/:catId",element:r.jsx(fw,{})}),r.jsx(Z,{path:"/entities/clowders",element:r.jsx(fb,{envelope:O})}),r.jsx(Z,{path:"/entities/clowders/:clowderId",element:r.jsx(Xs,{envelope:O})}),r.jsx(Z,{path:"/entities/clowders/:clowderId/:tab",element:r.jsx(Xs,{envelope:O})}),r.jsx(Z,{path:"/entities/catteries",element:r.jsx(wb,{envelope:O})}),r.jsx(Z,{path:"/entities/catteries/:catteryId",element:r.jsx(Js,{envelope:O})}),r.jsx(Z,{path:"/entities/catteries/:catteryId/:tab",element:r.jsx(Js,{envelope:O})})]}),r.jsx(Z,{path:"/apps/:appId/*",element:r.jsx(Ym,{envelope:O})}),r.jsx(Z,{path:"/products",element:r.jsx(gt,{to:"/lobby",replace:!0})}),r.jsx(Z,{path:"/login",element:r.jsx(Di,{onAuthenticated:B=>{Wt.flushSync(()=>o({status:"ready",envelope:B})),t($,{replace:!0})}})}),r.jsx(Z,{element:r.jsx(Kb,{envelope:O}),children:r.jsx(Z,{path:"/settings/*",element:r.jsx(dC,{})})}),r.jsx(Z,{path:`${Er.chat.routePrefix}/*`,element:oo("chat",s,f)}),r.jsx(Z,{path:`${Er.work.routePrefix}/*`,element:oo("work",s,f)}),r.jsx(Z,{path:`${Er.code.routePrefix}/*`,element:oo("code",s,f)}),r.jsx(Z,{path:"/setup",element:r.jsx(gt,{to:$,replace:!0})}),r.jsx(Z,{path:"/",element:r.jsx(gt,{to:$,replace:!0})}),r.jsx(Z,{path:"*",element:r.jsx(gt,{to:$,replace:!0})})]})]})})}const AS=new Tp({defaultOptions:{queries:{staleTime:5e3,refetchOnWindowFocus:!0,refetchOnMount:"always",retry:1}}});xv();xh();yd.createRoot(document.getElementById("root")).render(r.jsx(Ii.StrictMode,{children:r.jsx(Dp,{client:AS,children:r.jsx(qu,{useTransitions:!1,children:r.jsx(PS,{})})})}));export{mf as $,jS as A,EL as B,_L as C,IL as D,Ds as E,OL as F,NL as G,un as H,de as I,Fe as J,Ne as K,Nt as L,lr as M,gt as N,zt as O,dh as P,Ch as Q,na as R,ur as S,TS as T,VL as U,zL as V,$L as W,qL as X,ys as Y,_t as Z,sf as _,Gf as a,fR as a$,AS as a0,mL as a1,uh as a2,vw as a3,NC as a4,rf as a5,hL as a6,wL as a7,pL as a8,gL as a9,HL as aA,We as aB,ve as aC,ru as aD,GL as aE,UL as aF,WL as aG,Pa as aH,Il as aI,on as aJ,rn as aK,sd as aL,Pt as aM,At as aN,xt as aO,Pn as aP,zw as aQ,qw as aR,$w as aS,Cw as aT,ar as aU,tr as aV,Jw as aW,tR as aX,aR as aY,eR as aZ,Cf as a_,Kl as aa,Nm as ab,xf as ac,LL as ad,rt as ae,hn as af,Bl as ag,nn as ah,Va as ai,Bt as aj,cn as ak,wr as al,cc as am,GS as an,PL as ao,It as ap,cC as aq,Xc as ar,Zc as as,Ql as at,BS as au,US as av,IS as aw,FS as ax,iR as ay,hR as az,fL as b,Ts as b$,$S as b0,nL as b1,zg as b2,oL as b3,sL as b4,Gg as b5,zS as b6,gR as b7,Sn as b8,rR as b9,pf as bA,CL as bB,vL as bC,ZL as bD,XL as bE,JL as bF,XS as bG,TL as bH,qS as bI,xL as bJ,AL as bK,kL as bL,cL as bM,nf as bN,lL as bO,rL as bP,iL as bQ,oR as bR,nR as bS,sR as bT,mt as bU,pr as bV,Et as bW,at as bX,JS as bY,Re as bZ,ah as b_,mR as ba,Pk as bb,ft as bc,Be as bd,YL as be,wk as bf,Am as bg,nd as bh,BL as bi,FL as bj,Yt as bk,Zm as bl,Ze as bm,KS as bn,OS as bo,Hg as bp,bL as bq,DL as br,Lk as bs,Kg as bt,VS as bu,YS as bv,et as bw,eL as bx,ZS as by,tL as bz,Z as c,RL as c0,WS as c1,HS as c2,aL as c3,QS as c4,_S as c5,Dc as c6,Wc as c7,gc as c8,ce as c9,jn as cA,sa as cB,dR as cC,Qr as cD,Nn as cE,td as cF,jt as ca,ES as cb,vn as cc,ba as cd,Rn as ce,uR as cf,cR as cg,lR as ch,yL as ci,SL as cj,As as ck,QL as cl,pR as cm,sg as cn,uL as co,dL as cp,al as cq,nu as cr,Bp as cs,MS as ct,rh as cu,Wt as cv,sb as cw,nb as cx,Fp as cy,vr as cz,fp as d,cp as e,DS as f,co as g,Ve as h,jL as i,ll as j,ip as k,lo as l,l as m,fe as n,nl as o,ML as p,Lp as q,Mp as r,KL as s,lp as t,U as u,pp as v,Me as w,ha as x,Pp as y,NS as z};
|
|
43
|
+
CATS_DESKTOP_APP_HOST=0.0.0.0`,p=window.catsDesktopHost;if(!p?.enableMobilePairing){await u(g,a("settingsDesktopMobilePairingCopyEnvValuesSuccess"));return}if(window.confirm(a("settingsDesktopMobilePairingConfirmRestart"))){n(!0);try{const f=await p.enableMobilePairing();t(a("settingsDesktopMobilePairingDesktopUpdateSuccess",{envPath:f.envPath})),p.relaunch&&await p.relaunch()}catch(f){t(id(f,a("settingsDesktopMobilePairingDesktopUpdateFailure"))),n(!1)}}}return r.jsx(ye,{className:"settingsMobilePairing",header:r.jsx(re,{title:a("settingsDesktopMobilePairingTitle"),description:a("settingsDesktopMobilePairingDescription"),status:r.jsx(Lt,{tone:c.tone,children:c.label})}),children:i.enabled?r.jsxs("div",{className:"settingsMobilePairingGrid",children:[r.jsxs("div",{className:"settingsMobilePairingDetails",children:[r.jsxs("dl",{className:"settingsMobilePairingFacts",children:[r.jsxs("div",{children:[r.jsx("dt",{children:a("settingsDesktopMobilePairingBindLabel")}),r.jsxs("dd",{children:[i.bindHost,":",i.bindPort]})]}),r.jsxs("div",{children:[r.jsx("dt",{children:a("settingsDesktopMobilePairingReachabilityLabel")}),r.jsx("dd",{children:ev(i,a)})]}),r.jsxs("div",{children:[r.jsx("dt",{children:a("settingsDesktopMobilePairingLanAddressLabel")}),r.jsx("dd",{children:i.selectedLanIp??a("settingsDesktopMobilePairingNoneLabel")})]})]}),i.noLanCandidateReason==="loopback_bound"&&i.bindOverrideEnv?r.jsx(le,{label:a("settingsDesktopMobilePairingAllowLanLabel"),description:a("settingsDesktopMobilePairingAllowLanDescription",{bindOverrideEnv:i.bindOverrideEnv}),control:r.jsx("button",{type:"button",className:"secondaryButton",disabled:o,onClick:()=>{h()},children:a(o?"settingsDesktopMobilePairingApplyingButton":"settingsDesktopMobilePairingApplyAndRestartButton")})}):null,i.noLanCandidateReason==="no_lan_candidate"?r.jsx("p",{className:"settingsMobilePairingNote",children:a("settingsDesktopMobilePairingNoLanAddressNote")}):null,i.noLanCandidateReason==="bind_host_not_lan_candidate"?r.jsx("p",{className:"settingsMobilePairingNote",children:a("settingsDesktopMobilePairingHostMismatchNote")}):null,i.diagnosticManifestUrl?r.jsx(le,{label:a("settingsDesktopMobilePairingDiagnosticLabel"),description:i.diagnosticManifestUrl,control:r.jsx("button",{type:"button",className:"secondaryButton",onClick:()=>{u(i.diagnosticManifestUrl??"",a("settingsDesktopMobilePairingDiagnosticCopiedMessage"))},children:a("settingsDesktopMobilePairingDiagnosticCopyButton")}),layout:"stack"}):null,i.pairingUrlStatus==="ready"&&i.pairingUrl?r.jsx(le,{label:a("settingsDesktopMobilePairingExpoUrlLabel"),description:i.pairingUrl,control:r.jsx("button",{type:"button",className:"secondaryButton",onClick:()=>{u(i.pairingUrl??"",a("settingsDesktopMobilePairingExpoUrlCopiedMessage"))},children:a("settingsDesktopMobilePairingCopyUrlButton")}),layout:"stack"}):null]}),r.jsx("div",{className:"settingsMobilePairingQr","data-state":i.pairingUrlStatus,children:i.pairingUrlStatus==="ready"&&i.pairingUrl?r.jsxs("div",{className:"settingsMobilePairingQrContent",children:[r.jsx(av,{t:a,url:i.pairingUrl}),r.jsx("code",{className:"settingsMobilePairingQrUrl",children:i.pairingUrl})]}):r.jsx("span",{children:a("settingsDesktopMobilePairingNoPairingUrlStatus")})})]}):r.jsx(le,{label:a("settingsDesktopMobilePairingEnableLabel"),description:a("settingsDesktopMobilePairingEnableDescription"),control:r.jsx("button",{type:"button",className:"secondaryButton",disabled:o,onClick:()=>{h()},children:a(o?"settingsDesktopMobilePairingApplyingButton":"settingsDesktopMobilePairingEnableButton")}),layout:"stack"})})}function ov({payload:e,onPayloadUpdate:t,showToast:a}){const{t:o}=U(),[n,s]=d.useState(!1),i=e.desktop??Mo();async function c(u){const h=e.desktop??Mo(),g=o("settingsConversationPreferenceUpdateFailure");t({...e,desktop:u}),s(!0);try{const p=window.catsDesktopHost;let k=u;if(p?.updateDesktopPreferences)k=await p.updateDesktopPreferences(u);else{const f=await fetch("/api/platform/preferences",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(u)});if(!f.ok)throw new Error(g);const w=await f.json();k={...i,startAtLogin:w.startAtLogin!==!1,openWindowOnStartup:w.openWindowOnStartup===!0,systemTrayEnabled:w.systemTrayEnabled!==!1}}t({...e,desktop:k}),lt()}catch(p){t({...e,desktop:h}),a(id(p,g))}finally{s(!1)}}return r.jsxs(ye,{header:r.jsx(re,{title:o("settingsDesktopStartupTitle"),description:o("settingsDesktopStartupDescription")}),children:[r.jsx(le,{asChoice:!0,label:o("settingsDesktopStartupSignInLabel"),description:o("settingsDesktopStartupSignInDescription"),control:r.jsx("input",{type:"checkbox",checked:i.startAtLogin,disabled:n,onChange:()=>{c({...i,startAtLogin:!i.startAtLogin})}})}),r.jsx(le,{asChoice:!0,label:o("settingsDesktopStartupTrayLabel"),description:o("settingsDesktopStartupTrayDescription"),control:r.jsx("input",{type:"checkbox",checked:i.systemTrayEnabled,disabled:n,onChange:()=>{c({...i,systemTrayEnabled:!i.systemTrayEnabled})}})}),r.jsx(le,{asChoice:!0,label:o("settingsDesktopStartupOpenWindowLabel"),description:o("settingsDesktopStartupOpenWindowDescription"),control:r.jsx("input",{type:"checkbox",checked:i.openWindowOnStartup,disabled:n,onChange:()=>{c({...i,openWindowOnStartup:!i.openWindowOnStartup})}})})]})}const hi={unavailable:"settingsDesktopUpdatesStatusUnavailable",idle:"settingsDesktopUpdatesStatusIdle",checking:"settingsDesktopUpdatesStatusChecking",up_to_date:"settingsDesktopUpdatesStatusUpToDate",update_available:"settingsDesktopUpdatesStatusAvailable",downloading:"settingsDesktopUpdatesStatusDownloading",downloaded:"settingsDesktopUpdatesStatusDownloaded",installing:"settingsDesktopUpdatesStatusInstalling",failed:"settingsDesktopUpdatesStatusFailed"},nv={unavailable:"muted",idle:"muted",checking:"muted",up_to_date:"ready",update_available:"warm",downloading:"muted",downloaded:"ready",installing:"muted",failed:"warm"},mi={offline:"settingsDesktopUpdatesErrorOffline",timeout:"settingsDesktopUpdatesErrorTimeout",provider_rejected:"settingsDesktopUpdatesErrorProviderRejected",metadata_invalid:"settingsDesktopUpdatesErrorMetadataInvalid",checksum_mismatch:"settingsDesktopUpdatesErrorChecksumMismatch",signature_rejected:"settingsDesktopUpdatesErrorSignatureRejected",unsupported_package:"settingsDesktopUpdatesErrorUnsupportedPackage",download_cancelled:"settingsDesktopUpdatesErrorDownloadCancelled",install_handoff_failed:"settingsDesktopUpdatesErrorInstallHandoffFailed",unknown:"settingsDesktopUpdatesErrorUnknown"},sv={none:null,check:"settingsDesktopUpdatesActionCheck",download:"settingsDesktopUpdatesActionDownload",restart_install:"settingsDesktopUpdatesActionRestartInstall"},iv={checking:"settingsDesktopUpdatesActionChecking",downloading:"settingsDesktopUpdatesActionDownloading",installing:"settingsDesktopUpdatesActionInstalling"};function lv(e){return hi[e]??hi.unavailable}function cv(e){return nv[e]??"muted"}function dv(e){return mi[e]??mi.unknown}function uv(e){const t=iv[e.status];if(t)return{messageKey:t,action:"none",disabled:!0};const a=sv[e.nextAction];return a?{messageKey:a,action:e.nextAction,disabled:!1}:null}function pv(e){if(e.status!=="downloading"||e.progress===null)return null;const t=Math.round(e.progress.percent);return Math.min(100,Math.max(0,t))}function hv(e,t){return e.status==="downloaded"&&t.toLowerCase().startsWith("win")}function mv(e){return e.capability.distribution==="preview_packaged"}function gv({showToast:e,platform:t=typeof navigator>"u"?"":navigator.platform}){const{t:a}=U(),[o,n]=d.useState(null),[s,i]=d.useState(!1);d.useEffect(()=>{const p=mt();if(!p?.getUpdateSnapshot)return;let k=!0;p.getUpdateSnapshot().then(w=>{k&&n(w)}).catch(()=>{});const f=p.onUpdateSnapshot?.(w=>{k&&n(w)});return()=>{k=!1,f?.()}},[]);const c=d.useCallback(async p=>{const k=mt();if(k){i(!0);try{if(p==="restart_install"){await k.restartAndInstall?.();return}const f=p==="check"?await k.checkForUpdates?.():await k.downloadUpdate?.();if(!f)return;n(f),p==="check"&&f.status==="up_to_date"&&e(a("settingsDesktopUpdatesToastUpToDate")),f.error&&e(a(dv(f.error.code)))}finally{i(!1)}}},[e,a]);if(o===null)return null;const{capability:u}=o,h=uv(o),g=pv(o);return r.jsxs(ye,{className:"settingsDesktopUpdates",header:r.jsx(re,{title:a("settingsDesktopUpdatesTitle"),description:a("settingsDesktopUpdatesDescription"),status:u.canCheck?r.jsx(Lt,{tone:cv(o.status),children:a(lv(o.status))}):void 0}),children:[r.jsx(le,{label:a("settingsDesktopUpdatesCurrentVersionLabel"),control:r.jsx("span",{className:"settingsFactValue",children:o.currentVersion})}),r.jsx(le,{label:a("settingsDesktopUpdatesChannelLabel"),control:r.jsx("span",{className:"settingsFactValue",children:u.channel})}),mv(o)&&r.jsx(le,{layout:"stack",label:a("settingsDesktopUpdatesPreviewNotice"),control:null}),u.canCheck&&r.jsxs(r.Fragment,{children:[r.jsx(le,{label:a("settingsDesktopUpdatesLastCheckedLabel"),control:r.jsx("span",{className:"settingsFactValue",children:o.lastCheckedAt?new Date(o.lastCheckedAt).toLocaleString():a("settingsDesktopUpdatesLastCheckedNever")})}),o.availableVersion!==null&&r.jsx(le,{label:a("settingsDesktopUpdatesAvailableVersionLabel"),description:o.releaseSummary??void 0,control:r.jsx("span",{className:"settingsFactValue",children:o.availableVersion})}),g!==null&&r.jsx(le,{label:a("settingsDesktopUpdatesStatusDownloading"),control:r.jsxs("progress",{className:"settingsUpdateProgress",max:100,value:g,children:[g,"%"]})}),hv(o,t)&&r.jsx(le,{layout:"stack",label:a("settingsDesktopUpdatesWindowsInstallerNotice"),control:null}),h!==null&&r.jsx(le,{label:"",control:r.jsx("button",{type:"button",className:"settingsPrimaryAction",disabled:h.disabled||s,onClick:()=>{h.action!=="none"&&c(h.action)},children:a(h.messageKey)})})]})]})}function fv({payload:e,onPayloadUpdate:t}){const{toasts:a,showToast:o}=at();return r.jsxs(r.Fragment,{children:[r.jsx(gv,{showToast:o}),r.jsx(rv,{payload:e,showToast:o}),r.jsx(ov,{payload:e,onPayloadUpdate:t,showToast:o}),r.jsx(rt,{toasts:a})]})}const cd=["en","zh-TW","zh-CN","ja","ko","fr","de","es","pt-BR","it","nl","pl","tr","id","vi","th","hi","ar"];function gi(e){return e==="unspecified"||cd.includes(e)}const wv=new Set(["POST","PUT","PATCH","DELETE"]),Eo="x-cats-csrf-token";let Cr=null,oa=null,Ye=null,fi=!1;function kv(e){const t=e?.trim();Cr=t||null}function bv(){Cr=null}async function wi(){if(!Ye)return null;if(oa)return oa;oa=(async()=>{try{const t=await Ye("/api/auth/status",{headers:{Accept:"application/json"},credentials:"same-origin"});if(!t.ok)return null;const o=(await t.json())?.csrfToken?.trim();return o||null}catch{return null}finally{oa=null}})();const e=await oa;return e&&(Cr=e),e}function yv(e,t){return t?.method?t.method.toUpperCase():e instanceof Request?e.method.toUpperCase():"GET"}function vv(e){return typeof e=="string"?e:e instanceof URL?e.href:e.url}function Cv(e){try{const t=new URL(e,window.location.origin);return t.origin===window.location.origin&&t.pathname.startsWith("/api/")}catch{return!1}}function ki(e){if(!e)return[];if(e instanceof Headers){const t=[];return e.forEach((a,o)=>{t.push([o,a])}),t}return Array.isArray(e)?e.map(([t,a])=>[t,a]):Object.entries(e)}function Sv(e,t){return e instanceof Request?ki(e.headers):ki(t?.headers)}function Lv(e,t){const a=t.toLowerCase();return e.some(([o])=>o.toLowerCase()===a)}function Rv(e){return e.some(([t,a])=>t.toLowerCase()==="authorization"&&/^bearer\s/i.test(a))}function bi(e,t,a){if(e instanceof Request){const n=new Headers(e.headers);return n.set(Eo,a),{input:new Request(e,{headers:n}),init:t}}const o=new Headers(t?.headers);return o.set(Eo,a),{input:e,init:{...t,headers:o}}}async function Pv(e){if(e.status!==403)return!1;try{return(await e.clone().json())?.error?.code==="E_CSRF_MISMATCH"}catch{return!1}}async function Av(e,t){if(!Ye)throw new Error("csrfAwareFetch invoked before installation");const a=yv(e,t);if(!wv.has(a))return Ye(e,t);const o=vv(e);if(!Cv(o))return Ye(e,t);const n=Sv(e,t);if(Lv(n,Eo)||Rv(n))return Ye(e,t);let s=Cr??await wi();if(!s)return Ye(e,t);const i=bi(e,t,s),c=await Ye(i.input,i.init);if(!await Pv(c)||(bv(),s=await wi(),!s))return c;const u=bi(e,t,s);return Ye(u.input,u.init)}function xv(){fi||typeof window>"u"||(fi=!0,Ye=window.fetch.bind(window),window.fetch=((e,t)=>Av(e,t)))}class Bn extends Error{constructor(t,a,o){super(t),this.status=a,this.code=o,this.name="PlatformAuthApiError"}}function Tv(e,t){return e instanceof Bn&&e.code===t}async function Dv(e,t){try{const a=await e.json(),o=Bv(a);if(typeof o?.code=="string"){const n=o.code,s=t.errorMessagesByCode?.[n];return s?{message:s,code:n}:{message:t.fallbackMessageForStatus(e.status),code:n}}if(typeof o?.message=="string")return{message:o.message,code:null}}catch{}return{message:t.fallbackMessageForStatus(e.status),code:null}}async function Io(e){const t=await fetch("/api/auth/status",{headers:{Accept:"application/json"},signal:e.signal});return Na(t,e)}async function Nv(e,t){const a=await fetch("/api/auth/login",{method:"POST",headers:{Accept:"application/json","content-type":"application/json"},body:JSON.stringify(e),signal:t.signal});return Na(a,t)}async function jv(e,t){const a=await fetch("/api/auth/google/login",{method:"POST",headers:{Accept:"application/json","content-type":"application/json"},body:JSON.stringify(e),signal:t.signal});return Na(a,t)}async function Mv(e,t){const a=await fetch("/api/auth/repair/first-admin",{method:"POST",headers:{Accept:"application/json","content-type":"application/json"},body:JSON.stringify(e),signal:t.signal});return Na(a,t)}async function Ev(e,t){const a=await fetch("/api/auth/logout",{method:"POST",headers:{Accept:"application/json","content-type":"application/json","x-cats-csrf-token":e},body:JSON.stringify({}),signal:t.signal});return Na(a,t)}async function Iv(e,t){const a=await Io(t),o=yi(a);try{return await e(o)}catch(s){if(!Tv(s,"E_CSRF_MISMATCH"))throw s}const n=await Io(t);return e(yi(n))}async function Na(e,t){if(!e.ok){const o=await Dv(e,t);throw new Bn(o.message,e.status,o.code)}const a=await e.json();return kv(a.csrfToken),a}function yi(e){const t=e.csrfToken?.trim();if(!t)throw new Bn("Authenticated session did not return a Cats CSRF token.",403,"E_CSRF_MISMATCH");return t}function Bv(e){if(typeof e!="object"||e===null||!("error"in e))return null;const t=e.error;return typeof t=="object"&&t!==null?t:null}const Xe={unauthenticated:"E_UNAUTHENTICATED",forbidden:"E_FORBIDDEN",csrfMismatch:"E_CSRF_MISMATCH"};function Fv(e){return e==="auto"||e==="en"||e==="zh-TW"}function ao(e,t){return{assistantResponseLanguage:e?.assistantResponseLanguage??"unspecified",uiLanguagePreference:e?.uiLanguagePreference??t}}function Ov(e,t){const a=e==="zh-TW"?"zh-Hant":e==="zh-CN"?"zh-Hans":e;try{return new Intl.DisplayNames([t],{type:"language"}).of(a)??e}catch{return e}}function Wv({payload:e,onPayloadUpdate:t}){const a=Ne(),{languagePreference:o,locale:n,setLanguagePreference:s,t:i}=U(),[c,u]=d.useState(!1),[h,g]=d.useState(!1),[p,k]=d.useState(!1),[f,w]=d.useState(!1),[b,m]=d.useState(!1),[C,v]=d.useState(e.ownerDisplayName),[y,L]=d.useState(!1),N=d.useRef(!1),T=an(),{toasts:j,showToast:A}=at();d.useEffect(()=>{v(e.ownerDisplayName)},[e.ownerDisplayName]);async function R(D,_){try{if(!(await fetch("/api/core/owner-profile",{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({avatarUrl:D})})).ok)throw new Error(_);t({...e,ownerAvatarUrl:D}),lt()}catch(J){A(J instanceof Error?J.message:_)}}async function P(){if(N.current){N.current=!1;return}const D=C.trim();if(!D){v(e.ownerDisplayName);return}if(D===e.ownerDisplayName){v(e.ownerDisplayName);return}L(!0);try{if(!(await fetch("/api/core/owner-profile",{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({displayName:D})})).ok)throw new Error(i("settingsGeneralUpdateNameError"));t({...e,ownerDisplayName:D}),lt()}catch(_){A(_ instanceof Error?_.message:i("settingsGeneralUpdateNameError"))}finally{L(!1)}}async function I(D,_){const J=e.lobby;t({...e,lobby:{...e.lobby,animationMode:D}}),g(!0);try{const X=await fetch("/api/platform/preferences",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({lobbyAnimationMode:D})});if(!X.ok)throw new Error(_);const oe=await X.json();t({...e,lobby:{...e.lobby,animationMode:oe.lobbyAnimationMode??D}}),lt()}catch(X){t({...e,lobby:J}),A(X instanceof Error?X.message:_)}finally{g(!1)}}async function O(D){if(D===o)return;const _=o,J=ao(e.language,_);s(D),t({...e,language:{...J,uiLanguagePreference:D}}),k(!0);try{const X=await fetch("/api/platform/preferences",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({uiLanguagePreference:D})});if(!X.ok)throw new Error(i("settingsGeneralUpdateLanguageError"));const oe=await X.json(),we=Fv(oe.uiLanguagePreference)?oe.uiLanguagePreference:D;s(we),t({...e,language:{...J,uiLanguagePreference:we}}),lt()}catch(X){s(_),t({...e,language:J}),A(X instanceof Error?X.message:i("settingsGeneralUpdateLanguageError"))}finally{k(!1)}}async function E(D){const _=ao(e.language,o);if(D!==_.assistantResponseLanguage){t({...e,language:{..._,assistantResponseLanguage:D}}),w(!0);try{const J=await fetch("/api/platform/preferences",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({assistantResponseLanguage:D})});if(!J.ok)throw new Error(i("settingsGeneralUpdateAssistantLanguageError"));const X=await J.json(),oe=gi(X.assistantResponseLanguage)?X.assistantResponseLanguage:D;t({...e,language:{..._,assistantResponseLanguage:oe}}),lt()}catch(J){t({...e,language:_}),A(J instanceof Error?J.message:i("settingsGeneralUpdateAssistantLanguageError"))}finally{w(!1)}}}async function $(D){try{T.update({sidecarMode:D})}catch(_){A(_ instanceof Error?_.message:i("settingsGeneralUpdateGuideCatModeError"))}}async function G(){m(!0);try{const D={fallbackMessageForStatus:_=>i("settingsGeneralSignOutFailedWithStatus",{status:_}),errorMessagesByCode:{[Xe.csrfMismatch]:i("settingsGeneralSignOutCsrfError"),[Xe.forbidden]:i("settingsGeneralSignOutForbiddenError"),[Xe.unauthenticated]:i("settingsGeneralSignOutUnauthenticated")}};await Iv(_=>Ev(_,D),D),a("/login",{replace:!0})}catch(D){A(D instanceof Error?D.message:i("settingsGeneralSignOutFailed"))}finally{m(!1)}}const ee=e.ownerAvatarUrl,B=fe(C||e.ownerDisplayName),q=ct(),F=wa(e.guideCat?.status),Q=e.lobby??{animationMode:"reduced"},me=ao(e.language,o).assistantResponseLanguage,W=d.useMemo(()=>cd.map(D=>({code:D,label:Ov(D,n)})),[n]);return r.jsxs(r.Fragment,{children:[r.jsx(ye,{header:r.jsx(re,{title:i("settingsGeneralProfileTitle"),description:i("settingsGeneralProfileDescription")}),children:r.jsxs("div",{className:"settings-sub-card",children:[r.jsxs("div",{className:"fieldLabel",children:[r.jsx("span",{children:i("settingsGeneralAvatarLabel")}),r.jsxs("div",{className:"settingsOwnerAvatarDock",children:[r.jsx("button",{type:"button",className:"settingsOwnerAvatar",style:ee?{backgroundImage:`url(${ee})`,backgroundSize:"cover",backgroundPosition:"center",color:"transparent"}:void 0,onClick:()=>u(!0),"aria-label":i(ee?"settingsGeneralAvatarChangeLabel":"settingsGeneralAvatarUploadLabel"),"data-tooltip":i(ee?"settingsGeneralAvatarChangeLabel":"settingsGeneralAvatarUploadLabel"),children:ee?"":B}),r.jsx("span",{className:"settingsOwnerAvatarCamera","aria-hidden":"true",children:r.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"}),r.jsx("circle",{cx:"12",cy:"13",r:"4"})]})}),ee?r.jsx("button",{type:"button",className:"settingsOwnerAvatarRemove",onClick:D=>{D.stopPropagation(),R(null,i("settingsGeneralRemoveAvatarError"))},"aria-label":i("settingsGeneralAvatarRemoveLabel"),"data-tooltip":i("settingsGeneralAvatarRemoveLabel"),children:r.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}):null]})]}),r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:i("settingsGeneralNameLabel")}),r.jsx("input",{className:"textInput",value:C,onChange:D=>v(D.target.value),onBlur:()=>{P()},onKeyDown:D=>{D.key==="Enter"?(D.preventDefault(),P()):D.key==="Escape"&&(D.preventDefault(),N.current=!0,v(e.ownerDisplayName),D.currentTarget.blur())},disabled:y,"aria-busy":y})]})]})}),r.jsx(ye,{header:r.jsx(re,{title:i("settingsGeneralAccountTitle"),description:i("settingsGeneralAccountDescription")}),children:r.jsx("div",{className:"setupActionGroup",children:r.jsx("button",{type:"button",className:"secondaryButton",disabled:b,onClick:()=>{G()},children:i(b?"settingsGeneralSigningOutButton":"settingsGeneralSignOutButton")})})}),r.jsxs(ye,{header:r.jsx(re,{title:i("settingsGeneralLanguageTitle"),description:i("settingsGeneralLanguageDescription")}),children:[r.jsx(le,{label:i("settingsGeneralLanguagePreferenceLabel"),description:i("settingsGeneralLanguagePreferenceDescription"),layout:"stack",control:r.jsxs("select",{className:"textInput",value:o,disabled:p,onChange:D=>{O(D.target.value)},"aria-label":i("settingsGeneralLanguageSelectAriaLabel"),children:[r.jsx("option",{value:"auto",children:i("settingsGeneralLanguageAutoOption")}),r.jsx("option",{value:"en",children:i("settingsGeneralLanguageEnglishOption")}),r.jsx("option",{value:"zh-TW",children:i("settingsGeneralLanguageTraditionalChineseOption")})]})}),r.jsx(le,{label:i("settingsGeneralAssistantLanguagePreferenceLabel"),description:i("settingsGeneralAssistantLanguagePreferenceDescription"),layout:"stack",control:r.jsxs("select",{className:"textInput",value:me,disabled:f,onChange:D=>{const _=D.target.value;gi(_)&&E(_)},"aria-label":i("settingsGeneralAssistantLanguageSelectAriaLabel"),children:[r.jsx("option",{value:"unspecified",children:i("settingsGeneralAssistantLanguageUnspecifiedOption")}),W.map(D=>r.jsx("option",{value:D.code,children:D.label},D.code))]})})]}),r.jsxs(ye,{header:r.jsx(re,{title:i("settingsGeneralLobbyMotionTitle"),description:i("settingsGeneralLobbyMotionDescription")}),children:[r.jsx(le,{asChoice:!0,label:i("settingsGeneralLobbyMotionOffLabel"),description:i("settingsGeneralLobbyMotionOffDescription"),control:r.jsx("input",{type:"radio",name:"lobby-animation-mode",checked:Q.animationMode==="off",disabled:h,onChange:()=>{I("off",i("settingsGeneralUpdateLobbyAnimationError"))}})}),r.jsx(le,{asChoice:!0,label:i("settingsGeneralLobbyMotionReducedLabel"),description:i("settingsGeneralLobbyMotionReducedDescription"),control:r.jsx("input",{type:"radio",name:"lobby-animation-mode",checked:Q.animationMode==="reduced",disabled:h,onChange:()=>{I("reduced",i("settingsGeneralUpdateLobbyAnimationError"))}})}),r.jsx(le,{asChoice:!0,label:i("settingsGeneralLobbyMotionFullLabel"),description:i("settingsGeneralLobbyMotionFullDescription"),control:r.jsx("input",{type:"radio",name:"lobby-animation-mode",checked:Q.animationMode==="full",disabled:h,onChange:()=>{I("full",i("settingsGeneralUpdateLobbyAnimationError"))}})})]}),e.guideCat?r.jsx(ye,{header:r.jsx(re,{title:i("settingsGeneralGuideCatAssistTitle"),description:F?i("settingsGeneralGuideCatAssistEnabledDescription",{guideCatName:q}):i("settingsGeneralGuideCatAssistDisabledDescription",{guideCatName:q})}),children:F?r.jsxs(r.Fragment,{children:[r.jsx(le,{asChoice:!0,label:i("settingsGeneralGuideCatAutoLabel"),description:i("settingsGeneralGuideCatAutoDescription"),control:r.jsx("input",{type:"radio",name:"guide-cat-sidecar-mode",checked:T.prefs.sidecarMode==="auto",onChange:()=>{$("auto")}})}),r.jsx(le,{asChoice:!0,label:i("settingsGeneralGuideCatSidePanelLabel"),description:i("settingsGeneralGuideCatSidePanelDescription"),control:r.jsx("input",{type:"radio",name:"guide-cat-sidecar-mode",checked:T.prefs.sidecarMode==="drawer",onChange:()=>{$("drawer")}})}),r.jsx(le,{asChoice:!0,label:i("settingsGeneralGuideCatBubbleLabel"),description:i("settingsGeneralGuideCatBubbleDescription"),control:r.jsx("input",{type:"radio",name:"guide-cat-sidecar-mode",checked:T.prefs.sidecarMode==="bubble",onChange:()=>{$("bubble")}})})]}):r.jsx("div",{className:"setupActionGroup",children:r.jsx("button",{type:"button",className:"secondaryButton",onClick:()=>a("/settings/assistants"),children:i("settingsGeneralOpenAssistantsButton")})})}):null,c?r.jsx(Qt,{onSave:D=>{u(!1),R(D,i("settingsGeneralSaveAvatarError"))},onClose:()=>u(!1),initialDataUrl:ee??null}):null,r.jsx(rt,{toasts:j})]})}function Uv(){const e=Ne(),{t}=U();return r.jsx(ye,{header:r.jsx(re,{title:t(l.settingsRouteTitleNotFound),description:t(l.settingsRouteNotFoundDescription)}),children:r.jsx("div",{className:"settingsActionRow",children:r.jsx("button",{type:"button",className:"secondaryButton",onClick:()=>e("/settings/general"),children:t(l.settingsRouteNotFoundOpenGeneral)})})})}let dd={inflight:!1};const Bo=new Set,Fo=new Set;let Ua=null;function vi(e){dd=e;for(const t of Bo)t()}function Ci(e){for(const t of Fo)t(e)}function Hv(e){return Bo.add(e),()=>{Bo.delete(e)}}function _v(e){return Fo.add(e),()=>{Fo.delete(e)}}function Si(){return dd}function ud(){if(Ua)return Ua;vi({inflight:!0});const e=Eg().then(t=>(Ci({type:"success",value:t}),t),t=>{throw Ci({type:"error",error:t}),t}).finally(()=>{Ua=null,vi({inflight:!1})});return Ua=e,e}const pd={check:"check",install:"apply",upgrade:"upgrade",repair:"force",uninstall:"uninstall"},yt=Fe("en");function Li(e,t){switch(t){case"check":return e.supportsCheckOnly;case"install":return e.supportsApply;case"upgrade":return e.supportsUpgrade;case"repair":return e.supportsForce;case"uninstall":return e.supportsUninstall}}function Gv(e,t=yt){const a=["check","install","upgrade","repair","uninstall"],o=ja(e,t);return a.map(n=>({action:n,label:or(n,t),available:e.supported&&e.available&&Li(e,n),reason:e.supported?e.available?Li(e,n)?null:t(l.settingsRuntimeHelperUnsupportedActionReason,{helperLabel:o,actionLabel:or(n,t).toLowerCase()}):t(l.settingsRuntimeHelperUnavailableReason,{helperLabel:o}):qv(e.unsupportedReason,t)}))}function or(e,t=yt){switch(e){case"check":return t(l.settingsRuntimeActionCheckLabel);case"install":return t(l.settingsRuntimeActionInstallLabel);case"upgrade":return t(l.settingsRuntimeActionUpgradeLabel);case"repair":return t(l.settingsRuntimeActionRepairLabel);case"uninstall":return t(l.settingsRuntimeActionUninstallLabel)}}function ja(e,t=yt){return Ie(e.label,t)}function Kv(e,t){switch(e){case"Windows, macOS, or Linux hosts":return t(l.settingsRuntimePlatformSupportAllDesktop);case"Windows hosts":return t(l.settingsRuntimePlatformSupportWindows);case"Windows hosts with WSL support":return t(l.settingsRuntimePlatformSupportWindowsWsl);case"macOS hosts":return t(l.settingsRuntimePlatformSupportMacos);case"Linux hosts":return t(l.settingsRuntimePlatformSupportLinux);default:return e}}function qv(e,t=yt){const a=String(e??"").trim();if(!a)return null;const o=a.match(/^(.+) is currently only supported on (.+)\.$/u);return o?t(l.settingsRuntimeHelperUnsupportedPlatformReason,{helperLabel:Ie(o[1],t),platformSupport:Kv(o[2],t)}):a}function nr(e,t=yt){switch(e){case"auth_required":return t(l.settingsRuntimeLifecycleStatusAuthRequired);case"blocked":return t(l.settingsRuntimeLifecycleStatusBlocked);case"changes_required":return t(l.settingsRuntimeLifecycleStatusChangesRequired);case"failed":return t(l.settingsRuntimeLifecycleStatusFailed);case"not_installed":return t(l.settingsRuntimeLifecycleStatusNotInstalled);case"preview":return t(l.settingsRuntimeLifecycleStatusPreview);case"ready":return t(l.settingsRuntimeLifecycleStatusReady);case"restart_required":return t(l.settingsRuntimeLifecycleStatusRestartRequired);case"uninstalled":return t(l.settingsRuntimeLifecycleStatusUninstalled);default:return String(e??"")}}function ro(e,t){switch(e){case"apply":return t(l.settingsRuntimeLifecycleModeApply);case"check":return t(l.settingsRuntimeLifecycleModeCheck);case"force":return t(l.settingsRuntimeLifecycleModeForce);case"uninstall":return t(l.settingsRuntimeLifecycleModeUninstall);case"upgrade":return t(l.settingsRuntimeLifecycleModeUpgrade);default:return String(e??"")}}function Ri(e,t=yt){const a=String(e??"").trim();let o;switch(a){case"Launch the target WSL distro once to finish first-user setup, then rerun the packaged setup check.":return t(l.settingsRuntimeLifecycleDetailLaunchWslFirstBoot);case"Start Docker Desktop and wait for the engine to become ready, then rerun the packaged setup check.":return t(l.settingsRuntimeLifecycleDetailStartDockerWarmUp)}return o=a.match(/^Run (.+) to install the missing host substrate flagged by the readiness audit\.$/u),o?t(l.settingsRuntimeLifecycleDetailRunMissingHostSubstrate,{helperLabel:Ie(o[1],t)}):(o=a.match(/^Restart the host or Windows session, then rerun (.+) in (.+) mode\.$/u),o?t(l.settingsRuntimeLifecycleDetailRestartThenRerunMode,{helperLabel:Ie(o[1],t),mode:ro(o[2],t)}):(o=a.match(/^Restart Windows or the current session, then rerun (.+)\.$/u),o?t(l.settingsRuntimeLifecycleDetailRestartThenRerun,{helperLabel:Ie(o[1],t)}):(o=a.match(/^Relaunch Cats Desktop Host, then rerun (.+) to verify the updated packaged setup state\.$/u),o?t(l.settingsRuntimeLifecycleDetailRelaunchThenVerify,{helperLabel:Ie(o[1],t)}):(o=a.match(/^(.+) requires an elevated host step before it can continue\.$/u),o?t(l.settingsRuntimeLifecycleDetailElevationRequired,{helperLabel:Ie(o[1],t)}):(o=a.match(/^Complete the required sign-in flow, then rerun (.+) in (.+) mode\.$/u),o?t(l.settingsRuntimeLifecycleDetailAuthThenRerunMode,{helperLabel:Ie(o[1],t),mode:ro(o[2],t)}):(o=a.match(/^Retry (.+) after addressing the last failure\.$/u),o?t(l.settingsRuntimeLifecycleDetailRetryAfterFailure,{helperLabel:Ie(o[1],t)}):(o=a.match(/^Run (.+) to install the missing packaged setup requirement\.$/u),o?t(l.settingsRuntimeLifecycleDetailRunMissingRequirement,{helperLabel:Ie(o[1],t)}):(o=a.match(/^Finish the manual follow-through for (.+), then rerun a verification step\.$/u),o?t(l.settingsRuntimeLifecycleDetailFinishManualFollowThrough,{helperLabel:Ie(o[1],t)}):(o=a.match(/^Run (.+) again to apply the remaining packaged setup changes\.$/u),o?t(l.settingsRuntimeLifecycleDetailRunApplyRemainingChanges,{helperLabel:Ie(o[1],t)}):(o=a.match(/^Rerun (.+) in check mode if you want to verify the packaged setup state again\.$/u),o?t(l.settingsRuntimeLifecycleDetailRerunCheckToVerify,{helperLabel:Ie(o[1],t)}):(o=a.match(/^(.+) (check|apply|upgrade|force|uninstall) finished with (.+)\.$/u),o?t(l.settingsRuntimeLifecycleDetailFinishedWithStatus,{helperLabel:Ie(o[1],t),mode:ro(o[2],t),status:nr(o[3],t)||o[3]}):nr(a,t)||a)))))))))))}function Ie(e,t){if(e==="Windows PowerShell + PATH readiness helper")return t(l.settingsRuntimeHelperLabelWindowsCliReadiness);if(e==="Windows Microsoft Visual C++ 2015-2022 Redistributable (x64)")return t(l.settingsRuntimeHelperLabelWindowsVcRedist);let a=e.match(/^(Windows|Linux|macOS) Node\.js LTS host installer$/u);return a?t(l.settingsRuntimeHelperLabelNodeHostInstaller,{platform:a[1]}):(a=e.match(/^(Windows|Linux|macOS) GitHub CLI host installer$/u),a?t(l.settingsRuntimeHelperLabelGithubCliHostInstaller,{platform:a[1]}):(a=e.match(/^(Windows|Linux|macOS) npm prefix and PATH prerequisite helper$/u),a?t(l.settingsRuntimeHelperLabelNpmPrefixHelper,{platform:a[1]}):(a=e.match(/^(Windows|Linux|macOS) setup readiness audit$/u),a?t(l.settingsRuntimeHelperLabelSetupReadinessAudit,{platform:a[1]}):(a=e.match(/^(Windows|Linux|macOS) packaged setup background process helper$/u),a?t(l.settingsRuntimeHelperLabelPackagedBackgroundProcessHelper,{platform:a[1]}):(a=e.match(/^(Windows|Linux|macOS) packaged provider uninstall helper$/u),a?t(l.settingsRuntimeHelperLabelPackagedProviderUninstallHelper,{platform:a[1]}):(a=e.match(/^(Windows|Linux|macOS) packaged npm-global CLI installer helper$/u),a?t(l.settingsRuntimeHelperLabelPackagedNpmGlobalCliInstallerHelper,{platform:a[1]}):(a=e.match(/^(Windows|Linux|macOS) native (.+) installer$/u),a?t(l.settingsRuntimeHelperLabelNativeProviderInstaller,{platform:a[1],providerLabel:a[2]}):(a=e.match(/^(Windows|Linux|macOS) (.+) local-model installer$/u),a?t(l.settingsRuntimeHelperLabelLocalModelInstaller,{platform:a[1],providerLabel:a[2]}):(a=e.match(/^(Windows|Linux|macOS) (.+) installer$/u),a?t(l.settingsRuntimeHelperLabelProviderInstaller,{platform:a[1],providerLabel:a[2]}):e)))))))))}const $v={check:new Set(["ready","not_installed","changes_required","auth_required"]),install:new Set(["ready"]),upgrade:new Set(["ready"]),repair:new Set(["ready"]),uninstall:new Set(["uninstalled","not_installed"])},zv={check:new Set(["failed"]),install:new Set(["changes_required","auth_required","restart_required","not_installed"]),upgrade:new Set(["changes_required","auth_required","restart_required"]),repair:new Set(["changes_required","auth_required","restart_required"]),uninstall:new Set(["changes_required","blocked","preview"])};function Vv(e,t){if(e.runState==="failed")return"failure";const a=e.status??"";return a==="failed"?"failure":zv[t].has(a)?t==="check"?"failure":"partial":$v[t].has(a)?"success":"partial"}function Yv(e,t,a,o){const n=a?.state?.lastAction??null,s=or(t,o).toLowerCase(),i=pd[t];if(!n||n.helperId!==e.id||n.mode!==i)return{kind:"failure",helperId:e.id,action:t,status:null,summary:"",plannedActions:[],appliedChanges:[],warnings:[],manualSteps:[],message:o(l.settingsRuntimeActionNoResult,{helperLabel:e.label,actionLabel:s})};const c=Vv(n,t),u=n.status,h=ja(e,o),g=(()=>{if(c==="success")return o(u==="not_installed"&&t==="uninstall"?l.settingsRuntimeActionSuccessNothingToRemove:l.settingsRuntimeActionSuccessComplete,{helperLabel:h,actionLabel:s});if(c==="partial"){const k=u??"changes_required",f=n.warnings[0]??n.manualSteps[0];return f?o(l.settingsRuntimeActionPartialWithDetail,{helperLabel:h,actionLabel:s,status:nr(k,o),detail:Ri(f,o)}):o(l.settingsRuntimeActionPartial,{helperLabel:h,actionLabel:s,status:nr(k,o)})}const p=n.summary||n.warnings[0]||u;return p?o(l.settingsRuntimeActionFailedWithDetail,{helperLabel:h,actionLabel:s,detail:Ri(p,o)}):o(l.settingsRuntimeActionFailed,{helperLabel:h,actionLabel:s})})();return{kind:c,helperId:e.id,action:t,status:u,summary:n.summary??"",plannedActions:n.plannedActions??[],appliedChanges:n.appliedChanges??[],warnings:n.warnings??[],manualSteps:n.manualSteps??[],message:g}}async function hd(e,t,a){const o=mt();if(o?.runSetupHelper)return await o.runSetupHelper(e,t,a)}async function Qv(e,t,a=yt){if(!mt()?.runSetupHelper)return{kind:"failure",helperId:e.id,action:t,status:null,summary:"",plannedActions:[],appliedChanges:[],warnings:[],manualSteps:[],message:a(l.settingsRuntimeHostBridgeUnavailableClient)};try{const n=await hd(e.id,pd[t]),s=Yv(e,t,n,a);return(s.kind==="success"||s.kind==="partial")&&ud().catch(()=>{}),s}catch(n){return{kind:"failure",helperId:e.id,action:t,status:null,summary:"",plannedActions:[],appliedChanges:[],warnings:[],manualSteps:[],message:n instanceof Error?n.message:a(l.settingsRuntimeActionFailed,{helperLabel:ja(e,a),actionLabel:or(t,a).toLowerCase()})}}}async function Jv(e,t=yt){if(!mt()?.runSetupHelper)return{helperId:e.id,status:null,plannedActions:[],warnings:[],manualSteps:[],systemInstallPath:null,available:!1,message:t(l.settingsRuntimeHostBridgeUnavailable)};try{const n=(await hd(e.id,"uninstall",{dryRun:!0}))?.state?.lastAction??null;if(!n||n.helperId!==e.id||n.mode!=="uninstall")return{helperId:e.id,status:null,plannedActions:[],warnings:[],manualSteps:[],systemInstallPath:null,available:!1,message:t(l.settingsRuntimePreviewMissingResult)};const s=(n.warnings??[]).find(i=>i.startsWith("system_install_remains_at:"));return{helperId:e.id,status:n.status,plannedActions:n.plannedActions??[],warnings:n.warnings??[],manualSteps:n.manualSteps??[],systemInstallPath:s?s.slice(26):null,available:!0,message:null}}catch(o){return{helperId:e.id,status:null,plannedActions:[],warnings:[],manualSteps:[],systemInstallPath:null,available:!1,message:o instanceof Error?o.message:t(l.settingsRuntimePreviewFailed)}}}async function Xv(){const e=mt();if(!e?.getSetupSnapshot)return[];try{const t=await e.getSetupSnapshot();return Array.isArray(t.helpers)?t.helpers:[]}catch{return[]}}function Zv(e){return e.filter(t=>!t.supported||!t.available?!1:t.supportsApply||t.supportsUpgrade||t.supportsForce||t.supportsUninstall)}function eC(e,t,a){const o=vr(e);if(o==="unavailable"||o==="unknown")return{tone:"warm",label:a("settingsRuntimeStatusChipRuntimeUnavailable")};if(o==="degraded")return{tone:"warm",label:a("settingsRuntimeStatusChipRuntimeDegraded")};switch(t.status){case"ready":return{tone:"ready",label:a("settingsRuntimeStatusChipRuntimeReady")};case"ready_to_apply":return{tone:"warm",label:a("settingsRuntimeStatusChipSetupReadyToApply")};case"attention_required":return{tone:"warm",label:a("settingsRuntimeStatusChipSetupNeedsRemediation")};case"scan_required":return{tone:"warm",label:a("settingsRuntimeStatusChipProviderScanRequired")};default:return{tone:"warm",label:a("settingsRuntimeStatusChipSetupUnavailable")}}}function tC(e){return e.loading||!e.preview||!e.preview.available?!1:e.preview.plannedActions.length>0}function aC({payload:e}){const{toasts:t,showToast:a}=at(),{t:o}=U(),s=d.useSyncExternalStore(Hv,Si,Si).inflight,i=d.useMemo(()=>xn(),[]),[c,u]=d.useState([]),[h,g]=d.useState(!1),[p,k]=d.useState(null),[f,w]=d.useState(null),b=eC(e.runtime,e.runtimeSetup,o),m=R=>{switch(R){case"check":return o("settingsRuntimeActionCheckLabel");case"install":return o("settingsRuntimeActionInstallLabel");case"upgrade":return o("settingsRuntimeActionUpgradeLabel");case"repair":return o("settingsRuntimeActionRepairLabel");case"uninstall":return o("settingsRuntimeActionUninstallLabel")}},C=R=>R===1?"":"s",v=d.useCallback(R=>{if(!(R instanceof Error))return o("settingsRuntimeRefreshFailure");const P=Mg(R.message);return P===null?R.message:o("settingsRuntimeRefreshFailureWithStatus",{status:P})},[o]),y=d.useCallback(async()=>{if(i){g(!0);try{const R=await Xv();u(R)}finally{g(!1)}}},[i]);d.useEffect(()=>{y()},[y]),d.useEffect(()=>{_v(R=>{if(R.type==="success"){const{refreshed:P,failures:I}=R.value;I.length>0?a(o("settingsRuntimeRefreshSummaryWithFailures",{refreshed:P,failed:I.length})):a(o("settingsRuntimeRefreshSummary",{refreshed:P,pluralSuffix:C(P)}))}else a(v(R.error))})},[v,a,o]);const L=()=>{ud().catch(()=>{})},N=d.useMemo(()=>Zv(c),[c]),T=d.useCallback(async(R,P)=>{k(R.id);try{const I=await Qv(R,P,o);return a(I.message),I.kind!=="failure"&&await y(),I}finally{k(null)}},[y,a,o]),j=d.useCallback(async R=>{w({helper:R,preview:null,loading:!0});const P=await Jv(R,o);w(I=>!I||I.helper.id!==R.id?I:{helper:R,preview:P,loading:!1})},[o]),A=d.useCallback(async()=>{if(!f||f.loading)return;const R=f.helper;w(null),await T(R,"uninstall")},[f,T]);return r.jsxs(r.Fragment,{children:[r.jsxs(ye,{header:r.jsx(re,{title:o("settingsRuntimeStatusTitle"),description:o("settingsRuntimeStatusDescription")}),children:[r.jsx("div",{className:"settingsChipRow",children:r.jsx(Lt,{tone:b.tone,children:b.label})}),r.jsxs("div",{className:"settingsRuntimeMetrics",children:[r.jsxs("div",{className:"settingsRuntimeMetric",children:[r.jsx("strong",{children:e.runtimeSetup.availableCount}),r.jsx("span",{children:o("settingsRuntimeMetricReadyProviders")})]}),r.jsxs("div",{className:"settingsRuntimeMetric",children:[r.jsx("strong",{children:e.runtimeSetup.providerCount}),r.jsx("span",{children:o("settingsRuntimeMetricProvidersScanned")})]}),r.jsxs("div",{className:"settingsRuntimeMetric",children:[r.jsx("strong",{children:e.runtimeSetup.providersNeedingAttention.length}),r.jsx("span",{children:o("settingsRuntimeMetricNeedAttention")})]})]})]}),e.runtimeSetup.providersNeedingAttention.length>0?r.jsx(ye,{header:r.jsx(re,{title:o("settingsRuntimeNeedAttentionTitle"),description:o("settingsRuntimeNeedAttentionDescription")}),children:r.jsx("ul",{className:"settingsRuntimeList",children:e.runtimeSetup.providersNeedingAttention.map(R=>r.jsxs("li",{children:[r.jsx("strong",{children:R.provider}),r.jsxs("span",{children:[R.family,typeof R.remediationCount=="number"?` • ${o("settingsRuntimeFixStepCount",{count:R.remediationCount,pluralSuffix:R.remediationCount===1?"":"s"})}`:""]})]},R.provider))})}):null,i?r.jsx(ye,{header:r.jsx(re,{title:o("settingsRuntimeProviderHelpersTitle"),description:o("settingsRuntimeProviderHelpersDescription")}),children:h&&N.length===0?r.jsx("p",{className:"settingsRuntimeNote",children:o("settingsRuntimeLoadingHelpers")}):N.length===0?r.jsx("p",{className:"settingsRuntimeNote",children:o("settingsRuntimeNoProviderHelpers")}):r.jsx("ul",{className:"settingsRuntimeList settingsRuntimeHelperList",children:N.map(R=>{const P=Gv(R,o),I=p===R.id,O=ja(R,o);return r.jsxs("li",{className:"settingsRuntimeHelperRow",children:[r.jsxs("div",{className:"settingsRuntimeHelperHead",children:[r.jsx("strong",{children:O}),r.jsx("span",{children:R.packagedRelativePath})]}),r.jsxs("div",{className:"settingsRuntimeHelperActions",children:[P.filter(E=>E.action!=="uninstall"&&E.available).map(E=>r.jsx("button",{type:"button",className:"secondaryButton",disabled:I,onClick:()=>{T(R,E.action)},children:I?o("settingsRuntimeWorkingState"):m(E.action)},E.action)),R.supportsUninstall?r.jsx("button",{type:"button",className:"dangerButton",disabled:I,onClick:()=>{j(R)},children:o("settingsRuntimeUninstallButtonLabel")}):null]})]},R.id)})})}):null,r.jsx(ye,{header:r.jsx(re,{title:o("settingsRuntimeModelCatalogsTitle"),description:o("settingsRuntimeModelCatalogsDescription")}),children:r.jsx("button",{type:"button",className:"secondaryButton settingsRefreshButton",onClick:L,disabled:s,children:s?r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"settingsRefreshSpinner","aria-hidden":"true"}),r.jsx("span",{children:o("settingsRuntimeRefreshingState")})]}):o("settingsRuntimeRefreshCatalogsButton")})}),r.jsx(ye,{header:r.jsx(re,{title:o("settingsRuntimeStandaloneSetupTitle"),description:o("settingsRuntimeStandaloneSetupDescription")}),children:r.jsx(ya,{className:"secondaryButton settingsInlineLink",href:ed,target:"_blank",rel:"noreferrer",onOpenError:()=>a(o("settingsRuntimeBrowserHandoffError")),children:o("settingsRuntimeOpenStandaloneSetup")})}),f?(()=>{const R=tC(f),P=!R&&!f.loading;return r.jsx("div",{className:"settingsRuntimeConfirmOverlay",role:"dialog","aria-modal":"true",children:r.jsxs("div",{className:"settingsRuntimeConfirmCard",children:[r.jsx(rC,{prompt:f,t:o}),r.jsxs(Je,{children:[r.jsx("button",{type:"button",className:"secondaryButton",onClick:()=>w(null),children:o(P?"settingsRuntimeCancelActionFallbackLabel":"settingsRuntimeCancelActionLabel")}),r.jsx("button",{type:"button",className:"dangerButton",disabled:!R,onClick:()=>{A()},children:o("settingsRuntimeUninstallButtonLabel")})]})]})})})():null,r.jsx(rt,{toasts:t})]})}function rC({prompt:e,t}){const a=ja(e.helper,t);return r.jsxs(r.Fragment,{children:[r.jsxs("h3",{children:[t("settingsRuntimeUninstallTitle",{label:a}),"?"]}),r.jsxs("p",{children:[t("settingsRuntimeUninstallDescriptionPrefix"),r.jsxs("strong",{children:[" ",a]}),"."," ",t("settingsRuntimeUninstallDescriptionSuffix")]}),r.jsxs("p",{className:"settingsRuntimeNote",children:[t("settingsRuntimeUninstallHelperLabel",{helperId:e.helper.id}),r.jsx("br",{}),t("settingsRuntimeUninstallScriptLabel",{scriptPath:e.helper.packagedRelativePath})]}),r.jsx(oC,{preview:e.preview,loading:e.loading,t})]})}function oC({preview:e,loading:t,t:a}){return t?r.jsx("p",{className:"settingsRuntimeNote",children:a("settingsRuntimeComputingPlannedRemovals")}):!e||!e.available?r.jsx("p",{className:"settingsRuntimeNote",children:e?.message??a("settingsRuntimePreviewUnavailable")}):e.status==="not_installed"?r.jsxs("p",{className:"settingsRuntimeNote",children:[a("settingsRuntimeNothingToRemove"),e.systemInstallPath?r.jsxs(r.Fragment,{children:[r.jsx("br",{}),a("settingsRuntimeSystemInstallDetected",{installPath:e.systemInstallPath})]}):null]}):r.jsxs("div",{className:"settingsRuntimePreview",children:[r.jsx("p",{className:"settingsRuntimeNote",children:a("settingsRuntimeWillRemoveItems",{itemCount:e.plannedActions.length,pluralSuffix:e.plannedActions.length===1?"":"s"})}),r.jsx("ul",{className:"settingsRuntimePreviewList",children:e.plannedActions.map(o=>r.jsx("li",{children:r.jsx("code",{children:o})},o))}),e.systemInstallPath?r.jsx("p",{className:"settingsRuntimeNote",children:a("settingsRuntimeSystemInstallCannotRemove",{installPath:e.systemInstallPath})}):null,e.manualSteps.length>0?r.jsx("ul",{className:"settingsRuntimePreviewList settingsRuntimePreviewManual",children:e.manualSteps.map(o=>r.jsx("li",{children:o},o))}):null]})}function nC({payload:e,onPayloadUpdate:t}){const{toasts:a,showToast:o}=at(),{t:n}=U(),s=un(e.chat.advancedDraftControls,"work");async function i(c){const u=e.chat.advancedDraftControls,h=kr(u);h.work=c,t({...e,chat:{...e.chat,advancedDraftControls:h}});try{const g=await kn({work:c});d.startTransition(()=>t(g))}catch(g){t({...e,chat:{...e.chat,advancedDraftControls:u}}),o(va(g,n("settingsConversationPreferenceUpdateFailure"),n))}}return r.jsxs(r.Fragment,{children:[r.jsx(In,{surface:"work",payload:e,onPayloadUpdate:t,onError:o}),r.jsx(En,{surface:"work",enabled:s,onToggle:c=>{i(c)}}),r.jsx(rt,{toasts:a})]})}function sC(e,t){return e==="/settings"||e==="/settings/"||pt(e,"/settings/general")?{section:"general",title:t("settingsRouteTitleGeneral")}:pt(e,"/settings/assistants")?{section:"assistants",title:t("settingsRouteTitleAssistants")}:iC(e)?{section:"cats",title:t("settingsRouteTitleMyCats")}:pt(e,"/settings/chat")?{section:"chat",title:t("settingsRouteTitleChat")}:pt(e,"/settings/work")?{section:"work",title:t("settingsRouteTitleWork")}:pt(e,"/settings/code")?{section:"code",title:t("settingsRouteTitleCode")}:pt(e,"/settings/apps")?{section:"apps",title:t("settingsRouteTitleApps")}:pt(e,"/settings/desktop")?{section:"desktop",title:t("settingsRouteTitleDesktop")}:pt(e,"/settings/runtime")?{section:"runtime",title:t("settingsRouteTitleRuntime")}:pt(e,"/settings/data")?{section:"data",title:t("settingsRouteTitleData")}:{section:"not-found",title:t("settingsRouteTitleNotFound")}}function pt(e,t){return e===t||e.startsWith(`${t}/`)}function iC(e){return e==="/settings/cats"||e==="/settings/cats/new"}function lC({payload:e,onPayloadUpdate:t,busy:a,onFeedback:o,onBusy:n,onResetSetup:s}){const i=e.products.find(p=>p.id==="work"),c=e.products.find(p=>p.id==="code"),u=xn(),h=p=>{t(p)},g=r.jsx(ty,{payload:e,busy:a,onPayloadUpdate:h,onFeedback:o,onBusy:n});return r.jsxs(na,{children:[r.jsx(Z,{index:!0,element:r.jsx(gt,{to:"/settings/general",replace:!0})}),r.jsx(Z,{path:"general",element:r.jsx(Wv,{payload:e,onPayloadUpdate:h})}),r.jsx(Z,{path:"cats",element:g}),r.jsx(Z,{path:"cats/new",element:g}),r.jsx(Z,{path:"assistants",element:r.jsx(oy,{payload:e,onPayloadUpdate:h})}),r.jsx(Z,{path:"chat",element:r.jsx(xy,{payload:e,onPayloadUpdate:h})}),i?r.jsx(Z,{path:"work",element:r.jsx(nC,{payload:e,onPayloadUpdate:h})}):null,c?r.jsx(Z,{path:"code",element:r.jsx(Ty,{payload:e,onPayloadUpdate:h})}):null,r.jsx(Z,{path:"apps/*",element:r.jsx(wy,{installedApps:e.installedApps??[],onInstalledAppsUpdate:p=>{h({...e,installedApps:p})}})}),u?r.jsx(Z,{path:"desktop",element:r.jsx(fv,{payload:e,onPayloadUpdate:h})}):null,r.jsx(Z,{path:"runtime",element:r.jsx(aC,{payload:e})}),r.jsx(Z,{path:"data",element:r.jsx(jy,{payload:e,busy:a,onResetSetup:s})}),r.jsx(Z,{path:"*",element:r.jsx(Uv,{})})]})}function cC(e){const t=ve(),{t:a}=U(),{section:o,title:n}=sC(t.pathname,a);return r.jsx(Bb,{section:o,title:n,products:e.payload.products,children:lC(e)})}function dC(){const{t:e}=U(),{loadState:t,onPayloadUpdate:a,onRetryLoad:o}=nu(),[n,s]=d.useState(Tn),[i,c]=d.useState(""),{dialog:u,confirm:h,handleClose:g}=Et(),p=d.useCallback(async()=>{if(await h({title:e(l.settingsDataResetAllDataTitle),message:e(l.settingsDataResetAllDataDescription),confirmLabel:e(l.settingsDataResetButtonLabel)})){s(wk());try{const f=await zg();Am(),await nd({bootstrapAttemptId:f.bootstrapAttemptId??null,setupCompleteAt:f.setupCompleteAt??null,products:Array.isArray(f.products)?[...f.products]:[]}),window.location.href="/"}catch(f){throw s(We()),f}}},[h,e]);return t.status==="loading"?r.jsx("div",{className:"settingsCanvasBoot",role:"status","aria-live":"polite","aria-label":e(l.settingsCanvasLoadingLabel)}):t.status==="error"?r.jsxs("section",{className:"settingsCanvasError",role:"alert","aria-live":"assertive",children:[r.jsx("h1",{className:"settingsCanvasErrorTitle",children:e(l.settingsCanvasLoadErrorTitle)}),r.jsx("p",{className:"settingsCanvasErrorBody",children:e(l.settingsCanvasLoadErrorBody)}),t.message?r.jsx("p",{className:"settingsCanvasErrorDetail",children:t.message}):null,r.jsx("div",{className:"settingsCanvasErrorActions",children:r.jsx("button",{type:"button",className:"primaryButton",onClick:o,children:e(l.sharedCommonRetry)})})]}):r.jsxs(r.Fragment,{children:[r.jsx(cC,{payload:t.payload,onPayloadUpdate:a,busy:n,onFeedback:c,onBusy:s,onResetSetup:p}),i?r.jsx("p",{className:"settingsFeedback",role:"status",children:i}):null,r.jsx(It,{dialog:u,onClose:g})]})}const ge=14,uC=.6,Pi=.18,pC=.18,Ai=2,hC="#e8c84a",md="#8B7E74";function mC(e){return new Promise((t,a)=>{const o=new Image;o.crossOrigin="anonymous",o.onload=()=>t(o),o.onerror=a,o.src=e})}function gC(e,t,a){return e.map(o=>{const n=Math.random()*Math.PI*2,s=uC+Math.random()*.3;return{id:o.id,x:ge+Math.random()*(t-ge*2),y:ge+Math.random()*(a-ge*2),vx:Math.cos(n)*s,vy:Math.sin(n)*s,color:o.avatarColor??md,initials:fe(o.name),isBoss:o.isBoss,avatarUrl:o.avatarUrl??null,image:null}})}function fC(e,t){return!e||e.length!==t.length?!0:e.some((a,o)=>{const n=t[o];return n?a.id!==n.id||a.color!==(n.avatarColor??md)||a.isBoss!==n.isBoss||a.avatarUrl!==(n.avatarUrl??null):!0})}function wC(e,t,a,o){for(const n of e)n.x+=n.vx*o,n.y+=n.vy*o,n.x-ge<=0?(n.x=ge,n.vx=Math.abs(n.vx)):n.x+ge>=t&&(n.x=t-ge,n.vx=-Math.abs(n.vx)),n.y-ge<=0?(n.y=ge,n.vy=Math.abs(n.vy)):n.y+ge>=a&&(n.y=a-ge,n.vy=-Math.abs(n.vy))}function kC(e,t,a){for(const o of e)o.x=Math.min(Math.max(ge,o.x),t-ge),o.y=Math.min(Math.max(ge,o.y),a-ge)}function bC(e,t,a,o){e.clearRect(0,0,a,o);for(const n of t)e.globalAlpha=Pi,n.isBoss&&(e.beginPath(),e.arc(n.x,n.y,ge+Ai,0,Math.PI*2),e.strokeStyle=hC,e.lineWidth=Ai,e.stroke()),n.image?(e.save(),e.beginPath(),e.arc(n.x,n.y,ge,0,Math.PI*2),e.clip(),e.drawImage(n.image,n.x-ge,n.y-ge,ge*2,ge*2),e.restore()):(e.beginPath(),e.arc(n.x,n.y,ge,0,Math.PI*2),e.fillStyle=n.color,e.fill(),e.globalAlpha=Pi*1.8,e.font=`700 ${ge*.65}px sans-serif`,e.textAlign="center",e.textBaseline="middle",e.fillStyle="#fff",e.fillText(n.initials,n.x,n.y));e.globalAlpha=1}function yC({animationMode:e,cats:t}){const a=d.useRef(null),o=d.useRef(null),n=d.useRef(0);return d.useEffect(()=>{if(e==="off"||t.length===0)return;const s=a.current;if(!s)return;const i=s,c=i.getContext("2d");if(!c)return;const u=e==="reduced"?pC:1;function h(){if(i.width=window.innerWidth,i.height=window.innerHeight,fC(o.current,t)){o.current=gC([...t],i.width,i.height);return}const f=o.current;f&&kC(f,i.width,i.height)}function g(){n.current!==0&&(cancelAnimationFrame(n.current),n.current=0)}function p(){const f=i.width,w=i.height,b=o.current;!c||!b||(wC(b,f,w,u),bC(c,b,f,w),n.current=requestAnimationFrame(p))}h(),n.current=requestAnimationFrame(p);const k=o.current;if(k)for(let f=0;f<t.length;f++){const w=t[f]?.avatarUrl;w&&k[f]&&mC(w).then(b=>{k[f].image=b}).catch(()=>{})}return window.addEventListener("resize",h),()=>{g(),window.removeEventListener("resize",h)}},[e,t]),e==="off"||t.length===0?null:r.jsx("canvas",{ref:a,className:"lobbyBouncingCanvas","aria-hidden":"true"})}const gd=Fe("en");function vC(e,t=gd){return e.products.map(a=>({productId:a.id,surface:a.surface,productName:eh(a,t),subtitle:th(a,t),routePrefix:a.routePrefix,lastUsed:a.surface!==null&&a.surface===e.lastUsedSurface,available:a.installState==="available"}))}function CC(e){return e.installedApps.flatMap(t=>!t.enabled||t.installState!=="enabled"?[]:t.lobbyEntries.map(a=>({appId:t.id,entryId:a.id,title:a.title,subtitle:a.subtitle??null,routePath:a.routePath,publisher:t.publisher,installState:t.installState,trustTier:t.trustTier})))}const SC=[l.lobbyGreetingChooseSurface,l.lobbyGreetingHomeReady,l.lobbyGreetingPickProduct,l.lobbyGreetingEverythingStaged,l.lobbyGreetingOpenSurface,l.lobbyGreetingAwake,l.lobbyGreetingContinue];function LC(e){return(e??[]).map(t=>t.trim()).filter(t=>t.length>0)}function RC(e,t=Math.random,a=gd){const o=LC(e),n=SC.map(i=>a(i)),s=o.length>0?o:n;return s[Math.floor(t()*s.length)]}const Oo=Fe("en"),PC=[l.lobbyGreetingChooseSurface,l.lobbyGreetingHomeReady,l.lobbyGreetingPickProduct,l.lobbyGreetingEverythingStaged,l.lobbyGreetingOpenSurface,l.lobbyGreetingAwake,l.lobbyGreetingContinue],AC=[l.chatNewChatDraftDefaultGreeting,l.chatNewChatDraftGreetingNap,l.chatNewChatDraftGreetingKeyboard,l.chatNewChatDraftGreetingLetsGo,l.chatNewChatDraftGreetingStandby,l.chatNewChatDraftGreetingTaskReady,l.chatNewChatDraftGreetingOnDuty],xC=[l.codeNewDraftGreeting,l.codeNewDraftGreetingOpenRepo,l.codeNewDraftGreetingBuildFixRefactor,l.codeNewDraftGreetingShipImprovement,l.codeNewDraftGreetingSmallestChange];function TC(e,t=Oo){return e.map(a=>t(a))}function DC(e){switch(e.bundle.scope.surfaceId){case"lobby":return PC;case"chat:new":return AC;case"code:new":return xC;default:return null}}function NC(e,t=Oo){if(!e)return null;const a=e.bundle.content.greeting?.trim();if(!a)return null;if(e.bundle.provenance.originMode!=="deterministic")return a;const o=DC(e);if(!o)return a;const s=TC(o,Oo).findIndex(c=>c===a);if(s<0)return a;const i=o[s];return i?t(i):a}function jC({envelope:e}){const{t}=U(),a=Ne(),[o]=d.useState(()=>RC(null,Math.random,t)),n=vC({products:e.products,lastUsedSurface:e.lastProductSurface??null},t),s=CC({installedApps:e.installedApps??[]}),i=NC(e.lobby.guideCatAssist,t)??o,c=vr(e.runtime),u=Ab(c),h=jn(c,t),g=t("lobbyRuntimeStatusLabel",{runtimeStatus:h}),p=e.ownerAvatarUrl?{backgroundImage:`url(${e.ownerAvatarUrl})`,backgroundSize:"cover",backgroundPosition:"center"}:void 0,k={platformShellSurface:e.lastProductSurface??"chat"};return r.jsxs("div",{className:"screen lobbyScreen",children:[r.jsx(yC,{animationMode:e.lobby.animationMode,cats:e.lobby.cats}),r.jsxs("div",{className:"platformLobby",children:[r.jsxs("div",{className:"lobbyTopBar",children:[r.jsx("span",{className:"lobbyBrand",children:t("appBrandName")}),r.jsxs("div",{className:"lobbyTopBarEnd",children:[r.jsx(Nn,{slotKind:"lobby"}),r.jsxs("div",{className:"lobbyIdentity",role:"group","aria-label":t("lobbyAccountSettingsAriaLabel"),children:[r.jsxs("button",{type:"button",className:"lobbyIdentityMainButton",onClick:()=>a("/settings/general",{state:k}),"aria-label":t("lobbyOpenAccountSettings"),children:[r.jsx("span",{className:"lobbyAvatar",style:p,children:e.ownerAvatarUrl?null:fe(e.ownerDisplayName)}),r.jsx("span",{className:"lobbyOwnerName",children:e.ownerDisplayName})]}),r.jsx("button",{type:"button",className:"lobbyIdentityRuntime",onClick:()=>a("/settings/runtime",{state:k}),"data-tooltip":h,"aria-label":g,children:r.jsx("span",{className:u,"aria-hidden":"true"})})]})]})]}),r.jsx("div",{className:"lobbyHero",children:r.jsx("h1",{className:"lobbyGreeting",children:i})}),r.jsx(Vc,{envelope:e}),r.jsxs("div",{className:"lobbyProducts",children:[r.jsx("p",{className:"lobbyProductsEyebrow",children:t("lobbyProductsSectionTitle")}),r.jsx("div",{className:"platformLobbyGrid",children:n.map(f=>{const w=`contentCard platformLobbyCard platformLobbyCard--${f.surface??"module"}`+(f.lastUsed?" platformLobbyCard--recent":"")+(f.available?" platformLobbyCard--mock":""),b=r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"platformLobbyCardAccent"}),r.jsx("span",{className:"platformLobbyCardName",children:f.productName}),r.jsx("span",{className:"platformLobbyCardSub",children:f.subtitle}),f.lastUsed?r.jsx("span",{className:"platformLobbyCardHint",children:t("lobbyContinueText")}):null]});return f.available?r.jsx("div",{className:w,children:b},f.productId):r.jsx("button",{type:"button",className:w,onClick:()=>a(f.routePrefix),children:b},f.productId)})})]}),s.length>0?r.jsxs("div",{className:"lobbyProducts",children:[r.jsx("p",{className:"lobbyProductsEyebrow",children:t("lobbyAppsSectionTitle")}),r.jsx("div",{className:"platformLobbyGrid",children:s.map(f=>r.jsxs("button",{type:"button",className:"contentCard platformLobbyCard platformLobbyCard--app",onClick:()=>a(f.routePath),"aria-label":t("lobbyOpenEntry",{entryTitle:f.title}),children:[r.jsx("div",{className:"platformLobbyCardAccent"}),r.jsx("span",{className:"platformLobbyCardName",children:f.title}),f.subtitle?r.jsx("span",{className:"platformLobbyCardSub",children:f.subtitle}):null]},`${f.appId}:${f.entryId}`))})]}):null]})]})}class da extends Error{constructor(t,a,o){super(t),this.status=a,this.code=o,this.name="PlatformSetupApiError"}}function MC(e){return e instanceof da&&e.status===401&&(e.code===null||e.code===Xe.unauthenticated)}function EC(e){return e instanceof da&&e.status===403&&e.code===Xe.forbidden&&e.message==="Auth repair is required."}async function fd(e,t){return(await wd(e,t)).message}async function wd(e,t){try{const a=await e.json(),o=IC(a);if(typeof o?.code=="string"){const n=t.errorMessagesByCode?.[o.code];return n?{message:n,code:o.code}:{message:t.fallbackMessageForStatus(e.status),code:o.code}}if(typeof o?.message=="string")return{message:o.message,code:null}}catch{}return{message:t.fallbackMessageForStatus(e.status),code:null}}function IC(e){if(typeof e!="object"||e===null)return null;const t=e.error;return typeof t=="object"&&t!==null?t:null}function BC(e){if(typeof e!="object"||e===null||!("routeTarget"in e)||!("auth"in e)||!("setup"in e))return null;const t=e.routeTarget;return t==="setup"||t==="login"||t==="repair"?t:null}async function FC(e,t){const a=await fetch("/api/platform/setup/complete",{method:"POST",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(e),signal:t.signal});if(!a.ok)throw new Error(await fd(a,t));return await a.json()}async function Ca(e){const t=await fetch("/api/app-shell",{headers:{Accept:"application/json"},signal:e.signal});if(!t.ok){const n=await wd(t,e);throw new da(n.message,t.status,n.code)}const a=await t.json(),o=BC(a);if(o==="login")throw new da("Authentication is required.",401,Xe.unauthenticated);if(o==="repair")throw new da("Auth repair is required.",403,Xe.forbidden);return a}async function OC(e,t){const a=await fetch("/api/platform/bootstrap-diagnostics/opened",{method:"POST",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify({attemptId:e??null}),signal:t.signal});if(!a.ok)throw new Error(await fd(a,t));return await a.json()}async function WC(e){return br(e)}async function UC(e,t){return gn({provider:e,instance:t})}async function HC(e,t){return fn({provider:e,instance:t})}function _C({name:e,onNameChange:t,nameReadOnly:a,provider:o,instance:n,model:s,modelSelection:i,onTargetChange:c,nameLabel:u,namePlaceholder:h,nameHint:g,autoFocusName:p,makeBoss:k,onMakeBossChange:f,hideMakeBoss:w,fetchProviderRegistry:b,fetchProviderModels:m,fetchAdvancedProviderModels:C,onProviderRegistryChange:v}){const{t:y}=U();return r.jsxs(r.Fragment,{children:[r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:u??y(l.settingsGeneralNameLabel)}),r.jsx("input",{className:"textInput",value:e,onChange:L=>t(L.target.value),placeholder:h,autoFocus:p&&!a,readOnly:a,"aria-readonly":a?"true":void 0}),g?r.jsx("span",{className:"fieldHint",children:g}):null]}),!w&&f?r.jsxs("label",{className:"fieldLabel fieldLabelInline",children:[r.jsx("input",{type:"checkbox",checked:k??!1,onChange:L=>f(L.target.checked)}),r.jsx("span",{children:y(l.sharedSettingsCatsSetBossCatLabel)})]}):null,r.jsx(Dc,{provider:o,instance:n,model:s,modelSelection:i,onTargetChange:c,fetchProviderRegistry:b,fetchProviderModels:m,fetchAdvancedProviderModels:C,onProviderRegistryChange:v})]})}function GC(e){return r.jsx(_C,{...e,fetchProviderRegistry:WC,fetchProviderModels:UC,fetchAdvancedProviderModels:HC})}function KC({provider:e,instance:t,model:a,modelSelection:o,runtimeReachable:n,onTargetChange:s}){const i=ct(),{t:c}=U(),[u,h]=d.useState({state:"ready",providers:[]}),[g,p]=d.useState(!1),k=Lc(u)??ed,f=u.state==="runtime_unreachable"?{className:"statusChip statusChipWarm",label:c(l.setupGuideCatRuntimeUnavailable)}:u.state==="no_usable_targets"?{className:"statusChip statusChipWarm",label:c(l.setupGuideCatNoUsableTargets)}:n?{className:"statusChip statusChipReady",label:c(l.setupGuideCatRuntimeConnected)}:{className:"statusChip statusChipWarm",label:c(l.setupGuideCatRuntimeNotDetected)};return r.jsxs(r.Fragment,{children:[r.jsx(GC,{name:i,onNameChange:()=>{},nameReadOnly:!0,provider:e,instance:t,model:a,modelSelection:o,onTargetChange:s,nameLabel:c(l.setupGuideCatNameLabel),namePlaceholder:i,nameHint:c(l.setupGuideCatNameHint),hideMakeBoss:!0,hideProductToggles:!0,onProviderRegistryChange:h}),r.jsxs("div",{className:"setupRuntimeStatus",children:[r.jsx("span",{className:f.className,children:f.label}),u.state==="runtime_unreachable"?r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"setupRuntimeNote",children:c(l.setupGuideCatUnavailableNote)}),r.jsx(ya,{className:"secondaryButton setupInlineLink",href:k,target:"_blank",rel:"noreferrer",onClick:()=>p(!1),onOpenError:()=>p(!0),children:c(l.setupGuideCatOpenRuntimeSetup)})]}):null,u.state==="no_usable_targets"?r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"setupRuntimeNote",children:c(l.setupGuideCatNoUsableTargetsNote)}),r.jsx(ya,{className:"secondaryButton setupInlineLink",href:k,target:"_blank",rel:"noreferrer",onClick:()=>p(!1),onOpenError:()=>p(!0),children:c(l.setupGuideCatOpenRuntimeSetup)})]}):null,g?r.jsx("span",{className:"setupRuntimeNote",role:"alert",children:c(l.settingsRuntimeBrowserHandoffError)}):null]})]})}function qC(e){return!!e.model.trim()}function $C(e){return!e.createGuideCat||qC({model:e.model})}const Sa=[1,2],zC=Sa.length;function xi(e){const t=Sa.indexOf(e);return Sa[t+1]??e}function VC(e){const t=Sa.indexOf(e);return Sa[t-1]??e}const YC=new Set(["Invalid desktop platform shell payload."]);function QC(e,t,a){return e instanceof Error?YC.has(e.message)?t:e.message:t}function JC(e){return e.step===2&&e.createGuideCat}function XC({envelope:e,onComplete:t}){const[a,o]=d.useState(1),[n,s]=d.useState(""),[i,c]=d.useState(""),[u,h]=d.useState(""),[g,p]=d.useState(!1),[k,f]=d.useState("claude"),[w,b]=d.useState(""),[m,C]=d.useState(""),[v,y]=d.useState(null),[L,N]=d.useState(null),[T,j]=d.useState(""),A=d.useRef(!1),{t:R}=U(),P=L!==null,I=ct(),O=!!(n.trim()&&i.trim()&&u),E=$C({createGuideCat:g,model:m}),$=e.bootstrapAttemptId??null,G=d.useCallback(async()=>{N("complete"),j("");try{const B=await FC({attemptId:$,ownerDisplayName:n.trim(),adminIdentifier:i.trim(),adminPassword:u,createGuideCat:g,guideCatProvider:g?k:void 0,guideCatInstance:g&&w||void 0,guideCatModel:g&&m||void 0,guideCatModelSelection:g?v:void 0},{fallbackMessageForStatus:q=>R(l.setupWizardFailedWithStatus,{status:q}),errorMessagesByCode:{already_complete:R(l.setupWizardAlreadyCompleteError),bad_request:R(l.setupWizardInvalidRequestError),configuration_error:R(l.setupWizardServerError),internal_error:R(l.setupWizardServerError)}});await $b(B),t(B)}catch(B){j(QC(B,R(l.setupWizardFailedMessage)))}finally{N(null)}},[g,i,u,w,m,v,t,n,k,$,R]);d.useEffect(()=>{A.current||(A.current=!0,OC($,{fallbackMessageForStatus:B=>R(l.setupWizardRecordOpenFailedWithStatus,{status:B})}).catch(()=>{}))},[$,R]),d.useEffect(()=>{function B(q){q.key!=="Enter"||P||q.target instanceof HTMLSelectElement||q.target instanceof HTMLTextAreaElement||a===1&&!O||a===2&&!E||(q.preventDefault(),a===1?o(xi(a)):a===2&&G())}return document.addEventListener("keydown",B),()=>document.removeEventListener("keydown",B)},[P,E,O,G,a]),d.useEffect(()=>{JC({step:a,createGuideCat:g})&&jg()},[g,a]);const ee=Array.from({length:zC},(B,q)=>q+1);return r.jsx("div",{className:"screen screenCentered",children:r.jsxs("div",{className:"setupWizard",children:[r.jsx("div",{className:"setupStepIndicator",children:ee.map(B=>r.jsx("span",{className:B<=a?"setupDot setupDotActive":"setupDot"},B))}),a===1?r.jsxs("div",{className:"contentCard setupCard",children:[r.jsx("p",{className:"eyebrow",children:R(l.appBrandName)}),r.jsx("h1",{children:R(l.setupWizardWelcomeTitle)}),r.jsx("p",{className:"heroNote",children:R(l.setupWizardWelcomeIntro)}),r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:R(l.setupWizardOwnerNameLabel)}),r.jsx("input",{className:"textInput",value:n,onChange:B=>s(B.target.value),placeholder:R(l.setupWizardOwnerNamePlaceholder),autoFocus:!0})]}),r.jsx("p",{className:"setupRuntimeNote",children:R(l.setupWizardAdminCredentialsHint)}),r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:R(l.setupWizardAdminIdentifierLabel)}),r.jsx("input",{className:"textInput",value:i,onChange:B=>c(B.target.value),placeholder:R(l.setupWizardAdminIdentifierPlaceholder),autoComplete:"username"})]}),r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:R(l.setupWizardAdminPasswordLabel)}),r.jsx("input",{className:"textInput",type:"password",value:u,onChange:B=>h(B.target.value),placeholder:R(l.setupWizardAdminPasswordPlaceholder),autoComplete:"new-password"})]}),T?r.jsx("p",{className:"feedbackText",children:T}):null,r.jsx("button",{className:"primaryButton setupPrimaryButton",disabled:!O,type:"button",onClick:()=>o(xi(a)),children:R(l.setupWizardGetStartedButton)})]}):null,a===2?r.jsxs("div",{className:"contentCard setupCard",children:[r.jsx("p",{className:"eyebrow",children:R(l.setupWizardStepIndicator,{step:2,total:2})}),r.jsx("h1",{children:R(l.setupWizardEnableGuideTitle,{guideCatName:I})}),r.jsx("p",{className:"heroNote",children:R(l.setupWizardEnableGuideSubtitle)}),r.jsxs("label",{className:"setupCheckboxLabel",children:[r.jsx("input",{type:"checkbox",className:"setupCheckbox",checked:g,onChange:B=>p(B.target.checked)}),r.jsx("span",{children:R(l.setupWizardEnableGuideLabel,{guideCatName:I})})]}),g?r.jsx(KC,{provider:k,instance:w,model:m,modelSelection:v,runtimeReachable:e.runtime.reachable,onTargetChange:B=>{f(B.provider),b(B.instance),C(B.model),y(B.modelSelection??null)}}):r.jsx("p",{className:"setupRuntimeNote",children:R(l.setupWizardSkipGuideMessage,{guideCatName:I})}),T?r.jsx("p",{className:"feedbackText",children:T}):null,r.jsxs("div",{className:"setupActions",children:[r.jsx("button",{className:"setupBackButton",type:"button",disabled:P,onClick:()=>o(VC(a)),children:R(l.setupWizardBackButton)}),r.jsx("button",{className:"primaryButton setupPrimaryButton",disabled:P||!E,type:"button",onClick:()=>{G()},children:R(L==="complete"?l.setupWizardOpeningCatsAction:l.setupWizardOpenCatsAction)})]})]}):null]})})}const Ti="https://accounts.google.com/gsi/client",ZC="g_csrf_token";let Ha=null;function eS(e=document,t=window){return t.google?.accounts?.id?Promise.resolve(t.google):Ha||(Ha=new Promise((a,o)=>{const n=e.querySelector(`script[src="${Ti}"]`),s=n??e.createElement("script");s.src=Ti,s.async=!0,s.defer=!0,s.onload=()=>{if(t.google?.accounts?.id){a(t.google);return}o(new Error("Google Identity Services did not initialize."))},s.onerror=()=>{o(new Error("Google Identity Services could not be loaded."))},n||e.head.appendChild(s)}),Ha)}function tS(){const e=new Uint8Array(24);globalThis.crypto.getRandomValues(e);let t="";for(const a of e)t+=String.fromCharCode(a);return btoa(t).replace(/\+/gu,"-").replace(/\//gu,"_").replace(/=+$/u,"")}function aS(e,t=document){const a=t.location.protocol==="https:"?"; Secure":"";t.cookie=`${ZC}=${encodeURIComponent(e)}; Path=/; SameSite=Lax${a}`}function rS({clientId:e,disabled:t,onCredential:a,onError:o}){const n=d.useRef(null);return d.useEffect(()=>{if(t)return;let s=!1;const i=tS();return aS(i),eS().then(c=>{s||!n.current||(c.accounts.id.initialize({client_id:e,callback:u=>{const h=u.credential?.trim();if(!h){o(new Error("Google did not return an ID token."));return}a({credential:h,csrfToken:i})}}),n.current.innerHTML="",c.accounts.id.renderButton(n.current,{type:"standard",theme:"outline",size:"large",text:"signin_with",shape:"rectangular",logo_alignment:"left",width:320}))}).catch(c=>{s||o(c instanceof Error?c:new Error("Google sign-in failed."))}),()=>{s=!0}},[e,t,a,o]),r.jsx("div",{className:"googleSignInButton",ref:n})}function Di({onAuthenticated:e}){const{t}=U(),[a,o]=d.useState(""),[n,s]=d.useState(""),[i,c]=d.useState(!1),[u,h]=d.useState(""),[g,p]=d.useState(null),k=!!(a.trim()&&n&&!i),f=d.useCallback(()=>({fallbackMessageForStatus:C=>t(l.authLoginFailedWithStatus,{status:C}),errorMessagesByCode:{[Xe.unauthenticated]:t(l.authLoginInvalidCredentials),[Xe.forbidden]:t(l.authLoginForbidden),[Xe.csrfMismatch]:t(l.authLoginCsrfMismatch)}}),[t]);d.useEffect(()=>{let C=!0;return Io(f()).then(v=>{if(!C)return;const y=v.providers.google.enabled&&v.providers.google.clientId?.trim()||null;p(y)}).catch(()=>{C&&p(null)}),()=>{C=!1}},[f]);async function w(C){if(C.preventDefault(),!!k){c(!0),h("");try{await Nv({identifier:a.trim(),password:n},f());const v=await Ca({fallbackMessageForStatus:y=>t(l.appLoadStateFailedWithStatus,{status:y})});e(v)}catch(v){h(v instanceof Error?v.message:t(l.authLoginFailed))}finally{c(!1)}}}const b=d.useCallback(async C=>{if(!i){c(!0),h("");try{await jv({credential:C.credential,csrfToken:C.csrfToken},f());const v=await Ca({fallbackMessageForStatus:y=>t(l.appLoadStateFailedWithStatus,{status:y})});e(v)}catch(v){h(v instanceof Error?v.message:t(l.authLoginFailed))}finally{c(!1)}}},[f,i,e,t]),m=d.useCallback(()=>{h(t(l.authLoginGoogleUnavailable))},[t]);return r.jsx("div",{className:"screen screenCentered",children:r.jsxs("form",{className:"contentCard setupCard",onSubmit:C=>{w(C)},children:[r.jsx("p",{className:"eyebrow",children:t(l.appBrandName)}),r.jsx("h1",{children:t(l.authLoginTitle)}),r.jsx("p",{className:"heroNote",children:t(l.authLoginSubtitle)}),r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:t(l.authLoginIdentifierLabel)}),r.jsx("input",{className:"textInput",value:a,onChange:C=>o(C.target.value),placeholder:t(l.authLoginIdentifierPlaceholder),autoComplete:"username",autoFocus:!0})]}),r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:t(l.authLoginPasswordLabel)}),r.jsx("input",{className:"textInput",type:"password",value:n,onChange:C=>s(C.target.value),placeholder:t(l.authLoginPasswordPlaceholder),autoComplete:"current-password"})]}),u?r.jsx("p",{className:"feedbackText",children:u}):null,r.jsx("button",{className:"primaryButton setupPrimaryButton",disabled:!k,type:"submit",children:t(i?l.authLoginSubmitting:l.authLoginSubmit)}),g?r.jsxs("div",{className:"googleSignInSection",children:[r.jsx("div",{className:"setupRuntimeNote",children:t(l.authLoginGoogleOriginHint)}),r.jsx(rS,{clientId:g,disabled:i,onCredential:C=>{b(C)},onError:m})]}):null]})})}function oS({onRepaired:e}){const{t}=U(),[a,o]=d.useState(""),[n,s]=d.useState(""),[i,c]=d.useState(""),[u,h]=d.useState(""),[g,p]=d.useState(!1),[k,f]=d.useState(""),w=!!(n.trim()&&i&&u.trim()&&!g);async function b(m){if(m.preventDefault(),!w){f(t(l.authRepairFailed));return}p(!0),f("");try{const C=a.trim(),v=u.trim();await Mv({displayName:C||void 0,identifier:n.trim(),password:i,recoveryToken:v||void 0},{fallbackMessageForStatus:L=>t(l.authRepairFailedWithStatus,{status:L}),errorMessagesByCode:{[Xe.forbidden]:t(l.authRepairForbidden)}});const y=await Ca({fallbackMessageForStatus:L=>t(l.appLoadStateFailedWithStatus,{status:L})});e(y)}catch(C){f(C instanceof Error?C.message:t(l.authRepairFailed))}finally{p(!1)}}return r.jsx("div",{className:"screen screenCentered",children:r.jsxs("form",{className:"contentCard setupCard",onSubmit:m=>{b(m)},children:[r.jsx("p",{className:"eyebrow",children:t(l.appBrandName)}),r.jsx("h1",{children:t(l.authRepairTitle)}),r.jsx("p",{className:"heroNote",children:t(l.authRepairSubtitle)}),r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:t(l.authRepairDisplayNameLabel)}),r.jsx("input",{className:"textInput",value:a,onChange:m=>o(m.target.value),placeholder:t(l.authRepairDisplayNamePlaceholder),autoComplete:"name",autoFocus:!0})]}),r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:t(l.authRepairIdentifierLabel)}),r.jsx("input",{className:"textInput",value:n,onChange:m=>s(m.target.value),placeholder:t(l.authRepairIdentifierPlaceholder),autoComplete:"username"})]}),r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:t(l.authRepairPasswordLabel)}),r.jsx("input",{className:"textInput",type:"password",value:i,onChange:m=>c(m.target.value),placeholder:t(l.authRepairPasswordPlaceholder),autoComplete:"new-password"})]}),r.jsxs("label",{className:"fieldLabel",children:[r.jsx("span",{children:t(l.authRepairRecoveryTokenLabel)}),r.jsx("input",{className:"textInput",value:u,onChange:m=>h(m.target.value),placeholder:t(l.authRepairRecoveryTokenPlaceholder),autoComplete:"off"})]}),r.jsx("p",{className:"setupRuntimeNote",children:t(l.authRepairRecoveryTokenHint)}),k?r.jsx("p",{className:"feedbackText",role:"alert",children:k}):null,r.jsx("button",{className:"primaryButton setupPrimaryButton",disabled:!w,type:"submit",children:t(g?l.authRepairSubmitting:l.authRepairSubmit)})]})})}const Ni="/login",ji="/repair",nS="/lobby";function sS(e,t){return MC(e)?{status:"unauthenticated"}:EC(e)?{status:"repairRequired"}:{status:"error",message:e instanceof Error?e.message:t}}function Mi(e){return e.lastProductSurface?pr(e.lastProductSurface):nS}const iS="modulepreload",lS=function(e){return"/"+e},Ei={},Fn=function(t,a,o){let n=Promise.resolve();if(a&&a.length>0){let u=function(h){return Promise.all(h.map(g=>Promise.resolve(g).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),c=i?.nonce||i?.getAttribute("nonce");n=u(a.map(h=>{if(h=lS(h),h in Ei)return;Ei[h]=!0;const g=h.endsWith(".css"),p=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${p}`))return;const k=document.createElement("link");if(k.rel=g?"stylesheet":iS,g||(k.as="script"),k.crossOrigin="",k.href=h,c&&k.setAttribute("nonce",c),document.head.appendChild(k),g)return new Promise((f,w)=>{k.addEventListener("load",f),k.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${h}`)))})}))}function s(i){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=i,window.dispatchEvent(c),!c.defaultPrevented)throw i}return n.then(i=>{for(const c of i||[])c.status==="rejected"&&s(c.reason);return t().catch(s)})},cS=()=>Fn(()=>import("./App-ChvP0G9X.js"),__vite__mapDeps([0,1,2,3,4,5])),dS=()=>Fn(()=>import("./App-C57f4p8k.js"),__vite__mapDeps([6,1,2,3,7,8])),uS=()=>Fn(()=>import("./App-CPqGDXVi.js"),__vite__mapDeps([9,1,2,7,4,10])),pS={chat:cS,work:dS,code:uS};function kd(e){return pS[e]}function On(e){return d.lazy(kd(e))}function hS(e,t=kd){return t(e)()}function fR(e){return hS(e)}const mS=5e3,gS=On("chat"),fS=On("work"),wS=On("code");function kS(){if(typeof navigator>"u")return"en";const e=Array.isArray(navigator.languages)&&navigator.languages.length>0?navigator.languages:[navigator.language];for(const t of e){const a=ml(t);if(a)return a}return"en"}function bS(e){return e?.language?.uiLanguagePreference??"auto"}function yS(e){return e==="auto"?kS():Jp(e)}function vS(e){return!!(e.guideCat&&wa(e.guideCat.status)&&!e.productSurfaceFallbackActive)}function CS({surface:e,translate:t,onVisibilityChange:a}){const o=gl(e,Op(e),t);return d.useEffect(()=>(a(!0),()=>a(!1)),[a]),r.jsx("div",{className:"screen screenCentered",children:r.jsxs("div",{className:"loadingPanel",children:[r.jsx("p",{className:"eyebrow",children:t("appBrandName")}),r.jsx("h1",{children:t("appLoadingWithSurface",{surface:o})})]})})}function oo(e,t,a){const o=e==="work"?fS:e==="code"?wS:gS;return r.jsx(d.Suspense,{fallback:r.jsx(CS,{surface:e,translate:a,onVisibilityChange:t}),children:r.jsx(o,{})})}function SS(e){return typeof e!="object"||e===null?null:sa(e.platformShellSurface)}function LS(e){return e.loadStatus!=="ready"||!e.setupComplete||ga(e.pathname)||vl(e.pathname)?e.t("appTitle"):null}function RS(e,t){const a=Date.parse(e.metadata.generatedAt),o=Date.parse(t.metadata.generatedAt);return Number.isNaN(a)||Number.isNaN(o)?!0:o>=a}function PS(){const e=ve(),t=Ne(),[a,o]=d.useState({status:"loading"}),[n,s]=d.useState(!1),[i,c]=d.useState(0),u=bS(a.status==="ready"?a.envelope:null),[h,g]=d.useState(null),p=h??u,k=yS(p),f=d.useMemo(()=>Fe(k),[k]),w=d.useRef(null),b=d.useRef(e.pathname),[m,C]=d.useState("chat");d.useEffect(()=>{g(null)},[u]);const v=d.useCallback(async(B,q)=>{try{const F=await Ca({signal:B,fallbackMessageForStatus:Q=>f("appLoadStateFailedWithStatus",{status:Q})});B?.aborted||d.startTransition(()=>o({status:"ready",envelope:F}))}catch(F){if(B?.aborted)return;const Q=sS(F,f("appLoadErrorMessage"));if(Q.status==="unauthenticated"){d.startTransition(()=>o({status:"unauthenticated"}));return}if(Q.status==="repairRequired"){d.startTransition(()=>o({status:"repairRequired"}));return}q?.suppressErrors||o(Q)}},[f]);d.useEffect(()=>{const B=new AbortController;return v(B.signal),()=>B.abort()},[v]),d.useEffect(()=>{function B(){v(void 0,{suppressErrors:!0})}return window.addEventListener(Do,B),()=>{window.removeEventListener(Do,B)}},[v]);const y=ga(e.pathname),L=an({hydrate:a.status==="ready"}),N=d.useCallback(()=>{L.update({sidecarSeen:!0})},[L.update]);d.useEffect(()=>{const B=b.current;b.current=e.pathname,!(!(y&&!ga(B))||a.status!=="ready")&&v(void 0,{suppressErrors:!0})},[y,e.pathname,v,a.status]),d.useEffect(()=>{const B=window.history.state;Fb(e.pathname,B?.idx),Tb(e.pathname,B?.idx)},[e.pathname]),d.useEffect(()=>{if(a.status!=="ready"||!y||typeof window>"u"||typeof document>"u")return;let B=null;const q=()=>{if(document.visibilityState==="hidden"||B)return;const W=new AbortController;B=W,Ca({signal:W.signal,fallbackMessageForStatus:D=>f("appLoadStateFailedWithStatus",{status:D})}).then(D=>{W.signal.aborted||d.startTransition(()=>{o(_=>_.status!=="ready"||!RS(_.envelope,D)?_:{status:"ready",envelope:{..._.envelope,runtime:D.runtime,runtimeSetup:D.runtimeSetup,metadata:D.metadata,bootstrapAttemptId:D.bootstrapAttemptId}})})}).catch(()=>{}).finally(()=>{B===W&&(B=null)})},F=window.setInterval(q,mS),Q=()=>{q()},me=()=>{document.visibilityState==="visible"&&q()};return window.addEventListener("focus",Q),document.addEventListener("visibilitychange",me),()=>{B&&B.abort(),window.clearInterval(F),window.removeEventListener("focus",Q),document.removeEventListener("visibilitychange",me)}},[y,a.status,f]);const T=a.status==="ready"?a.envelope:null,j=!!T?.setupCompleteAt,A=T?.lastProductSurface??null,R=SS(e.state),P=w.current,I=bh(R,P,A,m);if(d.useEffect(()=>{const B=LS({loadStatus:a.status,pathname:e.pathname,setupComplete:j,t:f});B&&(document.title=B)},[e.pathname,j,a.status]),d.useEffect(()=>{a.status!=="ready"||!j||br().then(B=>wg(B)).catch(()=>{})},[j,a.status]),d.useEffect(()=>{if(a.status!=="ready")return;const B=a.envelope.lastProductSurface??null;B&&C(q=>q===B?q:B)},[a.status,a.status==="ready"?a.envelope.lastProductSurface:null]),d.useEffect(()=>{if(Pa(e.pathname)){C(B=>B===I?B:I);return}},[e.pathname,I]),d.useEffect(()=>{if(!j)return;const B=kh(e.pathname);if(!(e.pathname==="/"&&A!=="chat")&&!(e.pathname==="/"&&!A)&&!wh(e.pathname)){if(C(q=>q===B?q:B),w.current===null){w.current=B,B!==A&&(d.startTransition(()=>{o(q=>q.status==="ready"?{status:"ready",envelope:{...q.envelope,lastProductSurface:B}}:q)}),fetch("/api/platform/preferences",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({lastProductSurface:B})}).catch(()=>{}));return}B!==w.current&&(w.current=B,d.startTransition(()=>{o(q=>q.status==="ready"?{status:"ready",envelope:{...q.envelope,lastProductSurface:B}}:q)}),fetch("/api/platform/preferences",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({lastProductSurface:B})}).catch(()=>{}))}},[j,A,e.pathname]),a.status==="loading")return r.jsx(Ot,{languagePreference:p,locale:k,setLanguagePreference:g,children:r.jsx("div",{className:"screen screenCentered",children:r.jsxs("div",{className:"loadingPanel",children:[r.jsx("p",{className:"eyebrow",children:f("appBrandName")}),r.jsx("h1",{children:f("appLoadingEllipsis")})]})})});if(a.status==="error")return r.jsx(Ot,{languagePreference:p,locale:k,setLanguagePreference:g,children:r.jsx("div",{className:"screen screenCentered",children:r.jsxs("div",{className:"errorPanel",children:[r.jsx("p",{className:"eyebrow",children:f("appErrorEyebrow")}),r.jsx("h1",{children:f("appErrorTitle")}),r.jsx("p",{children:a.message})]})})});if(a.status==="unauthenticated")return r.jsx(Ot,{languagePreference:p,locale:k,setLanguagePreference:g,children:r.jsxs(na,{children:[r.jsx(Z,{path:Ni,element:r.jsx(Di,{onAuthenticated:B=>{const q=Mi(B);Wt.flushSync(()=>o({status:"ready",envelope:B})),t(q,{replace:!0})}})}),r.jsx(Z,{path:"*",element:r.jsx(gt,{to:Ni,replace:!0})})]})});if(a.status==="repairRequired")return r.jsx(Ot,{languagePreference:p,locale:k,setLanguagePreference:g,children:r.jsxs(na,{children:[r.jsx(Z,{path:ji,element:r.jsx(oS,{onRepaired:B=>{const q=Mi(B);Wt.flushSync(()=>o({status:"ready",envelope:B})),t(q,{replace:!0})}})}),r.jsx(Z,{path:"*",element:r.jsx(gt,{to:ji,replace:!0})})]})});const{envelope:O}=a;if(!O.setupCompleteAt)return r.jsx(Ot,{languagePreference:p,locale:k,setLanguagePreference:g,children:r.jsxs(na,{children:[r.jsx(Z,{path:"/setup",element:r.jsx(XC,{envelope:O,onComplete:B=>{Wt.flushSync(()=>{o({status:"ready",envelope:B}),B.guideCat&&wa(B.guideCat.status)&&L.hydrated&&!L.prefs.sidecarSeen&&c(q=>q+1)}),t("/lobby",{replace:!0})}})}),r.jsx(Z,{path:"*",element:r.jsx(gt,{to:"/setup",replace:!0})})]})});const $=!!O.lastProductSurface?pr(I):"/lobby",G={guideCat:O.guideCat,productSurfaceFallbackActive:n},ee=vS(G);return r.jsx(Ot,{languagePreference:p,locale:k,setLanguagePreference:g,children:r.jsxs($h,{guideCat:ee?G.guideCat:null,placement:L.prefs.placement,floatingAnchor:L.prefs.floatingAnchor,sidecarMode:L.prefs.sidecarMode,proactiveGreetingToken:i,onPersistSeen:N,onCommit:L.update,children:[ee?r.jsx($m,{guideCat:G.guideCat,ownerDisplayName:O.ownerDisplayName,unreadCount:0,onDismissed:()=>{v()}}):null,r.jsxs(na,{children:[r.jsx(Z,{path:"/lobby",element:r.jsx(jC,{envelope:O})}),r.jsxs(Z,{element:r.jsx(Eb,{envelope:O}),children:[r.jsx(Z,{path:"/entities",element:r.jsx(pb,{envelope:O})}),r.jsx(Z,{path:"/entities/cats",element:r.jsx(_k,{})}),r.jsx(Z,{path:"/entities/cats/:catId",element:r.jsx(fw,{})}),r.jsx(Z,{path:"/entities/clowders",element:r.jsx(fb,{envelope:O})}),r.jsx(Z,{path:"/entities/clowders/:clowderId",element:r.jsx(Xs,{envelope:O})}),r.jsx(Z,{path:"/entities/clowders/:clowderId/:tab",element:r.jsx(Xs,{envelope:O})}),r.jsx(Z,{path:"/entities/catteries",element:r.jsx(wb,{envelope:O})}),r.jsx(Z,{path:"/entities/catteries/:catteryId",element:r.jsx(Js,{envelope:O})}),r.jsx(Z,{path:"/entities/catteries/:catteryId/:tab",element:r.jsx(Js,{envelope:O})})]}),r.jsx(Z,{path:"/apps/:appId/*",element:r.jsx(Ym,{envelope:O})}),r.jsx(Z,{path:"/products",element:r.jsx(gt,{to:"/lobby",replace:!0})}),r.jsx(Z,{path:"/login",element:r.jsx(Di,{onAuthenticated:B=>{Wt.flushSync(()=>o({status:"ready",envelope:B})),t($,{replace:!0})}})}),r.jsx(Z,{element:r.jsx(Kb,{envelope:O}),children:r.jsx(Z,{path:"/settings/*",element:r.jsx(dC,{})})}),r.jsx(Z,{path:`${Er.chat.routePrefix}/*`,element:oo("chat",s,f)}),r.jsx(Z,{path:`${Er.work.routePrefix}/*`,element:oo("work",s,f)}),r.jsx(Z,{path:`${Er.code.routePrefix}/*`,element:oo("code",s,f)}),r.jsx(Z,{path:"/setup",element:r.jsx(gt,{to:$,replace:!0})}),r.jsx(Z,{path:"/",element:r.jsx(gt,{to:$,replace:!0})}),r.jsx(Z,{path:"*",element:r.jsx(gt,{to:$,replace:!0})})]})]})})}const AS=new Tp({defaultOptions:{queries:{staleTime:5e3,refetchOnWindowFocus:!0,refetchOnMount:"always",retry:1}}});xv();xh();yd.createRoot(document.getElementById("root")).render(r.jsx(Ii.StrictMode,{children:r.jsx(Dp,{client:AS,children:r.jsx(qu,{useTransitions:!1,children:r.jsx(PS,{})})})}));export{mf as $,jS as A,EL as B,_L as C,IL as D,Ds as E,OL as F,NL as G,un as H,de as I,Fe as J,Ne as K,Nt as L,lr as M,gt as N,zt as O,dh as P,Ch as Q,na as R,ur as S,TS as T,VL as U,zL as V,$L as W,qL as X,ys as Y,_t as Z,sf as _,Gf as a,fR as a$,AS as a0,mL as a1,uh as a2,vw as a3,NC as a4,rf as a5,hL as a6,wL as a7,pL as a8,gL as a9,HL as aA,We as aB,ve as aC,ru as aD,GL as aE,UL as aF,WL as aG,Pa as aH,Il as aI,on as aJ,rn as aK,sd as aL,Pt as aM,At as aN,xt as aO,Pn as aP,zw as aQ,qw as aR,$w as aS,Cw as aT,ar as aU,tr as aV,Jw as aW,tR as aX,aR as aY,eR as aZ,Cf as a_,Kl as aa,Nm as ab,xf as ac,LL as ad,rt as ae,hn as af,Bl as ag,nn as ah,Va as ai,Bt as aj,cn as ak,wr as al,cc as am,GS as an,PL as ao,It as ap,cC as aq,Xc as ar,Zc as as,Ql as at,BS as au,US as av,IS as aw,FS as ax,iR as ay,hR as az,fL as b,Ts as b$,$S as b0,nL as b1,zg as b2,oL as b3,sL as b4,Gg as b5,zS as b6,gR as b7,Sn as b8,rR as b9,pf as bA,CL as bB,vL as bC,ZL as bD,XL as bE,JL as bF,XS as bG,TL as bH,qS as bI,xL as bJ,AL as bK,kL as bL,cL as bM,nf as bN,lL as bO,rL as bP,iL as bQ,oR as bR,nR as bS,sR as bT,mt as bU,pr as bV,Et as bW,at as bX,JS as bY,Re as bZ,ah as b_,mR as ba,Pk as bb,ft as bc,Be as bd,YL as be,wk as bf,Am as bg,nd as bh,BL as bi,FL as bj,Yt as bk,Zm as bl,Ze as bm,KS as bn,OS as bo,Hg as bp,bL as bq,DL as br,Lk as bs,Kg as bt,VS as bu,YS as bv,et as bw,eL as bx,ZS as by,tL as bz,Z as c,RL as c0,WS as c1,HS as c2,aL as c3,QS as c4,_S as c5,Dc as c6,Wc as c7,gc as c8,ce as c9,jn as cA,sa as cB,dR as cC,Qr as cD,Nn as cE,td as cF,jt as ca,ES as cb,vn as cc,ba as cd,Rn as ce,uR as cf,cR as cg,lR as ch,yL as ci,SL as cj,As as ck,QL as cl,pR as cm,sg as cn,uL as co,dL as cp,al as cq,nu as cr,Bp as cs,MS as ct,rh as cu,Wt as cv,sb as cw,nb as cx,Fp as cy,vr as cz,fp as d,cp as e,DS as f,co as g,Ve as h,jL as i,ll as j,ip as k,lo as l,l as m,fe as n,nl as o,ML as p,Lp as q,Mp as r,KL as s,lp as t,U as u,pp as v,Me as w,ha as x,Pp as y,NS as z};
|