Premier commit

Cette révision appartient à :
Théo Gastinel a révisé 2026-10-11 01:56:32 +02:00
révision 79ced37e37
26 fichiers modifiés
+11525

Aucun fichier ne correspond à votre recherche

+66
Voir le fichier
@@ -0,0 +1,66 @@
# --- double-push : exclusions generiques (secrets, builds, binaires, gros fichiers) ---
target/
node_modules/
build/
build-*/
dist/
out/
.gradle/
.idea/
venv/
.venv/
env/
__pycache__/
*.pyc
.cache/
.next/
.env
.env.*
!.env.example
accounts.json
Clee.API/
*.pem
*.key
*.p12
*.pfx
*.jks
*.keystore
keystore.properties
id_rsa*
id_ed25519*
*.kdbx
*.odt
*.sqlite
*.sqlite3
*.db
*.log
*.exe
*.dll
*.msi
*.jar
*.zip
*.7z
*.rar
*.tar
*.tar.gz
*.tgz
*.gguf
*.safetensors
*.onnx
*.pt
*.pth
*.bin
*.iso
*.gws
*.apk
*.aab
*.so
*.o
*.a
*.lib
*.pdb
*.mp4
*.mkv
*.wav
*.flac
+5127
Voir le fichier
Diff désactivé car ce fichier est trop long. Voir la Diff
+23
Voir le fichier
@@ -0,0 +1,23 @@
[package]
name = "vercors-validateur"
version = "0.1.0"
edition = "2021"
[lib]
name = "vercors_validateur"
path = "src/lib.rs"
[build-dependencies]
tauri-build = { version = "2", features = [] }
[dependencies]
tauri = { version = "2", features = [] }
tauri-plugin-dialog = "2"
tauri-plugin-opener = "2"
serde_json = "1"
[profile.release]
codegen-units = 1
lto = true
opt-level = "s"
strip = true
+1
Voir le fichier
@@ -0,0 +1 @@
fn main() { tauri_build::build() }
+1
Voir le fichier
@@ -0,0 +1 @@
{ "identifier": "default", "windows": ["main"], "permissions": ["core:default", "dialog:allow-open", "dialog:allow-save"] }
+1
Voir le fichier
@@ -0,0 +1 @@
{"core":{"default_permission":{"identifier":"default","description":"Default core plugins set.","permissions":["core:path:default","core:event:default","core:window:default","core:webview:default","core:app:default","core:image:default","core:resources:default","core:menu:default","core:tray:default"]},"permissions":{},"permission_sets":{},"global_scope_schema":null},"core:app":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin.","permissions":["allow-version","allow-name","allow-tauri-version","allow-identifier","allow-bundle-type","allow-register-listener","allow-remove-listener","allow-supports-multiple-windows"]},"permissions":{"allow-app-hide":{"identifier":"allow-app-hide","description":"Enables the app_hide command without any pre-configured scope.","commands":{"allow":["app_hide"],"deny":[]}},"allow-app-show":{"identifier":"allow-app-show","description":"Enables the app_show command without any pre-configured scope.","commands":{"allow":["app_show"],"deny":[]}},"allow-bundle-type":{"identifier":"allow-bundle-type","description":"Enables the bundle_type command without any pre-configured scope.","commands":{"allow":["bundle_type"],"deny":[]}},"allow-default-window-icon":{"identifier":"allow-default-window-icon","description":"Enables the default_window_icon command without any pre-configured scope.","commands":{"allow":["default_window_icon"],"deny":[]}},"allow-exit":{"identifier":"allow-exit","description":"Enables the exit command without any pre-configured scope.","commands":{"allow":["exit"],"deny":[]}},"allow-fetch-data-store-identifiers":{"identifier":"allow-fetch-data-store-identifiers","description":"Enables the fetch_data_store_identifiers command without any pre-configured scope.","commands":{"allow":["fetch_data_store_identifiers"],"deny":[]}},"allow-identifier":{"identifier":"allow-identifier","description":"Enables the identifier command without any pre-configured scope.","commands":{"allow":["identifier"],"deny":[]}},"allow-name":{"identifier":"allow-name","description":"Enables the name command without any pre-configured scope.","commands":{"allow":["name"],"deny":[]}},"allow-register-listener":{"identifier":"allow-register-listener","description":"Enables the register_listener command without any pre-configured scope.","commands":{"allow":["register_listener"],"deny":[]}},"allow-remove-data-store":{"identifier":"allow-remove-data-store","description":"Enables the remove_data_store command without any pre-configured scope.","commands":{"allow":["remove_data_store"],"deny":[]}},"allow-remove-listener":{"identifier":"allow-remove-listener","description":"Enables the remove_listener command without any pre-configured scope.","commands":{"allow":["remove_listener"],"deny":[]}},"allow-set-app-theme":{"identifier":"allow-set-app-theme","description":"Enables the set_app_theme command without any pre-configured scope.","commands":{"allow":["set_app_theme"],"deny":[]}},"allow-set-dock-visibility":{"identifier":"allow-set-dock-visibility","description":"Enables the set_dock_visibility command without any pre-configured scope.","commands":{"allow":["set_dock_visibility"],"deny":[]}},"allow-supports-multiple-windows":{"identifier":"allow-supports-multiple-windows","description":"Enables the supports_multiple_windows command without any pre-configured scope.","commands":{"allow":["supports_multiple_windows"],"deny":[]}},"allow-tauri-version":{"identifier":"allow-tauri-version","description":"Enables the tauri_version command without any pre-configured scope.","commands":{"allow":["tauri_version"],"deny":[]}},"allow-version":{"identifier":"allow-version","description":"Enables the version command without any pre-configured scope.","commands":{"allow":["version"],"deny":[]}},"deny-app-hide":{"identifier":"deny-app-hide","description":"Denies the app_hide command without any pre-configured scope.","commands":{"allow":[],"deny":["app_hide"]}},"deny-app-show":{"identifier":"deny-app-show","description":"Denies the app_show command without any pre-configured scope.","commands":{"allow":[],"deny":["app_show"]}},"deny-bundle-type":{"identifier":"deny-bundle-type","description":"Denies the bundle_type command without any pre-configured scope.","commands":{"allow":[],"deny":["bundle_type"]}},"deny-default-window-icon":{"identifier":"deny-default-window-icon","description":"Denies the default_window_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["default_window_icon"]}},"deny-exit":{"identifier":"deny-exit","description":"Denies the exit command without any pre-configured scope.","commands":{"allow":[],"deny":["exit"]}},"deny-fetch-data-store-identifiers":{"identifier":"deny-fetch-data-store-identifiers","description":"Denies the fetch_data_store_identifiers command without any pre-configured scope.","commands":{"allow":[],"deny":["fetch_data_store_identifiers"]}},"deny-identifier":{"identifier":"deny-identifier","description":"DenLigne tronquée
+1
Voir le fichier
@@ -0,0 +1 @@
{"default":{"identifier":"default","description":"","local":true,"windows":["main"],"permissions":["core:default","dialog:allow-open","dialog:allow-save"]}}
Diff désactivé car ce fichier est trop long. Voir la Diff
Diff désactivé car ce fichier est trop long. Voir la Diff
BIN
Voir le fichier
Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 4.1 KiB

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 7.6 KiB

BIN
Voir le fichier
Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 1.0 KiB

BIN
Voir le fichier
Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 18 KiB

+80
Voir le fichier
@@ -0,0 +1,80 @@
use std::fs;
use std::path::{Path, PathBuf};
/// Chemin par défaut, résolu à l'exécution depuis le profil utilisateur
/// (aucun chemin en dur). Renvoie None si la variable n'existe pas.
#[tauri::command]
fn chemin_par_defaut() -> Option<String> {
let home = std::env::var_os("USERPROFILE").or_else(|| std::env::var_os("HOME"))?;
let p = PathBuf::from(home)
.join("Documents").join("_CODE").join("_VercorsInventaire").join("vercors_points.json");
Some(p.to_string_lossy().into_owned())
}
/// Lecture seule du fichier source.
#[tauri::command]
fn lire_points(chemin: String) -> Result<serde_json::Value, String> {
let txt = fs::read_to_string(&chemin).map_err(|e| format!("Lecture {chemin} : {e}"))?;
serde_json::from_str(&txt).map_err(|e| format!("JSON invalide : {e}"))
}
fn chemin_validation(source: &str) -> PathBuf {
Path::new(source).with_file_name("vercors_validation.json")
}
#[tauri::command]
fn lire_validation(source: String) -> Result<Option<serde_json::Value>, String> {
let p = chemin_validation(&source);
if !p.exists() { return Ok(None); }
let txt = fs::read_to_string(&p).map_err(|e| e.to_string())?;
serde_json::from_str(&txt).map(Some).map_err(|e| format!("{} : JSON invalide : {e}", p.display()))
}
/// Écriture atomique : .tmp puis renommage ; l'ancienne version devient .bak.
fn ecrire_atomique(cible: &Path, contenu: &str) -> Result<(), String> {
let tmp = cible.with_extension("json.tmp");
fs::write(&tmp, contenu).map_err(|e| format!("Écriture {} : {e}", tmp.display()))?;
if cible.exists() {
let bak = cible.with_extension("json.bak");
fs::copy(cible, &bak).map_err(|e| format!("Sauvegarde .bak : {e}"))?;
}
fs::rename(&tmp, cible).map_err(|e| format!("Renommage : {e}"))
}
#[tauri::command]
fn sauver_validation(source: String, donnees: serde_json::Value) -> Result<String, String> {
if Path::new(&source).file_name().map(|n| n == "vercors_validation.json").unwrap_or(false) {
return Err("chemin source incohérent".into());
}
let p = chemin_validation(&source);
let txt = serde_json::to_string_pretty(&donnees).map_err(|e| e.to_string())?;
ecrire_atomique(&p, &txt)?;
Ok(p.to_string_lossy().into_owned())
}
#[tauri::command]
fn exporter(chemin: String, donnees: serde_json::Value) -> Result<(), String> {
let txt = serde_json::to_string_pretty(&donnees).map_err(|e| e.to_string())?;
ecrire_atomique(Path::new(&chemin), &txt)
}
/// Ouvre un lien http(s) dans le navigateur par défaut.
#[tauri::command]
fn ouvrir_lien(app: tauri::AppHandle, url: String) -> Result<(), String> {
use tauri_plugin_opener::OpenerExt;
if !(url.starts_with("https://") || url.starts_with("http://")) {
return Err("seuls les liens http(s) sont ouverts".into());
}
app.opener().open_url(url, None::<&str>).map_err(|e| e.to_string())
}
pub fn run() {
tauri::Builder::default()
.plugin(tauri_plugin_dialog::init())
.plugin(tauri_plugin_opener::init())
.invoke_handler(tauri::generate_handler![
chemin_par_defaut, lire_points, lire_validation, sauver_validation, exporter, ouvrir_lien
])
.run(tauri::generate_context!())
.expect("erreur au démarrage de Tauri");
}
+2
Voir le fichier
@@ -0,0 +1,2 @@
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
fn main() { vercors_validateur::run() }
+15
Voir le fichier
@@ -0,0 +1,15 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "Vercors Validateur",
"version": "0.1.0",
"identifier": "fr.gastinel.vercorsvalidateur",
"build": { "frontendDist": "../src" },
"app": {
"withGlobalTauri": true,
"windows": [{ "label": "main", "title": "Vercors Validateur", "width": 1400, "height": 900, "minWidth": 900, "minHeight": 600, "center": true }],
"security": {
"csp": "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob: https://data.geopf.fr https://*.tile.opentopomap.org; connect-src 'self' ipc: http://ipc.localhost"
}
},
"bundle": { "active": true, "targets": ["nsis"], "icon": ["icons/32x32.png","icons/128x128.png","icons/128x128@2x.png","icons/icon.ico"] }
}
+261
Voir le fichier
@@ -0,0 +1,261 @@
'use strict';
const { invoke } = window.__TAURI__.core;
const dialog = window.__TAURI__.dialog;
// ---- État ----
let source = null; // chemin du fichier source (lu seulement)
let points = []; // points source + ajoutés
const decisions = new Map();// id -> {id, decision, ...}
let selId = null;
let modeDeplacer = false;
let visibles = [];
let compteurAjout = 0;
const marqueurs = new Map();
// ---- Carte ----
// Couches vérifiées par requête HTTP réelle (tuile z13 Vercors) :
// PLANIGNV2 et ORTHOPHOTOS répondent 200 sans clé sur data.geopf.fr/wmts ;
// GEOGRAPHICALGRIDSYSTEMS.MAPS (SCAN 25) répond 400 « Layer unknown » sans clé.
const wmts = (layer, fmt, maxN) => L.tileLayer(
'https://data.geopf.fr/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&STYLE=normal&TILEMATRIXSET=PM' +
`&LAYER=${layer}&FORMAT=${fmt}&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}`,
{ maxZoom: 19, maxNativeZoom: maxN, attribution: '© IGN Géoplateforme' });
const fonds = {
'Plan IGN v2': wmts('GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2', 'image/png', 18),
'Photo aérienne IGN': wmts('ORTHOIMAGERY.ORTHOPHOTOS', 'image/jpeg', 19),
'OpenTopoMap (secours)': L.tileLayer('https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png',
{ maxZoom: 17, subdomains: 'abc', attribution: '© OpenTopoMap (CC-BY-SA), © OSM' }),
};
const carte = L.map('carte', { zoomControl: true }).setView([45.0, 5.5], 10);
let fondActif = null;
const selFond = document.getElementById('fond');
for (const n of Object.keys(fonds)) selFond.add(new Option(n, n));
function choisirFond(n) {
if (fondActif) carte.removeLayer(fondActif);
fondActif = fonds[n].addTo(carte);
try { localStorage.setItem('fond', n); } catch (_) {}
}
let fondInit = 'Plan IGN v2';
try { const f = localStorage.getItem('fond'); if (f && fonds[f]) fondInit = f; } catch (_) {}
selFond.value = fondInit; choisirFond(fondInit);
selFond.onchange = () => choisirFond(selFond.value);
// ---- Utilitaires ----
const $ = (id) => document.getElementById(id);
const el = (tag, props = {}, ...enf) => { const e = Object.assign(document.createElement(tag), props); e.append(...enf); return e; };
const decisionDe = (id) => decisions.get(id)?.decision || 'non_traite';
const pointDe = (id) => points.find((p) => p.id === id);
function posEffective(p) { const d = decisions.get(p.id); return [d?.lat ?? p.lat, d?.lon ?? p.lon]; }
function nomEffectif(p) { return decisions.get(p.id)?.nom_corrige ?? p.nom; }
function altEffective(p) { const d = decisions.get(p.id); return d?.altitude_corrigee ?? p.altitude_m; }
function majDecision(id, champs) {
const ancien = decisions.get(id) || { id, decision: 'non_traite' };
const d = { ...ancien, ...champs, id, horodatage: new Date().toISOString() };
for (const k of Object.keys(d)) if (d[k] === undefined || d[k] === '') delete d[k];
decisions.set(id, d);
planifierSauvegarde();
rafraichirPoint(id);
}
// ---- Sauvegarde (atomique côté Rust) ----
let minuterie = null;
function donneesAEcrire() {
return {
fichier_source: source ? source.split(/[\\/]/).pop() : null,
maj: new Date().toISOString(),
points_ajoutes: points.filter((p) => p.ajoute).map((p) => ({ id: p.id, nom: p.nom, type: p.type, lat: p.lat, lon: p.lon, altitude_m: p.altitude_m })),
decisions: [...decisions.values()],
};
}
function planifierSauvegarde() {
$('etat').textContent = 'modifié…';
clearTimeout(minuterie);
minuterie = setTimeout(async () => {
try { await invoke('sauver_validation', { source, donnees: donneesAEcrire() }); $('etat').textContent = 'enregistré ' + new Date().toLocaleTimeString(); }
catch (e) { $('etat').textContent = 'ERREUR sauvegarde : ' + e; alert('Échec de sauvegarde : ' + e); }
}, 300);
}
// ---- Chargement ----
async function charger(chemin) {
try {
const data = await invoke('lire_points', { chemin });
if (!Array.isArray(data)) throw 'le fichier doit contenir un tableau de points';
source = chemin; points = data.map((p) => ({ ...p })); decisions.clear(); compteurAjout = 0;
const v = await invoke('lire_validation', { source: chemin });
if (v) {
for (const a of v.points_ajoutes || []) { points.push({ ...a, ajoute: true, statut: 'ajout', sources: [], altitude_sources: [] }); }
for (const d of v.decisions || []) decisions.set(d.id, d);
}
for (const p of points) { const m = /^ajout-(\d+)$/.exec(p.id); if (m) compteurAjout = Math.max(compteurAjout, +m[1]); }
$('chemin').textContent = chemin; $('chemin').title = chemin;
const types = [...new Set(points.map((p) => p.type))].sort();
const fT = $('fType'); fT.length = 1; for (const t of types) fT.add(new Option(t, t));
construireMarqueurs(); filtrer();
const b = L.latLngBounds(points.map((p) => [p.lat, p.lon])); if (b.isValid()) carte.fitBounds(b);
$('etat').textContent = v ? 'décisions reprises' : 'aucune décision existante';
} catch (e) { alert('Impossible de charger ' + chemin + ' :\n' + e); }
}
$('btnOuvrir').onclick = async () => {
const f = await dialog.open({ multiple: false, filters: [{ name: 'JSON', extensions: ['json'] }] });
if (f) charger(f);
};
$('btnExport').onclick = async () => {
const f = await dialog.save({ defaultPath: 'vercors_validation_export.json', filters: [{ name: 'JSON', extensions: ['json'] }] });
if (!f) return;
try { await invoke('exporter', { chemin: f, donnees: donneesAEcrire() }); $('etat').textContent = 'exporté'; }
catch (e) { alert('Export impossible : ' + e); }
};
// ---- Marqueurs ----
function icone(p) {
const sel = p.id === selId ? ' style="outline:3px solid #2764c5"' : '';
return L.divIcon({ className: '', iconSize: [14, 14], iconAnchor: [7, 7], html: `<div class="pastille d-${decisionDe(p.id)}"${sel} style="width:14px;height:14px"></div>` });
}
function construireMarqueurs() {
for (const m of marqueurs.values()) m.remove(); marqueurs.clear();
for (const p of points) ajouterMarqueur(p);
}
function ajouterMarqueur(p) {
const m = L.marker(posEffective(p), { icon: icone(p), draggable: false, title: p.nom });
m.on('click', () => selectionner(p.id, false));
m.on('dragend', () => { const ll = m.getLatLng(); deplacer(p.id, ll.lat, ll.lng); });
marqueurs.set(p.id, m);
}
function rafraichirPoint(id) {
const p = pointDe(id), m = marqueurs.get(id); if (!p || !m) return;
m.setLatLng(posEffective(p)); m.setIcon(icone(p)); m.dragging && (id === selId ? m.dragging.enable() : m.dragging.disable());
filtrer(true); if (id === selId) afficherFiche();
majProgression();
}
function deplacer(id, lat, lon) {
const p = pointDe(id);
if (p.ajoute) { p.lat = +lat.toFixed(6); p.lon = +lon.toFixed(6); majDecision(id, {}); }
else majDecision(id, { decision: 'corrige', lat: +lat.toFixed(6), lon: +lon.toFixed(6) });
}
// ---- Liste / filtres ----
function filtrer(garderScroll) {
const q = $('recherche').value.trim().toLowerCase();
const t = $('fType').value, s = $('fStatut').value, d = $('fDecision').value;
visibles = points.filter((p) => (!t || p.type === t) && (!s || p.statut === s) && (!d || decisionDe(p.id) === d)
&& (!q || nomEffectif(p).toLowerCase().includes(q) || p.id.toLowerCase().includes(q)));
for (const p of points) { const m = marqueurs.get(p.id); const vis = visibles.includes(p); if (vis && !carte.hasLayer(m)) m.addTo(carte); else if (!vis && carte.hasLayer(m)) m.remove(); }
const ul = $('liste'), sc = ul.scrollTop; ul.replaceChildren();
for (const p of visibles) {
const li = el('li', { className: p.id === selId ? 'sel' : '' }, el('span', { className: 'pastille d-' + decisionDe(p.id) }),
el('span', { textContent: nomEffectif(p) || '(sans nom)' }), el('span', { className: 'alt', textContent: (altEffective(p) ?? '?') + ' m' }));
li.title = `${p.type} · ${p.statut}`; li.onclick = () => selectionner(p.id, true); li.dataset.id = p.id; ul.append(li);
}
if (garderScroll) ul.scrollTop = sc;
$('compte').textContent = `${visibles.length} / ${points.length} points affichés`;
majProgression();
}
for (const id of ['recherche', 'fType', 'fStatut', 'fDecision']) $(id).addEventListener('input', () => filtrer());
function majProgression() {
const trait = points.filter((p) => decisionDe(p.id) !== 'non_traite').length;
$('progression').textContent = `${trait} / ${points.length} traités`;
$('barre').max = points.length || 1; $('barre').value = trait;
}
// ---- Sélection / fiche ----
function selectionner(id, centrer) {
const ancien = selId; selId = id; modeDeplacer = false;
if (ancien) rafraichirPoint(ancien);
rafraichirPoint(id);
const p = pointDe(id); if (centrer && p) carte.setView(posEffective(p), Math.max(carte.getZoom(), 14));
const li = document.querySelector(`#liste li[data-id="${CSS.escape(id)}"]`); li && li.scrollIntoView({ block: 'nearest' });
}
function afficherFiche() {
const f = $('fiche'), p = pointDe(selId); if (!p) return;
const d = decisions.get(p.id) || {};
const champ = (lbl, input) => [el('label', { textContent: lbl }), input];
const iNom = el('input', { value: d.nom_corrige ?? '', placeholder: p.nom });
const iAlt = el('input', { type: 'number', step: '1', value: d.altitude_corrigee ?? '', placeholder: p.altitude_m ?? '' });
const iCom = el('textarea', { value: d.commentaire ?? '' });
iNom.onchange = () => { const v = iNom.value.trim(); if (p.ajoute) { p.nom = v || p.nom; majDecision(p.id, {}); } else majDecision(p.id, { nom_corrige: v || undefined, decision: v ? 'corrige' : d.decision }); };
iAlt.onchange = () => { const v = iAlt.value === '' ? undefined : Number(iAlt.value); if (v !== undefined && !Number.isFinite(v)) return;
if (p.ajoute) { p.altitude_m = v ?? null; majDecision(p.id, {}); } else majDecision(p.id, { altitude_corrigee: v, decision: v !== undefined ? 'corrige' : d.decision }); };
iCom.onchange = () => majDecision(p.id, { commentaire: iCom.value.trim() || undefined });
const bDep = el('button', { textContent: 'Déplacer (glisser ou clic carte)', className: modeDeplacer ? 'actif' : '' });
bDep.onclick = () => { modeDeplacer = !modeDeplacer; bDep.className = modeDeplacer ? 'actif' : ''; };
const bV = el('button', { textContent: 'Valider (V)' }); bV.onclick = () => decider('valide');
const bR = el('button', { textContent: 'Refuser (R)' }); bR.onclick = () => decider('refuse');
const bZ = el('button', { textContent: 'Remettre non traité' }); bZ.onclick = () => { if (p.ajoute) return; decisions.delete(p.id); planifierSauvegarde(); rafraichirPoint(p.id); };
const bN = el('button', { textContent: 'Suivant (N)' }); bN.onclick = () => suivant(1);
const [lat, lon] = posEffective(p);
const tab = el('table');
for (const a of p.altitude_sources || []) tab.append(el('tr', {}, el('td', { textContent: a.source }), el('td', { textContent: a.valeur + ' m' })));
const liens = (p.sources || []).map((u) => { const a = el('a', { className: 'lien', textContent: u }); a.onclick = () => invoke('ouvrir_lien', { url: u }).catch((e) => alert(e)); return a; });
f.replaceChildren(
el('h2', { textContent: nomEffectif(p) || '(sans nom)' }),
el('div', { className: 'petit', textContent: `${p.id} · ${p.type}` }),
el('div', {}, 'Statut source : ', el('span', { className: 'statut-' + p.statut, textContent: p.statut }), ' · Décision : ', el('b', { textContent: decisionDe(p.id) })),
p.note ? el('p', { className: 'petit', textContent: 'Note : ' + p.note }) : '',
el('div', { className: 'petit', textContent: `Position : ${lat.toFixed(6)}, ${lon.toFixed(6)} · Altitude : ${p.altitude_m ?? '?'} m` + (d.altitude_corrigee != null ? ` → ${d.altitude_corrigee} m` : '') }),
el('div', { className: 'boutons' }, bV, bR, bN, bZ),
...champ('Corriger le nom', iNom), ...champ('Corriger l\'altitude (m)', iAlt),
el('div', { className: 'boutons' }, bDep),
...champ('Commentaire', iCom),
el('label', { textContent: 'Altitudes par source' }), tab.childElementCount ? tab : el('div', { className: 'petit', textContent: 'aucune' }),
el('label', { textContent: 'Sources' }), ...(liens.length ? liens : [el('div', { className: 'petit', textContent: 'aucune' })]),
);
}
function decider(dec) {
if (!selId) return; const p = pointDe(selId);
if (p.ajoute) return; // un point ajouté reste « ajoute »
majDecision(selId, { decision: dec });
}
function suivant(sens) {
if (!visibles.length) return;
let i = visibles.findIndex((p) => p.id === selId);
i = i < 0 ? 0 : (i + sens + visibles.length) % visibles.length;
selectionner(visibles[i].id, true);
}
document.addEventListener('keydown', (e) => {
if (['INPUT', 'TEXTAREA', 'SELECT'].includes(e.target.tagName) || e.ctrlKey || e.altKey || e.metaKey) return;
const k = e.key.toLowerCase();
if (k === 'v') { decider('valide'); suivant(1); }
else if (k === 'r') { decider('refuse'); suivant(1); }
else if (k === 'n') suivant(1);
else if (k === 'p') suivant(-1);
else return;
e.preventDefault();
});
// ---- Clic carte : déplacer ou ajouter ----
carte.on('click', (e) => {
if (!source) return;
if (modeDeplacer && selId) { deplacer(selId, e.latlng.lat, e.latlng.lng); modeDeplacer = false; afficherFiche(); return; }
formulaireAjout(e.latlng);
});
function formulaireAjout(ll) {
const types = [...new Set(points.map((p) => p.type))].sort();
const iNom = el('input', { placeholder: 'Nom' });
const iType = el('select'); for (const t of types) iType.add(new Option(t, t));
const iAlt = el('input', { type: 'number', placeholder: 'Altitude (m)' });
const iCom = el('textarea', { placeholder: 'Commentaire' });
const ok = el('button', { textContent: 'Ajouter ce point' }), non = el('button', { textContent: 'Annuler' });
const f = $('fiche');
f.replaceChildren(el('h2', { textContent: 'Nouveau point' }), el('div', { className: 'petit', textContent: `${ll.lat.toFixed(6)}, ${ll.lng.toFixed(6)}` }),
el('label', { textContent: 'Nom' }), iNom, el('label', { textContent: 'Type' }), iType, el('label', { textContent: 'Altitude' }), iAlt,
el('label', { textContent: 'Commentaire' }), iCom, el('div', { className: 'boutons' }, ok, non));
iNom.focus();
non.onclick = () => (selId ? afficherFiche() : f.replaceChildren());
ok.onclick = () => {
if (!iNom.value.trim()) { alert('Nom requis'); return; }
const alt = iAlt.value === '' ? null : Number(iAlt.value);
const p = { id: `ajout-${++compteurAjout}`, nom: iNom.value.trim(), type: iType.value, lat: +ll.lat.toFixed(6), lon: +ll.lng.toFixed(6),
altitude_m: Number.isFinite(alt) ? alt : null, altitude_sources: [], sources: [], statut: 'ajout', ajoute: true };
points.push(p); ajouterMarqueur(p);
majDecision(p.id, { decision: 'ajoute', lat: p.lat, lon: p.lon, nom_corrige: p.nom, altitude_corrigee: p.altitude_m ?? undefined, commentaire: iCom.value.trim() || undefined });
selectionner(p.id, false);
};
}
// ---- Démarrage ----
(async () => {
const def = await invoke('chemin_par_defaut');
if (def) charger(def); else $('chemin').textContent = 'Choisissez le fichier de points…';
})();
+30
Voir le fichier
@@ -0,0 +1,30 @@
<!doctype html>
<html lang="fr"><head><meta charset="utf-8"><title>Vercors Validateur</title>
<link rel="stylesheet" href="vendor/leaflet/leaflet.css"><link rel="stylesheet" href="style.css"></head>
<body>
<header>
<button id="btnOuvrir">Ouvrir…</button><span id="chemin" class="petit"></span>
<span class="sep"></span>
<span id="progression"></span><progress id="barre" max="1" value="0"></progress>
<span class="sep"></span>
<select id="fond"></select>
<button id="btnExport">Exporter…</button>
<span id="etat" class="petit"></span>
</header>
<main>
<aside>
<input id="recherche" placeholder="Recherche (nom, id)…">
<div class="filtres">
<select id="fType"><option value="">Tous types</option></select>
<select id="fStatut"><option value="">Tous statuts</option><option>ok</option><option>a_verifier</option><option>conflit</option></select>
<select id="fDecision"><option value="">Toutes décisions</option><option value="non_traite">non traité</option><option value="valide">validé</option><option value="refuse">refusé</option><option value="corrige">corrigé</option><option value="ajoute">ajouté</option></select>
</div>
<div id="compte" class="petit"></div>
<ul id="liste"></ul>
</aside>
<div id="carte"></div>
<section id="fiche"><p class="petit">Sélectionnez un point. Raccourcis : V valider, R refuser, N suivant, P précédent. Clic sur la carte : déplacer le point sélectionné (si « Déplacer » actif) ou ajouter un point.</p></section>
</main>
<script src="vendor/leaflet/leaflet.js"></script>
<script src="app.js"></script>
</body></html>
+20
Voir le fichier
@@ -0,0 +1,20 @@
:root{--bg:#f6f6f4;--fg:#222;--pan:#fff;--bd:#ccc;--acc:#2764c5}
*{box-sizing:border-box}body{margin:0;font:13px system-ui,sans-serif;background:var(--bg);color:var(--fg);height:100vh;display:flex;flex-direction:column}
header{display:flex;gap:8px;align-items:center;padding:6px 10px;background:var(--pan);border-bottom:1px solid var(--bd)}
.sep{flex:0 0 12px}.petit{font-size:11px;color:#666}#chemin{max-width:380px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
main{flex:1;display:grid;grid-template-columns:320px 1fr 340px;min-height:0}
aside,#fiche{background:var(--pan);overflow:auto;padding:8px}aside{border-right:1px solid var(--bd);display:flex;flex-direction:column}
#fiche{border-left:1px solid var(--bd)}#carte{min-height:0}
#recherche{width:100%;padding:5px}.filtres{display:flex;gap:4px;margin:6px 0}.filtres select{flex:1;min-width:0}
#liste{list-style:none;margin:0;padding:0;overflow:auto;flex:1}
#liste li{padding:4px 6px;border-bottom:1px solid #eee;cursor:pointer;display:flex;gap:6px;align-items:center}
#liste li.sel{background:#dfe9fb}#liste li .alt{margin-left:auto;color:#666}
.pastille{width:10px;height:10px;border-radius:50%;flex:0 0 10px;border:1px solid #0005}
.d-non_traite{background:#9aa0a6}.d-valide{background:#2e9d46}.d-refuse{background:#d33}.d-corrige{background:#f39c12}.d-ajoute{background:#8e44ad}
#fiche h2{margin:0 0 4px;font-size:16px}#fiche label{display:block;margin-top:8px;font-weight:600}
#fiche input,#fiche textarea{width:100%;padding:4px}#fiche textarea{height:60px}
.boutons{display:flex;flex-wrap:wrap;gap:4px;margin-top:8px}button{cursor:pointer;padding:4px 8px}
button.actif{outline:2px solid var(--acc)}table{border-collapse:collapse;width:100%}td{border-bottom:1px solid #eee;padding:2px 4px}
a.lien{color:var(--acc);cursor:pointer;word-break:break-all;display:block}
.statut-conflit{color:#d33;font-weight:600}.statut-a_verifier{color:#c77700}
@media (prefers-color-scheme:dark){:root{--bg:#1c1d1f;--fg:#e6e6e6;--pan:#26282b;--bd:#444}#liste li{border-color:#333}#liste li.sel{background:#2f3d55}.petit,#liste li .alt{color:#aaa}td{border-color:#333}}
BIN
Voir le fichier
Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 1.2 KiB

BIN
Voir le fichier
Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 696 B

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 2.4 KiB

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 1.4 KiB

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 618 B

+661
Voir le fichier
@@ -0,0 +1,661 @@
/* required styles */
.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
position: absolute;
left: 0;
top: 0;
}
.leaflet-container {
overflow: hidden;
}
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
-webkit-user-drag: none;
}
/* Prevents IE11 from highlighting tiles in blue */
.leaflet-tile::selection {
background: transparent;
}
/* Safari renders non-retina tile on retina better with this, but Chrome is worse */
.leaflet-safari .leaflet-tile {
image-rendering: -webkit-optimize-contrast;
}
/* hack that prevents hw layers "stretching" when loading new tiles */
.leaflet-safari .leaflet-tile-container {
width: 1600px;
height: 1600px;
-webkit-transform-origin: 0 0;
}
.leaflet-marker-icon,
.leaflet-marker-shadow {
display: block;
}
/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
.leaflet-container .leaflet-overlay-pane svg {
max-width: none !important;
max-height: none !important;
}
.leaflet-container .leaflet-marker-pane img,
.leaflet-container .leaflet-shadow-pane img,
.leaflet-container .leaflet-tile-pane img,
.leaflet-container img.leaflet-image-layer,
.leaflet-container .leaflet-tile {
max-width: none !important;
max-height: none !important;
width: auto;
padding: 0;
}
.leaflet-container img.leaflet-tile {
/* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */
mix-blend-mode: plus-lighter;
}
.leaflet-container.leaflet-touch-zoom {
-ms-touch-action: pan-x pan-y;
touch-action: pan-x pan-y;
}
.leaflet-container.leaflet-touch-drag {
-ms-touch-action: pinch-zoom;
/* Fallback for FF which doesn't support pinch-zoom */
touch-action: none;
touch-action: pinch-zoom;
}
.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
-ms-touch-action: none;
touch-action: none;
}
.leaflet-container {
-webkit-tap-highlight-color: transparent;
}
.leaflet-container a {
-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);
}
.leaflet-tile {
filter: inherit;
visibility: hidden;
}
.leaflet-tile-loaded {
visibility: inherit;
}
.leaflet-zoom-box {
width: 0;
height: 0;
-moz-box-sizing: border-box;
box-sizing: border-box;
z-index: 800;
}
/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
.leaflet-overlay-pane svg {
-moz-user-select: none;
}
.leaflet-pane { z-index: 400; }
.leaflet-tile-pane { z-index: 200; }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane { z-index: 500; }
.leaflet-marker-pane { z-index: 600; }
.leaflet-tooltip-pane { z-index: 650; }
.leaflet-popup-pane { z-index: 700; }
.leaflet-map-pane canvas { z-index: 100; }
.leaflet-map-pane svg { z-index: 200; }
.leaflet-vml-shape {
width: 1px;
height: 1px;
}
.lvml {
behavior: url(#default#VML);
display: inline-block;
position: absolute;
}
/* control positioning */
.leaflet-control {
position: relative;
z-index: 800;
pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
pointer-events: auto;
}
.leaflet-top,
.leaflet-bottom {
position: absolute;
z-index: 1000;
pointer-events: none;
}
.leaflet-top {
top: 0;
}
.leaflet-right {
right: 0;
}
.leaflet-bottom {
bottom: 0;
}
.leaflet-left {
left: 0;
}
.leaflet-control {
float: left;
clear: both;
}
.leaflet-right .leaflet-control {
float: right;
}
.leaflet-top .leaflet-control {
margin-top: 10px;
}
.leaflet-bottom .leaflet-control {
margin-bottom: 10px;
}
.leaflet-left .leaflet-control {
margin-left: 10px;
}
.leaflet-right .leaflet-control {
margin-right: 10px;
}
/* zoom and fade animations */
.leaflet-fade-anim .leaflet-popup {
opacity: 0;
-webkit-transition: opacity 0.2s linear;
-moz-transition: opacity 0.2s linear;
transition: opacity 0.2s linear;
}
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
opacity: 1;
}
.leaflet-zoom-animated {
-webkit-transform-origin: 0 0;
-ms-transform-origin: 0 0;
transform-origin: 0 0;
}
svg.leaflet-zoom-animated {
will-change: transform;
}
.leaflet-zoom-anim .leaflet-zoom-animated {
-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
-moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
transition: transform 0.25s cubic-bezier(0,0,0.25,1);
}
.leaflet-zoom-anim .leaflet-tile,
.leaflet-pan-anim .leaflet-tile {
-webkit-transition: none;
-moz-transition: none;
transition: none;
}
.leaflet-zoom-anim .leaflet-zoom-hide {
visibility: hidden;
}
/* cursors */
.leaflet-interactive {
cursor: pointer;
}
.leaflet-grab {
cursor: -webkit-grab;
cursor: -moz-grab;
cursor: grab;
}
.leaflet-crosshair,
.leaflet-crosshair .leaflet-interactive {
cursor: crosshair;
}
.leaflet-popup-pane,
.leaflet-control {
cursor: auto;
}
.leaflet-dragging .leaflet-grab,
.leaflet-dragging .leaflet-grab .leaflet-interactive,
.leaflet-dragging .leaflet-marker-draggable {
cursor: move;
cursor: -webkit-grabbing;
cursor: -moz-grabbing;
cursor: grabbing;
}
/* marker & overlays interactivity */
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-image-layer,
.leaflet-pane > svg path,
.leaflet-tile-container {
pointer-events: none;
}
.leaflet-marker-icon.leaflet-interactive,
.leaflet-image-layer.leaflet-interactive,
.leaflet-pane > svg path.leaflet-interactive,
svg.leaflet-image-layer.leaflet-interactive path {
pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
pointer-events: auto;
}
/* visual tweaks */
.leaflet-container {
background: #ddd;
outline-offset: 1px;
}
.leaflet-container a {
color: #0078A8;
}
.leaflet-zoom-box {
border: 2px dotted #38f;
background: rgba(255,255,255,0.5);
}
/* general typography */
.leaflet-container {
font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
font-size: 12px;
font-size: 0.75rem;
line-height: 1.5;
}
/* general toolbar styles */
.leaflet-bar {
box-shadow: 0 1px 5px rgba(0,0,0,0.65);
border-radius: 4px;
}
.leaflet-bar a {
background-color: #fff;
border-bottom: 1px solid #ccc;
width: 26px;
height: 26px;
line-height: 26px;
display: block;
text-align: center;
text-decoration: none;
color: black;
}
.leaflet-bar a,
.leaflet-control-layers-toggle {
background-position: 50% 50%;
background-repeat: no-repeat;
display: block;
}
.leaflet-bar a:hover,
.leaflet-bar a:focus {
background-color: #f4f4f4;
}
.leaflet-bar a:first-child {
border-top-left-radius: 4px;
border-top-right-radius: 4px;
}
.leaflet-bar a:last-child {
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
border-bottom: none;
}
.leaflet-bar a.leaflet-disabled {
cursor: default;
background-color: #f4f4f4;
color: #bbb;
}
.leaflet-touch .leaflet-bar a {
width: 30px;
height: 30px;
line-height: 30px;
}
.leaflet-touch .leaflet-bar a:first-child {
border-top-left-radius: 2px;
border-top-right-radius: 2px;
}
.leaflet-touch .leaflet-bar a:last-child {
border-bottom-left-radius: 2px;
border-bottom-right-radius: 2px;
}
/* zoom control */
.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
font: bold 18px 'Lucida Console', Monaco, monospace;
text-indent: 1px;
}
.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {
font-size: 22px;
}
/* layers control */
.leaflet-control-layers {
box-shadow: 0 1px 5px rgba(0,0,0,0.4);
background: #fff;
border-radius: 5px;
}
.leaflet-control-layers-toggle {
background-image: url(images/layers.png);
width: 36px;
height: 36px;
}
.leaflet-retina .leaflet-control-layers-toggle {
background-image: url(images/layers-2x.png);
background-size: 26px 26px;
}
.leaflet-touch .leaflet-control-layers-toggle {
width: 44px;
height: 44px;
}
.leaflet-control-layers .leaflet-control-layers-list,
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
display: none;
}
.leaflet-control-layers-expanded .leaflet-control-layers-list {
display: block;
position: relative;
}
.leaflet-control-layers-expanded {
padding: 6px 10px 6px 6px;
color: #333;
background: #fff;
}
.leaflet-control-layers-scrollbar {
overflow-y: scroll;
overflow-x: hidden;
padding-right: 5px;
}
.leaflet-control-layers-selector {
margin-top: 2px;
position: relative;
top: 1px;
}
.leaflet-control-layers label {
display: block;
font-size: 13px;
font-size: 1.08333em;
}
.leaflet-control-layers-separator {
height: 0;
border-top: 1px solid #ddd;
margin: 5px -10px 5px -6px;
}
/* Default icon URLs */
.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */
background-image: url(images/marker-icon.png);
}
/* attribution and scale controls */
.leaflet-container .leaflet-control-attribution {
background: #fff;
background: rgba(255, 255, 255, 0.8);
margin: 0;
}
.leaflet-control-attribution,
.leaflet-control-scale-line {
padding: 0 5px;
color: #333;
line-height: 1.4;
}
.leaflet-control-attribution a {
text-decoration: none;
}
.leaflet-control-attribution a:hover,
.leaflet-control-attribution a:focus {
text-decoration: underline;
}
.leaflet-attribution-flag {
display: inline !important;
vertical-align: baseline !important;
width: 1em;
height: 0.6669em;
}
.leaflet-left .leaflet-control-scale {
margin-left: 5px;
}
.leaflet-bottom .leaflet-control-scale {
margin-bottom: 5px;
}
.leaflet-control-scale-line {
border: 2px solid #777;
border-top: none;
line-height: 1.1;
padding: 2px 5px 1px;
white-space: nowrap;
-moz-box-sizing: border-box;
box-sizing: border-box;
background: rgba(255, 255, 255, 0.8);
text-shadow: 1px 1px #fff;
}
.leaflet-control-scale-line:not(:first-child) {
border-top: 2px solid #777;
border-bottom: none;
margin-top: -2px;
}
.leaflet-control-scale-line:not(:first-child):not(:last-child) {
border-bottom: 2px solid #777;
}
.leaflet-touch .leaflet-control-attribution,
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
box-shadow: none;
}
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
border: 2px solid rgba(0,0,0,0.2);
background-clip: padding-box;
}
/* popup */
.leaflet-popup {
position: absolute;
text-align: center;
margin-bottom: 20px;
}
.leaflet-popup-content-wrapper {
padding: 1px;
text-align: left;
border-radius: 12px;
}
.leaflet-popup-content {
margin: 13px 24px 13px 20px;
line-height: 1.3;
font-size: 13px;
font-size: 1.08333em;
min-height: 1px;
}
.leaflet-popup-content p {
margin: 17px 0;
margin: 1.3em 0;
}
.leaflet-popup-tip-container {
width: 40px;
height: 20px;
position: absolute;
left: 50%;
margin-top: -1px;
margin-left: -20px;
overflow: hidden;
pointer-events: none;
}
.leaflet-popup-tip {
width: 17px;
height: 17px;
padding: 1px;
margin: -10px auto 0;
pointer-events: auto;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
}
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
background: white;
color: #333;
box-shadow: 0 3px 14px rgba(0,0,0,0.4);
}
.leaflet-container a.leaflet-popup-close-button {
position: absolute;
top: 0;
right: 0;
border: none;
text-align: center;
width: 24px;
height: 24px;
font: 16px/24px Tahoma, Verdana, sans-serif;
color: #757575;
text-decoration: none;
background: transparent;
}
.leaflet-container a.leaflet-popup-close-button:hover,
.leaflet-container a.leaflet-popup-close-button:focus {
color: #585858;
}
.leaflet-popup-scrolled {
overflow: auto;
}
.leaflet-oldie .leaflet-popup-content-wrapper {
-ms-zoom: 1;
}
.leaflet-oldie .leaflet-popup-tip {
width: 24px;
margin: 0 auto;
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
}
.leaflet-oldie .leaflet-control-zoom,
.leaflet-oldie .leaflet-control-layers,
.leaflet-oldie .leaflet-popup-content-wrapper,
.leaflet-oldie .leaflet-popup-tip {
border: 1px solid #999;
}
/* div icon */
.leaflet-div-icon {
background: #fff;
border: 1px solid #666;
}
/* Tooltip */
/* Base styles for the element that has a tooltip */
.leaflet-tooltip {
position: absolute;
padding: 6px;
background-color: #fff;
border: 1px solid #fff;
border-radius: 3px;
color: #222;
white-space: nowrap;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
pointer-events: none;
box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.leaflet-tooltip.leaflet-interactive {
cursor: pointer;
pointer-events: auto;
}
.leaflet-tooltip-top:before,
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
position: absolute;
pointer-events: none;
border: 6px solid transparent;
background: transparent;
content: "";
}
/* Directions */
.leaflet-tooltip-bottom {
margin-top: 6px;
}
.leaflet-tooltip-top {
margin-top: -6px;
}
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-top:before {
left: 50%;
margin-left: -6px;
}
.leaflet-tooltip-top:before {
bottom: 0;
margin-bottom: -12px;
border-top-color: #fff;
}
.leaflet-tooltip-bottom:before {
top: 0;
margin-top: -12px;
margin-left: -6px;
border-bottom-color: #fff;
}
.leaflet-tooltip-left {
margin-left: -6px;
}
.leaflet-tooltip-right {
margin-left: 6px;
}
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
top: 50%;
margin-top: -6px;
}
.leaflet-tooltip-left:before {
right: 0;
margin-right: -12px;
border-left-color: #fff;
}
.leaflet-tooltip-right:before {
left: 0;
margin-left: -12px;
border-right-color: #fff;
}
/* Printing */
@media print {
/* Prevent printers from removing background-images of controls. */
.leaflet-control {
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
}
+6
Voir le fichier
@@ -0,0 +1,6 @@
/* @preserve
* Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
* (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).leaflet={})}(this,function(t){"use strict";function l(t){for(var e,i,n=1,o=arguments.length;n<o;n++)for(e in i=arguments[n])t[e]=i[e];return t}var R=Object.create||function(t){return N.prototype=t,new N};function N(){}function a(t,e){var i,n=Array.prototype.slice;return t.bind?t.bind.apply(t,n.call(arguments,1)):(i=n.call(arguments,2),function(){return t.apply(e,i.length?i.concat(n.call(arguments)):arguments)})}var D=0;function h(t){return"_leaflet_id"in t||(t._leaflet_id=++D),t._leaflet_id}function j(t,e,i){var n,o,s=function(){n=!1,o&&(r.apply(i,o),o=!1)},r=function(){n?o=arguments:(t.apply(i,arguments),setTimeout(s,e),n=!0)};return r}function H(t,e,i){var n=e[1],e=e[0],o=n-e;return t===n&&i?t:((t-e)%o+o)%o+e}function u(){return!1}function i(t,e){return!1===e?t:(e=Math.pow(10,void 0===e?6:e),Math.round(t*e)/e)}function W(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function F(t){return W(t).split(/\s+/)}function c(t,e){for(var i in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?R(t.options):{}),e)t.options[i]=e[i];return t.options}function U(t,e,i){var n,o=[];for(n in t)o.push(encodeURIComponent(i?n.toUpperCase():n)+"="+encodeURIComponent(t[n]));return(e&&-1!==e.indexOf("?")?"&":"?")+o.join("&")}var V=/\{ *([\w_ -]+) *\}/g;function q(t,i){return t.replace(V,function(t,e){e=i[e];if(void 0===e)throw new Error("No value provided for variable "+t);return e="function"==typeof e?e(i):e})}var d=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function G(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1}var K="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function Y(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var X=0;function J(t){var e=+new Date,i=Math.max(0,16-(e-X));return X=e+i,window.setTimeout(t,i)}var $=window.requestAnimationFrame||Y("RequestAnimationFrame")||J,Q=window.cancelAnimationFrame||Y("CancelAnimationFrame")||Y("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function x(t,e,i){if(!i||$!==J)return $.call(window,a(t,e));t.call(e)}function r(t){t&&Q.call(window,t)}var tt={__proto__:null,extend:l,create:R,bind:a,get lastId(){return D},stamp:h,throttle:j,wrapNum:H,falseFn:u,formatNum:i,trim:W,splitWords:F,setOptions:c,getParamString:U,template:q,isArray:d,indexOf:G,emptyImageUrl:K,requestFn:$,cancelFn:Q,requestAnimFrame:x,cancelAnimFrame:r};function et(){}et.extend=function(t){function e(){c(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()}var i,n=e.__super__=this.prototype,o=R(n);for(i in(o.constructor=e).prototype=o,this)Object.prototype.hasOwnProperty.call(this,i)&&"prototype"!==i&&"__super__"!==i&&(e[i]=this[i]);if(t.statics&&l(e,t.statics),t.includes){var s=t.includes;if("undefined"!=typeof L&&L&&L.Mixin){s=d(s)?s:[s];for(var r=0;r<s.length;r++)s[r]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}l.apply(null,[o].concat(t.includes))}return l(o,t),delete o.statics,delete o.includes,o.options&&(o.options=n.options?R(n.options):{},l(o.options,t.options)),o._initHooks=[],o.callInitHooks=function(){if(!this._initHooksCalled){n.callInitHooks&&n.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=o._initHooks.length;t<e;t++)o._initHooks[t].call(this)}},e},et.include=function(t){var e=this.prototype.options;return l(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},et.mergeOptions=function(t){return l(this.prototype.options,t),this},et.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};var e={on:function(t,e,i){if("object"==typeof t)for(var n in t)this._on(n,t[n],e);else for(var o=0,s=(t=F(t)).length;o<s;o++)this._on(t[o],e,i);return this},off:function(t,e,i){if(arguments.length)if("object"==typeof t)for(var n in t)this._off(n,t[n],e);else{t=F(t);for(var o=1===arguments.length,s=0,r=t.length;s<r;s++)o?this._off(t[s]):this._off(t[s],e,i)}else delete this._events;return this},_on:function(t,e,i,n){"function"!=typeof e?console.warn("wrong listener type: "+typeof e):!1===this._listens(t,e,i)&&(e={fn:e,ctx:i=i===this?void 0:i},n&&(e.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(e))},_off:function(t,e,i){var n,o,s;if(this._events&&(n=this._events[t]))if(1===arguments.length){if(this._firingCount)for(o=0,s=n.length;o<s;o++)n[o].fn=u;delete this._events[t]}else"function"!=typeof e?console.warn("wrong listener type: "+typeof e):!1!==(e=this._listens(Ligne tronquée
//# sourceMappingURL=leaflet.js.map