You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
14 KiB
JavaScript

9 months ago
"use strict";
/*
* ATTENTION: An "eval-source-map" devtool has been used.
* This devtool is neither made for production nor for readable output files.
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
* or disable the default devtool with "devtool: false".
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
*/
exports.id = "vendor-chunks/use-debounce";
exports.ids = ["vendor-chunks/use-debounce"];
exports.modules = {
/***/ "(ssr)/./node_modules/use-debounce/dist/index.module.js":
/*!********************************************************!*\
!*** ./node_modules/use-debounce/dist/index.module.js ***!
\********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useDebounce: () => (/* binding */ o),\n/* harmony export */ useDebouncedCallback: () => (/* binding */ c),\n/* harmony export */ useThrottledCallback: () => (/* binding */ f)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"(ssr)/./node_modules/next/dist/server/future/route-modules/app-page/vendored/ssr/react.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\nfunction c(u, e, c) {\n var i = this, a = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null), o = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(0), f = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null), l = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)([]), m = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(), v = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(), d = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(u), p = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(!0);\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function() {\n d.current = u;\n }, [\n u\n ]);\n var g = !e && 0 !== e && \"undefined\" != \"undefined\";\n if (\"function\" != typeof u) throw new TypeError(\"Expected a function\");\n e = +e || 0;\n var w = !!(c = c || {}).leading, s = !(\"trailing\" in c) || !!c.trailing, x = \"maxWait\" in c, y = x ? Math.max(+c.maxWait || 0, e) : null;\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function() {\n return p.current = !0, function() {\n p.current = !1;\n };\n }, []);\n var h = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function() {\n var r = function(r) {\n var n = l.current, t = m.current;\n return l.current = m.current = null, o.current = r, v.current = d.current.apply(t, n);\n }, n = function(r, n) {\n g && cancelAnimationFrame(f.current), f.current = g ? requestAnimationFrame(r) : setTimeout(r, n);\n }, t = function(r) {\n if (!p.current) return !1;\n var n = r - a.current;\n return !a.current || n >= e || n < 0 || x && r - o.current >= y;\n }, u = function(n) {\n return f.current = null, s && l.current ? r(n) : (l.current = m.current = null, v.current);\n }, c = function r() {\n var c = Date.now();\n if (t(c)) return u(c);\n if (p.current) {\n var i = e - (c - a.current), f = x ? Math.min(i, y - (c - o.current)) : i;\n n(r, f);\n }\n }, h = function() {\n var u = Date.now(), d = t(u);\n if (l.current = [].slice.call(arguments), m.current = i, a.current = u, d) {\n if (!f.current && p.current) return o.current = a.current, n(c, e), w ? r(a.current) : v.current;\n if (x) return n(c, e), r(a.current);\n }\n return f.current || n(c, e), v.current;\n };\n return h.cancel = function() {\n f.current && (g ? cancelAnimationFrame(f.current) : clearTimeout(f.current)), o.current = 0, l.current = a.current = m.current = f.current = null;\n }, h.isPending = function() {\n return !!f.current;\n }, h.flush = function() {\n return f.current ? u(Date.now()) : v.current;\n }, h;\n }, [\n w,\n x,\n e,\n y,\n s,\n g\n ]);\n return h;\n}\nfunction i(r, n) {\n return r === n;\n}\nfunction a(r) {\n return \"function\" == typeof r ? function() {\n return r;\n } : r;\n}\nfunction o(n, t, o) {\n var f, l, m = o && o.equalityFn || i, v = (f = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(a(n)), l = f[1], [\n f[0],\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function(r) {\n return l(a(r));\n }, [])\n ]), d = v[0], p = v[1], g = c((
/***/ })
};
;