(function(){let e;function t(){clearTimeout(e),e=void 0}function n(e){self.postMessage(e)}function r(r){if(r<0){console.error(`[IW] scheduleCallback() - Invalid timeout value:`,r);return}t(),e=setTimeout(()=>{n({type:`doWork`})},r)}self.onmessage=e=>{let n=e.data;switch(n.type){case`start`:r(n.timeoutMs);break;case`stop`:t();break;case`dispose`:t(),self.close();break;default:console.error(`[IW] Unknown command:`,n)}},n({type:`ready`})})();