import GirafeSingleton from '../../base/GirafeSingleton.js'; import LayerWmts from '../../models/layers/layerwmts.js'; import { Extent } from 'ol/extent.js'; declare class OfflineManager extends GirafeSingleton { private serviceWorker; private database?; private get map(); private get state(); private totalLength; private counter; private progressCallback?; private storeVersion?; private dbCacheName?; private readonly tilesStoreName; private readonly bboxStoreName; private readonly vectorLayer; initializeSingleton(): void; initializeOfflineState(isOffline: boolean): void; private registerEvents; /** Exports all the WMTS tiles for the layers in parameter and store them to local cache */ exportWMTSTiles(bbox: Extent, wmtsLayers: LayerWmts[], progressCallback?: CallableFunction): Promise; private openIndexedDB; /** The offline manager works with a ServiceWorker in charge of intercepting * the fetch requests and read the data from the local cache if the application * is offline. This method defines the servicework object to use. * Without this, the offline mode won't work. */ setServiceWorker(sw: ServiceWorker | null, storeVersion: number, dbCacheName: string): Promise; switchOffline(): void; private getAllTileUrls; private getTileUrlsForWmtsLayer; private fetchAndSaveTiles; private doWork; getTotalSizeMB(): Promise; private clearStore; clearTileStore(): Promise; clearBBoxStore(): Promise; private saveBoundingBox; displayBoundBoxes(): Promise; } export default OfflineManager;