var availablePrefixs=["moz","ms","webkit"];function requestAnimationFramePolyfill(){var n=0;return function(e){var i=(new Date).getTime(),t=Math.max(0,16-(i-n)),a=window.setTimeout(function(){e(i+t)},t);return n=i+t,a}}export default function getRequestAnimationFrame(){if("undefined"==typeof window)return function(){};if(window.requestAnimationFrame)return window.requestAnimationFrame.bind(window);var n=availablePrefixs.filter(function(n){return n+"RequestAnimationFrame"in window})[0];return n?window[n+"RequestAnimationFrame"]:requestAnimationFramePolyfill()};export function cancelRequestAnimationFrame(n){if("undefined"==typeof window)return null;if(window.cancelAnimationFrame)return window.cancelAnimationFrame(n);var e=availablePrefixs.filter(function(n){return n+"CancelAnimationFrame"in window||n+"CancelRequestAnimationFrame"in window})[0];return e?(window[e+"CancelAnimationFrame"]||window[e+"CancelRequestAnimationFrame"]).call(this,n):clearTimeout(n)};