import{a as e}from"./chunk-BNv3lrIs.js";import{n as t}from"./jsx-runtime-pmtNMKr4.js";var n=e(t());function r(e){let t=(0,n.useRef)(e);return(0,n.useEffect)(()=>{t.current=e},[e]),t}function i(e){let t=r(e);return(0,n.useCallback)(function(...e){return t.current&&t.current(...e)},[t])}function a(){let e=(0,n.useRef)(!0),t=(0,n.useRef)(()=>e.current);return(0,n.useEffect)(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}function o(e){let t=(0,n.useRef)(null);return(0,n.useEffect)(()=>{t.current=e}),t.current}var s=typeof window<`u`&&window.navigator&&window.navigator.product===`ReactNative`,c=typeof document<`u`||s?n.useLayoutEffect:n.useEffect,l=`data-rr-ui-`,u=`rrUi`;function d(e){return`${l}${e}`}function f(e){return`${u}${e}`}export{a,o as i,f as n,i as o,c as r,d as t};