PageSourceSearch

https://www.curve.finance/assets/useDebounce-DMPe4DlA.js

js curve.finance collected 2026-10-02 14:40:42 UTC 1,015 bytes, 2 lines download raw bytes

1import{n as e}from"./rolldown-runtime-C_s2cVnS.js";import{Fr as t,P as n,q as r,rt as i,ut as a}from"./constants-BrdLIBOU.js";import{t as o}from"./lodash-DIi631QJ.js";function s(e,t=n.FormDebounce,r){let i=(0,d.useRef)(null),a=(0,d.useCallback)(()=>void(i.current&&clearTimeout(i.current)),[]);return(0,d.useEffect)(()=>a,[a]),(0,d.useCallback)((...n)=>{a(),r?.(...n),i.current=window.setTimeout(()=>{e(...n),i.current=null},t)},[e,a,t,r])}function c({initialValue:e,debounceMs:t=n.FormDebounce,callback:r}){let[i,a]=(0,d.useState)(e);return(0,d.useEffect)(()=>a(e),[e]),[i,s(r,t,a)]}function l(e,t,{debounceMs:r=n.FormDebounce}={}){let i=(0,d.useMemo)(()=>(0,u.pick)(e,a(t)),[e,t]),[o,s]=(0,d.useState)(i);(0,d.useEffect)(()=>{let e=setTimeout(()=>s(i),r);return()=>clearTimeout(e)},[r,i]);let c=!(0,u.isEqual)(o,i);return[(0,d.useMemo)(()=>({...e,...o}),[e,o]),c]}var u,d;function f(){return(f=e((()=>{u=o(),d=t(),i(),r()})))()}export{l as i,c as n,s as r,f as t};
2//# sourceMappingURL=useDebounce-DMPe4DlA.js.map

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.