// Register the pass-through service worker (see /sw.js) so ngrok's free-tier browser
// interstitial is skipped on revisits / PWA launches. Registering /sw.js also UPDATES
// (and thereby replaces) any previously-installed caching service worker, whose
// activate handler then clears the old caches.
//
// Caveat: the very first visit on a new browser still shows the ngrok page once — a
// service worker cannot exist before that initial load. ngrok's own cookie suppresses
// it after one "Visit Site" click; the SW then keeps it gone across sessions.
if ('serviceWorker' in navigator) {
  navigator.serviceWorker.register('/sw.js').catch(() => {});
}
