1import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{t}from"./react-DVplv7_D.js";import{t as n}from"./dist-DA8TKJha.js";var r=Object.defineProperty,i=(e,t)=>r(e,`name`,{value:t,configurable:!0}),a=!!(typeof window<`u`&&window.document&&window.document.createElement);function o(e,t,{checkForDefaultPrevented:n=!0}={}){return i(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}i(o,`composeEventHandlers`);function s(e){if(!a)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}i(s,`getOwnerWindow`);function c(e){if(!a)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}i(c,`getOwnerDocument`);function l(e,t=!1){let{activeElement:n}=c(e);if(!n?.nodeName)return null;if(u(n)&&n.contentDocument)return l(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=c(n).getElementById(e);if(t)return t}}return n}i(l,`getActiveElement`);function u(e){return e.tagName===`IFRAME`}i(u,`isFrame`);var d=e(t(),1),f=Object.defineProperty,p=(e,t)=>f(e,`name`,{value:t,configurable:!0}),m=d.useEffectEvent,h=d.useInsertionEffect;function g(e){if(typeof m==`function`)return m(e);let t=d.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof h==`function`?h(()=>{t.current=e}):n(()=>{t.current=e}),d.useMemo(()=>((...e)=>t.current?.(...e)),[])}p(g,`useEffectEvent`);var _=Object.defineProperty,v=(e,t)=>_(e,`name`,{value:t,configurable:!0}),y=d.useInsertionEffect||n;function b({prop:e,defaultProp:t,onChange:n=v(()=>{},`onChange`),caller:r}){let[i,a,o]=x({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,d.useCallback(t=>{if(s){let n=S(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}v(b,`useControllableState`);function x({defaultProp:e,onChange:t}){let[n,r]=d.useState(e),i=d.useRef(n),a=d.useRef(t);return y(()=>{a.current=t},[t]),d.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}v(x,`useUncontrolledState`);function S(e){return typeof e==`function`}v(S,`isFunction`);var C=Symbol(`RADIX:SYNC_STATE`);function w(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=g(o),u=[{...n,state:a}];r&&u.push(r);let[f,p]=d.useReducer((t,n)=>{if(n.type===C)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),m=f.state,h=d.useRef(m);d.useEffect(()=>{h.current!==m&&(h.current=m,c||l(m))},[m,h,c]);let _=d.useMemo(()=>i===void 0?f:{...f,state:i},[f,i]);return d.useEffect(()=>{c&&!Object.is(i,f.state)&&p({type:C,state:i})},[i,f.state,c]),[_,p]}v(w,`useControllableStateReducer`);export{o as n,b as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.