2018-01-14 17:13:42 -08:00
|
|
|
import { init } from 'sapper/runtime.js'
|
2018-01-18 23:37:43 -08:00
|
|
|
import { offlineNotifiction } from '../routes/_utils/offlineNotification'
|
|
|
|
import { serviceWorkerClient } from '../routes/_utils/serviceWorkerClient'
|
2018-01-18 21:25:12 -08:00
|
|
|
|
2018-01-17 00:06:24 -08:00
|
|
|
import {
|
|
|
|
importURLSearchParams,
|
|
|
|
importIntersectionObserver,
|
2018-01-18 20:57:15 -08:00
|
|
|
importRequestIdleCallback,
|
2018-01-20 19:19:24 -08:00
|
|
|
importIndexedDBGetAllShim,
|
|
|
|
importDialogPolyfill
|
2018-01-17 00:06:24 -08:00
|
|
|
} from '../routes/_utils/asyncModules'
|
2018-01-06 15:51:25 -08:00
|
|
|
|
2018-01-07 23:00:15 -08:00
|
|
|
// polyfills
|
|
|
|
Promise.all([
|
2018-01-16 20:34:09 -08:00
|
|
|
typeof URLSearchParams === 'undefined' && importURLSearchParams(),
|
2018-01-17 00:06:24 -08:00
|
|
|
typeof IntersectionObserver === 'undefined' && importIntersectionObserver(),
|
2018-01-18 20:57:15 -08:00
|
|
|
typeof requestIdleCallback === 'undefined' && importRequestIdleCallback(),
|
2018-01-20 19:19:24 -08:00
|
|
|
!IDBObjectStore.prototype.getAll && importIndexedDBGetAllShim(),
|
|
|
|
typeof HTMLDialogElement === 'undefined' && importDialogPolyfill()
|
2018-01-07 23:00:15 -08:00
|
|
|
]).then(() => {
|
|
|
|
// `routes` is an array of route objects injected by Sapper
|
|
|
|
init(document.querySelector('#sapper'), __routes__)
|
2018-01-18 23:37:43 -08:00
|
|
|
})
|