function e(e,t){return new Promise(function(n,r){var i=setTimeout(function(){r(Error(`Promise timed out`))},t);e.then(function(e){return clearTimeout(i),n(e)}).catch(r)})}function t(e){return new Promise(function(t){return setTimeout(t,e)})}function n(n,r,i){var a=function(){try{return Promise.resolve(r(n))}catch(e){return Promise.reject(e)}};return t(i).then(function(){return e(a(),1e3)}).catch(function(e){n?.log(`warn`,`Callback Error`,{error:e}),n?.stats.increment(`callback_error`)}).then(function(){return n})}export{e as n,n as t};