@budibase/server
Version:
Budibase Web Server
901 lines • 445 kB
JavaScript
import { Q as W, R as Bo, S as oa, i as sa, s as aa, e as Cn, a as Sr, b as Sn, f as Ei, g as gi, q as la, k as _i, z as ca, n as Mn, A as ha, h as da, o as Ai, u as Gu, v as fa, aO as pa, aa as ma, w as ga, t as Ur, j as _a, aM as $u, c as Xu, m as Yu, p as Ku, ac as ba } from "./index-fc73233e.js";
import { r as qe } from "./___vite-browser-external_commonjs-proxy-5f1afbec.js";
var Lr = { exports: {} };
/* @preserve
* Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
* (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
*/
(function(o, i) {
(function(n, r) {
r(i);
})(W, function(n) {
function r(e) {
for (var t, u, s = 1, l = arguments.length; s < l; s++)
for (t in u = arguments[s])
e[t] = u[t];
return e;
}
var a = Object.create || function(e) {
return c.prototype = e, new c();
};
function c() {
}
function p(e, t) {
var u, s = Array.prototype.slice;
return e.bind ? e.bind.apply(e, s.call(arguments, 1)) : (u = s.call(arguments, 2), function() {
return e.apply(t, u.length ? u.concat(s.call(arguments)) : arguments);
});
}
var g = 0;
function d(e) {
return "_leaflet_id" in e || (e._leaflet_id = ++g), e._leaflet_id;
}
function _(e, t, u) {
var s, l, h = function() {
s = !1, l && (y.apply(u, l), l = !1);
}, y = function() {
s ? l = arguments : (e.apply(u, arguments), setTimeout(h, t), s = !0);
};
return y;
}
function v(e, l, u) {
var s = l[1], l = l[0], h = s - l;
return e === s && u ? e : ((e - l) % h + h) % h + l;
}
function S() {
return !1;
}
function f(e, t) {
return t === !1 ? e : (t = Math.pow(10, t === void 0 ? 6 : t), Math.round(e * t) / t);
}
function m(e) {
return e.trim ? e.trim() : e.replace(/^\s+|\s+$/g, "");
}
function N(e) {
return m(e).split(/\s+/);
}
function I(e, t) {
for (var u in Object.prototype.hasOwnProperty.call(e, "options") || (e.options = e.options ? a(e.options) : {}), t)
e.options[u] = t[u];
return e.options;
}
function E(e, t, u) {
var s, l = [];
for (s in e)
l.push(encodeURIComponent(u ? s.toUpperCase() : s) + "=" + encodeURIComponent(e[s]));
return (t && t.indexOf("?") !== -1 ? "&" : "?") + l.join("&");
}
var z = /\{ *([\w_ -]+) *\}/g;
function H(e, t) {
return e.replace(z, function(u, s) {
if (s = t[s], s === void 0)
throw new Error("No value provided for variable " + u);
return s = typeof s == "function" ? s(t) : s;
});
}
var U = Array.isArray || function(e) {
return Object.prototype.toString.call(e) === "[object Array]";
};
function G(e, t) {
for (var u = 0; u < e.length; u++)
if (e[u] === t)
return u;
return -1;
}
var re = "data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";
function he(e) {
return window["webkit" + e] || window["moz" + e] || window["ms" + e];
}
var Le = 0;
function se(e) {
var t = +/* @__PURE__ */ new Date(), u = Math.max(0, 16 - (t - Le));
return Le = t + u, window.setTimeout(e, u);
}
var be = window.requestAnimationFrame || he("RequestAnimationFrame") || se, xe = window.cancelAnimationFrame || he("CancelAnimationFrame") || he("CancelRequestAnimationFrame") || function(e) {
window.clearTimeout(e);
};
function T(e, t, u) {
if (!u || be !== se)
return be.call(window, p(e, t));
e.call(t);
}
function A(e) {
e && xe.call(window, e);
}
var D = { __proto__: null, extend: r, create: a, bind: p, get lastId() {
return g;
}, stamp: d, throttle: _, wrapNum: v, falseFn: S, formatNum: f, trim: m, splitWords: N, setOptions: I, getParamString: E, template: H, isArray: U, indexOf: G, emptyImageUrl: re, requestFn: be, cancelFn: xe, requestAnimFrame: T, cancelAnimFrame: A };
function Z() {
}
Z.extend = function(e) {
function t() {
I(this), this.initialize && this.initialize.apply(this, arguments), this.callInitHooks();
}
var u, s = t.__super__ = this.prototype, l = a(s);
for (u in (l.constructor = t).prototype = l, this)
Object.prototype.hasOwnProperty.call(this, u) && u !== "prototype" && u !== "__super__" && (t[u] = this[u]);
if (e.statics && r(t, e.statics), e.includes) {
var h = e.includes;
if (typeof L < "u" && L && L.Mixin) {
h = U(h) ? h : [h];
for (var y = 0; y < h.length; y++)
h[y] === 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);
}
r.apply(null, [l].concat(e.includes));
}
return r(l, e), delete l.statics, delete l.includes, l.options && (l.options = s.options ? a(s.options) : {}, r(l.options, e.options)), l._initHooks = [], l.callInitHooks = function() {
if (!this._initHooksCalled) {
s.callInitHooks && s.callInitHooks.call(this), this._initHooksCalled = !0;
for (var b = 0, P = l._initHooks.length; b < P; b++)
l._initHooks[b].call(this);
}
}, t;
}, Z.include = function(e) {
var t = this.prototype.options;
return r(this.prototype, e), e.options && (this.prototype.options = t, this.mergeOptions(e.options)), this;
}, Z.mergeOptions = function(e) {
return r(this.prototype.options, e), this;
}, Z.addInitHook = function(e) {
var t = Array.prototype.slice.call(arguments, 1), u = typeof e == "function" ? e : function() {
this[e].apply(this, t);
};
return this.prototype._initHooks = this.prototype._initHooks || [], this.prototype._initHooks.push(u), this;
};
var x = { on: function(e, t, u) {
if (typeof e == "object")
for (var s in e)
this._on(s, e[s], t);
else
for (var l = 0, h = (e = N(e)).length; l < h; l++)
this._on(e[l], t, u);
return this;
}, off: function(e, t, u) {
if (arguments.length)
if (typeof e == "object")
for (var s in e)
this._off(s, e[s], t);
else {
e = N(e);
for (var l = arguments.length === 1, h = 0, y = e.length; h < y; h++)
l ? this._off(e[h]) : this._off(e[h], t, u);
}
else
delete this._events;
return this;
}, _on: function(e, t, u, s) {
typeof t != "function" ? console.warn("wrong listener type: " + typeof t) : this._listens(e, t, u) === !1 && (t = { fn: t, ctx: u = u === this ? void 0 : u }, s && (t.once = !0), this._events = this._events || {}, this._events[e] = this._events[e] || [], this._events[e].push(t));
}, _off: function(e, t, u) {
var s, l, h;
if (this._events && (s = this._events[e]))
if (arguments.length === 1) {
if (this._firingCount)
for (l = 0, h = s.length; l < h; l++)
s[l].fn = S;
delete this._events[e];
} else
typeof t != "function" ? console.warn("wrong listener type: " + typeof t) : (t = this._listens(e, t, u)) !== !1 && (u = s[t], this._firingCount && (u.fn = S, this._events[e] = s = s.slice()), s.splice(t, 1));
}, fire: function(e, t, u) {
if (this.listens(e, u)) {
var s = r({}, t, { type: e, target: this, sourceTarget: t && t.sourceTarget || this });
if (this._events) {
var l = this._events[e];
if (l) {
this._firingCount = this._firingCount + 1 || 1;
for (var h = 0, y = l.length; h < y; h++) {
var b = l[h], P = b.fn;
b.once && this.off(e, P, b.ctx), P.call(b.ctx || this, s);
}
this._firingCount--;
}
}
u && this._propagateEvent(s);
}
return this;
}, listens: function(e, t, u, s) {
typeof e != "string" && console.warn('"string" type argument expected');
var l = t, h = (typeof t != "function" && (s = !!t, u = l = void 0), this._events && this._events[e]);
if (h && h.length && this._listens(e, l, u) !== !1)
return !0;
if (s) {
for (var y in this._eventParents)
if (this._eventParents[y].listens(e, t, u, s))
return !0;
}
return !1;
}, _listens: function(e, t, u) {
if (this._events) {
var s = this._events[e] || [];
if (!t)
return !!s.length;
u === this && (u = void 0);
for (var l = 0, h = s.length; l < h; l++)
if (s[l].fn === t && s[l].ctx === u)
return l;
}
return !1;
}, once: function(e, t, u) {
if (typeof e == "object")
for (var s in e)
this._on(s, e[s], t, !0);
else
for (var l = 0, h = (e = N(e)).length; l < h; l++)
this._on(e[l], t, u, !0);
return this;
}, addEventParent: function(e) {
return this._eventParents = this._eventParents || {}, this._eventParents[d(e)] = e, this;
}, removeEventParent: function(e) {
return this._eventParents && delete this._eventParents[d(e)], this;
}, _propagateEvent: function(e) {
for (var t in this._eventParents)
this._eventParents[t].fire(e.type, r({ layer: e.target, propagatedFrom: e.target }, e), !0);
} }, C = (x.addEventListener = x.on, x.removeEventListener = x.clearAllEventListeners = x.off, x.addOneTimeEventListener = x.once, x.fireEvent = x.fire, x.hasEventListeners = x.listens, Z.extend(x));
function w(e, t, u) {
this.x = u ? Math.round(e) : e, this.y = u ? Math.round(t) : t;
}
var R = Math.trunc || function(e) {
return 0 < e ? Math.floor(e) : Math.ceil(e);
};
function M(e, t, u) {
return e instanceof w ? e : U(e) ? new w(e[0], e[1]) : e == null ? e : typeof e == "object" && "x" in e && "y" in e ? new w(e.x, e.y) : new w(e, t, u);
}
function V(e, t) {
if (e)
for (var u = t ? [e, t] : e, s = 0, l = u.length; s < l; s++)
this.extend(u[s]);
}
function pe(e, t) {
return !e || e instanceof V ? e : new V(e, t);
}
function we(e, t) {
if (e)
for (var u = t ? [e, t] : e, s = 0, l = u.length; s < l; s++)
this.extend(u[s]);
}
function F(e, t) {
return e instanceof we ? e : new we(e, t);
}
function j(e, t, u) {
if (isNaN(e) || isNaN(t))
throw new Error("Invalid LatLng object: (" + e + ", " + t + ")");
this.lat = +e, this.lng = +t, u !== void 0 && (this.alt = +u);
}
function K(e, t, u) {
return e instanceof j ? e : U(e) && typeof e[0] != "object" ? e.length === 3 ? new j(e[0], e[1], e[2]) : e.length === 2 ? new j(e[0], e[1]) : null : e == null ? e : typeof e == "object" && "lat" in e ? new j(e.lat, "lng" in e ? e.lng : e.lon, e.alt) : t === void 0 ? null : new j(e, t, u);
}
w.prototype = { clone: function() {
return new w(this.x, this.y);
}, add: function(e) {
return this.clone()._add(M(e));
}, _add: function(e) {
return this.x += e.x, this.y += e.y, this;
}, subtract: function(e) {
return this.clone()._subtract(M(e));
}, _subtract: function(e) {
return this.x -= e.x, this.y -= e.y, this;
}, divideBy: function(e) {
return this.clone()._divideBy(e);
}, _divideBy: function(e) {
return this.x /= e, this.y /= e, this;
}, multiplyBy: function(e) {
return this.clone()._multiplyBy(e);
}, _multiplyBy: function(e) {
return this.x *= e, this.y *= e, this;
}, scaleBy: function(e) {
return new w(this.x * e.x, this.y * e.y);
}, unscaleBy: function(e) {
return new w(this.x / e.x, this.y / e.y);
}, round: function() {
return this.clone()._round();
}, _round: function() {
return this.x = Math.round(this.x), this.y = Math.round(this.y), this;
}, floor: function() {
return this.clone()._floor();
}, _floor: function() {
return this.x = Math.floor(this.x), this.y = Math.floor(this.y), this;
}, ceil: function() {
return this.clone()._ceil();
}, _ceil: function() {
return this.x = Math.ceil(this.x), this.y = Math.ceil(this.y), this;
}, trunc: function() {
return this.clone()._trunc();
}, _trunc: function() {
return this.x = R(this.x), this.y = R(this.y), this;
}, distanceTo: function(u) {
var t = (u = M(u)).x - this.x, u = u.y - this.y;
return Math.sqrt(t * t + u * u);
}, equals: function(e) {
return (e = M(e)).x === this.x && e.y === this.y;
}, contains: function(e) {
return e = M(e), Math.abs(e.x) <= Math.abs(this.x) && Math.abs(e.y) <= Math.abs(this.y);
}, toString: function() {
return "Point(" + f(this.x) + ", " + f(this.y) + ")";
} }, V.prototype = { extend: function(e) {
var t, u;
if (e) {
if (e instanceof w || typeof e[0] == "number" || "x" in e)
t = u = M(e);
else if (t = (e = pe(e)).min, u = e.max, !t || !u)
return this;
this.min || this.max ? (this.min.x = Math.min(t.x, this.min.x), this.max.x = Math.max(u.x, this.max.x), this.min.y = Math.min(t.y, this.min.y), this.max.y = Math.max(u.y, this.max.y)) : (this.min = t.clone(), this.max = u.clone());
}
return this;
}, getCenter: function(e) {
return M((this.min.x + this.max.x) / 2, (this.min.y + this.max.y) / 2, e);
}, getBottomLeft: function() {
return M(this.min.x, this.max.y);
}, getTopRight: function() {
return M(this.max.x, this.min.y);
}, getTopLeft: function() {
return this.min;
}, getBottomRight: function() {
return this.max;
}, getSize: function() {
return this.max.subtract(this.min);
}, contains: function(e) {
var t, u;
return (e = (typeof e[0] == "number" || e instanceof w ? M : pe)(e)) instanceof V ? (t = e.min, u = e.max) : t = u = e, t.x >= this.min.x && u.x <= this.max.x && t.y >= this.min.y && u.y <= this.max.y;
}, intersects: function(h) {
h = pe(h);
var t = this.min, u = this.max, s = h.min, h = h.max, l = h.x >= t.x && s.x <= u.x, h = h.y >= t.y && s.y <= u.y;
return l && h;
}, overlaps: function(h) {
h = pe(h);
var t = this.min, u = this.max, s = h.min, h = h.max, l = h.x > t.x && s.x < u.x, h = h.y > t.y && s.y < u.y;
return l && h;
}, isValid: function() {
return !(!this.min || !this.max);
}, pad: function(l) {
var t = this.min, u = this.max, s = Math.abs(t.x - u.x) * l, l = Math.abs(t.y - u.y) * l;
return pe(M(t.x - s, t.y - l), M(u.x + s, u.y + l));
}, equals: function(e) {
return !!e && (e = pe(e), this.min.equals(e.getTopLeft()) && this.max.equals(e.getBottomRight()));
} }, we.prototype = { extend: function(e) {
var t, u, s = this._southWest, l = this._northEast;
if (e instanceof j)
u = t = e;
else {
if (!(e instanceof we))
return e ? this.extend(K(e) || F(e)) : this;
if (t = e._southWest, u = e._northEast, !t || !u)
return this;
}
return s || l ? (s.lat = Math.min(t.lat, s.lat), s.lng = Math.min(t.lng, s.lng), l.lat = Math.max(u.lat, l.lat), l.lng = Math.max(u.lng, l.lng)) : (this._southWest = new j(t.lat, t.lng), this._northEast = new j(u.lat, u.lng)), this;
}, pad: function(l) {
var t = this._southWest, u = this._northEast, s = Math.abs(t.lat - u.lat) * l, l = Math.abs(t.lng - u.lng) * l;
return new we(new j(t.lat - s, t.lng - l), new j(u.lat + s, u.lng + l));
}, getCenter: function() {
return new j((this._southWest.lat + this._northEast.lat) / 2, (this._southWest.lng + this._northEast.lng) / 2);
}, getSouthWest: function() {
return this._southWest;
}, getNorthEast: function() {
return this._northEast;
}, getNorthWest: function() {
return new j(this.getNorth(), this.getWest());
}, getSouthEast: function() {
return new j(this.getSouth(), this.getEast());
}, getWest: function() {
return this._southWest.lng;
}, getSouth: function() {
return this._southWest.lat;
}, getEast: function() {
return this._northEast.lng;
}, getNorth: function() {
return this._northEast.lat;
}, contains: function(e) {
e = (typeof e[0] == "number" || e instanceof j || "lat" in e ? K : F)(e);
var t, u, s = this._southWest, l = this._northEast;
return e instanceof we ? (t = e.getSouthWest(), u = e.getNorthEast()) : t = u = e, t.lat >= s.lat && u.lat <= l.lat && t.lng >= s.lng && u.lng <= l.lng;
}, intersects: function(h) {
h = F(h);
var t = this._southWest, u = this._northEast, s = h.getSouthWest(), h = h.getNorthEast(), l = h.lat >= t.lat && s.lat <= u.lat, h = h.lng >= t.lng && s.lng <= u.lng;
return l && h;
}, overlaps: function(h) {
h = F(h);
var t = this._southWest, u = this._northEast, s = h.getSouthWest(), h = h.getNorthEast(), l = h.lat > t.lat && s.lat < u.lat, h = h.lng > t.lng && s.lng < u.lng;
return l && h;
}, toBBoxString: function() {
return [this.getWest(), this.getSouth(), this.getEast(), this.getNorth()].join(",");
}, equals: function(e, t) {
return !!e && (e = F(e), this._southWest.equals(e.getSouthWest(), t) && this._northEast.equals(e.getNorthEast(), t));
}, isValid: function() {
return !(!this._southWest || !this._northEast);
} };
var X = { latLngToPoint: function(e, t) {
return e = this.projection.project(e), t = this.scale(t), this.transformation._transform(e, t);
}, pointToLatLng: function(e, t) {
return t = this.scale(t), e = this.transformation.untransform(e, t), this.projection.unproject(e);
}, project: function(e) {
return this.projection.project(e);
}, unproject: function(e) {
return this.projection.unproject(e);
}, scale: function(e) {
return 256 * Math.pow(2, e);
}, zoom: function(e) {
return Math.log(e / 256) / Math.LN2;
}, getProjectedBounds: function(e) {
var t;
return this.infinite ? null : (t = this.projection.bounds, e = this.scale(e), new V(this.transformation.transform(t.min, e), this.transformation.transform(t.max, e)));
}, infinite: !(j.prototype = { equals: function(e, t) {
return !!e && (e = K(e), Math.max(Math.abs(this.lat - e.lat), Math.abs(this.lng - e.lng)) <= (t === void 0 ? 1e-9 : t));
}, toString: function(e) {
return "LatLng(" + f(this.lat, e) + ", " + f(this.lng, e) + ")";
}, distanceTo: function(e) {
return $.distance(this, K(e));
}, wrap: function() {
return $.wrapLatLng(this);
}, toBounds: function(t) {
var t = 180 * t / 40075017, u = t / Math.cos(Math.PI / 180 * this.lat);
return F([this.lat - t, this.lng - u], [this.lat + t, this.lng + u]);
}, clone: function() {
return new j(this.lat, this.lng, this.alt);
} }), wrapLatLng: function(e) {
var t = this.wrapLng ? v(e.lng, this.wrapLng, !0) : e.lng;
return new j(this.wrapLat ? v(e.lat, this.wrapLat, !0) : e.lat, t, e.alt);
}, wrapLatLngBounds: function(e) {
var s = e.getCenter(), t = this.wrapLatLng(s), u = s.lat - t.lat, s = s.lng - t.lng;
return u == 0 && s == 0 ? e : (t = e.getSouthWest(), e = e.getNorthEast(), new we(new j(t.lat - u, t.lng - s), new j(e.lat - u, e.lng - s)));
} }, $ = r({}, X, { wrapLng: [-180, 180], R: 6371e3, distance: function(y, h) {
var b = Math.PI / 180, u = y.lat * b, s = h.lat * b, l = Math.sin((h.lat - y.lat) * b / 2), h = Math.sin((h.lng - y.lng) * b / 2), y = l * l + Math.cos(u) * Math.cos(s) * h * h, b = 2 * Math.atan2(Math.sqrt(y), Math.sqrt(1 - y));
return this.R * b;
} }), _e = 6378137, _e = { R: _e, MAX_LATITUDE: 85.0511287798, project: function(e) {
var t = Math.PI / 180, u = this.MAX_LATITUDE, u = Math.max(Math.min(u, e.lat), -u), u = Math.sin(u * t);
return new w(this.R * e.lng * t, this.R * Math.log((1 + u) / (1 - u)) / 2);
}, unproject: function(e) {
var t = 180 / Math.PI;
return new j((2 * Math.atan(Math.exp(e.y / this.R)) - Math.PI / 2) * t, e.x * t / this.R);
}, bounds: new V([-(_e = _e * Math.PI), -_e], [_e, _e]) };
function Ee(e, t, u, s) {
U(e) ? (this._a = e[0], this._b = e[1], this._c = e[2], this._d = e[3]) : (this._a = e, this._b = t, this._c = u, this._d = s);
}
function Te(e, t, u, s) {
return new Ee(e, t, u, s);
}
Ee.prototype = { transform: function(e, t) {
return this._transform(e.clone(), t);
}, _transform: function(e, t) {
return e.x = (t = t || 1) * (this._a * e.x + this._b), e.y = t * (this._c * e.y + this._d), e;
}, untransform: function(e, t) {
return new w((e.x / (t = t || 1) - this._b) / this._a, (e.y / t - this._d) / this._c);
} };
var We = r({}, $, { code: "EPSG:3857", projection: _e, transformation: Te(We = 0.5 / (Math.PI * _e.R), 0.5, -We, 0.5) }), At = r({}, We, { code: "EPSG:900913" });
function Ct(e) {
return document.createElementNS("http://www.w3.org/2000/svg", e);
}
function Mt(e, t) {
for (var u, s, l, h, y = "", b = 0, P = e.length; b < P; b++) {
for (u = 0, s = (l = e[b]).length; u < s; u++)
y += (u ? "L" : "M") + (h = l[u]).x + " " + h.y;
y += t ? B.svg ? "z" : "x" : "";
}
return y || "M0 0";
}
var Je = document.documentElement.style, st = "ActiveXObject" in window, hr = st && !document.addEventListener, Ie = "msLaunchUri" in navigator && !("documentMode" in document), ri = de("webkit"), Gi = de("android"), Xi = de("android 2") || de("android 3"), xt = parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1], 10), xt = Gi && de("Google") && xt < 537 && !("AudioNode" in window), wt = !!window.opera, Yi = !Ie && de("chrome"), Ot = de("gecko") && !ri && !wt && !st, mr = !Yi && de("safari"), Ki = de("phantom"), Ce = "OTransition" in Je, mt = navigator.platform.indexOf("Win") === 0, un = st && "transition" in Je, li = "WebKitCSSMatrix" in window && "m11" in new window.WebKitCSSMatrix() && !Xi, Je = "MozPerspective" in Je, cn = !window.L_DISABLE_3D && (un || li || Je) && !Ce && !Ki, ct = typeof orientation < "u" || de("mobile"), hn = ct && ri, dn = ct && li, hi = !window.PointerEvent && window.MSPointerEvent, di = !(!window.PointerEvent && !hi), Di = "ontouchstart" in window || !!window.TouchEvent, Gn = !window.L_NO_TOUCH && (Di || di), Bi = ct && wt, $n = ct && Ot, Xn = 1 < (window.devicePixelRatio || window.screen.deviceXDPI / window.screen.logicalXDPI), Kt = function() {
var e = !1;
try {
var t = Object.defineProperty({}, "passive", { get: function() {
e = !0;
} });
window.addEventListener("testPassiveEventSupport", S, t), window.removeEventListener("testPassiveEventSupport", S, t);
} catch {
}
return e;
}(), Yn = !!document.createElement("canvas").getContext, O = !(!document.createElementNS || !Ct("svg").createSVGRect), ie = !!O && ((ie = document.createElement("div")).innerHTML = "<svg/>", (ie.firstChild && ie.firstChild.namespaceURI) === "http://www.w3.org/2000/svg");
function de(e) {
return 0 <= navigator.userAgent.toLowerCase().indexOf(e);
}
var B = { ie: st, ielt9: hr, edge: Ie, webkit: ri, android: Gi, android23: Xi, androidStock: xt, opera: wt, chrome: Yi, gecko: Ot, safari: mr, phantom: Ki, opera12: Ce, win: mt, ie3d: un, webkit3d: li, gecko3d: Je, any3d: cn, mobile: ct, mobileWebkit: hn, mobileWebkit3d: dn, msPointer: hi, pointer: di, touch: Gn, touchNative: Di, mobileOpera: Bi, mobileGecko: $n, retina: Xn, passiveEvents: Kt, canvas: Yn, svg: O, vml: !O && function() {
try {
var e = document.createElement("div"), t = (e.innerHTML = '<v:shape adj="1"/>', e.firstChild);
return t.style.behavior = "url(#default#VML)", t && typeof t.adj == "object";
} catch {
return !1;
}
}(), inlineSvg: ie, mac: navigator.platform.indexOf("Mac") === 0, linux: navigator.platform.indexOf("Linux") === 0 }, zi = B.msPointer ? "MSPointerDown" : "pointerdown", Jt = B.msPointer ? "MSPointerMove" : "pointermove", Ge = B.msPointer ? "MSPointerUp" : "pointerup", Ri = B.msPointer ? "MSPointerCancel" : "pointercancel", It = { touchstart: zi, touchmove: Jt, touchend: Ge, touchcancel: Ri }, ji = { touchstart: function(e, t) {
t.MSPOINTER_TYPE_TOUCH && t.pointerType === t.MSPOINTER_TYPE_TOUCH && Pe(t), qi(e, t);
}, touchmove: qi, touchend: qi, touchcancel: qi }, kt = {}, hu = !1;
function Ks(e, t, u) {
return t !== "touchstart" || hu || (document.addEventListener(zi, Js, !0), document.addEventListener(Jt, Qs, !0), document.addEventListener(Ge, du, !0), document.addEventListener(Ri, du, !0), hu = !0), ji[t] ? (u = ji[t].bind(this, u), e.addEventListener(It[t], u, !1), u) : (console.warn("wrong event specified:", t), S);
}
function Js(e) {
kt[e.pointerId] = e;
}
function Qs(e) {
kt[e.pointerId] && (kt[e.pointerId] = e);
}
function du(e) {
delete kt[e.pointerId];
}
function qi(e, t) {
if (t.pointerType !== (t.MSPOINTER_TYPE_MOUSE || "mouse")) {
for (var u in t.touches = [], kt)
t.touches.push(kt[u]);
t.changedTouches = [t], e(t);
}
}
var ea = 200;
function ta(e, t) {
e.addEventListener("dblclick", t);
var u, s = 0;
function l(h) {
var y;
h.detail !== 1 ? u = h.detail : h.pointerType === "mouse" || h.sourceCapabilities && !h.sourceCapabilities.firesTouchEvents || (y = _u(h)).some(function(b) {
return b instanceof HTMLLabelElement && b.attributes.for;
}) && !y.some(function(b) {
return b instanceof HTMLInputElement || b instanceof HTMLSelectElement;
}) || ((y = Date.now()) - s <= ea ? ++u === 2 && t(function(b) {
var P, k, q = {};
for (k in b)
P = b[k], q[k] = P && P.bind ? P.bind(b) : P;
return (b = q).type = "dblclick", q.detail = 2, q.isTrusted = !1, q._simulated = !0, q;
}(h)) : u = 1, s = y);
}
return e.addEventListener("click", l), { dblclick: t, simDblclick: l };
}
var Kn, Nt, Qt, Zi, Fi, Jn, Qn = Vi(["transform", "webkitTransform", "OTransform", "MozTransform", "msTransform"]), ei = Vi(["webkitTransition", "transition", "OTransition", "MozTransition", "msTransition"]), fu = ei === "webkitTransition" || ei === "OTransition" ? ei + "End" : "transitionend";
function pu(e) {
return typeof e == "string" ? document.getElementById(e) : e;
}
function ti(e, t) {
var u = e.style[t] || e.currentStyle && e.currentStyle[t];
return (u = u && u !== "auto" || !document.defaultView ? u : (e = document.defaultView.getComputedStyle(e, null)) ? e[t] : null) === "auto" ? null : u;
}
function oe(e, t, u) {
return e = document.createElement(e), e.className = t || "", u && u.appendChild(e), e;
}
function ge(e) {
var t = e.parentNode;
t && t.removeChild(e);
}
function Hi(e) {
for (; e.firstChild; )
e.removeChild(e.firstChild);
}
function Dt(e) {
var t = e.parentNode;
t && t.lastChild !== e && t.appendChild(e);
}
function Bt(e) {
var t = e.parentNode;
t && t.firstChild !== e && t.insertBefore(e, t.firstChild);
}
function er(e, t) {
return e.classList !== void 0 ? e.classList.contains(t) : 0 < (e = Ui(e)).length && new RegExp("(^|\\s)" + t + "(\\s|$)").test(e);
}
function te(e, t) {
var u;
if (e.classList !== void 0)
for (var s = N(t), l = 0, h = s.length; l < h; l++)
e.classList.add(s[l]);
else
er(e, t) || tr(e, ((u = Ui(e)) ? u + " " : "") + t);
}
function ye(e, t) {
e.classList !== void 0 ? e.classList.remove(t) : tr(e, m((" " + Ui(e) + " ").replace(" " + t + " ", " ")));
}
function tr(e, t) {
e.className.baseVal === void 0 ? e.className = t : e.className.baseVal = t;
}
function Ui(e) {
return (e = e.correspondingElement ? e.correspondingElement : e).className.baseVal === void 0 ? e.className : e.className.baseVal;
}
function Be(e, t) {
if ("opacity" in e.style)
e.style.opacity = t;
else if ("filter" in e.style) {
var u = !1, s = "DXImageTransform.Microsoft.Alpha";
try {
u = e.filters.item(s);
} catch {
if (t === 1)
return;
}
t = Math.round(100 * t), u ? (u.Enabled = t !== 100, u.Opacity = t) : e.style.filter += " progid:" + s + "(opacity=" + t + ")";
}
}
function Vi(e) {
for (var t = document.documentElement.style, u = 0; u < e.length; u++)
if (e[u] in t)
return e[u];
return !1;
}
function gt(e, t, u) {
t = t || new w(0, 0), e.style[Qn] = (B.ie3d ? "translate(" + t.x + "px," + t.y + "px)" : "translate3d(" + t.x + "px," + t.y + "px,0)") + (u ? " scale(" + u + ")" : "");
}
function Se(e, t) {
e._leaflet_pos = t, B.any3d ? gt(e, t) : (e.style.left = t.x + "px", e.style.top = t.y + "px");
}
function _t(e) {
return e._leaflet_pos || new w(0, 0);
}
function ir() {
Y(window, "dragstart", Pe);
}
function nr() {
ce(window, "dragstart", Pe);
}
function rr(e) {
for (; e.tabIndex === -1; )
e = e.parentNode;
e.style && (Wi(), Jn = (Fi = e).style.outlineStyle, e.style.outlineStyle = "none", Y(window, "keydown", Wi));
}
function Wi() {
Fi && (Fi.style.outlineStyle = Jn, Jn = Fi = void 0, ce(window, "keydown", Wi));
}
function mu(e) {
for (; !((e = e.parentNode).offsetWidth && e.offsetHeight || e === document.body); )
;
return e;
}
function ur(e) {
var t = e.getBoundingClientRect();
return { x: t.width / e.offsetWidth || 1, y: t.height / e.offsetHeight || 1, boundingClientRect: t };
}
Zi = "onselectstart" in document ? (Qt = function() {
Y(window, "selectstart", Pe);
}, function() {
ce(window, "selectstart", Pe);
}) : (Nt = Vi(["userSelect", "WebkitUserSelect", "OUserSelect", "MozUserSelect", "msUserSelect"]), Qt = function() {
var e;
Nt && (e = document.documentElement.style, Kn = e[Nt], e[Nt] = "none");
}, function() {
Nt && (document.documentElement.style[Nt] = Kn, Kn = void 0);
}), st = { __proto__: null, TRANSFORM: Qn, TRANSITION: ei, TRANSITION_END: fu, get: pu, getStyle: ti, create: oe, remove: ge, empty: Hi, toFront: Dt, toBack: Bt, hasClass: er, addClass: te, removeClass: ye, setClass: tr, getClass: Ui, setOpacity: Be, testProp: Vi, setTransform: gt, setPosition: Se, getPosition: _t, get disableTextSelection() {
return Qt;
}, get enableTextSelection() {
return Zi;
}, disableImageDrag: ir, enableImageDrag: nr, preventOutline: rr, restoreOutline: Wi, getSizedParentNode: mu, getScale: ur };
function Y(e, t, u, s) {
if (t && typeof t == "object")
for (var l in t)
sr(e, l, t[l], u);
else
for (var h = 0, y = (t = N(t)).length; h < y; h++)
sr(e, t[h], u, s);
return this;
}
var Ze = "_leaflet_events";
function ce(e, t, u, s) {
if (arguments.length === 1)
gu(e), delete e[Ze];
else if (t && typeof t == "object")
for (var l in t)
ar(e, l, t[l], u);
else if (t = N(t), arguments.length === 2)
gu(e, function(b) {
return G(t, b) !== -1;
});
else
for (var h = 0, y = t.length; h < y; h++)
ar(e, t[h], u, s);
return this;
}
function gu(e, t) {
for (var u in e[Ze]) {
var s = u.split(/\d/)[0];
t && !t(s) || ar(e, s, null, null, u);
}
}
var or = { mouseenter: "mouseover", mouseleave: "mouseout", wheel: !("onwheel" in window) && "mousewheel" };
function sr(e, t, u, s) {
var l, h, y = t + d(u) + (s ? "_" + d(s) : "");
e[Ze] && e[Ze][y] || (h = l = function(b) {
return u.call(s || e, b || window.event);
}, !B.touchNative && B.pointer && t.indexOf("touch") === 0 ? l = Ks(e, t, l) : B.touch && t === "dblclick" ? l = ta(e, l) : "addEventListener" in e ? t === "touchstart" || t === "touchmove" || t === "wheel" || t === "mousewheel" ? e.addEventListener(or[t] || t, l, !!B.passiveEvents && { passive: !1 }) : t === "mouseenter" || t === "mouseleave" ? e.addEventListener(or[t], l = function(b) {
b = b || window.event, cr(e, b) && h(b);
}, !1) : e.addEventListener(t, h, !1) : e.attachEvent("on" + t, l), e[Ze] = e[Ze] || {}, e[Ze][y] = l);
}
function ar(e, t, b, s, l) {
l = l || t + d(b) + (s ? "_" + d(s) : "");
var h, y, b = e[Ze] && e[Ze][l];
b && (!B.touchNative && B.pointer && t.indexOf("touch") === 0 ? (s = e, y = b, It[h = t] ? s.removeEventListener(It[h], y, !1) : console.warn("wrong event specified:", h)) : B.touch && t === "dblclick" ? (s = b, (y = e).removeEventListener("dblclick", s.dblclick), y.removeEventListener("click", s.simDblclick)) : "removeEventListener" in e ? e.removeEventListener(or[t] || t, b, !1) : e.detachEvent("on" + t, b), e[Ze][l] = null);
}
function bt(e) {
return e.stopPropagation ? e.stopPropagation() : e.originalEvent ? e.originalEvent._stopped = !0 : e.cancelBubble = !0, this;
}
function lr(e) {
return sr(e, "wheel", bt), this;
}
function ii(e) {
return Y(e, "mousedown touchstart dblclick contextmenu", bt), e._leaflet_disable_click = !0, this;
}
function Pe(e) {
return e.preventDefault ? e.preventDefault() : e.returnValue = !1, this;
}
function yt(e) {
return Pe(e), bt(e), this;
}
function _u(e) {
if (e.composedPath)
return e.composedPath();
for (var t = [], u = e.target; u; )
t.push(u), u = u.parentNode;
return t;
}
function bu(e, t) {
var u, s;
return t ? (s = (u = ur(t)).boundingClientRect, new w((e.clientX - s.left) / u.x - t.clientLeft, (e.clientY - s.top) / u.y - t.clientTop)) : new w(e.clientX, e.clientY);
}
var ia = B.linux && B.chrome ? window.devicePixelRatio : B.mac ? 3 * window.devicePixelRatio : 0 < window.devicePixelRatio ? 2 * window.devicePixelRatio : 1;
function yu(e) {
return B.edge ? e.wheelDeltaY / 2 : e.deltaY && e.deltaMode === 0 ? -e.deltaY / ia : e.deltaY && e.deltaMode === 1 ? 20 * -e.deltaY : e.deltaY && e.deltaMode === 2 ? 60 * -e.deltaY : e.deltaX || e.deltaZ ? 0 : e.wheelDelta ? (e.wheelDeltaY || e.wheelDelta) / 2 : e.detail && Math.abs(e.detail) < 32765 ? 20 * -e.detail : e.detail ? e.detail / -32765 * 60 : 0;
}
function cr(e, t) {
var u = t.relatedTarget;
if (!u)
return !0;
try {
for (; u && u !== e; )
u = u.parentNode;
} catch {
return !1;
}
return u !== e;
}
var hr = { __proto__: null, on: Y, off: ce, stopPropagation: bt, disableScrollPropagation: lr, disableClickPropagation: ii, preventDefault: Pe, stop: yt, getPropagationPath: _u, getMousePosition: bu, getWheelDelta: yu, isExternalTarget: cr, addListener: Y, removeListener: ce }, vu = C.extend({ run: function(e, t, u, s) {
this.stop(), this._el = e, this._inProgress = !0, this._duration = u || 0.25, this._easeOutPower = 1 / Math.max(s || 0.5, 0.2), this._startPos = _t(e), this._offset = t.subtract(this._startPos), this._startTime = +/* @__PURE__ */ new Date(), this.fire("start"), this._animate();
}, stop: function() {
this._inProgress && (this._step(!0), this._complete());
}, _animate: function() {
this._animId = T(this._animate, this), this._step();
}, _step: function(e) {
var t = +/* @__PURE__ */ new Date() - this._startTime, u = 1e3 * this._duration;
t < u ? this._runFrame(this._easeOut(t / u), e) : (this._runFrame(1), this._complete());
}, _runFrame: function(e, t) {
e = this._startPos.add(this._offset.multiplyBy(e)), t && e._round(), Se(this._el, e), this.fire("step");
}, _complete: function() {
A(this._animId), this._inProgress = !1, this.fire("end");
}, _easeOut: function(e) {
return 1 - Math.pow(1 - e, this._easeOutPower);
} }), ue = C.extend({ options: { crs: We, center: void 0, zoom: void 0, minZoom: void 0, maxZoom: void 0, layers: [], maxBounds: void 0, renderer: void 0, zoomAnimation: !0, zoomAnimationThreshold: 4, fadeAnimation: !0, markerZoomAnimation: !0, transform3DLimit: 8388608, zoomSnap: 1, zoomDelta: 1, trackResize: !0 }, initialize: function(e, t) {
t = I(this, t), this._handlers = [], this._layers = {}, this._zoomBoundLayers = {}, this._sizeChanged = !0, this._initContainer(e), this._initLayout(), this._onResize = p(this._onResize, this), this._initEvents(), t.maxBounds && this.setMaxBounds(t.maxBounds), t.zoom !== void 0 && (this._zoom = this._limitZoom(t.zoom)), t.center && t.zoom !== void 0 && this.setView(K(t.center), t.zoom, { reset: !0 }), this.callInitHooks(), this._zoomAnimated = ei && B.any3d && !B.mobileOpera && this.options.zoomAnimation, this._zoomAnimated && (this._createAnimProxy(), Y(this._proxy, fu, this._catchTransitionEnd, this)), this._addLayers(this.options.layers);
}, setView: function(e, t, u) {
return t = t === void 0 ? this._zoom : this._limitZoom(t), e = this._limitCenter(K(e), t, this.options.maxBounds), u = u || {}, this._stop(), this._loaded && !u.reset && u !== !0 && (u.animate !== void 0 && (u.zoom = r({ animate: u.animate }, u.zoom), u.pan = r({ animate: u.animate, duration: u.duration }, u.pan)), this._zoom !== t ? this._tryAnimatedZoom && this._tryAnimatedZoom(e, t, u.zoom) : this._tryAnimatedPan(e, u.pan)) ? (clearTimeout(this._sizeTimer), this) : (this._resetView(e, t, u.pan && u.pan.noMoveStart), this);
}, setZoom: function(e, t) {
return this._loaded ? this.setView(this.getCenter(), e, { zoom: t }) : (this._zoom = e, this);
}, zoomIn: function(e, t) {
return e = e || (B.any3d ? this.options.zoomDelta : 1), this.setZoom(this._zoom + e, t);
}, zoomOut: function(e, t) {
return e = e || (B.any3d ? this.options.zoomDelta : 1), this.setZoom(this._zoom - e, t);
}, setZoomAround: function(l, t, u) {
var h = this.getZoomScale(t), s = this.getSize().divideBy(2), l = (l instanceof w ? l : this.latLngToContainerPoint(l)).subtract(s).multiplyBy(1 - 1 / h), h = this.containerPointToLatLng(s.add(l));
return this.setView(h, t, { zoom: u });
}, _getBoundsCenterZoom: function(e, t) {
t = t || {}, e = e.getBounds ? e.getBounds() : F(e);
var u = M(t.paddingTopLeft || t.padding || [0, 0]), s = M(t.paddingBottomRight || t.padding || [0, 0]), l = this.getBoundsZoom(e, !1, u.add(s));
return (l = typeof t.maxZoom == "number" ? Math.min(t.maxZoom, l) : l) === 1 / 0 ? { center: e.getCenter(), zoom: l } : (t = s.subtract(u).divideBy(2), s = this.project(e.getSouthWest(), l), u = this.project(e.getNorthEast(), l), { center: this.unproject(s.add(u).divideBy(2).add(t), l), zoom: l });
}, fitBounds: function(e, t) {
if ((e = F(e)).isValid())
return e = this._getBoundsCenterZoom(e, t), this.setView(e.center, e.zoom, t);
throw new Error("Bounds are not valid.");
}, fitWorld: function(e) {
return this.fitBounds([[-90, -180], [90, 180]], e);
}, panTo: function(e, t) {
return this.setView(e, this._zoom, { pan: t });
}, panBy: function(e, t) {
var u;
return t = t || {}, (e = M(e).round()).x || e.y ? (t.animate === !0 || this.getSize().contains(e) ? (this._panAnim || (this._panAnim = new vu(), this._panAnim.on({ step: this._onPanTransitionStep, end: this._onPanTransitionEnd }, this)), t.noMoveStart || this.fire("movestart"), t.animate !== !1 ? (te(this._mapPane, "leaflet-pan-anim"), u = this._getMapPanePos().subtract(e).round(), this._panAnim.run(this._mapPane, u, t.duration || 0.25, t.easeLinearity)) : (this._rawPanBy(e), this.fire("move").fire("moveend"))) : this._resetView(this.unproject(this.project(this.getCenter()).add(e)), this.getZoom()), this) : this.fire("moveend");
}, flyTo: function(e, t, u) {
if ((u = u || {}).animate === !1 || !B.any3d)
return this.setView(e, t, u);
this._stop();
var s = this.project(this.getCenter()), l = this.project(e), h = this.getSize(), y = this._zoom, b = (e = K(e), t = t === void 0 ? y : t, Math.max(h.x, h.y)), P = b * this.getZoomScale(y, t), k = l.distanceTo(s) || 1, q = 1.42, J = q * q;
function Q(ve) {
return ve = (P * P - b * b + (ve ? -1 : 1) * J * J * k * k) / (2 * (ve ? P : b) * J * k), ve = Math.sqrt(ve * ve + 1) - ve, ve < 1e-9 ? -18 : Math.log(ve);
}
function me(ve) {
return (Math.exp(ve) - Math.exp(-ve)) / 2;
}
function ke(ve) {
return (Math.exp(ve) + Math.exp(-ve)) / 2;
}
var Ae = Q(0);
function Ne(ve) {
return b * (ke(Ae) * (me(ve = Ae + q * ve) / ke(ve)) - me(Ae)) / J;
}
var ra = Date.now(), Vu = (Q(1) - Ae) / q, ua = u.duration ? 1e3 * u.duration : 1e3 * Vu * 0.8;
return this._moveStart(!0, u.noMoveStart), (function ve() {
var fn = (Date.now() - ra) / ua, Wu = (1 - Math.pow(1 - fn, 1.5)) * Vu;
fn <= 1 ? (this._flyToFrame = T(ve, this), this._move(this.unproject(s.add(l.subtract(s).multiplyBy(Ne(Wu) / k)), y), this.getScaleZoom(b / (fn = Wu, b * (ke(Ae) / ke(Ae + q * fn))), y), { flyTo: !0 })) : this._move(e, t)._moveEnd(!0);
}).call(this), this;
}, flyToBounds: function(e, t) {
return e = this._getBoundsCenterZoom(e, t), this.flyTo(e.center, e.zoom, t);
}, setMaxBounds: function(e) {
return e = F(e), this.listens("moveend", this._panInsideMaxBounds) && this.off("moveend", this._panInsideMaxBounds), e.isValid() ? (this.options.maxBounds = e, this._loaded && this._panInsideMaxBounds(), this.on("moveend", this._panInsideMaxBounds)) : (this.options.maxBounds = null, this);
}, setMinZoom: function(e) {
var t = this.options.minZoom;
return this.options.minZoom = e, this._loaded && t !== e && (this.fire("zoomlevelschange"), this.getZoom() < this.options.minZoom) ? this.setZoom(e) : this;
}, setMaxZoom: function(e) {
var t = this.options.maxZoom;
return this.options.maxZoom = e, this._loaded && t !== e && (this.fire("zoomlevelschange"), this.getZoom() > this.options.maxZoom) ? this.setZoom(e) : this;
}, panInsideBounds: function(s, t) {
this._enforcingBounds = !0;
var u = this.getCenter(), s = this._limitCenter(u, this._zoom, F(s));
return u.equals(s) || this.panTo(s, t), this._enforcingBounds = !1, this;
}, panInside: function(l, t) {
var h = M((t = t || {}).paddingTopLeft || t.padding || [0, 0]), u = M(t.paddingBottomRight || t.padding || [0, 0]), s = this.project(this.getCenter()), l = this.project(l), y = this.getPixelBounds(), h = pe([y.min.add(h), y.max.subtract(u)]), y = h.getSize();
return h.contains(l) || (this._enforcingBounds = !0, u = l.subtract(h.getCenter()), h = h.extend(l).getSize().subtract(y), s.x += u.x < 0 ? -h.x : h.x, s.y += u.y < 0 ? -h.y : h.y, this.panTo(this.unproject(s), t), this._enforcingBounds = !1), this;
}, invalidateSize: function(e) {
if (!this._loaded)
return this;
e = r({ animate: !1, pan: !0 }, e === !0 ? { animate: !0 } : e);
var t = this.getSize(), u = (this._sizeChanged = !0, this._lastCenter = null, this.getSize()), l = t.divideBy(2).round(), s = u.divideBy(2).round(), l = l.subtract(s);
return l.x || l.y ? (e.animate && e.pan ? this.panBy(l) : (e.pan && this._rawPanBy(l), this.fire("move"), e.debounceMoveend ? (clearTimeout(this._sizeTimer), this._sizeTimer = setTimeout(p(this.fire, this, "moveend"), 200)) : this.fire("moveend")), this.fire("resize", { oldSize: t, newSize: u })) : this;
}, stop: function() {
return this.setZoom(this._limitZoom(this._zoom)), this.options.zoomSnap || this.fire("viewreset"), this._stop();
}, locate: function(e) {
var t, u;
return e = this._locateOptions = r({ timeout: 1e4, watch: !1 }, e), "geolocation" in navigator ? (t = p(this._handleGeolocationResponse, this), u = p(this._handleGeolocationError, this), e.watch ? this._locationWatchId = navigator.geolocation.watchPosition(t, u, e) : navigator.geolocation.getCurrentPosition(t, u, e)) : this._handleGeolocationError({ code: 0, message: "Geolocation not supported." }), this;
}, stopLocate: function() {
return navigator.geolocation && navigator.geolocation.clearWatch && navigator.geolocation.clearWatch(this._locationWatchId), this._locateOptions && (this._locateOptions.setView = !1), this;
}, _handleGeolocationError: function(e) {
var t;
this._container._leaflet_id && (t = e.code, e = e.message || (t === 1 ? "permission denied" : t === 2 ? "position unavailable" : "timeout"), this._locateOptions.setView && !this._loaded && this.fitWorld(), this.fire("locationerror", { code: t, message: "Geolocation error: " + e + "." }));
}, _handleGeolocationResponse: function(e) {
if (this._container._leaflet_id) {
var t, u, s = new j(e.coords.latitude, e.coords.longitude), l = s.toBounds(2 * e.coords.accuracy), h = this._locateOptions, y = (h.setView && (t = this.getBoundsZoom(l), this.setView(s, h.maxZoom ? Math.min(t, h.maxZoom) : t)), { latlng: s, bounds: l, timestamp: e.timestamp });
for (u in e.coords)
typeof e.coords[u] == "number" && (y[u] = e.coords[u]);
this.fire("locationfound", y);
}
}, addHandler: function(e, t) {
return t && (t = this[e] = new t(this), this._handlers.push(t), this.options[e] && t.enable()), this;
}, remove: function() {
if (this._initEvents(!0), this.options.maxBounds && this.off("moveend", this._panInsideMaxBounds), this._containerId !== this._container._leaflet_id)
throw new Error("Map container is being reused by another instance");
try {
delete this._container._leaflet_id, delete this._containerId;
} catch {
this._container._leaflet_id = void 0, this._containerId = void 0;
}
for (var e in this._locationWatchId !== void 0 && this.stopLocate(), this._stop(), ge(this._mapPane), this._clearControlPos && this._clearControlPos(), this._resizeRequest && (A(this._resizeRequest), this._resizeRequest = null), this._clearHandlers(), this._loaded && this.fire("unload"), this._layers)
this._layers[e].remove();
for (e in this._panes)
ge(this._panes[e]);
return this._layers = [], this._panes = [], delete this._mapPane, delete this._renderer, this;
}, createPane: function(e, t) {
return t = oe("div", "leaflet-pane" + (e ? " leaflet-" + e.replace("Pane", "") + "-pane" : ""), t || this._mapPane), e && (this._panes[e] = t), t;
}, getCenter: function() {
return this._checkIfLoaded(), this._lastCenter && !this._moved() ? this._lastCenter.clone() : this.layerPointToLatLng(this._getCenterLayerPoint());
}, getZoom: function() {
return this._zoom;
}, getBounds: function() {
var e = this.getPixelBounds();
return new we(this.unproject(e.getBottomLeft()), this.unproject(e.getTopRight()));
}, getMinZoom: function() {
return this.options.minZoom === void 0 ? this._layersMinZoom || 0 : this.options.minZoom;
}, getMaxZoom: function() {
return this.options.maxZoom === void 0 ? this._layersMaxZoom === void 0 ? 1 / 0 : this._layersMaxZoom : this.options.maxZoom;
}, getBoundsZoom: function(P, t, b) {
P = F(P), b = M(b || [0, 0]);
var k = this.getZoom() || 0, s = this.getMinZoom(), l = this.getMaxZoom(), h = P.getNorthWest(), P = P.getSouthEast(), b = this.getSize().subtract(b), P = pe(this.project(P, k), this.project(h, k)).getSize(), h = B.any3d ? this.options.zoomSnap : 1, y = b.x / P.x, b = b.y / P.y, P = t ? Math.max(y, b) : Math.min(y, b), k = this.getScaleZoom(P, k);
return h && (k = Math.round(k / (h / 100)) * (h / 100), k = t ? Math.ceil(k / h) * h : Math.floor(k / h) * h), Math.max(s, Math.min(l, k));
}, getSize: function() {
return this._size && !this._sizeChanged || (this._size = new w(this._container.clientWidth || 0, this._container.clientHeight || 0), this._sizeChanged = !1), this._size.clone();
}, getPixelBounds: function(e, t) {
return e = this._getTopLeftPoint(e, t), new V(e, e.add(this.getSize()));
}, getPixelOrigin: function() {
return this._checkIfLoaded(), this._pixelOrigin;
}, getPixelWorldBounds: function(e) {
return this.options.crs.getProjectedBounds(e === void 0 ? this.getZoom() : e);
}, getPane: function(e) {
return typeof e == "string" ? this._panes[e] : e;
}, getPanes: function() {
return this._panes;
}, getContainer: function() {
return this._container;
}, getZoomScale: function(e, t) {
var u = this.options.crs;
return t = t === void 0 ? this._zoom : t, u.scale(e) / u.scale(t);
}, getScaleZoom: function(s, t) {
var u = this.options.crs, s = (t = t === void 0 ? this._zoom : t, u.zoom(s * u.scale(t)));
return isNaN(s) ? 1 / 0 : s;
}, project: function(e, t) {
return t = t === void 0 ? this._zoom : t, this.options.crs.latLngToPoint(K(e), t);
}, unproject: function(e, t) {
return t = t === void 0 ? this._zoom : t, this.options.crs.pointToLatLng(M(e), t);
}, layerPointToLatLng: function(e) {
return e = M(e).add(this.getPixelOrigin()), this.unproject(e);
}, latLngToLayerPoint: function(e) {
return this.project(K(e))._round()._subtract(this.getPixelOrigin());
}, wrapLatLng: function(e) {
return this.options.crs.wrapLatLn