import { c as EliLayer, B as BBox, i as EliContinent, k as EliLayerType, l as EliLocatorLayer, s as EliManifest, m as EliShardsMeta, t as EliByCountry, u as EliGeometries, h as EliCategory, E as EliApiKeys } from './specs-_F0H5585.js'; export { f as EliApiKey, v as EliDetailsShard, w as EliIndex, j as EliLayerDetails, x as EliLocatorIndex, R as RasterLayerOptions, b as RasterLayerSpec, n as RasterSourceOptions, a as RasterSourceSpec, o as applyApiKeys, p as applyWmsPixelRatio, q as eliApiKeyNames, e as eliSourceId, g as getRasterLayerSpec, d as getRasterSourceSpec, r as hasRequiredKeys } from './specs-_F0H5585.js'; import { Feature, Geometry, FeatureCollection } from 'geojson'; /** Redact sensitive URL template parts the way iD does for custom backgrounds. */ declare function sanitizeImageryUrlTemplate(template: string): string; /** * iD-compatible `imagery_used` value for an ELI layer. * Indexed sources use the display name; custom backgrounds append a sanitized template. */ declare function getImageryUsedValue(layer: Pick): string; /** A viewport, accepted in the shapes MapLibre / react-map-gl hand you. */ type ViewportBounds = BBox | { west: number; south: number; east: number; north: number; } | { getWest(): number; getSouth(): number; getEast(): number; getNorth(): number; }; type CountryContinent = Exclude; /** * Guess the continent shard for a map center. Good enough for lazy-load routing; * country-code lookups remain authoritative for layer membership. */ declare function continentForLngLat(lng: number, lat: number): CountryContinent; /** All published ELI locator rows (filter fields only, no tile URLs). */ declare function getLayers(): EliLocatorLayer[]; /** Look up a single locator row by its ELI id. */ declare function getLayer(id: string): EliLocatorLayer | undefined; /** Build provenance for the bundled data. */ declare function getManifest(): EliManifest; /** Continent-shard routing metadata bundled with the locator index. */ declare function getShardsMeta(): EliShardsMeta; /** Continents to lazy-load for a map center: always `world` plus the regional shard. */ declare function continentsForCenter(lng: number, lat: number): EliContinent[]; /** Continents to lazy-load for a viewport (uses bbox midpoint as the map center). */ declare function continentsForViewport(bounds: ViewportBounds): EliContinent[]; /** Load detail shards for the given continents (no-op when already cached). */ declare function ensureDetailsForContinents(continents: EliContinent[]): Promise; /** Load `world` plus the regional detail shard for the viewport center. */ declare function ensureDetailsForViewport(bounds: ViewportBounds): Promise; /** Merge a locator row with loaded details, or `undefined` when details are not loaded yet. */ declare function hydrateLayer(locatorRow: EliLocatorLayer): EliLayer | undefined; /** Hydrate locator rows, skipping any whose detail shard has not been loaded. */ declare function hydrateLayers(locatorRows: EliLocatorLayer[]): EliLayer[]; /** Ensure detail shards for a layer, then return the hydrated layer. */ declare function getLayerHydrated(id: string): Promise; /** * Lazily load all continent geometry shards and merge them. Compatibility helper * for callers that want the full deduplicated geometry map at once. */ declare function loadGeometries(): Promise; /** * Lazily load the precomputed area↔layer map (ISO code → layer ids, plus a * `"worldwide"` bucket). Code-split like the geometries, so it's only fetched when * a consumer actually does country lookups. */ declare function loadByCountry(): Promise; /** Resolve the coverage geometry for a layer (or `undefined` for worldwide). */ declare function getGeometry(layerOrId: EliLocatorLayer | EliLayer | string): Promise; type CoverageFeature = Feature; /** * Build a GeoJSON FeatureCollection of the coverage polygons for the given layers, * ready to drop into a map source for rendering coverage outlines. Lazily loads * geometry shards. Worldwide layers (no polygon) are skipped. Each feature's * `id` is the layer id, so it works directly with maplibre feature-state. */ declare function loadCoverageFeatures(layers: (EliLocatorLayer | EliLayer)[]): Promise; type FilterOptions = { /** Keep only these categories. */ categories?: EliCategory[]; /** Keep only these source types. */ types?: EliLayerType[]; /** Keep only layers ELI marks as "best" for their region. */ bestOnly?: boolean; /** Drop transparent overlay layers (keep only full base imagery). */ excludeOverlays?: boolean; /** * Keep only layers whose precomputed coverage touches one of these region codes * (e.g. `['DE']`). Worldwide layers (no country list) always pass. This is the * cheap fix for the bbox-vs-polygon overshoot: a US-only source whose bounding * box spans the globe (e.g. TIGER) is dropped because its codes don't include the * viewport's country. Country codes are precomputed from the actual polygon. */ countryCodes?: string[]; /** Include worldwide layers (no coverage polygon). Default `true`. */ includeWorldwide?: boolean; /** * API keys you have available. Layers that require a key are **excluded by * default** (so the list stays clean and actionable); provide the keys here to * include them. The same keys are substituted into tile URLs by the spec helpers. */ apiKeys?: EliApiKeys; }; /** * Layers whose coverage bounding box overlaps the given viewport. Pure arithmetic * against the precomputed `bbox` in the locator — no geometry is loaded. Worldwide * layers always match. Results keep the index order (id-sorted). */ declare function layersInViewport(bounds: ViewportBounds, options?: FilterOptions, layers?: EliLocatorLayer[]): EliLocatorLayer[]; /** Apply only the predicate filters (category/type/best/…), ignoring location. */ declare function filterLayers(options?: FilterOptions, layers?: EliLocatorLayer[]): EliLocatorLayer[]; /** * Layers available in a region, via the precomputed `byCountry` map — an O(1) * lookup with no geometry or bbox math. Returns locator rows for region layers * covering `code` plus worldwide layers (unless `includeWorldwide: false`). `code` * is an ISO 3166-1 alpha-2 code, e.g. `'DE'`. Callers needing tile URLs should * hydrate via {@link hydrateLayer} or {@link getLayerHydrated}. */ declare function layersForCountry(code: string, options?: { includeWorldwide?: boolean; }): Promise; /** Viewport-filter synchronously, load regional detail shards, then hydrate matches. */ declare function loadLayersInViewport(bounds: ViewportBounds, options?: FilterOptions): Promise; export { BBox, type CoverageFeature, EliApiKeys, EliByCountry, EliCategory, EliContinent, EliGeometries, EliLayer, EliLayerType, EliLocatorLayer, EliManifest, EliShardsMeta, type FilterOptions, type ViewportBounds, continentForLngLat, continentsForCenter, continentsForViewport, ensureDetailsForContinents, ensureDetailsForViewport, filterLayers, getGeometry, getImageryUsedValue, getLayer, getLayerHydrated, getLayers, getManifest, getShardsMeta, hydrateLayer, hydrateLayers, layersForCountry, layersInViewport, loadByCountry, loadCoverageFeatures, loadGeometries, loadLayersInViewport, sanitizeImageryUrlTemplate };