try{let e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`b4fdf5ee-5bdf-4cb1-a31b-31ae8cd7ece8`,e._sentryDebugIdIdentifier=`sentry-dbid-b4fdf5ee-5bdf-4cb1-a31b-31ae8cd7ece8`)}catch{}import{o as e}from"./rolldown-runtime-eb2nym32.js";import{Ag as t,Fg as n,Ig as r}from"./entry.client-dr7r6s9a.js";import{t as i}from"./Announcer-ns276d3u.js";var a=e(r(),1),o=(0,a.createContext)(void 0);o.displayName=`AnnouncementContext`;var s=()=>{let e=(0,a.useContext)(o);if(!e)throw Error(`This context can only be used by components inside <AnnouncementProvider>...</AnnouncementProvider>`);return e},c=t();function l({children:e}){let[t,n]=(0,a.useState)({}),r=(0,a.useRef)({}),s=(0,a.useCallback)((e,t)=>{(!(e in r.current)||r.current[e].text!==t.text||r.current[e].priority!==t.priority)&&n(n=>{let i={...n,[e]:t};return r.current=i,i})},[r,n]),l=(0,a.useCallback)(e=>{e in r.current&&n(t=>{let{[e]:n,...i}=t;return r.current=i,i})},[r,n]),u=(0,a.useMemo)(()=>({announcements:t,addAnnouncement:s,removeAnnouncement:l}),[t,s,l]);return(0,c.jsxs)(o.Provider,{value:u,children:[(0,c.jsx)(i,{announcements:t}),e]})}var u=n();function d(e,t){let n=(0,u.c)(11),r=(0,a.useId)(),{addAnnouncement:i,removeAnnouncement:o}=s(),c,l;n[0]!==e||n[1]!==i||n[2]!==r||n[3]!==t||n[4]!==o?(c=()=>{e?i(r,{text:e,priority:t}):o(r)},l=[i,o,r,e,t],n[0]=e,n[1]=i,n[2]=r,n[3]=t,n[4]=o,n[5]=c,n[6]=l):(c=n[5],l=n[6]),(0,a.useEffect)(c,l);let d,f;n[7]!==o||n[8]!==r?(d=()=>()=>{o(r)},f=[o,r],n[7]=o,n[8]=r,n[9]=d,n[10]=f):(d=n[9],f=n[10]),(0,a.useEffect)(d,f)}export{l as n,d as t};