{"version":3,"file":"index.esm.DWgbitBa.mjs","names":["n","r"],"sources":["https:/ga.jspm.io/npm:@react-hooks-library/core@0.6.2/index.esm.js"],"sourcesContent":["import{useEffect as e,useState as t,useRef as n,useCallback as r,useLayoutEffect as o}from\"react\";\n/**\n * Run a function when a component is mounted.\n *\n * @deprecated This hook breaks in React 18's strict mode, since it's not idempotent\n *\n * @param callback function to be executed\n */function useMount(t){e(t,[])}\n/**\n * Reactive media query hook that returns the truthy value of the media query.\n *\n * @param {string} query\n * @returns {boolean} boolean value of the query\n *\n * @see https://react-hooks-library.vercel.app/core/useMediaQuery\n */function useMediaQuery(n){const[r,o]=t(false);useMount((()=>{o(window.matchMedia(n).matches)}));e((()=>{const e=window.matchMedia(n);const handler=e=>{o(e.matches)};\"addEventListener\"in e?e.addEventListener(\"change\",handler):e.addListener(handler);return()=>{\"addEventListener\"in e?e.removeEventListener(\"change\",handler):e.removeListener(handler)}}),[n]);return r}const s={sm:640,md:768,lg:1024,xl:1280,\"2xl\":1536};const u={sm:576,md:768,lg:992,xl:1200,xxl:1400};const i={xs:600,sm:960,md:1264,lg:1904};const c={xs:480,sm:576,md:768,lg:992,xl:1200,xxl:1600};const a={mobileS:320,mobileM:375,mobileL:425,tablet:768,laptop:1024,laptopL:1440,desktop4K:2560};\n/* eslint-disable @typescript-eslint/ban-types */const l=typeof window!==\"undefined\";const isRef=e=>e!==null&&typeof e===\"object\"&&Object.prototype.hasOwnProperty.call(e,\"current\");const isFunction=e=>typeof e===\"function\";const isString=e=>typeof e===\"string\";const noop=()=>{};const round=e=>Math.round(e*100)/100\n/**\n * Accepts either a ref object or a dom node and returns a dom node\n *\n * @param target - ref or a dom node\n * @returns dom noe\n */;function unRef(e){const t=isRef(e)?e.current:e;return t}const d=l?window:void 0;const v=l?window.document:void 0;const f=l?window.navigator:void 0;function match(e){return!!d&&d.matchMedia(e).matches}\n/**\n * Reactive hooks and utilities to be used with user provided breakpoints.\n *\n * @param {string} breakpoints\n * @returns functions to be used as hooks\n *\n * @see https://react-hooks-library.vercel.app/core/BreakPointHooks\n */function BreakPointHooks(e){return{\n/**\n         * Hook that returns a boolean if screen width is greater than given breakpoint.\n         *\n         * @param k {string} breakpoint\n         * @returns boolean\n         *\n         * @see https://react-hooks-library.vercel.app/core/BreakPointHooks\n         **/\nuseGreater:t=>useMediaQuery(`(min-width: ${e[t]}px)`),\n/**\n         * Hook that returns a boolean if screen width is smaller than given breakpoint.\n         *\n         * @param k {string} breakpoint\n         * @param k {string} breakpoint\n         *\n         * @returns boolean\n         *\n         * @see https://react-hooks-library.vercel.app/core/BreakPointHooks\n         **/\nuseSmaller:t=>useMediaQuery(`(max-width: ${e[t]}px)`),\n/**\n         * Hook that returns a boolean if screen width is between two given breakpoint.\n         *\n         * @param a {string} breakpoint\n         * @param b {string} breakpoint\n         *\n         * @returns boolean\n         *\n         * @see https://react-hooks-library.vercel.app/core/BreakPointHooks\n         **/\nuseBetween:(t,n)=>useMediaQuery(`(min-width: ${e[t]}px) and (max-width: ${e[n]}px)`),\n/**\n         * Utility function that returns a boolean if screen width is greater than given breakpoint.\n         *\n         * @param k {string} breakpoint\n         *\n         * @see https://react-hooks-library.vercel.app/core/BreakPointHooks\n         **/\nisGreater(t){return match(`(min-width: ${e[t]}px)`)},\n/**\n         * Utility function that returns a boolean if screen width is smaller than given breakpoint.\n         *\n         * @param k {string} breakpoint\n         *\n         * @see https://react-hooks-library.vercel.app/core/BreakPointHooks\n         **/\nisSmaller(t){return match(`(max-width: ${e[t]}px)`)},\n/**\n         * Utility function that returns a boolean if screen width is between two given breakpoint.\n         *\n         * @param k {string} breakpoint\n         *\n         * @see https://react-hooks-library.vercel.app/core/BreakPointHooks\n         **/\nisInBetween(t,n){return match(`(min-width: ${e[t]}px) and (max-width: ${e[n]}px)`)}}}function useEventListener(...t){let r=d;let o;let s;let u;isString(t[0])?[o,s,u]=t:[r,o,s,u]=t;const i=n(s);const c=n(noop);e((()=>{i.current=s}),[s]);e((()=>{const e=unRef(r);if(l&&e){e.addEventListener(o,i.current,u);c.current=()=>{e.removeEventListener(o,i.current,u)};return c.current}}),[o,r,u]);return c.current}\n/**\n * Reactive document.activeElement, returns a reference to current active element\n *\n * @returns current active element (DOM node)\n **/function useActiveElement(){const[e,n]=t((()=>v===null||v===void 0?void 0:v.activeElement));useEventListener(\"focus\",(()=>n(v===null||v===void 0?void 0:v.activeElement)),true);useEventListener(\"blur\",(()=>n(null)),true);return{activeElement:e}}function useAsyncCallback(e){const[n,o]=t(false);const[s,u]=t(false);const[i,c]=t(false);const[a,l]=t();const d=r((async(...t)=>{try{o(true);const n=await e(...t);l(n);u(true);return n}catch(e){c(true);throw e}finally{o(false)}}),[e]);return[{data:a,error:i,isLoading:n,isSuccess:s},d]}\n/**\n * Listen for clicks outside of an element.\n *\n * @param target\n * @param handler\n * @param options\n *\n * @see https://react-hooks-library.vercel.app/core/onClickOutside\n */function useClickOutside(e,t,n={}){const{event:o=\"pointerdown\"}=n;const s=r((n=>{const r=unRef(e);r&&(r===n.target||n.composedPath().includes(r)||t(n))}),[t,e]);return useEventListener(d,o,s,{passive:true})}\n/**\n * Used to debounce a quickly changing value.\n * Will return the latest value after a specified amount of time.\n *\n * @param {T} value\n * @param timeout\n * @returns {Readonly<T>} latest value\n * @see https://react-hooks-library.vercel.app/core/useDebounce\n */function useDebounce(n,r){const[o,s]=t(n);e((()=>{const e=setTimeout((()=>s(n)),r);return()=>clearTimeout(e)}),[n,r]);return r<=0?n:o}\n/**\n * A useEffect hook does that not run on mount, but only on subsequent updates.\n *\n * @deprecated This hook breaks in React 18's strict mode, since it's not idempotent\n *\n * @param effect\n * @param deps\n *\n * @see https://react-hooks-library.vercel.app/core/useEffectAfterMount\n */function useEffectAfterMount(t,r){const o=n(false);e((()=>{let e;o.current&&(e=t());o.current=true;return e}),r)}\n/**\n * React FontFace, a hook to load fonts asynchronously\n *\n * @param family\n * @param source\n * @param descriptors\n *\n * @see https://react-hooks-library.vercel.app/core/useFont\n */function useFont(n,r,o){const[s,u]=t(true);const[i,c]=t(false);const[a,l]=t(null);e((()=>{const e=new FontFace(n,`url(${r})`,o);l(e);u(false);e.load().then((()=>document.fonts.add(e))).catch((()=>c(true))).finally((()=>u(true)))}),[o,n,r]);return{loaded:s,error:i,font:a}}\n/**\n * Hook that returns whether or not the component has mounted.\n * Useful in SSR frameworks like Next or Gatsby.\n *\n * @returns hasMounted\n */function useHasMounted(){const[e,n]=t(false);useMount((()=>{n(true)}));return e}\n/**\n *\n * Detect if a dom element is hovered\n *\n * @param target - The element to listen to\n * @returns\n */function useHover(n){const[r,o]=t(false);e((()=>{const e=unRef(n);if(!e)return;const onMouseEnter=()=>o(true);const onMouseLeave=()=>o(false);e.addEventListener(\"mouseenter\",onMouseEnter);e.addEventListener(\"mouseleave\",onMouseLeave);return()=>{e.removeEventListener(\"mouseenter\",onMouseEnter);e.removeEventListener(\"mouseleave\",onMouseLeave)}}),[n]);return r}\n/**\n * Is a feature supported in the browser or not\n *\n * @param predicate - predicate to check if the feature is supported\n *\n * @see https://react-hooks-library.vercel.app/core/useIsSupported\n */function useIsSupported(e){const[n,r]=t(false);useMount((()=>{r(e())}));return n}\n/**\n * Run a function when component is unmounted.\n *\n * @deprecated This hook breaks in React 18's strict mode, since it's not idempotent\n *\n * @param callback function to be executed\n */function useUnMount(t){e((()=>t),[t])}\n/**\n * Reactive intersection observer.\n *\n * @param target - React ref or DOM node\n * @param options - Options passed to mutation observer\n * @param callback - callback to execute when mutations are observed\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver IntersectionObserver MDN\n * @see https://react-hooks-library.vercel.app/core/useIntersectionObserver\n */function useIntersectionObserver(o,s={},u=noop){const{root:i=v,rootMargin:c=\"0px\",threshold:a=0}=s;const[l,d]=t(false);const[f,h]=t(null);const p=useIsSupported((()=>\"IntersectionObserver\"in window));const m=n(null);const w=r((()=>{if(m.current){m.current.disconnect();m.current=null}}),[]);useUnMount(w);e((()=>{var e;const t=unRef(o);const n=unRef(i);if(p&&t&&n){m.current=new window.IntersectionObserver(((e,t)=>{const n=Array.isArray(a)?a:[a];e.forEach((e=>{const t=e.isIntersecting&&n.some((t=>e.intersectionRatio>=t));d(t);h(e)}));u(e,t)}),{root:n,rootMargin:c,threshold:a});(e=m.current)===null||e===void 0?void 0:e.observe(t);return w}}),[u,p,i,c,w,o,a]);return{isSupported:p,stop:w,inView:l,entry:f}}function useInterval(t,r,o){const{immediate:s=false,paused:u=false}=o||{};const i=n(t);const c=n();e((()=>{i.current=t;!u&&s&&t()}),[t,s,u]);e((()=>{if(!c.current||!u){c.current=setInterval((()=>i.current()),r);return()=>c.current&&clearInterval(c.current)}clearInterval(c.current)}),[r,u])}\n/**\n * Listen for keyboard keys being stroked.\n *\n * @param keys\n * @param handler\n * @param options\n *\n * @see https://react-hooks-library.vercel.app/core/useKeyStroke\n */function useKeyStroke(e,t,n={}){const{target:o=d,eventName:s=\"keydown\",passive:u=false,code:i=false}=n;const c=r((n=>{const r=i?n.code:n.key;e.includes(r)&&t(n)}),[i,t,e]);return useEventListener(o,s,c,{passive:u})}\n/**\n * Listen for keyboard keys on keydown.\n *\n * @param keys\n * @param handler\n * @param options\n *\n * @see https://react-hooks-library.vercel.app/core/useKeyStroke\n */function useKeyDown(e,t,n={}){return useKeyStroke(e,t,Object.assign(Object.assign({},n),{eventName:\"keydown\"}))}\n/**\n * Listen for keyboard keys on keypress.\n *\n * @param keys\n * @param handler\n * @param options\n *\n * @see https://react-hooks-library.vercel.app/core/onKeyStroke\n */function useKeyPressed(e,t,n={}){return useKeyStroke(e,t,Object.assign(Object.assign({},n),{eventName:\"keypress\"}))}\n/**\n * Listen for keyboard keys on keyup.\n *\n * @param keys\n * @param handler\n * @param options\n *\n * @see https://react-hooks-library.vercel.app/core/onKeyStroke\n */function useKeyUp(e,t,n={}){return useKeyStroke(e,t,Object.assign(Object.assign({},n),{eventName:\"keyup\"}))}\n/**\n * Modified `useState` hook that syncs with localStorage.\n *\n * @param key\n * @param initialValue\n * @param options\n *\n * @see https://react-hooks-library.vercel.app/core/useLocalStorage\n */function useLocalStorage(e,n,o){const[s,u]=t(n);const{deserialize:i=JSON.parse,serialize:c=JSON.stringify}=o||{};useMount((()=>{try{const t=localStorage.getItem(e);t&&u(i(t))}catch(e){console.error(e)}}));const a=r((t=>{try{localStorage.setItem(e,c(t));u(t)}catch(e){console.error(e)}}),[e,c]);return[s,a]}const buildState=e=>{const{state:t,length:n}=(d===null||d===void 0?void 0:d.history)||{};const{hash:r,host:o,hostname:s,href:u,origin:i,pathname:c,port:a,protocol:l,search:v}=(d===null||d===void 0?void 0:d.location)||{};return{trigger:e,state:t,length:n,hash:r,host:o,hostname:s,href:u,origin:i,pathname:c,port:a,protocol:l,search:v}};function useLocation(){const[e,n]=t(null);useMount((()=>{n(buildState(\"load\"))}));useEventListener(\"popstate\",(()=>n(buildState(\"popstate\"))),{passive:true});useEventListener(\"hashchange\",(()=>n(buildState(\"hashchange\"))),{passive:true});return e}\n/**\n * Reactive `mediaDevices.getUserMedia` streaming\n *\n * @param options\n *\n * @see https://react-hooks-library.vercel.app/core/useMediaStream\n */function useMediaStream(o={}){const{audioDeviceId:s,videoDeviceId:u,autoSwitch:i}=o;const c=useIsSupported((()=>{var e;return!!((e=f===null||f===void 0?void 0:f.mediaDevices)===null||e===void 0?void 0:e.getUserMedia)}));const a=n(null);const l=n(null);const[d,v]=t(false);const[h,p]=t(false);const[m,w]=t(false);const g=r((e=>e!==\"none\"&&e!==false&&(e===null||{deviceId:e})),[]);const y=r((async()=>{var e;if(c&&!a.current){a.current=(e=await(f===null||f===void 0?void 0:f.mediaDevices.getUserMedia({video:g(u),audio:g(s)})))!==null&&e!==void 0?e:null;v(true);return a.current}}),[s,g,c,u]);const S=r((()=>{var e;v(false);(e=a.current)===null||e===void 0?void 0:e.getTracks().forEach((e=>e.stop()));a.current=null}),[]);const M=r((async()=>{S();return await y()}),[y,S]);const E=r((()=>{var e;p(true);(e=a.current)===null||e===void 0?void 0:e.getAudioTracks().forEach((e=>e.enabled=false))}),[]);const L=r((()=>{var e;p(false);(e=a.current)===null||e===void 0?void 0:e.getAudioTracks().forEach((e=>e.enabled=true))}),[]);const b=r((()=>{var e;w(true);(e=a.current)===null||e===void 0?void 0:e.getVideoTracks().forEach((e=>e.enabled=false))}),[]);const k=r((()=>{var e;w(false);(e=a.current)===null||e===void 0?void 0:e.getVideoTracks().forEach((e=>e.enabled=true))}),[]);const x=r((()=>{E();b()}),[E,b]);const I=r((()=>{L();k()}),[L,k]);e((()=>{l.current&&(l.current.srcObject=a.current)}),[d]);e((()=>{i&&a.current&&M()}),[u,s,i,M]);return{isSupported:c,ref:l,stream:a,isPlaying:d,play:y,stop:S,restart:M,isAudioMuted:h,muteAudio:E,unMuteAudio:L,isVideoMuted:m,muteVideo:b,unMuteVideo:k,pause:x,resume:I,isPaused:h&&m}}\n/**\n * Run a function synchronously when a component is mounted and after DOM is painted.\n *\n * @deprecated This hook breaks in React 18's strict mode, since it's not idempotent\n *\n * @param callback function to be executed\n */function useMountSync(e){o(e,[])}\n/**\n *\n * Reactive mouse position based by page or client\n *\n * @param options\n *\n * @see https://react-hooks-library.vercel.app/core/useMouse\n */function useMouse(n={}){const{touch:r=true,type:o=\"client\",resetOnTouchEnds:s=false,initialValue:u={x:0,y:0}}=n;const[i,c]=t(u.x);const[a,l]=t(u.y);const[d,v]=t(null);e((()=>{const mouseHandler=e=>{v(\"mouse\");if(o===\"page\"){c(e.pageX);l(e.pageY)}else if(o===\"client\"){c(e.clientX);l(e.clientY)}};const reset=()=>{c(u.x);l(u.y)};const touchHandler=e=>{if(e.touches.length>0){v(\"touch\");if(o===\"page\"){c(e.touches[0].pageX);l(e.touches[0].pageY)}else if(o===\"client\"){c(e.touches[0].clientX);l(e.touches[0].clientY)}}};window.addEventListener(\"mousemove\",mouseHandler,{passive:true});window.addEventListener(\"dragover\",mouseHandler,{passive:true});if(r){window.addEventListener(\"touchstart\",touchHandler,{passive:true});window.addEventListener(\"touchmove\",touchHandler,{passive:true});s&&window.addEventListener(\"touchend\",reset,{passive:true})}return()=>{window.removeEventListener(\"mousemove\",mouseHandler);window.removeEventListener(\"dragover\",mouseHandler);if(r){window.removeEventListener(\"touchstart\",touchHandler);window.removeEventListener(\"touchmove\",touchHandler);s&&window.removeEventListener(\"touchend\",reset)}}}),[u.x,u.y,s,r,o]);return{x:i,y:a,source:d}}\n/**\n * Watch for changes being made to the DOM tree.\n *\n * @param target - React ref or DOM node\n * @param callback - callback to execute when mutations are observed\n * @param options - Options passed to mutation observer\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver MutationObserver MDN\n * @see https://react-hooks-library.vercel.app/core/useMutationObserver\n */function useMutationObserver(t,o,s={}){const u=n(null);const i=useIsSupported((()=>!!(d===null||d===void 0?void 0:d.IntersectionObserver)));const c=r((()=>{if(u.current){u.current.disconnect();u.current=null}}),[]);useUnMount(c);e((()=>{var e;const n=unRef(t);if(i&&n&&d){u.current=new d.MutationObserver(o);(e=u.current)===null||e===void 0?void 0:e.observe(n,s);return c}}),[o,c,s,t,i]);return{isSupported:i,stop:c}}function useNetwork(){var e,r,o,s,u;const i=useIsSupported((()=>!!(f===null||f===void 0?void 0:f.connection)));const[c,a]=t(true);const[l,d]=t(void 0);const v=n(void 0);const h=t({})[1];useMount((()=>{if(!f)return;a(f.onLine);d(c?void 0:Date.now());const e=f===null||f===void 0?void 0:f.connection;if(e){v.current=e;v.current.onchange=()=>h({})}}));useEventListener(\"offline\",(()=>{a(false);d(Date.now())}));useEventListener(\"online\",(()=>{a(true)}));return{isSupported:i,isOnline:c,offlineAt:l,saveData:(e=v.current)===null||e===void 0?void 0:e.saveData,rtt:(r=v.current)===null||r===void 0?void 0:r.rtt,downlink:(o=v.current)===null||o===void 0?void 0:o.downlink,downlinkMax:(s=v.current)===null||s===void 0?void 0:s.downlinkMax,effectiveType:(u=v.current)===null||u===void 0?void 0:u.effectiveType}}function useOnline(){const[e,n]=t(false);useMount((()=>{n(navigator.onLine)}));useEventListener(\"offline\",(()=>{n(false)}));useEventListener(\"online\",(()=>{n(true)}));return e}function usePreferredColorScheme(){const e=useMediaQuery(\"(prefers-color-scheme: dark)\");return e?\"dark\":\"light\"}\n/**\n * Returns the value of the argument from the previous render\n * @param {T} value\n * @returns {T | undefined} previous value\n * @see https://react-hooks-library.vercel.app/core/usePrevious\n */function usePrevious(t){const r=n();e((()=>{r.current=t}),[t]);return r.current}\n/**\n * Reactive screen sharing\n *\n * @param options\n *\n * @see https://react-hooks-library.vercel.app/core/useScreenShare\n */function useScreenShare(o={}){const{audio:s=true,video:u=true}=o;const i=useIsSupported((()=>{var e;return!!((e=f===null||f===void 0?void 0:f.mediaDevices)===null||e===void 0?void 0:e.getDisplayMedia)}));const c=n(null);const a=n(null);const[l,d]=t(false);const v=r((async()=>{var e;if(i&&a.current){c.current=(e=await(f===null||f===void 0?void 0:f.mediaDevices.getDisplayMedia({audio:s,video:u})))!==null&&e!==void 0?e:null;d(true);return c.current}}),[s,i,u]);const h=r((()=>{var e;(e=c.current)===null||e===void 0?void 0:e.getTracks().forEach((e=>e.stop()));c.current=null;d(false)}),[]);e((()=>{var e;if(a.current){a.current.srcObject=c.current;(e=c.current)===null||e===void 0?void 0:e.getVideoTracks()[0].addEventListener(\"ended\",h)}}),[l,h]);return{isSupported:i,isPlaying:l,ref:a,stream:c,play:v,stop:h}}\n/**\n * Reactive scroll values for a react ref or a dom node\n *\n * @param target - dom node or react ref\n * @param callback - callback to run on scroll\n *\n * @see https://react-hooks-library.vercel.app/core/useScroll\n */function useScroll(e=(v===null||v===void 0?void 0:v.documentElement),t){const getPositions=()=>{const t=unRef(e);if(t)return{x:round(t.scrollLeft/(t.scrollWidth-t.clientWidth)),y:round(t.scrollTop/(t.scrollHeight-t.clientHeight))}};useEventListener(e,\"scroll\",(()=>{const e=getPositions();if(!e)return;const{x:n,y:r}=e;t({scrollX:n,scrollY:r})}),{capture:false,passive:true})}\n/**\n *\n * A hook to scroll an element into view on mounting.\n *\n * @param options {UseScrollIntoViewOptions}\n *\n * @see https://react-hooks-library.vercel.app/core/useScrollIntoView\n */function useScrollIntoView(e,t={}){const{behavior:n=\"auto\",block:r=\"start\",inline:o=\"nearest\",scrollMargin:s=\"0px\",predicate:u=true}=t;useMount((()=>{const t=unRef(e);if(t&&(isFunction(u)?u():u)){t.style.scrollMargin=s;t.scrollIntoView({behavior:n,block:r,inline:o})}}))}\n/**\n * Modified `useState` hook that syncs with useSessionStorage.\n *\n * @param key\n * @param initialValue\n * @param options\n *\n * @see https://react-hooks-library.vercel.app/core/useSessionStorage\n */function useSessionStorage(e,n,o){const[s,u]=t(n);const{deserialize:i=JSON.parse,serialize:c=JSON.stringify}=o||{};useMount((()=>{try{const t=sessionStorage.getItem(e);t&&u(i(t))}catch(e){console.error(e)}}));const a=r((t=>{try{u(t);sessionStorage.setItem(e,c(t))}catch(e){console.error(e)}}),[e,c]);return[s,a]}function useStateCompare({initialValue:e,compare:n}){const[o,s]=t(e);const u=r((e=>{s(typeof e===\"function\"?e:t=>n(t,e))}),[n]);return[o,u]}\n/**\n *\n * useState with built in undo and redo history control\n *\n * @param defaultValue\n * @param options\n * @returns\n */function useStateHistory(e,o={}){const{maxHistory:s=10}=o;const[u,i]=t(e);const c=n(isFunction(e)?e():e);const a=t({})[1];const l=n([]);const d=n([]);const v=n(false);const f=r((e=>{if(l.current.length<s)l.current.push(e);else{l.current=[...l.current.slice(1),e];c.current=l.current[0]}v.current=false;i(e)}),[s]);const h=r((()=>{if(!(d.current.length&&v.current))return;const e=d.current.pop();e&&f(e);v.current=true}),[f]);const p=r((()=>{if(l.current.length<1)return;const e=l.current.pop();e&&d.current.push(e);const t=l.current[l.current.length-1];i(t||c.current);a({});v.current=true}),[a]);const m=r((()=>{var e;if((e=l.current)===null||e===void 0?void 0:e.length){i(l.current[0]);l.current=[l.current[0]]}}),[]);return{state:u,push:f,undo:p,redo:h,reset:m,history:l.current,redoAllowed:v.current}}\n/**\n * Reactive document title hook\n *\n * Set title or observe dom mutation reactively\n *\n * @param newTitle optional\n * @see https://react-hooks-library.vercel.app/core/useTitle\n */function useTitle(n){const[r,o]=t(n!==null&&n!==void 0?n:\"\");useMount((()=>{var e;o((e=n||(v===null||v===void 0?void 0:v.title))!==null&&e!==void 0?e:\"\")}));e((()=>{document.title=r}),[r]);useMutationObserver(v===null||v===void 0?void 0:v.head.querySelector(\"title\"),(()=>{document.title!==r&&o(document.title)}),{childList:true});return{title:r,setTitle:o}}\n/**\n * A state toggle hook\n *\n * @param defaultValue\n * @default false\n *\n * @see https://react-hooks-library.vercel.app/core/useToggle\n */function useToggle(e=false){const[n,o]=t(e);const s=r((()=>o((e=>!e))),[]);const u=r((()=>o(true)),[]);const i=r((()=>o(false)),[]);return{bool:n,toggle:s,setTrue:u,setFalse:i}}\n/**\n * Reactive window size.\n *\n * @param options\n *\n * @see https://react-hooks-library.vercel.app/core/useWindowSize\n */function useWindowSize({initialWidth:e=Infinity,initialHeight:n=Infinity}={}){const[r,o]=t(e);const[s,u]=t(n);useMount((()=>{o(window.innerWidth);u(window.innerHeight)}));useEventListener(\"resize\",(()=>{o(window.innerWidth);u(window.innerHeight)}),{passive:true});return{width:r,height:s}}export{BreakPointHooks,c as breakpointsAntDesign,u as breakpointsBootstrapV5,a as breakpointsSematic,s as breakpointsTailwind,i as breakpointsVuetify,useActiveElement,useAsyncCallback,useClickOutside,useDebounce,useEffectAfterMount,useEventListener,useFont,useHasMounted,useHover,useIntersectionObserver,useInterval,useIsSupported,useKeyDown,useKeyPressed,useKeyStroke,useKeyUp,useLocalStorage,useLocation,useMediaQuery,useMediaStream,useMount,useMountSync,useMouse,useMutationObserver,useNetwork,useOnline,usePreferredColorScheme,usePrevious,useScreenShare,useScroll,useScrollIntoView,useSessionStorage,useStateCompare,useStateHistory,useTitle,useToggle,useUnMount,useWindowSize};\n//# sourceMappingURL=index.esm.js.map\n"],"mappings":"sLAsBI,SAAS,EAAM,EAAE,CAAC,IAAM,EAAE,EAAM,GAAG,EAAE,QAAQ,EAAE,OAAO,CAAE,CA+DyB,SAAS,EAAiB,GAAG,EAAE,CAAC,IAAI,EAAE,EAAM,EAAM,EAAM,EAAE,EAAS,EAAE,IAAI,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,IAAM,EAAEA,EAAE,GAAS,EAAEA,EAAE,GAAuL,OAAjL,OAAO,CAAC,EAAE,QAAQ,CAAE,GAAE,CAAC,EAAE,EAAE,OAAO,CAAC,IAAM,EAAE,EAAM,GAAG,GAAG,GAAG,EAA0F,OAAvF,EAAE,iBAAiB,EAAE,EAAE,QAAQ,GAAG,EAAE,YAAY,CAAC,EAAE,oBAAoB,EAAE,EAAE,QAAQ,EAAG,EAAQ,EAAE,OAAS,GAAE,CAAC,EAAE,EAAE,EAAE,EAAS,EAAE,OAAQ,CAchZ,SAAS,EAAgB,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,GAAK,CAAC,MAAM,EAAE,cAAc,CAAC,EAAQ,EAAEC,GAAG,GAAG,CAAC,IAAM,EAAE,EAAM,GAAG,IAAI,IAAID,EAAE,QAAQA,EAAE,eAAe,SAAS,IAAI,EAAEA,GAAI,GAAE,CAAC,EAAE,EAAE,EAAE,OAAO,EAAiB,EAAE,EAAE,EAAE,CAAC,QAAQ,GAAK,CAAE,qCAnF3J,EAAS,IAAS,OAAkB,EAAM,GAAa,OAAO,GAAI,YAArB,GAA+B,OAAO,UAAU,eAAe,KAAK,EAAE,WAA2D,EAAS,GAAG,OAAO,GAAI,SAAe,MAAS,CAAE,EAMpN,EAAE,EAAE,EAAO,IAAK,GAAQ,EAAE,EAAE,EAAO,SAAS,IAAK,GAAQ,EAAE,EAAE,EAAO,UAAU,IAAK"}