import{c as v,z as I}from"./index-XbihxApF.js";import{u as x}from"./useQuery-DQ6fRPhk.js";import{u as L}from"./useMutation-BYWleyfK.js";function M(t){try{return JSON.parse(t)}catch{return}}function y(t,s){const e=localStorage.getItem(t),o=e?M(e):void 0,a=typeof s=="function"?s(o):o??s;if(o===void 0||a!==o)try{const n=JSON.stringify(a);localStorage.setItem(t,n)}catch{}return a}function A(t,s){const e=v.c(25),o=I();let a;e[0]!==t?(a=["localStorage",t],e[0]=t,e[1]=a):a=e[1];const n=a;let r,i;e[2]!==s||e[3]!==t?(r=()=>y(t,s),i=()=>y(t,s),e[2]=s,e[3]=t,e[4]=r,e[5]=i):(r=e[4],i=e[5]);let m;e[6]!==n||e[7]!==r||e[8]!==i?(m={queryKey:n,queryFn:r,initialData:i,staleTime:1/0,gcTime:1/0},e[6]=n,e[7]=r,e[8]=i,e[9]=m):m=e[9];const{data:C}=x(m);let l;e[10]!==t?(l=async c=>{const $=JSON.stringify(c);return localStorage.setItem(t,$),c},e[10]=t,e[11]=l):l=e[11];let h;e[12]!==o||e[13]!==n?(h=c=>{o.setQueryData(n,c)},e[12]=o,e[13]=n,e[14]=h):h=e[14];let u;e[15]!==l||e[16]!==h?(u={mutationFn:l,onSuccess:h},e[15]=l,e[16]=h,e[17]=u):u=e[17];const g=L(u);let d;e[18]!==g||e[19]!==o||e[20]!==n?(d=c=>{const $=o.getQueryData(n),O=typeof c=="function"?c($):c;g.mutate(O)},e[18]=g,e[19]=o,e[20]=n,e[21]=d):d=e[21];const S=d,p=C;let f;return e[22]!==S||e[23]!==p?(f=[p,S],e[22]=S,e[23]=p,e[24]=f):f=e[24],f}const D={assistantChatThreads:t=>`mesh:assistant-chat:threads:${t}`,messages:(t,s)=>`mesh:messages:${t}:${s}`,decoChatOpen:()=>"mesh:decochat:open",chatSelectedModel:t=>`mesh:chat:selectedModel:${t}`,chatSelectedMode:t=>`mesh:chat:selectedMode:${t}`,assistantChatActiveThread:t=>`mesh:assistant-chat:active-thread:${t}`,decoChatPanelWidth:()=>"mesh:decochat:panel-width",sidebarOpen:()=>"mesh:sidebar-open",selectedRegistry:t=>`mesh:store:selected-registry:${t}`,orgHomeQuickstart:t=>`mesh:org-home:quickstart:${t}`,storeShowStdio:()=>"mesh:store:show-stdio",preferences:()=>"mesh:user:preferences",pluginConnection:(t,s)=>`mesh:plugin:connection:${t}:${s}`};export{D as L,A as u};
