{"version":3,"file":"index.mjs","sources":["../../src/index.tsx"],"sourcesContent":["import * as React from 'react'\n\nfunction useMergedRef<T>(...refs: React.Ref<T>[]): React.RefCallback<T> {\n  return React.useCallback(\n    (element: T) => {\n      for (let i = 0; i < refs.length; i++) {\n        const ref = refs[i]\n        if (typeof ref === 'function') ref(element)\n        else if (ref && typeof ref === 'object')\n          (ref as React.MutableRefObject<T>).current = element\n      }\n    },\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n    refs\n  )\n}\n\nexport default useMergedRef\n"],"names":["refs","React","element","i","length","ref","current"],"mappings":"mDAEA,sCAA4BA,2BAAAA,yBACnBC,EACJC,QACM,IAAIC,EAAI,EAAGA,EAAIH,EAAKI,OAAQD,IAAK,KAC9BE,EAAML,EAAKG,GACE,mBAARE,EAAoBA,EAAIH,GAC1BG,GAAsB,iBAARA,IACpBA,EAAkCC,QAAUJ,KAInDF"}