{"version":3,"file":"index-qA4oLzgk.js","sources":["../../../../../src/scripts/helpers/index.ts"],"sourcesContent":["import { breakpoints } from './variables';\n\nexport const debounce = (callback: (args: unknown) => void, wait: number) => {\n let timerId: ReturnType;\n\n return (...args: [unknown]) => {\n clearTimeout(timerId);\n timerId = setTimeout(() => {\n callback(...args);\n }, wait);\n };\n};\n\nconst isTablet = () => {\n return window.matchMedia(\n `(min-width: ${breakpoints.tabletLandscape}px) and (max-width: ${breakpoints.desktop - 1}px)`\n ).matches;\n};\n\nconst isMobile = () => {\n return window.matchMedia(`(max-width: ${breakpoints.tabletLandscape - 1}px)`).matches;\n};\n\nconst isDesktop = () => {\n return window.matchMedia(`(min-width: ${breakpoints.tabletLandscape - 1}px)`).matches;\n};\n\nconst isLargeDesktop = () => {\n return window.matchMedia(`(min-width: ${breakpoints.desktop - 1}px)`).matches;\n};\n\nconst prefersReducedMotion = () => {\n return window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n};\n\nexport { isTablet, isMobile, isDesktop, isLargeDesktop, prefersReducedMotion };\n"],"names":["debounce","callback","wait","timerId","args","isMobile","breakpoints","isLargeDesktop","prefersReducedMotion"],"mappings":"qCAEa,MAAAA,EAAW,CAACC,EAAmCC,IAAiB,CACvE,IAAAC,EAEJ,MAAO,IAAIC,IAAoB,CAC7B,aAAaD,CAAO,EACpBA,EAAU,WAAW,IAAM,CACzBF,EAAS,GAAGG,CAAI,GACfF,CAAI,CAAA,CAEX,EAQMG,EAAW,IACR,OAAO,WAAW,eAAeC,EAAY,gBAAkB,CAAC,KAAK,EAAE,QAO1EC,EAAiB,IACd,OAAO,WAAW,eAAeD,EAAY,QAAU,CAAC,KAAK,EAAE,QAGlEE,EAAuB,IACpB,OAAO,WAAW,kCAAkC,EAAE"}