\x89PNG\r\n\x1a\n\x00\x00\x00\x0DIHDR\x00\x00\x00\x01\x00 \x00\x00\x01\x08\x06\x00\x00\x00\x1F\x15\xC4\x89\x00\x00\x00 \x0AIDATx\x9Ccb\x00\x00\x00\x06\x00\x03\x1A\x05\x9D\x00\x00 \x00\x00IEND\xAE\x42\x60\x82
| Path : /var/www/html/infraai.ai/frontend/node_modules/recharts/lib/animation/ |
|
B-Con CMD Config cPanel C-Rdp D-Log Info Jump Mass Ransom Symlink vHost Zone-H |
| Current File : /var/www/html/infraai.ai/frontend/node_modules/recharts/lib/animation/timeoutController.js |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.RequestAnimationFrameTimeoutController = void 0;
/**
* Callback type for the timeout function.
* Receives current time in milliseconds as an argument.
*/
/**
* A function that, when called, cancels the timeout.
*/
class RequestAnimationFrameTimeoutController {
setTimeout(callback) {
var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
var startTime = performance.now();
var requestId = null;
var executeCallback = now => {
if (now - startTime >= delay) {
callback(now);
// tests fail without the extra if, even when five lines below it's not needed
// TODO finish transition to the mocked timeout controller and then remove this condition
} else if (typeof requestAnimationFrame === 'function') {
requestId = requestAnimationFrame(executeCallback);
}
};
requestId = requestAnimationFrame(executeCallback);
return () => {
if (requestId != null) {
cancelAnimationFrame(requestId);
}
};
}
}
exports.RequestAnimationFrameTimeoutController = RequestAnimationFrameTimeoutController;