(function(Drupal,navigator,window,$){if(!("serviceWorker"in navigator))return;function pwaServiceWorkerRegister(){navigator.serviceWorker.register(Drupal.settings.pwa.path,{scope:Drupal.settings.basePath}).then(function(){})["catch"](function(error){})}if(Drupal.settings.pwa.registrationEvent==="immediate")pwaServiceWorkerRegister();else if(Drupal.settings.pwa.registrationEvent==="documentready")$(document).ready(pwaServiceWorkerRegister);else window.addEventListener("load",pwaServiceWorkerRegister);
document.body.addEventListener("online",function(){var loc=window.location;if(loc.pathname!==Drupal.settings.basePath+"offline"&&document.querySelector("[data-drupal-pwa-offline]"))loc.reload()})})(Drupal,navigator,window,jQuery);;
