intial pwa LUPMIS2 commit
This commit is contained in:
commit
3009a11b33
BIN
LUSPA - Signage Specification Document - 201217.pdf
Normal file
BIN
LUSPA - Signage Specification Document - 201217.pdf
Normal file
Binary file not shown.
306
README.md
Normal file
306
README.md
Normal file
@ -0,0 +1,306 @@
|
|||||||
|
# LUPMIS PWA with Offline SQLite and Maps
|
||||||
|
|
||||||
|
A Progressive Web App with:
|
||||||
|
- **OpenLayers** map with **ol-ext LayerSwitcher** for base map selection
|
||||||
|
- **SQLocal** for SQLite database in the browser (via OPFS)
|
||||||
|
- **BroadcastChannel** for cross-tab synchronization
|
||||||
|
- **Service Worker** for asset caching and offline support
|
||||||
|
- **Vite** for development and building
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- 🗺️ Interactive map with 5 base layers (OSM, Satellite, Topo, Carto Light/Dark)
|
||||||
|
- 📍 Click map to set coordinates, markers colored by category
|
||||||
|
- 💾 Offline SQLite database (data persists in browser)
|
||||||
|
- 🔄 Cross-tab sync via BroadcastChannel
|
||||||
|
- 📴 Works offline (cached assets + up to 500 map tiles)
|
||||||
|
- 📱 Installable as PWA on mobile and desktop
|
||||||
|
|
||||||
|
## Architecture
|
||||||
|
|
||||||
|
```
|
||||||
|
┌─────────────────────────────────────────────────────────────────┐
|
||||||
|
│ Browser │
|
||||||
|
├─────────────────────────────────────────────────────────────────┤
|
||||||
|
│ │
|
||||||
|
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
|
||||||
|
│ │ Tab 1 │ │ Tab 2 │ │ Tab 3 │ │
|
||||||
|
│ │ main.js │ │ main.js │ │ main.js │ │
|
||||||
|
│ │ SQLocal │ │ SQLocal │ │ SQLocal │ │
|
||||||
|
│ └────┬─────┘ └────┬─────┘ └────┬─────┘ │
|
||||||
|
│ │ │ │ │
|
||||||
|
│ └───────────────┼───────────────┘ │
|
||||||
|
│ │ │
|
||||||
|
│ BroadcastChannel │
|
||||||
|
│ (notifies other tabs of changes) │
|
||||||
|
│ │ │
|
||||||
|
│ ▼ │
|
||||||
|
│ ┌────────────────┐ │
|
||||||
|
│ │ OPFS │ ← Single database file │
|
||||||
|
│ │ (lupmis.db) │ shared by all tabs │
|
||||||
|
│ └────────────────┘ │
|
||||||
|
│ │
|
||||||
|
│ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ │
|
||||||
|
│ │
|
||||||
|
│ ┌────────────────┐ │
|
||||||
|
│ │ Service Worker │ ← Caches assets for offline │
|
||||||
|
│ │ (sw.js) │ │
|
||||||
|
│ └────────────────┘ │
|
||||||
|
│ │
|
||||||
|
└─────────────────────────────────────────────────────────────────┘
|
||||||
|
```
|
||||||
|
|
||||||
|
## Why This Architecture?
|
||||||
|
|
||||||
|
Initially we considered using a **SharedWorker** to manage a single database connection. However:
|
||||||
|
|
||||||
|
1. **SQLocal already uses its own internal worker** - It handles OPFS access internally
|
||||||
|
2. **OPFS handles file coordination** - Multiple SQLocal instances can access the same database file
|
||||||
|
3. **Simpler is better** - BroadcastChannel provides easy cross-tab notification without the complexity of SharedWorker bundling issues in Vite
|
||||||
|
|
||||||
|
The result is simpler code that works reliably with Vite's build system.
|
||||||
|
|
||||||
|
## File Structure
|
||||||
|
|
||||||
|
```
|
||||||
|
project/
|
||||||
|
├── index.html # Entry HTML with map container
|
||||||
|
├── main.js # App entry point
|
||||||
|
├── vite.config.js # Vite configuration
|
||||||
|
├── package.json
|
||||||
|
│
|
||||||
|
├── src/
|
||||||
|
│ ├── components/
|
||||||
|
│ │ └── MapView.js # OpenLayers map with ol-ext LayerSwitcher
|
||||||
|
│ ├── database.js # SQLocal + BroadcastChannel
|
||||||
|
│ └── pwa.js # PWA utilities (install, offline)
|
||||||
|
│
|
||||||
|
└── public/
|
||||||
|
├── sw.js # Service Worker (caching)
|
||||||
|
├── manifest.json # PWA manifest
|
||||||
|
├── offline.html # Offline fallback page
|
||||||
|
└── icons/ # PWA icons
|
||||||
|
```
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Install dependencies
|
||||||
|
npm install
|
||||||
|
|
||||||
|
# Start development server
|
||||||
|
npm run dev
|
||||||
|
|
||||||
|
# Build for production
|
||||||
|
npm run build
|
||||||
|
|
||||||
|
# Preview production build
|
||||||
|
npm run preview
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
### Basic Database Operations
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
import { sql, dbReady, addLocation, getLocations } from './src/database.js';
|
||||||
|
|
||||||
|
// Wait for database to be ready
|
||||||
|
await dbReady;
|
||||||
|
|
||||||
|
// Add a location
|
||||||
|
await addLocation('Water Point', -1.5234, 7.4567, {
|
||||||
|
description: 'Main village well',
|
||||||
|
category: 'water'
|
||||||
|
});
|
||||||
|
|
||||||
|
// Get all locations
|
||||||
|
const locations = await getLocations();
|
||||||
|
|
||||||
|
// Direct SQL queries using tagged templates
|
||||||
|
const results = await sql`SELECT * FROM locations WHERE category = ${'water'}`;
|
||||||
|
```
|
||||||
|
|
||||||
|
### MapView Component
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
import { MapView } from './src/components/MapView.js';
|
||||||
|
|
||||||
|
// Create map centered on Ghana
|
||||||
|
const map = new MapView('map-container', {
|
||||||
|
center: [-1.5, 7.5], // [longitude, latitude]
|
||||||
|
zoom: 7,
|
||||||
|
basemap: 'osm' // 'osm' | 'satellite' | 'topo' | 'carto-light' | 'carto-dark'
|
||||||
|
});
|
||||||
|
|
||||||
|
// Set category-based marker colors
|
||||||
|
map.setCategoryStyles({
|
||||||
|
'water': { color: '#3b82f6' },
|
||||||
|
'school': { color: '#f59e0b' },
|
||||||
|
'health': { color: '#ef4444' },
|
||||||
|
});
|
||||||
|
|
||||||
|
// Add markers from database
|
||||||
|
const locations = await getLocations();
|
||||||
|
map.addMarkers(locations);
|
||||||
|
|
||||||
|
// Handle map clicks
|
||||||
|
map.onClick((lon, lat, feature) => {
|
||||||
|
if (feature) {
|
||||||
|
// Clicked on existing marker
|
||||||
|
console.log('Selected:', feature.get('name'));
|
||||||
|
} else {
|
||||||
|
// Clicked on empty space - use coordinates
|
||||||
|
document.getElementById('longitude').value = lon.toFixed(6);
|
||||||
|
document.getElementById('latitude').value = lat.toFixed(6);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Zoom to a location
|
||||||
|
map.zoomTo(-1.5, 7.5, 14);
|
||||||
|
|
||||||
|
// Fit view to show all markers
|
||||||
|
map.fitToMarkers();
|
||||||
|
|
||||||
|
// Select a marker by ID
|
||||||
|
map.selectMarker(locationId);
|
||||||
|
```
|
||||||
|
|
||||||
|
### Available Base Maps
|
||||||
|
|
||||||
|
| Name | Key | Source |
|
||||||
|
|------|-----|--------|
|
||||||
|
| OpenStreetMap | `osm` | OpenStreetMap |
|
||||||
|
| Satellite | `satellite` | Esri World Imagery |
|
||||||
|
| Topographic | `topo` | OpenTopoMap |
|
||||||
|
| Carto Light | `carto-light` | CARTO |
|
||||||
|
| Carto Dark | `carto-dark` | CARTO |
|
||||||
|
|
||||||
|
### Cross-Tab Synchronization
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
import { onDatabaseChange } from './src/database.js';
|
||||||
|
|
||||||
|
// Listen for changes from other tabs
|
||||||
|
onDatabaseChange((change) => {
|
||||||
|
console.log('Database changed:', change);
|
||||||
|
// { table: 'locations', action: 'INSERT', id: 5, timestamp: 1234567890 }
|
||||||
|
|
||||||
|
if (change.table === 'locations') {
|
||||||
|
refreshLocationsList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
### PWA Features
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
import { initPWA, isOnline, onOfflineChange } from './src/pwa.js';
|
||||||
|
|
||||||
|
// Initialize PWA
|
||||||
|
await initPWA();
|
||||||
|
|
||||||
|
// Check online status
|
||||||
|
if (isOnline()) {
|
||||||
|
syncWithServer();
|
||||||
|
}
|
||||||
|
|
||||||
|
// React to offline/online changes
|
||||||
|
onOfflineChange((offline) => {
|
||||||
|
if (offline) {
|
||||||
|
showOfflineBanner();
|
||||||
|
} else {
|
||||||
|
hideOfflineBanner();
|
||||||
|
syncWithServer();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
## Deployment
|
||||||
|
|
||||||
|
### Required Headers
|
||||||
|
|
||||||
|
Your web server must send these headers for OPFS to work:
|
||||||
|
|
||||||
|
```
|
||||||
|
Cross-Origin-Opener-Policy: same-origin
|
||||||
|
Cross-Origin-Embedder-Policy: require-corp
|
||||||
|
```
|
||||||
|
|
||||||
|
### Nginx Configuration
|
||||||
|
|
||||||
|
```nginx
|
||||||
|
server {
|
||||||
|
listen 443 ssl http2;
|
||||||
|
server_name your-domain.com;
|
||||||
|
|
||||||
|
root /var/www/dist;
|
||||||
|
index index.html;
|
||||||
|
|
||||||
|
# Required for OPFS/SQLite
|
||||||
|
add_header Cross-Origin-Opener-Policy "same-origin" always;
|
||||||
|
add_header Cross-Origin-Embedder-Policy "require-corp" always;
|
||||||
|
|
||||||
|
# Cache static assets
|
||||||
|
location ~* \.(js|css|wasm|png|jpg|ico|svg)$ {
|
||||||
|
expires 1y;
|
||||||
|
add_header Cache-Control "public, immutable";
|
||||||
|
add_header Cross-Origin-Opener-Policy "same-origin" always;
|
||||||
|
add_header Cross-Origin-Embedder-Policy "require-corp" always;
|
||||||
|
}
|
||||||
|
|
||||||
|
# SPA fallback
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Apache (.htaccess)
|
||||||
|
|
||||||
|
```apache
|
||||||
|
<IfModule mod_headers.c>
|
||||||
|
Header always set Cross-Origin-Opener-Policy "same-origin"
|
||||||
|
Header always set Cross-Origin-Embedder-Policy "require-corp"
|
||||||
|
</IfModule>
|
||||||
|
```
|
||||||
|
|
||||||
|
### OpenResty (Docker)
|
||||||
|
|
||||||
|
```nginx
|
||||||
|
add_header Cross-Origin-Opener-Policy "same-origin" always;
|
||||||
|
add_header Cross-Origin-Embedder-Policy "require-corp" always;
|
||||||
|
```
|
||||||
|
|
||||||
|
## Browser Support
|
||||||
|
|
||||||
|
- **Chrome/Edge 89+** - Full support
|
||||||
|
- **Firefox 111+** - Full support
|
||||||
|
- **Safari 15.2+** - OPFS supported
|
||||||
|
- **Mobile** - Chrome Android, Safari iOS 15.2+
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
### "SecurityError" or "NotAllowedError"
|
||||||
|
|
||||||
|
The COOP/COEP headers are missing. Check your server configuration.
|
||||||
|
|
||||||
|
### Database not persisting
|
||||||
|
|
||||||
|
1. Check that you're using HTTPS (or localhost)
|
||||||
|
2. Verify COOP/COEP headers are present (DevTools → Network → check response headers)
|
||||||
|
3. Check browser DevTools → Application → Storage → OPFS
|
||||||
|
|
||||||
|
### Changes not syncing between tabs
|
||||||
|
|
||||||
|
The BroadcastChannel should handle this automatically. Check the browser console for any errors.
|
||||||
|
|
||||||
|
### Vite HMR WebSocket errors
|
||||||
|
|
||||||
|
The cross-origin isolation can break Vite's hot reload. Options:
|
||||||
|
1. Use `vite-plugin-cross-origin-isolation` (add to vite.config.js)
|
||||||
|
2. Or manually refresh the browser after changes
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
MIT
|
||||||
5
dist/assets/bootstrap-BtmJYOxZ.css
vendored
Normal file
5
dist/assets/bootstrap-BtmJYOxZ.css
vendored
Normal file
File diff suppressed because one or more lines are too long
6
dist/assets/bootstrap-D1-uvFxm.js
vendored
Normal file
6
dist/assets/bootstrap-D1-uvFxm.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/assets/bootstrap-D1-uvFxm.js.map
vendored
Normal file
1
dist/assets/bootstrap-D1-uvFxm.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
dist/assets/bootstrap-icons-BeopsB42.woff
vendored
Normal file
BIN
dist/assets/bootstrap-icons-BeopsB42.woff
vendored
Normal file
Binary file not shown.
BIN
dist/assets/bootstrap-icons-mSm7cUeB.woff2
vendored
Normal file
BIN
dist/assets/bootstrap-icons-mSm7cUeB.woff2
vendored
Normal file
Binary file not shown.
393
dist/assets/index-2WHoRhxp.js
vendored
Normal file
393
dist/assets/index-2WHoRhxp.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/assets/index-2WHoRhxp.js.map
vendored
Normal file
1
dist/assets/index-2WHoRhxp.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
5
dist/assets/index-BnwqsTiD.css
vendored
Normal file
5
dist/assets/index-BnwqsTiD.css
vendored
Normal file
File diff suppressed because one or more lines are too long
4
dist/assets/index-DTMgZTfd.js
vendored
Normal file
4
dist/assets/index-DTMgZTfd.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/assets/index-DTMgZTfd.js.map
vendored
Normal file
1
dist/assets/index-DTMgZTfd.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/assets/ol-ext-BgKrOIxx.css
vendored
Normal file
1
dist/assets/ol-ext-BgKrOIxx.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2
dist/assets/ol-ext-DytxBANR.js
vendored
Normal file
2
dist/assets/ol-ext-DytxBANR.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/assets/ol-ext-DytxBANR.js.map
vendored
Normal file
1
dist/assets/ol-ext-DytxBANR.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/assets/openlayers-BtPuoxOl.css
vendored
Normal file
1
dist/assets/openlayers-BtPuoxOl.css
vendored
Normal file
File diff suppressed because one or more lines are too long
573
dist/assets/openlayers-D2I-bVN2.js
vendored
Normal file
573
dist/assets/openlayers-D2I-bVN2.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/assets/openlayers-D2I-bVN2.js.map
vendored
Normal file
1
dist/assets/openlayers-D2I-bVN2.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
dist/assets/sqlite3-DBpDb1lf.wasm
vendored
Normal file
BIN
dist/assets/sqlite3-DBpDb1lf.wasm
vendored
Normal file
Binary file not shown.
2
dist/assets/sqlite3-opfs-async-proxy-B_ImRJXp.js
vendored
Normal file
2
dist/assets/sqlite3-opfs-async-proxy-B_ImRJXp.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/assets/sqlite3-opfs-async-proxy-B_ImRJXp.js.map
vendored
Normal file
1
dist/assets/sqlite3-opfs-async-proxy-B_ImRJXp.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
4
dist/assets/sqlite3-worker1-bundler-friendly-C04unPcl.js
vendored
Normal file
4
dist/assets/sqlite3-worker1-bundler-friendly-C04unPcl.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/assets/sqlite3-worker1-bundler-friendly-C04unPcl.js.map
vendored
Normal file
1
dist/assets/sqlite3-worker1-bundler-friendly-C04unPcl.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
3
dist/assets/worker-CuIBOSaM.js
vendored
Normal file
3
dist/assets/worker-CuIBOSaM.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/assets/worker-CuIBOSaM.js.map
vendored
Normal file
1
dist/assets/worker-CuIBOSaM.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/icons/README.txt
vendored
Normal file
1
dist/icons/README.txt
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
Place PWA icons here (icon-72.png, icon-96.png, icon-128.png, icon-144.png, icon-152.png, icon-192.png, icon-384.png, icon-512.png)
|
||||||
BIN
dist/icons/luspa-16x16.png
vendored
Normal file
BIN
dist/icons/luspa-16x16.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
BIN
dist/icons/luspa-192x192.png
vendored
Normal file
BIN
dist/icons/luspa-192x192.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.0 KiB |
BIN
dist/icons/luspa-32x32.png
vendored
Normal file
BIN
dist/icons/luspa-32x32.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
BIN
dist/icons/luspa-512x512.png
vendored
Normal file
BIN
dist/icons/luspa-512x512.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 185 KiB |
BIN
dist/icons/luspa.icon/Assets/luspalogo.png
vendored
Normal file
BIN
dist/icons/luspa.icon/Assets/luspalogo.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 217 KiB |
49
dist/icons/luspa.icon/icon.json
vendored
Normal file
49
dist/icons/luspa.icon/icon.json
vendored
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
"fill" : {
|
||||||
|
"linear-gradient" : [
|
||||||
|
"display-p3:0.10199,0.05884,0.32544,1.00000",
|
||||||
|
"display-p3:0.27051,0.49023,0.74121,1.00000"
|
||||||
|
],
|
||||||
|
"orientation" : {
|
||||||
|
"start" : {
|
||||||
|
"x" : 0.5,
|
||||||
|
"y" : 0
|
||||||
|
},
|
||||||
|
"stop" : {
|
||||||
|
"x" : 0.5,
|
||||||
|
"y" : 0.7
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"groups" : [
|
||||||
|
{
|
||||||
|
"layers" : [
|
||||||
|
{
|
||||||
|
"image-name" : "luspalogo.png",
|
||||||
|
"name" : "luspalogo",
|
||||||
|
"position" : {
|
||||||
|
"scale" : 1.8,
|
||||||
|
"translation-in-points" : [
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"shadow" : {
|
||||||
|
"kind" : "neutral",
|
||||||
|
"opacity" : 0.5
|
||||||
|
},
|
||||||
|
"translucency" : {
|
||||||
|
"enabled" : true,
|
||||||
|
"value" : 0.5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"supported-platforms" : {
|
||||||
|
"circles" : [
|
||||||
|
"watchOS"
|
||||||
|
],
|
||||||
|
"squares" : "shared"
|
||||||
|
}
|
||||||
|
}
|
||||||
1221
dist/index.html
vendored
Normal file
1221
dist/index.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
64
dist/manifest.json
vendored
Normal file
64
dist/manifest.json
vendored
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
{
|
||||||
|
"name": "LUPMIS2 Drawing Tools",
|
||||||
|
"short_name": "LUPMIS",
|
||||||
|
"description": "Map and GIS functions for Land Use Planning in Ghana",
|
||||||
|
"start_url": "/",
|
||||||
|
"scope": "/",
|
||||||
|
"display": "standalone",
|
||||||
|
"background_color": "#ffffff",
|
||||||
|
"theme_color": "#005eb8",
|
||||||
|
"orientation": "any",
|
||||||
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "/icons/icon-72.png",
|
||||||
|
"sizes": "72x72",
|
||||||
|
"type": "image/png",
|
||||||
|
"purpose": "any"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/icons/icon-96.png",
|
||||||
|
"sizes": "96x96",
|
||||||
|
"type": "image/png",
|
||||||
|
"purpose": "any"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/icons/icon-128.png",
|
||||||
|
"sizes": "128x128",
|
||||||
|
"type": "image/png",
|
||||||
|
"purpose": "any"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/icons/icon-144.png",
|
||||||
|
"sizes": "144x144",
|
||||||
|
"type": "image/png",
|
||||||
|
"purpose": "any"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/icons/icon-152.png",
|
||||||
|
"sizes": "152x152",
|
||||||
|
"type": "image/png",
|
||||||
|
"purpose": "any"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/icons/luspa-192x192.png",
|
||||||
|
"sizes": "192x192",
|
||||||
|
"type": "image/png",
|
||||||
|
"purpose": "any maskable"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/icons/icon-384.png",
|
||||||
|
"sizes": "384x384",
|
||||||
|
"type": "image/png",
|
||||||
|
"purpose": "any"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/icons/luspa-512x512.png",
|
||||||
|
"sizes": "512x512",
|
||||||
|
"type": "image/png",
|
||||||
|
"purpose": "any maskable"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"categories": ["productivity", "utilities"],
|
||||||
|
"lang": "en",
|
||||||
|
"dir": "ltr"
|
||||||
|
}
|
||||||
92
dist/offline.html
vendored
Normal file
92
dist/offline.html
vendored
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="theme-color" content="#2d5016">
|
||||||
|
<title>Offline - LUPMIS</title>
|
||||||
|
<style>
|
||||||
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||||
|
margin: 0;
|
||||||
|
padding: 20px;
|
||||||
|
background: #f5f5f5;
|
||||||
|
color: #333;
|
||||||
|
min-height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.offline-container {
|
||||||
|
text-align: center;
|
||||||
|
max-width: 400px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.offline-icon {
|
||||||
|
font-size: 80px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
color: #2d5016;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
color: #666;
|
||||||
|
line-height: 1.6;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
background: #2d5016;
|
||||||
|
color: white;
|
||||||
|
border: none;
|
||||||
|
padding: 12px 24px;
|
||||||
|
border-radius: 4px;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 16px;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:hover {
|
||||||
|
background: #1e3a0f;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hint {
|
||||||
|
margin-top: 30px;
|
||||||
|
padding: 15px;
|
||||||
|
background: #e3f2fd;
|
||||||
|
border-radius: 8px;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #1565c0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="offline-container">
|
||||||
|
<div class="offline-icon">📴</div>
|
||||||
|
<h1>You're Offline</h1>
|
||||||
|
<p>
|
||||||
|
This page isn't available offline. Please check your internet connection and try again.
|
||||||
|
</p>
|
||||||
|
<button onclick="window.location.reload()">Try Again</button>
|
||||||
|
|
||||||
|
<div class="hint">
|
||||||
|
💡 <strong>Tip:</strong> Visit the main app while online first.
|
||||||
|
Once cached, you can collect data offline!
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// Auto-reload when back online
|
||||||
|
window.addEventListener('online', () => {
|
||||||
|
window.location.reload();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
321
dist/sw.js
vendored
Normal file
321
dist/sw.js
vendored
Normal file
@ -0,0 +1,321 @@
|
|||||||
|
/**
|
||||||
|
* Service Worker
|
||||||
|
*
|
||||||
|
* Handles caching of:
|
||||||
|
* - App shell (HTML, CSS, JS)
|
||||||
|
* - Map tiles (runtime caching)
|
||||||
|
* - API responses (network-first)
|
||||||
|
*
|
||||||
|
* Note: Database operations are handled by the SharedWorker (shared-db-worker.js),
|
||||||
|
* NOT by this service worker. They serve different purposes:
|
||||||
|
* - Service Worker: Caching, offline asset serving, push notifications
|
||||||
|
* - SharedWorker: Shared database connection across tabs
|
||||||
|
*/
|
||||||
|
|
||||||
|
const CACHE_VERSION = 'v1';
|
||||||
|
const SHELL_CACHE = `shell-${CACHE_VERSION}`;
|
||||||
|
const TILES_CACHE = `tiles-${CACHE_VERSION}`;
|
||||||
|
const MODULES_CACHE = `modules-${CACHE_VERSION}`;
|
||||||
|
const API_CACHE = `api-${CACHE_VERSION}`;
|
||||||
|
|
||||||
|
// Maximum number of tiles to cache
|
||||||
|
const MAX_TILES = 500;
|
||||||
|
|
||||||
|
// App shell assets - precached on install
|
||||||
|
// Vite will generate hashed filenames, so we cache the entry points
|
||||||
|
// and let the browser handle the hashed assets
|
||||||
|
const SHELL_ASSETS = [
|
||||||
|
'/',
|
||||||
|
'/index.html',
|
||||||
|
'/offline.html',
|
||||||
|
'/manifest.json'
|
||||||
|
];
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// INSTALL EVENT
|
||||||
|
// ============================================================================
|
||||||
|
|
||||||
|
self.addEventListener('install', (event) => {
|
||||||
|
console.log('[SW] Installing...');
|
||||||
|
|
||||||
|
event.waitUntil(
|
||||||
|
caches.open(SHELL_CACHE)
|
||||||
|
.then((cache) => {
|
||||||
|
console.log('[SW] Precaching app shell');
|
||||||
|
return cache.addAll(SHELL_ASSETS);
|
||||||
|
})
|
||||||
|
.then(() => self.skipWaiting())
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// ACTIVATE EVENT
|
||||||
|
// ============================================================================
|
||||||
|
|
||||||
|
self.addEventListener('activate', (event) => {
|
||||||
|
console.log('[SW] Activating...');
|
||||||
|
|
||||||
|
event.waitUntil(
|
||||||
|
caches.keys()
|
||||||
|
.then((cacheNames) => {
|
||||||
|
return Promise.all(
|
||||||
|
cacheNames
|
||||||
|
.filter((name) => {
|
||||||
|
// Delete old version caches
|
||||||
|
return (name.startsWith('shell-') && name !== SHELL_CACHE) ||
|
||||||
|
(name.startsWith('tiles-') && name !== TILES_CACHE) ||
|
||||||
|
(name.startsWith('modules-') && name !== MODULES_CACHE) ||
|
||||||
|
(name.startsWith('api-') && name !== API_CACHE);
|
||||||
|
})
|
||||||
|
.map((name) => {
|
||||||
|
console.log('[SW] Deleting old cache:', name);
|
||||||
|
return caches.delete(name);
|
||||||
|
})
|
||||||
|
);
|
||||||
|
})
|
||||||
|
.then(() => self.clients.claim())
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// FETCH EVENT
|
||||||
|
// ============================================================================
|
||||||
|
|
||||||
|
self.addEventListener('fetch', (event) => {
|
||||||
|
const request = event.request;
|
||||||
|
const url = new URL(request.url);
|
||||||
|
|
||||||
|
// Only handle GET requests
|
||||||
|
if (request.method !== 'GET') return;
|
||||||
|
|
||||||
|
// Skip chrome-extension and other non-http(s) requests
|
||||||
|
if (!url.protocol.startsWith('http')) return;
|
||||||
|
|
||||||
|
// Route to appropriate caching strategy
|
||||||
|
if (isMapTile(url)) {
|
||||||
|
event.respondWith(cacheThenNetwork(request, TILES_CACHE, MAX_TILES));
|
||||||
|
} else if (isApiRequest(url)) {
|
||||||
|
event.respondWith(networkFirst(request, API_CACHE));
|
||||||
|
} else if (isModuleAsset(url)) {
|
||||||
|
event.respondWith(staleWhileRevalidate(request, MODULES_CACHE));
|
||||||
|
} else if (isAppAsset(url)) {
|
||||||
|
event.respondWith(cacheFirst(request, SHELL_CACHE));
|
||||||
|
}
|
||||||
|
// Let other requests pass through to network
|
||||||
|
});
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// URL CLASSIFICATION
|
||||||
|
// ============================================================================
|
||||||
|
|
||||||
|
function isMapTile(url) {
|
||||||
|
// Common tile server patterns for all our base maps
|
||||||
|
return url.hostname.includes('tile.openstreetmap.org') ||
|
||||||
|
url.hostname.includes('opentopomap.org') ||
|
||||||
|
url.hostname.includes('arcgisonline.com') ||
|
||||||
|
url.hostname.includes('basemaps.cartocdn.com') ||
|
||||||
|
url.hostname.includes('tiles.') ||
|
||||||
|
url.pathname.match(/\/\d+\/\d+\/\d+\.(png|jpg|pbf)$/) ||
|
||||||
|
url.pathname.match(/\/tile\/\d+\/\d+\/\d+/);
|
||||||
|
}
|
||||||
|
|
||||||
|
function isApiRequest(url) {
|
||||||
|
return url.pathname.startsWith('/api/') ||
|
||||||
|
url.pathname.endsWith('.php');
|
||||||
|
}
|
||||||
|
|
||||||
|
function isModuleAsset(url) {
|
||||||
|
return url.pathname.startsWith('/modules/');
|
||||||
|
}
|
||||||
|
|
||||||
|
function isAppAsset(url) {
|
||||||
|
// Same origin, common asset extensions
|
||||||
|
return url.origin === self.location.origin &&
|
||||||
|
(url.pathname.endsWith('.html') ||
|
||||||
|
url.pathname.endsWith('.css') ||
|
||||||
|
url.pathname.endsWith('.js') ||
|
||||||
|
url.pathname.endsWith('.wasm') ||
|
||||||
|
url.pathname.endsWith('.json') ||
|
||||||
|
url.pathname.match(/\.(png|jpg|jpeg|gif|svg|ico|webp)$/));
|
||||||
|
}
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// CACHING STRATEGIES
|
||||||
|
// ============================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cache First - Use cache, fallback to network
|
||||||
|
* Best for: App shell, static assets
|
||||||
|
*/
|
||||||
|
async function cacheFirst(request, cacheName) {
|
||||||
|
const cached = await caches.match(request);
|
||||||
|
if (cached) return cached;
|
||||||
|
|
||||||
|
try {
|
||||||
|
const response = await fetch(request);
|
||||||
|
if (response.ok) {
|
||||||
|
const cache = await caches.open(cacheName);
|
||||||
|
cache.put(request, response.clone());
|
||||||
|
}
|
||||||
|
return response;
|
||||||
|
} catch (error) {
|
||||||
|
// Return offline page for navigation requests
|
||||||
|
if (request.mode === 'navigate') {
|
||||||
|
return caches.match('/offline.html');
|
||||||
|
}
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Network First - Try network, fallback to cache
|
||||||
|
* Best for: API requests, dynamic content
|
||||||
|
*/
|
||||||
|
async function networkFirst(request, cacheName) {
|
||||||
|
try {
|
||||||
|
const response = await fetch(request);
|
||||||
|
if (response.ok) {
|
||||||
|
const cache = await caches.open(cacheName);
|
||||||
|
cache.put(request, response.clone());
|
||||||
|
}
|
||||||
|
return response;
|
||||||
|
} catch (error) {
|
||||||
|
const cached = await caches.match(request);
|
||||||
|
if (cached) return cached;
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stale While Revalidate - Return cache immediately, update in background
|
||||||
|
* Best for: Module assets, frequently updated content
|
||||||
|
*/
|
||||||
|
async function staleWhileRevalidate(request, cacheName) {
|
||||||
|
const cache = await caches.open(cacheName);
|
||||||
|
const cached = await cache.match(request);
|
||||||
|
|
||||||
|
const fetchPromise = fetch(request).then((response) => {
|
||||||
|
if (response.ok) {
|
||||||
|
cache.put(request, response.clone());
|
||||||
|
}
|
||||||
|
return response;
|
||||||
|
}).catch(() => cached);
|
||||||
|
|
||||||
|
return cached || fetchPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cache Then Network with limit - Cache tiles with size limit
|
||||||
|
* Best for: Map tiles
|
||||||
|
*/
|
||||||
|
async function cacheThenNetwork(request, cacheName, maxItems) {
|
||||||
|
const cache = await caches.open(cacheName);
|
||||||
|
const cached = await cache.match(request);
|
||||||
|
|
||||||
|
if (cached) return cached;
|
||||||
|
|
||||||
|
try {
|
||||||
|
const response = await fetch(request);
|
||||||
|
|
||||||
|
if (response.ok) {
|
||||||
|
// Check cache size and trim if needed
|
||||||
|
const keys = await cache.keys();
|
||||||
|
if (keys.length >= maxItems) {
|
||||||
|
// Remove oldest entries (first 10%)
|
||||||
|
const toDelete = keys.slice(0, Math.ceil(maxItems * 0.1));
|
||||||
|
await Promise.all(toDelete.map(key => cache.delete(key)));
|
||||||
|
}
|
||||||
|
|
||||||
|
cache.put(request, response.clone());
|
||||||
|
}
|
||||||
|
|
||||||
|
return response;
|
||||||
|
} catch (error) {
|
||||||
|
// For tiles, just fail silently - map will show blank tile
|
||||||
|
return new Response('', { status: 408, statusText: 'Offline' });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// MESSAGE HANDLING
|
||||||
|
// ============================================================================
|
||||||
|
|
||||||
|
self.addEventListener('message', (event) => {
|
||||||
|
const { type, payload } = event.data || {};
|
||||||
|
|
||||||
|
switch (type) {
|
||||||
|
case 'SKIP_WAITING':
|
||||||
|
self.skipWaiting();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'CACHE_MODULES':
|
||||||
|
cacheModules(payload.modules);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'CLEAR_USER_CACHE':
|
||||||
|
clearUserCaches();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'GET_CACHE_STATUS':
|
||||||
|
getCacheStatus().then(status => {
|
||||||
|
event.source.postMessage({ type: 'CACHE_STATUS', status });
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cache specific modules on demand
|
||||||
|
*/
|
||||||
|
async function cacheModules(moduleNames) {
|
||||||
|
const cache = await caches.open(MODULES_CACHE);
|
||||||
|
|
||||||
|
for (const moduleName of moduleNames) {
|
||||||
|
try {
|
||||||
|
const moduleAssets = [
|
||||||
|
`/modules/${moduleName}/index.js`,
|
||||||
|
`/modules/${moduleName}/index.css`,
|
||||||
|
`/modules/${moduleName}/index.html`
|
||||||
|
];
|
||||||
|
|
||||||
|
await cache.addAll(moduleAssets.filter(async (url) => {
|
||||||
|
// Only cache assets that exist
|
||||||
|
try {
|
||||||
|
const response = await fetch(url, { method: 'HEAD' });
|
||||||
|
return response.ok;
|
||||||
|
} catch {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
|
||||||
|
console.log('[SW] Cached module:', moduleName);
|
||||||
|
} catch (error) {
|
||||||
|
console.warn('[SW] Failed to cache module:', moduleName, error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clear user-specific caches (call on logout)
|
||||||
|
*/
|
||||||
|
async function clearUserCaches() {
|
||||||
|
await caches.delete(API_CACHE);
|
||||||
|
await caches.delete(MODULES_CACHE);
|
||||||
|
console.log('[SW] Cleared user caches');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get cache status information
|
||||||
|
*/
|
||||||
|
async function getCacheStatus() {
|
||||||
|
const cacheNames = await caches.keys();
|
||||||
|
const status = {};
|
||||||
|
|
||||||
|
for (const name of cacheNames) {
|
||||||
|
const cache = await caches.open(name);
|
||||||
|
const keys = await cache.keys();
|
||||||
|
status[name] = keys.length;
|
||||||
|
}
|
||||||
|
|
||||||
|
return status;
|
||||||
|
}
|
||||||
1214
index.html
Normal file
1214
index.html
Normal file
File diff suppressed because it is too large
Load Diff
2960
lupmis2.css
Normal file
2960
lupmis2.css
Normal file
File diff suppressed because it is too large
Load Diff
632
main0.js
Normal file
632
main0.js
Normal file
@ -0,0 +1,632 @@
|
|||||||
|
/**
|
||||||
|
* Main Application Entry Point
|
||||||
|
*
|
||||||
|
* Demonstrates integration of:
|
||||||
|
* - Bootstrap 5.3 for UI components
|
||||||
|
* - SQLocal (SQLite in browser via OPFS)
|
||||||
|
* - BroadcastChannel for cross-tab sync
|
||||||
|
* - OpenLayers map with ol-ext LayerSwitcher
|
||||||
|
* - PWA features (Service Worker, install prompt, offline detection)
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Bootstrap CSS and JS
|
||||||
|
import 'bootstrap/dist/css/bootstrap.min.css';
|
||||||
|
import 'bootstrap-icons/font/bootstrap-icons.css';
|
||||||
|
import { Modal, Offcanvas } from 'bootstrap';
|
||||||
|
|
||||||
|
// Database module (uses SQLocal directly, BroadcastChannel for tab sync)
|
||||||
|
import {
|
||||||
|
sql,
|
||||||
|
dbReady,
|
||||||
|
initSchema,
|
||||||
|
addLocation,
|
||||||
|
getLocations,
|
||||||
|
getLocationCount,
|
||||||
|
getDatabaseStatus,
|
||||||
|
downloadDatabase,
|
||||||
|
onDatabaseChange,
|
||||||
|
exportToGeoJSON
|
||||||
|
} from './src/database.js';
|
||||||
|
|
||||||
|
// Map component with OpenLayers and ol-ext LayerSwitcher
|
||||||
|
import { MapView } from './src/components/MapView.js';
|
||||||
|
|
||||||
|
// Map measurement and drawing tools
|
||||||
|
import { MapTools } from './src/components/MapTools.js';
|
||||||
|
|
||||||
|
// PWA module (registers Service Worker, handles install/offline)
|
||||||
|
import { initPWA, isOnline, onOfflineChange } from './src/pwa.js';
|
||||||
|
|
||||||
|
// Map instance (global for access across functions)
|
||||||
|
let mapView = null;
|
||||||
|
let mapTools = null;
|
||||||
|
|
||||||
|
// Current interaction mode: 'addLocation' | 'measureCircle' | 'measureLine' | 'measureArea'
|
||||||
|
let currentMode = 'addLocation';
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// Application Initialization
|
||||||
|
// ============================================================================
|
||||||
|
|
||||||
|
async function initApp() {
|
||||||
|
console.log('[App] Initializing...');
|
||||||
|
|
||||||
|
// 1. Initialize PWA features (Service Worker, install prompt, offline detection)
|
||||||
|
await initPWA({
|
||||||
|
installButton: '#install-btn',
|
||||||
|
offlineIndicator: '#offline-indicator',
|
||||||
|
autoRegisterSW: true
|
||||||
|
});
|
||||||
|
|
||||||
|
// 2. Initialize the map
|
||||||
|
mapView = new MapView('map', {
|
||||||
|
center: [-1.5, 7.5], // Ghana
|
||||||
|
zoom: 7,
|
||||||
|
basemap: 'osm'
|
||||||
|
});
|
||||||
|
|
||||||
|
// Initialize map measurement tools
|
||||||
|
mapTools = new MapTools(mapView.getMap());
|
||||||
|
|
||||||
|
// Log measurement results
|
||||||
|
mapTools.onMeasureComplete((result) => {
|
||||||
|
console.log('[MapTools] Measurement complete:', result);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Category emojis are set up in MapView:
|
||||||
|
// 'water': '💧', 'school': '🏫', 'health': '🏥',
|
||||||
|
// 'market': '🏪', 'default': '📍', 'other': '📌'
|
||||||
|
|
||||||
|
// Set up map click handler immediately after map creation
|
||||||
|
mapView.onClick((lon, lat, feature, evt) => {
|
||||||
|
console.log('[MapClick] Clicked at:', lon.toFixed(4), lat.toFixed(4));
|
||||||
|
console.log('[MapClick] currentMode =', currentMode);
|
||||||
|
console.log('[MapClick] typeof currentMode =', typeof currentMode);
|
||||||
|
|
||||||
|
// Only handle location-related clicks in addLocation mode
|
||||||
|
if (currentMode !== 'addLocation') {
|
||||||
|
console.log('[MapClick] NOT in addLocation mode, skipping popup');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log('[MapClick] IN addLocation mode, processing...');
|
||||||
|
|
||||||
|
if (feature) {
|
||||||
|
// Clicked on existing marker - select it and show details
|
||||||
|
console.log('[MapClick] Clicked on feature:', feature.getId());
|
||||||
|
mapView.selectMarker(feature);
|
||||||
|
showLocationDetails(feature);
|
||||||
|
} else {
|
||||||
|
// Clicked on empty space - show add location popup at click position
|
||||||
|
console.log('[MapClick] Clicked on empty space, showing popup');
|
||||||
|
mapView.clearSelection();
|
||||||
|
mapView.showAddLocationPopup(evt.coordinate);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Set up handler for the map add location popup form
|
||||||
|
mapView.onAddLocation(async (data) => {
|
||||||
|
console.log('[App] Add location from map popup:', data);
|
||||||
|
try {
|
||||||
|
const result = await addLocation(data.name, data.lon, data.lat, {
|
||||||
|
description: data.description || null,
|
||||||
|
category: data.category || 'default'
|
||||||
|
});
|
||||||
|
console.log('[App] Location added:', data.name, 'id:', result.id);
|
||||||
|
|
||||||
|
await loadLocations();
|
||||||
|
|
||||||
|
// Zoom to the new location on the map
|
||||||
|
mapView?.zoomTo(data.lon, data.lat, 14);
|
||||||
|
|
||||||
|
// Select the new marker
|
||||||
|
if (result.id) {
|
||||||
|
mapView?.selectMarker(result.id);
|
||||||
|
}
|
||||||
|
|
||||||
|
showSuccess('Location added successfully');
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
console.error('[App] Failed to add location:', error);
|
||||||
|
showError('Failed to add location: ' + error.message);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 3. Initialize database
|
||||||
|
try {
|
||||||
|
console.log('[App] Initializing database...');
|
||||||
|
|
||||||
|
// Initialize schema (creates tables if they don't exist)
|
||||||
|
// This also resolves dbReady when complete
|
||||||
|
await initSchema();
|
||||||
|
|
||||||
|
// Now dbReady should be resolved
|
||||||
|
console.log('[App] Database ready');
|
||||||
|
|
||||||
|
// Show database status
|
||||||
|
const status = await getDatabaseStatus();
|
||||||
|
console.log('[App] Database status:', status);
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
console.error('[App] Database initialization failed:', error);
|
||||||
|
showError('Failed to initialize database. Please refresh the page.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 4. Initialize UI
|
||||||
|
initUI();
|
||||||
|
|
||||||
|
// 5. Load initial data and display on map
|
||||||
|
await loadLocations();
|
||||||
|
|
||||||
|
// 6. Listen for database changes from other tabs
|
||||||
|
onDatabaseChange((change) => {
|
||||||
|
console.log('[App] Database change:', change);
|
||||||
|
if (change.table === 'locations' && !change.local) {
|
||||||
|
// Reload locations when another tab makes changes
|
||||||
|
loadLocations();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 7. Set up offline handling
|
||||||
|
onOfflineChange((offline) => {
|
||||||
|
if (offline) {
|
||||||
|
console.log('[App] Working offline - data will sync when back online');
|
||||||
|
} else {
|
||||||
|
console.log('[App] Back online - syncing data...');
|
||||||
|
syncData();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log('[App] Initialized successfully');
|
||||||
|
}
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// UI Initialization
|
||||||
|
// ============================================================================
|
||||||
|
|
||||||
|
function initUI() {
|
||||||
|
console.log('[initUI] Starting UI initialization...');
|
||||||
|
|
||||||
|
// Export button
|
||||||
|
const exportBtn = document.getElementById('export-btn');
|
||||||
|
if (exportBtn) {
|
||||||
|
exportBtn.addEventListener('click', handleExport);
|
||||||
|
}
|
||||||
|
|
||||||
|
// GeoJSON Export button
|
||||||
|
const exportGeoJSONBtn = document.getElementById('exportGeoJSON-btn');
|
||||||
|
if (exportGeoJSONBtn) {
|
||||||
|
exportGeoJSONBtn.addEventListener('click', handleExportGeoJSON);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Status button
|
||||||
|
const statusBtn = document.getElementById('status-btn');
|
||||||
|
if (statusBtn) {
|
||||||
|
statusBtn.addEventListener('click', handleShowStatus);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fit to markers button
|
||||||
|
const fitBtn = document.getElementById('fit-btn');
|
||||||
|
if (fitBtn) {
|
||||||
|
fitBtn.addEventListener('click', () => mapView?.fitToMarkers());
|
||||||
|
}
|
||||||
|
|
||||||
|
// ============================================
|
||||||
|
// Mode Selector & Measurement Tools (Bottom Dock)
|
||||||
|
// ============================================
|
||||||
|
|
||||||
|
const addLocationBtn = document.getElementById('dock-btn-add-location');
|
||||||
|
const measureCircleBtn = document.getElementById('dock-btn-measure-circle');
|
||||||
|
const measureLineBtn = document.getElementById('dock-btn-measure-line');
|
||||||
|
const measureAreaBtn = document.getElementById('dock-btn-measure-area');
|
||||||
|
const clearBtn = document.getElementById('dock-btn-clear');
|
||||||
|
|
||||||
|
// Debug: Check if buttons are found
|
||||||
|
console.log('[initUI] Buttons found:', {
|
||||||
|
addLocation: !!addLocationBtn,
|
||||||
|
measureCircle: !!measureCircleBtn,
|
||||||
|
measureLine: !!measureLineBtn,
|
||||||
|
measureArea: !!measureAreaBtn,
|
||||||
|
clear: !!clearBtn
|
||||||
|
});
|
||||||
|
|
||||||
|
// All mode buttons (mutually exclusive)
|
||||||
|
const modeButtons = [addLocationBtn, measureCircleBtn, measureLineBtn, measureAreaBtn];
|
||||||
|
|
||||||
|
// Helper to set active mode and update button states
|
||||||
|
// Note: This updates the module-level currentMode variable
|
||||||
|
const setMode = (mode, activeBtn) => {
|
||||||
|
console.log('[setMode] Changing mode from', currentMode, 'to', mode);
|
||||||
|
currentMode = mode;
|
||||||
|
console.log('[setMode] currentMode is now:', currentMode);
|
||||||
|
|
||||||
|
// Update button active states
|
||||||
|
modeButtons.forEach(btn => {
|
||||||
|
if (btn) btn.classList.toggle('active', btn === activeBtn);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Deactivate any measurement tool when switching modes
|
||||||
|
mapTools?.deactivate();
|
||||||
|
|
||||||
|
// Hide add location popup when leaving addLocation mode
|
||||||
|
if (mode !== 'addLocation') {
|
||||||
|
mapView?.hideAddLocationPopup();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Activate the appropriate measurement tool
|
||||||
|
switch (mode) {
|
||||||
|
case 'measureCircle':
|
||||||
|
mapTools?.startCircleMeasure();
|
||||||
|
break;
|
||||||
|
case 'measureLine':
|
||||||
|
mapTools?.startLineMeasure();
|
||||||
|
break;
|
||||||
|
case 'measureArea':
|
||||||
|
mapTools?.startAreaMeasure();
|
||||||
|
break;
|
||||||
|
// addLocation mode doesn't need tool activation
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Add Location mode button
|
||||||
|
if (addLocationBtn) {
|
||||||
|
addLocationBtn.addEventListener('click', () => {
|
||||||
|
console.log('[Button] Add Location clicked');
|
||||||
|
setMode('addLocation', addLocationBtn);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Circle measurement button
|
||||||
|
if (measureCircleBtn) {
|
||||||
|
measureCircleBtn.addEventListener('click', () => {
|
||||||
|
console.log('[Button] Circle clicked, currentMode is:', currentMode);
|
||||||
|
if (currentMode === 'measureCircle') {
|
||||||
|
// Toggle off - return to addLocation mode
|
||||||
|
setMode('addLocation', addLocationBtn);
|
||||||
|
} else {
|
||||||
|
setMode('measureCircle', measureCircleBtn);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Line measurement button
|
||||||
|
if (measureLineBtn) {
|
||||||
|
measureLineBtn.addEventListener('click', () => {
|
||||||
|
console.log('[Button] Line clicked, currentMode is:', currentMode);
|
||||||
|
if (currentMode === 'measureLine') {
|
||||||
|
setMode('addLocation', addLocationBtn);
|
||||||
|
} else {
|
||||||
|
setMode('measureLine', measureLineBtn);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Area measurement button
|
||||||
|
if (measureAreaBtn) {
|
||||||
|
measureAreaBtn.addEventListener('click', () => {
|
||||||
|
console.log('[Button] Area clicked, currentMode is:', currentMode);
|
||||||
|
if (currentMode === 'measureArea') {
|
||||||
|
setMode('addLocation', addLocationBtn);
|
||||||
|
} else {
|
||||||
|
setMode('measureArea', measureAreaBtn);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clear button - clears measurements but stays in current mode
|
||||||
|
if (clearBtn) {
|
||||||
|
clearBtn.addEventListener('click', () => {
|
||||||
|
mapTools?.clearMeasurements();
|
||||||
|
// If in a measurement mode, restart the tool
|
||||||
|
if (currentMode.startsWith('measure')) {
|
||||||
|
mapTools?.deactivate();
|
||||||
|
switch (currentMode) {
|
||||||
|
case 'measureCircle':
|
||||||
|
mapTools?.startCircleMeasure();
|
||||||
|
break;
|
||||||
|
case 'measureLine':
|
||||||
|
mapTools?.startLineMeasure();
|
||||||
|
break;
|
||||||
|
case 'measureArea':
|
||||||
|
mapTools?.startAreaMeasure();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// Location Handlers
|
||||||
|
// ============================================================================
|
||||||
|
|
||||||
|
async function handleAddLocation(event) {
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
const form = event.target;
|
||||||
|
const formData = new FormData(form);
|
||||||
|
|
||||||
|
const name = formData.get('name');
|
||||||
|
const longitude = parseFloat(formData.get('longitude'));
|
||||||
|
const latitude = parseFloat(formData.get('latitude'));
|
||||||
|
const description = formData.get('description') || null;
|
||||||
|
const category = formData.get('category') || 'default';
|
||||||
|
|
||||||
|
if (!name || isNaN(longitude) || isNaN(latitude)) {
|
||||||
|
showError('Please fill in all required fields');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const result = await addLocation(name, longitude, latitude, { description, category });
|
||||||
|
console.log('[App] Location added:', name, 'id:', result.id);
|
||||||
|
|
||||||
|
form.reset();
|
||||||
|
await loadLocations();
|
||||||
|
|
||||||
|
// Zoom to the new location on the map
|
||||||
|
mapView?.zoomTo(longitude, latitude, 14);
|
||||||
|
|
||||||
|
// Select the new marker
|
||||||
|
if (result.id) {
|
||||||
|
mapView?.selectMarker(result.id);
|
||||||
|
}
|
||||||
|
|
||||||
|
showSuccess('Location added successfully');
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
console.error('[App] Failed to add location:', error);
|
||||||
|
showError('Failed to add location: ' + error.message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function loadLocations() {
|
||||||
|
try {
|
||||||
|
console.log('[App] Loading locations...');
|
||||||
|
const locations = await getLocations();
|
||||||
|
console.log('[App] Locations loaded:', locations);
|
||||||
|
|
||||||
|
// Update the list
|
||||||
|
renderLocations(locations);
|
||||||
|
|
||||||
|
// Update the map markers
|
||||||
|
if (mapView) {
|
||||||
|
mapView.clearMarkers();
|
||||||
|
if (locations.length > 0) {
|
||||||
|
mapView.addMarkers(locations);
|
||||||
|
console.log('[App] Added', locations.length, 'markers to map');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update count display
|
||||||
|
const countEl = document.getElementById('location-count');
|
||||||
|
if (countEl) {
|
||||||
|
countEl.textContent = locations.length;
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
console.error('[App] Failed to load locations:', error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show details for a selected location
|
||||||
|
*/
|
||||||
|
function showLocationDetails(feature) {
|
||||||
|
const name = feature.get('name');
|
||||||
|
const description = feature.get('description');
|
||||||
|
const category = feature.get('category');
|
||||||
|
const lon = feature.get('lon') || feature.get('longitude');
|
||||||
|
const lat = feature.get('lat') || feature.get('latitude');
|
||||||
|
|
||||||
|
// You could show a popup or info panel here
|
||||||
|
// For now, just log to console
|
||||||
|
console.log('[App] Selected location:', { name, description, category, lon, lat });
|
||||||
|
|
||||||
|
// Optionally zoom to the location
|
||||||
|
// mapView.zoomTo(lon, lat, 14);
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderLocations(locations) {
|
||||||
|
const container = document.getElementById('locations-list');
|
||||||
|
if (!container) return;
|
||||||
|
|
||||||
|
// Also update mobile count
|
||||||
|
const mobileCount = document.getElementById('location-count-mobile');
|
||||||
|
if (mobileCount) {
|
||||||
|
mobileCount.textContent = locations.length;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (locations.length === 0) {
|
||||||
|
container.innerHTML = `
|
||||||
|
<div class="text-center text-muted py-4">
|
||||||
|
<p class="mb-0">No locations yet.</p>
|
||||||
|
<small>Click the map or fill the form above!</small>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Category emoji mapping
|
||||||
|
const categoryEmojis = {
|
||||||
|
'water': '💧',
|
||||||
|
'school': '🏫',
|
||||||
|
'health': '🏥',
|
||||||
|
'market': '🏪',
|
||||||
|
'default': '📍',
|
||||||
|
'other': '📌'
|
||||||
|
};
|
||||||
|
|
||||||
|
container.innerHTML = locations.map(loc => {
|
||||||
|
const emoji = categoryEmojis[loc.category] || '📍';
|
||||||
|
return `
|
||||||
|
<a href="#" class="list-group-item list-group-item-action location-item py-2"
|
||||||
|
data-id="${loc.id}" data-lon="${loc.longitude}" data-lat="${loc.latitude}">
|
||||||
|
<div class="d-flex w-100 justify-content-between align-items-start">
|
||||||
|
<div>
|
||||||
|
<h6 class="mb-1">${emoji} ${escapeHtml(loc.name)}</h6>
|
||||||
|
<small class="text-muted font-monospace">${loc.latitude.toFixed(5)}, ${loc.longitude.toFixed(5)}</small>
|
||||||
|
</div>
|
||||||
|
<span class="badge badge-${loc.category}">${loc.category}</span>
|
||||||
|
</div>
|
||||||
|
${loc.description ? `<small class="text-secondary d-block mt-1">${escapeHtml(loc.description)}</small>` : ''}
|
||||||
|
</a>
|
||||||
|
`;
|
||||||
|
}).join('');
|
||||||
|
|
||||||
|
// Add click handlers to zoom to location
|
||||||
|
container.querySelectorAll('.location-item').forEach(item => {
|
||||||
|
item.addEventListener('click', (e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
const lon = parseFloat(item.dataset.lon);
|
||||||
|
const lat = parseFloat(item.dataset.lat);
|
||||||
|
const id = parseInt(item.dataset.id);
|
||||||
|
|
||||||
|
// Zoom to location on map
|
||||||
|
mapView?.zoomTo(lon, lat, 14);
|
||||||
|
|
||||||
|
// Select the marker
|
||||||
|
mapView?.selectMarker(id);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// Export Handler
|
||||||
|
// ============================================================================
|
||||||
|
|
||||||
|
async function handleExport() {
|
||||||
|
try {
|
||||||
|
await downloadDatabase('lupmis-backup.sqlite3');
|
||||||
|
showSuccess('Database exported successfully');
|
||||||
|
} catch (error) {
|
||||||
|
console.error('[App] Export failed:', error);
|
||||||
|
showError('Export failed: ' + error.message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// Status Handler
|
||||||
|
// ============================================================================
|
||||||
|
|
||||||
|
async function handleShowStatus() {
|
||||||
|
try {
|
||||||
|
const status = await getDatabaseStatus();
|
||||||
|
|
||||||
|
// Update modal content
|
||||||
|
const statusContent = document.getElementById('status-content');
|
||||||
|
if (statusContent) {
|
||||||
|
statusContent.innerHTML = `
|
||||||
|
<table class="table table-sm table-borderless mb-0">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="fw-semibold">Ready:</td>
|
||||||
|
<td><span class="badge ${status.ready ? 'bg-success' : 'bg-danger'}">${status.ready ? 'Yes' : 'No'}</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="fw-semibold">Online:</td>
|
||||||
|
<td><span class="badge ${isOnline() ? 'bg-success' : 'bg-warning'}">${isOnline() ? 'Yes' : 'Offline'}</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="fw-semibold">Database:</td>
|
||||||
|
<td><code>${status.databasePath || 'N/A'}</code></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="fw-semibold">Tables:</td>
|
||||||
|
<td>${status.tables.map(t => `<span class="badge bg-secondary me-1">${t}</span>`).join('')}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="fw-semibold">Locations:</td>
|
||||||
|
<td><span class="badge bg-primary">${status.locationCount}</span></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Show the modal using Bootstrap
|
||||||
|
const statusModal = new Modal(document.getElementById('statusModal'));
|
||||||
|
statusModal.show();
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
console.error('[App] Failed to get status:', error);
|
||||||
|
showError('Failed to get status');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// Sync (placeholder - implement based on your backend)
|
||||||
|
// ============================================================================
|
||||||
|
|
||||||
|
async function syncData() {
|
||||||
|
if (!isOnline()) {
|
||||||
|
console.log('[App] Cannot sync - offline');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: Implement sync with your backend
|
||||||
|
// Example:
|
||||||
|
// const unsynced = await getUnsyncedLocations();
|
||||||
|
// for (const location of unsynced) {
|
||||||
|
// await fetch('/api/locations', {
|
||||||
|
// method: 'POST',
|
||||||
|
// body: JSON.stringify(location)
|
||||||
|
// });
|
||||||
|
// await markLocationsSynced([location.id]);
|
||||||
|
// }
|
||||||
|
|
||||||
|
console.log('[App] Sync placeholder - implement based on your backend');
|
||||||
|
}
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// Utilities
|
||||||
|
// ============================================================================
|
||||||
|
|
||||||
|
function escapeHtml(text) {
|
||||||
|
const div = document.createElement('div');
|
||||||
|
div.textContent = text;
|
||||||
|
return div.innerHTML;
|
||||||
|
}
|
||||||
|
|
||||||
|
function showError(message) {
|
||||||
|
const el = document.getElementById('error-message');
|
||||||
|
if (el) {
|
||||||
|
el.querySelector('.message-text').textContent = message;
|
||||||
|
el.classList.remove('d-none');
|
||||||
|
|
||||||
|
// Auto-hide after 5 seconds
|
||||||
|
setTimeout(() => {
|
||||||
|
el.classList.add('d-none');
|
||||||
|
}, 5000);
|
||||||
|
} else {
|
||||||
|
console.error(message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function showSuccess(message) {
|
||||||
|
const el = document.getElementById('success-message');
|
||||||
|
if (el) {
|
||||||
|
el.querySelector('.message-text').textContent = message;
|
||||||
|
el.classList.remove('d-none');
|
||||||
|
|
||||||
|
// Auto-hide after 3 seconds
|
||||||
|
setTimeout(() => {
|
||||||
|
el.classList.add('d-none');
|
||||||
|
}, 3000);
|
||||||
|
} else {
|
||||||
|
console.log(message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// Start Application
|
||||||
|
// ============================================================================
|
||||||
|
|
||||||
|
// Wait for DOM to be ready
|
||||||
|
if (document.readyState === 'loading') {
|
||||||
|
document.addEventListener('DOMContentLoaded', initApp);
|
||||||
|
} else {
|
||||||
|
initApp();
|
||||||
|
}
|
||||||
1
node_modules/.bin/esbuild
generated
vendored
Symbolic link
1
node_modules/.bin/esbuild
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../esbuild/bin/esbuild
|
||||||
1
node_modules/.bin/nanoid
generated
vendored
Symbolic link
1
node_modules/.bin/nanoid
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../nanoid/bin/nanoid.cjs
|
||||||
1
node_modules/.bin/pbf
generated
vendored
Symbolic link
1
node_modules/.bin/pbf
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../pbf/bin/pbf
|
||||||
1
node_modules/.bin/rollup
generated
vendored
Symbolic link
1
node_modules/.bin/rollup
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../rollup/dist/bin/rollup
|
||||||
1
node_modules/.bin/sqlite-wasm
generated
vendored
Symbolic link
1
node_modules/.bin/sqlite-wasm
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../@sqlite.org/sqlite-wasm/bin/index.js
|
||||||
1
node_modules/.bin/vite
generated
vendored
Symbolic link
1
node_modules/.bin/vite
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../vite/bin/vite.js
|
||||||
643
node_modules/.package-lock.json
generated
vendored
Normal file
643
node_modules/.package-lock.json
generated
vendored
Normal file
@ -0,0 +1,643 @@
|
|||||||
|
{
|
||||||
|
"name": "lupmis-pwa",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"lockfileVersion": 3,
|
||||||
|
"requires": true,
|
||||||
|
"packages": {
|
||||||
|
"node_modules/@esbuild/darwin-arm64": {
|
||||||
|
"version": "0.25.12",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz",
|
||||||
|
"integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"darwin"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@petamoriken/float16": {
|
||||||
|
"version": "3.9.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@petamoriken/float16/-/float16-3.9.3.tgz",
|
||||||
|
"integrity": "sha512-8awtpHXCx/bNpFt4mt2xdkgtgVvKqty8VbjHI/WWWQuEw+KLzFot3f4+LkQY9YmOtq7A5GdOnqoIC8Pdygjk2g==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/@popperjs/core": {
|
||||||
|
"version": "2.11.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz",
|
||||||
|
"integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==",
|
||||||
|
"license": "MIT",
|
||||||
|
"funding": {
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/popperjs"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@rollup/rollup-darwin-arm64": {
|
||||||
|
"version": "4.55.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.55.3.tgz",
|
||||||
|
"integrity": "sha512-1ht2SpGIjEl2igJ9AbNpPIKzb1B5goXOcmtD0RFxnwNuMxqkR6AUaaErZz+4o+FKmzxcSNBOLrzsICZVNYa1Rw==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"darwin"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"node_modules/@sqlite.org/sqlite-wasm": {
|
||||||
|
"version": "3.50.4-build1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@sqlite.org/sqlite-wasm/-/sqlite-wasm-3.50.4-build1.tgz",
|
||||||
|
"integrity": "sha512-Qig2Wso7gPkU1PtXwFzndh+CTRzrIFxVGqv6eCetjU7YqxlHItj+GvQYwYTppCRgAPawtRN/4AJcEgB9xDHGug==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"bin": {
|
||||||
|
"sqlite-wasm": "bin/index.js"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@types/estree": {
|
||||||
|
"version": "1.0.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",
|
||||||
|
"integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==",
|
||||||
|
"devOptional": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/@types/rbush": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/rbush/-/rbush-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-+N+2H39P8X+Hy1I5mC6awlTX54k3FhiUmvt7HWzGJZvF+syUAAxP/stwppS8JE84YHqFgRMv6fCy31202CMFxQ==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/@ungap/structured-clone": {
|
||||||
|
"version": "1.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz",
|
||||||
|
"integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==",
|
||||||
|
"license": "ISC"
|
||||||
|
},
|
||||||
|
"node_modules/@ungap/with-resolvers": {
|
||||||
|
"version": "0.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@ungap/with-resolvers/-/with-resolvers-0.1.0.tgz",
|
||||||
|
"integrity": "sha512-g7f0IkJdPW2xhY7H4iE72DAsIyfuwEFc6JWc2tYFwKDMWWAF699vGjrM348cwQuOXgHpe1gWFe+Eiyjx/ewvvw==",
|
||||||
|
"license": "ISC"
|
||||||
|
},
|
||||||
|
"node_modules/bootstrap": {
|
||||||
|
"version": "5.3.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.3.8.tgz",
|
||||||
|
"integrity": "sha512-HP1SZDqaLDPwsNiqRqi5NcP0SSXciX2s9E+RyqJIIqGo+vJeN5AJVM98CXmW/Wux0nQ5L7jeWUdplCEf0Ee+tg==",
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"type": "github",
|
||||||
|
"url": "https://github.com/sponsors/twbs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/bootstrap"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"peerDependencies": {
|
||||||
|
"@popperjs/core": "^2.11.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/bootstrap-icons": {
|
||||||
|
"version": "1.13.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/bootstrap-icons/-/bootstrap-icons-1.13.1.tgz",
|
||||||
|
"integrity": "sha512-ijombt4v6bv5CLeXvRWKy7CuM3TRTuPEuGaGKvTV5cz65rQSY8RQ2JcHt6b90cBBAC7s8fsf2EkQDldzCoXUjw==",
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"type": "github",
|
||||||
|
"url": "https://github.com/sponsors/twbs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/bootstrap"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/coincident": {
|
||||||
|
"version": "1.2.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/coincident/-/coincident-1.2.3.tgz",
|
||||||
|
"integrity": "sha512-Uxz3BMTWIslzeWjuQnizGWVg0j6khbvHUQ8+5BdM7WuJEm4ALXwq3wluYoB+uF68uPBz/oUOeJnYURKyfjexlA==",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"@ungap/structured-clone": "^1.2.0",
|
||||||
|
"@ungap/with-resolvers": "^0.1.0",
|
||||||
|
"gc-hook": "^0.3.1",
|
||||||
|
"proxy-target": "^3.0.2"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"ws": "^8.16.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/earcut": {
|
||||||
|
"version": "3.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/earcut/-/earcut-3.0.2.tgz",
|
||||||
|
"integrity": "sha512-X7hshQbLyMJ/3RPhyObLARM2sNxxmRALLKx1+NVFFnQ9gKzmCrxm9+uLIAdBcvc8FNLpctqlQ2V6AE92Ol9UDQ==",
|
||||||
|
"license": "ISC"
|
||||||
|
},
|
||||||
|
"node_modules/esbuild": {
|
||||||
|
"version": "0.25.12",
|
||||||
|
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz",
|
||||||
|
"integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==",
|
||||||
|
"devOptional": true,
|
||||||
|
"hasInstallScript": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"bin": {
|
||||||
|
"esbuild": "bin/esbuild"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@esbuild/aix-ppc64": "0.25.12",
|
||||||
|
"@esbuild/android-arm": "0.25.12",
|
||||||
|
"@esbuild/android-arm64": "0.25.12",
|
||||||
|
"@esbuild/android-x64": "0.25.12",
|
||||||
|
"@esbuild/darwin-arm64": "0.25.12",
|
||||||
|
"@esbuild/darwin-x64": "0.25.12",
|
||||||
|
"@esbuild/freebsd-arm64": "0.25.12",
|
||||||
|
"@esbuild/freebsd-x64": "0.25.12",
|
||||||
|
"@esbuild/linux-arm": "0.25.12",
|
||||||
|
"@esbuild/linux-arm64": "0.25.12",
|
||||||
|
"@esbuild/linux-ia32": "0.25.12",
|
||||||
|
"@esbuild/linux-loong64": "0.25.12",
|
||||||
|
"@esbuild/linux-mips64el": "0.25.12",
|
||||||
|
"@esbuild/linux-ppc64": "0.25.12",
|
||||||
|
"@esbuild/linux-riscv64": "0.25.12",
|
||||||
|
"@esbuild/linux-s390x": "0.25.12",
|
||||||
|
"@esbuild/linux-x64": "0.25.12",
|
||||||
|
"@esbuild/netbsd-arm64": "0.25.12",
|
||||||
|
"@esbuild/netbsd-x64": "0.25.12",
|
||||||
|
"@esbuild/openbsd-arm64": "0.25.12",
|
||||||
|
"@esbuild/openbsd-x64": "0.25.12",
|
||||||
|
"@esbuild/openharmony-arm64": "0.25.12",
|
||||||
|
"@esbuild/sunos-x64": "0.25.12",
|
||||||
|
"@esbuild/win32-arm64": "0.25.12",
|
||||||
|
"@esbuild/win32-ia32": "0.25.12",
|
||||||
|
"@esbuild/win32-x64": "0.25.12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/fdir": {
|
||||||
|
"version": "6.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
|
||||||
|
"integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
|
||||||
|
"devOptional": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"picomatch": "^3 || ^4"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"picomatch": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/fsevents": {
|
||||||
|
"version": "2.3.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
|
||||||
|
"integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
|
||||||
|
"hasInstallScript": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"darwin"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/gc-hook": {
|
||||||
|
"version": "0.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/gc-hook/-/gc-hook-0.3.1.tgz",
|
||||||
|
"integrity": "sha512-E5M+O/h2o7eZzGhzRZGex6hbB3k4NWqO0eA+OzLRLXxhdbYPajZnynPwAtphnh+cRHPwsj5Z80dqZlfI4eK55A==",
|
||||||
|
"license": "ISC"
|
||||||
|
},
|
||||||
|
"node_modules/geotiff": {
|
||||||
|
"version": "2.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/geotiff/-/geotiff-2.1.3.tgz",
|
||||||
|
"integrity": "sha512-PT6uoF5a1+kbC3tHmZSUsLHBp2QJlHasxxxxPW47QIY1VBKpFB+FcDvX+MxER6UzgLQZ0xDzJ9s48B9JbOCTqA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@petamoriken/float16": "^3.4.7",
|
||||||
|
"lerc": "^3.0.0",
|
||||||
|
"pako": "^2.0.4",
|
||||||
|
"parse-headers": "^2.0.2",
|
||||||
|
"quick-lru": "^6.1.1",
|
||||||
|
"web-worker": "^1.2.0",
|
||||||
|
"xml-utils": "^1.0.2",
|
||||||
|
"zstddec": "^0.1.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10.19"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/lerc": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/lerc/-/lerc-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-Rm4J/WaHhRa93nCN2mwWDZFoRVF18G1f47C+kvQWyHGEZxFpTUi73p7lMVSAndyxGt6lJ2/CFbOcf9ra5p8aww==",
|
||||||
|
"license": "Apache-2.0"
|
||||||
|
},
|
||||||
|
"node_modules/nanoid": {
|
||||||
|
"version": "3.3.11",
|
||||||
|
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz",
|
||||||
|
"integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==",
|
||||||
|
"devOptional": true,
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"type": "github",
|
||||||
|
"url": "https://github.com/sponsors/ai"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"bin": {
|
||||||
|
"nanoid": "bin/nanoid.cjs"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/ol": {
|
||||||
|
"version": "10.7.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ol/-/ol-10.7.0.tgz",
|
||||||
|
"integrity": "sha512-122U5gamPqNgLpLOkogFJhgpywvd/5en2kETIDW+Ubfi9lPnZ0G9HWRdG+CX0oP8od2d6u6ky3eewIYYlrVczw==",
|
||||||
|
"license": "BSD-2-Clause",
|
||||||
|
"dependencies": {
|
||||||
|
"@types/rbush": "4.0.0",
|
||||||
|
"earcut": "^3.0.0",
|
||||||
|
"geotiff": "^2.1.3",
|
||||||
|
"pbf": "4.0.1",
|
||||||
|
"rbush": "^4.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/openlayers"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/ol-ext": {
|
||||||
|
"version": "4.0.37",
|
||||||
|
"resolved": "https://registry.npmjs.org/ol-ext/-/ol-ext-4.0.37.tgz",
|
||||||
|
"integrity": "sha512-RxzdgMWnNBDP9VZCza3oS3rl1+OCl+1SJLMjt7ATyDDLZl/zzrsQELfJ25WAL6HIWgjkQ2vYDh3nnHFupxOH4w==",
|
||||||
|
"license": "BSD-3-Clause",
|
||||||
|
"peerDependencies": {
|
||||||
|
"ol": ">= 5.3.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/pako": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz",
|
||||||
|
"integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==",
|
||||||
|
"license": "(MIT AND Zlib)"
|
||||||
|
},
|
||||||
|
"node_modules/parse-headers": {
|
||||||
|
"version": "2.0.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.6.tgz",
|
||||||
|
"integrity": "sha512-Tz11t3uKztEW5FEVZnj1ox8GKblWn+PvHY9TmJV5Mll2uHEwRdR/5Li1OlXoECjLYkApdhWy44ocONwXLiKO5A==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/pbf": {
|
||||||
|
"version": "4.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/pbf/-/pbf-4.0.1.tgz",
|
||||||
|
"integrity": "sha512-SuLdBvS42z33m8ejRbInMapQe8n0D3vN/Xd5fmWM3tufNgRQFBpaW2YVJxQZV4iPNqb0vEFvssMEo5w9c6BTIA==",
|
||||||
|
"license": "BSD-3-Clause",
|
||||||
|
"dependencies": {
|
||||||
|
"resolve-protobuf-schema": "^2.1.0"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"pbf": "bin/pbf"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/picocolors": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
|
||||||
|
"devOptional": true,
|
||||||
|
"license": "ISC"
|
||||||
|
},
|
||||||
|
"node_modules/picomatch": {
|
||||||
|
"version": "4.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
|
||||||
|
"integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
|
||||||
|
"devOptional": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/jonschlinkert"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/postcss": {
|
||||||
|
"version": "8.5.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz",
|
||||||
|
"integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==",
|
||||||
|
"devOptional": true,
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/postcss/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "tidelift",
|
||||||
|
"url": "https://tidelift.com/funding/github/npm/postcss"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "github",
|
||||||
|
"url": "https://github.com/sponsors/ai"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"nanoid": "^3.3.11",
|
||||||
|
"picocolors": "^1.1.1",
|
||||||
|
"source-map-js": "^1.2.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^10 || ^12 || >=14"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/protocol-buffers-schema": {
|
||||||
|
"version": "3.6.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.6.0.tgz",
|
||||||
|
"integrity": "sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/proxy-target": {
|
||||||
|
"version": "3.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/proxy-target/-/proxy-target-3.0.2.tgz",
|
||||||
|
"integrity": "sha512-FFE1XNwXX/FNC3/P8HiKaJSy/Qk68RitG/QEcLy/bVnTAPlgTAWPZKh0pARLAnpfXQPKyalBhk009NRTgsk8vQ==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/quick-lru": {
|
||||||
|
"version": "6.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-6.1.2.tgz",
|
||||||
|
"integrity": "sha512-AAFUA5O1d83pIHEhJwWCq/RQcRukCkn/NSm2QsTEMle5f2hP0ChI2+3Xb051PZCkLryI/Ir1MVKviT2FIloaTQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/quickselect": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/quickselect/-/quickselect-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-XdjUArbK4Bm5fLLvlm5KpTFOiOThgfWWI4axAZDWg4E/0mKdZyI9tNEfds27qCi1ze/vwTR16kvmmGhRra3c2g==",
|
||||||
|
"license": "ISC"
|
||||||
|
},
|
||||||
|
"node_modules/rbush": {
|
||||||
|
"version": "4.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/rbush/-/rbush-4.0.1.tgz",
|
||||||
|
"integrity": "sha512-IP0UpfeWQujYC8Jg162rMNc01Rf0gWMMAb2Uxus/Q0qOFw4lCcq6ZnQEZwUoJqWyUGJ9th7JjwI4yIWo+uvoAQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"quickselect": "^3.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/resolve-protobuf-schema": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/resolve-protobuf-schema/-/resolve-protobuf-schema-2.1.0.tgz",
|
||||||
|
"integrity": "sha512-kI5ffTiZWmJaS/huM8wZfEMer1eRd7oJQhDuxeCLe3t7N7mX3z94CN0xPxBQxFYQTSNz9T0i+v6inKqSdK8xrQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"protocol-buffers-schema": "^3.3.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/rollup": {
|
||||||
|
"version": "4.55.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.55.3.tgz",
|
||||||
|
"integrity": "sha512-y9yUpfQvetAjiDLtNMf1hL9NXchIJgWt6zIKeoB+tCd3npX08Eqfzg60V9DhIGVMtQ0AlMkFw5xa+AQ37zxnAA==",
|
||||||
|
"devOptional": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@types/estree": "1.0.8"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"rollup": "dist/bin/rollup"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18.0.0",
|
||||||
|
"npm": ">=8.0.0"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@rollup/rollup-android-arm-eabi": "4.55.3",
|
||||||
|
"@rollup/rollup-android-arm64": "4.55.3",
|
||||||
|
"@rollup/rollup-darwin-arm64": "4.55.3",
|
||||||
|
"@rollup/rollup-darwin-x64": "4.55.3",
|
||||||
|
"@rollup/rollup-freebsd-arm64": "4.55.3",
|
||||||
|
"@rollup/rollup-freebsd-x64": "4.55.3",
|
||||||
|
"@rollup/rollup-linux-arm-gnueabihf": "4.55.3",
|
||||||
|
"@rollup/rollup-linux-arm-musleabihf": "4.55.3",
|
||||||
|
"@rollup/rollup-linux-arm64-gnu": "4.55.3",
|
||||||
|
"@rollup/rollup-linux-arm64-musl": "4.55.3",
|
||||||
|
"@rollup/rollup-linux-loong64-gnu": "4.55.3",
|
||||||
|
"@rollup/rollup-linux-loong64-musl": "4.55.3",
|
||||||
|
"@rollup/rollup-linux-ppc64-gnu": "4.55.3",
|
||||||
|
"@rollup/rollup-linux-ppc64-musl": "4.55.3",
|
||||||
|
"@rollup/rollup-linux-riscv64-gnu": "4.55.3",
|
||||||
|
"@rollup/rollup-linux-riscv64-musl": "4.55.3",
|
||||||
|
"@rollup/rollup-linux-s390x-gnu": "4.55.3",
|
||||||
|
"@rollup/rollup-linux-x64-gnu": "4.55.3",
|
||||||
|
"@rollup/rollup-linux-x64-musl": "4.55.3",
|
||||||
|
"@rollup/rollup-openbsd-x64": "4.55.3",
|
||||||
|
"@rollup/rollup-openharmony-arm64": "4.55.3",
|
||||||
|
"@rollup/rollup-win32-arm64-msvc": "4.55.3",
|
||||||
|
"@rollup/rollup-win32-ia32-msvc": "4.55.3",
|
||||||
|
"@rollup/rollup-win32-x64-gnu": "4.55.3",
|
||||||
|
"@rollup/rollup-win32-x64-msvc": "4.55.3",
|
||||||
|
"fsevents": "~2.3.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/source-map-js": {
|
||||||
|
"version": "1.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
|
||||||
|
"integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
|
||||||
|
"devOptional": true,
|
||||||
|
"license": "BSD-3-Clause",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/sqlocal": {
|
||||||
|
"version": "0.16.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/sqlocal/-/sqlocal-0.16.0.tgz",
|
||||||
|
"integrity": "sha512-iK9IAnPGW+98Pw0dWvhPZlapEZ9NaAKMEhRsbY1XlXPpAnRXblF6hP3NGtfLcW2dErWRJ79xzX3tAVZ2jNwqCg==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@sqlite.org/sqlite-wasm": "^3.50.4-build1",
|
||||||
|
"coincident": "^1.2.3"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "paypal",
|
||||||
|
"url": "https://www.paypal.com/biz/fund?id=U3ZNM2Q26WJY8"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@angular/core": ">=17.0.0",
|
||||||
|
"drizzle-orm": "*",
|
||||||
|
"kysely": "*",
|
||||||
|
"react": ">=18.0.0",
|
||||||
|
"vite": ">=4.0.0",
|
||||||
|
"vue": ">=3.0.0"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"@angular/core": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"drizzle-orm": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"kysely": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"react": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"vite": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"vue": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/tinyglobby": {
|
||||||
|
"version": "0.2.15",
|
||||||
|
"resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz",
|
||||||
|
"integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==",
|
||||||
|
"devOptional": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"fdir": "^6.5.0",
|
||||||
|
"picomatch": "^4.0.3"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/SuperchupuDev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/vite": {
|
||||||
|
"version": "6.4.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/vite/-/vite-6.4.1.tgz",
|
||||||
|
"integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==",
|
||||||
|
"devOptional": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"esbuild": "^0.25.0",
|
||||||
|
"fdir": "^6.4.4",
|
||||||
|
"picomatch": "^4.0.2",
|
||||||
|
"postcss": "^8.5.3",
|
||||||
|
"rollup": "^4.34.9",
|
||||||
|
"tinyglobby": "^0.2.13"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"vite": "bin/vite.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.0.0 || ^20.0.0 || >=22.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/vitejs/vite?sponsor=1"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"fsevents": "~2.3.3"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0",
|
||||||
|
"jiti": ">=1.21.0",
|
||||||
|
"less": "*",
|
||||||
|
"lightningcss": "^1.21.0",
|
||||||
|
"sass": "*",
|
||||||
|
"sass-embedded": "*",
|
||||||
|
"stylus": "*",
|
||||||
|
"sugarss": "*",
|
||||||
|
"terser": "^5.16.0",
|
||||||
|
"tsx": "^4.8.1",
|
||||||
|
"yaml": "^2.4.2"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"@types/node": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"jiti": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"less": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"lightningcss": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"sass": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"sass-embedded": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"stylus": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"sugarss": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"terser": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"tsx": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"yaml": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/web-worker": {
|
||||||
|
"version": "1.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/web-worker/-/web-worker-1.5.0.tgz",
|
||||||
|
"integrity": "sha512-RiMReJrTAiA+mBjGONMnjVDP2u3p9R1vkcGz6gDIrOMT3oGuYwX2WRMYI9ipkphSuE5XKEhydbhNEJh4NY9mlw==",
|
||||||
|
"license": "Apache-2.0"
|
||||||
|
},
|
||||||
|
"node_modules/ws": {
|
||||||
|
"version": "8.19.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ws/-/ws-8.19.0.tgz",
|
||||||
|
"integrity": "sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg==",
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"bufferutil": "^4.0.1",
|
||||||
|
"utf-8-validate": ">=5.0.2"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"bufferutil": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"utf-8-validate": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/xml-utils": {
|
||||||
|
"version": "1.10.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/xml-utils/-/xml-utils-1.10.2.tgz",
|
||||||
|
"integrity": "sha512-RqM+2o1RYs6T8+3DzDSoTRAUfrvaejbVHcp3+thnAtDKo8LskR+HomLajEy5UjTz24rpka7AxVBRR3g2wTUkJA==",
|
||||||
|
"license": "CC0-1.0"
|
||||||
|
},
|
||||||
|
"node_modules/zstddec": {
|
||||||
|
"version": "0.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/zstddec/-/zstddec-0.1.0.tgz",
|
||||||
|
"integrity": "sha512-w2NTI8+3l3eeltKAdK8QpiLo/flRAr2p8AGeakfMZOXBxOg9HIu4LVDxBi81sYgVhFhdJjv1OrB5ssI8uFPoLg==",
|
||||||
|
"license": "MIT AND BSD-3-Clause"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
439
node_modules/.vite/deps/_metadata.json
generated
vendored
Normal file
439
node_modules/.vite/deps/_metadata.json
generated
vendored
Normal file
@ -0,0 +1,439 @@
|
|||||||
|
{
|
||||||
|
"hash": "5fa9d27f",
|
||||||
|
"configHash": "cab165a2",
|
||||||
|
"lockfileHash": "c2087766",
|
||||||
|
"browserHash": "c156faea",
|
||||||
|
"optimized": {
|
||||||
|
"bootstrap": {
|
||||||
|
"src": "../../bootstrap/dist/js/bootstrap.esm.js",
|
||||||
|
"file": "bootstrap.js",
|
||||||
|
"fileHash": "fd6ceaaa",
|
||||||
|
"needsInterop": false
|
||||||
|
},
|
||||||
|
"ol/Map": {
|
||||||
|
"src": "../../ol/Map.js",
|
||||||
|
"file": "ol_Map.js",
|
||||||
|
"fileHash": "b0e367b7",
|
||||||
|
"needsInterop": false
|
||||||
|
},
|
||||||
|
"ol/View": {
|
||||||
|
"src": "../../ol/View.js",
|
||||||
|
"file": "ol_View.js",
|
||||||
|
"fileHash": "355ac42e",
|
||||||
|
"needsInterop": false
|
||||||
|
},
|
||||||
|
"ol/Overlay": {
|
||||||
|
"src": "../../ol/Overlay.js",
|
||||||
|
"file": "ol_Overlay.js",
|
||||||
|
"fileHash": "fe4fef22",
|
||||||
|
"needsInterop": false
|
||||||
|
},
|
||||||
|
"ol/layer/Tile": {
|
||||||
|
"src": "../../ol/layer/Tile.js",
|
||||||
|
"file": "ol_layer_Tile.js",
|
||||||
|
"fileHash": "e6defa38",
|
||||||
|
"needsInterop": false
|
||||||
|
},
|
||||||
|
"ol/layer/Group": {
|
||||||
|
"src": "../../ol/layer/Group.js",
|
||||||
|
"file": "ol_layer_Group.js",
|
||||||
|
"fileHash": "b538c107",
|
||||||
|
"needsInterop": false
|
||||||
|
},
|
||||||
|
"ol/layer/Vector": {
|
||||||
|
"src": "../../ol/layer/Vector.js",
|
||||||
|
"file": "ol_layer_Vector.js",
|
||||||
|
"fileHash": "88b2fe3b",
|
||||||
|
"needsInterop": false
|
||||||
|
},
|
||||||
|
"ol/source/Vector": {
|
||||||
|
"src": "../../ol/source/Vector.js",
|
||||||
|
"file": "ol_source_Vector.js",
|
||||||
|
"fileHash": "f625949b",
|
||||||
|
"needsInterop": false
|
||||||
|
},
|
||||||
|
"ol/source/OSM": {
|
||||||
|
"src": "../../ol/source/OSM.js",
|
||||||
|
"file": "ol_source_OSM.js",
|
||||||
|
"fileHash": "3b97b715",
|
||||||
|
"needsInterop": false
|
||||||
|
},
|
||||||
|
"ol/source/XYZ": {
|
||||||
|
"src": "../../ol/source/XYZ.js",
|
||||||
|
"file": "ol_source_XYZ.js",
|
||||||
|
"fileHash": "7d8f852b",
|
||||||
|
"needsInterop": false
|
||||||
|
},
|
||||||
|
"ol/proj": {
|
||||||
|
"src": "../../ol/proj.js",
|
||||||
|
"file": "ol_proj.js",
|
||||||
|
"fileHash": "bde13aba",
|
||||||
|
"needsInterop": false
|
||||||
|
},
|
||||||
|
"ol/geom": {
|
||||||
|
"src": "../../ol/geom.js",
|
||||||
|
"file": "ol_geom.js",
|
||||||
|
"fileHash": "e4ded8a3",
|
||||||
|
"needsInterop": false
|
||||||
|
},
|
||||||
|
"ol/Feature": {
|
||||||
|
"src": "../../ol/Feature.js",
|
||||||
|
"file": "ol_Feature.js",
|
||||||
|
"fileHash": "8ad86d7d",
|
||||||
|
"needsInterop": false
|
||||||
|
},
|
||||||
|
"ol/style": {
|
||||||
|
"src": "../../ol/style.js",
|
||||||
|
"file": "ol_style.js",
|
||||||
|
"fileHash": "6029528e",
|
||||||
|
"needsInterop": false
|
||||||
|
},
|
||||||
|
"ol-ext/control/LayerSwitcher": {
|
||||||
|
"src": "../../ol-ext/control/LayerSwitcher.js",
|
||||||
|
"file": "ol-ext_control_LayerSwitcher.js",
|
||||||
|
"fileHash": "ba3fcba4",
|
||||||
|
"needsInterop": false
|
||||||
|
},
|
||||||
|
"ol-ext/control/GeolocationButton": {
|
||||||
|
"src": "../../ol-ext/control/GeolocationButton.js",
|
||||||
|
"file": "ol-ext_control_GeolocationButton.js",
|
||||||
|
"fileHash": "6e1e8c81",
|
||||||
|
"needsInterop": false
|
||||||
|
},
|
||||||
|
"ol-ext/control/SearchNominatim": {
|
||||||
|
"src": "../../ol-ext/control/SearchNominatim.js",
|
||||||
|
"file": "ol-ext_control_SearchNominatim.js",
|
||||||
|
"fileHash": "49a8e3f6",
|
||||||
|
"needsInterop": false
|
||||||
|
},
|
||||||
|
"ol/interaction": {
|
||||||
|
"src": "../../ol/interaction.js",
|
||||||
|
"file": "ol_interaction.js",
|
||||||
|
"fileHash": "3b0cba52",
|
||||||
|
"needsInterop": false
|
||||||
|
},
|
||||||
|
"ol/layer": {
|
||||||
|
"src": "../../ol/layer.js",
|
||||||
|
"file": "ol_layer.js",
|
||||||
|
"fileHash": "2f7ece85",
|
||||||
|
"needsInterop": false
|
||||||
|
},
|
||||||
|
"ol/source": {
|
||||||
|
"src": "../../ol/source.js",
|
||||||
|
"file": "ol_source.js",
|
||||||
|
"fileHash": "55b243b7",
|
||||||
|
"needsInterop": false
|
||||||
|
},
|
||||||
|
"ol/sphere": {
|
||||||
|
"src": "../../ol/sphere.js",
|
||||||
|
"file": "ol_sphere.js",
|
||||||
|
"fileHash": "17c5b65f",
|
||||||
|
"needsInterop": false
|
||||||
|
},
|
||||||
|
"ol/Observable": {
|
||||||
|
"src": "../../ol/Observable.js",
|
||||||
|
"file": "ol_Observable.js",
|
||||||
|
"fileHash": "a1d95e20",
|
||||||
|
"needsInterop": false
|
||||||
|
},
|
||||||
|
"ol-ext/control/Bar": {
|
||||||
|
"src": "../../ol-ext/control/Bar.js",
|
||||||
|
"file": "ol-ext_control_Bar.js",
|
||||||
|
"fileHash": "9961a97b",
|
||||||
|
"needsInterop": false
|
||||||
|
},
|
||||||
|
"ol-ext/control/Toggle": {
|
||||||
|
"src": "../../ol-ext/control/Toggle.js",
|
||||||
|
"file": "ol-ext_control_Toggle.js",
|
||||||
|
"fileHash": "3716a205",
|
||||||
|
"needsInterop": false
|
||||||
|
},
|
||||||
|
"ol-ext/control/Button": {
|
||||||
|
"src": "../../ol-ext/control/Button.js",
|
||||||
|
"file": "ol-ext_control_Button.js",
|
||||||
|
"fileHash": "94db9999",
|
||||||
|
"needsInterop": false
|
||||||
|
},
|
||||||
|
"ol/format/GeoJSON": {
|
||||||
|
"src": "../../ol/format/GeoJSON.js",
|
||||||
|
"file": "ol_format_GeoJSON.js",
|
||||||
|
"fileHash": "6ca0d734",
|
||||||
|
"needsInterop": false
|
||||||
|
},
|
||||||
|
"ol-ext/control/EditBar": {
|
||||||
|
"src": "../../ol-ext/control/EditBar.js",
|
||||||
|
"file": "ol-ext_control_EditBar.js",
|
||||||
|
"fileHash": "eaa0bfea",
|
||||||
|
"needsInterop": false
|
||||||
|
},
|
||||||
|
"ol-ext/interaction/TouchCursor": {
|
||||||
|
"src": "../../ol-ext/interaction/TouchCursor.js",
|
||||||
|
"file": "ol-ext_interaction_TouchCursor.js",
|
||||||
|
"fileHash": "a53deca0",
|
||||||
|
"needsInterop": false
|
||||||
|
},
|
||||||
|
"ol-ext/interaction/ModifyFeature": {
|
||||||
|
"src": "../../ol-ext/interaction/ModifyFeature.js",
|
||||||
|
"file": "ol-ext_interaction_ModifyFeature.js",
|
||||||
|
"fileHash": "50e7de35",
|
||||||
|
"needsInterop": false
|
||||||
|
},
|
||||||
|
"ol/interaction/Select": {
|
||||||
|
"src": "../../ol/interaction/Select.js",
|
||||||
|
"file": "ol_interaction_Select.js",
|
||||||
|
"fileHash": "e3c3f813",
|
||||||
|
"needsInterop": false
|
||||||
|
},
|
||||||
|
"ol/events/condition": {
|
||||||
|
"src": "../../ol/events/condition.js",
|
||||||
|
"file": "ol_events_condition.js",
|
||||||
|
"fileHash": "bdeed76d",
|
||||||
|
"needsInterop": false
|
||||||
|
},
|
||||||
|
"ol-ext/interaction/UndoRedo": {
|
||||||
|
"src": "../../ol-ext/interaction/UndoRedo.js",
|
||||||
|
"file": "ol-ext_interaction_UndoRedo.js",
|
||||||
|
"fileHash": "906faad5",
|
||||||
|
"needsInterop": false
|
||||||
|
},
|
||||||
|
"ol/geom/Polygon": {
|
||||||
|
"src": "../../ol/geom/Polygon.js",
|
||||||
|
"file": "ol_geom_Polygon.js",
|
||||||
|
"fileHash": "c61e8553",
|
||||||
|
"needsInterop": false
|
||||||
|
},
|
||||||
|
"ol/control/ScaleLine": {
|
||||||
|
"src": "../../ol/control/ScaleLine.js",
|
||||||
|
"file": "ol_control_ScaleLine.js",
|
||||||
|
"fileHash": "8cff3002",
|
||||||
|
"needsInterop": false
|
||||||
|
},
|
||||||
|
"ol/format/WKT": {
|
||||||
|
"src": "../../ol/format/WKT.js",
|
||||||
|
"file": "ol_format_WKT.js",
|
||||||
|
"fileHash": "c6bcdd8f",
|
||||||
|
"needsInterop": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"chunks": {
|
||||||
|
"lerc-YJMC4I3X": {
|
||||||
|
"file": "lerc-YJMC4I3X.js"
|
||||||
|
},
|
||||||
|
"webimage-T4PTOJUP": {
|
||||||
|
"file": "webimage-T4PTOJUP.js"
|
||||||
|
},
|
||||||
|
"decoder-FUDNTCPN": {
|
||||||
|
"file": "decoder-FUDNTCPN.js"
|
||||||
|
},
|
||||||
|
"raw-UKC26CDE": {
|
||||||
|
"file": "raw-UKC26CDE.js"
|
||||||
|
},
|
||||||
|
"lzw-7DRJSDK5": {
|
||||||
|
"file": "lzw-7DRJSDK5.js"
|
||||||
|
},
|
||||||
|
"jpeg-HGEGG7HT": {
|
||||||
|
"file": "jpeg-HGEGG7HT.js"
|
||||||
|
},
|
||||||
|
"deflate-IME5YE3D": {
|
||||||
|
"file": "deflate-IME5YE3D.js"
|
||||||
|
},
|
||||||
|
"chunk-OVHVPML2": {
|
||||||
|
"file": "chunk-OVHVPML2.js"
|
||||||
|
},
|
||||||
|
"packbits-F6QMWCFA": {
|
||||||
|
"file": "packbits-F6QMWCFA.js"
|
||||||
|
},
|
||||||
|
"chunk-YNX27GDF": {
|
||||||
|
"file": "chunk-YNX27GDF.js"
|
||||||
|
},
|
||||||
|
"chunk-3UNEODO2": {
|
||||||
|
"file": "chunk-3UNEODO2.js"
|
||||||
|
},
|
||||||
|
"chunk-MEQVYVYE": {
|
||||||
|
"file": "chunk-MEQVYVYE.js"
|
||||||
|
},
|
||||||
|
"chunk-6DXBPPKF": {
|
||||||
|
"file": "chunk-6DXBPPKF.js"
|
||||||
|
},
|
||||||
|
"chunk-NNBJMTCH": {
|
||||||
|
"file": "chunk-NNBJMTCH.js"
|
||||||
|
},
|
||||||
|
"chunk-QTABLK4X": {
|
||||||
|
"file": "chunk-QTABLK4X.js"
|
||||||
|
},
|
||||||
|
"chunk-C5KGH6RQ": {
|
||||||
|
"file": "chunk-C5KGH6RQ.js"
|
||||||
|
},
|
||||||
|
"chunk-3TN6D4MD": {
|
||||||
|
"file": "chunk-3TN6D4MD.js"
|
||||||
|
},
|
||||||
|
"chunk-VCBXDRBT": {
|
||||||
|
"file": "chunk-VCBXDRBT.js"
|
||||||
|
},
|
||||||
|
"chunk-NMUIRNIP": {
|
||||||
|
"file": "chunk-NMUIRNIP.js"
|
||||||
|
},
|
||||||
|
"chunk-43GYE2V5": {
|
||||||
|
"file": "chunk-43GYE2V5.js"
|
||||||
|
},
|
||||||
|
"chunk-PD2E5XZ4": {
|
||||||
|
"file": "chunk-PD2E5XZ4.js"
|
||||||
|
},
|
||||||
|
"chunk-YUMATXXX": {
|
||||||
|
"file": "chunk-YUMATXXX.js"
|
||||||
|
},
|
||||||
|
"chunk-E7S7Q7VV": {
|
||||||
|
"file": "chunk-E7S7Q7VV.js"
|
||||||
|
},
|
||||||
|
"chunk-S3QBQTEW": {
|
||||||
|
"file": "chunk-S3QBQTEW.js"
|
||||||
|
},
|
||||||
|
"chunk-V7WRBSQ6": {
|
||||||
|
"file": "chunk-V7WRBSQ6.js"
|
||||||
|
},
|
||||||
|
"chunk-56VFHHUN": {
|
||||||
|
"file": "chunk-56VFHHUN.js"
|
||||||
|
},
|
||||||
|
"chunk-W7BDJOQY": {
|
||||||
|
"file": "chunk-W7BDJOQY.js"
|
||||||
|
},
|
||||||
|
"chunk-7JXPN73Q": {
|
||||||
|
"file": "chunk-7JXPN73Q.js"
|
||||||
|
},
|
||||||
|
"chunk-E53S5GN6": {
|
||||||
|
"file": "chunk-E53S5GN6.js"
|
||||||
|
},
|
||||||
|
"chunk-UNDFRJ2M": {
|
||||||
|
"file": "chunk-UNDFRJ2M.js"
|
||||||
|
},
|
||||||
|
"chunk-T3TT2KJN": {
|
||||||
|
"file": "chunk-T3TT2KJN.js"
|
||||||
|
},
|
||||||
|
"chunk-HM3IY3H4": {
|
||||||
|
"file": "chunk-HM3IY3H4.js"
|
||||||
|
},
|
||||||
|
"chunk-JFXZSSOM": {
|
||||||
|
"file": "chunk-JFXZSSOM.js"
|
||||||
|
},
|
||||||
|
"chunk-ZUI5NXIU": {
|
||||||
|
"file": "chunk-ZUI5NXIU.js"
|
||||||
|
},
|
||||||
|
"chunk-I4Q72WOW": {
|
||||||
|
"file": "chunk-I4Q72WOW.js"
|
||||||
|
},
|
||||||
|
"chunk-RTVPCGIJ": {
|
||||||
|
"file": "chunk-RTVPCGIJ.js"
|
||||||
|
},
|
||||||
|
"chunk-MSWSBYBR": {
|
||||||
|
"file": "chunk-MSWSBYBR.js"
|
||||||
|
},
|
||||||
|
"chunk-QCJTGAWF": {
|
||||||
|
"file": "chunk-QCJTGAWF.js"
|
||||||
|
},
|
||||||
|
"chunk-CAVOO5JW": {
|
||||||
|
"file": "chunk-CAVOO5JW.js"
|
||||||
|
},
|
||||||
|
"chunk-VRTURNK3": {
|
||||||
|
"file": "chunk-VRTURNK3.js"
|
||||||
|
},
|
||||||
|
"chunk-2C73OZ6M": {
|
||||||
|
"file": "chunk-2C73OZ6M.js"
|
||||||
|
},
|
||||||
|
"chunk-M5TTSD4C": {
|
||||||
|
"file": "chunk-M5TTSD4C.js"
|
||||||
|
},
|
||||||
|
"chunk-ZCRXKB7J": {
|
||||||
|
"file": "chunk-ZCRXKB7J.js"
|
||||||
|
},
|
||||||
|
"chunk-RW3V7S4F": {
|
||||||
|
"file": "chunk-RW3V7S4F.js"
|
||||||
|
},
|
||||||
|
"chunk-PAB2HIXK": {
|
||||||
|
"file": "chunk-PAB2HIXK.js"
|
||||||
|
},
|
||||||
|
"chunk-I6K7MRGV": {
|
||||||
|
"file": "chunk-I6K7MRGV.js"
|
||||||
|
},
|
||||||
|
"chunk-PGWX4545": {
|
||||||
|
"file": "chunk-PGWX4545.js"
|
||||||
|
},
|
||||||
|
"chunk-AYBYZSAV": {
|
||||||
|
"file": "chunk-AYBYZSAV.js"
|
||||||
|
},
|
||||||
|
"chunk-YLJGUH5Z": {
|
||||||
|
"file": "chunk-YLJGUH5Z.js"
|
||||||
|
},
|
||||||
|
"chunk-AZGMK675": {
|
||||||
|
"file": "chunk-AZGMK675.js"
|
||||||
|
},
|
||||||
|
"chunk-C6SRSVJF": {
|
||||||
|
"file": "chunk-C6SRSVJF.js"
|
||||||
|
},
|
||||||
|
"chunk-BHVDQB66": {
|
||||||
|
"file": "chunk-BHVDQB66.js"
|
||||||
|
},
|
||||||
|
"chunk-6EWLK2BW": {
|
||||||
|
"file": "chunk-6EWLK2BW.js"
|
||||||
|
},
|
||||||
|
"chunk-3ZDRPUXW": {
|
||||||
|
"file": "chunk-3ZDRPUXW.js"
|
||||||
|
},
|
||||||
|
"chunk-6Y7C6NBJ": {
|
||||||
|
"file": "chunk-6Y7C6NBJ.js"
|
||||||
|
},
|
||||||
|
"chunk-7XMWB3J4": {
|
||||||
|
"file": "chunk-7XMWB3J4.js"
|
||||||
|
},
|
||||||
|
"chunk-5D2XPBR2": {
|
||||||
|
"file": "chunk-5D2XPBR2.js"
|
||||||
|
},
|
||||||
|
"chunk-SHUBVYN4": {
|
||||||
|
"file": "chunk-SHUBVYN4.js"
|
||||||
|
},
|
||||||
|
"chunk-FM44FOIC": {
|
||||||
|
"file": "chunk-FM44FOIC.js"
|
||||||
|
},
|
||||||
|
"chunk-LMC3RO5P": {
|
||||||
|
"file": "chunk-LMC3RO5P.js"
|
||||||
|
},
|
||||||
|
"chunk-X52LGBOS": {
|
||||||
|
"file": "chunk-X52LGBOS.js"
|
||||||
|
},
|
||||||
|
"chunk-QFCIXVZ3": {
|
||||||
|
"file": "chunk-QFCIXVZ3.js"
|
||||||
|
},
|
||||||
|
"chunk-A3RXLHYB": {
|
||||||
|
"file": "chunk-A3RXLHYB.js"
|
||||||
|
},
|
||||||
|
"chunk-ZLPTRF2L": {
|
||||||
|
"file": "chunk-ZLPTRF2L.js"
|
||||||
|
},
|
||||||
|
"chunk-54BTDBAD": {
|
||||||
|
"file": "chunk-54BTDBAD.js"
|
||||||
|
},
|
||||||
|
"chunk-UPTVWZ45": {
|
||||||
|
"file": "chunk-UPTVWZ45.js"
|
||||||
|
},
|
||||||
|
"chunk-5XHD7RSF": {
|
||||||
|
"file": "chunk-5XHD7RSF.js"
|
||||||
|
},
|
||||||
|
"chunk-Q5ZULJHM": {
|
||||||
|
"file": "chunk-Q5ZULJHM.js"
|
||||||
|
},
|
||||||
|
"chunk-NGFXCWUF": {
|
||||||
|
"file": "chunk-NGFXCWUF.js"
|
||||||
|
},
|
||||||
|
"chunk-K25ZO44T": {
|
||||||
|
"file": "chunk-K25ZO44T.js"
|
||||||
|
},
|
||||||
|
"chunk-SRXHWJOY": {
|
||||||
|
"file": "chunk-SRXHWJOY.js"
|
||||||
|
},
|
||||||
|
"chunk-5RHQVMYD": {
|
||||||
|
"file": "chunk-5RHQVMYD.js"
|
||||||
|
},
|
||||||
|
"chunk-DC5AMYBS": {
|
||||||
|
"file": "chunk-DC5AMYBS.js"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
5186
node_modules/.vite/deps/bootstrap.js
generated
vendored
Normal file
5186
node_modules/.vite/deps/bootstrap.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
node_modules/.vite/deps/bootstrap.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/bootstrap.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
297
node_modules/.vite/deps/chunk-2C73OZ6M.js
generated
vendored
Normal file
297
node_modules/.vite/deps/chunk-2C73OZ6M.js
generated
vendored
Normal file
@ -0,0 +1,297 @@
|
|||||||
|
import {
|
||||||
|
CollectionEventType_default,
|
||||||
|
Collection_default
|
||||||
|
} from "./chunk-M5TTSD4C.js";
|
||||||
|
import {
|
||||||
|
Base_default
|
||||||
|
} from "./chunk-AYBYZSAV.js";
|
||||||
|
import {
|
||||||
|
assert
|
||||||
|
} from "./chunk-QFCIXVZ3.js";
|
||||||
|
import {
|
||||||
|
ObjectEventType_default,
|
||||||
|
getUid
|
||||||
|
} from "./chunk-Q5ZULJHM.js";
|
||||||
|
import {
|
||||||
|
Event_default,
|
||||||
|
listen,
|
||||||
|
unlistenByKey
|
||||||
|
} from "./chunk-NGFXCWUF.js";
|
||||||
|
import {
|
||||||
|
EventType_default
|
||||||
|
} from "./chunk-K25ZO44T.js";
|
||||||
|
import {
|
||||||
|
getIntersection
|
||||||
|
} from "./chunk-SRXHWJOY.js";
|
||||||
|
import {
|
||||||
|
clear
|
||||||
|
} from "./chunk-5RHQVMYD.js";
|
||||||
|
|
||||||
|
// node_modules/ol/layer/Group.js
|
||||||
|
var GroupEventType = {
|
||||||
|
/**
|
||||||
|
* Triggered when a layer is added
|
||||||
|
* @event GroupEvent#addlayer
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
ADDLAYER: "addlayer",
|
||||||
|
/**
|
||||||
|
* Triggered when a layer is removed
|
||||||
|
* @event GroupEvent#removelayer
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
REMOVELAYER: "removelayer"
|
||||||
|
};
|
||||||
|
var GroupEvent = class extends Event_default {
|
||||||
|
/**
|
||||||
|
* @param {GroupEventType} type The event type.
|
||||||
|
* @param {BaseLayer} layer The layer.
|
||||||
|
*/
|
||||||
|
constructor(type, layer) {
|
||||||
|
super(type);
|
||||||
|
this.layer = layer;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var Property = {
|
||||||
|
LAYERS: "layers"
|
||||||
|
};
|
||||||
|
var LayerGroup = class _LayerGroup extends Base_default {
|
||||||
|
/**
|
||||||
|
* @param {Options} [options] Layer options.
|
||||||
|
*/
|
||||||
|
constructor(options) {
|
||||||
|
options = options || {};
|
||||||
|
const baseOptions = (
|
||||||
|
/** @type {Options} */
|
||||||
|
Object.assign({}, options)
|
||||||
|
);
|
||||||
|
delete baseOptions.layers;
|
||||||
|
let layers = options.layers;
|
||||||
|
super(baseOptions);
|
||||||
|
this.on;
|
||||||
|
this.once;
|
||||||
|
this.un;
|
||||||
|
this.layersListenerKeys_ = [];
|
||||||
|
this.listenerKeys_ = {};
|
||||||
|
this.addChangeListener(Property.LAYERS, this.handleLayersChanged_);
|
||||||
|
if (layers) {
|
||||||
|
if (Array.isArray(layers)) {
|
||||||
|
layers = new Collection_default(layers.slice(), { unique: true });
|
||||||
|
} else {
|
||||||
|
assert(
|
||||||
|
typeof /** @type {?} */
|
||||||
|
layers.getArray === "function",
|
||||||
|
"Expected `layers` to be an array or a `Collection`"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
layers = new Collection_default(void 0, { unique: true });
|
||||||
|
}
|
||||||
|
this.setLayers(layers);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
handleLayerChange_() {
|
||||||
|
this.changed();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
handleLayersChanged_() {
|
||||||
|
this.layersListenerKeys_.forEach(unlistenByKey);
|
||||||
|
this.layersListenerKeys_.length = 0;
|
||||||
|
const layers = this.getLayers();
|
||||||
|
this.layersListenerKeys_.push(
|
||||||
|
listen(layers, CollectionEventType_default.ADD, this.handleLayersAdd_, this),
|
||||||
|
listen(
|
||||||
|
layers,
|
||||||
|
CollectionEventType_default.REMOVE,
|
||||||
|
this.handleLayersRemove_,
|
||||||
|
this
|
||||||
|
)
|
||||||
|
);
|
||||||
|
for (const id in this.listenerKeys_) {
|
||||||
|
this.listenerKeys_[id].forEach(unlistenByKey);
|
||||||
|
}
|
||||||
|
clear(this.listenerKeys_);
|
||||||
|
const layersArray = layers.getArray();
|
||||||
|
for (let i = 0, ii = layersArray.length; i < ii; i++) {
|
||||||
|
const layer = layersArray[i];
|
||||||
|
this.registerLayerListeners_(layer);
|
||||||
|
this.dispatchEvent(new GroupEvent(GroupEventType.ADDLAYER, layer));
|
||||||
|
}
|
||||||
|
this.changed();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param {BaseLayer} layer The layer.
|
||||||
|
*/
|
||||||
|
registerLayerListeners_(layer) {
|
||||||
|
const listenerKeys = [
|
||||||
|
listen(
|
||||||
|
layer,
|
||||||
|
ObjectEventType_default.PROPERTYCHANGE,
|
||||||
|
this.handleLayerChange_,
|
||||||
|
this
|
||||||
|
),
|
||||||
|
listen(layer, EventType_default.CHANGE, this.handleLayerChange_, this)
|
||||||
|
];
|
||||||
|
if (layer instanceof _LayerGroup) {
|
||||||
|
listenerKeys.push(
|
||||||
|
listen(layer, GroupEventType.ADDLAYER, this.handleLayerGroupAdd_, this),
|
||||||
|
listen(
|
||||||
|
layer,
|
||||||
|
GroupEventType.REMOVELAYER,
|
||||||
|
this.handleLayerGroupRemove_,
|
||||||
|
this
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
this.listenerKeys_[getUid(layer)] = listenerKeys;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param {GroupEvent} event The layer group event.
|
||||||
|
*/
|
||||||
|
handleLayerGroupAdd_(event) {
|
||||||
|
this.dispatchEvent(new GroupEvent(GroupEventType.ADDLAYER, event.layer));
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param {GroupEvent} event The layer group event.
|
||||||
|
*/
|
||||||
|
handleLayerGroupRemove_(event) {
|
||||||
|
this.dispatchEvent(new GroupEvent(GroupEventType.REMOVELAYER, event.layer));
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param {import("../Collection.js").CollectionEvent<import("./Base.js").default>} collectionEvent CollectionEvent.
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
handleLayersAdd_(collectionEvent) {
|
||||||
|
const layer = collectionEvent.element;
|
||||||
|
this.registerLayerListeners_(layer);
|
||||||
|
this.dispatchEvent(new GroupEvent(GroupEventType.ADDLAYER, layer));
|
||||||
|
this.changed();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param {import("../Collection.js").CollectionEvent<import("./Base.js").default>} collectionEvent CollectionEvent.
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
handleLayersRemove_(collectionEvent) {
|
||||||
|
const layer = collectionEvent.element;
|
||||||
|
const key = getUid(layer);
|
||||||
|
this.listenerKeys_[key].forEach(unlistenByKey);
|
||||||
|
delete this.listenerKeys_[key];
|
||||||
|
this.dispatchEvent(new GroupEvent(GroupEventType.REMOVELAYER, layer));
|
||||||
|
this.changed();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Returns the {@link module:ol/Collection~Collection collection} of {@link module:ol/layer/Layer~Layer layers}
|
||||||
|
* in this group.
|
||||||
|
* @return {!Collection<import("./Base.js").default>} Collection of
|
||||||
|
* {@link module:ol/layer/Base~BaseLayer layers} that are part of this group.
|
||||||
|
* @observable
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
getLayers() {
|
||||||
|
return (
|
||||||
|
/** @type {!Collection<import("./Base.js").default>} */
|
||||||
|
this.get(Property.LAYERS)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Set the {@link module:ol/Collection~Collection collection} of {@link module:ol/layer/Layer~Layer layers}
|
||||||
|
* in this group.
|
||||||
|
* @param {!Collection<import("./Base.js").default>} layers Collection of
|
||||||
|
* {@link module:ol/layer/Base~BaseLayer layers} that are part of this group.
|
||||||
|
* @observable
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
setLayers(layers) {
|
||||||
|
const collection = this.getLayers();
|
||||||
|
if (collection) {
|
||||||
|
const currentLayers = collection.getArray();
|
||||||
|
for (let i = 0, ii = currentLayers.length; i < ii; ++i) {
|
||||||
|
this.dispatchEvent(
|
||||||
|
new GroupEvent(GroupEventType.REMOVELAYER, currentLayers[i])
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.set(Property.LAYERS, layers);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param {Array<import("./Layer.js").default>} [array] Array of layers (to be modified in place).
|
||||||
|
* @return {Array<import("./Layer.js").default>} Array of layers.
|
||||||
|
* @override
|
||||||
|
*/
|
||||||
|
getLayersArray(array) {
|
||||||
|
array = array !== void 0 ? array : [];
|
||||||
|
this.getLayers().forEach(function(layer) {
|
||||||
|
layer.getLayersArray(array);
|
||||||
|
});
|
||||||
|
return array;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Get the layer states list and use this groups z-index as the default
|
||||||
|
* for all layers in this and nested groups, if it is unset at this point.
|
||||||
|
* If dest is not provided and this group's z-index is undefined
|
||||||
|
* 0 is used a the default z-index.
|
||||||
|
* @param {Array<import("./Layer.js").State>} [dest] Optional list
|
||||||
|
* of layer states (to be modified in place).
|
||||||
|
* @return {Array<import("./Layer.js").State>} List of layer states.
|
||||||
|
* @override
|
||||||
|
*/
|
||||||
|
getLayerStatesArray(dest) {
|
||||||
|
const states = dest !== void 0 ? dest : [];
|
||||||
|
const pos = states.length;
|
||||||
|
this.getLayers().forEach(function(layer) {
|
||||||
|
layer.getLayerStatesArray(states);
|
||||||
|
});
|
||||||
|
const ownLayerState = this.getLayerState();
|
||||||
|
let defaultZIndex = ownLayerState.zIndex;
|
||||||
|
if (!dest && ownLayerState.zIndex === void 0) {
|
||||||
|
defaultZIndex = 0;
|
||||||
|
}
|
||||||
|
for (let i = pos, ii = states.length; i < ii; i++) {
|
||||||
|
const layerState = states[i];
|
||||||
|
layerState.opacity *= ownLayerState.opacity;
|
||||||
|
layerState.visible = layerState.visible && ownLayerState.visible;
|
||||||
|
layerState.maxResolution = Math.min(
|
||||||
|
layerState.maxResolution,
|
||||||
|
ownLayerState.maxResolution
|
||||||
|
);
|
||||||
|
layerState.minResolution = Math.max(
|
||||||
|
layerState.minResolution,
|
||||||
|
ownLayerState.minResolution
|
||||||
|
);
|
||||||
|
layerState.minZoom = Math.max(layerState.minZoom, ownLayerState.minZoom);
|
||||||
|
layerState.maxZoom = Math.min(layerState.maxZoom, ownLayerState.maxZoom);
|
||||||
|
if (ownLayerState.extent !== void 0) {
|
||||||
|
if (layerState.extent !== void 0) {
|
||||||
|
layerState.extent = getIntersection(
|
||||||
|
layerState.extent,
|
||||||
|
ownLayerState.extent
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
layerState.extent = ownLayerState.extent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (layerState.zIndex === void 0) {
|
||||||
|
layerState.zIndex = defaultZIndex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return states;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @return {import("../source/Source.js").State} Source state.
|
||||||
|
* @override
|
||||||
|
*/
|
||||||
|
getSourceState() {
|
||||||
|
return "ready";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var Group_default = LayerGroup;
|
||||||
|
|
||||||
|
export {
|
||||||
|
GroupEvent,
|
||||||
|
Group_default
|
||||||
|
};
|
||||||
|
//# sourceMappingURL=chunk-2C73OZ6M.js.map
|
||||||
7
node_modules/.vite/deps/chunk-2C73OZ6M.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-2C73OZ6M.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
77
node_modules/.vite/deps/chunk-3TN6D4MD.js
generated
vendored
Normal file
77
node_modules/.vite/deps/chunk-3TN6D4MD.js
generated
vendored
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
import {
|
||||||
|
ImageState_default,
|
||||||
|
Image_default
|
||||||
|
} from "./chunk-SHUBVYN4.js";
|
||||||
|
|
||||||
|
// node_modules/ol/ImageCanvas.js
|
||||||
|
var ImageCanvas = class extends Image_default {
|
||||||
|
/**
|
||||||
|
* @param {import("./extent.js").Extent} extent Extent.
|
||||||
|
* @param {number} resolution Resolution.
|
||||||
|
* @param {number} pixelRatio Pixel ratio.
|
||||||
|
* @param {HTMLCanvasElement|OffscreenCanvas} canvas Canvas.
|
||||||
|
* @param {Loader} [loader] Optional loader function to
|
||||||
|
* support asynchronous canvas drawing.
|
||||||
|
*/
|
||||||
|
constructor(extent, resolution, pixelRatio, canvas, loader) {
|
||||||
|
const state = loader !== void 0 ? ImageState_default.IDLE : ImageState_default.LOADED;
|
||||||
|
super(extent, resolution, pixelRatio, state);
|
||||||
|
this.loader_ = loader !== void 0 ? loader : null;
|
||||||
|
this.canvas_ = canvas;
|
||||||
|
this.error_ = null;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Get any error associated with asynchronous rendering.
|
||||||
|
* @return {?Error} Any error that occurred during rendering.
|
||||||
|
*/
|
||||||
|
getError() {
|
||||||
|
return this.error_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Handle async drawing complete.
|
||||||
|
* @param {Error} [err] Any error during drawing.
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
handleLoad_(err) {
|
||||||
|
if (err) {
|
||||||
|
this.error_ = err;
|
||||||
|
this.state = ImageState_default.ERROR;
|
||||||
|
} else {
|
||||||
|
this.state = ImageState_default.LOADED;
|
||||||
|
}
|
||||||
|
this.changed();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Load not yet loaded URI.
|
||||||
|
* @override
|
||||||
|
*/
|
||||||
|
load() {
|
||||||
|
if (this.state == ImageState_default.IDLE) {
|
||||||
|
this.state = ImageState_default.LOADING;
|
||||||
|
this.changed();
|
||||||
|
this.loader_(this.handleLoad_.bind(this));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @return {HTMLCanvasElement|OffscreenCanvas} Canvas element.
|
||||||
|
* @override
|
||||||
|
*/
|
||||||
|
getImage() {
|
||||||
|
return this.canvas_;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var ImageCanvas_default = ImageCanvas;
|
||||||
|
|
||||||
|
// node_modules/ol/resolution.js
|
||||||
|
function fromResolutionLike(resolution) {
|
||||||
|
if (Array.isArray(resolution)) {
|
||||||
|
return Math.min(...resolution);
|
||||||
|
}
|
||||||
|
return resolution;
|
||||||
|
}
|
||||||
|
|
||||||
|
export {
|
||||||
|
ImageCanvas_default,
|
||||||
|
fromResolutionLike
|
||||||
|
};
|
||||||
|
//# sourceMappingURL=chunk-3TN6D4MD.js.map
|
||||||
7
node_modules/.vite/deps/chunk-3TN6D4MD.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-3TN6D4MD.js.map
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"sources": ["../../ol/ImageCanvas.js", "../../ol/resolution.js"],
|
||||||
|
"sourcesContent": ["/**\n * @module ol/ImageCanvas\n */\nimport ImageWrapper from './Image.js';\nimport ImageState from './ImageState.js';\n\n/**\n * A function that is called to trigger asynchronous canvas drawing. It is\n * called with a \"done\" callback that should be called when drawing is done.\n * If any error occurs during drawing, the \"done\" callback should be called with\n * that error.\n *\n * @typedef {function(function(Error=): void): void} Loader\n */\n\nclass ImageCanvas extends ImageWrapper {\n /**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @param {HTMLCanvasElement|OffscreenCanvas} canvas Canvas.\n * @param {Loader} [loader] Optional loader function to\n * support asynchronous canvas drawing.\n */\n constructor(extent, resolution, pixelRatio, canvas, loader) {\n const state = loader !== undefined ? ImageState.IDLE : ImageState.LOADED;\n\n super(extent, resolution, pixelRatio, state);\n\n /**\n * Optional canvas loader function.\n * @type {?Loader}\n * @private\n */\n this.loader_ = loader !== undefined ? loader : null;\n\n /**\n * @private\n * @type {HTMLCanvasElement|OffscreenCanvas}\n */\n this.canvas_ = canvas;\n\n /**\n * @private\n * @type {?Error}\n */\n this.error_ = null;\n }\n\n /**\n * Get any error associated with asynchronous rendering.\n * @return {?Error} Any error that occurred during rendering.\n */\n getError() {\n return this.error_;\n }\n\n /**\n * Handle async drawing complete.\n * @param {Error} [err] Any error during drawing.\n * @private\n */\n handleLoad_(err) {\n if (err) {\n this.error_ = err;\n this.state = ImageState.ERROR;\n } else {\n this.state = ImageState.LOADED;\n }\n this.changed();\n }\n\n /**\n * Load not yet loaded URI.\n * @override\n */\n load() {\n if (this.state == ImageState.IDLE) {\n this.state = ImageState.LOADING;\n this.changed();\n this.loader_(this.handleLoad_.bind(this));\n }\n }\n\n /**\n * @return {HTMLCanvasElement|OffscreenCanvas} Canvas element.\n * @override\n */\n getImage() {\n return this.canvas_;\n }\n}\n\nexport default ImageCanvas;\n", "/**\n * @module ol/resolution\n */\n\n/**\n * @typedef {number|Array<number>} ResolutionLike\n */\n\n/**\n * @param {ResolutionLike} resolution Resolution.\n * @return {number} Resolution.\n */\nexport function fromResolutionLike(resolution) {\n if (Array.isArray(resolution)) {\n return Math.min(...resolution);\n }\n return resolution;\n}\n"],
|
||||||
|
"mappings": ";;;;;;AAeA,IAAM,cAAN,cAA0B,cAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASrC,YAAY,QAAQ,YAAY,YAAY,QAAQ,QAAQ;AAC1D,UAAM,QAAQ,WAAW,SAAY,mBAAW,OAAO,mBAAW;AAElE,UAAM,QAAQ,YAAY,YAAY,KAAK;AAO3C,SAAK,UAAU,WAAW,SAAY,SAAS;AAM/C,SAAK,UAAU;AAMf,SAAK,SAAS;AAAA,EAChB;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,WAAW;AACT,WAAO,KAAK;AAAA,EACd;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,YAAY,KAAK;AACf,QAAI,KAAK;AACP,WAAK,SAAS;AACd,WAAK,QAAQ,mBAAW;AAAA,IAC1B,OAAO;AACL,WAAK,QAAQ,mBAAW;AAAA,IAC1B;AACA,SAAK,QAAQ;AAAA,EACf;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,OAAO;AACL,QAAI,KAAK,SAAS,mBAAW,MAAM;AACjC,WAAK,QAAQ,mBAAW;AACxB,WAAK,QAAQ;AACb,WAAK,QAAQ,KAAK,YAAY,KAAK,IAAI,CAAC;AAAA,IAC1C;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,WAAW;AACT,WAAO,KAAK;AAAA,EACd;AACF;AAEA,IAAO,sBAAQ;;;ACjFR,SAAS,mBAAmB,YAAY;AAC7C,MAAI,MAAM,QAAQ,UAAU,GAAG;AAC7B,WAAO,KAAK,IAAI,GAAG,UAAU;AAAA,EAC/B;AACA,SAAO;AACT;",
|
||||||
|
"names": []
|
||||||
|
}
|
||||||
270
node_modules/.vite/deps/chunk-3UNEODO2.js
generated
vendored
Normal file
270
node_modules/.vite/deps/chunk-3UNEODO2.js
generated
vendored
Normal file
@ -0,0 +1,270 @@
|
|||||||
|
import {
|
||||||
|
Circle_default,
|
||||||
|
LineString_default,
|
||||||
|
MultiLineString_default,
|
||||||
|
MultiPolygon_default
|
||||||
|
} from "./chunk-7JXPN73Q.js";
|
||||||
|
import {
|
||||||
|
Polygon_default
|
||||||
|
} from "./chunk-AZGMK675.js";
|
||||||
|
import {
|
||||||
|
buffer
|
||||||
|
} from "./chunk-SRXHWJOY.js";
|
||||||
|
|
||||||
|
// node_modules/ol-ext/geom/GeomUtils.js
|
||||||
|
var ol_coordinate_dist2d = function(p1, p2) {
|
||||||
|
var dx = p1[0] - p2[0];
|
||||||
|
var dy = p1[1] - p2[1];
|
||||||
|
return Math.sqrt(dx * dx + dy * dy);
|
||||||
|
};
|
||||||
|
var ol_coordinate_equal = function(p1, p2) {
|
||||||
|
return p1[0] == p2[0] && p1[1] == p2[1];
|
||||||
|
};
|
||||||
|
var ol_coordinate_offsetCoords = function(coords, offset) {
|
||||||
|
var path = [];
|
||||||
|
var N = coords.length - 1;
|
||||||
|
var max = N;
|
||||||
|
var mi, mi1, li, li1, ri, ri1, si, si1, Xi1, Yi1;
|
||||||
|
var p0, p1, p2;
|
||||||
|
var isClosed = ol_coordinate_equal(coords[0], coords[N]);
|
||||||
|
if (!isClosed) {
|
||||||
|
p0 = coords[0];
|
||||||
|
p1 = coords[1];
|
||||||
|
p2 = [
|
||||||
|
p0[0] + (p1[1] - p0[1]) / ol_coordinate_dist2d(p0, p1) * offset,
|
||||||
|
p0[1] - (p1[0] - p0[0]) / ol_coordinate_dist2d(p0, p1) * offset
|
||||||
|
];
|
||||||
|
path.push(p2);
|
||||||
|
coords.push(coords[N]);
|
||||||
|
N++;
|
||||||
|
max--;
|
||||||
|
}
|
||||||
|
for (var i = 0; i < max; i++) {
|
||||||
|
p0 = coords[i];
|
||||||
|
p1 = coords[(i + 1) % N];
|
||||||
|
p2 = coords[(i + 2) % N];
|
||||||
|
mi = (p1[1] - p0[1]) / (p1[0] - p0[0]);
|
||||||
|
mi1 = (p2[1] - p1[1]) / (p2[0] - p1[0]);
|
||||||
|
if (Math.abs(mi - mi1) > 1e-10) {
|
||||||
|
li = Math.sqrt((p1[0] - p0[0]) * (p1[0] - p0[0]) + (p1[1] - p0[1]) * (p1[1] - p0[1]));
|
||||||
|
li1 = Math.sqrt((p2[0] - p1[0]) * (p2[0] - p1[0]) + (p2[1] - p1[1]) * (p2[1] - p1[1]));
|
||||||
|
ri = p0[0] + offset * (p1[1] - p0[1]) / li;
|
||||||
|
ri1 = p1[0] + offset * (p2[1] - p1[1]) / li1;
|
||||||
|
si = p0[1] - offset * (p1[0] - p0[0]) / li;
|
||||||
|
si1 = p1[1] - offset * (p2[0] - p1[0]) / li1;
|
||||||
|
Xi1 = (mi1 * ri1 - mi * ri + si - si1) / (mi1 - mi);
|
||||||
|
Yi1 = (mi * mi1 * (ri1 - ri) + mi1 * si - mi * si1) / (mi1 - mi);
|
||||||
|
if (p1[0] - p0[0] == 0) {
|
||||||
|
Xi1 = p1[0] + offset * (p1[1] - p0[1]) / Math.abs(p1[1] - p0[1]);
|
||||||
|
Yi1 = mi1 * Xi1 - mi1 * ri1 + si1;
|
||||||
|
}
|
||||||
|
if (p2[0] - p1[0] == 0) {
|
||||||
|
Xi1 = p2[0] + offset * (p2[1] - p1[1]) / Math.abs(p2[1] - p1[1]);
|
||||||
|
Yi1 = mi * Xi1 - mi * ri + si;
|
||||||
|
}
|
||||||
|
path.push([Xi1, Yi1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (isClosed) {
|
||||||
|
path.push(path[0]);
|
||||||
|
} else {
|
||||||
|
coords.pop();
|
||||||
|
p0 = coords[coords.length - 1];
|
||||||
|
p1 = coords[coords.length - 2];
|
||||||
|
p2 = [
|
||||||
|
p0[0] - (p1[1] - p0[1]) / ol_coordinate_dist2d(p0, p1) * offset,
|
||||||
|
p0[1] + (p1[0] - p0[0]) / ol_coordinate_dist2d(p0, p1) * offset
|
||||||
|
];
|
||||||
|
path.push(p2);
|
||||||
|
}
|
||||||
|
return path;
|
||||||
|
};
|
||||||
|
var ol_coordinate_findSegment = function(pt, coords) {
|
||||||
|
for (var i = 0; i < coords.length - 1; i++) {
|
||||||
|
var p0 = coords[i];
|
||||||
|
var p1 = coords[i + 1];
|
||||||
|
if (ol_coordinate_equal(pt, p0) || ol_coordinate_equal(pt, p1)) {
|
||||||
|
return { index: 1, segment: [p0, p1] };
|
||||||
|
} else {
|
||||||
|
var d0 = ol_coordinate_dist2d(p0, p1);
|
||||||
|
var v0 = [(p1[0] - p0[0]) / d0, (p1[1] - p0[1]) / d0];
|
||||||
|
var d1 = ol_coordinate_dist2d(p0, pt);
|
||||||
|
var v1 = [(pt[0] - p0[0]) / d1, (pt[1] - p0[1]) / d1];
|
||||||
|
if (Math.abs(v0[0] * v1[1] - v0[1] * v1[0]) < 1e-10) {
|
||||||
|
return { index: 1, segment: [p0, p1] };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return { index: -1 };
|
||||||
|
};
|
||||||
|
var ol_extent_intersection;
|
||||||
|
(function() {
|
||||||
|
function splitX(pts, x) {
|
||||||
|
var pt;
|
||||||
|
for (let i = pts.length - 1; i > 0; i--) {
|
||||||
|
if (pts[i][0] > x && pts[i - 1][0] < x || pts[i][0] < x && pts[i - 1][0] > x) {
|
||||||
|
pt = [x, (x - pts[i][0]) / (pts[i - 1][0] - pts[i][0]) * (pts[i - 1][1] - pts[i][1]) + pts[i][1]];
|
||||||
|
pts.splice(i, 0, pt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function splitY(pts, y) {
|
||||||
|
var pt;
|
||||||
|
for (let i = pts.length - 1; i > 0; i--) {
|
||||||
|
if (pts[i][1] > y && pts[i - 1][1] < y || pts[i][1] < y && pts[i - 1][1] > y) {
|
||||||
|
pt = [(y - pts[i][1]) / (pts[i - 1][1] - pts[i][1]) * (pts[i - 1][0] - pts[i][0]) + pts[i][0], y];
|
||||||
|
pts.splice(i, 0, pt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ol_extent_intersection = function(extent, polygon) {
|
||||||
|
var poly = polygon.getType() === "Polygon";
|
||||||
|
if (!poly && polygon.getType() !== "MultiPolygon") return null;
|
||||||
|
var geom = polygon.getCoordinates();
|
||||||
|
if (poly) geom = [geom];
|
||||||
|
geom.forEach(function(g) {
|
||||||
|
g.forEach(function(c) {
|
||||||
|
splitX(c, extent[0]);
|
||||||
|
splitX(c, extent[2]);
|
||||||
|
splitY(c, extent[1]);
|
||||||
|
splitY(c, extent[3]);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
geom.forEach(function(g) {
|
||||||
|
g.forEach(function(c) {
|
||||||
|
c.forEach(function(p) {
|
||||||
|
if (p[0] < extent[0]) p[0] = extent[0];
|
||||||
|
else if (p[0] > extent[2]) p[0] = extent[2];
|
||||||
|
if (p[1] < extent[1]) p[1] = extent[1];
|
||||||
|
else if (p[1] > extent[3]) p[1] = extent[3];
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
if (poly) {
|
||||||
|
return new Polygon_default(geom[0]);
|
||||||
|
} else {
|
||||||
|
return new MultiPolygon_default(geom);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
})();
|
||||||
|
var ol_coordinate_sampleAt = function(p1, p2, d, start) {
|
||||||
|
var pts = [];
|
||||||
|
if (start !== false) pts.push(p1);
|
||||||
|
var dl = ol_coordinate_dist2d(p1, p2);
|
||||||
|
if (dl) {
|
||||||
|
var nb = Math.round(dl / d);
|
||||||
|
if (nb > 1) {
|
||||||
|
var dx = (p2[0] - p1[0]) / nb;
|
||||||
|
var dy = (p2[1] - p1[1]) / nb;
|
||||||
|
for (var i = 1; i < nb; i++) {
|
||||||
|
pts.push([p1[0] + dx * i, p1[1] + dy * i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pts.push(p2);
|
||||||
|
return pts;
|
||||||
|
};
|
||||||
|
LineString_default.prototype.sampleAt = function(d) {
|
||||||
|
var line = this.getCoordinates();
|
||||||
|
var result = [];
|
||||||
|
for (var i = 1; i < line.length; i++) {
|
||||||
|
result = result.concat(ol_coordinate_sampleAt(line[i - 1], line[i], d, i === 1));
|
||||||
|
}
|
||||||
|
return new LineString_default(result);
|
||||||
|
};
|
||||||
|
MultiLineString_default.prototype.sampleAt = function(d) {
|
||||||
|
var lines = this.getCoordinates();
|
||||||
|
var result = [];
|
||||||
|
lines.forEach(function(p) {
|
||||||
|
var l = [];
|
||||||
|
for (var i = 1; i < p.length; i++) {
|
||||||
|
l = l.concat(ol_coordinate_sampleAt(p[i - 1], p[i], d, i === 1));
|
||||||
|
}
|
||||||
|
result.push(l);
|
||||||
|
});
|
||||||
|
return new MultiLineString_default(result);
|
||||||
|
};
|
||||||
|
Polygon_default.prototype.sampleAt = function(res) {
|
||||||
|
var poly = this.getCoordinates();
|
||||||
|
var result = [];
|
||||||
|
poly.forEach(function(p) {
|
||||||
|
var l = [];
|
||||||
|
for (var i = 1; i < p.length; i++) {
|
||||||
|
l = l.concat(ol_coordinate_sampleAt(p[i - 1], p[i], res, i === 1));
|
||||||
|
}
|
||||||
|
result.push(l);
|
||||||
|
});
|
||||||
|
return new Polygon_default(result);
|
||||||
|
};
|
||||||
|
MultiPolygon_default.prototype.sampleAt = function(res) {
|
||||||
|
var mpoly = this.getCoordinates();
|
||||||
|
var result = [];
|
||||||
|
mpoly.forEach(function(poly) {
|
||||||
|
var a = [];
|
||||||
|
result.push(a);
|
||||||
|
poly.forEach(function(p) {
|
||||||
|
var l = [];
|
||||||
|
for (var i = 1; i < p.length; i++) {
|
||||||
|
l = l.concat(ol_coordinate_sampleAt(p[i - 1], p[i], res, i === 1));
|
||||||
|
}
|
||||||
|
a.push(l);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
return new MultiPolygon_default(result);
|
||||||
|
};
|
||||||
|
Circle_default.prototype.intersection = function(geom, resolution) {
|
||||||
|
if (geom.sampleAt) {
|
||||||
|
var ext = buffer(this.getCenter().concat(this.getCenter()), this.getRadius());
|
||||||
|
geom = ol_extent_intersection(ext, geom);
|
||||||
|
geom = geom.simplify(resolution);
|
||||||
|
var c = this.getCenter();
|
||||||
|
var r = this.getRadius();
|
||||||
|
var g = geom.sampleAt(resolution).getCoordinates();
|
||||||
|
switch (geom.getType()) {
|
||||||
|
case "Polygon":
|
||||||
|
g = [g];
|
||||||
|
// fallthrough
|
||||||
|
case "MultiPolygon": {
|
||||||
|
var hasout = false;
|
||||||
|
var result = [];
|
||||||
|
g.forEach(function(poly) {
|
||||||
|
var a = [];
|
||||||
|
result.push(a);
|
||||||
|
poly.forEach(function(ring) {
|
||||||
|
var l = [];
|
||||||
|
a.push(l);
|
||||||
|
ring.forEach(function(p) {
|
||||||
|
var d = ol_coordinate_dist2d(c, p);
|
||||||
|
if (d > r) {
|
||||||
|
hasout = true;
|
||||||
|
l.push([
|
||||||
|
c[0] + r / d * (p[0] - c[0]),
|
||||||
|
c[1] + r / d * (p[1] - c[1])
|
||||||
|
]);
|
||||||
|
} else {
|
||||||
|
l.push(p);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
if (!hasout) return geom;
|
||||||
|
if (geom.getType() === "Polygon") {
|
||||||
|
return new Polygon_default(result[0]);
|
||||||
|
} else {
|
||||||
|
return new MultiPolygon_default(result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
console.warn("[ol/geom/Circle~intersection] Unsupported geometry type: " + geom.getType());
|
||||||
|
}
|
||||||
|
return geom;
|
||||||
|
};
|
||||||
|
|
||||||
|
export {
|
||||||
|
ol_coordinate_dist2d,
|
||||||
|
ol_coordinate_equal,
|
||||||
|
ol_coordinate_offsetCoords,
|
||||||
|
ol_coordinate_findSegment
|
||||||
|
};
|
||||||
|
//# sourceMappingURL=chunk-3UNEODO2.js.map
|
||||||
7
node_modules/.vite/deps/chunk-3UNEODO2.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-3UNEODO2.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1408
node_modules/.vite/deps/chunk-3ZDRPUXW.js
generated
vendored
Normal file
1408
node_modules/.vite/deps/chunk-3ZDRPUXW.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
node_modules/.vite/deps/chunk-3ZDRPUXW.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-3ZDRPUXW.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
59
node_modules/.vite/deps/chunk-43GYE2V5.js
generated
vendored
Normal file
59
node_modules/.vite/deps/chunk-43GYE2V5.js
generated
vendored
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
import {
|
||||||
|
XYZ_default,
|
||||||
|
defaultTileLoadFunction
|
||||||
|
} from "./chunk-3ZDRPUXW.js";
|
||||||
|
import {
|
||||||
|
WORKER_OFFSCREEN_CANVAS
|
||||||
|
} from "./chunk-5XHD7RSF.js";
|
||||||
|
|
||||||
|
// node_modules/ol/source/OSM.js
|
||||||
|
var ATTRIBUTION = '© <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.';
|
||||||
|
var OSM = class extends XYZ_default {
|
||||||
|
/**
|
||||||
|
* @param {Options} [options] Open Street Map options.
|
||||||
|
*/
|
||||||
|
constructor(options) {
|
||||||
|
options = options || {};
|
||||||
|
let attributions;
|
||||||
|
if (options.attributions !== void 0) {
|
||||||
|
attributions = options.attributions;
|
||||||
|
} else {
|
||||||
|
attributions = [ATTRIBUTION];
|
||||||
|
}
|
||||||
|
const crossOrigin = options.crossOrigin !== void 0 ? options.crossOrigin : "anonymous";
|
||||||
|
const url = options.url !== void 0 ? options.url : "https://tile.openstreetmap.org/{z}/{x}/{y}.png";
|
||||||
|
super({
|
||||||
|
attributions,
|
||||||
|
attributionsCollapsible: false,
|
||||||
|
cacheSize: options.cacheSize,
|
||||||
|
crossOrigin,
|
||||||
|
interpolate: options.interpolate,
|
||||||
|
maxZoom: options.maxZoom !== void 0 ? options.maxZoom : 19,
|
||||||
|
reprojectionErrorThreshold: options.reprojectionErrorThreshold,
|
||||||
|
tileLoadFunction: (
|
||||||
|
/**
|
||||||
|
* @param {import("../ImageTile.js").default} tile Image tile
|
||||||
|
* @param {string} src Image src
|
||||||
|
*/
|
||||||
|
(tile, src) => {
|
||||||
|
const image = tile.getImage();
|
||||||
|
if (!WORKER_OFFSCREEN_CANVAS && image instanceof HTMLImageElement) {
|
||||||
|
image.referrerPolicy = "origin-when-cross-origin";
|
||||||
|
}
|
||||||
|
(options.tileLoadFunction || defaultTileLoadFunction)(tile, src);
|
||||||
|
}
|
||||||
|
),
|
||||||
|
transition: options.transition,
|
||||||
|
url,
|
||||||
|
wrapX: options.wrapX,
|
||||||
|
zDirection: options.zDirection
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var OSM_default = OSM;
|
||||||
|
|
||||||
|
export {
|
||||||
|
ATTRIBUTION,
|
||||||
|
OSM_default
|
||||||
|
};
|
||||||
|
//# sourceMappingURL=chunk-43GYE2V5.js.map
|
||||||
7
node_modules/.vite/deps/chunk-43GYE2V5.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-43GYE2V5.js.map
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"sources": ["../../ol/source/OSM.js"],
|
||||||
|
"sourcesContent": ["/**\n * @module ol/source/OSM\n */\n\nimport {WORKER_OFFSCREEN_CANVAS} from '../has.js';\nimport {defaultTileLoadFunction} from './TileImage.js';\nimport XYZ from './XYZ.js';\n\n/**\n * The attribution containing a link to the OpenStreetMap Copyright and License\n * page.\n * @const\n * @type {string}\n * @api\n */\nexport const ATTRIBUTION =\n '© ' +\n '<a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\">OpenStreetMap</a> ' +\n 'contributors.';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize] Deprecated. Use the cacheSize option on the layer instead.\n * @property {null|string} [crossOrigin='anonymous'] The `crossOrigin` attribute for loaded images. Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [interpolate=true] Use interpolated values when resampling. By default,\n * linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.\n * @property {number} [maxZoom=19] Max zoom.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n * imageTile.getImage().src = src;\n * };\n * ```\n * @property {number} [transition=250] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {string} [url='https://tile.openstreetmap.org/{z}/{x}/{y}.png'] URL template.\n * Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0]\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n */\n\n/**\n * @classdesc\n * Layer source for the OpenStreetMap tile server.\n * @api\n */\nclass OSM extends XYZ {\n /**\n * @param {Options} [options] Open Street Map options.\n */\n constructor(options) {\n options = options || {};\n\n let attributions;\n if (options.attributions !== undefined) {\n attributions = options.attributions;\n } else {\n attributions = [ATTRIBUTION];\n }\n\n const crossOrigin =\n options.crossOrigin !== undefined ? options.crossOrigin : 'anonymous';\n\n const url =\n options.url !== undefined\n ? options.url\n : 'https://tile.openstreetmap.org/{z}/{x}/{y}.png';\n\n super({\n attributions: attributions,\n attributionsCollapsible: false,\n cacheSize: options.cacheSize,\n crossOrigin: crossOrigin,\n interpolate: options.interpolate,\n maxZoom: options.maxZoom !== undefined ? options.maxZoom : 19,\n reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n tileLoadFunction:\n /**\n * @param {import(\"../ImageTile.js\").default} tile Image tile\n * @param {string} src Image src\n */\n (tile, src) => {\n const image = tile.getImage();\n // FIXME referrer policy for worker fetch requests\n if (!WORKER_OFFSCREEN_CANVAS && image instanceof HTMLImageElement) {\n image.referrerPolicy = 'origin-when-cross-origin';\n }\n (options.tileLoadFunction || defaultTileLoadFunction)(tile, src);\n },\n transition: options.transition,\n url: url,\n wrapX: options.wrapX,\n zDirection: options.zDirection,\n });\n }\n}\n\nexport default OSM;\n"],
|
||||||
|
"mappings": ";;;;;;;;;AAeO,IAAM,cACX;AAqCF,IAAM,MAAN,cAAkB,YAAI;AAAA;AAAA;AAAA;AAAA,EAIpB,YAAY,SAAS;AACnB,cAAU,WAAW,CAAC;AAEtB,QAAI;AACJ,QAAI,QAAQ,iBAAiB,QAAW;AACtC,qBAAe,QAAQ;AAAA,IACzB,OAAO;AACL,qBAAe,CAAC,WAAW;AAAA,IAC7B;AAEA,UAAM,cACJ,QAAQ,gBAAgB,SAAY,QAAQ,cAAc;AAE5D,UAAM,MACJ,QAAQ,QAAQ,SACZ,QAAQ,MACR;AAEN,UAAM;AAAA,MACJ;AAAA,MACA,yBAAyB;AAAA,MACzB,WAAW,QAAQ;AAAA,MACnB;AAAA,MACA,aAAa,QAAQ;AAAA,MACrB,SAAS,QAAQ,YAAY,SAAY,QAAQ,UAAU;AAAA,MAC3D,4BAA4B,QAAQ;AAAA,MACpC;AAAA;AAAA;AAAA;AAAA;AAAA,QAKE,CAAC,MAAM,QAAQ;AACb,gBAAM,QAAQ,KAAK,SAAS;AAE5B,cAAI,CAAC,2BAA2B,iBAAiB,kBAAkB;AACjE,kBAAM,iBAAiB;AAAA,UACzB;AACA,WAAC,QAAQ,oBAAoB,yBAAyB,MAAM,GAAG;AAAA,QACjE;AAAA;AAAA,MACF,YAAY,QAAQ;AAAA,MACpB;AAAA,MACA,OAAO,QAAQ;AAAA,MACf,YAAY,QAAQ;AAAA,IACtB,CAAC;AAAA,EACH;AACF;AAEA,IAAO,cAAQ;",
|
||||||
|
"names": []
|
||||||
|
}
|
||||||
112
node_modules/.vite/deps/chunk-54BTDBAD.js
generated
vendored
Normal file
112
node_modules/.vite/deps/chunk-54BTDBAD.js
generated
vendored
Normal file
@ -0,0 +1,112 @@
|
|||||||
|
// node_modules/ol/math.js
|
||||||
|
function clamp(value, min, max) {
|
||||||
|
return Math.min(Math.max(value, min), max);
|
||||||
|
}
|
||||||
|
function squaredSegmentDistance(x, y, x1, y1, x2, y2) {
|
||||||
|
const dx = x2 - x1;
|
||||||
|
const dy = y2 - y1;
|
||||||
|
if (dx !== 0 || dy !== 0) {
|
||||||
|
const t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy);
|
||||||
|
if (t > 1) {
|
||||||
|
x1 = x2;
|
||||||
|
y1 = y2;
|
||||||
|
} else if (t > 0) {
|
||||||
|
x1 += dx * t;
|
||||||
|
y1 += dy * t;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return squaredDistance(x, y, x1, y1);
|
||||||
|
}
|
||||||
|
function squaredDistance(x1, y1, x2, y2) {
|
||||||
|
const dx = x2 - x1;
|
||||||
|
const dy = y2 - y1;
|
||||||
|
return dx * dx + dy * dy;
|
||||||
|
}
|
||||||
|
function solveLinearSystem(mat) {
|
||||||
|
const n = mat.length;
|
||||||
|
for (let i = 0; i < n; i++) {
|
||||||
|
let maxRow = i;
|
||||||
|
let maxEl = Math.abs(mat[i][i]);
|
||||||
|
for (let r = i + 1; r < n; r++) {
|
||||||
|
const absValue = Math.abs(mat[r][i]);
|
||||||
|
if (absValue > maxEl) {
|
||||||
|
maxEl = absValue;
|
||||||
|
maxRow = r;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (maxEl === 0) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
const tmp = mat[maxRow];
|
||||||
|
mat[maxRow] = mat[i];
|
||||||
|
mat[i] = tmp;
|
||||||
|
for (let j = i + 1; j < n; j++) {
|
||||||
|
const coef = -mat[j][i] / mat[i][i];
|
||||||
|
for (let k = i; k < n + 1; k++) {
|
||||||
|
if (i == k) {
|
||||||
|
mat[j][k] = 0;
|
||||||
|
} else {
|
||||||
|
mat[j][k] += coef * mat[i][k];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const x = new Array(n);
|
||||||
|
for (let l = n - 1; l >= 0; l--) {
|
||||||
|
x[l] = mat[l][n] / mat[l][l];
|
||||||
|
for (let m = l - 1; m >= 0; m--) {
|
||||||
|
mat[m][n] -= mat[m][l] * x[l];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
function toDegrees(angleInRadians) {
|
||||||
|
return angleInRadians * 180 / Math.PI;
|
||||||
|
}
|
||||||
|
function toRadians(angleInDegrees) {
|
||||||
|
return angleInDegrees * Math.PI / 180;
|
||||||
|
}
|
||||||
|
function modulo(a, b) {
|
||||||
|
const r = a % b;
|
||||||
|
return r * b < 0 ? r + b : r;
|
||||||
|
}
|
||||||
|
function lerp(a, b, x) {
|
||||||
|
return a + x * (b - a);
|
||||||
|
}
|
||||||
|
function toFixed(n, decimals) {
|
||||||
|
const factor = Math.pow(10, decimals);
|
||||||
|
return Math.round(n * factor) / factor;
|
||||||
|
}
|
||||||
|
function round(n, decimals) {
|
||||||
|
return Math.round(toFixed(n, decimals));
|
||||||
|
}
|
||||||
|
function floor(n, decimals) {
|
||||||
|
return Math.floor(toFixed(n, decimals));
|
||||||
|
}
|
||||||
|
function ceil(n, decimals) {
|
||||||
|
return Math.ceil(toFixed(n, decimals));
|
||||||
|
}
|
||||||
|
function wrap(n, min, max) {
|
||||||
|
if (n >= min && n < max) {
|
||||||
|
return n;
|
||||||
|
}
|
||||||
|
const range = max - min;
|
||||||
|
return ((n - min) % range + range) % range + min;
|
||||||
|
}
|
||||||
|
|
||||||
|
export {
|
||||||
|
clamp,
|
||||||
|
squaredSegmentDistance,
|
||||||
|
squaredDistance,
|
||||||
|
solveLinearSystem,
|
||||||
|
toDegrees,
|
||||||
|
toRadians,
|
||||||
|
modulo,
|
||||||
|
lerp,
|
||||||
|
toFixed,
|
||||||
|
round,
|
||||||
|
floor,
|
||||||
|
ceil,
|
||||||
|
wrap
|
||||||
|
};
|
||||||
|
//# sourceMappingURL=chunk-54BTDBAD.js.map
|
||||||
7
node_modules/.vite/deps/chunk-54BTDBAD.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-54BTDBAD.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
276
node_modules/.vite/deps/chunk-56VFHHUN.js
generated
vendored
Normal file
276
node_modules/.vite/deps/chunk-56VFHHUN.js
generated
vendored
Normal file
@ -0,0 +1,276 @@
|
|||||||
|
import {
|
||||||
|
Feature_default as Feature_default2
|
||||||
|
} from "./chunk-W7BDJOQY.js";
|
||||||
|
import {
|
||||||
|
GeometryCollection_default,
|
||||||
|
LineString_default,
|
||||||
|
MultiLineString_default,
|
||||||
|
MultiPoint_default,
|
||||||
|
MultiPolygon_default
|
||||||
|
} from "./chunk-7JXPN73Q.js";
|
||||||
|
import {
|
||||||
|
Feature_default
|
||||||
|
} from "./chunk-E53S5GN6.js";
|
||||||
|
import {
|
||||||
|
Point_default,
|
||||||
|
Polygon_default,
|
||||||
|
linearRingsAreOriented,
|
||||||
|
linearRingssAreOriented,
|
||||||
|
orientLinearRings,
|
||||||
|
orientLinearRingsArray
|
||||||
|
} from "./chunk-AZGMK675.js";
|
||||||
|
import {
|
||||||
|
equivalent,
|
||||||
|
get,
|
||||||
|
getTransform
|
||||||
|
} from "./chunk-A3RXLHYB.js";
|
||||||
|
import {
|
||||||
|
abstract
|
||||||
|
} from "./chunk-Q5ZULJHM.js";
|
||||||
|
|
||||||
|
// node_modules/ol/format/Feature.js
|
||||||
|
var FeatureFormat = class {
|
||||||
|
constructor() {
|
||||||
|
this.dataProjection = void 0;
|
||||||
|
this.defaultFeatureProjection = void 0;
|
||||||
|
this.featureClass = /** @type {FeatureToFeatureClass<FeatureType>} */
|
||||||
|
Feature_default;
|
||||||
|
this.supportedMediaTypes = null;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Adds the data projection to the read options.
|
||||||
|
* @param {Document|Element|Object|string} source Source.
|
||||||
|
* @param {ReadOptions} [options] Options.
|
||||||
|
* @return {ReadOptions|undefined} Options.
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
getReadOptions(source, options) {
|
||||||
|
if (options) {
|
||||||
|
let dataProjection = options.dataProjection ? get(options.dataProjection) : this.readProjection(source);
|
||||||
|
if (options.extent && dataProjection && dataProjection.getUnits() === "tile-pixels") {
|
||||||
|
dataProjection = get(dataProjection);
|
||||||
|
dataProjection.setWorldExtent(options.extent);
|
||||||
|
}
|
||||||
|
options = {
|
||||||
|
dataProjection,
|
||||||
|
featureProjection: options.featureProjection
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return this.adaptOptions(options);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Sets the `dataProjection` on the options, if no `dataProjection`
|
||||||
|
* is set.
|
||||||
|
* @param {WriteOptions|ReadOptions|undefined} options
|
||||||
|
* Options.
|
||||||
|
* @protected
|
||||||
|
* @return {WriteOptions|ReadOptions|undefined}
|
||||||
|
* Updated options.
|
||||||
|
*/
|
||||||
|
adaptOptions(options) {
|
||||||
|
return Object.assign(
|
||||||
|
{
|
||||||
|
dataProjection: this.dataProjection,
|
||||||
|
featureProjection: this.defaultFeatureProjection,
|
||||||
|
featureClass: this.featureClass
|
||||||
|
},
|
||||||
|
options
|
||||||
|
);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @abstract
|
||||||
|
* @return {Type} The format type.
|
||||||
|
*/
|
||||||
|
getType() {
|
||||||
|
return abstract();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Read a single feature from a source.
|
||||||
|
*
|
||||||
|
* @abstract
|
||||||
|
* @param {Document|Element|Object|string} source Source.
|
||||||
|
* @param {ReadOptions} [options] Read options.
|
||||||
|
* @return {FeatureType|Array<FeatureType>} Feature.
|
||||||
|
*/
|
||||||
|
readFeature(source, options) {
|
||||||
|
return abstract();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Read all features from a source.
|
||||||
|
*
|
||||||
|
* @abstract
|
||||||
|
* @param {Document|Element|ArrayBuffer|Object|string} source Source.
|
||||||
|
* @param {ReadOptions} [options] Read options.
|
||||||
|
* @return {Array<FeatureType>} Features.
|
||||||
|
*/
|
||||||
|
readFeatures(source, options) {
|
||||||
|
return abstract();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Read a single geometry from a source.
|
||||||
|
*
|
||||||
|
* @abstract
|
||||||
|
* @param {Document|Element|Object|string} source Source.
|
||||||
|
* @param {ReadOptions} [options] Read options.
|
||||||
|
* @return {import("../geom/Geometry.js").default} Geometry.
|
||||||
|
*/
|
||||||
|
readGeometry(source, options) {
|
||||||
|
return abstract();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Read the projection from a source.
|
||||||
|
*
|
||||||
|
* @abstract
|
||||||
|
* @param {Document|Element|Object|string} source Source.
|
||||||
|
* @return {import("../proj/Projection.js").default|undefined} Projection.
|
||||||
|
*/
|
||||||
|
readProjection(source) {
|
||||||
|
return abstract();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Encode a feature in this format.
|
||||||
|
*
|
||||||
|
* @abstract
|
||||||
|
* @param {Feature} feature Feature.
|
||||||
|
* @param {WriteOptions} [options] Write options.
|
||||||
|
* @return {string|ArrayBuffer} Result.
|
||||||
|
*/
|
||||||
|
writeFeature(feature, options) {
|
||||||
|
return abstract();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Encode an array of features in this format.
|
||||||
|
*
|
||||||
|
* @abstract
|
||||||
|
* @param {Array<Feature>} features Features.
|
||||||
|
* @param {WriteOptions} [options] Write options.
|
||||||
|
* @return {string|ArrayBuffer} Result.
|
||||||
|
*/
|
||||||
|
writeFeatures(features, options) {
|
||||||
|
return abstract();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Write a single geometry in this format.
|
||||||
|
*
|
||||||
|
* @abstract
|
||||||
|
* @param {import("../geom/Geometry.js").default} geometry Geometry.
|
||||||
|
* @param {WriteOptions} [options] Write options.
|
||||||
|
* @return {string|ArrayBuffer} Result.
|
||||||
|
*/
|
||||||
|
writeGeometry(geometry, options) {
|
||||||
|
return abstract();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var Feature_default3 = FeatureFormat;
|
||||||
|
function transformGeometryWithOptions(geometry, write, options) {
|
||||||
|
const featureProjection = options ? get(options.featureProjection) : null;
|
||||||
|
const dataProjection = options ? get(options.dataProjection) : null;
|
||||||
|
let transformed = geometry;
|
||||||
|
if (featureProjection && dataProjection && !equivalent(featureProjection, dataProjection)) {
|
||||||
|
if (write) {
|
||||||
|
transformed = /** @type {T} */
|
||||||
|
geometry.clone();
|
||||||
|
}
|
||||||
|
const fromProjection = write ? featureProjection : dataProjection;
|
||||||
|
const toProjection = write ? dataProjection : featureProjection;
|
||||||
|
if (fromProjection.getUnits() === "tile-pixels") {
|
||||||
|
transformed.transform(fromProjection, toProjection);
|
||||||
|
} else {
|
||||||
|
transformed.applyTransform(getTransform(fromProjection, toProjection));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (write && options && /** @type {WriteOptions} */
|
||||||
|
options.decimals !== void 0) {
|
||||||
|
const power = Math.pow(
|
||||||
|
10,
|
||||||
|
/** @type {WriteOptions} */
|
||||||
|
options.decimals
|
||||||
|
);
|
||||||
|
const transform = function(coordinates) {
|
||||||
|
for (let i = 0, ii = coordinates.length; i < ii; ++i) {
|
||||||
|
coordinates[i] = Math.round(coordinates[i] * power) / power;
|
||||||
|
}
|
||||||
|
return coordinates;
|
||||||
|
};
|
||||||
|
if (transformed === geometry) {
|
||||||
|
transformed = /** @type {T} */
|
||||||
|
geometry.clone();
|
||||||
|
}
|
||||||
|
transformed.applyTransform(transform);
|
||||||
|
}
|
||||||
|
return transformed;
|
||||||
|
}
|
||||||
|
var GeometryConstructor = {
|
||||||
|
Point: Point_default,
|
||||||
|
LineString: LineString_default,
|
||||||
|
Polygon: Polygon_default,
|
||||||
|
MultiPoint: MultiPoint_default,
|
||||||
|
MultiLineString: MultiLineString_default,
|
||||||
|
MultiPolygon: MultiPolygon_default
|
||||||
|
};
|
||||||
|
function orientFlatCoordinates(flatCoordinates, ends, stride) {
|
||||||
|
if (Array.isArray(ends[0])) {
|
||||||
|
if (!linearRingssAreOriented(flatCoordinates, 0, ends, stride)) {
|
||||||
|
flatCoordinates = flatCoordinates.slice();
|
||||||
|
orientLinearRingsArray(flatCoordinates, 0, ends, stride);
|
||||||
|
}
|
||||||
|
return flatCoordinates;
|
||||||
|
}
|
||||||
|
if (!linearRingsAreOriented(flatCoordinates, 0, ends, stride)) {
|
||||||
|
flatCoordinates = flatCoordinates.slice();
|
||||||
|
orientLinearRings(flatCoordinates, 0, ends, stride);
|
||||||
|
}
|
||||||
|
return flatCoordinates;
|
||||||
|
}
|
||||||
|
function createRenderFeature(object, options) {
|
||||||
|
var _a;
|
||||||
|
const geometry = object.geometry;
|
||||||
|
if (!geometry) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
if (Array.isArray(geometry)) {
|
||||||
|
return geometry.map((geometry2) => createRenderFeature({ ...object, geometry: geometry2 })).flat();
|
||||||
|
}
|
||||||
|
const geometryType = geometry.type === "MultiPolygon" ? "Polygon" : geometry.type;
|
||||||
|
if (geometryType === "GeometryCollection" || geometryType === "Circle") {
|
||||||
|
throw new Error("Unsupported geometry type: " + geometryType);
|
||||||
|
}
|
||||||
|
const stride = geometry.layout.length;
|
||||||
|
return transformGeometryWithOptions(
|
||||||
|
new Feature_default2(
|
||||||
|
geometryType,
|
||||||
|
geometryType === "Polygon" ? orientFlatCoordinates(geometry.flatCoordinates, geometry.ends, stride) : geometry.flatCoordinates,
|
||||||
|
(_a = geometry.ends) == null ? void 0 : _a.flat(),
|
||||||
|
stride,
|
||||||
|
object.properties || {},
|
||||||
|
object.id
|
||||||
|
).enableSimplifyTransformed(),
|
||||||
|
false,
|
||||||
|
options
|
||||||
|
);
|
||||||
|
}
|
||||||
|
function createGeometry(object, options) {
|
||||||
|
if (!object) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if (Array.isArray(object)) {
|
||||||
|
const geometries = object.map(
|
||||||
|
(geometry) => createGeometry(geometry, options)
|
||||||
|
);
|
||||||
|
return new GeometryCollection_default(geometries);
|
||||||
|
}
|
||||||
|
const Geometry = GeometryConstructor[object.type];
|
||||||
|
return transformGeometryWithOptions(
|
||||||
|
new Geometry(object.flatCoordinates, object.layout || "XY", object.ends),
|
||||||
|
false,
|
||||||
|
options
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export {
|
||||||
|
Feature_default3 as Feature_default,
|
||||||
|
transformGeometryWithOptions,
|
||||||
|
createRenderFeature,
|
||||||
|
createGeometry
|
||||||
|
};
|
||||||
|
//# sourceMappingURL=chunk-56VFHHUN.js.map
|
||||||
7
node_modules/.vite/deps/chunk-56VFHHUN.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-56VFHHUN.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
17
node_modules/.vite/deps/chunk-5D2XPBR2.js
generated
vendored
Normal file
17
node_modules/.vite/deps/chunk-5D2XPBR2.js
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
// node_modules/ol/TileState.js
|
||||||
|
var TileState_default = {
|
||||||
|
IDLE: 0,
|
||||||
|
LOADING: 1,
|
||||||
|
LOADED: 2,
|
||||||
|
/**
|
||||||
|
* Indicates that tile loading failed
|
||||||
|
* @type {number}
|
||||||
|
*/
|
||||||
|
ERROR: 3,
|
||||||
|
EMPTY: 4
|
||||||
|
};
|
||||||
|
|
||||||
|
export {
|
||||||
|
TileState_default
|
||||||
|
};
|
||||||
|
//# sourceMappingURL=chunk-5D2XPBR2.js.map
|
||||||
7
node_modules/.vite/deps/chunk-5D2XPBR2.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-5D2XPBR2.js.map
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"sources": ["../../ol/TileState.js"],
|
||||||
|
"sourcesContent": ["/**\n * @module ol/TileState\n */\n\n/**\n * @enum {number}\n */\nexport default {\n IDLE: 0,\n LOADING: 1,\n LOADED: 2,\n /**\n * Indicates that tile loading failed\n * @type {number}\n */\n ERROR: 3,\n EMPTY: 4,\n};\n"],
|
||||||
|
"mappings": ";AAOA,IAAO,oBAAQ;AAAA,EACb,MAAM;AAAA,EACN,SAAS;AAAA,EACT,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,EAKR,OAAO;AAAA,EACP,OAAO;AACT;",
|
||||||
|
"names": []
|
||||||
|
}
|
||||||
19
node_modules/.vite/deps/chunk-5RHQVMYD.js
generated
vendored
Normal file
19
node_modules/.vite/deps/chunk-5RHQVMYD.js
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
// node_modules/ol/obj.js
|
||||||
|
function clear(object) {
|
||||||
|
for (const property in object) {
|
||||||
|
delete object[property];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function isEmpty(object) {
|
||||||
|
let property;
|
||||||
|
for (property in object) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return !property;
|
||||||
|
}
|
||||||
|
|
||||||
|
export {
|
||||||
|
clear,
|
||||||
|
isEmpty
|
||||||
|
};
|
||||||
|
//# sourceMappingURL=chunk-5RHQVMYD.js.map
|
||||||
7
node_modules/.vite/deps/chunk-5RHQVMYD.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-5RHQVMYD.js.map
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"sources": ["../../ol/obj.js"],
|
||||||
|
"sourcesContent": ["/**\n * @module ol/obj\n */\n\n/**\n * Removes all properties from an object.\n * @param {Object<string, unknown>} object The object to clear.\n */\nexport function clear(object) {\n for (const property in object) {\n delete object[property];\n }\n}\n\n/**\n * Determine if an object has any properties.\n * @param {Object} object The object to check.\n * @return {boolean} The object is empty.\n */\nexport function isEmpty(object) {\n let property;\n for (property in object) {\n return false;\n }\n return !property;\n}\n"],
|
||||||
|
"mappings": ";AAQO,SAAS,MAAM,QAAQ;AAC5B,aAAW,YAAY,QAAQ;AAC7B,WAAO,OAAO,QAAQ;AAAA,EACxB;AACF;AAOO,SAAS,QAAQ,QAAQ;AAC9B,MAAI;AACJ,OAAK,YAAY,QAAQ;AACvB,WAAO;AAAA,EACT;AACA,SAAO,CAAC;AACV;",
|
||||||
|
"names": []
|
||||||
|
}
|
||||||
36
node_modules/.vite/deps/chunk-5XHD7RSF.js
generated
vendored
Normal file
36
node_modules/.vite/deps/chunk-5XHD7RSF.js
generated
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
// node_modules/ol/has.js
|
||||||
|
var ua = typeof navigator !== "undefined" && typeof navigator.userAgent !== "undefined" ? navigator.userAgent.toLowerCase() : "";
|
||||||
|
var SAFARI = ua.includes("safari") && !ua.includes("chrom");
|
||||||
|
var SAFARI_BUG_237906 = SAFARI && (ua.includes("version/15.4") || /cpu (os|iphone os) 15_4 like mac os x/.test(ua));
|
||||||
|
var WEBKIT = ua.includes("webkit") && !ua.includes("edge");
|
||||||
|
var MAC = ua.includes("macintosh");
|
||||||
|
var DEVICE_PIXEL_RATIO = typeof devicePixelRatio !== "undefined" ? devicePixelRatio : 1;
|
||||||
|
var WORKER_OFFSCREEN_CANVAS = typeof WorkerGlobalScope !== "undefined" && typeof OffscreenCanvas !== "undefined" && self instanceof WorkerGlobalScope;
|
||||||
|
var IMAGE_DECODE = typeof Image !== "undefined" && Image.prototype.decode;
|
||||||
|
var CREATE_IMAGE_BITMAP = typeof createImageBitmap === "function";
|
||||||
|
var PASSIVE_EVENT_LISTENERS = (function() {
|
||||||
|
let passive = false;
|
||||||
|
try {
|
||||||
|
const options = Object.defineProperty({}, "passive", {
|
||||||
|
get: function() {
|
||||||
|
passive = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
window.addEventListener("_", null, options);
|
||||||
|
window.removeEventListener("_", null, options);
|
||||||
|
} catch {
|
||||||
|
}
|
||||||
|
return passive;
|
||||||
|
})();
|
||||||
|
|
||||||
|
export {
|
||||||
|
SAFARI_BUG_237906,
|
||||||
|
WEBKIT,
|
||||||
|
MAC,
|
||||||
|
DEVICE_PIXEL_RATIO,
|
||||||
|
WORKER_OFFSCREEN_CANVAS,
|
||||||
|
IMAGE_DECODE,
|
||||||
|
CREATE_IMAGE_BITMAP,
|
||||||
|
PASSIVE_EVENT_LISTENERS
|
||||||
|
};
|
||||||
|
//# sourceMappingURL=chunk-5XHD7RSF.js.map
|
||||||
7
node_modules/.vite/deps/chunk-5XHD7RSF.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-5XHD7RSF.js.map
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"sources": ["../../ol/has.js"],
|
||||||
|
"sourcesContent": ["/**\n * @module ol/has\n */\n\nconst ua =\n typeof navigator !== 'undefined' && typeof navigator.userAgent !== 'undefined'\n ? navigator.userAgent.toLowerCase()\n : '';\n\n/**\n * User agent string says we are dealing with Safari as browser.\n * @type {boolean}\n */\nexport const SAFARI = ua.includes('safari') && !ua.includes('chrom');\n\n/**\n * https://bugs.webkit.org/show_bug.cgi?id=237906\n * @type {boolean}\n */\nexport const SAFARI_BUG_237906 =\n SAFARI &&\n (ua.includes('version/15.4') ||\n /cpu (os|iphone os) 15_4 like mac os x/.test(ua));\n\n/**\n * User agent string says we are dealing with a WebKit engine.\n * @type {boolean}\n */\nexport const WEBKIT = ua.includes('webkit') && !ua.includes('edge');\n\n/**\n * User agent string says we are dealing with a Mac as platform.\n * @type {boolean}\n */\nexport const MAC = ua.includes('macintosh');\n\n/**\n * The ratio between physical pixels and device-independent pixels\n * (dips) on the device (`window.devicePixelRatio`).\n * @const\n * @type {number}\n * @api\n */\nexport const DEVICE_PIXEL_RATIO =\n typeof devicePixelRatio !== 'undefined' ? devicePixelRatio : 1;\n\n/**\n * The execution context is a worker with OffscreenCanvas available.\n * @const\n * @type {boolean}\n */\nexport const WORKER_OFFSCREEN_CANVAS =\n typeof WorkerGlobalScope !== 'undefined' &&\n typeof OffscreenCanvas !== 'undefined' &&\n self instanceof WorkerGlobalScope; //eslint-disable-line\n\n/**\n * Image.prototype.decode() is supported.\n * @type {boolean}\n */\nexport const IMAGE_DECODE =\n typeof Image !== 'undefined' && Image.prototype.decode;\n\n/**\n * createImageBitmap() is supported.\n * @type {boolean}\n */\nexport const CREATE_IMAGE_BITMAP = typeof createImageBitmap === 'function';\n\n/**\n * @type {boolean}\n */\nexport const PASSIVE_EVENT_LISTENERS = (function () {\n let passive = false;\n try {\n const options = Object.defineProperty({}, 'passive', {\n get: function () {\n passive = true;\n },\n });\n\n // @ts-ignore Ignore invalid event type '_'\n window.addEventListener('_', null, options);\n // @ts-ignore Ignore invalid event type '_'\n window.removeEventListener('_', null, options);\n } catch {\n // passive not supported\n }\n return passive;\n})();\n"],
|
||||||
|
"mappings": ";AAIA,IAAM,KACJ,OAAO,cAAc,eAAe,OAAO,UAAU,cAAc,cAC/D,UAAU,UAAU,YAAY,IAChC;AAMC,IAAM,SAAS,GAAG,SAAS,QAAQ,KAAK,CAAC,GAAG,SAAS,OAAO;AAM5D,IAAM,oBACX,WACC,GAAG,SAAS,cAAc,KACzB,wCAAwC,KAAK,EAAE;AAM5C,IAAM,SAAS,GAAG,SAAS,QAAQ,KAAK,CAAC,GAAG,SAAS,MAAM;AAM3D,IAAM,MAAM,GAAG,SAAS,WAAW;AASnC,IAAM,qBACX,OAAO,qBAAqB,cAAc,mBAAmB;AAOxD,IAAM,0BACX,OAAO,sBAAsB,eAC7B,OAAO,oBAAoB,eAC3B,gBAAgB;AAMX,IAAM,eACX,OAAO,UAAU,eAAe,MAAM,UAAU;AAM3C,IAAM,sBAAsB,OAAO,sBAAsB;AAKzD,IAAM,2BAA2B,WAAY;AAClD,MAAI,UAAU;AACd,MAAI;AACF,UAAM,UAAU,OAAO,eAAe,CAAC,GAAG,WAAW;AAAA,MACnD,KAAK,WAAY;AACf,kBAAU;AAAA,MACZ;AAAA,IACF,CAAC;AAGD,WAAO,iBAAiB,KAAK,MAAM,OAAO;AAE1C,WAAO,oBAAoB,KAAK,MAAM,OAAO;AAAA,EAC/C,QAAQ;AAAA,EAER;AACA,SAAO;AACT,GAAG;",
|
||||||
|
"names": []
|
||||||
|
}
|
||||||
465
node_modules/.vite/deps/chunk-6DXBPPKF.js
generated
vendored
Normal file
465
node_modules/.vite/deps/chunk-6DXBPPKF.js
generated
vendored
Normal file
@ -0,0 +1,465 @@
|
|||||||
|
import {
|
||||||
|
Feature_default
|
||||||
|
} from "./chunk-E53S5GN6.js";
|
||||||
|
import {
|
||||||
|
Vector_default
|
||||||
|
} from "./chunk-T3TT2KJN.js";
|
||||||
|
import {
|
||||||
|
Interaction_default
|
||||||
|
} from "./chunk-MSWSBYBR.js";
|
||||||
|
import {
|
||||||
|
never,
|
||||||
|
shiftKeyOnly,
|
||||||
|
singleClick
|
||||||
|
} from "./chunk-QCJTGAWF.js";
|
||||||
|
import {
|
||||||
|
CollectionEventType_default,
|
||||||
|
Collection_default
|
||||||
|
} from "./chunk-M5TTSD4C.js";
|
||||||
|
import {
|
||||||
|
createEditingStyle
|
||||||
|
} from "./chunk-PAB2HIXK.js";
|
||||||
|
import {
|
||||||
|
getUid
|
||||||
|
} from "./chunk-Q5ZULJHM.js";
|
||||||
|
import {
|
||||||
|
Event_default
|
||||||
|
} from "./chunk-NGFXCWUF.js";
|
||||||
|
import {
|
||||||
|
TRUE,
|
||||||
|
extend
|
||||||
|
} from "./chunk-K25ZO44T.js";
|
||||||
|
import {
|
||||||
|
clear
|
||||||
|
} from "./chunk-5RHQVMYD.js";
|
||||||
|
|
||||||
|
// node_modules/ol/interaction/Select.js
|
||||||
|
var SelectEventType = {
|
||||||
|
/**
|
||||||
|
* Triggered when feature(s) has been (de)selected.
|
||||||
|
* @event SelectEvent#select
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
SELECT: "select"
|
||||||
|
};
|
||||||
|
var SelectEvent = class extends Event_default {
|
||||||
|
/**
|
||||||
|
* @param {SelectEventType} type The event type.
|
||||||
|
* @param {Array<import("../Feature.js").default>} selected Selected features.
|
||||||
|
* @param {Array<import("../Feature.js").default>} deselected Deselected features.
|
||||||
|
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Associated
|
||||||
|
* {@link module:ol/MapBrowserEvent~MapBrowserEvent}.
|
||||||
|
*/
|
||||||
|
constructor(type, selected, deselected, mapBrowserEvent) {
|
||||||
|
super(type);
|
||||||
|
this.selected = selected;
|
||||||
|
this.deselected = deselected;
|
||||||
|
this.mapBrowserEvent = mapBrowserEvent;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var originalFeatureStyles = {};
|
||||||
|
var Select = class _Select extends Interaction_default {
|
||||||
|
/**
|
||||||
|
* @param {Options} [options] Options.
|
||||||
|
*/
|
||||||
|
constructor(options) {
|
||||||
|
super();
|
||||||
|
this.on;
|
||||||
|
this.once;
|
||||||
|
this.un;
|
||||||
|
options = options ? options : {};
|
||||||
|
this.boundAddFeature_ = this.addFeature_.bind(this);
|
||||||
|
this.boundRemoveFeature_ = this.removeFeature_.bind(this);
|
||||||
|
this.condition_ = options.condition ? options.condition : singleClick;
|
||||||
|
this.addCondition_ = options.addCondition ? options.addCondition : never;
|
||||||
|
this.removeCondition_ = options.removeCondition ? options.removeCondition : never;
|
||||||
|
this.toggleCondition_ = options.toggleCondition ? options.toggleCondition : shiftKeyOnly;
|
||||||
|
this.multi_ = options.multi ? options.multi : false;
|
||||||
|
this.filter_ = options.filter ? options.filter : TRUE;
|
||||||
|
this.hitTolerance_ = options.hitTolerance ? options.hitTolerance : 0;
|
||||||
|
this.style_ = options.style !== void 0 ? options.style : getDefaultStyleFunction();
|
||||||
|
this.features_ = options.features || new Collection_default();
|
||||||
|
let layerFilter;
|
||||||
|
if (options.layers) {
|
||||||
|
if (typeof options.layers === "function") {
|
||||||
|
layerFilter = options.layers;
|
||||||
|
} else {
|
||||||
|
const layers = options.layers;
|
||||||
|
layerFilter = function(layer) {
|
||||||
|
return layers.includes(layer);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
layerFilter = TRUE;
|
||||||
|
}
|
||||||
|
this.layerFilter_ = layerFilter;
|
||||||
|
this.featureLayerAssociation_ = {};
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param {import("../Feature.js").default} feature Feature.
|
||||||
|
* @param {import("../layer/Layer.js").default} layer Layer.
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
addFeatureLayerAssociation_(feature, layer) {
|
||||||
|
this.featureLayerAssociation_[getUid(feature)] = layer;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Get the selected features.
|
||||||
|
* @return {Collection<Feature>} Features collection.
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
getFeatures() {
|
||||||
|
return this.features_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Returns the Hit-detection tolerance.
|
||||||
|
* @return {number} Hit tolerance in pixels.
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
getHitTolerance() {
|
||||||
|
return this.hitTolerance_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Returns the associated {@link module:ol/layer/Vector~VectorLayer vector layer} of
|
||||||
|
* a selected feature.
|
||||||
|
* @param {import("../Feature.js").default} feature Feature
|
||||||
|
* @return {import('../layer/Vector.js').default} Layer.
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
getLayer(feature) {
|
||||||
|
return (
|
||||||
|
/** @type {import('../layer/Vector.js').default} */
|
||||||
|
this.featureLayerAssociation_[getUid(feature)]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Hit-detection tolerance. Pixels inside the radius around the given position
|
||||||
|
* will be checked for features.
|
||||||
|
* @param {number} hitTolerance Hit tolerance in pixels.
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
setHitTolerance(hitTolerance) {
|
||||||
|
this.hitTolerance_ = hitTolerance;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Remove the interaction from its current map, if any, and attach it to a new
|
||||||
|
* map, if any. Pass `null` to just remove the interaction from the current map.
|
||||||
|
* @param {import("../Map.js").default|null} map Map.
|
||||||
|
* @api
|
||||||
|
* @override
|
||||||
|
*/
|
||||||
|
setMap(map) {
|
||||||
|
const currentMap = this.getMap();
|
||||||
|
if (currentMap && this.style_) {
|
||||||
|
this.features_.forEach(this.restorePreviousStyle_.bind(this));
|
||||||
|
}
|
||||||
|
super.setMap(map);
|
||||||
|
if (map) {
|
||||||
|
this.features_.addEventListener(
|
||||||
|
CollectionEventType_default.ADD,
|
||||||
|
this.boundAddFeature_
|
||||||
|
);
|
||||||
|
this.features_.addEventListener(
|
||||||
|
CollectionEventType_default.REMOVE,
|
||||||
|
this.boundRemoveFeature_
|
||||||
|
);
|
||||||
|
if (this.style_) {
|
||||||
|
this.features_.forEach(this.applySelectedStyle_.bind(this));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.features_.removeEventListener(
|
||||||
|
CollectionEventType_default.ADD,
|
||||||
|
this.boundAddFeature_
|
||||||
|
);
|
||||||
|
this.features_.removeEventListener(
|
||||||
|
CollectionEventType_default.REMOVE,
|
||||||
|
this.boundRemoveFeature_
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param {import("../Collection.js").CollectionEvent<Feature>} evt Event.
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
addFeature_(evt) {
|
||||||
|
const feature = evt.element;
|
||||||
|
if (this.style_) {
|
||||||
|
this.applySelectedStyle_(feature);
|
||||||
|
}
|
||||||
|
if (!this.getLayer(feature)) {
|
||||||
|
const layer = this.findLayerOfFeature_(feature);
|
||||||
|
if (layer) {
|
||||||
|
this.addFeatureLayerAssociation_(feature, layer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param {import("../Collection.js").CollectionEvent<Feature>} evt Event.
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
removeFeature_(evt) {
|
||||||
|
if (this.style_) {
|
||||||
|
this.restorePreviousStyle_(evt.element);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param {Feature} feature Feature of which to get the layer
|
||||||
|
* @return {VectorLayer} layer, if one was found.
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
findLayerOfFeature_(feature) {
|
||||||
|
const layer = (
|
||||||
|
/** @type {VectorLayer} */
|
||||||
|
this.getMap().getAllLayers().find(function(layer2) {
|
||||||
|
if (layer2 instanceof Vector_default && layer2.getSource() && layer2.getSource().hasFeature(feature)) {
|
||||||
|
return layer2;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
);
|
||||||
|
return layer;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @return {import("../style/Style.js").StyleLike|null} Select style.
|
||||||
|
*/
|
||||||
|
getStyle() {
|
||||||
|
return this.style_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param {Feature} feature Feature
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
applySelectedStyle_(feature) {
|
||||||
|
const key = getUid(feature);
|
||||||
|
if (!(key in originalFeatureStyles)) {
|
||||||
|
originalFeatureStyles[key] = feature.getStyle();
|
||||||
|
}
|
||||||
|
feature.setStyle(this.style_);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param {Feature} feature Feature
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
restorePreviousStyle_(feature) {
|
||||||
|
const interactions = this.getMap().getInteractions().getArray();
|
||||||
|
for (let i = interactions.length - 1; i >= 0; --i) {
|
||||||
|
const interaction = interactions[i];
|
||||||
|
if (interaction !== this && interaction instanceof _Select && interaction.getStyle() && interaction.getFeatures().getArray().lastIndexOf(feature) !== -1) {
|
||||||
|
feature.setStyle(interaction.getStyle());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const key = getUid(feature);
|
||||||
|
feature.setStyle(originalFeatureStyles[key]);
|
||||||
|
delete originalFeatureStyles[key];
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param {Feature} feature Feature.
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
removeFeatureLayerAssociation_(feature) {
|
||||||
|
delete this.featureLayerAssociation_[getUid(feature)];
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param {import("../Feature.js").FeatureLike} feature The feature to select
|
||||||
|
* @param {import("../layer/Layer.js").default} layer Optional layer containing this feature
|
||||||
|
* @param {Array<Feature>} [selected] optional array to which selected features will be added
|
||||||
|
* @return {Feature|undefined} The feature, if it got selected.
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
selectFeatureInternal_(feature, layer, selected) {
|
||||||
|
if (!(feature instanceof Feature_default)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!this.filter_(feature, layer)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const features = this.getFeatures();
|
||||||
|
if (!features.getArray().includes(feature)) {
|
||||||
|
this.addFeatureLayerAssociation_(feature, layer);
|
||||||
|
features.push(feature);
|
||||||
|
selected == null ? void 0 : selected.push(feature);
|
||||||
|
}
|
||||||
|
return feature;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Try to select a feature as if it was clicked and `addCondition` evaluated to True.
|
||||||
|
* Unlike modifying `select.getFeatures()` directly, this respects the `filter` and `layers` options (except `multi`, which is ignored).
|
||||||
|
* The {@link module:ol/interaction/Select~SelectEvent} fired by this won't have a mapBrowserEvent property
|
||||||
|
* @param {Feature} feature The feature to select
|
||||||
|
* @return {boolean} True if the feature was selected
|
||||||
|
*/
|
||||||
|
selectFeature(feature) {
|
||||||
|
const layer = this.findLayerOfFeature_(feature);
|
||||||
|
if (!this.layerFilter_(layer)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
const selected = this.selectFeatureInternal_(feature, layer);
|
||||||
|
if (selected) {
|
||||||
|
this.dispatchEvent(
|
||||||
|
new SelectEvent(SelectEventType.SELECT, [selected], [], void 0)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return !!selected;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Deselects a feature if it was previously selected. Also removes layer association.
|
||||||
|
* @param {import("../Feature.js").FeatureLike} feature The feature to deselect
|
||||||
|
* @param {Array<Feature>} [deselected] optional array to which deselected features will be added
|
||||||
|
* @return {Feature|undefined} The feature, if it was previously selected.
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
removeFeatureInternal_(feature, deselected) {
|
||||||
|
const features = this.getFeatures();
|
||||||
|
if (!(feature instanceof Feature_default) || !features.getArray().includes(feature)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
features.remove(feature);
|
||||||
|
this.removeFeatureLayerAssociation_(feature);
|
||||||
|
deselected == null ? void 0 : deselected.push(feature);
|
||||||
|
return feature;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Try to deselect a feature as if it was clicked.
|
||||||
|
* Compared to `select.getFeatures().remove(feature)` this causes a SelectEvent.
|
||||||
|
* The {@link module:ol/interaction/Select~SelectEvent} fired by this won't have a mapBrowserEvent property
|
||||||
|
* @param {Feature} feature The feature to deselect
|
||||||
|
* @return {boolean} True if the feature was deselected
|
||||||
|
*/
|
||||||
|
deselectFeature(feature) {
|
||||||
|
const deselected = this.removeFeatureInternal_(feature);
|
||||||
|
if (deselected) {
|
||||||
|
this.dispatchEvent(
|
||||||
|
new SelectEvent(SelectEventType.SELECT, [], [deselected], void 0)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return !!deselected;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Try to toggle a feature as if it was clicked and `toggleCondition` was True.
|
||||||
|
* Unlike modifying `select.getFeatures()` directly, this respects the `filter` and `layers` options (except `multi`, which is ignored).
|
||||||
|
* The {@link module:ol/interaction/Select~SelectEvent} fired by this won't have a mapBrowserEvent property
|
||||||
|
* @param {Feature} feature The feature to deselect
|
||||||
|
*/
|
||||||
|
toggleFeature(feature) {
|
||||||
|
if (!this.deselectFeature(feature)) {
|
||||||
|
this.selectFeature(feature);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Deselect all features as if a user deselected them.
|
||||||
|
* Compared to `select.getFeatures().clear()` this causes a SelectEvent.
|
||||||
|
* The {@link module:ol/interaction/Select~SelectEvent} fired by this won't have a mapBrowserEvent property
|
||||||
|
*/
|
||||||
|
clearSelection() {
|
||||||
|
clear(this.featureLayerAssociation_);
|
||||||
|
const features = this.getFeatures();
|
||||||
|
const deselected = features.getArray().slice();
|
||||||
|
features.clear();
|
||||||
|
if (deselected.length !== 0) {
|
||||||
|
this.dispatchEvent(
|
||||||
|
new SelectEvent(SelectEventType.SELECT, [], deselected, void 0)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} and may change the
|
||||||
|
* selected state of features.
|
||||||
|
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event.
|
||||||
|
* @return {boolean} `false` to stop event propagation.
|
||||||
|
* @override
|
||||||
|
*/
|
||||||
|
handleEvent(mapBrowserEvent) {
|
||||||
|
if (!this.condition_(mapBrowserEvent)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
const add = this.addCondition_(mapBrowserEvent);
|
||||||
|
const remove = this.removeCondition_(mapBrowserEvent);
|
||||||
|
const toggle = this.toggleCondition_(mapBrowserEvent);
|
||||||
|
const set = !add && !remove && !toggle;
|
||||||
|
const map = mapBrowserEvent.map;
|
||||||
|
const features = this.getFeatures();
|
||||||
|
const deselected = [];
|
||||||
|
const selected = [];
|
||||||
|
if (set) {
|
||||||
|
let foundAtCursor = false;
|
||||||
|
map.forEachFeatureAtPixel(
|
||||||
|
mapBrowserEvent.pixel,
|
||||||
|
(feature, layer) => {
|
||||||
|
foundAtCursor = true;
|
||||||
|
if (!this.selectFeatureInternal_(feature, layer, selected)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
return !this.multi_;
|
||||||
|
},
|
||||||
|
{
|
||||||
|
layerFilter: this.layerFilter_,
|
||||||
|
hitTolerance: this.hitTolerance_
|
||||||
|
}
|
||||||
|
);
|
||||||
|
for (let i = features.getLength() - 1; i >= 0; --i) {
|
||||||
|
const feature = features.item(i);
|
||||||
|
if (
|
||||||
|
// remove all but selected, if there were any selected
|
||||||
|
selected.length > 0 && !selected.includes(feature) || // remove all, if click outside of layer
|
||||||
|
!foundAtCursor
|
||||||
|
) {
|
||||||
|
this.removeFeatureInternal_(feature, deselected);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
map.forEachFeatureAtPixel(
|
||||||
|
mapBrowserEvent.pixel,
|
||||||
|
(feature, layer) => {
|
||||||
|
let modifiedFeature;
|
||||||
|
if (remove || toggle) {
|
||||||
|
modifiedFeature = this.removeFeatureInternal_(feature, deselected);
|
||||||
|
}
|
||||||
|
if ((add || toggle) && !modifiedFeature) {
|
||||||
|
modifiedFeature = this.selectFeatureInternal_(
|
||||||
|
feature,
|
||||||
|
layer,
|
||||||
|
selected
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (!modifiedFeature) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
return !this.multi_;
|
||||||
|
},
|
||||||
|
{
|
||||||
|
layerFilter: this.layerFilter_,
|
||||||
|
hitTolerance: this.hitTolerance_
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (selected.length > 0 || deselected.length > 0) {
|
||||||
|
this.dispatchEvent(
|
||||||
|
new SelectEvent(
|
||||||
|
SelectEventType.SELECT,
|
||||||
|
selected,
|
||||||
|
deselected,
|
||||||
|
mapBrowserEvent
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
function getDefaultStyleFunction() {
|
||||||
|
const styles = createEditingStyle();
|
||||||
|
extend(styles["Polygon"], styles["LineString"]);
|
||||||
|
extend(styles["GeometryCollection"], styles["LineString"]);
|
||||||
|
return function(feature) {
|
||||||
|
if (!feature.getGeometry()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return styles[feature.getGeometry().getType()];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
var Select_default = Select;
|
||||||
|
|
||||||
|
export {
|
||||||
|
SelectEvent,
|
||||||
|
Select_default
|
||||||
|
};
|
||||||
|
//# sourceMappingURL=chunk-6DXBPPKF.js.map
|
||||||
7
node_modules/.vite/deps/chunk-6DXBPPKF.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-6DXBPPKF.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
68
node_modules/.vite/deps/chunk-6EWLK2BW.js
generated
vendored
Normal file
68
node_modules/.vite/deps/chunk-6EWLK2BW.js
generated
vendored
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
// node_modules/ol/css.js
|
||||||
|
var CLASS_HIDDEN = "ol-hidden";
|
||||||
|
var CLASS_SELECTABLE = "ol-selectable";
|
||||||
|
var CLASS_UNSELECTABLE = "ol-unselectable";
|
||||||
|
var CLASS_CONTROL = "ol-control";
|
||||||
|
var CLASS_COLLAPSED = "ol-collapsed";
|
||||||
|
var fontRegEx = new RegExp(
|
||||||
|
[
|
||||||
|
"^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)",
|
||||||
|
"(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)",
|
||||||
|
"(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)",
|
||||||
|
"(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?",
|
||||||
|
"(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))",
|
||||||
|
"(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))",
|
||||||
|
`?\\s*([-,\\"\\'\\sa-z0-9]+?)\\s*$`
|
||||||
|
].join(""),
|
||||||
|
"i"
|
||||||
|
);
|
||||||
|
var fontRegExMatchIndex = [
|
||||||
|
"style",
|
||||||
|
"variant",
|
||||||
|
"weight",
|
||||||
|
"size",
|
||||||
|
"lineHeight",
|
||||||
|
"family"
|
||||||
|
];
|
||||||
|
var fontWeights = {
|
||||||
|
normal: 400,
|
||||||
|
bold: 700
|
||||||
|
};
|
||||||
|
var getFontParameters = function(fontSpec) {
|
||||||
|
const match = fontSpec.match(fontRegEx);
|
||||||
|
if (!match) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
const style = (
|
||||||
|
/** @type {FontParameters} */
|
||||||
|
{
|
||||||
|
lineHeight: "normal",
|
||||||
|
size: "1.2em",
|
||||||
|
style: "normal",
|
||||||
|
weight: "400",
|
||||||
|
variant: "normal"
|
||||||
|
}
|
||||||
|
);
|
||||||
|
for (let i = 0, ii = fontRegExMatchIndex.length; i < ii; ++i) {
|
||||||
|
const value = match[i + 1];
|
||||||
|
if (value !== void 0) {
|
||||||
|
style[fontRegExMatchIndex[i]] = typeof value === "string" ? value.trim() : value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (isNaN(Number(style.weight)) && style.weight in fontWeights) {
|
||||||
|
style.weight = fontWeights[style.weight];
|
||||||
|
}
|
||||||
|
style.families = style.family.split(/,\s?/).map((f) => f.trim().replace(/^['"]|['"]$/g, ""));
|
||||||
|
return style;
|
||||||
|
};
|
||||||
|
|
||||||
|
export {
|
||||||
|
CLASS_HIDDEN,
|
||||||
|
CLASS_SELECTABLE,
|
||||||
|
CLASS_UNSELECTABLE,
|
||||||
|
CLASS_CONTROL,
|
||||||
|
CLASS_COLLAPSED,
|
||||||
|
fontWeights,
|
||||||
|
getFontParameters
|
||||||
|
};
|
||||||
|
//# sourceMappingURL=chunk-6EWLK2BW.js.map
|
||||||
7
node_modules/.vite/deps/chunk-6EWLK2BW.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-6EWLK2BW.js.map
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"sources": ["../../ol/css.js"],
|
||||||
|
"sourcesContent": ["/**\n * @module ol/css\n */\n\n/**\n * @typedef {Object} FontParameters\n * @property {string} style Style.\n * @property {string} variant Variant.\n * @property {string} weight Weight.\n * @property {string} size Size.\n * @property {string} lineHeight LineHeight.\n * @property {string} family Family.\n * @property {Array<string>} families Families.\n */\n\n/**\n * The CSS class for hidden feature.\n *\n * @const\n * @type {string}\n */\nexport const CLASS_HIDDEN = 'ol-hidden';\n\n/**\n * The CSS class that we'll give the DOM elements to have them selectable.\n *\n * @const\n * @type {string}\n */\nexport const CLASS_SELECTABLE = 'ol-selectable';\n\n/**\n * The CSS class that we'll give the DOM elements to have them unselectable.\n *\n * @const\n * @type {string}\n */\nexport const CLASS_UNSELECTABLE = 'ol-unselectable';\n\n/**\n * The CSS class for unsupported feature.\n *\n * @const\n * @type {string}\n */\nexport const CLASS_UNSUPPORTED = 'ol-unsupported';\n\n/**\n * The CSS class for controls.\n *\n * @const\n * @type {string}\n */\nexport const CLASS_CONTROL = 'ol-control';\n\n/**\n * The CSS class that we'll give the DOM elements that are collapsed, i.e.\n * to those elements which usually can be expanded.\n *\n * @const\n * @type {string}\n */\nexport const CLASS_COLLAPSED = 'ol-collapsed';\n\n/**\n * From https://stackoverflow.com/questions/10135697/regex-to-parse-any-css-font\n * @type {RegExp}\n */\nconst fontRegEx = new RegExp(\n [\n '^\\\\s*(?=(?:(?:[-a-z]+\\\\s*){0,2}(italic|oblique))?)',\n '(?=(?:(?:[-a-z]+\\\\s*){0,2}(small-caps))?)',\n '(?=(?:(?:[-a-z]+\\\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)',\n '(?:(?:normal|\\\\1|\\\\2|\\\\3)\\\\s*){0,3}((?:xx?-)?',\n '(?:small|large)|medium|smaller|larger|[\\\\.\\\\d]+(?:\\\\%|in|[cem]m|ex|p[ctx]))',\n '(?:\\\\s*\\\\/\\\\s*(normal|[\\\\.\\\\d]+(?:\\\\%|in|[cem]m|ex|p[ctx])?))',\n '?\\\\s*([-,\\\\\"\\\\\\'\\\\sa-z0-9]+?)\\\\s*$',\n ].join(''),\n 'i',\n);\n/** @type {Array<'style'|'variant'|'weight'|'size'|'lineHeight'|'family'>} */\nconst fontRegExMatchIndex = [\n 'style',\n 'variant',\n 'weight',\n 'size',\n 'lineHeight',\n 'family',\n];\n\n/** @type {Object<string|number, number>} */\nexport const fontWeights = {\n normal: 400,\n bold: 700,\n};\n\n/**\n * Get the list of font families from a font spec. Note that this doesn't work\n * for font families that have commas in them.\n * @param {string} fontSpec The CSS font property.\n * @return {FontParameters|null} The font parameters (or null if the input spec is invalid).\n */\nexport const getFontParameters = function (fontSpec) {\n const match = fontSpec.match(fontRegEx);\n if (!match) {\n return null;\n }\n const style = /** @type {FontParameters} */ ({\n lineHeight: 'normal',\n size: '1.2em',\n style: 'normal',\n weight: '400',\n variant: 'normal',\n });\n for (let i = 0, ii = fontRegExMatchIndex.length; i < ii; ++i) {\n const value = match[i + 1];\n if (value !== undefined) {\n style[fontRegExMatchIndex[i]] =\n typeof value === 'string' ? value.trim() : value;\n }\n }\n if (isNaN(Number(style.weight)) && style.weight in fontWeights) {\n style.weight = fontWeights[style.weight];\n }\n style.families = style.family\n .split(/,\\s?/)\n .map((f) => f.trim().replace(/^['\"]|['\"]$/g, ''));\n return style;\n};\n"],
|
||||||
|
"mappings": ";AAqBO,IAAM,eAAe;AAQrB,IAAM,mBAAmB;AAQzB,IAAM,qBAAqB;AAgB3B,IAAM,gBAAgB;AAStB,IAAM,kBAAkB;AAM/B,IAAM,YAAY,IAAI;AAAA,EACpB;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,EAAE,KAAK,EAAE;AAAA,EACT;AACF;AAEA,IAAM,sBAAsB;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAGO,IAAM,cAAc;AAAA,EACzB,QAAQ;AAAA,EACR,MAAM;AACR;AAQO,IAAM,oBAAoB,SAAU,UAAU;AACnD,QAAM,QAAQ,SAAS,MAAM,SAAS;AACtC,MAAI,CAAC,OAAO;AACV,WAAO;AAAA,EACT;AACA,QAAM;AAAA;AAAA,IAAuC;AAAA,MAC3C,YAAY;AAAA,MACZ,MAAM;AAAA,MACN,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,SAAS;AAAA,IACX;AAAA;AACA,WAAS,IAAI,GAAG,KAAK,oBAAoB,QAAQ,IAAI,IAAI,EAAE,GAAG;AAC5D,UAAM,QAAQ,MAAM,IAAI,CAAC;AACzB,QAAI,UAAU,QAAW;AACvB,YAAM,oBAAoB,CAAC,CAAC,IAC1B,OAAO,UAAU,WAAW,MAAM,KAAK,IAAI;AAAA,IAC/C;AAAA,EACF;AACA,MAAI,MAAM,OAAO,MAAM,MAAM,CAAC,KAAK,MAAM,UAAU,aAAa;AAC9D,UAAM,SAAS,YAAY,MAAM,MAAM;AAAA,EACzC;AACA,QAAM,WAAW,MAAM,OACpB,MAAM,MAAM,EACZ,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,gBAAgB,EAAE,CAAC;AAClD,SAAO;AACT;",
|
||||||
|
"names": []
|
||||||
|
}
|
||||||
130
node_modules/.vite/deps/chunk-6Y7C6NBJ.js
generated
vendored
Normal file
130
node_modules/.vite/deps/chunk-6Y7C6NBJ.js
generated
vendored
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
import {
|
||||||
|
get
|
||||||
|
} from "./chunk-A3RXLHYB.js";
|
||||||
|
import {
|
||||||
|
Object_default
|
||||||
|
} from "./chunk-Q5ZULJHM.js";
|
||||||
|
|
||||||
|
// node_modules/ol/source/Source.js
|
||||||
|
var Source = class extends Object_default {
|
||||||
|
/**
|
||||||
|
* @param {Options} options Source options.
|
||||||
|
*/
|
||||||
|
constructor(options) {
|
||||||
|
super();
|
||||||
|
this.projection = get(options.projection);
|
||||||
|
this.attributions_ = adaptAttributions(options.attributions);
|
||||||
|
this.attributionsCollapsible_ = options.attributionsCollapsible ?? true;
|
||||||
|
this.loading = false;
|
||||||
|
this.state_ = options.state !== void 0 ? options.state : "ready";
|
||||||
|
this.wrapX_ = options.wrapX !== void 0 ? options.wrapX : false;
|
||||||
|
this.interpolate_ = !!options.interpolate;
|
||||||
|
this.viewResolver = null;
|
||||||
|
this.viewRejector = null;
|
||||||
|
const self = this;
|
||||||
|
this.viewPromise_ = new Promise(function(resolve, reject) {
|
||||||
|
self.viewResolver = resolve;
|
||||||
|
self.viewRejector = reject;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Get the attribution function for the source.
|
||||||
|
* @return {?Attribution} Attribution function.
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
getAttributions() {
|
||||||
|
return this.attributions_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @return {boolean} Attributions are collapsible.
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
getAttributionsCollapsible() {
|
||||||
|
return this.attributionsCollapsible_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Get the projection of the source.
|
||||||
|
* @return {import("../proj/Projection.js").default|null} Projection.
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
getProjection() {
|
||||||
|
return this.projection;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param {import("../proj/Projection").default} [projection] Projection.
|
||||||
|
* @return {Array<number>|null} Resolutions.
|
||||||
|
*/
|
||||||
|
getResolutions(projection) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @return {Promise<import("../View.js").ViewOptions>} A promise for view-related properties.
|
||||||
|
*/
|
||||||
|
getView() {
|
||||||
|
return this.viewPromise_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Get the state of the source, see {@link import("./Source.js").State} for possible states.
|
||||||
|
* @return {import("./Source.js").State} State.
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
getState() {
|
||||||
|
return this.state_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @return {boolean|undefined} Wrap X.
|
||||||
|
*/
|
||||||
|
getWrapX() {
|
||||||
|
return this.wrapX_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @return {boolean} Use linear interpolation when resampling.
|
||||||
|
*/
|
||||||
|
getInterpolate() {
|
||||||
|
return this.interpolate_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Refreshes the source. The source will be cleared, and data from the server will be reloaded.
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
refresh() {
|
||||||
|
this.changed();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Set the attributions of the source.
|
||||||
|
* @param {AttributionLike|undefined} attributions Attributions.
|
||||||
|
* Can be passed as `string`, `Array<string>`, {@link module:ol/source/Source~Attribution},
|
||||||
|
* or `undefined`.
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
setAttributions(attributions) {
|
||||||
|
this.attributions_ = adaptAttributions(attributions);
|
||||||
|
this.changed();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Set the state of the source.
|
||||||
|
* @param {import("./Source.js").State} state State.
|
||||||
|
*/
|
||||||
|
setState(state) {
|
||||||
|
this.state_ = state;
|
||||||
|
this.changed();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
function adaptAttributions(attributionLike) {
|
||||||
|
if (!attributionLike) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if (typeof attributionLike === "function") {
|
||||||
|
return attributionLike;
|
||||||
|
}
|
||||||
|
if (!Array.isArray(attributionLike)) {
|
||||||
|
attributionLike = [attributionLike];
|
||||||
|
}
|
||||||
|
return (frameState) => attributionLike;
|
||||||
|
}
|
||||||
|
var Source_default = Source;
|
||||||
|
|
||||||
|
export {
|
||||||
|
Source_default
|
||||||
|
};
|
||||||
|
//# sourceMappingURL=chunk-6Y7C6NBJ.js.map
|
||||||
7
node_modules/.vite/deps/chunk-6Y7C6NBJ.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-6Y7C6NBJ.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1907
node_modules/.vite/deps/chunk-7JXPN73Q.js
generated
vendored
Normal file
1907
node_modules/.vite/deps/chunk-7JXPN73Q.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
node_modules/.vite/deps/chunk-7JXPN73Q.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-7JXPN73Q.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1357
node_modules/.vite/deps/chunk-7XMWB3J4.js
generated
vendored
Normal file
1357
node_modules/.vite/deps/chunk-7XMWB3J4.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
node_modules/.vite/deps/chunk-7XMWB3J4.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-7XMWB3J4.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1089
node_modules/.vite/deps/chunk-A3RXLHYB.js
generated
vendored
Normal file
1089
node_modules/.vite/deps/chunk-A3RXLHYB.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
node_modules/.vite/deps/chunk-A3RXLHYB.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-A3RXLHYB.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
329
node_modules/.vite/deps/chunk-AYBYZSAV.js
generated
vendored
Normal file
329
node_modules/.vite/deps/chunk-AYBYZSAV.js
generated
vendored
Normal file
@ -0,0 +1,329 @@
|
|||||||
|
import {
|
||||||
|
assert
|
||||||
|
} from "./chunk-QFCIXVZ3.js";
|
||||||
|
import {
|
||||||
|
clamp
|
||||||
|
} from "./chunk-54BTDBAD.js";
|
||||||
|
import {
|
||||||
|
Object_default,
|
||||||
|
abstract
|
||||||
|
} from "./chunk-Q5ZULJHM.js";
|
||||||
|
|
||||||
|
// node_modules/ol/layer/Property.js
|
||||||
|
var Property_default = {
|
||||||
|
OPACITY: "opacity",
|
||||||
|
VISIBLE: "visible",
|
||||||
|
EXTENT: "extent",
|
||||||
|
Z_INDEX: "zIndex",
|
||||||
|
MAX_RESOLUTION: "maxResolution",
|
||||||
|
MIN_RESOLUTION: "minResolution",
|
||||||
|
MAX_ZOOM: "maxZoom",
|
||||||
|
MIN_ZOOM: "minZoom",
|
||||||
|
SOURCE: "source",
|
||||||
|
MAP: "map"
|
||||||
|
};
|
||||||
|
|
||||||
|
// node_modules/ol/layer/Base.js
|
||||||
|
var BaseLayer = class extends Object_default {
|
||||||
|
/**
|
||||||
|
* @param {Options} options Layer options.
|
||||||
|
*/
|
||||||
|
constructor(options) {
|
||||||
|
super();
|
||||||
|
this.on;
|
||||||
|
this.once;
|
||||||
|
this.un;
|
||||||
|
this.background_ = options.background;
|
||||||
|
const properties = Object.assign({}, options);
|
||||||
|
if (typeof options.properties === "object") {
|
||||||
|
delete properties.properties;
|
||||||
|
Object.assign(properties, options.properties);
|
||||||
|
}
|
||||||
|
properties[Property_default.OPACITY] = options.opacity !== void 0 ? options.opacity : 1;
|
||||||
|
assert(
|
||||||
|
typeof properties[Property_default.OPACITY] === "number",
|
||||||
|
"Layer opacity must be a number"
|
||||||
|
);
|
||||||
|
properties[Property_default.VISIBLE] = options.visible !== void 0 ? options.visible : true;
|
||||||
|
properties[Property_default.Z_INDEX] = options.zIndex;
|
||||||
|
properties[Property_default.MAX_RESOLUTION] = options.maxResolution !== void 0 ? options.maxResolution : Infinity;
|
||||||
|
properties[Property_default.MIN_RESOLUTION] = options.minResolution !== void 0 ? options.minResolution : 0;
|
||||||
|
properties[Property_default.MIN_ZOOM] = options.minZoom !== void 0 ? options.minZoom : -Infinity;
|
||||||
|
properties[Property_default.MAX_ZOOM] = options.maxZoom !== void 0 ? options.maxZoom : Infinity;
|
||||||
|
this.className_ = properties.className !== void 0 ? properties.className : "ol-layer";
|
||||||
|
delete properties.className;
|
||||||
|
this.setProperties(properties);
|
||||||
|
this.state_ = null;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Get the background for this layer.
|
||||||
|
* @return {BackgroundColor|false} Layer background.
|
||||||
|
*/
|
||||||
|
getBackground() {
|
||||||
|
return this.background_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @return {string} CSS class name.
|
||||||
|
*/
|
||||||
|
getClassName() {
|
||||||
|
return this.className_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* This method is not meant to be called by layers or layer renderers because the state
|
||||||
|
* is incorrect if the layer is included in a layer group.
|
||||||
|
*
|
||||||
|
* @param {boolean} [managed] Layer is managed.
|
||||||
|
* @return {import("./Layer.js").State} Layer state.
|
||||||
|
*/
|
||||||
|
getLayerState(managed) {
|
||||||
|
const state = this.state_ || /** @type {?} */
|
||||||
|
{
|
||||||
|
layer: this,
|
||||||
|
managed: managed === void 0 ? true : managed
|
||||||
|
};
|
||||||
|
const zIndex = this.getZIndex();
|
||||||
|
state.opacity = clamp(Math.round(this.getOpacity() * 100) / 100, 0, 1);
|
||||||
|
state.visible = this.getVisible();
|
||||||
|
state.extent = this.getExtent();
|
||||||
|
state.zIndex = zIndex === void 0 && !state.managed ? Infinity : zIndex;
|
||||||
|
state.maxResolution = this.getMaxResolution();
|
||||||
|
state.minResolution = Math.max(this.getMinResolution(), 0);
|
||||||
|
state.minZoom = this.getMinZoom();
|
||||||
|
state.maxZoom = this.getMaxZoom();
|
||||||
|
this.state_ = state;
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @abstract
|
||||||
|
* @param {Array<import("./Layer.js").default>} [array] Array of layers (to be
|
||||||
|
* modified in place).
|
||||||
|
* @return {Array<import("./Layer.js").default>} Array of layers.
|
||||||
|
*/
|
||||||
|
getLayersArray(array) {
|
||||||
|
return abstract();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @abstract
|
||||||
|
* @param {Array<import("./Layer.js").State>} [states] Optional list of layer
|
||||||
|
* states (to be modified in place).
|
||||||
|
* @return {Array<import("./Layer.js").State>} List of layer states.
|
||||||
|
*/
|
||||||
|
getLayerStatesArray(states) {
|
||||||
|
return abstract();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Return the {@link module:ol/extent~Extent extent} of the layer or `undefined` if it
|
||||||
|
* will be visible regardless of extent.
|
||||||
|
* @return {import("../extent.js").Extent|undefined} The layer extent.
|
||||||
|
* @observable
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
getExtent() {
|
||||||
|
return (
|
||||||
|
/** @type {import("../extent.js").Extent|undefined} */
|
||||||
|
this.get(Property_default.EXTENT)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Return the maximum resolution of the layer. Returns Infinity if
|
||||||
|
* the layer has no maximum resolution set.
|
||||||
|
* @return {number} The maximum resolution of the layer.
|
||||||
|
* @observable
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
getMaxResolution() {
|
||||||
|
return (
|
||||||
|
/** @type {number} */
|
||||||
|
this.get(Property_default.MAX_RESOLUTION)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Return the minimum resolution of the layer. Returns 0 if
|
||||||
|
* the layer has no minimum resolution set.
|
||||||
|
* @return {number} The minimum resolution of the layer.
|
||||||
|
* @observable
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
getMinResolution() {
|
||||||
|
return (
|
||||||
|
/** @type {number} */
|
||||||
|
this.get(Property_default.MIN_RESOLUTION)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Return the minimum zoom level of the layer. Returns -Infinity if
|
||||||
|
* the layer has no minimum zoom set.
|
||||||
|
* @return {number} The minimum zoom level of the layer.
|
||||||
|
* @observable
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
getMinZoom() {
|
||||||
|
return (
|
||||||
|
/** @type {number} */
|
||||||
|
this.get(Property_default.MIN_ZOOM)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Return the maximum zoom level of the layer. Returns Infinity if
|
||||||
|
* the layer has no maximum zoom set.
|
||||||
|
* @return {number} The maximum zoom level of the layer.
|
||||||
|
* @observable
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
getMaxZoom() {
|
||||||
|
return (
|
||||||
|
/** @type {number} */
|
||||||
|
this.get(Property_default.MAX_ZOOM)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Return the opacity of the layer (between 0 and 1).
|
||||||
|
* @return {number} The opacity of the layer.
|
||||||
|
* @observable
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
getOpacity() {
|
||||||
|
return (
|
||||||
|
/** @type {number} */
|
||||||
|
this.get(Property_default.OPACITY)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @abstract
|
||||||
|
* @return {import("../source/Source.js").State} Source state.
|
||||||
|
*/
|
||||||
|
getSourceState() {
|
||||||
|
return abstract();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Return the value of this layer's `visible` property. To find out whether the layer
|
||||||
|
* is visible on a map, use `isVisible()` instead.
|
||||||
|
* @return {boolean} The value of the `visible` property of the layer.
|
||||||
|
* @observable
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
getVisible() {
|
||||||
|
return (
|
||||||
|
/** @type {boolean} */
|
||||||
|
this.get(Property_default.VISIBLE)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Return the Z-index of the layer, which is used to order layers before
|
||||||
|
* rendering. Returns undefined if the layer is unmanaged.
|
||||||
|
* @return {number|undefined} The Z-index of the layer.
|
||||||
|
* @observable
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
getZIndex() {
|
||||||
|
return (
|
||||||
|
/** @type {number|undefined} */
|
||||||
|
this.get(Property_default.Z_INDEX)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Sets the background color.
|
||||||
|
* @param {BackgroundColor} [background] Background color.
|
||||||
|
*/
|
||||||
|
setBackground(background) {
|
||||||
|
this.background_ = background;
|
||||||
|
this.changed();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Set the extent at which the layer is visible. If `undefined`, the layer
|
||||||
|
* will be visible at all extents.
|
||||||
|
* @param {import("../extent.js").Extent|undefined} extent The extent of the layer.
|
||||||
|
* @observable
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
setExtent(extent) {
|
||||||
|
this.set(Property_default.EXTENT, extent);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Set the maximum resolution at which the layer is visible.
|
||||||
|
* @param {number} maxResolution The maximum resolution of the layer.
|
||||||
|
* @observable
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
setMaxResolution(maxResolution) {
|
||||||
|
this.set(Property_default.MAX_RESOLUTION, maxResolution);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Set the minimum resolution at which the layer is visible.
|
||||||
|
* @param {number} minResolution The minimum resolution of the layer.
|
||||||
|
* @observable
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
setMinResolution(minResolution) {
|
||||||
|
this.set(Property_default.MIN_RESOLUTION, minResolution);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Set the maximum zoom (exclusive) at which the layer is visible.
|
||||||
|
* Note that the zoom levels for layer visibility are based on the
|
||||||
|
* view zoom level, which may be different from a tile source zoom level.
|
||||||
|
* @param {number} maxZoom The maximum zoom of the layer.
|
||||||
|
* @observable
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
setMaxZoom(maxZoom) {
|
||||||
|
this.set(Property_default.MAX_ZOOM, maxZoom);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Set the minimum zoom (inclusive) at which the layer is visible.
|
||||||
|
* Note that the zoom levels for layer visibility are based on the
|
||||||
|
* view zoom level, which may be different from a tile source zoom level.
|
||||||
|
* @param {number} minZoom The minimum zoom of the layer.
|
||||||
|
* @observable
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
setMinZoom(minZoom) {
|
||||||
|
this.set(Property_default.MIN_ZOOM, minZoom);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Set the opacity of the layer, allowed values range from 0 to 1.
|
||||||
|
* @param {number} opacity The opacity of the layer.
|
||||||
|
* @observable
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
setOpacity(opacity) {
|
||||||
|
assert(typeof opacity === "number", "Layer opacity must be a number");
|
||||||
|
this.set(Property_default.OPACITY, opacity);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Set the visibility of the layer (`true` or `false`).
|
||||||
|
* @param {boolean} visible The visibility of the layer.
|
||||||
|
* @observable
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
setVisible(visible) {
|
||||||
|
this.set(Property_default.VISIBLE, visible);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Set Z-index of the layer, which is used to order layers before rendering.
|
||||||
|
* The default Z-index is 0.
|
||||||
|
* @param {number} zindex The z-index of the layer.
|
||||||
|
* @observable
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
setZIndex(zindex) {
|
||||||
|
this.set(Property_default.Z_INDEX, zindex);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Clean up.
|
||||||
|
* @override
|
||||||
|
*/
|
||||||
|
disposeInternal() {
|
||||||
|
if (this.state_) {
|
||||||
|
this.state_.layer = null;
|
||||||
|
this.state_ = null;
|
||||||
|
}
|
||||||
|
super.disposeInternal();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var Base_default = BaseLayer;
|
||||||
|
|
||||||
|
export {
|
||||||
|
Property_default,
|
||||||
|
Base_default
|
||||||
|
};
|
||||||
|
//# sourceMappingURL=chunk-AYBYZSAV.js.map
|
||||||
7
node_modules/.vite/deps/chunk-AYBYZSAV.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-AYBYZSAV.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
2010
node_modules/.vite/deps/chunk-AZGMK675.js
generated
vendored
Normal file
2010
node_modules/.vite/deps/chunk-AZGMK675.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
node_modules/.vite/deps/chunk-AZGMK675.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-AZGMK675.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
38
node_modules/.vite/deps/chunk-BHVDQB66.js
generated
vendored
Normal file
38
node_modules/.vite/deps/chunk-BHVDQB66.js
generated
vendored
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
// node_modules/ol/MapEventType.js
|
||||||
|
var MapEventType_default = {
|
||||||
|
/**
|
||||||
|
* Triggered after a map frame is rendered.
|
||||||
|
* @event module:ol/MapEvent~MapEvent#postrender
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
POSTRENDER: "postrender",
|
||||||
|
/**
|
||||||
|
* Triggered when the map starts moving.
|
||||||
|
* @event module:ol/MapEvent~MapEvent#movestart
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
MOVESTART: "movestart",
|
||||||
|
/**
|
||||||
|
* Triggered after the map is moved.
|
||||||
|
* @event module:ol/MapEvent~MapEvent#moveend
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
MOVEEND: "moveend",
|
||||||
|
/**
|
||||||
|
* Triggered when loading of additional map data (tiles, images, features) starts.
|
||||||
|
* @event module:ol/MapEvent~MapEvent#loadstart
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
LOADSTART: "loadstart",
|
||||||
|
/**
|
||||||
|
* Triggered when loading of additional map data has completed.
|
||||||
|
* @event module:ol/MapEvent~MapEvent#loadend
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
LOADEND: "loadend"
|
||||||
|
};
|
||||||
|
|
||||||
|
export {
|
||||||
|
MapEventType_default
|
||||||
|
};
|
||||||
|
//# sourceMappingURL=chunk-BHVDQB66.js.map
|
||||||
7
node_modules/.vite/deps/chunk-BHVDQB66.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-BHVDQB66.js.map
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"sources": ["../../ol/MapEventType.js"],
|
||||||
|
"sourcesContent": ["/**\n * @module ol/MapEventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n /**\n * Triggered after a map frame is rendered.\n * @event module:ol/MapEvent~MapEvent#postrender\n * @api\n */\n POSTRENDER: 'postrender',\n\n /**\n * Triggered when the map starts moving.\n * @event module:ol/MapEvent~MapEvent#movestart\n * @api\n */\n MOVESTART: 'movestart',\n\n /**\n * Triggered after the map is moved.\n * @event module:ol/MapEvent~MapEvent#moveend\n * @api\n */\n MOVEEND: 'moveend',\n\n /**\n * Triggered when loading of additional map data (tiles, images, features) starts.\n * @event module:ol/MapEvent~MapEvent#loadstart\n * @api\n */\n LOADSTART: 'loadstart',\n\n /**\n * Triggered when loading of additional map data has completed.\n * @event module:ol/MapEvent~MapEvent#loadend\n * @api\n */\n LOADEND: 'loadend',\n};\n\n/***\n * @typedef {'postrender'|'movestart'|'moveend'|'loadstart'|'loadend'} Types\n */\n"],
|
||||||
|
"mappings": ";AAOA,IAAO,uBAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMb,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOZ,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOX,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOT,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOX,SAAS;AACX;",
|
||||||
|
"names": []
|
||||||
|
}
|
||||||
114
node_modules/.vite/deps/chunk-C5KGH6RQ.js
generated
vendored
Normal file
114
node_modules/.vite/deps/chunk-C5KGH6RQ.js
generated
vendored
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
// node_modules/geotiff/dist-module/predictor.js
|
||||||
|
function decodeRowAcc(row, stride) {
|
||||||
|
let length = row.length - stride;
|
||||||
|
let offset = 0;
|
||||||
|
do {
|
||||||
|
for (let i = stride; i > 0; i--) {
|
||||||
|
row[offset + stride] += row[offset];
|
||||||
|
offset++;
|
||||||
|
}
|
||||||
|
length -= stride;
|
||||||
|
} while (length > 0);
|
||||||
|
}
|
||||||
|
function decodeRowFloatingPoint(row, stride, bytesPerSample) {
|
||||||
|
let index = 0;
|
||||||
|
let count = row.length;
|
||||||
|
const wc = count / bytesPerSample;
|
||||||
|
while (count > stride) {
|
||||||
|
for (let i = stride; i > 0; --i) {
|
||||||
|
row[index + stride] += row[index];
|
||||||
|
++index;
|
||||||
|
}
|
||||||
|
count -= stride;
|
||||||
|
}
|
||||||
|
const copy = row.slice();
|
||||||
|
for (let i = 0; i < wc; ++i) {
|
||||||
|
for (let b = 0; b < bytesPerSample; ++b) {
|
||||||
|
row[bytesPerSample * i + b] = copy[(bytesPerSample - b - 1) * wc + i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function applyPredictor(block, predictor, width, height, bitsPerSample, planarConfiguration) {
|
||||||
|
if (!predictor || predictor === 1) {
|
||||||
|
return block;
|
||||||
|
}
|
||||||
|
for (let i = 0; i < bitsPerSample.length; ++i) {
|
||||||
|
if (bitsPerSample[i] % 8 !== 0) {
|
||||||
|
throw new Error("When decoding with predictor, only multiple of 8 bits are supported.");
|
||||||
|
}
|
||||||
|
if (bitsPerSample[i] !== bitsPerSample[0]) {
|
||||||
|
throw new Error("When decoding with predictor, all samples must have the same size.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const bytesPerSample = bitsPerSample[0] / 8;
|
||||||
|
const stride = planarConfiguration === 2 ? 1 : bitsPerSample.length;
|
||||||
|
for (let i = 0; i < height; ++i) {
|
||||||
|
if (i * stride * width * bytesPerSample >= block.byteLength) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
let row;
|
||||||
|
if (predictor === 2) {
|
||||||
|
switch (bitsPerSample[0]) {
|
||||||
|
case 8:
|
||||||
|
row = new Uint8Array(
|
||||||
|
block,
|
||||||
|
i * stride * width * bytesPerSample,
|
||||||
|
stride * width * bytesPerSample
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
case 16:
|
||||||
|
row = new Uint16Array(
|
||||||
|
block,
|
||||||
|
i * stride * width * bytesPerSample,
|
||||||
|
stride * width * bytesPerSample / 2
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
case 32:
|
||||||
|
row = new Uint32Array(
|
||||||
|
block,
|
||||||
|
i * stride * width * bytesPerSample,
|
||||||
|
stride * width * bytesPerSample / 4
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new Error(`Predictor 2 not allowed with ${bitsPerSample[0]} bits per sample.`);
|
||||||
|
}
|
||||||
|
decodeRowAcc(row, stride, bytesPerSample);
|
||||||
|
} else if (predictor === 3) {
|
||||||
|
row = new Uint8Array(
|
||||||
|
block,
|
||||||
|
i * stride * width * bytesPerSample,
|
||||||
|
stride * width * bytesPerSample
|
||||||
|
);
|
||||||
|
decodeRowFloatingPoint(row, stride, bytesPerSample);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return block;
|
||||||
|
}
|
||||||
|
|
||||||
|
// node_modules/geotiff/dist-module/compression/basedecoder.js
|
||||||
|
var BaseDecoder = class {
|
||||||
|
async decode(fileDirectory, buffer) {
|
||||||
|
const decoded = await this.decodeBlock(buffer);
|
||||||
|
const predictor = fileDirectory.Predictor || 1;
|
||||||
|
if (predictor !== 1) {
|
||||||
|
const isTiled = !fileDirectory.StripOffsets;
|
||||||
|
const tileWidth = isTiled ? fileDirectory.TileWidth : fileDirectory.ImageWidth;
|
||||||
|
const tileHeight = isTiled ? fileDirectory.TileLength : fileDirectory.RowsPerStrip || fileDirectory.ImageLength;
|
||||||
|
return applyPredictor(
|
||||||
|
decoded,
|
||||||
|
predictor,
|
||||||
|
tileWidth,
|
||||||
|
tileHeight,
|
||||||
|
fileDirectory.BitsPerSample,
|
||||||
|
fileDirectory.PlanarConfiguration
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return decoded;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export {
|
||||||
|
BaseDecoder
|
||||||
|
};
|
||||||
|
//# sourceMappingURL=chunk-C5KGH6RQ.js.map
|
||||||
7
node_modules/.vite/deps/chunk-C5KGH6RQ.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-C5KGH6RQ.js.map
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"sources": ["../../geotiff/dist-module/predictor.js", "../../geotiff/dist-module/compression/basedecoder.js"],
|
||||||
|
"sourcesContent": ["function decodeRowAcc(row, stride) {\n let length = row.length - stride;\n let offset = 0;\n do {\n for (let i = stride; i > 0; i--) {\n row[offset + stride] += row[offset];\n offset++;\n }\n\n length -= stride;\n } while (length > 0);\n}\n\nfunction decodeRowFloatingPoint(row, stride, bytesPerSample) {\n let index = 0;\n let count = row.length;\n const wc = count / bytesPerSample;\n\n while (count > stride) {\n for (let i = stride; i > 0; --i) {\n row[index + stride] += row[index];\n ++index;\n }\n count -= stride;\n }\n\n const copy = row.slice();\n for (let i = 0; i < wc; ++i) {\n for (let b = 0; b < bytesPerSample; ++b) {\n row[(bytesPerSample * i) + b] = copy[((bytesPerSample - b - 1) * wc) + i];\n }\n }\n}\n\nexport function applyPredictor(block, predictor, width, height, bitsPerSample,\n planarConfiguration) {\n if (!predictor || predictor === 1) {\n return block;\n }\n\n for (let i = 0; i < bitsPerSample.length; ++i) {\n if (bitsPerSample[i] % 8 !== 0) {\n throw new Error('When decoding with predictor, only multiple of 8 bits are supported.');\n }\n if (bitsPerSample[i] !== bitsPerSample[0]) {\n throw new Error('When decoding with predictor, all samples must have the same size.');\n }\n }\n\n const bytesPerSample = bitsPerSample[0] / 8;\n const stride = planarConfiguration === 2 ? 1 : bitsPerSample.length;\n\n for (let i = 0; i < height; ++i) {\n // Last strip will be truncated if height % stripHeight != 0\n if (i * stride * width * bytesPerSample >= block.byteLength) {\n break;\n }\n let row;\n if (predictor === 2) { // horizontal prediction\n switch (bitsPerSample[0]) {\n case 8:\n row = new Uint8Array(\n block, i * stride * width * bytesPerSample, stride * width * bytesPerSample,\n );\n break;\n case 16:\n row = new Uint16Array(\n block, i * stride * width * bytesPerSample, stride * width * bytesPerSample / 2,\n );\n break;\n case 32:\n row = new Uint32Array(\n block, i * stride * width * bytesPerSample, stride * width * bytesPerSample / 4,\n );\n break;\n default:\n throw new Error(`Predictor 2 not allowed with ${bitsPerSample[0]} bits per sample.`);\n }\n decodeRowAcc(row, stride, bytesPerSample);\n } else if (predictor === 3) { // horizontal floating point\n row = new Uint8Array(\n block, i * stride * width * bytesPerSample, stride * width * bytesPerSample,\n );\n decodeRowFloatingPoint(row, stride, bytesPerSample);\n }\n }\n return block;\n}\n", "import { applyPredictor } from '../predictor.js';\n\nexport default class BaseDecoder {\n async decode(fileDirectory, buffer) {\n const decoded = await this.decodeBlock(buffer);\n const predictor = fileDirectory.Predictor || 1;\n if (predictor !== 1) {\n const isTiled = !fileDirectory.StripOffsets;\n const tileWidth = isTiled ? fileDirectory.TileWidth : fileDirectory.ImageWidth;\n const tileHeight = isTiled ? fileDirectory.TileLength : (\n fileDirectory.RowsPerStrip || fileDirectory.ImageLength\n );\n return applyPredictor(\n decoded, predictor, tileWidth, tileHeight, fileDirectory.BitsPerSample,\n fileDirectory.PlanarConfiguration,\n );\n }\n return decoded;\n }\n}\n"],
|
||||||
|
"mappings": ";AAAA,SAAS,aAAa,KAAK,QAAQ;AACjC,MAAI,SAAS,IAAI,SAAS;AAC1B,MAAI,SAAS;AACb,KAAG;AACD,aAAS,IAAI,QAAQ,IAAI,GAAG,KAAK;AAC/B,UAAI,SAAS,MAAM,KAAK,IAAI,MAAM;AAClC;AAAA,IACF;AAEA,cAAU;AAAA,EACZ,SAAS,SAAS;AACpB;AAEA,SAAS,uBAAuB,KAAK,QAAQ,gBAAgB;AAC3D,MAAI,QAAQ;AACZ,MAAI,QAAQ,IAAI;AAChB,QAAM,KAAK,QAAQ;AAEnB,SAAO,QAAQ,QAAQ;AACrB,aAAS,IAAI,QAAQ,IAAI,GAAG,EAAE,GAAG;AAC/B,UAAI,QAAQ,MAAM,KAAK,IAAI,KAAK;AAChC,QAAE;AAAA,IACJ;AACA,aAAS;AAAA,EACX;AAEA,QAAM,OAAO,IAAI,MAAM;AACvB,WAAS,IAAI,GAAG,IAAI,IAAI,EAAE,GAAG;AAC3B,aAAS,IAAI,GAAG,IAAI,gBAAgB,EAAE,GAAG;AACvC,UAAK,iBAAiB,IAAK,CAAC,IAAI,MAAO,iBAAiB,IAAI,KAAK,KAAM,CAAC;AAAA,IAC1E;AAAA,EACF;AACF;AAEO,SAAS,eAAe,OAAO,WAAW,OAAO,QAAQ,eAC9D,qBAAqB;AACrB,MAAI,CAAC,aAAa,cAAc,GAAG;AACjC,WAAO;AAAA,EACT;AAEA,WAAS,IAAI,GAAG,IAAI,cAAc,QAAQ,EAAE,GAAG;AAC7C,QAAI,cAAc,CAAC,IAAI,MAAM,GAAG;AAC9B,YAAM,IAAI,MAAM,sEAAsE;AAAA,IACxF;AACA,QAAI,cAAc,CAAC,MAAM,cAAc,CAAC,GAAG;AACzC,YAAM,IAAI,MAAM,oEAAoE;AAAA,IACtF;AAAA,EACF;AAEA,QAAM,iBAAiB,cAAc,CAAC,IAAI;AAC1C,QAAM,SAAS,wBAAwB,IAAI,IAAI,cAAc;AAE7D,WAAS,IAAI,GAAG,IAAI,QAAQ,EAAE,GAAG;AAE/B,QAAI,IAAI,SAAS,QAAQ,kBAAkB,MAAM,YAAY;AAC3D;AAAA,IACF;AACA,QAAI;AACJ,QAAI,cAAc,GAAG;AACnB,cAAQ,cAAc,CAAC,GAAG;AAAA,QACxB,KAAK;AACH,gBAAM,IAAI;AAAA,YACR;AAAA,YAAO,IAAI,SAAS,QAAQ;AAAA,YAAgB,SAAS,QAAQ;AAAA,UAC/D;AACA;AAAA,QACF,KAAK;AACH,gBAAM,IAAI;AAAA,YACR;AAAA,YAAO,IAAI,SAAS,QAAQ;AAAA,YAAgB,SAAS,QAAQ,iBAAiB;AAAA,UAChF;AACA;AAAA,QACF,KAAK;AACH,gBAAM,IAAI;AAAA,YACR;AAAA,YAAO,IAAI,SAAS,QAAQ;AAAA,YAAgB,SAAS,QAAQ,iBAAiB;AAAA,UAChF;AACA;AAAA,QACF;AACE,gBAAM,IAAI,MAAM,gCAAgC,cAAc,CAAC,CAAC,mBAAmB;AAAA,MACvF;AACA,mBAAa,KAAK,QAAQ,cAAc;AAAA,IAC1C,WAAW,cAAc,GAAG;AAC1B,YAAM,IAAI;AAAA,QACR;AAAA,QAAO,IAAI,SAAS,QAAQ;AAAA,QAAgB,SAAS,QAAQ;AAAA,MAC/D;AACA,6BAAuB,KAAK,QAAQ,cAAc;AAAA,IACpD;AAAA,EACF;AACA,SAAO;AACT;;;ACrFA,IAAqB,cAArB,MAAiC;AAAA,EAC/B,MAAM,OAAO,eAAe,QAAQ;AAClC,UAAM,UAAU,MAAM,KAAK,YAAY,MAAM;AAC7C,UAAM,YAAY,cAAc,aAAa;AAC7C,QAAI,cAAc,GAAG;AACnB,YAAM,UAAU,CAAC,cAAc;AAC/B,YAAM,YAAY,UAAU,cAAc,YAAY,cAAc;AACpE,YAAM,aAAa,UAAU,cAAc,aACzC,cAAc,gBAAgB,cAAc;AAE9C,aAAO;AAAA,QACL;AAAA,QAAS;AAAA,QAAW;AAAA,QAAW;AAAA,QAAY,cAAc;AAAA,QACzD,cAAc;AAAA,MAChB;AAAA,IACF;AACA,WAAO;AAAA,EACT;AACF;",
|
||||||
|
"names": []
|
||||||
|
}
|
||||||
397
node_modules/.vite/deps/chunk-C6SRSVJF.js
generated
vendored
Normal file
397
node_modules/.vite/deps/chunk-C6SRSVJF.js
generated
vendored
Normal file
@ -0,0 +1,397 @@
|
|||||||
|
import {
|
||||||
|
MapEventType_default
|
||||||
|
} from "./chunk-BHVDQB66.js";
|
||||||
|
import {
|
||||||
|
CLASS_SELECTABLE
|
||||||
|
} from "./chunk-6EWLK2BW.js";
|
||||||
|
import {
|
||||||
|
outerHeight,
|
||||||
|
outerWidth,
|
||||||
|
removeChildren
|
||||||
|
} from "./chunk-UPTVWZ45.js";
|
||||||
|
import {
|
||||||
|
Object_default
|
||||||
|
} from "./chunk-Q5ZULJHM.js";
|
||||||
|
import {
|
||||||
|
listen,
|
||||||
|
unlistenByKey
|
||||||
|
} from "./chunk-NGFXCWUF.js";
|
||||||
|
import {
|
||||||
|
containsExtent
|
||||||
|
} from "./chunk-SRXHWJOY.js";
|
||||||
|
|
||||||
|
// node_modules/ol/Overlay.js
|
||||||
|
var Property = {
|
||||||
|
ELEMENT: "element",
|
||||||
|
MAP: "map",
|
||||||
|
OFFSET: "offset",
|
||||||
|
POSITION: "position",
|
||||||
|
POSITIONING: "positioning"
|
||||||
|
};
|
||||||
|
var Overlay = class extends Object_default {
|
||||||
|
/**
|
||||||
|
* @param {Options} options Overlay options.
|
||||||
|
*/
|
||||||
|
constructor(options) {
|
||||||
|
super();
|
||||||
|
this.on;
|
||||||
|
this.once;
|
||||||
|
this.un;
|
||||||
|
this.options = options;
|
||||||
|
this.id = options.id;
|
||||||
|
this.insertFirst = options.insertFirst !== void 0 ? options.insertFirst : true;
|
||||||
|
this.stopEvent = options.stopEvent !== void 0 ? options.stopEvent : true;
|
||||||
|
this.element = document.createElement("div");
|
||||||
|
this.element.className = options.className !== void 0 ? options.className : "ol-overlay-container " + CLASS_SELECTABLE;
|
||||||
|
this.element.style.position = "absolute";
|
||||||
|
this.element.style.pointerEvents = "auto";
|
||||||
|
this.autoPan = options.autoPan === true ? {} : options.autoPan || void 0;
|
||||||
|
this.rendered = {
|
||||||
|
transform_: "",
|
||||||
|
visible: true
|
||||||
|
};
|
||||||
|
this.mapPostrenderListenerKey = null;
|
||||||
|
this.addChangeListener(Property.ELEMENT, this.handleElementChanged);
|
||||||
|
this.addChangeListener(Property.MAP, this.handleMapChanged);
|
||||||
|
this.addChangeListener(Property.OFFSET, this.handleOffsetChanged);
|
||||||
|
this.addChangeListener(Property.POSITION, this.handlePositionChanged);
|
||||||
|
this.addChangeListener(Property.POSITIONING, this.handlePositioningChanged);
|
||||||
|
if (options.element !== void 0) {
|
||||||
|
this.setElement(options.element);
|
||||||
|
}
|
||||||
|
this.setOffset(options.offset !== void 0 ? options.offset : [0, 0]);
|
||||||
|
this.setPositioning(options.positioning || "top-left");
|
||||||
|
if (options.position !== void 0) {
|
||||||
|
this.setPosition(options.position);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Get the DOM element of this overlay.
|
||||||
|
* @return {HTMLElement|undefined} The Element containing the overlay.
|
||||||
|
* @observable
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
getElement() {
|
||||||
|
return (
|
||||||
|
/** @type {HTMLElement|undefined} */
|
||||||
|
this.get(Property.ELEMENT)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Get the overlay identifier which is set on constructor.
|
||||||
|
* @return {number|string|undefined} Id.
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
getId() {
|
||||||
|
return this.id;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Get the map associated with this overlay.
|
||||||
|
* @return {import("./Map.js").default|null} The map that the
|
||||||
|
* overlay is part of.
|
||||||
|
* @observable
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
getMap() {
|
||||||
|
return (
|
||||||
|
/** @type {import("./Map.js").default|null} */
|
||||||
|
this.get(Property.MAP) || null
|
||||||
|
);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Get the offset of this overlay.
|
||||||
|
* @return {Array<number>} The offset.
|
||||||
|
* @observable
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
getOffset() {
|
||||||
|
return (
|
||||||
|
/** @type {Array<number>} */
|
||||||
|
this.get(Property.OFFSET)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Get the current position of this overlay.
|
||||||
|
* @return {import("./coordinate.js").Coordinate|undefined} The spatial point that the overlay is
|
||||||
|
* anchored at.
|
||||||
|
* @observable
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
getPosition() {
|
||||||
|
return (
|
||||||
|
/** @type {import("./coordinate.js").Coordinate|undefined} */
|
||||||
|
this.get(Property.POSITION)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Get the current positioning of this overlay.
|
||||||
|
* @return {Positioning} How the overlay is positioned
|
||||||
|
* relative to its point on the map.
|
||||||
|
* @observable
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
getPositioning() {
|
||||||
|
return (
|
||||||
|
/** @type {Positioning} */
|
||||||
|
this.get(Property.POSITIONING)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
handleElementChanged() {
|
||||||
|
removeChildren(this.element);
|
||||||
|
const element = this.getElement();
|
||||||
|
if (element) {
|
||||||
|
this.element.appendChild(element);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
handleMapChanged() {
|
||||||
|
var _a;
|
||||||
|
if (this.mapPostrenderListenerKey) {
|
||||||
|
(_a = this.element) == null ? void 0 : _a.remove();
|
||||||
|
unlistenByKey(this.mapPostrenderListenerKey);
|
||||||
|
this.mapPostrenderListenerKey = null;
|
||||||
|
}
|
||||||
|
const map = this.getMap();
|
||||||
|
if (map) {
|
||||||
|
this.mapPostrenderListenerKey = listen(
|
||||||
|
map,
|
||||||
|
MapEventType_default.POSTRENDER,
|
||||||
|
this.render,
|
||||||
|
this
|
||||||
|
);
|
||||||
|
this.updatePixelPosition();
|
||||||
|
const container = this.stopEvent ? map.getOverlayContainerStopEvent() : map.getOverlayContainer();
|
||||||
|
if (this.insertFirst) {
|
||||||
|
container.insertBefore(this.element, container.childNodes[0] || null);
|
||||||
|
} else {
|
||||||
|
container.appendChild(this.element);
|
||||||
|
}
|
||||||
|
this.performAutoPan();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
render() {
|
||||||
|
this.updatePixelPosition();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
handleOffsetChanged() {
|
||||||
|
this.updatePixelPosition();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
handlePositionChanged() {
|
||||||
|
this.updatePixelPosition();
|
||||||
|
this.performAutoPan();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
handlePositioningChanged() {
|
||||||
|
this.updatePixelPosition();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Set the DOM element to be associated with this overlay.
|
||||||
|
* @param {HTMLElement|undefined} element The Element containing the overlay.
|
||||||
|
* @observable
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
setElement(element) {
|
||||||
|
this.set(Property.ELEMENT, element);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Set the map to be associated with this overlay.
|
||||||
|
* @param {import("./Map.js").default|null} map The map that the
|
||||||
|
* overlay is part of. Pass `null` to just remove the overlay from the current map.
|
||||||
|
* @observable
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
setMap(map) {
|
||||||
|
this.set(Property.MAP, map);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Set the offset for this overlay.
|
||||||
|
* @param {Array<number>} offset Offset.
|
||||||
|
* @observable
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
setOffset(offset) {
|
||||||
|
this.set(Property.OFFSET, offset);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Set the position for this overlay. If the position is `undefined` the
|
||||||
|
* overlay is hidden.
|
||||||
|
* @param {import("./coordinate.js").Coordinate|undefined} position The spatial point that the overlay
|
||||||
|
* is anchored at.
|
||||||
|
* @observable
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
setPosition(position) {
|
||||||
|
this.set(Property.POSITION, position);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Pan the map so that the overlay is entirely visible in the current viewport
|
||||||
|
* (if necessary) using the configured autoPan parameters
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
performAutoPan() {
|
||||||
|
if (this.autoPan) {
|
||||||
|
this.panIntoView(this.autoPan);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Pan the map so that the overlay is entirely visible in the current viewport
|
||||||
|
* (if necessary).
|
||||||
|
* @param {PanIntoViewOptions} [panIntoViewOptions] Options for the pan action
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
panIntoView(panIntoViewOptions) {
|
||||||
|
const map = this.getMap();
|
||||||
|
if (!map || !map.getTargetElement() || !this.get(Property.POSITION)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const mapRect = this.getRect(map.getTargetElement(), map.getSize());
|
||||||
|
const element = this.getElement();
|
||||||
|
const overlayRect = this.getRect(element, [
|
||||||
|
outerWidth(element),
|
||||||
|
outerHeight(element)
|
||||||
|
]);
|
||||||
|
panIntoViewOptions = panIntoViewOptions || {};
|
||||||
|
const myMargin = panIntoViewOptions.margin === void 0 ? 20 : panIntoViewOptions.margin;
|
||||||
|
if (!containsExtent(mapRect, overlayRect)) {
|
||||||
|
const offsetLeft = overlayRect[0] - mapRect[0];
|
||||||
|
const offsetRight = mapRect[2] - overlayRect[2];
|
||||||
|
const offsetTop = overlayRect[1] - mapRect[1];
|
||||||
|
const offsetBottom = mapRect[3] - overlayRect[3];
|
||||||
|
const delta = [0, 0];
|
||||||
|
if (offsetLeft < 0) {
|
||||||
|
delta[0] = offsetLeft - myMargin;
|
||||||
|
} else if (offsetRight < 0) {
|
||||||
|
delta[0] = Math.abs(offsetRight) + myMargin;
|
||||||
|
}
|
||||||
|
if (offsetTop < 0) {
|
||||||
|
delta[1] = offsetTop - myMargin;
|
||||||
|
} else if (offsetBottom < 0) {
|
||||||
|
delta[1] = Math.abs(offsetBottom) + myMargin;
|
||||||
|
}
|
||||||
|
if (delta[0] !== 0 || delta[1] !== 0) {
|
||||||
|
const center = (
|
||||||
|
/** @type {import("./coordinate.js").Coordinate} */
|
||||||
|
map.getView().getCenterInternal()
|
||||||
|
);
|
||||||
|
const centerPx = map.getPixelFromCoordinateInternal(center);
|
||||||
|
if (!centerPx) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const newCenterPx = [centerPx[0] + delta[0], centerPx[1] + delta[1]];
|
||||||
|
const panOptions = panIntoViewOptions.animation || {};
|
||||||
|
map.getView().animateInternal({
|
||||||
|
center: map.getCoordinateFromPixelInternal(newCenterPx),
|
||||||
|
duration: panOptions.duration,
|
||||||
|
easing: panOptions.easing
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Get the extent of an element relative to the document
|
||||||
|
* @param {HTMLElement} element The element.
|
||||||
|
* @param {import("./size.js").Size} size The size of the element.
|
||||||
|
* @return {import("./extent.js").Extent} The extent.
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
getRect(element, size) {
|
||||||
|
const box = element.getBoundingClientRect();
|
||||||
|
const offsetX = box.left + window.pageXOffset;
|
||||||
|
const offsetY = box.top + window.pageYOffset;
|
||||||
|
return [offsetX, offsetY, offsetX + size[0], offsetY + size[1]];
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Set the positioning for this overlay.
|
||||||
|
* @param {Positioning} positioning how the overlay is
|
||||||
|
* positioned relative to its point on the map.
|
||||||
|
* @observable
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
setPositioning(positioning) {
|
||||||
|
this.set(Property.POSITIONING, positioning);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Modify the visibility of the element.
|
||||||
|
* @param {boolean} visible Element visibility.
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
setVisible(visible) {
|
||||||
|
if (this.rendered.visible !== visible) {
|
||||||
|
this.element.style.display = visible ? "" : "none";
|
||||||
|
this.rendered.visible = visible;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Update pixel position.
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
updatePixelPosition() {
|
||||||
|
const map = this.getMap();
|
||||||
|
const position = this.getPosition();
|
||||||
|
if (!map || !map.isRendered() || !position) {
|
||||||
|
this.setVisible(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const pixel = map.getPixelFromCoordinate(position);
|
||||||
|
const mapSize = map.getSize();
|
||||||
|
this.updateRenderedPosition(pixel, mapSize);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param {import("./pixel.js").Pixel} pixel The pixel location.
|
||||||
|
* @param {import("./size.js").Size|undefined} mapSize The map size.
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
updateRenderedPosition(pixel, mapSize) {
|
||||||
|
const style = this.element.style;
|
||||||
|
const offset = this.getOffset();
|
||||||
|
const positioning = this.getPositioning();
|
||||||
|
this.setVisible(true);
|
||||||
|
const x = `${pixel[0] + offset[0]}px`;
|
||||||
|
const y = `${pixel[1] + offset[1]}px`;
|
||||||
|
let posX = "0%";
|
||||||
|
let posY = "0%";
|
||||||
|
if (positioning == "bottom-right" || positioning == "center-right" || positioning == "top-right") {
|
||||||
|
posX = "-100%";
|
||||||
|
} else if (positioning == "bottom-center" || positioning == "center-center" || positioning == "top-center") {
|
||||||
|
posX = "-50%";
|
||||||
|
}
|
||||||
|
if (positioning == "bottom-left" || positioning == "bottom-center" || positioning == "bottom-right") {
|
||||||
|
posY = "-100%";
|
||||||
|
} else if (positioning == "center-left" || positioning == "center-center" || positioning == "center-right") {
|
||||||
|
posY = "-50%";
|
||||||
|
}
|
||||||
|
const transform = `translate(${posX}, ${posY}) translate(${x}, ${y})`;
|
||||||
|
if (this.rendered.transform_ != transform) {
|
||||||
|
this.rendered.transform_ = transform;
|
||||||
|
style.transform = transform;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* returns the options this Overlay has been created with
|
||||||
|
* @return {Options} overlay options
|
||||||
|
*/
|
||||||
|
getOptions() {
|
||||||
|
return this.options;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var Overlay_default = Overlay;
|
||||||
|
|
||||||
|
export {
|
||||||
|
Overlay_default
|
||||||
|
};
|
||||||
|
//# sourceMappingURL=chunk-C6SRSVJF.js.map
|
||||||
7
node_modules/.vite/deps/chunk-C6SRSVJF.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-C6SRSVJF.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
308
node_modules/.vite/deps/chunk-CAVOO5JW.js
generated
vendored
Normal file
308
node_modules/.vite/deps/chunk-CAVOO5JW.js
generated
vendored
Normal file
@ -0,0 +1,308 @@
|
|||||||
|
import {
|
||||||
|
TileState_default
|
||||||
|
} from "./chunk-5D2XPBR2.js";
|
||||||
|
import {
|
||||||
|
assert
|
||||||
|
} from "./chunk-QFCIXVZ3.js";
|
||||||
|
import {
|
||||||
|
EventType_default
|
||||||
|
} from "./chunk-K25ZO44T.js";
|
||||||
|
import {
|
||||||
|
clear
|
||||||
|
} from "./chunk-5RHQVMYD.js";
|
||||||
|
|
||||||
|
// node_modules/ol/structs/PriorityQueue.js
|
||||||
|
var DROP = Infinity;
|
||||||
|
var PriorityQueue = class {
|
||||||
|
/**
|
||||||
|
* @param {function(T): number} priorityFunction Priority function.
|
||||||
|
* @param {function(T): string} keyFunction Key function.
|
||||||
|
*/
|
||||||
|
constructor(priorityFunction, keyFunction) {
|
||||||
|
this.priorityFunction_ = priorityFunction;
|
||||||
|
this.keyFunction_ = keyFunction;
|
||||||
|
this.elements_ = [];
|
||||||
|
this.priorities_ = [];
|
||||||
|
this.queuedElements_ = {};
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* FIXME empty description for jsdoc
|
||||||
|
*/
|
||||||
|
clear() {
|
||||||
|
this.elements_.length = 0;
|
||||||
|
this.priorities_.length = 0;
|
||||||
|
clear(this.queuedElements_);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Remove and return the highest-priority element. O(log N).
|
||||||
|
* @return {T} Element.
|
||||||
|
*/
|
||||||
|
dequeue() {
|
||||||
|
const elements = this.elements_;
|
||||||
|
const priorities = this.priorities_;
|
||||||
|
const element = elements[0];
|
||||||
|
if (elements.length == 1) {
|
||||||
|
elements.length = 0;
|
||||||
|
priorities.length = 0;
|
||||||
|
} else {
|
||||||
|
elements[0] = /** @type {T} */
|
||||||
|
elements.pop();
|
||||||
|
priorities[0] = /** @type {number} */
|
||||||
|
priorities.pop();
|
||||||
|
this.siftUp_(0);
|
||||||
|
}
|
||||||
|
const elementKey = this.keyFunction_(element);
|
||||||
|
delete this.queuedElements_[elementKey];
|
||||||
|
return element;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Enqueue an element. O(log N).
|
||||||
|
* @param {T} element Element.
|
||||||
|
* @return {boolean} The element was added to the queue.
|
||||||
|
*/
|
||||||
|
enqueue(element) {
|
||||||
|
assert(
|
||||||
|
!(this.keyFunction_(element) in this.queuedElements_),
|
||||||
|
"Tried to enqueue an `element` that was already added to the queue"
|
||||||
|
);
|
||||||
|
const priority = this.priorityFunction_(element);
|
||||||
|
if (priority != DROP) {
|
||||||
|
this.elements_.push(element);
|
||||||
|
this.priorities_.push(priority);
|
||||||
|
this.queuedElements_[this.keyFunction_(element)] = true;
|
||||||
|
this.siftDown_(0, this.elements_.length - 1);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @return {number} Count.
|
||||||
|
*/
|
||||||
|
getCount() {
|
||||||
|
return this.elements_.length;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Gets the index of the left child of the node at the given index.
|
||||||
|
* @param {number} index The index of the node to get the left child for.
|
||||||
|
* @return {number} The index of the left child.
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
getLeftChildIndex_(index) {
|
||||||
|
return index * 2 + 1;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Gets the index of the right child of the node at the given index.
|
||||||
|
* @param {number} index The index of the node to get the right child for.
|
||||||
|
* @return {number} The index of the right child.
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
getRightChildIndex_(index) {
|
||||||
|
return index * 2 + 2;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Gets the index of the parent of the node at the given index.
|
||||||
|
* @param {number} index The index of the node to get the parent for.
|
||||||
|
* @return {number} The index of the parent.
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
getParentIndex_(index) {
|
||||||
|
return index - 1 >> 1;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Make this a heap. O(N).
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
heapify_() {
|
||||||
|
let i;
|
||||||
|
for (i = (this.elements_.length >> 1) - 1; i >= 0; i--) {
|
||||||
|
this.siftUp_(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @return {boolean} Is empty.
|
||||||
|
*/
|
||||||
|
isEmpty() {
|
||||||
|
return this.elements_.length === 0;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param {string} key Key.
|
||||||
|
* @return {boolean} Is key queued.
|
||||||
|
*/
|
||||||
|
isKeyQueued(key) {
|
||||||
|
return key in this.queuedElements_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param {T} element Element.
|
||||||
|
* @return {boolean} Is queued.
|
||||||
|
*/
|
||||||
|
isQueued(element) {
|
||||||
|
return this.isKeyQueued(this.keyFunction_(element));
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param {number} index The index of the node to move down.
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
siftUp_(index) {
|
||||||
|
const elements = this.elements_;
|
||||||
|
const priorities = this.priorities_;
|
||||||
|
const count = elements.length;
|
||||||
|
const element = elements[index];
|
||||||
|
const priority = priorities[index];
|
||||||
|
const startIndex = index;
|
||||||
|
while (index < count >> 1) {
|
||||||
|
const lIndex = this.getLeftChildIndex_(index);
|
||||||
|
const rIndex = this.getRightChildIndex_(index);
|
||||||
|
const smallerChildIndex = rIndex < count && priorities[rIndex] < priorities[lIndex] ? rIndex : lIndex;
|
||||||
|
elements[index] = elements[smallerChildIndex];
|
||||||
|
priorities[index] = priorities[smallerChildIndex];
|
||||||
|
index = smallerChildIndex;
|
||||||
|
}
|
||||||
|
elements[index] = element;
|
||||||
|
priorities[index] = priority;
|
||||||
|
this.siftDown_(startIndex, index);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param {number} startIndex The index of the root.
|
||||||
|
* @param {number} index The index of the node to move up.
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
siftDown_(startIndex, index) {
|
||||||
|
const elements = this.elements_;
|
||||||
|
const priorities = this.priorities_;
|
||||||
|
const element = elements[index];
|
||||||
|
const priority = priorities[index];
|
||||||
|
while (index > startIndex) {
|
||||||
|
const parentIndex = this.getParentIndex_(index);
|
||||||
|
if (priorities[parentIndex] > priority) {
|
||||||
|
elements[index] = elements[parentIndex];
|
||||||
|
priorities[index] = priorities[parentIndex];
|
||||||
|
index = parentIndex;
|
||||||
|
} else {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elements[index] = element;
|
||||||
|
priorities[index] = priority;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* FIXME empty description for jsdoc
|
||||||
|
*/
|
||||||
|
reprioritize() {
|
||||||
|
const priorityFunction = this.priorityFunction_;
|
||||||
|
const elements = this.elements_;
|
||||||
|
const priorities = this.priorities_;
|
||||||
|
let index = 0;
|
||||||
|
const n = elements.length;
|
||||||
|
let element, i, priority;
|
||||||
|
for (i = 0; i < n; ++i) {
|
||||||
|
element = elements[i];
|
||||||
|
priority = priorityFunction(element);
|
||||||
|
if (priority == DROP) {
|
||||||
|
delete this.queuedElements_[this.keyFunction_(element)];
|
||||||
|
} else {
|
||||||
|
priorities[index] = priority;
|
||||||
|
elements[index++] = element;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elements.length = index;
|
||||||
|
priorities.length = index;
|
||||||
|
this.heapify_();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var PriorityQueue_default = PriorityQueue;
|
||||||
|
|
||||||
|
// node_modules/ol/TileQueue.js
|
||||||
|
var TileQueue = class extends PriorityQueue_default {
|
||||||
|
/**
|
||||||
|
* @param {PriorityFunction} tilePriorityFunction Tile priority function.
|
||||||
|
* @param {function(): ?} tileChangeCallback Function called on each tile change event.
|
||||||
|
*/
|
||||||
|
constructor(tilePriorityFunction, tileChangeCallback) {
|
||||||
|
super(
|
||||||
|
(element) => tilePriorityFunction.apply(null, element),
|
||||||
|
(element) => element[0].getKey()
|
||||||
|
);
|
||||||
|
this.boundHandleTileChange_ = this.handleTileChange.bind(this);
|
||||||
|
this.tileChangeCallback_ = tileChangeCallback;
|
||||||
|
this.tilesLoading_ = 0;
|
||||||
|
this.tilesLoadingKeys_ = {};
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param {TileQueueElement} element Element.
|
||||||
|
* @return {boolean} The element was added to the queue.
|
||||||
|
* @override
|
||||||
|
*/
|
||||||
|
enqueue(element) {
|
||||||
|
const added = super.enqueue(element);
|
||||||
|
if (added) {
|
||||||
|
const tile = element[0];
|
||||||
|
tile.addEventListener(EventType_default.CHANGE, this.boundHandleTileChange_);
|
||||||
|
}
|
||||||
|
return added;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @return {number} Number of tiles loading.
|
||||||
|
*/
|
||||||
|
getTilesLoading() {
|
||||||
|
return this.tilesLoading_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param {import("./events/Event.js").default} event Event.
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
handleTileChange(event) {
|
||||||
|
const tile = (
|
||||||
|
/** @type {import("./Tile.js").default} */
|
||||||
|
event.target
|
||||||
|
);
|
||||||
|
const state = tile.getState();
|
||||||
|
if (state === TileState_default.LOADED || state === TileState_default.ERROR || state === TileState_default.EMPTY) {
|
||||||
|
if (state !== TileState_default.ERROR) {
|
||||||
|
tile.removeEventListener(EventType_default.CHANGE, this.boundHandleTileChange_);
|
||||||
|
}
|
||||||
|
const tileKey = tile.getKey();
|
||||||
|
if (tileKey in this.tilesLoadingKeys_) {
|
||||||
|
delete this.tilesLoadingKeys_[tileKey];
|
||||||
|
--this.tilesLoading_;
|
||||||
|
}
|
||||||
|
this.tileChangeCallback_();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param {number} maxTotalLoading Maximum number tiles to load simultaneously.
|
||||||
|
* @param {number} maxNewLoads Maximum number of new tiles to load.
|
||||||
|
*/
|
||||||
|
loadMoreTiles(maxTotalLoading, maxNewLoads) {
|
||||||
|
let newLoads = 0;
|
||||||
|
while (this.tilesLoading_ < maxTotalLoading && newLoads < maxNewLoads && this.getCount() > 0) {
|
||||||
|
const tile = this.dequeue()[0];
|
||||||
|
const tileKey = tile.getKey();
|
||||||
|
const state = tile.getState();
|
||||||
|
if (state === TileState_default.IDLE && !(tileKey in this.tilesLoadingKeys_)) {
|
||||||
|
this.tilesLoadingKeys_[tileKey] = true;
|
||||||
|
++this.tilesLoading_;
|
||||||
|
++newLoads;
|
||||||
|
tile.load();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var TileQueue_default = TileQueue;
|
||||||
|
function getTilePriority(frameState, tile, tileSourceKey, tileCenter, tileResolution) {
|
||||||
|
if (!frameState || !(tileSourceKey in frameState.wantedTiles)) {
|
||||||
|
return DROP;
|
||||||
|
}
|
||||||
|
if (!frameState.wantedTiles[tileSourceKey][tile.getKey()]) {
|
||||||
|
return DROP;
|
||||||
|
}
|
||||||
|
const center = frameState.viewState.center;
|
||||||
|
const deltaX = tileCenter[0] - center[0];
|
||||||
|
const deltaY = tileCenter[1] - center[1];
|
||||||
|
return 65536 * Math.log(tileResolution) + Math.sqrt(deltaX * deltaX + deltaY * deltaY) / tileResolution;
|
||||||
|
}
|
||||||
|
|
||||||
|
export {
|
||||||
|
TileQueue_default,
|
||||||
|
getTilePriority
|
||||||
|
};
|
||||||
|
//# sourceMappingURL=chunk-CAVOO5JW.js.map
|
||||||
7
node_modules/.vite/deps/chunk-CAVOO5JW.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-CAVOO5JW.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
38
node_modules/.vite/deps/chunk-DC5AMYBS.js
generated
vendored
Normal file
38
node_modules/.vite/deps/chunk-DC5AMYBS.js
generated
vendored
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
var __create = Object.create;
|
||||||
|
var __defProp = Object.defineProperty;
|
||||||
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||||
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||||
|
var __getProtoOf = Object.getPrototypeOf;
|
||||||
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||||
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||||||
|
var __commonJS = (cb, mod) => function __require() {
|
||||||
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
||||||
|
};
|
||||||
|
var __export = (target, all) => {
|
||||||
|
for (var name in all)
|
||||||
|
__defProp(target, name, { get: all[name], enumerable: true });
|
||||||
|
};
|
||||||
|
var __copyProps = (to, from, except, desc) => {
|
||||||
|
if (from && typeof from === "object" || typeof from === "function") {
|
||||||
|
for (let key of __getOwnPropNames(from))
|
||||||
|
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||||
|
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||||
|
}
|
||||||
|
return to;
|
||||||
|
};
|
||||||
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||||
|
// If the importer is in node compatibility mode or this is not an ESM
|
||||||
|
// file that has been converted to a CommonJS file using a Babel-
|
||||||
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||||
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||||
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||||
|
mod
|
||||||
|
));
|
||||||
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
||||||
|
|
||||||
|
export {
|
||||||
|
__commonJS,
|
||||||
|
__export,
|
||||||
|
__toESM,
|
||||||
|
__publicField
|
||||||
|
};
|
||||||
7
node_modules/.vite/deps/chunk-DC5AMYBS.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-DC5AMYBS.js.map
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"sources": [],
|
||||||
|
"sourcesContent": [],
|
||||||
|
"mappings": "",
|
||||||
|
"names": []
|
||||||
|
}
|
||||||
230
node_modules/.vite/deps/chunk-E53S5GN6.js
generated
vendored
Normal file
230
node_modules/.vite/deps/chunk-E53S5GN6.js
generated
vendored
Normal file
@ -0,0 +1,230 @@
|
|||||||
|
import {
|
||||||
|
assert
|
||||||
|
} from "./chunk-QFCIXVZ3.js";
|
||||||
|
import {
|
||||||
|
Object_default
|
||||||
|
} from "./chunk-Q5ZULJHM.js";
|
||||||
|
import {
|
||||||
|
listen,
|
||||||
|
unlistenByKey
|
||||||
|
} from "./chunk-NGFXCWUF.js";
|
||||||
|
import {
|
||||||
|
EventType_default
|
||||||
|
} from "./chunk-K25ZO44T.js";
|
||||||
|
|
||||||
|
// node_modules/ol/Feature.js
|
||||||
|
var Feature = class _Feature extends Object_default {
|
||||||
|
/**
|
||||||
|
* @param {Geometry|ObjectWithGeometry<Geometry>} [geometryOrProperties]
|
||||||
|
* You may pass a Geometry object directly, or an object literal containing
|
||||||
|
* properties. If you pass an object literal, you may include a Geometry
|
||||||
|
* associated with a `geometry` key.
|
||||||
|
*/
|
||||||
|
constructor(geometryOrProperties) {
|
||||||
|
super();
|
||||||
|
this.on;
|
||||||
|
this.once;
|
||||||
|
this.un;
|
||||||
|
this.id_ = void 0;
|
||||||
|
this.geometryName_ = "geometry";
|
||||||
|
this.style_ = null;
|
||||||
|
this.styleFunction_ = void 0;
|
||||||
|
this.geometryChangeKey_ = null;
|
||||||
|
this.addChangeListener(this.geometryName_, this.handleGeometryChanged_);
|
||||||
|
if (geometryOrProperties) {
|
||||||
|
if (typeof /** @type {?} */
|
||||||
|
geometryOrProperties.getSimplifiedGeometry === "function") {
|
||||||
|
const geometry = (
|
||||||
|
/** @type {Geometry} */
|
||||||
|
geometryOrProperties
|
||||||
|
);
|
||||||
|
this.setGeometry(geometry);
|
||||||
|
} else {
|
||||||
|
const properties = geometryOrProperties;
|
||||||
|
this.setProperties(properties);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Clone this feature. If the original feature has a geometry it
|
||||||
|
* is also cloned. The feature id is not set in the clone.
|
||||||
|
* @return {Feature<Geometry>} The clone.
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
clone() {
|
||||||
|
const clone = (
|
||||||
|
/** @type {Feature<Geometry>} */
|
||||||
|
new _Feature(this.hasProperties() ? this.getProperties() : null)
|
||||||
|
);
|
||||||
|
clone.setGeometryName(this.getGeometryName());
|
||||||
|
const geometry = this.getGeometry();
|
||||||
|
if (geometry) {
|
||||||
|
clone.setGeometry(
|
||||||
|
/** @type {Geometry} */
|
||||||
|
geometry.clone()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
const style = this.getStyle();
|
||||||
|
if (style) {
|
||||||
|
clone.setStyle(style);
|
||||||
|
}
|
||||||
|
return clone;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Get the feature's default geometry. A feature may have any number of named
|
||||||
|
* geometries. The "default" geometry (the one that is rendered by default) is
|
||||||
|
* set when calling {@link module:ol/Feature~Feature#setGeometry}.
|
||||||
|
* @return {Geometry|undefined} The default geometry for the feature.
|
||||||
|
* @api
|
||||||
|
* @observable
|
||||||
|
*/
|
||||||
|
getGeometry() {
|
||||||
|
return (
|
||||||
|
/** @type {Geometry|undefined} */
|
||||||
|
this.get(this.geometryName_)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Get the feature identifier. This is a stable identifier for the feature and
|
||||||
|
* is either set when reading data from a remote source or set explicitly by
|
||||||
|
* calling {@link module:ol/Feature~Feature#setId}.
|
||||||
|
* @return {number|string|undefined} Id.
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
getId() {
|
||||||
|
return this.id_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Get the name of the feature's default geometry. By default, the default
|
||||||
|
* geometry is named `geometry`.
|
||||||
|
* @return {string} Get the property name associated with the default geometry
|
||||||
|
* for this feature.
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
getGeometryName() {
|
||||||
|
return this.geometryName_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Get the feature's style. Will return what was provided to the
|
||||||
|
* {@link module:ol/Feature~Feature#setStyle} method.
|
||||||
|
* @return {import("./style/Style.js").StyleLike|undefined} The feature style.
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
getStyle() {
|
||||||
|
return this.style_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Get the feature's style function.
|
||||||
|
* @return {import("./style/Style.js").StyleFunction|undefined} Return a function
|
||||||
|
* representing the current style of this feature.
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
getStyleFunction() {
|
||||||
|
return this.styleFunction_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
handleGeometryChange_() {
|
||||||
|
this.changed();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
handleGeometryChanged_() {
|
||||||
|
if (this.geometryChangeKey_) {
|
||||||
|
unlistenByKey(this.geometryChangeKey_);
|
||||||
|
this.geometryChangeKey_ = null;
|
||||||
|
}
|
||||||
|
const geometry = this.getGeometry();
|
||||||
|
if (geometry) {
|
||||||
|
this.geometryChangeKey_ = listen(
|
||||||
|
geometry,
|
||||||
|
EventType_default.CHANGE,
|
||||||
|
this.handleGeometryChange_,
|
||||||
|
this
|
||||||
|
);
|
||||||
|
}
|
||||||
|
this.changed();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Set the default geometry for the feature. This will update the property
|
||||||
|
* with the name returned by {@link module:ol/Feature~Feature#getGeometryName}.
|
||||||
|
* @param {Geometry|undefined} geometry The new geometry.
|
||||||
|
* @api
|
||||||
|
* @observable
|
||||||
|
*/
|
||||||
|
setGeometry(geometry) {
|
||||||
|
this.set(this.geometryName_, geometry);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Set the style for the feature to override the layer style. This can be a
|
||||||
|
* single style object, an array of styles, or a function that takes a
|
||||||
|
* resolution and returns an array of styles. To unset the feature style, call
|
||||||
|
* `setStyle()` without arguments or a falsey value.
|
||||||
|
* @param {import("./style/Style.js").StyleLike} [style] Style for this feature.
|
||||||
|
* @api
|
||||||
|
* @fires module:ol/events/Event~BaseEvent#event:change
|
||||||
|
*/
|
||||||
|
setStyle(style) {
|
||||||
|
this.style_ = style;
|
||||||
|
this.styleFunction_ = !style ? void 0 : createStyleFunction(style);
|
||||||
|
this.changed();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Set the feature id. The feature id is considered stable and may be used when
|
||||||
|
* requesting features or comparing identifiers returned from a remote source.
|
||||||
|
* The feature id can be used with the
|
||||||
|
* {@link module:ol/source/Vector~VectorSource#getFeatureById} method.
|
||||||
|
* @param {number|string|undefined} id The feature id.
|
||||||
|
* @api
|
||||||
|
* @fires module:ol/events/Event~BaseEvent#event:change
|
||||||
|
*/
|
||||||
|
setId(id) {
|
||||||
|
this.id_ = id;
|
||||||
|
this.changed();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Set the property name to be used when getting the feature's default geometry.
|
||||||
|
* When calling {@link module:ol/Feature~Feature#getGeometry}, the value of the property with
|
||||||
|
* this name will be returned.
|
||||||
|
* @param {string} name The property name of the default geometry.
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
setGeometryName(name) {
|
||||||
|
this.removeChangeListener(this.geometryName_, this.handleGeometryChanged_);
|
||||||
|
this.geometryName_ = name;
|
||||||
|
this.addChangeListener(this.geometryName_, this.handleGeometryChanged_);
|
||||||
|
this.handleGeometryChanged_();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
function createStyleFunction(obj) {
|
||||||
|
if (typeof obj === "function") {
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
let styles;
|
||||||
|
if (Array.isArray(obj)) {
|
||||||
|
styles = obj;
|
||||||
|
} else {
|
||||||
|
assert(
|
||||||
|
typeof /** @type {?} */
|
||||||
|
obj.getZIndex === "function",
|
||||||
|
"Expected an `ol/style/Style` or an array of `ol/style/Style.js`"
|
||||||
|
);
|
||||||
|
const style = (
|
||||||
|
/** @type {import("./style/Style.js").default} */
|
||||||
|
obj
|
||||||
|
);
|
||||||
|
styles = [style];
|
||||||
|
}
|
||||||
|
return function() {
|
||||||
|
return styles;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
var Feature_default = Feature;
|
||||||
|
|
||||||
|
export {
|
||||||
|
createStyleFunction,
|
||||||
|
Feature_default
|
||||||
|
};
|
||||||
|
//# sourceMappingURL=chunk-E53S5GN6.js.map
|
||||||
7
node_modules/.vite/deps/chunk-E53S5GN6.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-E53S5GN6.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
377
node_modules/.vite/deps/chunk-E7S7Q7VV.js
generated
vendored
Normal file
377
node_modules/.vite/deps/chunk-E7S7Q7VV.js
generated
vendored
Normal file
@ -0,0 +1,377 @@
|
|||||||
|
import {
|
||||||
|
Layer_default2 as Layer_default
|
||||||
|
} from "./chunk-ZUI5NXIU.js";
|
||||||
|
import {
|
||||||
|
Layer_default as Layer_default2
|
||||||
|
} from "./chunk-I6K7MRGV.js";
|
||||||
|
import {
|
||||||
|
ViewHint_default
|
||||||
|
} from "./chunk-YLJGUH5Z.js";
|
||||||
|
import {
|
||||||
|
ImageState_default
|
||||||
|
} from "./chunk-SHUBVYN4.js";
|
||||||
|
import {
|
||||||
|
apply,
|
||||||
|
compose
|
||||||
|
} from "./chunk-X52LGBOS.js";
|
||||||
|
import {
|
||||||
|
fromUserExtent
|
||||||
|
} from "./chunk-A3RXLHYB.js";
|
||||||
|
import {
|
||||||
|
containsCoordinate,
|
||||||
|
containsExtent,
|
||||||
|
getHeight,
|
||||||
|
getIntersection,
|
||||||
|
getWidth,
|
||||||
|
intersects,
|
||||||
|
isEmpty
|
||||||
|
} from "./chunk-SRXHWJOY.js";
|
||||||
|
|
||||||
|
// node_modules/ol/renderer/canvas/ImageLayer.js
|
||||||
|
var CanvasImageLayerRenderer = class extends Layer_default {
|
||||||
|
/**
|
||||||
|
* @param {import("../../layer/Image.js").default} imageLayer Image layer.
|
||||||
|
*/
|
||||||
|
constructor(imageLayer) {
|
||||||
|
super(imageLayer);
|
||||||
|
this.image = null;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @return {import('../../DataTile.js').ImageLike} Image.
|
||||||
|
*/
|
||||||
|
getImage() {
|
||||||
|
return !this.image ? null : this.image.getImage();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Determine whether render should be called.
|
||||||
|
* @param {import("../../Map.js").FrameState} frameState Frame state.
|
||||||
|
* @return {boolean} Layer is ready to be rendered.
|
||||||
|
* @override
|
||||||
|
*/
|
||||||
|
prepareFrame(frameState) {
|
||||||
|
const layerState = frameState.layerStatesArray[frameState.layerIndex];
|
||||||
|
const pixelRatio = frameState.pixelRatio;
|
||||||
|
const viewState = frameState.viewState;
|
||||||
|
const viewResolution = viewState.resolution;
|
||||||
|
const imageSource = this.getLayer().getSource();
|
||||||
|
const hints = frameState.viewHints;
|
||||||
|
let renderedExtent = frameState.extent;
|
||||||
|
if (layerState.extent !== void 0) {
|
||||||
|
renderedExtent = getIntersection(
|
||||||
|
renderedExtent,
|
||||||
|
fromUserExtent(layerState.extent, viewState.projection)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (!hints[ViewHint_default.ANIMATING] && !hints[ViewHint_default.INTERACTING] && !isEmpty(renderedExtent)) {
|
||||||
|
if (imageSource) {
|
||||||
|
const projection = viewState.projection;
|
||||||
|
const image = imageSource.getImage(
|
||||||
|
renderedExtent,
|
||||||
|
viewResolution,
|
||||||
|
pixelRatio,
|
||||||
|
projection
|
||||||
|
);
|
||||||
|
if (image) {
|
||||||
|
if (this.loadImage(image)) {
|
||||||
|
this.image = image;
|
||||||
|
} else if (image.getState() === ImageState_default.EMPTY) {
|
||||||
|
this.image = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.image = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return !!this.image;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param {import("../../pixel.js").Pixel} pixel Pixel.
|
||||||
|
* @return {Uint8ClampedArray} Data at the pixel location.
|
||||||
|
* @override
|
||||||
|
*/
|
||||||
|
getData(pixel) {
|
||||||
|
const frameState = this.frameState;
|
||||||
|
if (!frameState) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
const layer = this.getLayer();
|
||||||
|
const coordinate = apply(
|
||||||
|
frameState.pixelToCoordinateTransform,
|
||||||
|
pixel.slice()
|
||||||
|
);
|
||||||
|
const layerExtent = layer.getExtent();
|
||||||
|
if (layerExtent) {
|
||||||
|
if (!containsCoordinate(layerExtent, coordinate)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const imageExtent = this.image.getExtent();
|
||||||
|
const img = this.image.getImage();
|
||||||
|
const imageMapWidth = getWidth(imageExtent);
|
||||||
|
const col = Math.floor(
|
||||||
|
img.width * ((coordinate[0] - imageExtent[0]) / imageMapWidth)
|
||||||
|
);
|
||||||
|
if (col < 0 || col >= img.width) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
const imageMapHeight = getHeight(imageExtent);
|
||||||
|
const row = Math.floor(
|
||||||
|
img.height * ((imageExtent[3] - coordinate[1]) / imageMapHeight)
|
||||||
|
);
|
||||||
|
if (row < 0 || row >= img.height) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return this.getImageData(img, col, row);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Render the layer.
|
||||||
|
* @param {import("../../Map.js").FrameState} frameState Frame state.
|
||||||
|
* @param {HTMLElement} target Target that may be used to render content to.
|
||||||
|
* @return {HTMLElement} The rendered element.
|
||||||
|
* @override
|
||||||
|
*/
|
||||||
|
renderFrame(frameState, target) {
|
||||||
|
const image = this.image;
|
||||||
|
const imageExtent = image.getExtent();
|
||||||
|
const imageResolution = image.getResolution();
|
||||||
|
const [imageResolutionX, imageResolutionY] = Array.isArray(imageResolution) ? imageResolution : [imageResolution, imageResolution];
|
||||||
|
const imagePixelRatio = image.getPixelRatio();
|
||||||
|
const layerState = frameState.layerStatesArray[frameState.layerIndex];
|
||||||
|
const pixelRatio = frameState.pixelRatio;
|
||||||
|
const viewState = frameState.viewState;
|
||||||
|
const viewCenter = viewState.center;
|
||||||
|
const viewResolution = viewState.resolution;
|
||||||
|
const scaleX = pixelRatio * imageResolutionX / (viewResolution * imagePixelRatio);
|
||||||
|
const scaleY = pixelRatio * imageResolutionY / (viewResolution * imagePixelRatio);
|
||||||
|
this.prepareContainer(frameState, target);
|
||||||
|
const width = this.context.canvas.width;
|
||||||
|
const height = this.context.canvas.height;
|
||||||
|
const context = this.getRenderContext(frameState);
|
||||||
|
let clipped = false;
|
||||||
|
let render = true;
|
||||||
|
if (layerState.extent) {
|
||||||
|
const layerExtent = fromUserExtent(
|
||||||
|
layerState.extent,
|
||||||
|
viewState.projection
|
||||||
|
);
|
||||||
|
render = intersects(layerExtent, frameState.extent);
|
||||||
|
clipped = render && !containsExtent(layerExtent, frameState.extent);
|
||||||
|
if (clipped) {
|
||||||
|
this.clipUnrotated(context, frameState, layerExtent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const img = image.getImage();
|
||||||
|
const transform = compose(
|
||||||
|
this.tempTransform,
|
||||||
|
width / 2,
|
||||||
|
height / 2,
|
||||||
|
scaleX,
|
||||||
|
scaleY,
|
||||||
|
0,
|
||||||
|
imagePixelRatio * (imageExtent[0] - viewCenter[0]) / imageResolutionX,
|
||||||
|
imagePixelRatio * (viewCenter[1] - imageExtent[3]) / imageResolutionY
|
||||||
|
);
|
||||||
|
this.renderedResolution = imageResolutionY * pixelRatio / imagePixelRatio;
|
||||||
|
const dw = img.width * transform[0];
|
||||||
|
const dh = img.height * transform[3];
|
||||||
|
if (!this.getLayer().getSource().getInterpolate()) {
|
||||||
|
context.imageSmoothingEnabled = false;
|
||||||
|
}
|
||||||
|
this.preRender(context, frameState);
|
||||||
|
if (render && dw >= 0.5 && dh >= 0.5) {
|
||||||
|
const dx = transform[4];
|
||||||
|
const dy = transform[5];
|
||||||
|
const opacity = layerState.opacity;
|
||||||
|
if (opacity !== 1) {
|
||||||
|
context.save();
|
||||||
|
context.globalAlpha = opacity;
|
||||||
|
}
|
||||||
|
context.drawImage(img, 0, 0, +img.width, +img.height, dx, dy, dw, dh);
|
||||||
|
if (opacity !== 1) {
|
||||||
|
context.restore();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.postRender(this.context, frameState);
|
||||||
|
if (clipped) {
|
||||||
|
context.restore();
|
||||||
|
}
|
||||||
|
context.imageSmoothingEnabled = true;
|
||||||
|
return this.container;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var ImageLayer_default = CanvasImageLayerRenderer;
|
||||||
|
|
||||||
|
// node_modules/ol/layer/BaseImage.js
|
||||||
|
var BaseImageLayer = class extends Layer_default2 {
|
||||||
|
/**
|
||||||
|
* @param {Options<ImageSourceType>} [options] Layer options.
|
||||||
|
*/
|
||||||
|
constructor(options) {
|
||||||
|
options = options ? options : {};
|
||||||
|
super(options);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var BaseImage_default = BaseImageLayer;
|
||||||
|
|
||||||
|
// node_modules/ol/layer/Image.js
|
||||||
|
var ImageLayer = class extends BaseImage_default {
|
||||||
|
/**
|
||||||
|
* @param {import("./BaseImage.js").Options<ImageSourceType>} [options] Layer options.
|
||||||
|
*/
|
||||||
|
constructor(options) {
|
||||||
|
super(options);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @override
|
||||||
|
*/
|
||||||
|
createRenderer() {
|
||||||
|
return new ImageLayer_default(this);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Get data for a pixel location. A four element RGBA array will be returned. For requests outside the
|
||||||
|
* layer extent, `null` will be returned. Data for an image can only be retrieved if the
|
||||||
|
* source's `crossOrigin` property is set.
|
||||||
|
*
|
||||||
|
* ```js
|
||||||
|
* // display layer data on every pointer move
|
||||||
|
* map.on('pointermove', (event) => {
|
||||||
|
* console.log(layer.getData(event.pixel));
|
||||||
|
* });
|
||||||
|
* ```
|
||||||
|
* @param {import("../pixel").Pixel} pixel Pixel.
|
||||||
|
* @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Pixel data.
|
||||||
|
* @api
|
||||||
|
* @override
|
||||||
|
*/
|
||||||
|
getData(pixel) {
|
||||||
|
return super.getData(pixel);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
var Image_default = ImageLayer;
|
||||||
|
|
||||||
|
// node_modules/ol/vec/mat4.js
|
||||||
|
function create() {
|
||||||
|
return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
|
||||||
|
}
|
||||||
|
function fromTransform(mat4, transform) {
|
||||||
|
mat4[0] = transform[0];
|
||||||
|
mat4[1] = transform[1];
|
||||||
|
mat4[4] = transform[2];
|
||||||
|
mat4[5] = transform[3];
|
||||||
|
mat4[12] = transform[4];
|
||||||
|
mat4[13] = transform[5];
|
||||||
|
return mat4;
|
||||||
|
}
|
||||||
|
function orthographic(left, right, bottom, top, near, far, out) {
|
||||||
|
out = out ?? create();
|
||||||
|
const lr = 1 / (left - right), bt = 1 / (bottom - top), nf = 1 / (near - far);
|
||||||
|
out[0] = -2 * lr;
|
||||||
|
out[1] = 0;
|
||||||
|
out[2] = 0;
|
||||||
|
out[3] = 0;
|
||||||
|
out[4] = 0;
|
||||||
|
out[5] = -2 * bt;
|
||||||
|
out[6] = 0;
|
||||||
|
out[7] = 0;
|
||||||
|
out[8] = 0;
|
||||||
|
out[9] = 0;
|
||||||
|
out[10] = 2 * nf;
|
||||||
|
out[11] = 0;
|
||||||
|
out[12] = (left + right) * lr;
|
||||||
|
out[13] = (top + bottom) * bt;
|
||||||
|
out[14] = (far + near) * nf;
|
||||||
|
out[15] = 1;
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
function scale(m, x, y, z, out) {
|
||||||
|
out = out ?? create();
|
||||||
|
out[0] = m[0] * x;
|
||||||
|
out[1] = m[1] * x;
|
||||||
|
out[2] = m[2] * x;
|
||||||
|
out[3] = m[3] * x;
|
||||||
|
out[4] = m[4] * y;
|
||||||
|
out[5] = m[5] * y;
|
||||||
|
out[6] = m[6] * y;
|
||||||
|
out[7] = m[7] * y;
|
||||||
|
out[8] = m[8] * z;
|
||||||
|
out[9] = m[9] * z;
|
||||||
|
out[10] = m[10] * z;
|
||||||
|
out[11] = m[11] * z;
|
||||||
|
out[12] = m[12];
|
||||||
|
out[13] = m[13];
|
||||||
|
out[14] = m[14];
|
||||||
|
out[15] = m[15];
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
function translate(m, x, y, z, out) {
|
||||||
|
out = out ?? create();
|
||||||
|
let a00, a01, a02, a03, a10, a11, a12, a13, a20, a21, a22, a23;
|
||||||
|
if (m === out) {
|
||||||
|
out[12] = m[0] * x + m[4] * y + m[8] * z + m[12];
|
||||||
|
out[13] = m[1] * x + m[5] * y + m[9] * z + m[13];
|
||||||
|
out[14] = m[2] * x + m[6] * y + m[10] * z + m[14];
|
||||||
|
out[15] = m[3] * x + m[7] * y + m[11] * z + m[15];
|
||||||
|
} else {
|
||||||
|
a00 = m[0];
|
||||||
|
a01 = m[1];
|
||||||
|
a02 = m[2];
|
||||||
|
a03 = m[3];
|
||||||
|
a10 = m[4];
|
||||||
|
a11 = m[5];
|
||||||
|
a12 = m[6];
|
||||||
|
a13 = m[7];
|
||||||
|
a20 = m[8];
|
||||||
|
a21 = m[9];
|
||||||
|
a22 = m[10];
|
||||||
|
a23 = m[11];
|
||||||
|
out[0] = a00;
|
||||||
|
out[1] = a01;
|
||||||
|
out[2] = a02;
|
||||||
|
out[3] = a03;
|
||||||
|
out[4] = a10;
|
||||||
|
out[5] = a11;
|
||||||
|
out[6] = a12;
|
||||||
|
out[7] = a13;
|
||||||
|
out[8] = a20;
|
||||||
|
out[9] = a21;
|
||||||
|
out[10] = a22;
|
||||||
|
out[11] = a23;
|
||||||
|
out[12] = a00 * x + a10 * y + a20 * z + m[12];
|
||||||
|
out[13] = a01 * x + a11 * y + a21 * z + m[13];
|
||||||
|
out[14] = a02 * x + a12 * y + a22 * z + m[14];
|
||||||
|
out[15] = a03 * x + a13 * y + a23 * z + m[15];
|
||||||
|
}
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
function translation(x, y, z, out) {
|
||||||
|
out = out ?? create();
|
||||||
|
out[0] = 1;
|
||||||
|
out[1] = 0;
|
||||||
|
out[2] = 0;
|
||||||
|
out[3] = 0;
|
||||||
|
out[4] = 0;
|
||||||
|
out[5] = 1;
|
||||||
|
out[6] = 0;
|
||||||
|
out[7] = 0;
|
||||||
|
out[8] = 0;
|
||||||
|
out[9] = 0;
|
||||||
|
out[10] = 1;
|
||||||
|
out[11] = 0;
|
||||||
|
out[12] = x;
|
||||||
|
out[13] = y;
|
||||||
|
out[14] = z;
|
||||||
|
out[15] = 1;
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
|
export {
|
||||||
|
ImageLayer_default,
|
||||||
|
Image_default,
|
||||||
|
create,
|
||||||
|
fromTransform,
|
||||||
|
orthographic,
|
||||||
|
scale,
|
||||||
|
translate,
|
||||||
|
translation
|
||||||
|
};
|
||||||
|
//# sourceMappingURL=chunk-E7S7Q7VV.js.map
|
||||||
7
node_modules/.vite/deps/chunk-E7S7Q7VV.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-E7S7Q7VV.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user