Files
ETB/ETB-FrontEnd/node_modules/.cache/babel-loader/0c05ef6e36a31ba583b619e3fd8e9490e2ea4fb6b7244be98fa6855cf4a5b3d4.json
Iliyan Angelov 306b20e24a Frontend start
2025-09-14 00:54:48 +03:00

1 line
4.9 KiB
JSON

{"ast":null,"code":"import { resolveElements } from 'motion-dom';\nconst thresholds = {\n some: 0,\n all: 1\n};\nfunction inView(elementOrSelector, onStart) {\n let {\n root,\n margin: rootMargin,\n amount = \"some\"\n } = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n const elements = resolveElements(elementOrSelector);\n const activeIntersections = new WeakMap();\n const onIntersectionChange = entries => {\n entries.forEach(entry => {\n const onEnd = activeIntersections.get(entry.target);\n /**\n * If there's no change to the intersection, we don't need to\n * do anything here.\n */\n if (entry.isIntersecting === Boolean(onEnd)) return;\n if (entry.isIntersecting) {\n const newOnEnd = onStart(entry.target, entry);\n if (typeof newOnEnd === \"function\") {\n activeIntersections.set(entry.target, newOnEnd);\n } else {\n observer.unobserve(entry.target);\n }\n } else if (typeof onEnd === \"function\") {\n onEnd(entry);\n activeIntersections.delete(entry.target);\n }\n });\n };\n const observer = new IntersectionObserver(onIntersectionChange, {\n root,\n rootMargin,\n threshold: typeof amount === \"number\" ? amount : thresholds[amount]\n });\n elements.forEach(element => observer.observe(element));\n return () => observer.disconnect();\n}\nexport { inView };","map":{"version":3,"names":["resolveElements","thresholds","some","all","inView","elementOrSelector","onStart","root","margin","rootMargin","amount","arguments","length","undefined","elements","activeIntersections","WeakMap","onIntersectionChange","entries","forEach","entry","onEnd","get","target","isIntersecting","Boolean","newOnEnd","set","observer","unobserve","delete","IntersectionObserver","threshold","element","observe","disconnect"],"sources":["/home/gnx/Desktop/ETB/ETB-FrontEnd/node_modules/framer-motion/dist/es/render/dom/viewport/index.mjs"],"sourcesContent":["import { resolveElements } from 'motion-dom';\n\nconst thresholds = {\n some: 0,\n all: 1,\n};\nfunction inView(elementOrSelector, onStart, { root, margin: rootMargin, amount = \"some\" } = {}) {\n const elements = resolveElements(elementOrSelector);\n const activeIntersections = new WeakMap();\n const onIntersectionChange = (entries) => {\n entries.forEach((entry) => {\n const onEnd = activeIntersections.get(entry.target);\n /**\n * If there's no change to the intersection, we don't need to\n * do anything here.\n */\n if (entry.isIntersecting === Boolean(onEnd))\n return;\n if (entry.isIntersecting) {\n const newOnEnd = onStart(entry.target, entry);\n if (typeof newOnEnd === \"function\") {\n activeIntersections.set(entry.target, newOnEnd);\n }\n else {\n observer.unobserve(entry.target);\n }\n }\n else if (typeof onEnd === \"function\") {\n onEnd(entry);\n activeIntersections.delete(entry.target);\n }\n });\n };\n const observer = new IntersectionObserver(onIntersectionChange, {\n root,\n rootMargin,\n threshold: typeof amount === \"number\" ? amount : thresholds[amount],\n });\n elements.forEach((element) => observer.observe(element));\n return () => observer.disconnect();\n}\n\nexport { inView };\n"],"mappings":"AAAA,SAASA,eAAe,QAAQ,YAAY;AAE5C,MAAMC,UAAU,GAAG;EACfC,IAAI,EAAE,CAAC;EACPC,GAAG,EAAE;AACT,CAAC;AACD,SAASC,MAAMA,CAACC,iBAAiB,EAAEC,OAAO,EAAsD;EAAA,IAApD;IAAEC,IAAI;IAAEC,MAAM,EAAEC,UAAU;IAAEC,MAAM,GAAG;EAAO,CAAC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAC1F,MAAMG,QAAQ,GAAGd,eAAe,CAACK,iBAAiB,CAAC;EACnD,MAAMU,mBAAmB,GAAG,IAAIC,OAAO,CAAC,CAAC;EACzC,MAAMC,oBAAoB,GAAIC,OAAO,IAAK;IACtCA,OAAO,CAACC,OAAO,CAAEC,KAAK,IAAK;MACvB,MAAMC,KAAK,GAAGN,mBAAmB,CAACO,GAAG,CAACF,KAAK,CAACG,MAAM,CAAC;MACnD;AACZ;AACA;AACA;MACY,IAAIH,KAAK,CAACI,cAAc,KAAKC,OAAO,CAACJ,KAAK,CAAC,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