qauMaWeb/node_modules/.cache/babel-loader/14dd714d3a3acc7372bf5dc2c64...

1 line
9.0 KiB
JSON

{"ast":null,"code":"require(\"core-js/modules/es.number.constructor.js\");\n\n/* eslint-disable no-undefined,no-param-reassign,no-shadow */\n\n/**\n * Throttle execution of a function. Especially useful for rate limiting\n * execution of handlers on events like resize and scroll.\n *\n * @param {Number} delay A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n * @param {Boolean} [noTrailing] Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds while the\n * throttled-function is being called. If noTrailing is false or unspecified, callback will be executed one final time\n * after the last throttled-function call. (After the throttled-function has not been called for `delay` milliseconds,\n * the internal counter is reset)\n * @param {Function} callback A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n * to `callback` when the throttled-function is executed.\n * @param {Boolean} [debounceMode] If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is false (at end),\n * schedule `callback` to execute after `delay` ms.\n *\n * @return {Function} A new, throttled, function.\n */\nmodule.exports = function (delay, noTrailing, callback, debounceMode) {\n // After wrapper has stopped being called, this timeout ensures that\n // `callback` is executed at the proper times in `throttle` and `end`\n // debounce modes.\n var timeoutID; // Keep track of the last time `callback` was executed.\n\n var lastExec = 0; // `noTrailing` defaults to falsy.\n\n if (typeof noTrailing !== 'boolean') {\n debounceMode = callback;\n callback = noTrailing;\n noTrailing = undefined;\n } // The `wrapper` function encapsulates all of the throttling / debouncing\n // functionality and when executed will limit the rate at which `callback`\n // is executed.\n\n\n function wrapper() {\n var self = this;\n var elapsed = Number(new Date()) - lastExec;\n var args = arguments; // Execute `callback` and update the `lastExec` timestamp.\n\n function exec() {\n lastExec = Number(new Date());\n callback.apply(self, args);\n } // If `debounceMode` is true (at begin) this is used to clear the flag\n // to allow future `callback` executions.\n\n\n function clear() {\n timeoutID = undefined;\n }\n\n if (debounceMode && !timeoutID) {\n // Since `wrapper` is being called for the first time and\n // `debounceMode` is true (at begin), execute `callback`.\n exec();\n } // Clear any existing timeout.\n\n\n if (timeoutID) {\n clearTimeout(timeoutID);\n }\n\n if (debounceMode === undefined && elapsed > delay) {\n // In throttle mode, if `delay` time has been exceeded, execute\n // `callback`.\n exec();\n } else if (noTrailing !== true) {\n // In trailing throttle mode, since `delay` time has not been\n // exceeded, schedule `callback` to execute `delay` ms after most\n // recent execution.\n //\n // If `debounceMode` is true (at begin), schedule `clear` to execute\n // after `delay` ms.\n //\n // If `debounceMode` is false (at end), schedule `callback` to\n // execute after `delay` ms.\n timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n }\n } // Return the wrapper function.\n\n\n return wrapper;\n};","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src/ElectronicMallVue/node_modules/throttle-debounce/throttle.js"],"names":["module","exports","delay","noTrailing","callback","debounceMode","timeoutID","lastExec","undefined","wrapper","self","elapsed","Number","Date","args","arguments","exec","apply","clear","clearTimeout","setTimeout"],"mappings":";;AAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACAA,MAAM,CAACC,OAAP,GAAiB,UAAWC,KAAX,EAAkBC,UAAlB,EAA8BC,QAA9B,EAAwCC,YAAxC,EAAuD;AAEvE;AACA;AACA;AACA,MAAIC,SAAJ,CALuE,CAOvE;;AACA,MAAIC,QAAQ,GAAG,CAAf,CARuE,CAUvE;;AACA,MAAK,OAAOJ,UAAP,KAAsB,SAA3B,EAAuC;AACtCE,IAAAA,YAAY,GAAGD,QAAf;AACAA,IAAAA,QAAQ,GAAGD,UAAX;AACAA,IAAAA,UAAU,GAAGK,SAAb;AACA,GAfsE,CAiBvE;AACA;AACA;;;AACA,WAASC,OAAT,GAAoB;AAEnB,QAAIC,IAAI,GAAG,IAAX;AACA,QAAIC,OAAO,GAAGC,MAAM,CAAC,IAAIC,IAAJ,EAAD,CAAN,GAAqBN,QAAnC;AACA,QAAIO,IAAI,GAAGC,SAAX,CAJmB,CAMnB;;AACA,aAASC,IAAT,GAAiB;AAChBT,MAAAA,QAAQ,GAAGK,MAAM,CAAC,IAAIC,IAAJ,EAAD,CAAjB;AACAT,MAAAA,QAAQ,CAACa,KAAT,CAAeP,IAAf,EAAqBI,IAArB;AACA,KAVkB,CAYnB;AACA;;;AACA,aAASI,KAAT,GAAkB;AACjBZ,MAAAA,SAAS,GAAGE,SAAZ;AACA;;AAED,QAAKH,YAAY,IAAI,CAACC,SAAtB,EAAkC;AACjC;AACA;AACAU,MAAAA,IAAI;AACJ,KAtBkB,CAwBnB;;;AACA,QAAKV,SAAL,EAAiB;AAChBa,MAAAA,YAAY,CAACb,SAAD,CAAZ;AACA;;AAED,QAAKD,YAAY,KAAKG,SAAjB,IAA8BG,OAAO,GAAGT,KAA7C,EAAqD;AACpD;AACA;AACAc,MAAAA,IAAI;AAEJ,KALD,MAKO,IAAKb,UAAU,KAAK,IAApB,EAA2B;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACAG,MAAAA,SAAS,GAAGc,UAAU,CAACf,YAAY,GAAGa,KAAH,GAAWF,IAAxB,EAA8BX,YAAY,KAAKG,SAAjB,GAA6BN,KAAK,GAAGS,OAArC,GAA+CT,KAA7E,CAAtB;AACA;AAED,GAnEsE,CAqEvE;;;AACA,SAAOO,OAAP;AAEA,CAxED","sourcesContent":["/* eslint-disable no-undefined,no-param-reassign,no-shadow */\n\n/**\n * Throttle execution of a function. Especially useful for rate limiting\n * execution of handlers on events like resize and scroll.\n *\n * @param {Number} delay A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n * @param {Boolean} [noTrailing] Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds while the\n * throttled-function is being called. If noTrailing is false or unspecified, callback will be executed one final time\n * after the last throttled-function call. (After the throttled-function has not been called for `delay` milliseconds,\n * the internal counter is reset)\n * @param {Function} callback A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n * to `callback` when the throttled-function is executed.\n * @param {Boolean} [debounceMode] If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is false (at end),\n * schedule `callback` to execute after `delay` ms.\n *\n * @return {Function} A new, throttled, function.\n */\nmodule.exports = function ( delay, noTrailing, callback, debounceMode ) {\n\n\t// After wrapper has stopped being called, this timeout ensures that\n\t// `callback` is executed at the proper times in `throttle` and `end`\n\t// debounce modes.\n\tvar timeoutID;\n\n\t// Keep track of the last time `callback` was executed.\n\tvar lastExec = 0;\n\n\t// `noTrailing` defaults to falsy.\n\tif ( typeof noTrailing !== 'boolean' ) {\n\t\tdebounceMode = callback;\n\t\tcallback = noTrailing;\n\t\tnoTrailing = undefined;\n\t}\n\n\t// The `wrapper` function encapsulates all of the throttling / debouncing\n\t// functionality and when executed will limit the rate at which `callback`\n\t// is executed.\n\tfunction wrapper () {\n\n\t\tvar self = this;\n\t\tvar elapsed = Number(new Date()) - lastExec;\n\t\tvar args = arguments;\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec () {\n\t\t\tlastExec = Number(new Date());\n\t\t\tcallback.apply(self, args);\n\t\t}\n\n\t\t// If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t// to allow future `callback` executions.\n\t\tfunction clear () {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif ( debounceMode && !timeoutID ) {\n\t\t\t// Since `wrapper` is being called for the first time and\n\t\t\t// `debounceMode` is true (at begin), execute `callback`.\n\t\t\texec();\n\t\t}\n\n\t\t// Clear any existing timeout.\n\t\tif ( timeoutID ) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\n\t\tif ( debounceMode === undefined && elapsed > delay ) {\n\t\t\t// In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t// `callback`.\n\t\t\texec();\n\n\t\t} else if ( noTrailing !== true ) {\n\t\t\t// In trailing throttle mode, since `delay` time has not been\n\t\t\t// exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t// recent execution.\n\t\t\t//\n\t\t\t// If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t// after `delay` ms.\n\t\t\t//\n\t\t\t// If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t// execute after `delay` ms.\n\t\t\ttimeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n\t\t}\n\n\t}\n\n\t// Return the wrapper function.\n\treturn wrapper;\n\n};\n"]},"metadata":{},"sourceType":"script"}