{"version":3,"file":"useEventCallback-fd2c865e.js","sources":["../../../../../../app/node_modules/@restart/hooks/esm/useCommittedRef.js","../../../../../../app/node_modules/@restart/hooks/esm/useEventCallback.js"],"sourcesContent":["import { useEffect, useRef } from 'react';\n\n/**\n * Creates a `Ref` whose value is updated in an effect, ensuring the most recent\n * value is the one rendered with. Generally only required for Concurrent mode usage\n * where previous work in `render()` may be discarded before being used.\n *\n * This is safe to access in an event handler.\n *\n * @param value The `Ref` value\n */\nfunction useCommittedRef(value) {\n const ref = useRef(value);\n useEffect(() => {\n ref.current = value;\n }, [value]);\n return ref;\n}\nexport default useCommittedRef;","import { useCallback } from 'react';\nimport useCommittedRef from './useCommittedRef';\nexport default function useEventCallback(fn) {\n const ref = useCommittedRef(fn);\n return useCallback(function (...args) {\n return ref.current && ref.current(...args);\n }, [ref]);\n}"],"names":["useCommittedRef","value","ref","useRef","useEffect","useEventCallback","fn","useCallback","args"],"mappings":"wCAWA,SAASA,EAAgBC,EAAO,CAC9B,MAAMC,EAAMC,SAAOF,CAAK,EACxBG,OAAAA,EAAAA,UAAU,IAAM,CACdF,EAAI,QAAUD,CAClB,EAAK,CAACA,CAAK,CAAC,EACHC,CACT,CCfe,SAASG,EAAiBC,EAAI,CAC3C,MAAMJ,EAAMF,EAAgBM,CAAE,EAC9B,OAAOC,EAAW,YAAC,YAAaC,EAAM,CACpC,OAAON,EAAI,SAAWA,EAAI,QAAQ,GAAGM,CAAI,CAC7C,EAAK,CAACN,CAAG,CAAC,CACV","x_google_ignoreList":[0,1]}