@burdenoff/microfe-housingvista 2026.720.1 → 2026.720.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/housingvista/components/maps/PropertyMapView.d.ts +22 -0
  2. package/dist/housingvista/components/maps/PropertyMapView.d.ts.map +1 -0
  3. package/dist/housingvista/components/maps/PropertyMapView.js +175 -0
  4. package/dist/housingvista/components/maps/PropertyMapView.js.map +1 -0
  5. package/dist/housingvista/components/maps/index.d.ts +5 -0
  6. package/dist/housingvista/components/maps/index.d.ts.map +1 -0
  7. package/dist/housingvista/components/maps/index.js +2 -0
  8. package/dist/housingvista/components/maps/leaflet-setup.d.ts +27 -0
  9. package/dist/housingvista/components/maps/leaflet-setup.d.ts.map +1 -0
  10. package/dist/housingvista/components/maps/leaflet-setup.js +36 -0
  11. package/dist/housingvista/components/maps/leaflet-setup.js.map +1 -0
  12. package/dist/housingvista/hooks/index.d.ts +1 -0
  13. package/dist/housingvista/hooks/index.d.ts.map +1 -1
  14. package/dist/housingvista/hooks/index.js +7 -4
  15. package/dist/housingvista/hooks/index.js.map +1 -1
  16. package/dist/housingvista/pages/properties/PropertiesPage.d.ts.map +1 -1
  17. package/dist/housingvista/pages/properties/PropertiesPage.js +224 -160
  18. package/dist/housingvista/pages/properties/PropertiesPage.js.map +1 -1
  19. package/dist/microfe-housingvista.css +2 -0
  20. package/dist/node_modules/@react-leaflet/core/lib/attribution.js +12 -0
  21. package/dist/node_modules/@react-leaflet/core/lib/attribution.js.map +1 -0
  22. package/dist/node_modules/@react-leaflet/core/lib/component.js +39 -0
  23. package/dist/node_modules/@react-leaflet/core/lib/component.js.map +1 -0
  24. package/dist/node_modules/@react-leaflet/core/lib/context.js +23 -0
  25. package/dist/node_modules/@react-leaflet/core/lib/context.js.map +1 -0
  26. package/dist/node_modules/@react-leaflet/core/lib/div-overlay.js +15 -0
  27. package/dist/node_modules/@react-leaflet/core/lib/div-overlay.js.map +1 -0
  28. package/dist/node_modules/@react-leaflet/core/lib/element.js +30 -0
  29. package/dist/node_modules/@react-leaflet/core/lib/element.js.map +1 -0
  30. package/dist/node_modules/@react-leaflet/core/lib/events.js +14 -0
  31. package/dist/node_modules/@react-leaflet/core/lib/events.js.map +1 -0
  32. package/dist/node_modules/@react-leaflet/core/lib/generic.js +18 -0
  33. package/dist/node_modules/@react-leaflet/core/lib/generic.js.map +1 -0
  34. package/dist/node_modules/@react-leaflet/core/lib/grid-layer.js +9 -0
  35. package/dist/node_modules/@react-leaflet/core/lib/grid-layer.js.map +1 -0
  36. package/dist/node_modules/@react-leaflet/core/lib/layer.js +23 -0
  37. package/dist/node_modules/@react-leaflet/core/lib/layer.js.map +1 -0
  38. package/dist/node_modules/@react-leaflet/core/lib/pane.js +12 -0
  39. package/dist/node_modules/@react-leaflet/core/lib/pane.js.map +1 -0
  40. package/dist/node_modules/leaflet/dist/leaflet-src.js +4585 -0
  41. package/dist/node_modules/leaflet/dist/leaflet-src.js.map +1 -0
  42. package/dist/node_modules/react-leaflet/lib/MapContainer.js +33 -0
  43. package/dist/node_modules/react-leaflet/lib/MapContainer.js.map +1 -0
  44. package/dist/node_modules/react-leaflet/lib/Marker.js +16 -0
  45. package/dist/node_modules/react-leaflet/lib/Marker.js.map +1 -0
  46. package/dist/node_modules/react-leaflet/lib/Popup.js +37 -0
  47. package/dist/node_modules/react-leaflet/lib/Popup.js.map +1 -0
  48. package/dist/node_modules/react-leaflet/lib/TileLayer.js +18 -0
  49. package/dist/node_modules/react-leaflet/lib/TileLayer.js.map +1 -0
  50. package/dist/node_modules/react-leaflet/lib/hooks.js +18 -0
  51. package/dist/node_modules/react-leaflet/lib/hooks.js.map +1 -0
  52. package/package.json +5 -1
@@ -0,0 +1,4585 @@
1
+ import { __commonJSMin as e } from "../../../_virtual/_rolldown/runtime.js";
2
+ //#region node_modules/leaflet/dist/leaflet-src.js
3
+ var t = /* @__PURE__ */ e(((e, t) => {
4
+ (function(n, r) {
5
+ typeof e == "object" && t !== void 0 ? r(e) : typeof define == "function" && define.amd ? define(["exports"], r) : (n = typeof globalThis < "u" ? globalThis : n || self, r(n.leaflet = {}));
6
+ })(e, (function(e) {
7
+ var t = "1.9.4";
8
+ function n(e) {
9
+ var t, n, r, i;
10
+ for (n = 1, r = arguments.length; n < r; n++) for (t in i = arguments[n], i) e[t] = i[t];
11
+ return e;
12
+ }
13
+ var r = Object.create || (function() {
14
+ function e() {}
15
+ return function(t) {
16
+ return e.prototype = t, new e();
17
+ };
18
+ })();
19
+ function i(e, t) {
20
+ var n = Array.prototype.slice;
21
+ if (e.bind) return e.bind.apply(e, n.call(arguments, 1));
22
+ var r = n.call(arguments, 2);
23
+ return function() {
24
+ return e.apply(t, r.length ? r.concat(n.call(arguments)) : arguments);
25
+ };
26
+ }
27
+ var a = 0;
28
+ function o(e) {
29
+ return "_leaflet_id" in e || (e._leaflet_id = ++a), e._leaflet_id;
30
+ }
31
+ function s(e, t, n) {
32
+ var r, i, a, o = function() {
33
+ r = !1, i &&= (a.apply(n, i), !1);
34
+ };
35
+ return a = function() {
36
+ r ? i = arguments : (e.apply(n, arguments), setTimeout(o, t), r = !0);
37
+ }, a;
38
+ }
39
+ function c(e, t, n) {
40
+ var r = t[1], i = t[0], a = r - i;
41
+ return e === r && n ? e : ((e - i) % a + a) % a + i;
42
+ }
43
+ function l() {
44
+ return !1;
45
+ }
46
+ function u(e, t) {
47
+ if (t === !1) return e;
48
+ var n = 10 ** (t === void 0 ? 6 : t);
49
+ return Math.round(e * n) / n;
50
+ }
51
+ function d(e) {
52
+ return e.trim ? e.trim() : e.replace(/^\s+|\s+$/g, "");
53
+ }
54
+ function f(e) {
55
+ return d(e).split(/\s+/);
56
+ }
57
+ function p(e, t) {
58
+ for (var n in Object.prototype.hasOwnProperty.call(e, "options") || (e.options = e.options ? r(e.options) : {}), t) e.options[n] = t[n];
59
+ return e.options;
60
+ }
61
+ function m(e, t, n) {
62
+ var r = [];
63
+ for (var i in e) r.push(encodeURIComponent(n ? i.toUpperCase() : i) + "=" + encodeURIComponent(e[i]));
64
+ return (!t || t.indexOf("?") === -1 ? "?" : "&") + r.join("&");
65
+ }
66
+ var ee = /\{ *([\w_ -]+) *\}/g;
67
+ function h(e, t) {
68
+ return e.replace(ee, function(e, n) {
69
+ var r = t[n];
70
+ if (r === void 0) throw Error("No value provided for variable " + e);
71
+ return typeof r == "function" && (r = r(t)), r;
72
+ });
73
+ }
74
+ var g = Array.isArray || function(e) {
75
+ return Object.prototype.toString.call(e) === "[object Array]";
76
+ };
77
+ function te(e, t) {
78
+ for (var n = 0; n < e.length; n++) if (e[n] === t) return n;
79
+ return -1;
80
+ }
81
+ var ne = "data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";
82
+ function re(e) {
83
+ return window["webkit" + e] || window["moz" + e] || window["ms" + e];
84
+ }
85
+ var ie = 0;
86
+ function ae(e) {
87
+ var t = +/* @__PURE__ */ new Date(), n = Math.max(0, 16 - (t - ie));
88
+ return ie = t + n, window.setTimeout(e, n);
89
+ }
90
+ var oe = window.requestAnimationFrame || re("RequestAnimationFrame") || ae, se = window.cancelAnimationFrame || re("CancelAnimationFrame") || re("CancelRequestAnimationFrame") || function(e) {
91
+ window.clearTimeout(e);
92
+ };
93
+ function _(e, t, n) {
94
+ if (n && oe === ae) e.call(t);
95
+ else return oe.call(window, i(e, t));
96
+ }
97
+ function v(e) {
98
+ e && se.call(window, e);
99
+ }
100
+ var ce = {
101
+ __proto__: null,
102
+ extend: n,
103
+ create: r,
104
+ bind: i,
105
+ get lastId() {
106
+ return a;
107
+ },
108
+ stamp: o,
109
+ throttle: s,
110
+ wrapNum: c,
111
+ falseFn: l,
112
+ formatNum: u,
113
+ trim: d,
114
+ splitWords: f,
115
+ setOptions: p,
116
+ getParamString: m,
117
+ template: h,
118
+ isArray: g,
119
+ indexOf: te,
120
+ emptyImageUrl: ne,
121
+ requestFn: oe,
122
+ cancelFn: se,
123
+ requestAnimFrame: _,
124
+ cancelAnimFrame: v
125
+ };
126
+ function y() {}
127
+ y.extend = function(e) {
128
+ var t = function() {
129
+ p(this), this.initialize && this.initialize.apply(this, arguments), this.callInitHooks();
130
+ }, i = t.__super__ = this.prototype, a = r(i);
131
+ for (var o in a.constructor = t, t.prototype = a, this) Object.prototype.hasOwnProperty.call(this, o) && o !== "prototype" && o !== "__super__" && (t[o] = this[o]);
132
+ return e.statics && n(t, e.statics), e.includes && (le(e.includes), n.apply(null, [a].concat(e.includes))), n(a, e), delete a.statics, delete a.includes, a.options && (a.options = i.options ? r(i.options) : {}, n(a.options, e.options)), a._initHooks = [], a.callInitHooks = function() {
133
+ if (!this._initHooksCalled) {
134
+ i.callInitHooks && i.callInitHooks.call(this), this._initHooksCalled = !0;
135
+ for (var e = 0, t = a._initHooks.length; e < t; e++) a._initHooks[e].call(this);
136
+ }
137
+ }, t;
138
+ }, y.include = function(e) {
139
+ var t = this.prototype.options;
140
+ return n(this.prototype, e), e.options && (this.prototype.options = t, this.mergeOptions(e.options)), this;
141
+ }, y.mergeOptions = function(e) {
142
+ return n(this.prototype.options, e), this;
143
+ }, y.addInitHook = function(e) {
144
+ var t = Array.prototype.slice.call(arguments, 1), n = typeof e == "function" ? e : function() {
145
+ this[e].apply(this, t);
146
+ };
147
+ return this.prototype._initHooks = this.prototype._initHooks || [], this.prototype._initHooks.push(n), this;
148
+ };
149
+ function le(e) {
150
+ if (!(typeof L > "u" || !L || !L.Mixin)) {
151
+ e = g(e) ? e : [e];
152
+ for (var t = 0; t < e.length; t++) e[t] === 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.", (/* @__PURE__ */ Error()).stack);
153
+ }
154
+ }
155
+ var b = {
156
+ on: function(e, t, n) {
157
+ if (typeof e == "object") for (var r in e) this._on(r, e[r], t);
158
+ else {
159
+ e = f(e);
160
+ for (var i = 0, a = e.length; i < a; i++) this._on(e[i], t, n);
161
+ }
162
+ return this;
163
+ },
164
+ off: function(e, t, n) {
165
+ if (!arguments.length) delete this._events;
166
+ else if (typeof e == "object") for (var r in e) this._off(r, e[r], t);
167
+ else {
168
+ e = f(e);
169
+ for (var i = arguments.length === 1, a = 0, o = e.length; a < o; a++) i ? this._off(e[a]) : this._off(e[a], t, n);
170
+ }
171
+ return this;
172
+ },
173
+ _on: function(e, t, n, r) {
174
+ if (typeof t != "function") {
175
+ console.warn("wrong listener type: " + typeof t);
176
+ return;
177
+ }
178
+ if (this._listens(e, t, n) === !1) {
179
+ n === this && (n = void 0);
180
+ var i = {
181
+ fn: t,
182
+ ctx: n
183
+ };
184
+ r && (i.once = !0), this._events = this._events || {}, this._events[e] = this._events[e] || [], this._events[e].push(i);
185
+ }
186
+ },
187
+ _off: function(e, t, n) {
188
+ var r, i, a;
189
+ if (this._events && (r = this._events[e], r)) {
190
+ if (arguments.length === 1) {
191
+ if (this._firingCount) for (i = 0, a = r.length; i < a; i++) r[i].fn = l;
192
+ delete this._events[e];
193
+ return;
194
+ }
195
+ if (typeof t != "function") {
196
+ console.warn("wrong listener type: " + typeof t);
197
+ return;
198
+ }
199
+ var o = this._listens(e, t, n);
200
+ if (o !== !1) {
201
+ var s = r[o];
202
+ this._firingCount && (s.fn = l, this._events[e] = r = r.slice()), r.splice(o, 1);
203
+ }
204
+ }
205
+ },
206
+ fire: function(e, t, r) {
207
+ if (!this.listens(e, r)) return this;
208
+ var i = n({}, t, {
209
+ type: e,
210
+ target: this,
211
+ sourceTarget: t && t.sourceTarget || this
212
+ });
213
+ if (this._events) {
214
+ var a = this._events[e];
215
+ if (a) {
216
+ this._firingCount = this._firingCount + 1 || 1;
217
+ for (var o = 0, s = a.length; o < s; o++) {
218
+ var c = a[o], l = c.fn;
219
+ c.once && this.off(e, l, c.ctx), l.call(c.ctx || this, i);
220
+ }
221
+ this._firingCount--;
222
+ }
223
+ }
224
+ return r && this._propagateEvent(i), this;
225
+ },
226
+ listens: function(e, t, n, r) {
227
+ typeof e != "string" && console.warn("\"string\" type argument expected");
228
+ var i = t;
229
+ typeof t != "function" && (r = !!t, i = void 0, n = void 0);
230
+ var a = this._events && this._events[e];
231
+ if (a && a.length && this._listens(e, i, n) !== !1) return !0;
232
+ if (r) {
233
+ for (var o in this._eventParents) if (this._eventParents[o].listens(e, t, n, r)) return !0;
234
+ }
235
+ return !1;
236
+ },
237
+ _listens: function(e, t, n) {
238
+ if (!this._events) return !1;
239
+ var r = this._events[e] || [];
240
+ if (!t) return !!r.length;
241
+ n === this && (n = void 0);
242
+ for (var i = 0, a = r.length; i < a; i++) if (r[i].fn === t && r[i].ctx === n) return i;
243
+ return !1;
244
+ },
245
+ once: function(e, t, n) {
246
+ if (typeof e == "object") for (var r in e) this._on(r, e[r], t, !0);
247
+ else {
248
+ e = f(e);
249
+ for (var i = 0, a = e.length; i < a; i++) this._on(e[i], t, n, !0);
250
+ }
251
+ return this;
252
+ },
253
+ addEventParent: function(e) {
254
+ return this._eventParents = this._eventParents || {}, this._eventParents[o(e)] = e, this;
255
+ },
256
+ removeEventParent: function(e) {
257
+ return this._eventParents && delete this._eventParents[o(e)], this;
258
+ },
259
+ _propagateEvent: function(e) {
260
+ for (var t in this._eventParents) this._eventParents[t].fire(e.type, n({
261
+ layer: e.target,
262
+ propagatedFrom: e.target
263
+ }, e), !0);
264
+ }
265
+ };
266
+ b.addEventListener = b.on, b.removeEventListener = b.clearAllEventListeners = b.off, b.addOneTimeEventListener = b.once, b.fireEvent = b.fire, b.hasEventListeners = b.listens;
267
+ var ue = y.extend(b);
268
+ function x(e, t, n) {
269
+ this.x = n ? Math.round(e) : e, this.y = n ? Math.round(t) : t;
270
+ }
271
+ var de = Math.trunc || function(e) {
272
+ return e > 0 ? Math.floor(e) : Math.ceil(e);
273
+ };
274
+ x.prototype = {
275
+ clone: function() {
276
+ return new x(this.x, this.y);
277
+ },
278
+ add: function(e) {
279
+ return this.clone()._add(S(e));
280
+ },
281
+ _add: function(e) {
282
+ return this.x += e.x, this.y += e.y, this;
283
+ },
284
+ subtract: function(e) {
285
+ return this.clone()._subtract(S(e));
286
+ },
287
+ _subtract: function(e) {
288
+ return this.x -= e.x, this.y -= e.y, this;
289
+ },
290
+ divideBy: function(e) {
291
+ return this.clone()._divideBy(e);
292
+ },
293
+ _divideBy: function(e) {
294
+ return this.x /= e, this.y /= e, this;
295
+ },
296
+ multiplyBy: function(e) {
297
+ return this.clone()._multiplyBy(e);
298
+ },
299
+ _multiplyBy: function(e) {
300
+ return this.x *= e, this.y *= e, this;
301
+ },
302
+ scaleBy: function(e) {
303
+ return new x(this.x * e.x, this.y * e.y);
304
+ },
305
+ unscaleBy: function(e) {
306
+ return new x(this.x / e.x, this.y / e.y);
307
+ },
308
+ round: function() {
309
+ return this.clone()._round();
310
+ },
311
+ _round: function() {
312
+ return this.x = Math.round(this.x), this.y = Math.round(this.y), this;
313
+ },
314
+ floor: function() {
315
+ return this.clone()._floor();
316
+ },
317
+ _floor: function() {
318
+ return this.x = Math.floor(this.x), this.y = Math.floor(this.y), this;
319
+ },
320
+ ceil: function() {
321
+ return this.clone()._ceil();
322
+ },
323
+ _ceil: function() {
324
+ return this.x = Math.ceil(this.x), this.y = Math.ceil(this.y), this;
325
+ },
326
+ trunc: function() {
327
+ return this.clone()._trunc();
328
+ },
329
+ _trunc: function() {
330
+ return this.x = de(this.x), this.y = de(this.y), this;
331
+ },
332
+ distanceTo: function(e) {
333
+ e = S(e);
334
+ var t = e.x - this.x, n = e.y - this.y;
335
+ return Math.sqrt(t * t + n * n);
336
+ },
337
+ equals: function(e) {
338
+ return e = S(e), e.x === this.x && e.y === this.y;
339
+ },
340
+ contains: function(e) {
341
+ return e = S(e), Math.abs(e.x) <= Math.abs(this.x) && Math.abs(e.y) <= Math.abs(this.y);
342
+ },
343
+ toString: function() {
344
+ return "Point(" + u(this.x) + ", " + u(this.y) + ")";
345
+ }
346
+ };
347
+ function S(e, t, n) {
348
+ return e instanceof x ? e : g(e) ? new x(e[0], e[1]) : e == null ? e : typeof e == "object" && "x" in e && "y" in e ? new x(e.x, e.y) : new x(e, t, n);
349
+ }
350
+ function C(e, t) {
351
+ if (e) for (var n = t ? [e, t] : e, r = 0, i = n.length; r < i; r++) this.extend(n[r]);
352
+ }
353
+ C.prototype = {
354
+ extend: function(e) {
355
+ var t, n;
356
+ if (!e) return this;
357
+ if (e instanceof x || typeof e[0] == "number" || "x" in e) t = n = S(e);
358
+ else if (e = w(e), t = e.min, n = e.max, !t || !n) return this;
359
+ return !this.min && !this.max ? (this.min = t.clone(), this.max = n.clone()) : (this.min.x = Math.min(t.x, this.min.x), this.max.x = Math.max(n.x, this.max.x), this.min.y = Math.min(t.y, this.min.y), this.max.y = Math.max(n.y, this.max.y)), this;
360
+ },
361
+ getCenter: function(e) {
362
+ return S((this.min.x + this.max.x) / 2, (this.min.y + this.max.y) / 2, e);
363
+ },
364
+ getBottomLeft: function() {
365
+ return S(this.min.x, this.max.y);
366
+ },
367
+ getTopRight: function() {
368
+ return S(this.max.x, this.min.y);
369
+ },
370
+ getTopLeft: function() {
371
+ return this.min;
372
+ },
373
+ getBottomRight: function() {
374
+ return this.max;
375
+ },
376
+ getSize: function() {
377
+ return this.max.subtract(this.min);
378
+ },
379
+ contains: function(e) {
380
+ var t, n;
381
+ return e = typeof e[0] == "number" || e instanceof x ? S(e) : w(e), e instanceof C ? (t = e.min, n = e.max) : t = n = e, t.x >= this.min.x && n.x <= this.max.x && t.y >= this.min.y && n.y <= this.max.y;
382
+ },
383
+ intersects: function(e) {
384
+ e = w(e);
385
+ var t = this.min, n = this.max, r = e.min, i = e.max, a = i.x >= t.x && r.x <= n.x, o = i.y >= t.y && r.y <= n.y;
386
+ return a && o;
387
+ },
388
+ overlaps: function(e) {
389
+ e = w(e);
390
+ var t = this.min, n = this.max, r = e.min, i = e.max, a = i.x > t.x && r.x < n.x, o = i.y > t.y && r.y < n.y;
391
+ return a && o;
392
+ },
393
+ isValid: function() {
394
+ return !!(this.min && this.max);
395
+ },
396
+ pad: function(e) {
397
+ var t = this.min, n = this.max, r = Math.abs(t.x - n.x) * e, i = Math.abs(t.y - n.y) * e;
398
+ return w(S(t.x - r, t.y - i), S(n.x + r, n.y + i));
399
+ },
400
+ equals: function(e) {
401
+ return e ? (e = w(e), this.min.equals(e.getTopLeft()) && this.max.equals(e.getBottomRight())) : !1;
402
+ }
403
+ };
404
+ function w(e, t) {
405
+ return !e || e instanceof C ? e : new C(e, t);
406
+ }
407
+ function T(e, t) {
408
+ if (e) for (var n = t ? [e, t] : e, r = 0, i = n.length; r < i; r++) this.extend(n[r]);
409
+ }
410
+ T.prototype = {
411
+ extend: function(e) {
412
+ var t = this._southWest, n = this._northEast, r, i;
413
+ if (e instanceof D) r = e, i = e;
414
+ else if (e instanceof T) {
415
+ if (r = e._southWest, i = e._northEast, !r || !i) return this;
416
+ } else return e ? this.extend(O(e) || E(e)) : this;
417
+ return !t && !n ? (this._southWest = new D(r.lat, r.lng), this._northEast = new D(i.lat, i.lng)) : (t.lat = Math.min(r.lat, t.lat), t.lng = Math.min(r.lng, t.lng), n.lat = Math.max(i.lat, n.lat), n.lng = Math.max(i.lng, n.lng)), this;
418
+ },
419
+ pad: function(e) {
420
+ var t = this._southWest, n = this._northEast, r = Math.abs(t.lat - n.lat) * e, i = Math.abs(t.lng - n.lng) * e;
421
+ return new T(new D(t.lat - r, t.lng - i), new D(n.lat + r, n.lng + i));
422
+ },
423
+ getCenter: function() {
424
+ return new D((this._southWest.lat + this._northEast.lat) / 2, (this._southWest.lng + this._northEast.lng) / 2);
425
+ },
426
+ getSouthWest: function() {
427
+ return this._southWest;
428
+ },
429
+ getNorthEast: function() {
430
+ return this._northEast;
431
+ },
432
+ getNorthWest: function() {
433
+ return new D(this.getNorth(), this.getWest());
434
+ },
435
+ getSouthEast: function() {
436
+ return new D(this.getSouth(), this.getEast());
437
+ },
438
+ getWest: function() {
439
+ return this._southWest.lng;
440
+ },
441
+ getSouth: function() {
442
+ return this._southWest.lat;
443
+ },
444
+ getEast: function() {
445
+ return this._northEast.lng;
446
+ },
447
+ getNorth: function() {
448
+ return this._northEast.lat;
449
+ },
450
+ contains: function(e) {
451
+ e = typeof e[0] == "number" || e instanceof D || "lat" in e ? O(e) : E(e);
452
+ var t = this._southWest, n = this._northEast, r, i;
453
+ return e instanceof T ? (r = e.getSouthWest(), i = e.getNorthEast()) : r = i = e, r.lat >= t.lat && i.lat <= n.lat && r.lng >= t.lng && i.lng <= n.lng;
454
+ },
455
+ intersects: function(e) {
456
+ e = E(e);
457
+ var t = this._southWest, n = this._northEast, r = e.getSouthWest(), i = e.getNorthEast(), a = i.lat >= t.lat && r.lat <= n.lat, o = i.lng >= t.lng && r.lng <= n.lng;
458
+ return a && o;
459
+ },
460
+ overlaps: function(e) {
461
+ e = E(e);
462
+ var t = this._southWest, n = this._northEast, r = e.getSouthWest(), i = e.getNorthEast(), a = i.lat > t.lat && r.lat < n.lat, o = i.lng > t.lng && r.lng < n.lng;
463
+ return a && o;
464
+ },
465
+ toBBoxString: function() {
466
+ return [
467
+ this.getWest(),
468
+ this.getSouth(),
469
+ this.getEast(),
470
+ this.getNorth()
471
+ ].join(",");
472
+ },
473
+ equals: function(e, t) {
474
+ return e ? (e = E(e), this._southWest.equals(e.getSouthWest(), t) && this._northEast.equals(e.getNorthEast(), t)) : !1;
475
+ },
476
+ isValid: function() {
477
+ return !!(this._southWest && this._northEast);
478
+ }
479
+ };
480
+ function E(e, t) {
481
+ return e instanceof T ? e : new T(e, t);
482
+ }
483
+ function D(e, t, n) {
484
+ if (isNaN(e) || isNaN(t)) throw Error("Invalid LatLng object: (" + e + ", " + t + ")");
485
+ this.lat = +e, this.lng = +t, n !== void 0 && (this.alt = +n);
486
+ }
487
+ D.prototype = {
488
+ equals: function(e, t) {
489
+ return e ? (e = O(e), Math.max(Math.abs(this.lat - e.lat), Math.abs(this.lng - e.lng)) <= (t === void 0 ? 1e-9 : t)) : !1;
490
+ },
491
+ toString: function(e) {
492
+ return "LatLng(" + u(this.lat, e) + ", " + u(this.lng, e) + ")";
493
+ },
494
+ distanceTo: function(e) {
495
+ return A.distance(this, O(e));
496
+ },
497
+ wrap: function() {
498
+ return A.wrapLatLng(this);
499
+ },
500
+ toBounds: function(e) {
501
+ var t = 180 * e / 40075017, n = t / Math.cos(Math.PI / 180 * this.lat);
502
+ return E([this.lat - t, this.lng - n], [this.lat + t, this.lng + n]);
503
+ },
504
+ clone: function() {
505
+ return new D(this.lat, this.lng, this.alt);
506
+ }
507
+ };
508
+ function O(e, t, n) {
509
+ return e instanceof D ? e : g(e) && typeof e[0] != "object" ? e.length === 3 ? new D(e[0], e[1], e[2]) : e.length === 2 ? new D(e[0], e[1]) : null : e == null ? e : typeof e == "object" && "lat" in e ? new D(e.lat, "lng" in e ? e.lng : e.lon, e.alt) : t === void 0 ? null : new D(e, t, n);
510
+ }
511
+ var k = {
512
+ latLngToPoint: function(e, t) {
513
+ var n = this.projection.project(e), r = this.scale(t);
514
+ return this.transformation._transform(n, r);
515
+ },
516
+ pointToLatLng: function(e, t) {
517
+ var n = this.scale(t), r = this.transformation.untransform(e, n);
518
+ return this.projection.unproject(r);
519
+ },
520
+ project: function(e) {
521
+ return this.projection.project(e);
522
+ },
523
+ unproject: function(e) {
524
+ return this.projection.unproject(e);
525
+ },
526
+ scale: function(e) {
527
+ return 256 * 2 ** e;
528
+ },
529
+ zoom: function(e) {
530
+ return Math.log(e / 256) / Math.LN2;
531
+ },
532
+ getProjectedBounds: function(e) {
533
+ if (this.infinite) return null;
534
+ var t = this.projection.bounds, n = this.scale(e);
535
+ return new C(this.transformation.transform(t.min, n), this.transformation.transform(t.max, n));
536
+ },
537
+ infinite: !1,
538
+ wrapLatLng: function(e) {
539
+ var t = this.wrapLng ? c(e.lng, this.wrapLng, !0) : e.lng, n = this.wrapLat ? c(e.lat, this.wrapLat, !0) : e.lat, r = e.alt;
540
+ return new D(n, t, r);
541
+ },
542
+ wrapLatLngBounds: function(e) {
543
+ var t = e.getCenter(), n = this.wrapLatLng(t), r = t.lat - n.lat, i = t.lng - n.lng;
544
+ if (r === 0 && i === 0) return e;
545
+ var a = e.getSouthWest(), o = e.getNorthEast();
546
+ return new T(new D(a.lat - r, a.lng - i), new D(o.lat - r, o.lng - i));
547
+ }
548
+ }, A = n({}, k, {
549
+ wrapLng: [-180, 180],
550
+ R: 6371e3,
551
+ distance: function(e, t) {
552
+ var n = Math.PI / 180, r = e.lat * n, i = t.lat * n, a = Math.sin((t.lat - e.lat) * n / 2), o = Math.sin((t.lng - e.lng) * n / 2), s = a * a + Math.cos(r) * Math.cos(i) * o * o, c = 2 * Math.atan2(Math.sqrt(s), Math.sqrt(1 - s));
553
+ return this.R * c;
554
+ }
555
+ }), fe = 6378137, pe = {
556
+ R: fe,
557
+ MAX_LATITUDE: 85.0511287798,
558
+ project: function(e) {
559
+ var t = Math.PI / 180, n = this.MAX_LATITUDE, r = Math.max(Math.min(n, e.lat), -n), i = Math.sin(r * t);
560
+ return new x(this.R * e.lng * t, this.R * Math.log((1 + i) / (1 - i)) / 2);
561
+ },
562
+ unproject: function(e) {
563
+ var t = 180 / Math.PI;
564
+ return new D((2 * Math.atan(Math.exp(e.y / this.R)) - Math.PI / 2) * t, e.x * t / this.R);
565
+ },
566
+ bounds: (function() {
567
+ var e = fe * Math.PI;
568
+ return new C([-e, -e], [e, e]);
569
+ })()
570
+ };
571
+ function me(e, t, n, r) {
572
+ if (g(e)) {
573
+ this._a = e[0], this._b = e[1], this._c = e[2], this._d = e[3];
574
+ return;
575
+ }
576
+ this._a = e, this._b = t, this._c = n, this._d = r;
577
+ }
578
+ me.prototype = {
579
+ transform: function(e, t) {
580
+ return this._transform(e.clone(), t);
581
+ },
582
+ _transform: function(e, t) {
583
+ return t ||= 1, e.x = t * (this._a * e.x + this._b), e.y = t * (this._c * e.y + this._d), e;
584
+ },
585
+ untransform: function(e, t) {
586
+ return t ||= 1, new x((e.x / t - this._b) / this._a, (e.y / t - this._d) / this._c);
587
+ }
588
+ };
589
+ function he(e, t, n, r) {
590
+ return new me(e, t, n, r);
591
+ }
592
+ var ge = n({}, A, {
593
+ code: "EPSG:3857",
594
+ projection: pe,
595
+ transformation: function() {
596
+ var e = .5 / (Math.PI * pe.R);
597
+ return he(e, .5, -e, .5);
598
+ }()
599
+ }), _e = n({}, ge, { code: "EPSG:900913" });
600
+ function ve(e) {
601
+ return document.createElementNS("http://www.w3.org/2000/svg", e);
602
+ }
603
+ function ye(e, t) {
604
+ var n = "", r, i, a, o, s, c;
605
+ for (r = 0, a = e.length; r < a; r++) {
606
+ for (s = e[r], i = 0, o = s.length; i < o; i++) c = s[i], n += (i ? "L" : "M") + c.x + " " + c.y;
607
+ n += t ? M.svg ? "z" : "x" : "";
608
+ }
609
+ return n || "M0 0";
610
+ }
611
+ var be = document.documentElement.style, xe = "ActiveXObject" in window, Se = xe && !document.addEventListener, Ce = "msLaunchUri" in navigator && !("documentMode" in document), we = j("webkit"), Te = j("android"), Ee = j("android 2") || j("android 3"), De = parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1], 10), Oe = Te && j("Google") && De < 537 && !("AudioNode" in window), ke = !!window.opera, Ae = !Ce && j("chrome"), je = j("gecko") && !we && !ke && !xe, Me = !Ae && j("safari"), Ne = j("phantom"), Pe = "OTransition" in be, Fe = navigator.platform.indexOf("Win") === 0, Ie = xe && "transition" in be, Le = "WebKitCSSMatrix" in window && "m11" in new window.WebKitCSSMatrix() && !Ee, Re = "MozPerspective" in be, ze = !window.L_DISABLE_3D && (Ie || Le || Re) && !Pe && !Ne, Be = typeof orientation < "u" || j("mobile"), Ve = Be && we, He = Be && Le, Ue = !window.PointerEvent && window.MSPointerEvent, We = !!(window.PointerEvent || Ue), Ge = "ontouchstart" in window || !!window.TouchEvent, Ke = !window.L_NO_TOUCH && (Ge || We), qe = Be && ke, Je = Be && je, Ye = (window.devicePixelRatio || window.screen.deviceXDPI / window.screen.logicalXDPI) > 1, Xe = function() {
612
+ var e = !1;
613
+ try {
614
+ var t = Object.defineProperty({}, "passive", { get: function() {
615
+ e = !0;
616
+ } });
617
+ window.addEventListener("testPassiveEventSupport", l, t), window.removeEventListener("testPassiveEventSupport", l, t);
618
+ } catch {}
619
+ return e;
620
+ }(), Ze = function() {
621
+ return !!document.createElement("canvas").getContext;
622
+ }(), Qe = !!(document.createElementNS && ve("svg").createSVGRect), $e = !!Qe && (function() {
623
+ var e = document.createElement("div");
624
+ return e.innerHTML = "<svg/>", (e.firstChild && e.firstChild.namespaceURI) === "http://www.w3.org/2000/svg";
625
+ })(), et = !Qe && function() {
626
+ try {
627
+ var e = document.createElement("div");
628
+ e.innerHTML = "<v:shape adj=\"1\"/>";
629
+ var t = e.firstChild;
630
+ return t.style.behavior = "url(#default#VML)", t && typeof t.adj == "object";
631
+ } catch {
632
+ return !1;
633
+ }
634
+ }(), tt = navigator.platform.indexOf("Mac") === 0, nt = navigator.platform.indexOf("Linux") === 0;
635
+ function j(e) {
636
+ return navigator.userAgent.toLowerCase().indexOf(e) >= 0;
637
+ }
638
+ var M = {
639
+ ie: xe,
640
+ ielt9: Se,
641
+ edge: Ce,
642
+ webkit: we,
643
+ android: Te,
644
+ android23: Ee,
645
+ androidStock: Oe,
646
+ opera: ke,
647
+ chrome: Ae,
648
+ gecko: je,
649
+ safari: Me,
650
+ phantom: Ne,
651
+ opera12: Pe,
652
+ win: Fe,
653
+ ie3d: Ie,
654
+ webkit3d: Le,
655
+ gecko3d: Re,
656
+ any3d: ze,
657
+ mobile: Be,
658
+ mobileWebkit: Ve,
659
+ mobileWebkit3d: He,
660
+ msPointer: Ue,
661
+ pointer: We,
662
+ touch: Ke,
663
+ touchNative: Ge,
664
+ mobileOpera: qe,
665
+ mobileGecko: Je,
666
+ retina: Ye,
667
+ passiveEvents: Xe,
668
+ canvas: Ze,
669
+ svg: Qe,
670
+ vml: et,
671
+ inlineSvg: $e,
672
+ mac: tt,
673
+ linux: nt
674
+ }, rt = M.msPointer ? "MSPointerDown" : "pointerdown", it = M.msPointer ? "MSPointerMove" : "pointermove", at = M.msPointer ? "MSPointerUp" : "pointerup", ot = M.msPointer ? "MSPointerCancel" : "pointercancel", st = {
675
+ touchstart: rt,
676
+ touchmove: it,
677
+ touchend: at,
678
+ touchcancel: ot
679
+ }, ct = {
680
+ touchstart: vt,
681
+ touchmove: _t,
682
+ touchend: _t,
683
+ touchcancel: _t
684
+ }, lt = {}, ut = !1;
685
+ function dt(e, t, n) {
686
+ return t === "touchstart" && gt(), ct[t] ? (n = ct[t].bind(this, n), e.addEventListener(st[t], n, !1), n) : (console.warn("wrong event specified:", t), l);
687
+ }
688
+ function ft(e, t, n) {
689
+ if (!st[t]) {
690
+ console.warn("wrong event specified:", t);
691
+ return;
692
+ }
693
+ e.removeEventListener(st[t], n, !1);
694
+ }
695
+ function pt(e) {
696
+ lt[e.pointerId] = e;
697
+ }
698
+ function mt(e) {
699
+ lt[e.pointerId] && (lt[e.pointerId] = e);
700
+ }
701
+ function ht(e) {
702
+ delete lt[e.pointerId];
703
+ }
704
+ function gt() {
705
+ ut ||= (document.addEventListener(rt, pt, !0), document.addEventListener(it, mt, !0), document.addEventListener(at, ht, !0), document.addEventListener(ot, ht, !0), !0);
706
+ }
707
+ function _t(e, t) {
708
+ if (t.pointerType !== (t.MSPOINTER_TYPE_MOUSE || "mouse")) {
709
+ for (var n in t.touches = [], lt) t.touches.push(lt[n]);
710
+ t.changedTouches = [t], e(t);
711
+ }
712
+ }
713
+ function vt(e, t) {
714
+ t.MSPOINTER_TYPE_TOUCH && t.pointerType === t.MSPOINTER_TYPE_TOUCH && U(t), _t(e, t);
715
+ }
716
+ function yt(e) {
717
+ var t = {}, n, r;
718
+ for (r in e) n = e[r], t[r] = n && n.bind ? n.bind(e) : n;
719
+ return e = t, t.type = "dblclick", t.detail = 2, t.isTrusted = !1, t._simulated = !0, t;
720
+ }
721
+ var bt = 200;
722
+ function xt(e, t) {
723
+ e.addEventListener("dblclick", t);
724
+ var n = 0, r;
725
+ function i(e) {
726
+ if (e.detail !== 1) {
727
+ r = e.detail;
728
+ return;
729
+ }
730
+ if (!(e.pointerType === "mouse" || e.sourceCapabilities && !e.sourceCapabilities.firesTouchEvents)) {
731
+ var i = on(e);
732
+ if (!(i.some(function(e) {
733
+ return e instanceof HTMLLabelElement && e.attributes.for;
734
+ }) && !i.some(function(e) {
735
+ return e instanceof HTMLInputElement || e instanceof HTMLSelectElement;
736
+ }))) {
737
+ var a = Date.now();
738
+ a - n <= bt ? (r++, r === 2 && t(yt(e))) : r = 1, n = a;
739
+ }
740
+ }
741
+ }
742
+ return e.addEventListener("click", i), {
743
+ dblclick: t,
744
+ simDblclick: i
745
+ };
746
+ }
747
+ function St(e, t) {
748
+ e.removeEventListener("dblclick", t.dblclick), e.removeEventListener("click", t.simDblclick);
749
+ }
750
+ var Ct = Ft([
751
+ "transform",
752
+ "webkitTransform",
753
+ "OTransform",
754
+ "MozTransform",
755
+ "msTransform"
756
+ ]), wt = Ft([
757
+ "webkitTransition",
758
+ "transition",
759
+ "OTransition",
760
+ "MozTransition",
761
+ "msTransition"
762
+ ]), Tt = wt === "webkitTransition" || wt === "OTransition" ? wt + "End" : "transitionend";
763
+ function Et(e) {
764
+ return typeof e == "string" ? document.getElementById(e) : e;
765
+ }
766
+ function Dt(e, t) {
767
+ var n = e.style[t] || e.currentStyle && e.currentStyle[t];
768
+ if ((!n || n === "auto") && document.defaultView) {
769
+ var r = document.defaultView.getComputedStyle(e, null);
770
+ n = r ? r[t] : null;
771
+ }
772
+ return n === "auto" ? null : n;
773
+ }
774
+ function N(e, t, n) {
775
+ var r = document.createElement(e);
776
+ return r.className = t || "", n && n.appendChild(r), r;
777
+ }
778
+ function P(e) {
779
+ var t = e.parentNode;
780
+ t && t.removeChild(e);
781
+ }
782
+ function Ot(e) {
783
+ for (; e.firstChild;) e.removeChild(e.firstChild);
784
+ }
785
+ function kt(e) {
786
+ var t = e.parentNode;
787
+ t && t.lastChild !== e && t.appendChild(e);
788
+ }
789
+ function At(e) {
790
+ var t = e.parentNode;
791
+ t && t.firstChild !== e && t.insertBefore(e, t.firstChild);
792
+ }
793
+ function jt(e, t) {
794
+ if (e.classList !== void 0) return e.classList.contains(t);
795
+ var n = Nt(e);
796
+ return n.length > 0 && RegExp("(^|\\s)" + t + "(\\s|$)").test(n);
797
+ }
798
+ function F(e, t) {
799
+ if (e.classList !== void 0) for (var n = f(t), r = 0, i = n.length; r < i; r++) e.classList.add(n[r]);
800
+ else if (!jt(e, t)) {
801
+ var a = Nt(e);
802
+ Mt(e, (a ? a + " " : "") + t);
803
+ }
804
+ }
805
+ function I(e, t) {
806
+ e.classList === void 0 ? Mt(e, d((" " + Nt(e) + " ").replace(" " + t + " ", " "))) : e.classList.remove(t);
807
+ }
808
+ function Mt(e, t) {
809
+ e.className.baseVal === void 0 ? e.className = t : e.className.baseVal = t;
810
+ }
811
+ function Nt(e) {
812
+ return e.correspondingElement && (e = e.correspondingElement), e.className.baseVal === void 0 ? e.className : e.className.baseVal;
813
+ }
814
+ function R(e, t) {
815
+ "opacity" in e.style ? e.style.opacity = t : "filter" in e.style && Pt(e, t);
816
+ }
817
+ function Pt(e, t) {
818
+ var n = !1, r = "DXImageTransform.Microsoft.Alpha";
819
+ try {
820
+ n = e.filters.item(r);
821
+ } catch {
822
+ if (t === 1) return;
823
+ }
824
+ t = Math.round(t * 100), n ? (n.Enabled = t !== 100, n.Opacity = t) : e.style.filter += " progid:" + r + "(opacity=" + t + ")";
825
+ }
826
+ function Ft(e) {
827
+ for (var t = document.documentElement.style, n = 0; n < e.length; n++) if (e[n] in t) return e[n];
828
+ return !1;
829
+ }
830
+ function It(e, t, n) {
831
+ var r = t || new x(0, 0);
832
+ e.style[Ct] = (M.ie3d ? "translate(" + r.x + "px," + r.y + "px)" : "translate3d(" + r.x + "px," + r.y + "px,0)") + (n ? " scale(" + n + ")" : "");
833
+ }
834
+ function z(e, t) {
835
+ e._leaflet_pos = t, M.any3d ? It(e, t) : (e.style.left = t.x + "px", e.style.top = t.y + "px");
836
+ }
837
+ function Lt(e) {
838
+ return e._leaflet_pos || new x(0, 0);
839
+ }
840
+ var Rt, zt, Bt;
841
+ if ("onselectstart" in document) Rt = function() {
842
+ B(window, "selectstart", U);
843
+ }, zt = function() {
844
+ H(window, "selectstart", U);
845
+ };
846
+ else {
847
+ var Vt = Ft([
848
+ "userSelect",
849
+ "WebkitUserSelect",
850
+ "OUserSelect",
851
+ "MozUserSelect",
852
+ "msUserSelect"
853
+ ]);
854
+ Rt = function() {
855
+ if (Vt) {
856
+ var e = document.documentElement.style;
857
+ Bt = e[Vt], e[Vt] = "none";
858
+ }
859
+ }, zt = function() {
860
+ Vt && (document.documentElement.style[Vt] = Bt, Bt = void 0);
861
+ };
862
+ }
863
+ function Ht() {
864
+ B(window, "dragstart", U);
865
+ }
866
+ function Ut() {
867
+ H(window, "dragstart", U);
868
+ }
869
+ var Wt, Gt;
870
+ function Kt(e) {
871
+ for (; e.tabIndex === -1;) e = e.parentNode;
872
+ e.style && (qt(), Wt = e, Gt = e.style.outlineStyle, e.style.outlineStyle = "none", B(window, "keydown", qt));
873
+ }
874
+ function qt() {
875
+ Wt && (Wt.style.outlineStyle = Gt, Wt = void 0, Gt = void 0, H(window, "keydown", qt));
876
+ }
877
+ function Jt(e) {
878
+ do
879
+ e = e.parentNode;
880
+ while ((!e.offsetWidth || !e.offsetHeight) && e !== document.body);
881
+ return e;
882
+ }
883
+ function Yt(e) {
884
+ var t = e.getBoundingClientRect();
885
+ return {
886
+ x: t.width / e.offsetWidth || 1,
887
+ y: t.height / e.offsetHeight || 1,
888
+ boundingClientRect: t
889
+ };
890
+ }
891
+ var Xt = {
892
+ __proto__: null,
893
+ TRANSFORM: Ct,
894
+ TRANSITION: wt,
895
+ TRANSITION_END: Tt,
896
+ get: Et,
897
+ getStyle: Dt,
898
+ create: N,
899
+ remove: P,
900
+ empty: Ot,
901
+ toFront: kt,
902
+ toBack: At,
903
+ hasClass: jt,
904
+ addClass: F,
905
+ removeClass: I,
906
+ setClass: Mt,
907
+ getClass: Nt,
908
+ setOpacity: R,
909
+ testProp: Ft,
910
+ setTransform: It,
911
+ setPosition: z,
912
+ getPosition: Lt,
913
+ get disableTextSelection() {
914
+ return Rt;
915
+ },
916
+ get enableTextSelection() {
917
+ return zt;
918
+ },
919
+ disableImageDrag: Ht,
920
+ enableImageDrag: Ut,
921
+ preventOutline: Kt,
922
+ restoreOutline: qt,
923
+ getSizedParentNode: Jt,
924
+ getScale: Yt
925
+ };
926
+ function B(e, t, n, r) {
927
+ if (t && typeof t == "object") for (var i in t) $t(e, i, t[i], n);
928
+ else {
929
+ t = f(t);
930
+ for (var a = 0, o = t.length; a < o; a++) $t(e, t[a], n, r);
931
+ }
932
+ return this;
933
+ }
934
+ var V = "_leaflet_events";
935
+ function H(e, t, n, r) {
936
+ if (arguments.length === 1) Zt(e), delete e[V];
937
+ else if (t && typeof t == "object") for (var i in t) en(e, i, t[i], n);
938
+ else if (t = f(t), arguments.length === 2) Zt(e, function(e) {
939
+ return te(t, e) !== -1;
940
+ });
941
+ else for (var a = 0, o = t.length; a < o; a++) en(e, t[a], n, r);
942
+ return this;
943
+ }
944
+ function Zt(e, t) {
945
+ for (var n in e[V]) {
946
+ var r = n.split(/\d/)[0];
947
+ (!t || t(r)) && en(e, r, null, null, n);
948
+ }
949
+ }
950
+ var Qt = {
951
+ mouseenter: "mouseover",
952
+ mouseleave: "mouseout",
953
+ wheel: !("onwheel" in window) && "mousewheel"
954
+ };
955
+ function $t(e, t, n, r) {
956
+ var i = t + o(n) + (r ? "_" + o(r) : "");
957
+ if (e[V] && e[V][i]) return this;
958
+ var a = function(t) {
959
+ return n.call(r || e, t || window.event);
960
+ }, s = a;
961
+ !M.touchNative && M.pointer && t.indexOf("touch") === 0 ? a = dt(e, t, a) : M.touch && t === "dblclick" ? a = xt(e, a) : "addEventListener" in e ? t === "touchstart" || t === "touchmove" || t === "wheel" || t === "mousewheel" ? e.addEventListener(Qt[t] || t, a, M.passiveEvents ? { passive: !1 } : !1) : t === "mouseenter" || t === "mouseleave" ? (a = function(t) {
962
+ t ||= window.event, un(e, t) && s(t);
963
+ }, e.addEventListener(Qt[t], a, !1)) : e.addEventListener(t, s, !1) : e.attachEvent("on" + t, a), e[V] = e[V] || {}, e[V][i] = a;
964
+ }
965
+ function en(e, t, n, r, i) {
966
+ i ||= t + o(n) + (r ? "_" + o(r) : "");
967
+ var a = e[V] && e[V][i];
968
+ if (!a) return this;
969
+ !M.touchNative && M.pointer && t.indexOf("touch") === 0 ? ft(e, t, a) : M.touch && t === "dblclick" ? St(e, a) : "removeEventListener" in e ? e.removeEventListener(Qt[t] || t, a, !1) : e.detachEvent("on" + t, a), e[V][i] = null;
970
+ }
971
+ function tn(e) {
972
+ return e.stopPropagation ? e.stopPropagation() : e.originalEvent ? e.originalEvent._stopped = !0 : e.cancelBubble = !0, this;
973
+ }
974
+ function nn(e) {
975
+ return $t(e, "wheel", tn), this;
976
+ }
977
+ function rn(e) {
978
+ return B(e, "mousedown touchstart dblclick contextmenu", tn), e._leaflet_disable_click = !0, this;
979
+ }
980
+ function U(e) {
981
+ return e.preventDefault ? e.preventDefault() : e.returnValue = !1, this;
982
+ }
983
+ function an(e) {
984
+ return U(e), tn(e), this;
985
+ }
986
+ function on(e) {
987
+ if (e.composedPath) return e.composedPath();
988
+ for (var t = [], n = e.target; n;) t.push(n), n = n.parentNode;
989
+ return t;
990
+ }
991
+ function sn(e, t) {
992
+ if (!t) return new x(e.clientX, e.clientY);
993
+ var n = Yt(t), r = n.boundingClientRect;
994
+ return new x((e.clientX - r.left) / n.x - t.clientLeft, (e.clientY - r.top) / n.y - t.clientTop);
995
+ }
996
+ var cn = M.linux && M.chrome ? window.devicePixelRatio : M.mac ? window.devicePixelRatio * 3 : window.devicePixelRatio > 0 ? 2 * window.devicePixelRatio : 1;
997
+ function ln(e) {
998
+ return M.edge ? e.wheelDeltaY / 2 : e.deltaY && e.deltaMode === 0 ? -e.deltaY / cn : e.deltaY && e.deltaMode === 1 ? -e.deltaY * 20 : e.deltaY && e.deltaMode === 2 ? -e.deltaY * 60 : e.deltaX || e.deltaZ ? 0 : e.wheelDelta ? (e.wheelDeltaY || e.wheelDelta) / 2 : e.detail && Math.abs(e.detail) < 32765 ? -e.detail * 20 : e.detail ? e.detail / -32765 * 60 : 0;
999
+ }
1000
+ function un(e, t) {
1001
+ var n = t.relatedTarget;
1002
+ if (!n) return !0;
1003
+ try {
1004
+ for (; n && n !== e;) n = n.parentNode;
1005
+ } catch {
1006
+ return !1;
1007
+ }
1008
+ return n !== e;
1009
+ }
1010
+ var dn = {
1011
+ __proto__: null,
1012
+ on: B,
1013
+ off: H,
1014
+ stopPropagation: tn,
1015
+ disableScrollPropagation: nn,
1016
+ disableClickPropagation: rn,
1017
+ preventDefault: U,
1018
+ stop: an,
1019
+ getPropagationPath: on,
1020
+ getMousePosition: sn,
1021
+ getWheelDelta: ln,
1022
+ isExternalTarget: un,
1023
+ addListener: B,
1024
+ removeListener: H
1025
+ }, fn = ue.extend({
1026
+ run: function(e, t, n, r) {
1027
+ this.stop(), this._el = e, this._inProgress = !0, this._duration = n || .25, this._easeOutPower = 1 / Math.max(r || .5, .2), this._startPos = Lt(e), this._offset = t.subtract(this._startPos), this._startTime = +/* @__PURE__ */ new Date(), this.fire("start"), this._animate();
1028
+ },
1029
+ stop: function() {
1030
+ this._inProgress && (this._step(!0), this._complete());
1031
+ },
1032
+ _animate: function() {
1033
+ this._animId = _(this._animate, this), this._step();
1034
+ },
1035
+ _step: function(e) {
1036
+ var t = +/* @__PURE__ */ new Date() - this._startTime, n = this._duration * 1e3;
1037
+ t < n ? this._runFrame(this._easeOut(t / n), e) : (this._runFrame(1), this._complete());
1038
+ },
1039
+ _runFrame: function(e, t) {
1040
+ var n = this._startPos.add(this._offset.multiplyBy(e));
1041
+ t && n._round(), z(this._el, n), this.fire("step");
1042
+ },
1043
+ _complete: function() {
1044
+ v(this._animId), this._inProgress = !1, this.fire("end");
1045
+ },
1046
+ _easeOut: function(e) {
1047
+ return 1 - (1 - e) ** this._easeOutPower;
1048
+ }
1049
+ }), W = ue.extend({
1050
+ options: {
1051
+ crs: ge,
1052
+ center: void 0,
1053
+ zoom: void 0,
1054
+ minZoom: void 0,
1055
+ maxZoom: void 0,
1056
+ layers: [],
1057
+ maxBounds: void 0,
1058
+ renderer: void 0,
1059
+ zoomAnimation: !0,
1060
+ zoomAnimationThreshold: 4,
1061
+ fadeAnimation: !0,
1062
+ markerZoomAnimation: !0,
1063
+ transform3DLimit: 8388608,
1064
+ zoomSnap: 1,
1065
+ zoomDelta: 1,
1066
+ trackResize: !0
1067
+ },
1068
+ initialize: function(e, t) {
1069
+ t = p(this, t), this._handlers = [], this._layers = {}, this._zoomBoundLayers = {}, this._sizeChanged = !0, this._initContainer(e), this._initLayout(), this._onResize = i(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(O(t.center), t.zoom, { reset: !0 }), this.callInitHooks(), this._zoomAnimated = wt && M.any3d && !M.mobileOpera && this.options.zoomAnimation, this._zoomAnimated && (this._createAnimProxy(), B(this._proxy, Tt, this._catchTransitionEnd, this)), this._addLayers(this.options.layers);
1070
+ },
1071
+ setView: function(e, t, r) {
1072
+ return t = t === void 0 ? this._zoom : this._limitZoom(t), e = this._limitCenter(O(e), t, this.options.maxBounds), r ||= {}, this._stop(), this._loaded && !r.reset && r !== !0 && (r.animate !== void 0 && (r.zoom = n({ animate: r.animate }, r.zoom), r.pan = n({
1073
+ animate: r.animate,
1074
+ duration: r.duration
1075
+ }, r.pan)), this._zoom === t ? this._tryAnimatedPan(e, r.pan) : this._tryAnimatedZoom && this._tryAnimatedZoom(e, t, r.zoom)) ? (clearTimeout(this._sizeTimer), this) : (this._resetView(e, t, r.pan && r.pan.noMoveStart), this);
1076
+ },
1077
+ setZoom: function(e, t) {
1078
+ return this._loaded ? this.setView(this.getCenter(), e, { zoom: t }) : (this._zoom = e, this);
1079
+ },
1080
+ zoomIn: function(e, t) {
1081
+ return e ||= M.any3d ? this.options.zoomDelta : 1, this.setZoom(this._zoom + e, t);
1082
+ },
1083
+ zoomOut: function(e, t) {
1084
+ return e ||= M.any3d ? this.options.zoomDelta : 1, this.setZoom(this._zoom - e, t);
1085
+ },
1086
+ setZoomAround: function(e, t, n) {
1087
+ var r = this.getZoomScale(t), i = this.getSize().divideBy(2), a = (e instanceof x ? e : this.latLngToContainerPoint(e)).subtract(i).multiplyBy(1 - 1 / r), o = this.containerPointToLatLng(i.add(a));
1088
+ return this.setView(o, t, { zoom: n });
1089
+ },
1090
+ _getBoundsCenterZoom: function(e, t) {
1091
+ t ||= {}, e = e.getBounds ? e.getBounds() : E(e);
1092
+ var n = S(t.paddingTopLeft || t.padding || [0, 0]), r = S(t.paddingBottomRight || t.padding || [0, 0]), i = this.getBoundsZoom(e, !1, n.add(r));
1093
+ if (i = typeof t.maxZoom == "number" ? Math.min(t.maxZoom, i) : i, i === Infinity) return {
1094
+ center: e.getCenter(),
1095
+ zoom: i
1096
+ };
1097
+ var a = r.subtract(n).divideBy(2), o = this.project(e.getSouthWest(), i), s = this.project(e.getNorthEast(), i);
1098
+ return {
1099
+ center: this.unproject(o.add(s).divideBy(2).add(a), i),
1100
+ zoom: i
1101
+ };
1102
+ },
1103
+ fitBounds: function(e, t) {
1104
+ if (e = E(e), !e.isValid()) throw Error("Bounds are not valid.");
1105
+ var n = this._getBoundsCenterZoom(e, t);
1106
+ return this.setView(n.center, n.zoom, t);
1107
+ },
1108
+ fitWorld: function(e) {
1109
+ return this.fitBounds([[-90, -180], [90, 180]], e);
1110
+ },
1111
+ panTo: function(e, t) {
1112
+ return this.setView(e, this._zoom, { pan: t });
1113
+ },
1114
+ panBy: function(e, t) {
1115
+ if (e = S(e).round(), t ||= {}, !e.x && !e.y) return this.fire("moveend");
1116
+ if (t.animate !== !0 && !this.getSize().contains(e)) return this._resetView(this.unproject(this.project(this.getCenter()).add(e)), this.getZoom()), this;
1117
+ if (this._panAnim || (this._panAnim = new fn(), this._panAnim.on({
1118
+ step: this._onPanTransitionStep,
1119
+ end: this._onPanTransitionEnd
1120
+ }, this)), t.noMoveStart || this.fire("movestart"), t.animate !== !1) {
1121
+ F(this._mapPane, "leaflet-pan-anim");
1122
+ var n = this._getMapPanePos().subtract(e).round();
1123
+ this._panAnim.run(this._mapPane, n, t.duration || .25, t.easeLinearity);
1124
+ } else this._rawPanBy(e), this.fire("move").fire("moveend");
1125
+ return this;
1126
+ },
1127
+ flyTo: function(e, t, n) {
1128
+ if (n ||= {}, n.animate === !1 || !M.any3d) return this.setView(e, t, n);
1129
+ this._stop();
1130
+ var r = this.project(this.getCenter()), i = this.project(e), a = this.getSize(), o = this._zoom;
1131
+ e = O(e), t = t === void 0 ? o : t;
1132
+ var s = Math.max(a.x, a.y), c = s * this.getZoomScale(o, t), l = i.distanceTo(r) || 1, u = 1.42, d = u * u;
1133
+ function f(e) {
1134
+ var t = e ? -1 : 1, n = e ? c : s, r = (c * c - s * s + t * d * d * l * l) / (2 * n * d * l), i = Math.sqrt(r * r + 1) - r;
1135
+ return i < 1e-9 ? -18 : Math.log(i);
1136
+ }
1137
+ function p(e) {
1138
+ return (Math.exp(e) - Math.exp(-e)) / 2;
1139
+ }
1140
+ function m(e) {
1141
+ return (Math.exp(e) + Math.exp(-e)) / 2;
1142
+ }
1143
+ function ee(e) {
1144
+ return p(e) / m(e);
1145
+ }
1146
+ var h = f(0);
1147
+ function g(e) {
1148
+ return s * (m(h) / m(h + u * e));
1149
+ }
1150
+ function te(e) {
1151
+ return s * (m(h) * ee(h + u * e) - p(h)) / d;
1152
+ }
1153
+ function ne(e) {
1154
+ return 1 - (1 - e) ** 1.5;
1155
+ }
1156
+ var re = Date.now(), ie = (f(1) - h) / u, ae = n.duration ? 1e3 * n.duration : 1e3 * ie * .8;
1157
+ function oe() {
1158
+ var n = (Date.now() - re) / ae, a = ne(n) * ie;
1159
+ n <= 1 ? (this._flyToFrame = _(oe, this), this._move(this.unproject(r.add(i.subtract(r).multiplyBy(te(a) / l)), o), this.getScaleZoom(s / g(a), o), { flyTo: !0 })) : this._move(e, t)._moveEnd(!0);
1160
+ }
1161
+ return this._moveStart(!0, n.noMoveStart), oe.call(this), this;
1162
+ },
1163
+ flyToBounds: function(e, t) {
1164
+ var n = this._getBoundsCenterZoom(e, t);
1165
+ return this.flyTo(n.center, n.zoom, t);
1166
+ },
1167
+ setMaxBounds: function(e) {
1168
+ return e = E(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);
1169
+ },
1170
+ setMinZoom: function(e) {
1171
+ var t = this.options.minZoom;
1172
+ return this.options.minZoom = e, this._loaded && t !== e && (this.fire("zoomlevelschange"), this.getZoom() < this.options.minZoom) ? this.setZoom(e) : this;
1173
+ },
1174
+ setMaxZoom: function(e) {
1175
+ var t = this.options.maxZoom;
1176
+ return this.options.maxZoom = e, this._loaded && t !== e && (this.fire("zoomlevelschange"), this.getZoom() > this.options.maxZoom) ? this.setZoom(e) : this;
1177
+ },
1178
+ panInsideBounds: function(e, t) {
1179
+ this._enforcingBounds = !0;
1180
+ var n = this.getCenter(), r = this._limitCenter(n, this._zoom, E(e));
1181
+ return n.equals(r) || this.panTo(r, t), this._enforcingBounds = !1, this;
1182
+ },
1183
+ panInside: function(e, t) {
1184
+ t ||= {};
1185
+ var n = S(t.paddingTopLeft || t.padding || [0, 0]), r = S(t.paddingBottomRight || t.padding || [0, 0]), i = this.project(this.getCenter()), a = this.project(e), o = this.getPixelBounds(), s = w([o.min.add(n), o.max.subtract(r)]), c = s.getSize();
1186
+ if (!s.contains(a)) {
1187
+ this._enforcingBounds = !0;
1188
+ var l = a.subtract(s.getCenter()), u = s.extend(a).getSize().subtract(c);
1189
+ i.x += l.x < 0 ? -u.x : u.x, i.y += l.y < 0 ? -u.y : u.y, this.panTo(this.unproject(i), t), this._enforcingBounds = !1;
1190
+ }
1191
+ return this;
1192
+ },
1193
+ invalidateSize: function(e) {
1194
+ if (!this._loaded) return this;
1195
+ e = n({
1196
+ animate: !1,
1197
+ pan: !0
1198
+ }, e === !0 ? { animate: !0 } : e);
1199
+ var t = this.getSize();
1200
+ this._sizeChanged = !0, this._lastCenter = null;
1201
+ var r = this.getSize(), a = t.divideBy(2).round(), o = r.divideBy(2).round(), s = a.subtract(o);
1202
+ return !s.x && !s.y ? this : (e.animate && e.pan ? this.panBy(s) : (e.pan && this._rawPanBy(s), this.fire("move"), e.debounceMoveend ? (clearTimeout(this._sizeTimer), this._sizeTimer = setTimeout(i(this.fire, this, "moveend"), 200)) : this.fire("moveend")), this.fire("resize", {
1203
+ oldSize: t,
1204
+ newSize: r
1205
+ }));
1206
+ },
1207
+ stop: function() {
1208
+ return this.setZoom(this._limitZoom(this._zoom)), this.options.zoomSnap || this.fire("viewreset"), this._stop();
1209
+ },
1210
+ locate: function(e) {
1211
+ if (e = this._locateOptions = n({
1212
+ timeout: 1e4,
1213
+ watch: !1
1214
+ }, e), !("geolocation" in navigator)) return this._handleGeolocationError({
1215
+ code: 0,
1216
+ message: "Geolocation not supported."
1217
+ }), this;
1218
+ var t = i(this._handleGeolocationResponse, this), r = i(this._handleGeolocationError, this);
1219
+ return e.watch ? this._locationWatchId = navigator.geolocation.watchPosition(t, r, e) : navigator.geolocation.getCurrentPosition(t, r, e), this;
1220
+ },
1221
+ stopLocate: function() {
1222
+ return navigator.geolocation && navigator.geolocation.clearWatch && navigator.geolocation.clearWatch(this._locationWatchId), this._locateOptions && (this._locateOptions.setView = !1), this;
1223
+ },
1224
+ _handleGeolocationError: function(e) {
1225
+ if (this._container._leaflet_id) {
1226
+ var t = e.code, n = e.message || (t === 1 ? "permission denied" : t === 2 ? "position unavailable" : "timeout");
1227
+ this._locateOptions.setView && !this._loaded && this.fitWorld(), this.fire("locationerror", {
1228
+ code: t,
1229
+ message: "Geolocation error: " + n + "."
1230
+ });
1231
+ }
1232
+ },
1233
+ _handleGeolocationResponse: function(e) {
1234
+ if (this._container._leaflet_id) {
1235
+ var t = e.coords.latitude, n = e.coords.longitude, r = new D(t, n), i = r.toBounds(e.coords.accuracy * 2), a = this._locateOptions;
1236
+ if (a.setView) {
1237
+ var o = this.getBoundsZoom(i);
1238
+ this.setView(r, a.maxZoom ? Math.min(o, a.maxZoom) : o);
1239
+ }
1240
+ var s = {
1241
+ latlng: r,
1242
+ bounds: i,
1243
+ timestamp: e.timestamp
1244
+ };
1245
+ for (var c in e.coords) typeof e.coords[c] == "number" && (s[c] = e.coords[c]);
1246
+ this.fire("locationfound", s);
1247
+ }
1248
+ },
1249
+ addHandler: function(e, t) {
1250
+ if (!t) return this;
1251
+ var n = this[e] = new t(this);
1252
+ return this._handlers.push(n), this.options[e] && n.enable(), this;
1253
+ },
1254
+ remove: function() {
1255
+ if (this._initEvents(!0), this.options.maxBounds && this.off("moveend", this._panInsideMaxBounds), this._containerId !== this._container._leaflet_id) throw Error("Map container is being reused by another instance");
1256
+ try {
1257
+ delete this._container._leaflet_id, delete this._containerId;
1258
+ } catch {
1259
+ this._container._leaflet_id = void 0, this._containerId = void 0;
1260
+ }
1261
+ for (var e in this._locationWatchId !== void 0 && this.stopLocate(), this._stop(), P(this._mapPane), this._clearControlPos && this._clearControlPos(), this._resizeRequest &&= (v(this._resizeRequest), null), this._clearHandlers(), this._loaded && this.fire("unload"), this._layers) this._layers[e].remove();
1262
+ for (e in this._panes) P(this._panes[e]);
1263
+ return this._layers = [], this._panes = [], delete this._mapPane, delete this._renderer, this;
1264
+ },
1265
+ createPane: function(e, t) {
1266
+ var n = N("div", "leaflet-pane" + (e ? " leaflet-" + e.replace("Pane", "") + "-pane" : ""), t || this._mapPane);
1267
+ return e && (this._panes[e] = n), n;
1268
+ },
1269
+ getCenter: function() {
1270
+ return this._checkIfLoaded(), this._lastCenter && !this._moved() ? this._lastCenter.clone() : this.layerPointToLatLng(this._getCenterLayerPoint());
1271
+ },
1272
+ getZoom: function() {
1273
+ return this._zoom;
1274
+ },
1275
+ getBounds: function() {
1276
+ var e = this.getPixelBounds();
1277
+ return new T(this.unproject(e.getBottomLeft()), this.unproject(e.getTopRight()));
1278
+ },
1279
+ getMinZoom: function() {
1280
+ return this.options.minZoom === void 0 ? this._layersMinZoom || 0 : this.options.minZoom;
1281
+ },
1282
+ getMaxZoom: function() {
1283
+ return this.options.maxZoom === void 0 ? this._layersMaxZoom === void 0 ? Infinity : this._layersMaxZoom : this.options.maxZoom;
1284
+ },
1285
+ getBoundsZoom: function(e, t, n) {
1286
+ e = E(e), n = S(n || [0, 0]);
1287
+ var r = this.getZoom() || 0, i = this.getMinZoom(), a = this.getMaxZoom(), o = e.getNorthWest(), s = e.getSouthEast(), c = this.getSize().subtract(n), l = w(this.project(s, r), this.project(o, r)).getSize(), u = M.any3d ? this.options.zoomSnap : 1, d = c.x / l.x, f = c.y / l.y, p = t ? Math.max(d, f) : Math.min(d, f);
1288
+ return r = this.getScaleZoom(p, r), u && (r = Math.round(r / (u / 100)) * (u / 100), r = t ? Math.ceil(r / u) * u : Math.floor(r / u) * u), Math.max(i, Math.min(a, r));
1289
+ },
1290
+ getSize: function() {
1291
+ return (!this._size || this._sizeChanged) && (this._size = new x(this._container.clientWidth || 0, this._container.clientHeight || 0), this._sizeChanged = !1), this._size.clone();
1292
+ },
1293
+ getPixelBounds: function(e, t) {
1294
+ var n = this._getTopLeftPoint(e, t);
1295
+ return new C(n, n.add(this.getSize()));
1296
+ },
1297
+ getPixelOrigin: function() {
1298
+ return this._checkIfLoaded(), this._pixelOrigin;
1299
+ },
1300
+ getPixelWorldBounds: function(e) {
1301
+ return this.options.crs.getProjectedBounds(e === void 0 ? this.getZoom() : e);
1302
+ },
1303
+ getPane: function(e) {
1304
+ return typeof e == "string" ? this._panes[e] : e;
1305
+ },
1306
+ getPanes: function() {
1307
+ return this._panes;
1308
+ },
1309
+ getContainer: function() {
1310
+ return this._container;
1311
+ },
1312
+ getZoomScale: function(e, t) {
1313
+ var n = this.options.crs;
1314
+ return t = t === void 0 ? this._zoom : t, n.scale(e) / n.scale(t);
1315
+ },
1316
+ getScaleZoom: function(e, t) {
1317
+ var n = this.options.crs;
1318
+ t = t === void 0 ? this._zoom : t;
1319
+ var r = n.zoom(e * n.scale(t));
1320
+ return isNaN(r) ? Infinity : r;
1321
+ },
1322
+ project: function(e, t) {
1323
+ return t = t === void 0 ? this._zoom : t, this.options.crs.latLngToPoint(O(e), t);
1324
+ },
1325
+ unproject: function(e, t) {
1326
+ return t = t === void 0 ? this._zoom : t, this.options.crs.pointToLatLng(S(e), t);
1327
+ },
1328
+ layerPointToLatLng: function(e) {
1329
+ var t = S(e).add(this.getPixelOrigin());
1330
+ return this.unproject(t);
1331
+ },
1332
+ latLngToLayerPoint: function(e) {
1333
+ return this.project(O(e))._round()._subtract(this.getPixelOrigin());
1334
+ },
1335
+ wrapLatLng: function(e) {
1336
+ return this.options.crs.wrapLatLng(O(e));
1337
+ },
1338
+ wrapLatLngBounds: function(e) {
1339
+ return this.options.crs.wrapLatLngBounds(E(e));
1340
+ },
1341
+ distance: function(e, t) {
1342
+ return this.options.crs.distance(O(e), O(t));
1343
+ },
1344
+ containerPointToLayerPoint: function(e) {
1345
+ return S(e).subtract(this._getMapPanePos());
1346
+ },
1347
+ layerPointToContainerPoint: function(e) {
1348
+ return S(e).add(this._getMapPanePos());
1349
+ },
1350
+ containerPointToLatLng: function(e) {
1351
+ var t = this.containerPointToLayerPoint(S(e));
1352
+ return this.layerPointToLatLng(t);
1353
+ },
1354
+ latLngToContainerPoint: function(e) {
1355
+ return this.layerPointToContainerPoint(this.latLngToLayerPoint(O(e)));
1356
+ },
1357
+ mouseEventToContainerPoint: function(e) {
1358
+ return sn(e, this._container);
1359
+ },
1360
+ mouseEventToLayerPoint: function(e) {
1361
+ return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e));
1362
+ },
1363
+ mouseEventToLatLng: function(e) {
1364
+ return this.layerPointToLatLng(this.mouseEventToLayerPoint(e));
1365
+ },
1366
+ _initContainer: function(e) {
1367
+ var t = this._container = Et(e);
1368
+ if (!t) throw Error("Map container not found.");
1369
+ if (t._leaflet_id) throw Error("Map container is already initialized.");
1370
+ B(t, "scroll", this._onScroll, this), this._containerId = o(t);
1371
+ },
1372
+ _initLayout: function() {
1373
+ var e = this._container;
1374
+ this._fadeAnimated = this.options.fadeAnimation && M.any3d, F(e, "leaflet-container" + (M.touch ? " leaflet-touch" : "") + (M.retina ? " leaflet-retina" : "") + (M.ielt9 ? " leaflet-oldie" : "") + (M.safari ? " leaflet-safari" : "") + (this._fadeAnimated ? " leaflet-fade-anim" : ""));
1375
+ var t = Dt(e, "position");
1376
+ t !== "absolute" && t !== "relative" && t !== "fixed" && t !== "sticky" && (e.style.position = "relative"), this._initPanes(), this._initControlPos && this._initControlPos();
1377
+ },
1378
+ _initPanes: function() {
1379
+ var e = this._panes = {};
1380
+ this._paneRenderers = {}, this._mapPane = this.createPane("mapPane", this._container), z(this._mapPane, new x(0, 0)), this.createPane("tilePane"), this.createPane("overlayPane"), this.createPane("shadowPane"), this.createPane("markerPane"), this.createPane("tooltipPane"), this.createPane("popupPane"), this.options.markerZoomAnimation || (F(e.markerPane, "leaflet-zoom-hide"), F(e.shadowPane, "leaflet-zoom-hide"));
1381
+ },
1382
+ _resetView: function(e, t, n) {
1383
+ z(this._mapPane, new x(0, 0));
1384
+ var r = !this._loaded;
1385
+ this._loaded = !0, t = this._limitZoom(t), this.fire("viewprereset");
1386
+ var i = this._zoom !== t;
1387
+ this._moveStart(i, n)._move(e, t)._moveEnd(i), this.fire("viewreset"), r && this.fire("load");
1388
+ },
1389
+ _moveStart: function(e, t) {
1390
+ return e && this.fire("zoomstart"), t || this.fire("movestart"), this;
1391
+ },
1392
+ _move: function(e, t, n, r) {
1393
+ t === void 0 && (t = this._zoom);
1394
+ var i = this._zoom !== t;
1395
+ return this._zoom = t, this._lastCenter = e, this._pixelOrigin = this._getNewPixelOrigin(e), r ? n && n.pinch && this.fire("zoom", n) : ((i || n && n.pinch) && this.fire("zoom", n), this.fire("move", n)), this;
1396
+ },
1397
+ _moveEnd: function(e) {
1398
+ return e && this.fire("zoomend"), this.fire("moveend");
1399
+ },
1400
+ _stop: function() {
1401
+ return v(this._flyToFrame), this._panAnim && this._panAnim.stop(), this;
1402
+ },
1403
+ _rawPanBy: function(e) {
1404
+ z(this._mapPane, this._getMapPanePos().subtract(e));
1405
+ },
1406
+ _getZoomSpan: function() {
1407
+ return this.getMaxZoom() - this.getMinZoom();
1408
+ },
1409
+ _panInsideMaxBounds: function() {
1410
+ this._enforcingBounds || this.panInsideBounds(this.options.maxBounds);
1411
+ },
1412
+ _checkIfLoaded: function() {
1413
+ if (!this._loaded) throw Error("Set map center and zoom first.");
1414
+ },
1415
+ _initEvents: function(e) {
1416
+ this._targets = {}, this._targets[o(this._container)] = this;
1417
+ var t = e ? H : B;
1418
+ t(this._container, "click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup", this._handleDOMEvent, this), this.options.trackResize && t(window, "resize", this._onResize, this), M.any3d && this.options.transform3DLimit && (e ? this.off : this.on).call(this, "moveend", this._onMoveEnd);
1419
+ },
1420
+ _onResize: function() {
1421
+ v(this._resizeRequest), this._resizeRequest = _(function() {
1422
+ this.invalidateSize({ debounceMoveend: !0 });
1423
+ }, this);
1424
+ },
1425
+ _onScroll: function() {
1426
+ this._container.scrollTop = 0, this._container.scrollLeft = 0;
1427
+ },
1428
+ _onMoveEnd: function() {
1429
+ var e = this._getMapPanePos();
1430
+ Math.max(Math.abs(e.x), Math.abs(e.y)) >= this.options.transform3DLimit && this._resetView(this.getCenter(), this.getZoom());
1431
+ },
1432
+ _findEventTargets: function(e, t) {
1433
+ for (var n = [], r, i = t === "mouseout" || t === "mouseover", a = e.target || e.srcElement, s = !1; a;) {
1434
+ if (r = this._targets[o(a)], r && (t === "click" || t === "preclick") && this._draggableMoved(r)) {
1435
+ s = !0;
1436
+ break;
1437
+ }
1438
+ if (r && r.listens(t, !0) && (i && !un(a, e) || (n.push(r), i)) || a === this._container) break;
1439
+ a = a.parentNode;
1440
+ }
1441
+ return !n.length && !s && !i && this.listens(t, !0) && (n = [this]), n;
1442
+ },
1443
+ _isClickDisabled: function(e) {
1444
+ for (; e && e !== this._container;) {
1445
+ if (e._leaflet_disable_click) return !0;
1446
+ e = e.parentNode;
1447
+ }
1448
+ },
1449
+ _handleDOMEvent: function(e) {
1450
+ var t = e.target || e.srcElement;
1451
+ if (!(!this._loaded || t._leaflet_disable_events || e.type === "click" && this._isClickDisabled(t))) {
1452
+ var n = e.type;
1453
+ n === "mousedown" && Kt(t), this._fireDOMEvent(e, n);
1454
+ }
1455
+ },
1456
+ _mouseEvents: [
1457
+ "click",
1458
+ "dblclick",
1459
+ "mouseover",
1460
+ "mouseout",
1461
+ "contextmenu"
1462
+ ],
1463
+ _fireDOMEvent: function(e, t, r) {
1464
+ if (e.type === "click") {
1465
+ var i = n({}, e);
1466
+ i.type = "preclick", this._fireDOMEvent(i, i.type, r);
1467
+ }
1468
+ var a = this._findEventTargets(e, t);
1469
+ if (r) {
1470
+ for (var o = [], s = 0; s < r.length; s++) r[s].listens(t, !0) && o.push(r[s]);
1471
+ a = o.concat(a);
1472
+ }
1473
+ if (a.length) {
1474
+ t === "contextmenu" && U(e);
1475
+ var c = a[0], l = { originalEvent: e };
1476
+ if (e.type !== "keypress" && e.type !== "keydown" && e.type !== "keyup") {
1477
+ var u = c.getLatLng && (!c._radius || c._radius <= 10);
1478
+ l.containerPoint = u ? this.latLngToContainerPoint(c.getLatLng()) : this.mouseEventToContainerPoint(e), l.layerPoint = this.containerPointToLayerPoint(l.containerPoint), l.latlng = u ? c.getLatLng() : this.layerPointToLatLng(l.layerPoint);
1479
+ }
1480
+ for (s = 0; s < a.length; s++) if (a[s].fire(t, l, !0), l.originalEvent._stopped || a[s].options.bubblingMouseEvents === !1 && te(this._mouseEvents, t) !== -1) return;
1481
+ }
1482
+ },
1483
+ _draggableMoved: function(e) {
1484
+ return e = e.dragging && e.dragging.enabled() ? e : this, e.dragging && e.dragging.moved() || this.boxZoom && this.boxZoom.moved();
1485
+ },
1486
+ _clearHandlers: function() {
1487
+ for (var e = 0, t = this._handlers.length; e < t; e++) this._handlers[e].disable();
1488
+ },
1489
+ whenReady: function(e, t) {
1490
+ return this._loaded ? e.call(t || this, { target: this }) : this.on("load", e, t), this;
1491
+ },
1492
+ _getMapPanePos: function() {
1493
+ return Lt(this._mapPane) || new x(0, 0);
1494
+ },
1495
+ _moved: function() {
1496
+ var e = this._getMapPanePos();
1497
+ return e && !e.equals([0, 0]);
1498
+ },
1499
+ _getTopLeftPoint: function(e, t) {
1500
+ return (e && t !== void 0 ? this._getNewPixelOrigin(e, t) : this.getPixelOrigin()).subtract(this._getMapPanePos());
1501
+ },
1502
+ _getNewPixelOrigin: function(e, t) {
1503
+ var n = this.getSize()._divideBy(2);
1504
+ return this.project(e, t)._subtract(n)._add(this._getMapPanePos())._round();
1505
+ },
1506
+ _latLngToNewLayerPoint: function(e, t, n) {
1507
+ var r = this._getNewPixelOrigin(n, t);
1508
+ return this.project(e, t)._subtract(r);
1509
+ },
1510
+ _latLngBoundsToNewLayerBounds: function(e, t, n) {
1511
+ var r = this._getNewPixelOrigin(n, t);
1512
+ return w([
1513
+ this.project(e.getSouthWest(), t)._subtract(r),
1514
+ this.project(e.getNorthWest(), t)._subtract(r),
1515
+ this.project(e.getSouthEast(), t)._subtract(r),
1516
+ this.project(e.getNorthEast(), t)._subtract(r)
1517
+ ]);
1518
+ },
1519
+ _getCenterLayerPoint: function() {
1520
+ return this.containerPointToLayerPoint(this.getSize()._divideBy(2));
1521
+ },
1522
+ _getCenterOffset: function(e) {
1523
+ return this.latLngToLayerPoint(e).subtract(this._getCenterLayerPoint());
1524
+ },
1525
+ _limitCenter: function(e, t, n) {
1526
+ if (!n) return e;
1527
+ var r = this.project(e, t), i = this.getSize().divideBy(2), a = new C(r.subtract(i), r.add(i)), o = this._getBoundsOffset(a, n, t);
1528
+ return Math.abs(o.x) <= 1 && Math.abs(o.y) <= 1 ? e : this.unproject(r.add(o), t);
1529
+ },
1530
+ _limitOffset: function(e, t) {
1531
+ if (!t) return e;
1532
+ var n = this.getPixelBounds(), r = new C(n.min.add(e), n.max.add(e));
1533
+ return e.add(this._getBoundsOffset(r, t));
1534
+ },
1535
+ _getBoundsOffset: function(e, t, n) {
1536
+ var r = w(this.project(t.getNorthEast(), n), this.project(t.getSouthWest(), n)), i = r.min.subtract(e.min), a = r.max.subtract(e.max);
1537
+ return new x(this._rebound(i.x, -a.x), this._rebound(i.y, -a.y));
1538
+ },
1539
+ _rebound: function(e, t) {
1540
+ return e + t > 0 ? Math.round(e - t) / 2 : Math.max(0, Math.ceil(e)) - Math.max(0, Math.floor(t));
1541
+ },
1542
+ _limitZoom: function(e) {
1543
+ var t = this.getMinZoom(), n = this.getMaxZoom(), r = M.any3d ? this.options.zoomSnap : 1;
1544
+ return r && (e = Math.round(e / r) * r), Math.max(t, Math.min(n, e));
1545
+ },
1546
+ _onPanTransitionStep: function() {
1547
+ this.fire("move");
1548
+ },
1549
+ _onPanTransitionEnd: function() {
1550
+ I(this._mapPane, "leaflet-pan-anim"), this.fire("moveend");
1551
+ },
1552
+ _tryAnimatedPan: function(e, t) {
1553
+ var n = this._getCenterOffset(e)._trunc();
1554
+ return (t && t.animate) !== !0 && !this.getSize().contains(n) ? !1 : (this.panBy(n, t), !0);
1555
+ },
1556
+ _createAnimProxy: function() {
1557
+ var e = this._proxy = N("div", "leaflet-proxy leaflet-zoom-animated");
1558
+ this._panes.mapPane.appendChild(e), this.on("zoomanim", function(e) {
1559
+ var t = Ct, n = this._proxy.style[t];
1560
+ It(this._proxy, this.project(e.center, e.zoom), this.getZoomScale(e.zoom, 1)), n === this._proxy.style[t] && this._animatingZoom && this._onZoomTransitionEnd();
1561
+ }, this), this.on("load moveend", this._animMoveEnd, this), this._on("unload", this._destroyAnimProxy, this);
1562
+ },
1563
+ _destroyAnimProxy: function() {
1564
+ P(this._proxy), this.off("load moveend", this._animMoveEnd, this), delete this._proxy;
1565
+ },
1566
+ _animMoveEnd: function() {
1567
+ var e = this.getCenter(), t = this.getZoom();
1568
+ It(this._proxy, this.project(e, t), this.getZoomScale(t, 1));
1569
+ },
1570
+ _catchTransitionEnd: function(e) {
1571
+ this._animatingZoom && e.propertyName.indexOf("transform") >= 0 && this._onZoomTransitionEnd();
1572
+ },
1573
+ _nothingToAnimate: function() {
1574
+ return !this._container.getElementsByClassName("leaflet-zoom-animated").length;
1575
+ },
1576
+ _tryAnimatedZoom: function(e, t, n) {
1577
+ if (this._animatingZoom) return !0;
1578
+ if (n ||= {}, !this._zoomAnimated || n.animate === !1 || this._nothingToAnimate() || Math.abs(t - this._zoom) > this.options.zoomAnimationThreshold) return !1;
1579
+ var r = this.getZoomScale(t), i = this._getCenterOffset(e)._divideBy(1 - 1 / r);
1580
+ return n.animate !== !0 && !this.getSize().contains(i) ? !1 : (_(function() {
1581
+ this._moveStart(!0, n.noMoveStart || !1)._animateZoom(e, t, !0);
1582
+ }, this), !0);
1583
+ },
1584
+ _animateZoom: function(e, t, n, r) {
1585
+ this._mapPane && (n && (this._animatingZoom = !0, this._animateToCenter = e, this._animateToZoom = t, F(this._mapPane, "leaflet-zoom-anim")), this.fire("zoomanim", {
1586
+ center: e,
1587
+ zoom: t,
1588
+ noUpdate: r
1589
+ }), this._tempFireZoomEvent ||= this._zoom !== this._animateToZoom, this._move(this._animateToCenter, this._animateToZoom, void 0, !0), setTimeout(i(this._onZoomTransitionEnd, this), 250));
1590
+ },
1591
+ _onZoomTransitionEnd: function() {
1592
+ this._animatingZoom && (this._mapPane && I(this._mapPane, "leaflet-zoom-anim"), this._animatingZoom = !1, this._move(this._animateToCenter, this._animateToZoom, void 0, !0), this._tempFireZoomEvent && this.fire("zoom"), delete this._tempFireZoomEvent, this.fire("move"), this._moveEnd(!0));
1593
+ }
1594
+ });
1595
+ function pn(e, t) {
1596
+ return new W(e, t);
1597
+ }
1598
+ var G = y.extend({
1599
+ options: { position: "topright" },
1600
+ initialize: function(e) {
1601
+ p(this, e);
1602
+ },
1603
+ getPosition: function() {
1604
+ return this.options.position;
1605
+ },
1606
+ setPosition: function(e) {
1607
+ var t = this._map;
1608
+ return t && t.removeControl(this), this.options.position = e, t && t.addControl(this), this;
1609
+ },
1610
+ getContainer: function() {
1611
+ return this._container;
1612
+ },
1613
+ addTo: function(e) {
1614
+ this.remove(), this._map = e;
1615
+ var t = this._container = this.onAdd(e), n = this.getPosition(), r = e._controlCorners[n];
1616
+ return F(t, "leaflet-control"), n.indexOf("bottom") === -1 ? r.appendChild(t) : r.insertBefore(t, r.firstChild), this._map.on("unload", this.remove, this), this;
1617
+ },
1618
+ remove: function() {
1619
+ return this._map ? (P(this._container), this.onRemove && this.onRemove(this._map), this._map.off("unload", this.remove, this), this._map = null, this) : this;
1620
+ },
1621
+ _refocusOnMap: function(e) {
1622
+ this._map && e && e.screenX > 0 && e.screenY > 0 && this._map.getContainer().focus();
1623
+ }
1624
+ }), mn = function(e) {
1625
+ return new G(e);
1626
+ };
1627
+ W.include({
1628
+ addControl: function(e) {
1629
+ return e.addTo(this), this;
1630
+ },
1631
+ removeControl: function(e) {
1632
+ return e.remove(), this;
1633
+ },
1634
+ _initControlPos: function() {
1635
+ var e = this._controlCorners = {}, t = "leaflet-", n = this._controlContainer = N("div", t + "control-container", this._container);
1636
+ function r(r, i) {
1637
+ var a = t + r + " " + t + i;
1638
+ e[r + i] = N("div", a, n);
1639
+ }
1640
+ r("top", "left"), r("top", "right"), r("bottom", "left"), r("bottom", "right");
1641
+ },
1642
+ _clearControlPos: function() {
1643
+ for (var e in this._controlCorners) P(this._controlCorners[e]);
1644
+ P(this._controlContainer), delete this._controlCorners, delete this._controlContainer;
1645
+ }
1646
+ });
1647
+ var hn = G.extend({
1648
+ options: {
1649
+ collapsed: !0,
1650
+ position: "topright",
1651
+ autoZIndex: !0,
1652
+ hideSingleBase: !1,
1653
+ sortLayers: !1,
1654
+ sortFunction: function(e, t, n, r) {
1655
+ return n < r ? -1 : +(r < n);
1656
+ }
1657
+ },
1658
+ initialize: function(e, t, n) {
1659
+ for (var r in p(this, n), this._layerControlInputs = [], this._layers = [], this._lastZIndex = 0, this._handlingClick = !1, this._preventClick = !1, e) this._addLayer(e[r], r);
1660
+ for (r in t) this._addLayer(t[r], r, !0);
1661
+ },
1662
+ onAdd: function(e) {
1663
+ this._initLayout(), this._update(), this._map = e, e.on("zoomend", this._checkDisabledLayers, this);
1664
+ for (var t = 0; t < this._layers.length; t++) this._layers[t].layer.on("add remove", this._onLayerChange, this);
1665
+ return this._container;
1666
+ },
1667
+ addTo: function(e) {
1668
+ return G.prototype.addTo.call(this, e), this._expandIfNotCollapsed();
1669
+ },
1670
+ onRemove: function() {
1671
+ this._map.off("zoomend", this._checkDisabledLayers, this);
1672
+ for (var e = 0; e < this._layers.length; e++) this._layers[e].layer.off("add remove", this._onLayerChange, this);
1673
+ },
1674
+ addBaseLayer: function(e, t) {
1675
+ return this._addLayer(e, t), this._map ? this._update() : this;
1676
+ },
1677
+ addOverlay: function(e, t) {
1678
+ return this._addLayer(e, t, !0), this._map ? this._update() : this;
1679
+ },
1680
+ removeLayer: function(e) {
1681
+ e.off("add remove", this._onLayerChange, this);
1682
+ var t = this._getLayer(o(e));
1683
+ return t && this._layers.splice(this._layers.indexOf(t), 1), this._map ? this._update() : this;
1684
+ },
1685
+ expand: function() {
1686
+ F(this._container, "leaflet-control-layers-expanded"), this._section.style.height = null;
1687
+ var e = this._map.getSize().y - (this._container.offsetTop + 50);
1688
+ return e < this._section.clientHeight ? (F(this._section, "leaflet-control-layers-scrollbar"), this._section.style.height = e + "px") : I(this._section, "leaflet-control-layers-scrollbar"), this._checkDisabledLayers(), this;
1689
+ },
1690
+ collapse: function() {
1691
+ return I(this._container, "leaflet-control-layers-expanded"), this;
1692
+ },
1693
+ _initLayout: function() {
1694
+ var e = "leaflet-control-layers", t = this._container = N("div", e), n = this.options.collapsed;
1695
+ t.setAttribute("aria-haspopup", !0), rn(t), nn(t);
1696
+ var r = this._section = N("section", e + "-list");
1697
+ n && (this._map.on("click", this.collapse, this), B(t, {
1698
+ mouseenter: this._expandSafely,
1699
+ mouseleave: this.collapse
1700
+ }, this));
1701
+ var i = this._layersLink = N("a", e + "-toggle", t);
1702
+ i.href = "#", i.title = "Layers", i.setAttribute("role", "button"), B(i, {
1703
+ keydown: function(e) {
1704
+ e.keyCode === 13 && this._expandSafely();
1705
+ },
1706
+ click: function(e) {
1707
+ U(e), this._expandSafely();
1708
+ }
1709
+ }, this), n || this.expand(), this._baseLayersList = N("div", e + "-base", r), this._separator = N("div", e + "-separator", r), this._overlaysList = N("div", e + "-overlays", r), t.appendChild(r);
1710
+ },
1711
+ _getLayer: function(e) {
1712
+ for (var t = 0; t < this._layers.length; t++) if (this._layers[t] && o(this._layers[t].layer) === e) return this._layers[t];
1713
+ },
1714
+ _addLayer: function(e, t, n) {
1715
+ this._map && e.on("add remove", this._onLayerChange, this), this._layers.push({
1716
+ layer: e,
1717
+ name: t,
1718
+ overlay: n
1719
+ }), this.options.sortLayers && this._layers.sort(i(function(e, t) {
1720
+ return this.options.sortFunction(e.layer, t.layer, e.name, t.name);
1721
+ }, this)), this.options.autoZIndex && e.setZIndex && (this._lastZIndex++, e.setZIndex(this._lastZIndex)), this._expandIfNotCollapsed();
1722
+ },
1723
+ _update: function() {
1724
+ if (!this._container) return this;
1725
+ Ot(this._baseLayersList), Ot(this._overlaysList), this._layerControlInputs = [];
1726
+ var e, t, n, r, i = 0;
1727
+ for (n = 0; n < this._layers.length; n++) r = this._layers[n], this._addItem(r), t ||= r.overlay, e ||= !r.overlay, i += +!r.overlay;
1728
+ return this.options.hideSingleBase && (e &&= i > 1, this._baseLayersList.style.display = e ? "" : "none"), this._separator.style.display = t && e ? "" : "none", this;
1729
+ },
1730
+ _onLayerChange: function(e) {
1731
+ this._handlingClick || this._update();
1732
+ var t = this._getLayer(o(e.target)), n = t.overlay ? e.type === "add" ? "overlayadd" : "overlayremove" : e.type === "add" ? "baselayerchange" : null;
1733
+ n && this._map.fire(n, t);
1734
+ },
1735
+ _createRadioElement: function(e, t) {
1736
+ var n = "<input type=\"radio\" class=\"leaflet-control-layers-selector\" name=\"" + e + "\"" + (t ? " checked=\"checked\"" : "") + "/>", r = document.createElement("div");
1737
+ return r.innerHTML = n, r.firstChild;
1738
+ },
1739
+ _addItem: function(e) {
1740
+ var t = document.createElement("label"), n = this._map.hasLayer(e.layer), r;
1741
+ e.overlay ? (r = document.createElement("input"), r.type = "checkbox", r.className = "leaflet-control-layers-selector", r.defaultChecked = n) : r = this._createRadioElement("leaflet-base-layers_" + o(this), n), this._layerControlInputs.push(r), r.layerId = o(e.layer), B(r, "click", this._onInputClick, this);
1742
+ var i = document.createElement("span");
1743
+ i.innerHTML = " " + e.name;
1744
+ var a = document.createElement("span");
1745
+ return t.appendChild(a), a.appendChild(r), a.appendChild(i), (e.overlay ? this._overlaysList : this._baseLayersList).appendChild(t), this._checkDisabledLayers(), t;
1746
+ },
1747
+ _onInputClick: function() {
1748
+ if (!this._preventClick) {
1749
+ var e = this._layerControlInputs, t, n, r = [], i = [];
1750
+ this._handlingClick = !0;
1751
+ for (var a = e.length - 1; a >= 0; a--) t = e[a], n = this._getLayer(t.layerId).layer, t.checked ? r.push(n) : t.checked || i.push(n);
1752
+ for (a = 0; a < i.length; a++) this._map.hasLayer(i[a]) && this._map.removeLayer(i[a]);
1753
+ for (a = 0; a < r.length; a++) this._map.hasLayer(r[a]) || this._map.addLayer(r[a]);
1754
+ this._handlingClick = !1, this._refocusOnMap();
1755
+ }
1756
+ },
1757
+ _checkDisabledLayers: function() {
1758
+ for (var e = this._layerControlInputs, t, n, r = this._map.getZoom(), i = e.length - 1; i >= 0; i--) t = e[i], n = this._getLayer(t.layerId).layer, t.disabled = n.options.minZoom !== void 0 && r < n.options.minZoom || n.options.maxZoom !== void 0 && r > n.options.maxZoom;
1759
+ },
1760
+ _expandIfNotCollapsed: function() {
1761
+ return this._map && !this.options.collapsed && this.expand(), this;
1762
+ },
1763
+ _expandSafely: function() {
1764
+ var e = this._section;
1765
+ this._preventClick = !0, B(e, "click", U), this.expand();
1766
+ var t = this;
1767
+ setTimeout(function() {
1768
+ H(e, "click", U), t._preventClick = !1;
1769
+ });
1770
+ }
1771
+ }), gn = function(e, t, n) {
1772
+ return new hn(e, t, n);
1773
+ }, _n = G.extend({
1774
+ options: {
1775
+ position: "topleft",
1776
+ zoomInText: "<span aria-hidden=\"true\">+</span>",
1777
+ zoomInTitle: "Zoom in",
1778
+ zoomOutText: "<span aria-hidden=\"true\">&#x2212;</span>",
1779
+ zoomOutTitle: "Zoom out"
1780
+ },
1781
+ onAdd: function(e) {
1782
+ var t = "leaflet-control-zoom", n = N("div", t + " leaflet-bar"), r = this.options;
1783
+ return this._zoomInButton = this._createButton(r.zoomInText, r.zoomInTitle, t + "-in", n, this._zoomIn), this._zoomOutButton = this._createButton(r.zoomOutText, r.zoomOutTitle, t + "-out", n, this._zoomOut), this._updateDisabled(), e.on("zoomend zoomlevelschange", this._updateDisabled, this), n;
1784
+ },
1785
+ onRemove: function(e) {
1786
+ e.off("zoomend zoomlevelschange", this._updateDisabled, this);
1787
+ },
1788
+ disable: function() {
1789
+ return this._disabled = !0, this._updateDisabled(), this;
1790
+ },
1791
+ enable: function() {
1792
+ return this._disabled = !1, this._updateDisabled(), this;
1793
+ },
1794
+ _zoomIn: function(e) {
1795
+ !this._disabled && this._map._zoom < this._map.getMaxZoom() && this._map.zoomIn(this._map.options.zoomDelta * (e.shiftKey ? 3 : 1));
1796
+ },
1797
+ _zoomOut: function(e) {
1798
+ !this._disabled && this._map._zoom > this._map.getMinZoom() && this._map.zoomOut(this._map.options.zoomDelta * (e.shiftKey ? 3 : 1));
1799
+ },
1800
+ _createButton: function(e, t, n, r, i) {
1801
+ var a = N("a", n, r);
1802
+ return a.innerHTML = e, a.href = "#", a.title = t, a.setAttribute("role", "button"), a.setAttribute("aria-label", t), rn(a), B(a, "click", an), B(a, "click", i, this), B(a, "click", this._refocusOnMap, this), a;
1803
+ },
1804
+ _updateDisabled: function() {
1805
+ var e = this._map, t = "leaflet-disabled";
1806
+ I(this._zoomInButton, t), I(this._zoomOutButton, t), this._zoomInButton.setAttribute("aria-disabled", "false"), this._zoomOutButton.setAttribute("aria-disabled", "false"), (this._disabled || e._zoom === e.getMinZoom()) && (F(this._zoomOutButton, t), this._zoomOutButton.setAttribute("aria-disabled", "true")), (this._disabled || e._zoom === e.getMaxZoom()) && (F(this._zoomInButton, t), this._zoomInButton.setAttribute("aria-disabled", "true"));
1807
+ }
1808
+ });
1809
+ W.mergeOptions({ zoomControl: !0 }), W.addInitHook(function() {
1810
+ this.options.zoomControl && (this.zoomControl = new _n(), this.addControl(this.zoomControl));
1811
+ });
1812
+ var vn = function(e) {
1813
+ return new _n(e);
1814
+ }, yn = G.extend({
1815
+ options: {
1816
+ position: "bottomleft",
1817
+ maxWidth: 100,
1818
+ metric: !0,
1819
+ imperial: !0
1820
+ },
1821
+ onAdd: function(e) {
1822
+ var t = "leaflet-control-scale", n = N("div", t), r = this.options;
1823
+ return this._addScales(r, t + "-line", n), e.on(r.updateWhenIdle ? "moveend" : "move", this._update, this), e.whenReady(this._update, this), n;
1824
+ },
1825
+ onRemove: function(e) {
1826
+ e.off(this.options.updateWhenIdle ? "moveend" : "move", this._update, this);
1827
+ },
1828
+ _addScales: function(e, t, n) {
1829
+ e.metric && (this._mScale = N("div", t, n)), e.imperial && (this._iScale = N("div", t, n));
1830
+ },
1831
+ _update: function() {
1832
+ var e = this._map, t = e.getSize().y / 2, n = e.distance(e.containerPointToLatLng([0, t]), e.containerPointToLatLng([this.options.maxWidth, t]));
1833
+ this._updateScales(n);
1834
+ },
1835
+ _updateScales: function(e) {
1836
+ this.options.metric && e && this._updateMetric(e), this.options.imperial && e && this._updateImperial(e);
1837
+ },
1838
+ _updateMetric: function(e) {
1839
+ var t = this._getRoundNum(e), n = t < 1e3 ? t + " m" : t / 1e3 + " km";
1840
+ this._updateScale(this._mScale, n, t / e);
1841
+ },
1842
+ _updateImperial: function(e) {
1843
+ var t = e * 3.2808399, n, r, i;
1844
+ t > 5280 ? (n = t / 5280, r = this._getRoundNum(n), this._updateScale(this._iScale, r + " mi", r / n)) : (i = this._getRoundNum(t), this._updateScale(this._iScale, i + " ft", i / t));
1845
+ },
1846
+ _updateScale: function(e, t, n) {
1847
+ e.style.width = Math.round(this.options.maxWidth * n) + "px", e.innerHTML = t;
1848
+ },
1849
+ _getRoundNum: function(e) {
1850
+ var t = 10 ** ((Math.floor(e) + "").length - 1), n = e / t;
1851
+ return n = n >= 10 ? 10 : n >= 5 ? 5 : n >= 3 ? 3 : n >= 2 ? 2 : 1, t * n;
1852
+ }
1853
+ }), bn = function(e) {
1854
+ return new yn(e);
1855
+ }, xn = G.extend({
1856
+ options: {
1857
+ position: "bottomright",
1858
+ prefix: "<a href=\"https://leafletjs.com\" title=\"A JavaScript library for interactive maps\">" + (M.inlineSvg ? "<svg aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"8\" viewBox=\"0 0 12 8\" class=\"leaflet-attribution-flag\"><path fill=\"#4C7BE1\" d=\"M0 0h12v4H0z\"/><path fill=\"#FFD500\" d=\"M0 4h12v3H0z\"/><path fill=\"#E0BC00\" d=\"M0 7h12v1H0z\"/></svg> " : "") + "Leaflet</a>"
1859
+ },
1860
+ initialize: function(e) {
1861
+ p(this, e), this._attributions = {};
1862
+ },
1863
+ onAdd: function(e) {
1864
+ for (var t in e.attributionControl = this, this._container = N("div", "leaflet-control-attribution"), rn(this._container), e._layers) e._layers[t].getAttribution && this.addAttribution(e._layers[t].getAttribution());
1865
+ return this._update(), e.on("layeradd", this._addAttribution, this), this._container;
1866
+ },
1867
+ onRemove: function(e) {
1868
+ e.off("layeradd", this._addAttribution, this);
1869
+ },
1870
+ _addAttribution: function(e) {
1871
+ e.layer.getAttribution && (this.addAttribution(e.layer.getAttribution()), e.layer.once("remove", function() {
1872
+ this.removeAttribution(e.layer.getAttribution());
1873
+ }, this));
1874
+ },
1875
+ setPrefix: function(e) {
1876
+ return this.options.prefix = e, this._update(), this;
1877
+ },
1878
+ addAttribution: function(e) {
1879
+ return e ? (this._attributions[e] || (this._attributions[e] = 0), this._attributions[e]++, this._update(), this) : this;
1880
+ },
1881
+ removeAttribution: function(e) {
1882
+ return e && this._attributions[e] && (this._attributions[e]--, this._update()), this;
1883
+ },
1884
+ _update: function() {
1885
+ if (this._map) {
1886
+ var e = [];
1887
+ for (var t in this._attributions) this._attributions[t] && e.push(t);
1888
+ var n = [];
1889
+ this.options.prefix && n.push(this.options.prefix), e.length && n.push(e.join(", ")), this._container.innerHTML = n.join(" <span aria-hidden=\"true\">|</span> ");
1890
+ }
1891
+ }
1892
+ });
1893
+ W.mergeOptions({ attributionControl: !0 }), W.addInitHook(function() {
1894
+ this.options.attributionControl && new xn().addTo(this);
1895
+ }), G.Layers = hn, G.Zoom = _n, G.Scale = yn, G.Attribution = xn, mn.layers = gn, mn.zoom = vn, mn.scale = bn, mn.attribution = function(e) {
1896
+ return new xn(e);
1897
+ };
1898
+ var K = y.extend({
1899
+ initialize: function(e) {
1900
+ this._map = e;
1901
+ },
1902
+ enable: function() {
1903
+ return this._enabled ? this : (this._enabled = !0, this.addHooks(), this);
1904
+ },
1905
+ disable: function() {
1906
+ return this._enabled ? (this._enabled = !1, this.removeHooks(), this) : this;
1907
+ },
1908
+ enabled: function() {
1909
+ return !!this._enabled;
1910
+ }
1911
+ });
1912
+ K.addTo = function(e, t) {
1913
+ return e.addHandler(t, this), this;
1914
+ };
1915
+ var Sn = { Events: b }, Cn = M.touch ? "touchstart mousedown" : "mousedown", wn = ue.extend({
1916
+ options: { clickTolerance: 3 },
1917
+ initialize: function(e, t, n, r) {
1918
+ p(this, r), this._element = e, this._dragStartTarget = t || e, this._preventOutline = n;
1919
+ },
1920
+ enable: function() {
1921
+ this._enabled ||= (B(this._dragStartTarget, Cn, this._onDown, this), !0);
1922
+ },
1923
+ disable: function() {
1924
+ this._enabled && (wn._dragging === this && this.finishDrag(!0), H(this._dragStartTarget, Cn, this._onDown, this), this._enabled = !1, this._moved = !1);
1925
+ },
1926
+ _onDown: function(e) {
1927
+ if (this._enabled && (this._moved = !1, !jt(this._element, "leaflet-zoom-anim"))) {
1928
+ if (e.touches && e.touches.length !== 1) {
1929
+ wn._dragging === this && this.finishDrag();
1930
+ return;
1931
+ }
1932
+ if (!(wn._dragging || e.shiftKey || e.which !== 1 && e.button !== 1 && !e.touches) && (wn._dragging = this, this._preventOutline && Kt(this._element), Ht(), Rt(), !this._moving)) {
1933
+ this.fire("down");
1934
+ var t = e.touches ? e.touches[0] : e, n = Jt(this._element);
1935
+ this._startPoint = new x(t.clientX, t.clientY), this._startPos = Lt(this._element), this._parentScale = Yt(n);
1936
+ var r = e.type === "mousedown";
1937
+ B(document, r ? "mousemove" : "touchmove", this._onMove, this), B(document, r ? "mouseup" : "touchend touchcancel", this._onUp, this);
1938
+ }
1939
+ }
1940
+ },
1941
+ _onMove: function(e) {
1942
+ if (this._enabled) {
1943
+ if (e.touches && e.touches.length > 1) {
1944
+ this._moved = !0;
1945
+ return;
1946
+ }
1947
+ var t = e.touches && e.touches.length === 1 ? e.touches[0] : e, n = new x(t.clientX, t.clientY)._subtract(this._startPoint);
1948
+ !n.x && !n.y || Math.abs(n.x) + Math.abs(n.y) < this.options.clickTolerance || (n.x /= this._parentScale.x, n.y /= this._parentScale.y, U(e), this._moved || (this.fire("dragstart"), this._moved = !0, F(document.body, "leaflet-dragging"), this._lastTarget = e.target || e.srcElement, window.SVGElementInstance && this._lastTarget instanceof window.SVGElementInstance && (this._lastTarget = this._lastTarget.correspondingUseElement), F(this._lastTarget, "leaflet-drag-target")), this._newPos = this._startPos.add(n), this._moving = !0, this._lastEvent = e, this._updatePosition());
1949
+ }
1950
+ },
1951
+ _updatePosition: function() {
1952
+ var e = { originalEvent: this._lastEvent };
1953
+ this.fire("predrag", e), z(this._element, this._newPos), this.fire("drag", e);
1954
+ },
1955
+ _onUp: function() {
1956
+ this._enabled && this.finishDrag();
1957
+ },
1958
+ finishDrag: function(e) {
1959
+ I(document.body, "leaflet-dragging"), this._lastTarget &&= (I(this._lastTarget, "leaflet-drag-target"), null), H(document, "mousemove touchmove", this._onMove, this), H(document, "mouseup touchend touchcancel", this._onUp, this), Ut(), zt();
1960
+ var t = this._moved && this._moving;
1961
+ this._moving = !1, wn._dragging = !1, t && this.fire("dragend", {
1962
+ noInertia: e,
1963
+ distance: this._newPos.distanceTo(this._startPos)
1964
+ });
1965
+ }
1966
+ });
1967
+ function Tn(e, t, n) {
1968
+ var r, i = [
1969
+ 1,
1970
+ 4,
1971
+ 2,
1972
+ 8
1973
+ ], a, o, s, c, l, u, d, f;
1974
+ for (a = 0, u = e.length; a < u; a++) e[a]._code = Rn(e[a], t);
1975
+ for (s = 0; s < 4; s++) {
1976
+ for (d = i[s], r = [], a = 0, u = e.length, o = u - 1; a < u; o = a++) c = e[a], l = e[o], c._code & d ? l._code & d || (f = Ln(l, c, d, t, n), f._code = Rn(f, t), r.push(f)) : (l._code & d && (f = Ln(l, c, d, t, n), f._code = Rn(f, t), r.push(f)), r.push(c));
1977
+ e = r;
1978
+ }
1979
+ return e;
1980
+ }
1981
+ function En(e, t) {
1982
+ var n, r, i, a, o, s, c, l, u;
1983
+ if (!e || e.length === 0) throw Error("latlngs not passed");
1984
+ q(e) || (console.warn("latlngs are not flat! Only the first ring will be used"), e = e[0]);
1985
+ var d = O([0, 0]), f = E(e);
1986
+ f.getNorthWest().distanceTo(f.getSouthWest()) * f.getNorthEast().distanceTo(f.getNorthWest()) < 1700 && (d = Dn(e));
1987
+ var p = e.length, m = [];
1988
+ for (n = 0; n < p; n++) {
1989
+ var ee = O(e[n]);
1990
+ m.push(t.project(O([ee.lat - d.lat, ee.lng - d.lng])));
1991
+ }
1992
+ for (s = c = l = 0, n = 0, r = p - 1; n < p; r = n++) i = m[n], a = m[r], o = i.y * a.x - a.y * i.x, c += (i.x + a.x) * o, l += (i.y + a.y) * o, s += o * 3;
1993
+ u = s === 0 ? m[0] : [c / s, l / s];
1994
+ var h = t.unproject(S(u));
1995
+ return O([h.lat + d.lat, h.lng + d.lng]);
1996
+ }
1997
+ function Dn(e) {
1998
+ for (var t = 0, n = 0, r = 0, i = 0; i < e.length; i++) {
1999
+ var a = O(e[i]);
2000
+ t += a.lat, n += a.lng, r++;
2001
+ }
2002
+ return O([t / r, n / r]);
2003
+ }
2004
+ var On = {
2005
+ __proto__: null,
2006
+ clipPolygon: Tn,
2007
+ polygonCenter: En,
2008
+ centroid: Dn
2009
+ };
2010
+ function kn(e, t) {
2011
+ if (!t || !e.length) return e.slice();
2012
+ var n = t * t;
2013
+ return e = Pn(e, n), e = Mn(e, n), e;
2014
+ }
2015
+ function An(e, t, n) {
2016
+ return Math.sqrt(Bn(e, t, n, !0));
2017
+ }
2018
+ function jn(e, t, n) {
2019
+ return Bn(e, t, n);
2020
+ }
2021
+ function Mn(e, t) {
2022
+ var n = e.length, r = new (typeof Uint8Array < "u" ? Uint8Array : Array)(n);
2023
+ r[0] = r[n - 1] = 1, Nn(e, r, t, 0, n - 1);
2024
+ var i, a = [];
2025
+ for (i = 0; i < n; i++) r[i] && a.push(e[i]);
2026
+ return a;
2027
+ }
2028
+ function Nn(e, t, n, r, i) {
2029
+ var a = 0, o, s, c;
2030
+ for (s = r + 1; s <= i - 1; s++) c = Bn(e[s], e[r], e[i], !0), c > a && (o = s, a = c);
2031
+ a > n && (t[o] = 1, Nn(e, t, n, r, o), Nn(e, t, n, o, i));
2032
+ }
2033
+ function Pn(e, t) {
2034
+ for (var n = [e[0]], r = 1, i = 0, a = e.length; r < a; r++) zn(e[r], e[i]) > t && (n.push(e[r]), i = r);
2035
+ return i < a - 1 && n.push(e[a - 1]), n;
2036
+ }
2037
+ var Fn;
2038
+ function In(e, t, n, r, i) {
2039
+ var a = r ? Fn : Rn(e, n), o = Rn(t, n), s, c, l;
2040
+ for (Fn = o;;) {
2041
+ if (!(a | o)) return [e, t];
2042
+ if (a & o) return !1;
2043
+ s = a || o, c = Ln(e, t, s, n, i), l = Rn(c, n), s === a ? (e = c, a = l) : (t = c, o = l);
2044
+ }
2045
+ }
2046
+ function Ln(e, t, n, r, i) {
2047
+ var a = t.x - e.x, o = t.y - e.y, s = r.min, c = r.max, l, u;
2048
+ return n & 8 ? (l = e.x + a * (c.y - e.y) / o, u = c.y) : n & 4 ? (l = e.x + a * (s.y - e.y) / o, u = s.y) : n & 2 ? (l = c.x, u = e.y + o * (c.x - e.x) / a) : n & 1 && (l = s.x, u = e.y + o * (s.x - e.x) / a), new x(l, u, i);
2049
+ }
2050
+ function Rn(e, t) {
2051
+ var n = 0;
2052
+ return e.x < t.min.x ? n |= 1 : e.x > t.max.x && (n |= 2), e.y < t.min.y ? n |= 4 : e.y > t.max.y && (n |= 8), n;
2053
+ }
2054
+ function zn(e, t) {
2055
+ var n = t.x - e.x, r = t.y - e.y;
2056
+ return n * n + r * r;
2057
+ }
2058
+ function Bn(e, t, n, r) {
2059
+ var i = t.x, a = t.y, o = n.x - i, s = n.y - a, c = o * o + s * s, l;
2060
+ return c > 0 && (l = ((e.x - i) * o + (e.y - a) * s) / c, l > 1 ? (i = n.x, a = n.y) : l > 0 && (i += o * l, a += s * l)), o = e.x - i, s = e.y - a, r ? o * o + s * s : new x(i, a);
2061
+ }
2062
+ function q(e) {
2063
+ return !g(e[0]) || typeof e[0][0] != "object" && e[0][0] !== void 0;
2064
+ }
2065
+ function Vn(e) {
2066
+ return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."), q(e);
2067
+ }
2068
+ function Hn(e, t) {
2069
+ var n, r, i, a, o, s, c, l;
2070
+ if (!e || e.length === 0) throw Error("latlngs not passed");
2071
+ q(e) || (console.warn("latlngs are not flat! Only the first ring will be used"), e = e[0]);
2072
+ var u = O([0, 0]), d = E(e);
2073
+ d.getNorthWest().distanceTo(d.getSouthWest()) * d.getNorthEast().distanceTo(d.getNorthWest()) < 1700 && (u = Dn(e));
2074
+ var f = e.length, p = [];
2075
+ for (n = 0; n < f; n++) {
2076
+ var m = O(e[n]);
2077
+ p.push(t.project(O([m.lat - u.lat, m.lng - u.lng])));
2078
+ }
2079
+ for (n = 0, r = 0; n < f - 1; n++) r += p[n].distanceTo(p[n + 1]) / 2;
2080
+ if (r === 0) l = p[0];
2081
+ else for (n = 0, a = 0; n < f - 1; n++) if (o = p[n], s = p[n + 1], i = o.distanceTo(s), a += i, a > r) {
2082
+ c = (a - r) / i, l = [s.x - c * (s.x - o.x), s.y - c * (s.y - o.y)];
2083
+ break;
2084
+ }
2085
+ var ee = t.unproject(S(l));
2086
+ return O([ee.lat + u.lat, ee.lng + u.lng]);
2087
+ }
2088
+ var Un = {
2089
+ __proto__: null,
2090
+ simplify: kn,
2091
+ pointToSegmentDistance: An,
2092
+ closestPointOnSegment: jn,
2093
+ clipSegment: In,
2094
+ _getEdgeIntersection: Ln,
2095
+ _getBitCode: Rn,
2096
+ _sqClosestPointOnSegment: Bn,
2097
+ isFlat: q,
2098
+ _flat: Vn,
2099
+ polylineCenter: Hn
2100
+ }, Wn = {
2101
+ project: function(e) {
2102
+ return new x(e.lng, e.lat);
2103
+ },
2104
+ unproject: function(e) {
2105
+ return new D(e.y, e.x);
2106
+ },
2107
+ bounds: new C([-180, -90], [180, 90])
2108
+ }, Gn = {
2109
+ R: 6378137,
2110
+ R_MINOR: 6356752.314245179,
2111
+ bounds: new C([-20037508.34279, -15496570.73972], [20037508.34279, 18764656.23138]),
2112
+ project: function(e) {
2113
+ var t = Math.PI / 180, n = this.R, r = e.lat * t, i = this.R_MINOR / n, a = Math.sqrt(1 - i * i), o = a * Math.sin(r), s = Math.tan(Math.PI / 4 - r / 2) / ((1 - o) / (1 + o)) ** (a / 2);
2114
+ return r = -n * Math.log(Math.max(s, 1e-10)), new x(e.lng * t * n, r);
2115
+ },
2116
+ unproject: function(e) {
2117
+ for (var t = 180 / Math.PI, n = this.R, r = this.R_MINOR / n, i = Math.sqrt(1 - r * r), a = Math.exp(-e.y / n), o = Math.PI / 2 - 2 * Math.atan(a), s = 0, c = .1, l; s < 15 && Math.abs(c) > 1e-7; s++) l = i * Math.sin(o), l = ((1 - l) / (1 + l)) ** (i / 2), c = Math.PI / 2 - 2 * Math.atan(a * l) - o, o += c;
2118
+ return new D(o * t, e.x * t / n);
2119
+ }
2120
+ }, Kn = {
2121
+ __proto__: null,
2122
+ LonLat: Wn,
2123
+ Mercator: Gn,
2124
+ SphericalMercator: pe
2125
+ }, qn = n({}, A, {
2126
+ code: "EPSG:3395",
2127
+ projection: Gn,
2128
+ transformation: function() {
2129
+ var e = .5 / (Math.PI * Gn.R);
2130
+ return he(e, .5, -e, .5);
2131
+ }()
2132
+ }), Jn = n({}, A, {
2133
+ code: "EPSG:4326",
2134
+ projection: Wn,
2135
+ transformation: he(1 / 180, 1, -1 / 180, .5)
2136
+ }), Yn = n({}, k, {
2137
+ projection: Wn,
2138
+ transformation: he(1, 0, -1, 0),
2139
+ scale: function(e) {
2140
+ return 2 ** e;
2141
+ },
2142
+ zoom: function(e) {
2143
+ return Math.log(e) / Math.LN2;
2144
+ },
2145
+ distance: function(e, t) {
2146
+ var n = t.lng - e.lng, r = t.lat - e.lat;
2147
+ return Math.sqrt(n * n + r * r);
2148
+ },
2149
+ infinite: !0
2150
+ });
2151
+ k.Earth = A, k.EPSG3395 = qn, k.EPSG3857 = ge, k.EPSG900913 = _e, k.EPSG4326 = Jn, k.Simple = Yn;
2152
+ var J = ue.extend({
2153
+ options: {
2154
+ pane: "overlayPane",
2155
+ attribution: null,
2156
+ bubblingMouseEvents: !0
2157
+ },
2158
+ addTo: function(e) {
2159
+ return e.addLayer(this), this;
2160
+ },
2161
+ remove: function() {
2162
+ return this.removeFrom(this._map || this._mapToAdd);
2163
+ },
2164
+ removeFrom: function(e) {
2165
+ return e && e.removeLayer(this), this;
2166
+ },
2167
+ getPane: function(e) {
2168
+ return this._map.getPane(e ? this.options[e] || e : this.options.pane);
2169
+ },
2170
+ addInteractiveTarget: function(e) {
2171
+ return this._map._targets[o(e)] = this, this;
2172
+ },
2173
+ removeInteractiveTarget: function(e) {
2174
+ return delete this._map._targets[o(e)], this;
2175
+ },
2176
+ getAttribution: function() {
2177
+ return this.options.attribution;
2178
+ },
2179
+ _layerAdd: function(e) {
2180
+ var t = e.target;
2181
+ if (t.hasLayer(this)) {
2182
+ if (this._map = t, this._zoomAnimated = t._zoomAnimated, this.getEvents) {
2183
+ var n = this.getEvents();
2184
+ t.on(n, this), this.once("remove", function() {
2185
+ t.off(n, this);
2186
+ }, this);
2187
+ }
2188
+ this.onAdd(t), this.fire("add"), t.fire("layeradd", { layer: this });
2189
+ }
2190
+ }
2191
+ });
2192
+ W.include({
2193
+ addLayer: function(e) {
2194
+ if (!e._layerAdd) throw Error("The provided object is not a Layer.");
2195
+ var t = o(e);
2196
+ return this._layers[t] ? this : (this._layers[t] = e, e._mapToAdd = this, e.beforeAdd && e.beforeAdd(this), this.whenReady(e._layerAdd, e), this);
2197
+ },
2198
+ removeLayer: function(e) {
2199
+ var t = o(e);
2200
+ return this._layers[t] ? (this._loaded && e.onRemove(this), delete this._layers[t], this._loaded && (this.fire("layerremove", { layer: e }), e.fire("remove")), e._map = e._mapToAdd = null, this) : this;
2201
+ },
2202
+ hasLayer: function(e) {
2203
+ return o(e) in this._layers;
2204
+ },
2205
+ eachLayer: function(e, t) {
2206
+ for (var n in this._layers) e.call(t, this._layers[n]);
2207
+ return this;
2208
+ },
2209
+ _addLayers: function(e) {
2210
+ e = e ? g(e) ? e : [e] : [];
2211
+ for (var t = 0, n = e.length; t < n; t++) this.addLayer(e[t]);
2212
+ },
2213
+ _addZoomLimit: function(e) {
2214
+ (!isNaN(e.options.maxZoom) || !isNaN(e.options.minZoom)) && (this._zoomBoundLayers[o(e)] = e, this._updateZoomLevels());
2215
+ },
2216
+ _removeZoomLimit: function(e) {
2217
+ var t = o(e);
2218
+ this._zoomBoundLayers[t] && (delete this._zoomBoundLayers[t], this._updateZoomLevels());
2219
+ },
2220
+ _updateZoomLevels: function() {
2221
+ var e = Infinity, t = -Infinity, n = this._getZoomSpan();
2222
+ for (var r in this._zoomBoundLayers) {
2223
+ var i = this._zoomBoundLayers[r].options;
2224
+ e = i.minZoom === void 0 ? e : Math.min(e, i.minZoom), t = i.maxZoom === void 0 ? t : Math.max(t, i.maxZoom);
2225
+ }
2226
+ this._layersMaxZoom = t === -Infinity ? void 0 : t, this._layersMinZoom = e === Infinity ? void 0 : e, n !== this._getZoomSpan() && this.fire("zoomlevelschange"), this.options.maxZoom === void 0 && this._layersMaxZoom && this.getZoom() > this._layersMaxZoom && this.setZoom(this._layersMaxZoom), this.options.minZoom === void 0 && this._layersMinZoom && this.getZoom() < this._layersMinZoom && this.setZoom(this._layersMinZoom);
2227
+ }
2228
+ });
2229
+ var Xn = J.extend({
2230
+ initialize: function(e, t) {
2231
+ p(this, t), this._layers = {};
2232
+ var n, r;
2233
+ if (e) for (n = 0, r = e.length; n < r; n++) this.addLayer(e[n]);
2234
+ },
2235
+ addLayer: function(e) {
2236
+ var t = this.getLayerId(e);
2237
+ return this._layers[t] = e, this._map && this._map.addLayer(e), this;
2238
+ },
2239
+ removeLayer: function(e) {
2240
+ var t = e in this._layers ? e : this.getLayerId(e);
2241
+ return this._map && this._layers[t] && this._map.removeLayer(this._layers[t]), delete this._layers[t], this;
2242
+ },
2243
+ hasLayer: function(e) {
2244
+ return (typeof e == "number" ? e : this.getLayerId(e)) in this._layers;
2245
+ },
2246
+ clearLayers: function() {
2247
+ return this.eachLayer(this.removeLayer, this);
2248
+ },
2249
+ invoke: function(e) {
2250
+ var t = Array.prototype.slice.call(arguments, 1), n, r;
2251
+ for (n in this._layers) r = this._layers[n], r[e] && r[e].apply(r, t);
2252
+ return this;
2253
+ },
2254
+ onAdd: function(e) {
2255
+ this.eachLayer(e.addLayer, e);
2256
+ },
2257
+ onRemove: function(e) {
2258
+ this.eachLayer(e.removeLayer, e);
2259
+ },
2260
+ eachLayer: function(e, t) {
2261
+ for (var n in this._layers) e.call(t, this._layers[n]);
2262
+ return this;
2263
+ },
2264
+ getLayer: function(e) {
2265
+ return this._layers[e];
2266
+ },
2267
+ getLayers: function() {
2268
+ var e = [];
2269
+ return this.eachLayer(e.push, e), e;
2270
+ },
2271
+ setZIndex: function(e) {
2272
+ return this.invoke("setZIndex", e);
2273
+ },
2274
+ getLayerId: function(e) {
2275
+ return o(e);
2276
+ }
2277
+ }), Zn = function(e, t) {
2278
+ return new Xn(e, t);
2279
+ }, Y = Xn.extend({
2280
+ addLayer: function(e) {
2281
+ return this.hasLayer(e) ? this : (e.addEventParent(this), Xn.prototype.addLayer.call(this, e), this.fire("layeradd", { layer: e }));
2282
+ },
2283
+ removeLayer: function(e) {
2284
+ return this.hasLayer(e) ? (e in this._layers && (e = this._layers[e]), e.removeEventParent(this), Xn.prototype.removeLayer.call(this, e), this.fire("layerremove", { layer: e })) : this;
2285
+ },
2286
+ setStyle: function(e) {
2287
+ return this.invoke("setStyle", e);
2288
+ },
2289
+ bringToFront: function() {
2290
+ return this.invoke("bringToFront");
2291
+ },
2292
+ bringToBack: function() {
2293
+ return this.invoke("bringToBack");
2294
+ },
2295
+ getBounds: function() {
2296
+ var e = new T();
2297
+ for (var t in this._layers) {
2298
+ var n = this._layers[t];
2299
+ e.extend(n.getBounds ? n.getBounds() : n.getLatLng());
2300
+ }
2301
+ return e;
2302
+ }
2303
+ }), Qn = function(e, t) {
2304
+ return new Y(e, t);
2305
+ }, $n = y.extend({
2306
+ options: {
2307
+ popupAnchor: [0, 0],
2308
+ tooltipAnchor: [0, 0],
2309
+ crossOrigin: !1
2310
+ },
2311
+ initialize: function(e) {
2312
+ p(this, e);
2313
+ },
2314
+ createIcon: function(e) {
2315
+ return this._createIcon("icon", e);
2316
+ },
2317
+ createShadow: function(e) {
2318
+ return this._createIcon("shadow", e);
2319
+ },
2320
+ _createIcon: function(e, t) {
2321
+ var n = this._getIconUrl(e);
2322
+ if (!n) {
2323
+ if (e === "icon") throw Error("iconUrl not set in Icon options (see the docs).");
2324
+ return null;
2325
+ }
2326
+ var r = this._createImg(n, t && t.tagName === "IMG" ? t : null);
2327
+ return this._setIconStyles(r, e), (this.options.crossOrigin || this.options.crossOrigin === "") && (r.crossOrigin = this.options.crossOrigin === !0 ? "" : this.options.crossOrigin), r;
2328
+ },
2329
+ _setIconStyles: function(e, t) {
2330
+ var n = this.options, r = n[t + "Size"];
2331
+ typeof r == "number" && (r = [r, r]);
2332
+ var i = S(r), a = S(t === "shadow" && n.shadowAnchor || n.iconAnchor || i && i.divideBy(2, !0));
2333
+ e.className = "leaflet-marker-" + t + " " + (n.className || ""), a && (e.style.marginLeft = -a.x + "px", e.style.marginTop = -a.y + "px"), i && (e.style.width = i.x + "px", e.style.height = i.y + "px");
2334
+ },
2335
+ _createImg: function(e, t) {
2336
+ return t ||= document.createElement("img"), t.src = e, t;
2337
+ },
2338
+ _getIconUrl: function(e) {
2339
+ return M.retina && this.options[e + "RetinaUrl"] || this.options[e + "Url"];
2340
+ }
2341
+ });
2342
+ function er(e) {
2343
+ return new $n(e);
2344
+ }
2345
+ var tr = $n.extend({
2346
+ options: {
2347
+ iconUrl: "marker-icon.png",
2348
+ iconRetinaUrl: "marker-icon-2x.png",
2349
+ shadowUrl: "marker-shadow.png",
2350
+ iconSize: [25, 41],
2351
+ iconAnchor: [12, 41],
2352
+ popupAnchor: [1, -34],
2353
+ tooltipAnchor: [16, -28],
2354
+ shadowSize: [41, 41]
2355
+ },
2356
+ _getIconUrl: function(e) {
2357
+ return typeof tr.imagePath != "string" && (tr.imagePath = this._detectIconPath()), (this.options.imagePath || tr.imagePath) + $n.prototype._getIconUrl.call(this, e);
2358
+ },
2359
+ _stripUrl: function(e) {
2360
+ var t = function(e, t, n) {
2361
+ var r = t.exec(e);
2362
+ return r && r[n];
2363
+ };
2364
+ return e = t(e, /^url\((['"])?(.+)\1\)$/, 2), e && t(e, /^(.*)marker-icon\.png$/, 1);
2365
+ },
2366
+ _detectIconPath: function() {
2367
+ var e = N("div", "leaflet-default-icon-path", document.body), t = Dt(e, "background-image") || Dt(e, "backgroundImage");
2368
+ if (document.body.removeChild(e), t = this._stripUrl(t), t) return t;
2369
+ var n = document.querySelector("link[href$=\"leaflet.css\"]");
2370
+ return n ? n.href.substring(0, n.href.length - 11 - 1) : "";
2371
+ }
2372
+ }), nr = K.extend({
2373
+ initialize: function(e) {
2374
+ this._marker = e;
2375
+ },
2376
+ addHooks: function() {
2377
+ var e = this._marker._icon;
2378
+ this._draggable ||= new wn(e, e, !0), this._draggable.on({
2379
+ dragstart: this._onDragStart,
2380
+ predrag: this._onPreDrag,
2381
+ drag: this._onDrag,
2382
+ dragend: this._onDragEnd
2383
+ }, this).enable(), F(e, "leaflet-marker-draggable");
2384
+ },
2385
+ removeHooks: function() {
2386
+ this._draggable.off({
2387
+ dragstart: this._onDragStart,
2388
+ predrag: this._onPreDrag,
2389
+ drag: this._onDrag,
2390
+ dragend: this._onDragEnd
2391
+ }, this).disable(), this._marker._icon && I(this._marker._icon, "leaflet-marker-draggable");
2392
+ },
2393
+ moved: function() {
2394
+ return this._draggable && this._draggable._moved;
2395
+ },
2396
+ _adjustPan: function(e) {
2397
+ var t = this._marker, n = t._map, r = this._marker.options.autoPanSpeed, i = this._marker.options.autoPanPadding, a = Lt(t._icon), o = n.getPixelBounds(), s = n.getPixelOrigin(), c = w(o.min._subtract(s).add(i), o.max._subtract(s).subtract(i));
2398
+ if (!c.contains(a)) {
2399
+ var l = S((Math.max(c.max.x, a.x) - c.max.x) / (o.max.x - c.max.x) - (Math.min(c.min.x, a.x) - c.min.x) / (o.min.x - c.min.x), (Math.max(c.max.y, a.y) - c.max.y) / (o.max.y - c.max.y) - (Math.min(c.min.y, a.y) - c.min.y) / (o.min.y - c.min.y)).multiplyBy(r);
2400
+ n.panBy(l, { animate: !1 }), this._draggable._newPos._add(l), this._draggable._startPos._add(l), z(t._icon, this._draggable._newPos), this._onDrag(e), this._panRequest = _(this._adjustPan.bind(this, e));
2401
+ }
2402
+ },
2403
+ _onDragStart: function() {
2404
+ this._oldLatLng = this._marker.getLatLng(), this._marker.closePopup && this._marker.closePopup(), this._marker.fire("movestart").fire("dragstart");
2405
+ },
2406
+ _onPreDrag: function(e) {
2407
+ this._marker.options.autoPan && (v(this._panRequest), this._panRequest = _(this._adjustPan.bind(this, e)));
2408
+ },
2409
+ _onDrag: function(e) {
2410
+ var t = this._marker, n = t._shadow, r = Lt(t._icon), i = t._map.layerPointToLatLng(r);
2411
+ n && z(n, r), t._latlng = i, e.latlng = i, e.oldLatLng = this._oldLatLng, t.fire("move", e).fire("drag", e);
2412
+ },
2413
+ _onDragEnd: function(e) {
2414
+ v(this._panRequest), delete this._oldLatLng, this._marker.fire("moveend").fire("dragend", e);
2415
+ }
2416
+ }), rr = J.extend({
2417
+ options: {
2418
+ icon: new tr(),
2419
+ interactive: !0,
2420
+ keyboard: !0,
2421
+ title: "",
2422
+ alt: "Marker",
2423
+ zIndexOffset: 0,
2424
+ opacity: 1,
2425
+ riseOnHover: !1,
2426
+ riseOffset: 250,
2427
+ pane: "markerPane",
2428
+ shadowPane: "shadowPane",
2429
+ bubblingMouseEvents: !1,
2430
+ autoPanOnFocus: !0,
2431
+ draggable: !1,
2432
+ autoPan: !1,
2433
+ autoPanPadding: [50, 50],
2434
+ autoPanSpeed: 10
2435
+ },
2436
+ initialize: function(e, t) {
2437
+ p(this, t), this._latlng = O(e);
2438
+ },
2439
+ onAdd: function(e) {
2440
+ this._zoomAnimated = this._zoomAnimated && e.options.markerZoomAnimation, this._zoomAnimated && e.on("zoomanim", this._animateZoom, this), this._initIcon(), this.update();
2441
+ },
2442
+ onRemove: function(e) {
2443
+ this.dragging && this.dragging.enabled() && (this.options.draggable = !0, this.dragging.removeHooks()), delete this.dragging, this._zoomAnimated && e.off("zoomanim", this._animateZoom, this), this._removeIcon(), this._removeShadow();
2444
+ },
2445
+ getEvents: function() {
2446
+ return {
2447
+ zoom: this.update,
2448
+ viewreset: this.update
2449
+ };
2450
+ },
2451
+ getLatLng: function() {
2452
+ return this._latlng;
2453
+ },
2454
+ setLatLng: function(e) {
2455
+ var t = this._latlng;
2456
+ return this._latlng = O(e), this.update(), this.fire("move", {
2457
+ oldLatLng: t,
2458
+ latlng: this._latlng
2459
+ });
2460
+ },
2461
+ setZIndexOffset: function(e) {
2462
+ return this.options.zIndexOffset = e, this.update();
2463
+ },
2464
+ getIcon: function() {
2465
+ return this.options.icon;
2466
+ },
2467
+ setIcon: function(e) {
2468
+ return this.options.icon = e, this._map && (this._initIcon(), this.update()), this._popup && this.bindPopup(this._popup, this._popup.options), this;
2469
+ },
2470
+ getElement: function() {
2471
+ return this._icon;
2472
+ },
2473
+ update: function() {
2474
+ if (this._icon && this._map) {
2475
+ var e = this._map.latLngToLayerPoint(this._latlng).round();
2476
+ this._setPos(e);
2477
+ }
2478
+ return this;
2479
+ },
2480
+ _initIcon: function() {
2481
+ var e = this.options, t = "leaflet-zoom-" + (this._zoomAnimated ? "animated" : "hide"), n = e.icon.createIcon(this._icon), r = !1;
2482
+ n !== this._icon && (this._icon && this._removeIcon(), r = !0, e.title && (n.title = e.title), n.tagName === "IMG" && (n.alt = e.alt || "")), F(n, t), e.keyboard && (n.tabIndex = "0", n.setAttribute("role", "button")), this._icon = n, e.riseOnHover && this.on({
2483
+ mouseover: this._bringToFront,
2484
+ mouseout: this._resetZIndex
2485
+ }), this.options.autoPanOnFocus && B(n, "focus", this._panOnFocus, this);
2486
+ var i = e.icon.createShadow(this._shadow), a = !1;
2487
+ i !== this._shadow && (this._removeShadow(), a = !0), i && (F(i, t), i.alt = ""), this._shadow = i, e.opacity < 1 && this._updateOpacity(), r && this.getPane().appendChild(this._icon), this._initInteraction(), i && a && this.getPane(e.shadowPane).appendChild(this._shadow);
2488
+ },
2489
+ _removeIcon: function() {
2490
+ this.options.riseOnHover && this.off({
2491
+ mouseover: this._bringToFront,
2492
+ mouseout: this._resetZIndex
2493
+ }), this.options.autoPanOnFocus && H(this._icon, "focus", this._panOnFocus, this), P(this._icon), this.removeInteractiveTarget(this._icon), this._icon = null;
2494
+ },
2495
+ _removeShadow: function() {
2496
+ this._shadow && P(this._shadow), this._shadow = null;
2497
+ },
2498
+ _setPos: function(e) {
2499
+ this._icon && z(this._icon, e), this._shadow && z(this._shadow, e), this._zIndex = e.y + this.options.zIndexOffset, this._resetZIndex();
2500
+ },
2501
+ _updateZIndex: function(e) {
2502
+ this._icon && (this._icon.style.zIndex = this._zIndex + e);
2503
+ },
2504
+ _animateZoom: function(e) {
2505
+ var t = this._map._latLngToNewLayerPoint(this._latlng, e.zoom, e.center).round();
2506
+ this._setPos(t);
2507
+ },
2508
+ _initInteraction: function() {
2509
+ if (this.options.interactive && (F(this._icon, "leaflet-interactive"), this.addInteractiveTarget(this._icon), nr)) {
2510
+ var e = this.options.draggable;
2511
+ this.dragging && (e = this.dragging.enabled(), this.dragging.disable()), this.dragging = new nr(this), e && this.dragging.enable();
2512
+ }
2513
+ },
2514
+ setOpacity: function(e) {
2515
+ return this.options.opacity = e, this._map && this._updateOpacity(), this;
2516
+ },
2517
+ _updateOpacity: function() {
2518
+ var e = this.options.opacity;
2519
+ this._icon && R(this._icon, e), this._shadow && R(this._shadow, e);
2520
+ },
2521
+ _bringToFront: function() {
2522
+ this._updateZIndex(this.options.riseOffset);
2523
+ },
2524
+ _resetZIndex: function() {
2525
+ this._updateZIndex(0);
2526
+ },
2527
+ _panOnFocus: function() {
2528
+ var e = this._map;
2529
+ if (e) {
2530
+ var t = this.options.icon.options, n = t.iconSize ? S(t.iconSize) : S(0, 0), r = t.iconAnchor ? S(t.iconAnchor) : S(0, 0);
2531
+ e.panInside(this._latlng, {
2532
+ paddingTopLeft: r,
2533
+ paddingBottomRight: n.subtract(r)
2534
+ });
2535
+ }
2536
+ },
2537
+ _getPopupAnchor: function() {
2538
+ return this.options.icon.options.popupAnchor;
2539
+ },
2540
+ _getTooltipAnchor: function() {
2541
+ return this.options.icon.options.tooltipAnchor;
2542
+ }
2543
+ });
2544
+ function ir(e, t) {
2545
+ return new rr(e, t);
2546
+ }
2547
+ var ar = J.extend({
2548
+ options: {
2549
+ stroke: !0,
2550
+ color: "#3388ff",
2551
+ weight: 3,
2552
+ opacity: 1,
2553
+ lineCap: "round",
2554
+ lineJoin: "round",
2555
+ dashArray: null,
2556
+ dashOffset: null,
2557
+ fill: !1,
2558
+ fillColor: null,
2559
+ fillOpacity: .2,
2560
+ fillRule: "evenodd",
2561
+ interactive: !0,
2562
+ bubblingMouseEvents: !0
2563
+ },
2564
+ beforeAdd: function(e) {
2565
+ this._renderer = e.getRenderer(this);
2566
+ },
2567
+ onAdd: function() {
2568
+ this._renderer._initPath(this), this._reset(), this._renderer._addPath(this);
2569
+ },
2570
+ onRemove: function() {
2571
+ this._renderer._removePath(this);
2572
+ },
2573
+ redraw: function() {
2574
+ return this._map && this._renderer._updatePath(this), this;
2575
+ },
2576
+ setStyle: function(e) {
2577
+ return p(this, e), this._renderer && (this._renderer._updateStyle(this), this.options.stroke && e && Object.prototype.hasOwnProperty.call(e, "weight") && this._updateBounds()), this;
2578
+ },
2579
+ bringToFront: function() {
2580
+ return this._renderer && this._renderer._bringToFront(this), this;
2581
+ },
2582
+ bringToBack: function() {
2583
+ return this._renderer && this._renderer._bringToBack(this), this;
2584
+ },
2585
+ getElement: function() {
2586
+ return this._path;
2587
+ },
2588
+ _reset: function() {
2589
+ this._project(), this._update();
2590
+ },
2591
+ _clickTolerance: function() {
2592
+ return (this.options.stroke ? this.options.weight / 2 : 0) + (this._renderer.options.tolerance || 0);
2593
+ }
2594
+ }), or = ar.extend({
2595
+ options: {
2596
+ fill: !0,
2597
+ radius: 10
2598
+ },
2599
+ initialize: function(e, t) {
2600
+ p(this, t), this._latlng = O(e), this._radius = this.options.radius;
2601
+ },
2602
+ setLatLng: function(e) {
2603
+ var t = this._latlng;
2604
+ return this._latlng = O(e), this.redraw(), this.fire("move", {
2605
+ oldLatLng: t,
2606
+ latlng: this._latlng
2607
+ });
2608
+ },
2609
+ getLatLng: function() {
2610
+ return this._latlng;
2611
+ },
2612
+ setRadius: function(e) {
2613
+ return this.options.radius = this._radius = e, this.redraw();
2614
+ },
2615
+ getRadius: function() {
2616
+ return this._radius;
2617
+ },
2618
+ setStyle: function(e) {
2619
+ var t = e && e.radius || this._radius;
2620
+ return ar.prototype.setStyle.call(this, e), this.setRadius(t), this;
2621
+ },
2622
+ _project: function() {
2623
+ this._point = this._map.latLngToLayerPoint(this._latlng), this._updateBounds();
2624
+ },
2625
+ _updateBounds: function() {
2626
+ var e = this._radius, t = this._radiusY || e, n = this._clickTolerance(), r = [e + n, t + n];
2627
+ this._pxBounds = new C(this._point.subtract(r), this._point.add(r));
2628
+ },
2629
+ _update: function() {
2630
+ this._map && this._updatePath();
2631
+ },
2632
+ _updatePath: function() {
2633
+ this._renderer._updateCircle(this);
2634
+ },
2635
+ _empty: function() {
2636
+ return this._radius && !this._renderer._bounds.intersects(this._pxBounds);
2637
+ },
2638
+ _containsPoint: function(e) {
2639
+ return e.distanceTo(this._point) <= this._radius + this._clickTolerance();
2640
+ }
2641
+ });
2642
+ function sr(e, t) {
2643
+ return new or(e, t);
2644
+ }
2645
+ var cr = or.extend({
2646
+ initialize: function(e, t, r) {
2647
+ if (typeof t == "number" && (t = n({}, r, { radius: t })), p(this, t), this._latlng = O(e), isNaN(this.options.radius)) throw Error("Circle radius cannot be NaN");
2648
+ this._mRadius = this.options.radius;
2649
+ },
2650
+ setRadius: function(e) {
2651
+ return this._mRadius = e, this.redraw();
2652
+ },
2653
+ getRadius: function() {
2654
+ return this._mRadius;
2655
+ },
2656
+ getBounds: function() {
2657
+ var e = [this._radius, this._radiusY || this._radius];
2658
+ return new T(this._map.layerPointToLatLng(this._point.subtract(e)), this._map.layerPointToLatLng(this._point.add(e)));
2659
+ },
2660
+ setStyle: ar.prototype.setStyle,
2661
+ _project: function() {
2662
+ var e = this._latlng.lng, t = this._latlng.lat, n = this._map, r = n.options.crs;
2663
+ if (r.distance === A.distance) {
2664
+ var i = Math.PI / 180, a = this._mRadius / A.R / i, o = n.project([t + a, e]), s = n.project([t - a, e]), c = o.add(s).divideBy(2), l = n.unproject(c).lat, u = Math.acos((Math.cos(a * i) - Math.sin(t * i) * Math.sin(l * i)) / (Math.cos(t * i) * Math.cos(l * i))) / i;
2665
+ (isNaN(u) || u === 0) && (u = a / Math.cos(Math.PI / 180 * t)), this._point = c.subtract(n.getPixelOrigin()), this._radius = isNaN(u) ? 0 : c.x - n.project([l, e - u]).x, this._radiusY = c.y - o.y;
2666
+ } else {
2667
+ var d = r.unproject(r.project(this._latlng).subtract([this._mRadius, 0]));
2668
+ this._point = n.latLngToLayerPoint(this._latlng), this._radius = this._point.x - n.latLngToLayerPoint(d).x;
2669
+ }
2670
+ this._updateBounds();
2671
+ }
2672
+ });
2673
+ function lr(e, t, n) {
2674
+ return new cr(e, t, n);
2675
+ }
2676
+ var X = ar.extend({
2677
+ options: {
2678
+ smoothFactor: 1,
2679
+ noClip: !1
2680
+ },
2681
+ initialize: function(e, t) {
2682
+ p(this, t), this._setLatLngs(e);
2683
+ },
2684
+ getLatLngs: function() {
2685
+ return this._latlngs;
2686
+ },
2687
+ setLatLngs: function(e) {
2688
+ return this._setLatLngs(e), this.redraw();
2689
+ },
2690
+ isEmpty: function() {
2691
+ return !this._latlngs.length;
2692
+ },
2693
+ closestLayerPoint: function(e) {
2694
+ for (var t = Infinity, n = null, r = Bn, i, a, o = 0, s = this._parts.length; o < s; o++) for (var c = this._parts[o], l = 1, u = c.length; l < u; l++) {
2695
+ i = c[l - 1], a = c[l];
2696
+ var d = r(e, i, a, !0);
2697
+ d < t && (t = d, n = r(e, i, a));
2698
+ }
2699
+ return n && (n.distance = Math.sqrt(t)), n;
2700
+ },
2701
+ getCenter: function() {
2702
+ if (!this._map) throw Error("Must add layer to map before using getCenter()");
2703
+ return Hn(this._defaultShape(), this._map.options.crs);
2704
+ },
2705
+ getBounds: function() {
2706
+ return this._bounds;
2707
+ },
2708
+ addLatLng: function(e, t) {
2709
+ return t ||= this._defaultShape(), e = O(e), t.push(e), this._bounds.extend(e), this.redraw();
2710
+ },
2711
+ _setLatLngs: function(e) {
2712
+ this._bounds = new T(), this._latlngs = this._convertLatLngs(e);
2713
+ },
2714
+ _defaultShape: function() {
2715
+ return q(this._latlngs) ? this._latlngs : this._latlngs[0];
2716
+ },
2717
+ _convertLatLngs: function(e) {
2718
+ for (var t = [], n = q(e), r = 0, i = e.length; r < i; r++) n ? (t[r] = O(e[r]), this._bounds.extend(t[r])) : t[r] = this._convertLatLngs(e[r]);
2719
+ return t;
2720
+ },
2721
+ _project: function() {
2722
+ var e = new C();
2723
+ this._rings = [], this._projectLatlngs(this._latlngs, this._rings, e), this._bounds.isValid() && e.isValid() && (this._rawPxBounds = e, this._updateBounds());
2724
+ },
2725
+ _updateBounds: function() {
2726
+ var e = this._clickTolerance(), t = new x(e, e);
2727
+ this._rawPxBounds && (this._pxBounds = new C([this._rawPxBounds.min.subtract(t), this._rawPxBounds.max.add(t)]));
2728
+ },
2729
+ _projectLatlngs: function(e, t, n) {
2730
+ var r = e[0] instanceof D, i = e.length, a, o;
2731
+ if (r) {
2732
+ for (o = [], a = 0; a < i; a++) o[a] = this._map.latLngToLayerPoint(e[a]), n.extend(o[a]);
2733
+ t.push(o);
2734
+ } else for (a = 0; a < i; a++) this._projectLatlngs(e[a], t, n);
2735
+ },
2736
+ _clipPoints: function() {
2737
+ var e = this._renderer._bounds;
2738
+ if (this._parts = [], !(!this._pxBounds || !this._pxBounds.intersects(e))) {
2739
+ if (this.options.noClip) {
2740
+ this._parts = this._rings;
2741
+ return;
2742
+ }
2743
+ var t = this._parts, n, r, i, a, o, s, c;
2744
+ for (n = 0, i = 0, a = this._rings.length; n < a; n++) for (c = this._rings[n], r = 0, o = c.length; r < o - 1; r++) s = In(c[r], c[r + 1], e, r, !0), s && (t[i] = t[i] || [], t[i].push(s[0]), (s[1] !== c[r + 1] || r === o - 2) && (t[i].push(s[1]), i++));
2745
+ }
2746
+ },
2747
+ _simplifyPoints: function() {
2748
+ for (var e = this._parts, t = this.options.smoothFactor, n = 0, r = e.length; n < r; n++) e[n] = kn(e[n], t);
2749
+ },
2750
+ _update: function() {
2751
+ this._map && (this._clipPoints(), this._simplifyPoints(), this._updatePath());
2752
+ },
2753
+ _updatePath: function() {
2754
+ this._renderer._updatePoly(this);
2755
+ },
2756
+ _containsPoint: function(e, t) {
2757
+ var n, r, i, a, o, s, c = this._clickTolerance();
2758
+ if (!this._pxBounds || !this._pxBounds.contains(e)) return !1;
2759
+ for (n = 0, a = this._parts.length; n < a; n++) for (s = this._parts[n], r = 0, o = s.length, i = o - 1; r < o; i = r++) if (!(!t && r === 0) && An(e, s[i], s[r]) <= c) return !0;
2760
+ return !1;
2761
+ }
2762
+ });
2763
+ function ur(e, t) {
2764
+ return new X(e, t);
2765
+ }
2766
+ X._flat = Vn;
2767
+ var dr = X.extend({
2768
+ options: { fill: !0 },
2769
+ isEmpty: function() {
2770
+ return !this._latlngs.length || !this._latlngs[0].length;
2771
+ },
2772
+ getCenter: function() {
2773
+ if (!this._map) throw Error("Must add layer to map before using getCenter()");
2774
+ return En(this._defaultShape(), this._map.options.crs);
2775
+ },
2776
+ _convertLatLngs: function(e) {
2777
+ var t = X.prototype._convertLatLngs.call(this, e), n = t.length;
2778
+ return n >= 2 && t[0] instanceof D && t[0].equals(t[n - 1]) && t.pop(), t;
2779
+ },
2780
+ _setLatLngs: function(e) {
2781
+ X.prototype._setLatLngs.call(this, e), q(this._latlngs) && (this._latlngs = [this._latlngs]);
2782
+ },
2783
+ _defaultShape: function() {
2784
+ return q(this._latlngs[0]) ? this._latlngs[0] : this._latlngs[0][0];
2785
+ },
2786
+ _clipPoints: function() {
2787
+ var e = this._renderer._bounds, t = this.options.weight, n = new x(t, t);
2788
+ if (e = new C(e.min.subtract(n), e.max.add(n)), this._parts = [], !(!this._pxBounds || !this._pxBounds.intersects(e))) {
2789
+ if (this.options.noClip) {
2790
+ this._parts = this._rings;
2791
+ return;
2792
+ }
2793
+ for (var r = 0, i = this._rings.length, a; r < i; r++) a = Tn(this._rings[r], e, !0), a.length && this._parts.push(a);
2794
+ }
2795
+ },
2796
+ _updatePath: function() {
2797
+ this._renderer._updatePoly(this, !0);
2798
+ },
2799
+ _containsPoint: function(e) {
2800
+ var t = !1, n, r, i, a, o, s, c, l;
2801
+ if (!this._pxBounds || !this._pxBounds.contains(e)) return !1;
2802
+ for (a = 0, c = this._parts.length; a < c; a++) for (n = this._parts[a], o = 0, l = n.length, s = l - 1; o < l; s = o++) r = n[o], i = n[s], r.y > e.y != i.y > e.y && e.x < (i.x - r.x) * (e.y - r.y) / (i.y - r.y) + r.x && (t = !t);
2803
+ return t || X.prototype._containsPoint.call(this, e, !0);
2804
+ }
2805
+ });
2806
+ function fr(e, t) {
2807
+ return new dr(e, t);
2808
+ }
2809
+ var Z = Y.extend({
2810
+ initialize: function(e, t) {
2811
+ p(this, t), this._layers = {}, e && this.addData(e);
2812
+ },
2813
+ addData: function(e) {
2814
+ var t = g(e) ? e : e.features, n, r, i;
2815
+ if (t) {
2816
+ for (n = 0, r = t.length; n < r; n++) i = t[n], (i.geometries || i.geometry || i.features || i.coordinates) && this.addData(i);
2817
+ return this;
2818
+ }
2819
+ var a = this.options;
2820
+ if (a.filter && !a.filter(e)) return this;
2821
+ var o = pr(e, a);
2822
+ return o ? (o.feature = br(e), o.defaultOptions = o.options, this.resetStyle(o), a.onEachFeature && a.onEachFeature(e, o), this.addLayer(o)) : this;
2823
+ },
2824
+ resetStyle: function(e) {
2825
+ return e === void 0 ? this.eachLayer(this.resetStyle, this) : (e.options = n({}, e.defaultOptions), this._setLayerStyle(e, this.options.style), this);
2826
+ },
2827
+ setStyle: function(e) {
2828
+ return this.eachLayer(function(t) {
2829
+ this._setLayerStyle(t, e);
2830
+ }, this);
2831
+ },
2832
+ _setLayerStyle: function(e, t) {
2833
+ e.setStyle && (typeof t == "function" && (t = t(e.feature)), e.setStyle(t));
2834
+ }
2835
+ });
2836
+ function pr(e, t) {
2837
+ var n = e.type === "Feature" ? e.geometry : e, r = n ? n.coordinates : null, i = [], a = t && t.pointToLayer, o = t && t.coordsToLatLng || hr, s, c, l, u;
2838
+ if (!r && !n) return null;
2839
+ switch (n.type) {
2840
+ case "Point": return s = o(r), mr(a, e, s, t);
2841
+ case "MultiPoint":
2842
+ for (l = 0, u = r.length; l < u; l++) s = o(r[l]), i.push(mr(a, e, s, t));
2843
+ return new Y(i);
2844
+ case "LineString":
2845
+ case "MultiLineString": return c = gr(r, n.type === "LineString" ? 0 : 1, o), new X(c, t);
2846
+ case "Polygon":
2847
+ case "MultiPolygon": return c = gr(r, n.type === "Polygon" ? 1 : 2, o), new dr(c, t);
2848
+ case "GeometryCollection":
2849
+ for (l = 0, u = n.geometries.length; l < u; l++) {
2850
+ var d = pr({
2851
+ geometry: n.geometries[l],
2852
+ type: "Feature",
2853
+ properties: e.properties
2854
+ }, t);
2855
+ d && i.push(d);
2856
+ }
2857
+ return new Y(i);
2858
+ case "FeatureCollection":
2859
+ for (l = 0, u = n.features.length; l < u; l++) {
2860
+ var f = pr(n.features[l], t);
2861
+ f && i.push(f);
2862
+ }
2863
+ return new Y(i);
2864
+ default: throw Error("Invalid GeoJSON object.");
2865
+ }
2866
+ }
2867
+ function mr(e, t, n, r) {
2868
+ return e ? e(t, n) : new rr(n, r && r.markersInheritOptions && r);
2869
+ }
2870
+ function hr(e) {
2871
+ return new D(e[1], e[0], e[2]);
2872
+ }
2873
+ function gr(e, t, n) {
2874
+ for (var r = [], i = 0, a = e.length, o; i < a; i++) o = t ? gr(e[i], t - 1, n) : (n || hr)(e[i]), r.push(o);
2875
+ return r;
2876
+ }
2877
+ function _r(e, t) {
2878
+ return e = O(e), e.alt === void 0 ? [u(e.lng, t), u(e.lat, t)] : [
2879
+ u(e.lng, t),
2880
+ u(e.lat, t),
2881
+ u(e.alt, t)
2882
+ ];
2883
+ }
2884
+ function vr(e, t, n, r) {
2885
+ for (var i = [], a = 0, o = e.length; a < o; a++) i.push(t ? vr(e[a], q(e[a]) ? 0 : t - 1, n, r) : _r(e[a], r));
2886
+ return !t && n && i.length > 0 && i.push(i[0].slice()), i;
2887
+ }
2888
+ function yr(e, t) {
2889
+ return e.feature ? n({}, e.feature, { geometry: t }) : br(t);
2890
+ }
2891
+ function br(e) {
2892
+ return e.type === "Feature" || e.type === "FeatureCollection" ? e : {
2893
+ type: "Feature",
2894
+ properties: {},
2895
+ geometry: e
2896
+ };
2897
+ }
2898
+ var xr = { toGeoJSON: function(e) {
2899
+ return yr(this, {
2900
+ type: "Point",
2901
+ coordinates: _r(this.getLatLng(), e)
2902
+ });
2903
+ } };
2904
+ rr.include(xr), cr.include(xr), or.include(xr), X.include({ toGeoJSON: function(e) {
2905
+ var t = !q(this._latlngs), n = vr(this._latlngs, +!!t, !1, e);
2906
+ return yr(this, {
2907
+ type: (t ? "Multi" : "") + "LineString",
2908
+ coordinates: n
2909
+ });
2910
+ } }), dr.include({ toGeoJSON: function(e) {
2911
+ var t = !q(this._latlngs), n = t && !q(this._latlngs[0]), r = vr(this._latlngs, n ? 2 : +!!t, !0, e);
2912
+ return t || (r = [r]), yr(this, {
2913
+ type: (n ? "Multi" : "") + "Polygon",
2914
+ coordinates: r
2915
+ });
2916
+ } }), Xn.include({
2917
+ toMultiPoint: function(e) {
2918
+ var t = [];
2919
+ return this.eachLayer(function(n) {
2920
+ t.push(n.toGeoJSON(e).geometry.coordinates);
2921
+ }), yr(this, {
2922
+ type: "MultiPoint",
2923
+ coordinates: t
2924
+ });
2925
+ },
2926
+ toGeoJSON: function(e) {
2927
+ var t = this.feature && this.feature.geometry && this.feature.geometry.type;
2928
+ if (t === "MultiPoint") return this.toMultiPoint(e);
2929
+ var n = t === "GeometryCollection", r = [];
2930
+ return this.eachLayer(function(t) {
2931
+ if (t.toGeoJSON) {
2932
+ var i = t.toGeoJSON(e);
2933
+ if (n) r.push(i.geometry);
2934
+ else {
2935
+ var a = br(i);
2936
+ a.type === "FeatureCollection" ? r.push.apply(r, a.features) : r.push(a);
2937
+ }
2938
+ }
2939
+ }), n ? yr(this, {
2940
+ geometries: r,
2941
+ type: "GeometryCollection"
2942
+ }) : {
2943
+ type: "FeatureCollection",
2944
+ features: r
2945
+ };
2946
+ }
2947
+ });
2948
+ function Sr(e, t) {
2949
+ return new Z(e, t);
2950
+ }
2951
+ var Cr = Sr, wr = J.extend({
2952
+ options: {
2953
+ opacity: 1,
2954
+ alt: "",
2955
+ interactive: !1,
2956
+ crossOrigin: !1,
2957
+ errorOverlayUrl: "",
2958
+ zIndex: 1,
2959
+ className: ""
2960
+ },
2961
+ initialize: function(e, t, n) {
2962
+ this._url = e, this._bounds = E(t), p(this, n);
2963
+ },
2964
+ onAdd: function() {
2965
+ this._image || (this._initImage(), this.options.opacity < 1 && this._updateOpacity()), this.options.interactive && (F(this._image, "leaflet-interactive"), this.addInteractiveTarget(this._image)), this.getPane().appendChild(this._image), this._reset();
2966
+ },
2967
+ onRemove: function() {
2968
+ P(this._image), this.options.interactive && this.removeInteractiveTarget(this._image);
2969
+ },
2970
+ setOpacity: function(e) {
2971
+ return this.options.opacity = e, this._image && this._updateOpacity(), this;
2972
+ },
2973
+ setStyle: function(e) {
2974
+ return e.opacity && this.setOpacity(e.opacity), this;
2975
+ },
2976
+ bringToFront: function() {
2977
+ return this._map && kt(this._image), this;
2978
+ },
2979
+ bringToBack: function() {
2980
+ return this._map && At(this._image), this;
2981
+ },
2982
+ setUrl: function(e) {
2983
+ return this._url = e, this._image && (this._image.src = e), this;
2984
+ },
2985
+ setBounds: function(e) {
2986
+ return this._bounds = E(e), this._map && this._reset(), this;
2987
+ },
2988
+ getEvents: function() {
2989
+ var e = {
2990
+ zoom: this._reset,
2991
+ viewreset: this._reset
2992
+ };
2993
+ return this._zoomAnimated && (e.zoomanim = this._animateZoom), e;
2994
+ },
2995
+ setZIndex: function(e) {
2996
+ return this.options.zIndex = e, this._updateZIndex(), this;
2997
+ },
2998
+ getBounds: function() {
2999
+ return this._bounds;
3000
+ },
3001
+ getElement: function() {
3002
+ return this._image;
3003
+ },
3004
+ _initImage: function() {
3005
+ var e = this._url.tagName === "IMG", t = this._image = e ? this._url : N("img");
3006
+ if (F(t, "leaflet-image-layer"), this._zoomAnimated && F(t, "leaflet-zoom-animated"), this.options.className && F(t, this.options.className), t.onselectstart = l, t.onmousemove = l, t.onload = i(this.fire, this, "load"), t.onerror = i(this._overlayOnError, this, "error"), (this.options.crossOrigin || this.options.crossOrigin === "") && (t.crossOrigin = this.options.crossOrigin === !0 ? "" : this.options.crossOrigin), this.options.zIndex && this._updateZIndex(), e) {
3007
+ this._url = t.src;
3008
+ return;
3009
+ }
3010
+ t.src = this._url, t.alt = this.options.alt;
3011
+ },
3012
+ _animateZoom: function(e) {
3013
+ var t = this._map.getZoomScale(e.zoom), n = this._map._latLngBoundsToNewLayerBounds(this._bounds, e.zoom, e.center).min;
3014
+ It(this._image, n, t);
3015
+ },
3016
+ _reset: function() {
3017
+ var e = this._image, t = new C(this._map.latLngToLayerPoint(this._bounds.getNorthWest()), this._map.latLngToLayerPoint(this._bounds.getSouthEast())), n = t.getSize();
3018
+ z(e, t.min), e.style.width = n.x + "px", e.style.height = n.y + "px";
3019
+ },
3020
+ _updateOpacity: function() {
3021
+ R(this._image, this.options.opacity);
3022
+ },
3023
+ _updateZIndex: function() {
3024
+ this._image && this.options.zIndex !== void 0 && this.options.zIndex !== null && (this._image.style.zIndex = this.options.zIndex);
3025
+ },
3026
+ _overlayOnError: function() {
3027
+ this.fire("error");
3028
+ var e = this.options.errorOverlayUrl;
3029
+ e && this._url !== e && (this._url = e, this._image.src = e);
3030
+ },
3031
+ getCenter: function() {
3032
+ return this._bounds.getCenter();
3033
+ }
3034
+ }), Tr = function(e, t, n) {
3035
+ return new wr(e, t, n);
3036
+ }, Er = wr.extend({
3037
+ options: {
3038
+ autoplay: !0,
3039
+ loop: !0,
3040
+ keepAspectRatio: !0,
3041
+ muted: !1,
3042
+ playsInline: !0
3043
+ },
3044
+ _initImage: function() {
3045
+ var e = this._url.tagName === "VIDEO", t = this._image = e ? this._url : N("video");
3046
+ if (F(t, "leaflet-image-layer"), this._zoomAnimated && F(t, "leaflet-zoom-animated"), this.options.className && F(t, this.options.className), t.onselectstart = l, t.onmousemove = l, t.onloadeddata = i(this.fire, this, "load"), e) {
3047
+ for (var n = t.getElementsByTagName("source"), r = [], a = 0; a < n.length; a++) r.push(n[a].src);
3048
+ this._url = n.length > 0 ? r : [t.src];
3049
+ return;
3050
+ }
3051
+ g(this._url) || (this._url = [this._url]), !this.options.keepAspectRatio && Object.prototype.hasOwnProperty.call(t.style, "objectFit") && (t.style.objectFit = "fill"), t.autoplay = !!this.options.autoplay, t.loop = !!this.options.loop, t.muted = !!this.options.muted, t.playsInline = !!this.options.playsInline;
3052
+ for (var o = 0; o < this._url.length; o++) {
3053
+ var s = N("source");
3054
+ s.src = this._url[o], t.appendChild(s);
3055
+ }
3056
+ }
3057
+ });
3058
+ function Dr(e, t, n) {
3059
+ return new Er(e, t, n);
3060
+ }
3061
+ var Or = wr.extend({ _initImage: function() {
3062
+ var e = this._image = this._url;
3063
+ F(e, "leaflet-image-layer"), this._zoomAnimated && F(e, "leaflet-zoom-animated"), this.options.className && F(e, this.options.className), e.onselectstart = l, e.onmousemove = l;
3064
+ } });
3065
+ function kr(e, t, n) {
3066
+ return new Or(e, t, n);
3067
+ }
3068
+ var Q = J.extend({
3069
+ options: {
3070
+ interactive: !1,
3071
+ offset: [0, 0],
3072
+ className: "",
3073
+ pane: void 0,
3074
+ content: ""
3075
+ },
3076
+ initialize: function(e, t) {
3077
+ e && (e instanceof D || g(e)) ? (this._latlng = O(e), p(this, t)) : (p(this, e), this._source = t), this.options.content && (this._content = this.options.content);
3078
+ },
3079
+ openOn: function(e) {
3080
+ return e = arguments.length ? e : this._source._map, e.hasLayer(this) || e.addLayer(this), this;
3081
+ },
3082
+ close: function() {
3083
+ return this._map && this._map.removeLayer(this), this;
3084
+ },
3085
+ toggle: function(e) {
3086
+ return this._map ? this.close() : (arguments.length ? this._source = e : e = this._source, this._prepareOpen(), this.openOn(e._map)), this;
3087
+ },
3088
+ onAdd: function(e) {
3089
+ this._zoomAnimated = e._zoomAnimated, this._container || this._initLayout(), e._fadeAnimated && R(this._container, 0), clearTimeout(this._removeTimeout), this.getPane().appendChild(this._container), this.update(), e._fadeAnimated && R(this._container, 1), this.bringToFront(), this.options.interactive && (F(this._container, "leaflet-interactive"), this.addInteractiveTarget(this._container));
3090
+ },
3091
+ onRemove: function(e) {
3092
+ e._fadeAnimated ? (R(this._container, 0), this._removeTimeout = setTimeout(i(P, void 0, this._container), 200)) : P(this._container), this.options.interactive && (I(this._container, "leaflet-interactive"), this.removeInteractiveTarget(this._container));
3093
+ },
3094
+ getLatLng: function() {
3095
+ return this._latlng;
3096
+ },
3097
+ setLatLng: function(e) {
3098
+ return this._latlng = O(e), this._map && (this._updatePosition(), this._adjustPan()), this;
3099
+ },
3100
+ getContent: function() {
3101
+ return this._content;
3102
+ },
3103
+ setContent: function(e) {
3104
+ return this._content = e, this.update(), this;
3105
+ },
3106
+ getElement: function() {
3107
+ return this._container;
3108
+ },
3109
+ update: function() {
3110
+ this._map && (this._container.style.visibility = "hidden", this._updateContent(), this._updateLayout(), this._updatePosition(), this._container.style.visibility = "", this._adjustPan());
3111
+ },
3112
+ getEvents: function() {
3113
+ var e = {
3114
+ zoom: this._updatePosition,
3115
+ viewreset: this._updatePosition
3116
+ };
3117
+ return this._zoomAnimated && (e.zoomanim = this._animateZoom), e;
3118
+ },
3119
+ isOpen: function() {
3120
+ return !!this._map && this._map.hasLayer(this);
3121
+ },
3122
+ bringToFront: function() {
3123
+ return this._map && kt(this._container), this;
3124
+ },
3125
+ bringToBack: function() {
3126
+ return this._map && At(this._container), this;
3127
+ },
3128
+ _prepareOpen: function(e) {
3129
+ var t = this._source;
3130
+ if (!t._map) return !1;
3131
+ if (t instanceof Y) {
3132
+ t = null;
3133
+ var n = this._source._layers;
3134
+ for (var r in n) if (n[r]._map) {
3135
+ t = n[r];
3136
+ break;
3137
+ }
3138
+ if (!t) return !1;
3139
+ this._source = t;
3140
+ }
3141
+ if (!e) if (t.getCenter) e = t.getCenter();
3142
+ else if (t.getLatLng) e = t.getLatLng();
3143
+ else if (t.getBounds) e = t.getBounds().getCenter();
3144
+ else throw Error("Unable to get source layer LatLng.");
3145
+ return this.setLatLng(e), this._map && this.update(), !0;
3146
+ },
3147
+ _updateContent: function() {
3148
+ if (this._content) {
3149
+ var e = this._contentNode, t = typeof this._content == "function" ? this._content(this._source || this) : this._content;
3150
+ if (typeof t == "string") e.innerHTML = t;
3151
+ else {
3152
+ for (; e.hasChildNodes();) e.removeChild(e.firstChild);
3153
+ e.appendChild(t);
3154
+ }
3155
+ this.fire("contentupdate");
3156
+ }
3157
+ },
3158
+ _updatePosition: function() {
3159
+ if (this._map) {
3160
+ var e = this._map.latLngToLayerPoint(this._latlng), t = S(this.options.offset), n = this._getAnchor();
3161
+ this._zoomAnimated ? z(this._container, e.add(n)) : t = t.add(e).add(n);
3162
+ var r = this._containerBottom = -t.y, i = this._containerLeft = -Math.round(this._containerWidth / 2) + t.x;
3163
+ this._container.style.bottom = r + "px", this._container.style.left = i + "px";
3164
+ }
3165
+ },
3166
+ _getAnchor: function() {
3167
+ return [0, 0];
3168
+ }
3169
+ });
3170
+ W.include({ _initOverlay: function(e, t, n, r) {
3171
+ var i = t;
3172
+ return i instanceof e || (i = new e(r).setContent(t)), n && i.setLatLng(n), i;
3173
+ } }), J.include({ _initOverlay: function(e, t, n, r) {
3174
+ var i = n;
3175
+ return i instanceof e ? (p(i, r), i._source = this) : (i = t && !r ? t : new e(r, this), i.setContent(n)), i;
3176
+ } });
3177
+ var Ar = Q.extend({
3178
+ options: {
3179
+ pane: "popupPane",
3180
+ offset: [0, 7],
3181
+ maxWidth: 300,
3182
+ minWidth: 50,
3183
+ maxHeight: null,
3184
+ autoPan: !0,
3185
+ autoPanPaddingTopLeft: null,
3186
+ autoPanPaddingBottomRight: null,
3187
+ autoPanPadding: [5, 5],
3188
+ keepInView: !1,
3189
+ closeButton: !0,
3190
+ autoClose: !0,
3191
+ closeOnEscapeKey: !0,
3192
+ className: ""
3193
+ },
3194
+ openOn: function(e) {
3195
+ return e = arguments.length ? e : this._source._map, !e.hasLayer(this) && e._popup && e._popup.options.autoClose && e.removeLayer(e._popup), e._popup = this, Q.prototype.openOn.call(this, e);
3196
+ },
3197
+ onAdd: function(e) {
3198
+ Q.prototype.onAdd.call(this, e), e.fire("popupopen", { popup: this }), this._source && (this._source.fire("popupopen", { popup: this }, !0), this._source instanceof ar || this._source.on("preclick", tn));
3199
+ },
3200
+ onRemove: function(e) {
3201
+ Q.prototype.onRemove.call(this, e), e.fire("popupclose", { popup: this }), this._source && (this._source.fire("popupclose", { popup: this }, !0), this._source instanceof ar || this._source.off("preclick", tn));
3202
+ },
3203
+ getEvents: function() {
3204
+ var e = Q.prototype.getEvents.call(this);
3205
+ return (this.options.closeOnClick === void 0 ? this._map.options.closePopupOnClick : this.options.closeOnClick) && (e.preclick = this.close), this.options.keepInView && (e.moveend = this._adjustPan), e;
3206
+ },
3207
+ _initLayout: function() {
3208
+ var e = "leaflet-popup", t = this._container = N("div", e + " " + (this.options.className || "") + " leaflet-zoom-animated"), n = this._wrapper = N("div", e + "-content-wrapper", t);
3209
+ if (this._contentNode = N("div", e + "-content", n), rn(t), nn(this._contentNode), B(t, "contextmenu", tn), this._tipContainer = N("div", e + "-tip-container", t), this._tip = N("div", e + "-tip", this._tipContainer), this.options.closeButton) {
3210
+ var r = this._closeButton = N("a", e + "-close-button", t);
3211
+ r.setAttribute("role", "button"), r.setAttribute("aria-label", "Close popup"), r.href = "#close", r.innerHTML = "<span aria-hidden=\"true\">&#215;</span>", B(r, "click", function(e) {
3212
+ U(e), this.close();
3213
+ }, this);
3214
+ }
3215
+ },
3216
+ _updateLayout: function() {
3217
+ var e = this._contentNode, t = e.style;
3218
+ t.width = "", t.whiteSpace = "nowrap";
3219
+ var n = e.offsetWidth;
3220
+ n = Math.min(n, this.options.maxWidth), n = Math.max(n, this.options.minWidth), t.width = n + 1 + "px", t.whiteSpace = "", t.height = "";
3221
+ var r = e.offsetHeight, i = this.options.maxHeight, a = "leaflet-popup-scrolled";
3222
+ i && r > i ? (t.height = i + "px", F(e, a)) : I(e, a), this._containerWidth = this._container.offsetWidth;
3223
+ },
3224
+ _animateZoom: function(e) {
3225
+ var t = this._map._latLngToNewLayerPoint(this._latlng, e.zoom, e.center), n = this._getAnchor();
3226
+ z(this._container, t.add(n));
3227
+ },
3228
+ _adjustPan: function() {
3229
+ if (this.options.autoPan) {
3230
+ if (this._map._panAnim && this._map._panAnim.stop(), this._autopanning) {
3231
+ this._autopanning = !1;
3232
+ return;
3233
+ }
3234
+ var e = this._map, t = parseInt(Dt(this._container, "marginBottom"), 10) || 0, n = this._container.offsetHeight + t, r = this._containerWidth, i = new x(this._containerLeft, -n - this._containerBottom);
3235
+ i._add(Lt(this._container));
3236
+ var a = e.layerPointToContainerPoint(i), o = S(this.options.autoPanPadding), s = S(this.options.autoPanPaddingTopLeft || o), c = S(this.options.autoPanPaddingBottomRight || o), l = e.getSize(), u = 0, d = 0;
3237
+ a.x + r + c.x > l.x && (u = a.x + r - l.x + c.x), a.x - u - s.x < 0 && (u = a.x - s.x), a.y + n + c.y > l.y && (d = a.y + n - l.y + c.y), a.y - d - s.y < 0 && (d = a.y - s.y), (u || d) && (this.options.keepInView && (this._autopanning = !0), e.fire("autopanstart").panBy([u, d]));
3238
+ }
3239
+ },
3240
+ _getAnchor: function() {
3241
+ return S(this._source && this._source._getPopupAnchor ? this._source._getPopupAnchor() : [0, 0]);
3242
+ }
3243
+ }), jr = function(e, t) {
3244
+ return new Ar(e, t);
3245
+ };
3246
+ W.mergeOptions({ closePopupOnClick: !0 }), W.include({
3247
+ openPopup: function(e, t, n) {
3248
+ return this._initOverlay(Ar, e, t, n).openOn(this), this;
3249
+ },
3250
+ closePopup: function(e) {
3251
+ return e = arguments.length ? e : this._popup, e && e.close(), this;
3252
+ }
3253
+ }), J.include({
3254
+ bindPopup: function(e, t) {
3255
+ return this._popup = this._initOverlay(Ar, this._popup, e, t), this._popupHandlersAdded ||= (this.on({
3256
+ click: this._openPopup,
3257
+ keypress: this._onKeyPress,
3258
+ remove: this.closePopup,
3259
+ move: this._movePopup
3260
+ }), !0), this;
3261
+ },
3262
+ unbindPopup: function() {
3263
+ return this._popup &&= (this.off({
3264
+ click: this._openPopup,
3265
+ keypress: this._onKeyPress,
3266
+ remove: this.closePopup,
3267
+ move: this._movePopup
3268
+ }), this._popupHandlersAdded = !1, null), this;
3269
+ },
3270
+ openPopup: function(e) {
3271
+ return this._popup && (this instanceof Y || (this._popup._source = this), this._popup._prepareOpen(e || this._latlng) && this._popup.openOn(this._map)), this;
3272
+ },
3273
+ closePopup: function() {
3274
+ return this._popup && this._popup.close(), this;
3275
+ },
3276
+ togglePopup: function() {
3277
+ return this._popup && this._popup.toggle(this), this;
3278
+ },
3279
+ isPopupOpen: function() {
3280
+ return this._popup ? this._popup.isOpen() : !1;
3281
+ },
3282
+ setPopupContent: function(e) {
3283
+ return this._popup && this._popup.setContent(e), this;
3284
+ },
3285
+ getPopup: function() {
3286
+ return this._popup;
3287
+ },
3288
+ _openPopup: function(e) {
3289
+ if (!(!this._popup || !this._map)) {
3290
+ an(e);
3291
+ var t = e.layer || e.target;
3292
+ if (this._popup._source === t && !(t instanceof ar)) {
3293
+ this._map.hasLayer(this._popup) ? this.closePopup() : this.openPopup(e.latlng);
3294
+ return;
3295
+ }
3296
+ this._popup._source = t, this.openPopup(e.latlng);
3297
+ }
3298
+ },
3299
+ _movePopup: function(e) {
3300
+ this._popup.setLatLng(e.latlng);
3301
+ },
3302
+ _onKeyPress: function(e) {
3303
+ e.originalEvent.keyCode === 13 && this._openPopup(e);
3304
+ }
3305
+ });
3306
+ var Mr = Q.extend({
3307
+ options: {
3308
+ pane: "tooltipPane",
3309
+ offset: [0, 0],
3310
+ direction: "auto",
3311
+ permanent: !1,
3312
+ sticky: !1,
3313
+ opacity: .9
3314
+ },
3315
+ onAdd: function(e) {
3316
+ Q.prototype.onAdd.call(this, e), this.setOpacity(this.options.opacity), e.fire("tooltipopen", { tooltip: this }), this._source && (this.addEventParent(this._source), this._source.fire("tooltipopen", { tooltip: this }, !0));
3317
+ },
3318
+ onRemove: function(e) {
3319
+ Q.prototype.onRemove.call(this, e), e.fire("tooltipclose", { tooltip: this }), this._source && (this.removeEventParent(this._source), this._source.fire("tooltipclose", { tooltip: this }, !0));
3320
+ },
3321
+ getEvents: function() {
3322
+ var e = Q.prototype.getEvents.call(this);
3323
+ return this.options.permanent || (e.preclick = this.close), e;
3324
+ },
3325
+ _initLayout: function() {
3326
+ this._contentNode = this._container = N("div", "leaflet-tooltip " + (this.options.className || "") + " leaflet-zoom-" + (this._zoomAnimated ? "animated" : "hide")), this._container.setAttribute("role", "tooltip"), this._container.setAttribute("id", "leaflet-tooltip-" + o(this));
3327
+ },
3328
+ _updateLayout: function() {},
3329
+ _adjustPan: function() {},
3330
+ _setPosition: function(e) {
3331
+ var t, n, r = this._map, i = this._container, a = r.latLngToContainerPoint(r.getCenter()), o = r.layerPointToContainerPoint(e), s = this.options.direction, c = i.offsetWidth, l = i.offsetHeight, u = S(this.options.offset), d = this._getAnchor();
3332
+ s === "top" ? (t = c / 2, n = l) : s === "bottom" ? (t = c / 2, n = 0) : s === "center" ? (t = c / 2, n = l / 2) : s === "right" ? (t = 0, n = l / 2) : s === "left" ? (t = c, n = l / 2) : o.x < a.x ? (s = "right", t = 0, n = l / 2) : (s = "left", t = c + (u.x + d.x) * 2, n = l / 2), e = e.subtract(S(t, n, !0)).add(u).add(d), I(i, "leaflet-tooltip-right"), I(i, "leaflet-tooltip-left"), I(i, "leaflet-tooltip-top"), I(i, "leaflet-tooltip-bottom"), F(i, "leaflet-tooltip-" + s), z(i, e);
3333
+ },
3334
+ _updatePosition: function() {
3335
+ var e = this._map.latLngToLayerPoint(this._latlng);
3336
+ this._setPosition(e);
3337
+ },
3338
+ setOpacity: function(e) {
3339
+ this.options.opacity = e, this._container && R(this._container, e);
3340
+ },
3341
+ _animateZoom: function(e) {
3342
+ var t = this._map._latLngToNewLayerPoint(this._latlng, e.zoom, e.center);
3343
+ this._setPosition(t);
3344
+ },
3345
+ _getAnchor: function() {
3346
+ return S(this._source && this._source._getTooltipAnchor && !this.options.sticky ? this._source._getTooltipAnchor() : [0, 0]);
3347
+ }
3348
+ }), Nr = function(e, t) {
3349
+ return new Mr(e, t);
3350
+ };
3351
+ W.include({
3352
+ openTooltip: function(e, t, n) {
3353
+ return this._initOverlay(Mr, e, t, n).openOn(this), this;
3354
+ },
3355
+ closeTooltip: function(e) {
3356
+ return e.close(), this;
3357
+ }
3358
+ }), J.include({
3359
+ bindTooltip: function(e, t) {
3360
+ return this._tooltip && this.isTooltipOpen() && this.unbindTooltip(), this._tooltip = this._initOverlay(Mr, this._tooltip, e, t), this._initTooltipInteractions(), this._tooltip.options.permanent && this._map && this._map.hasLayer(this) && this.openTooltip(), this;
3361
+ },
3362
+ unbindTooltip: function() {
3363
+ return this._tooltip &&= (this._initTooltipInteractions(!0), this.closeTooltip(), null), this;
3364
+ },
3365
+ _initTooltipInteractions: function(e) {
3366
+ if (!(!e && this._tooltipHandlersAdded)) {
3367
+ var t = e ? "off" : "on", n = {
3368
+ remove: this.closeTooltip,
3369
+ move: this._moveTooltip
3370
+ };
3371
+ this._tooltip.options.permanent ? n.add = this._openTooltip : (n.mouseover = this._openTooltip, n.mouseout = this.closeTooltip, n.click = this._openTooltip, this._map ? this._addFocusListeners() : n.add = this._addFocusListeners), this._tooltip.options.sticky && (n.mousemove = this._moveTooltip), this[t](n), this._tooltipHandlersAdded = !e;
3372
+ }
3373
+ },
3374
+ openTooltip: function(e) {
3375
+ return this._tooltip && (this instanceof Y || (this._tooltip._source = this), this._tooltip._prepareOpen(e) && (this._tooltip.openOn(this._map), this.getElement ? this._setAriaDescribedByOnLayer(this) : this.eachLayer && this.eachLayer(this._setAriaDescribedByOnLayer, this))), this;
3376
+ },
3377
+ closeTooltip: function() {
3378
+ if (this._tooltip) return this._tooltip.close();
3379
+ },
3380
+ toggleTooltip: function() {
3381
+ return this._tooltip && this._tooltip.toggle(this), this;
3382
+ },
3383
+ isTooltipOpen: function() {
3384
+ return this._tooltip.isOpen();
3385
+ },
3386
+ setTooltipContent: function(e) {
3387
+ return this._tooltip && this._tooltip.setContent(e), this;
3388
+ },
3389
+ getTooltip: function() {
3390
+ return this._tooltip;
3391
+ },
3392
+ _addFocusListeners: function() {
3393
+ this.getElement ? this._addFocusListenersOnLayer(this) : this.eachLayer && this.eachLayer(this._addFocusListenersOnLayer, this);
3394
+ },
3395
+ _addFocusListenersOnLayer: function(e) {
3396
+ var t = typeof e.getElement == "function" && e.getElement();
3397
+ t && (B(t, "focus", function() {
3398
+ this._tooltip._source = e, this.openTooltip();
3399
+ }, this), B(t, "blur", this.closeTooltip, this));
3400
+ },
3401
+ _setAriaDescribedByOnLayer: function(e) {
3402
+ var t = typeof e.getElement == "function" && e.getElement();
3403
+ t && t.setAttribute("aria-describedby", this._tooltip._container.id);
3404
+ },
3405
+ _openTooltip: function(e) {
3406
+ if (!(!this._tooltip || !this._map)) {
3407
+ if (this._map.dragging && this._map.dragging.moving() && !this._openOnceFlag) {
3408
+ this._openOnceFlag = !0;
3409
+ var t = this;
3410
+ this._map.once("moveend", function() {
3411
+ t._openOnceFlag = !1, t._openTooltip(e);
3412
+ });
3413
+ return;
3414
+ }
3415
+ this._tooltip._source = e.layer || e.target, this.openTooltip(this._tooltip.options.sticky ? e.latlng : void 0);
3416
+ }
3417
+ },
3418
+ _moveTooltip: function(e) {
3419
+ var t = e.latlng, n, r;
3420
+ this._tooltip.options.sticky && e.originalEvent && (n = this._map.mouseEventToContainerPoint(e.originalEvent), r = this._map.containerPointToLayerPoint(n), t = this._map.layerPointToLatLng(r)), this._tooltip.setLatLng(t);
3421
+ }
3422
+ });
3423
+ var Pr = $n.extend({
3424
+ options: {
3425
+ iconSize: [12, 12],
3426
+ html: !1,
3427
+ bgPos: null,
3428
+ className: "leaflet-div-icon"
3429
+ },
3430
+ createIcon: function(e) {
3431
+ var t = e && e.tagName === "DIV" ? e : document.createElement("div"), n = this.options;
3432
+ if (n.html instanceof Element ? (Ot(t), t.appendChild(n.html)) : t.innerHTML = n.html === !1 ? "" : n.html, n.bgPos) {
3433
+ var r = S(n.bgPos);
3434
+ t.style.backgroundPosition = -r.x + "px " + -r.y + "px";
3435
+ }
3436
+ return this._setIconStyles(t, "icon"), t;
3437
+ },
3438
+ createShadow: function() {
3439
+ return null;
3440
+ }
3441
+ });
3442
+ function Fr(e) {
3443
+ return new Pr(e);
3444
+ }
3445
+ $n.Default = tr;
3446
+ var Ir = J.extend({
3447
+ options: {
3448
+ tileSize: 256,
3449
+ opacity: 1,
3450
+ updateWhenIdle: M.mobile,
3451
+ updateWhenZooming: !0,
3452
+ updateInterval: 200,
3453
+ zIndex: 1,
3454
+ bounds: null,
3455
+ minZoom: 0,
3456
+ maxZoom: void 0,
3457
+ maxNativeZoom: void 0,
3458
+ minNativeZoom: void 0,
3459
+ noWrap: !1,
3460
+ pane: "tilePane",
3461
+ className: "",
3462
+ keepBuffer: 2
3463
+ },
3464
+ initialize: function(e) {
3465
+ p(this, e);
3466
+ },
3467
+ onAdd: function() {
3468
+ this._initContainer(), this._levels = {}, this._tiles = {}, this._resetView();
3469
+ },
3470
+ beforeAdd: function(e) {
3471
+ e._addZoomLimit(this);
3472
+ },
3473
+ onRemove: function(e) {
3474
+ this._removeAllTiles(), P(this._container), e._removeZoomLimit(this), this._container = null, this._tileZoom = void 0;
3475
+ },
3476
+ bringToFront: function() {
3477
+ return this._map && (kt(this._container), this._setAutoZIndex(Math.max)), this;
3478
+ },
3479
+ bringToBack: function() {
3480
+ return this._map && (At(this._container), this._setAutoZIndex(Math.min)), this;
3481
+ },
3482
+ getContainer: function() {
3483
+ return this._container;
3484
+ },
3485
+ setOpacity: function(e) {
3486
+ return this.options.opacity = e, this._updateOpacity(), this;
3487
+ },
3488
+ setZIndex: function(e) {
3489
+ return this.options.zIndex = e, this._updateZIndex(), this;
3490
+ },
3491
+ isLoading: function() {
3492
+ return this._loading;
3493
+ },
3494
+ redraw: function() {
3495
+ if (this._map) {
3496
+ this._removeAllTiles();
3497
+ var e = this._clampZoom(this._map.getZoom());
3498
+ e !== this._tileZoom && (this._tileZoom = e, this._updateLevels()), this._update();
3499
+ }
3500
+ return this;
3501
+ },
3502
+ getEvents: function() {
3503
+ var e = {
3504
+ viewprereset: this._invalidateAll,
3505
+ viewreset: this._resetView,
3506
+ zoom: this._resetView,
3507
+ moveend: this._onMoveEnd
3508
+ };
3509
+ return this.options.updateWhenIdle || (this._onMove ||= s(this._onMoveEnd, this.options.updateInterval, this), e.move = this._onMove), this._zoomAnimated && (e.zoomanim = this._animateZoom), e;
3510
+ },
3511
+ createTile: function() {
3512
+ return document.createElement("div");
3513
+ },
3514
+ getTileSize: function() {
3515
+ var e = this.options.tileSize;
3516
+ return e instanceof x ? e : new x(e, e);
3517
+ },
3518
+ _updateZIndex: function() {
3519
+ this._container && this.options.zIndex !== void 0 && this.options.zIndex !== null && (this._container.style.zIndex = this.options.zIndex);
3520
+ },
3521
+ _setAutoZIndex: function(e) {
3522
+ for (var t = this.getPane().children, n = -e(-Infinity, Infinity), r = 0, i = t.length, a; r < i; r++) a = t[r].style.zIndex, t[r] !== this._container && a && (n = e(n, +a));
3523
+ isFinite(n) && (this.options.zIndex = n + e(-1, 1), this._updateZIndex());
3524
+ },
3525
+ _updateOpacity: function() {
3526
+ if (this._map && !M.ielt9) {
3527
+ R(this._container, this.options.opacity);
3528
+ var e = +/* @__PURE__ */ new Date(), t = !1, n = !1;
3529
+ for (var r in this._tiles) {
3530
+ var i = this._tiles[r];
3531
+ if (!(!i.current || !i.loaded)) {
3532
+ var a = Math.min(1, (e - i.loaded) / 200);
3533
+ R(i.el, a), a < 1 ? t = !0 : (i.active ? n = !0 : this._onOpaqueTile(i), i.active = !0);
3534
+ }
3535
+ }
3536
+ n && !this._noPrune && this._pruneTiles(), t && (v(this._fadeFrame), this._fadeFrame = _(this._updateOpacity, this));
3537
+ }
3538
+ },
3539
+ _onOpaqueTile: l,
3540
+ _initContainer: function() {
3541
+ this._container || (this._container = N("div", "leaflet-layer " + (this.options.className || "")), this._updateZIndex(), this.options.opacity < 1 && this._updateOpacity(), this.getPane().appendChild(this._container));
3542
+ },
3543
+ _updateLevels: function() {
3544
+ var e = this._tileZoom, t = this.options.maxZoom;
3545
+ if (e !== void 0) {
3546
+ for (var n in this._levels) n = Number(n), this._levels[n].el.children.length || n === e ? (this._levels[n].el.style.zIndex = t - Math.abs(e - n), this._onUpdateLevel(n)) : (P(this._levels[n].el), this._removeTilesAtZoom(n), this._onRemoveLevel(n), delete this._levels[n]);
3547
+ var r = this._levels[e], i = this._map;
3548
+ return r || (r = this._levels[e] = {}, r.el = N("div", "leaflet-tile-container leaflet-zoom-animated", this._container), r.el.style.zIndex = t, r.origin = i.project(i.unproject(i.getPixelOrigin()), e).round(), r.zoom = e, this._setZoomTransform(r, i.getCenter(), i.getZoom()), r.el.offsetWidth, this._onCreateLevel(r)), this._level = r, r;
3549
+ }
3550
+ },
3551
+ _onUpdateLevel: l,
3552
+ _onRemoveLevel: l,
3553
+ _onCreateLevel: l,
3554
+ _pruneTiles: function() {
3555
+ if (this._map) {
3556
+ var e, t, n = this._map.getZoom();
3557
+ if (n > this.options.maxZoom || n < this.options.minZoom) {
3558
+ this._removeAllTiles();
3559
+ return;
3560
+ }
3561
+ for (e in this._tiles) t = this._tiles[e], t.retain = t.current;
3562
+ for (e in this._tiles) if (t = this._tiles[e], t.current && !t.active) {
3563
+ var r = t.coords;
3564
+ this._retainParent(r.x, r.y, r.z, r.z - 5) || this._retainChildren(r.x, r.y, r.z, r.z + 2);
3565
+ }
3566
+ for (e in this._tiles) this._tiles[e].retain || this._removeTile(e);
3567
+ }
3568
+ },
3569
+ _removeTilesAtZoom: function(e) {
3570
+ for (var t in this._tiles) this._tiles[t].coords.z === e && this._removeTile(t);
3571
+ },
3572
+ _removeAllTiles: function() {
3573
+ for (var e in this._tiles) this._removeTile(e);
3574
+ },
3575
+ _invalidateAll: function() {
3576
+ for (var e in this._levels) P(this._levels[e].el), this._onRemoveLevel(Number(e)), delete this._levels[e];
3577
+ this._removeAllTiles(), this._tileZoom = void 0;
3578
+ },
3579
+ _retainParent: function(e, t, n, r) {
3580
+ var i = Math.floor(e / 2), a = Math.floor(t / 2), o = n - 1, s = new x(+i, +a);
3581
+ s.z = +o;
3582
+ var c = this._tileCoordsToKey(s), l = this._tiles[c];
3583
+ return l && l.active ? (l.retain = !0, !0) : (l && l.loaded && (l.retain = !0), o > r ? this._retainParent(i, a, o, r) : !1);
3584
+ },
3585
+ _retainChildren: function(e, t, n, r) {
3586
+ for (var i = 2 * e; i < 2 * e + 2; i++) for (var a = 2 * t; a < 2 * t + 2; a++) {
3587
+ var o = new x(i, a);
3588
+ o.z = n + 1;
3589
+ var s = this._tileCoordsToKey(o), c = this._tiles[s];
3590
+ if (c && c.active) {
3591
+ c.retain = !0;
3592
+ continue;
3593
+ } else c && c.loaded && (c.retain = !0);
3594
+ n + 1 < r && this._retainChildren(i, a, n + 1, r);
3595
+ }
3596
+ },
3597
+ _resetView: function(e) {
3598
+ var t = e && (e.pinch || e.flyTo);
3599
+ this._setView(this._map.getCenter(), this._map.getZoom(), t, t);
3600
+ },
3601
+ _animateZoom: function(e) {
3602
+ this._setView(e.center, e.zoom, !0, e.noUpdate);
3603
+ },
3604
+ _clampZoom: function(e) {
3605
+ var t = this.options;
3606
+ return t.minNativeZoom !== void 0 && e < t.minNativeZoom ? t.minNativeZoom : t.maxNativeZoom !== void 0 && t.maxNativeZoom < e ? t.maxNativeZoom : e;
3607
+ },
3608
+ _setView: function(e, t, n, r) {
3609
+ var i = Math.round(t);
3610
+ i = this.options.maxZoom !== void 0 && i > this.options.maxZoom || this.options.minZoom !== void 0 && i < this.options.minZoom ? void 0 : this._clampZoom(i);
3611
+ var a = this.options.updateWhenZooming && i !== this._tileZoom;
3612
+ (!r || a) && (this._tileZoom = i, this._abortLoading && this._abortLoading(), this._updateLevels(), this._resetGrid(), i !== void 0 && this._update(e), n || this._pruneTiles(), this._noPrune = !!n), this._setZoomTransforms(e, t);
3613
+ },
3614
+ _setZoomTransforms: function(e, t) {
3615
+ for (var n in this._levels) this._setZoomTransform(this._levels[n], e, t);
3616
+ },
3617
+ _setZoomTransform: function(e, t, n) {
3618
+ var r = this._map.getZoomScale(n, e.zoom), i = e.origin.multiplyBy(r).subtract(this._map._getNewPixelOrigin(t, n)).round();
3619
+ M.any3d ? It(e.el, i, r) : z(e.el, i);
3620
+ },
3621
+ _resetGrid: function() {
3622
+ var e = this._map, t = e.options.crs, n = this._tileSize = this.getTileSize(), r = this._tileZoom, i = this._map.getPixelWorldBounds(this._tileZoom);
3623
+ i && (this._globalTileRange = this._pxBoundsToTileRange(i)), this._wrapX = t.wrapLng && !this.options.noWrap && [Math.floor(e.project([0, t.wrapLng[0]], r).x / n.x), Math.ceil(e.project([0, t.wrapLng[1]], r).x / n.y)], this._wrapY = t.wrapLat && !this.options.noWrap && [Math.floor(e.project([t.wrapLat[0], 0], r).y / n.x), Math.ceil(e.project([t.wrapLat[1], 0], r).y / n.y)];
3624
+ },
3625
+ _onMoveEnd: function() {
3626
+ !this._map || this._map._animatingZoom || this._update();
3627
+ },
3628
+ _getTiledPixelBounds: function(e) {
3629
+ var t = this._map, n = t._animatingZoom ? Math.max(t._animateToZoom, t.getZoom()) : t.getZoom(), r = t.getZoomScale(n, this._tileZoom), i = t.project(e, this._tileZoom).floor(), a = t.getSize().divideBy(r * 2);
3630
+ return new C(i.subtract(a), i.add(a));
3631
+ },
3632
+ _update: function(e) {
3633
+ var t = this._map;
3634
+ if (t) {
3635
+ var n = this._clampZoom(t.getZoom());
3636
+ if (e === void 0 && (e = t.getCenter()), this._tileZoom !== void 0) {
3637
+ var r = this._getTiledPixelBounds(e), i = this._pxBoundsToTileRange(r), a = i.getCenter(), o = [], s = this.options.keepBuffer, c = new C(i.getBottomLeft().subtract([s, -s]), i.getTopRight().add([s, -s]));
3638
+ if (!(isFinite(i.min.x) && isFinite(i.min.y) && isFinite(i.max.x) && isFinite(i.max.y))) throw Error("Attempted to load an infinite number of tiles");
3639
+ for (var l in this._tiles) {
3640
+ var u = this._tiles[l].coords;
3641
+ (u.z !== this._tileZoom || !c.contains(new x(u.x, u.y))) && (this._tiles[l].current = !1);
3642
+ }
3643
+ if (Math.abs(n - this._tileZoom) > 1) {
3644
+ this._setView(e, n);
3645
+ return;
3646
+ }
3647
+ for (var d = i.min.y; d <= i.max.y; d++) for (var f = i.min.x; f <= i.max.x; f++) {
3648
+ var p = new x(f, d);
3649
+ if (p.z = this._tileZoom, this._isValidTile(p)) {
3650
+ var m = this._tiles[this._tileCoordsToKey(p)];
3651
+ m ? m.current = !0 : o.push(p);
3652
+ }
3653
+ }
3654
+ if (o.sort(function(e, t) {
3655
+ return e.distanceTo(a) - t.distanceTo(a);
3656
+ }), o.length !== 0) {
3657
+ this._loading || (this._loading = !0, this.fire("loading"));
3658
+ var ee = document.createDocumentFragment();
3659
+ for (f = 0; f < o.length; f++) this._addTile(o[f], ee);
3660
+ this._level.el.appendChild(ee);
3661
+ }
3662
+ }
3663
+ }
3664
+ },
3665
+ _isValidTile: function(e) {
3666
+ var t = this._map.options.crs;
3667
+ if (!t.infinite) {
3668
+ var n = this._globalTileRange;
3669
+ if (!t.wrapLng && (e.x < n.min.x || e.x > n.max.x) || !t.wrapLat && (e.y < n.min.y || e.y > n.max.y)) return !1;
3670
+ }
3671
+ if (!this.options.bounds) return !0;
3672
+ var r = this._tileCoordsToBounds(e);
3673
+ return E(this.options.bounds).overlaps(r);
3674
+ },
3675
+ _keyToBounds: function(e) {
3676
+ return this._tileCoordsToBounds(this._keyToTileCoords(e));
3677
+ },
3678
+ _tileCoordsToNwSe: function(e) {
3679
+ var t = this._map, n = this.getTileSize(), r = e.scaleBy(n), i = r.add(n);
3680
+ return [t.unproject(r, e.z), t.unproject(i, e.z)];
3681
+ },
3682
+ _tileCoordsToBounds: function(e) {
3683
+ var t = this._tileCoordsToNwSe(e), n = new T(t[0], t[1]);
3684
+ return this.options.noWrap || (n = this._map.wrapLatLngBounds(n)), n;
3685
+ },
3686
+ _tileCoordsToKey: function(e) {
3687
+ return e.x + ":" + e.y + ":" + e.z;
3688
+ },
3689
+ _keyToTileCoords: function(e) {
3690
+ var t = e.split(":"), n = new x(+t[0], +t[1]);
3691
+ return n.z = +t[2], n;
3692
+ },
3693
+ _removeTile: function(e) {
3694
+ var t = this._tiles[e];
3695
+ t && (P(t.el), delete this._tiles[e], this.fire("tileunload", {
3696
+ tile: t.el,
3697
+ coords: this._keyToTileCoords(e)
3698
+ }));
3699
+ },
3700
+ _initTile: function(e) {
3701
+ F(e, "leaflet-tile");
3702
+ var t = this.getTileSize();
3703
+ e.style.width = t.x + "px", e.style.height = t.y + "px", e.onselectstart = l, e.onmousemove = l, M.ielt9 && this.options.opacity < 1 && R(e, this.options.opacity);
3704
+ },
3705
+ _addTile: function(e, t) {
3706
+ var n = this._getTilePos(e), r = this._tileCoordsToKey(e), a = this.createTile(this._wrapCoords(e), i(this._tileReady, this, e));
3707
+ this._initTile(a), this.createTile.length < 2 && _(i(this._tileReady, this, e, null, a)), z(a, n), this._tiles[r] = {
3708
+ el: a,
3709
+ coords: e,
3710
+ current: !0
3711
+ }, t.appendChild(a), this.fire("tileloadstart", {
3712
+ tile: a,
3713
+ coords: e
3714
+ });
3715
+ },
3716
+ _tileReady: function(e, t, n) {
3717
+ t && this.fire("tileerror", {
3718
+ error: t,
3719
+ tile: n,
3720
+ coords: e
3721
+ });
3722
+ var r = this._tileCoordsToKey(e);
3723
+ n = this._tiles[r], n && (n.loaded = +/* @__PURE__ */ new Date(), this._map._fadeAnimated ? (R(n.el, 0), v(this._fadeFrame), this._fadeFrame = _(this._updateOpacity, this)) : (n.active = !0, this._pruneTiles()), t || (F(n.el, "leaflet-tile-loaded"), this.fire("tileload", {
3724
+ tile: n.el,
3725
+ coords: e
3726
+ })), this._noTilesToLoad() && (this._loading = !1, this.fire("load"), M.ielt9 || !this._map._fadeAnimated ? _(this._pruneTiles, this) : setTimeout(i(this._pruneTiles, this), 250)));
3727
+ },
3728
+ _getTilePos: function(e) {
3729
+ return e.scaleBy(this.getTileSize()).subtract(this._level.origin);
3730
+ },
3731
+ _wrapCoords: function(e) {
3732
+ var t = new x(this._wrapX ? c(e.x, this._wrapX) : e.x, this._wrapY ? c(e.y, this._wrapY) : e.y);
3733
+ return t.z = e.z, t;
3734
+ },
3735
+ _pxBoundsToTileRange: function(e) {
3736
+ var t = this.getTileSize();
3737
+ return new C(e.min.unscaleBy(t).floor(), e.max.unscaleBy(t).ceil().subtract([1, 1]));
3738
+ },
3739
+ _noTilesToLoad: function() {
3740
+ for (var e in this._tiles) if (!this._tiles[e].loaded) return !1;
3741
+ return !0;
3742
+ }
3743
+ });
3744
+ function Lr(e) {
3745
+ return new Ir(e);
3746
+ }
3747
+ var Rr = Ir.extend({
3748
+ options: {
3749
+ minZoom: 0,
3750
+ maxZoom: 18,
3751
+ subdomains: "abc",
3752
+ errorTileUrl: "",
3753
+ zoomOffset: 0,
3754
+ tms: !1,
3755
+ zoomReverse: !1,
3756
+ detectRetina: !1,
3757
+ crossOrigin: !1,
3758
+ referrerPolicy: !1
3759
+ },
3760
+ initialize: function(e, t) {
3761
+ this._url = e, t = p(this, t), t.detectRetina && M.retina && t.maxZoom > 0 ? (t.tileSize = Math.floor(t.tileSize / 2), t.zoomReverse ? (t.zoomOffset--, t.minZoom = Math.min(t.maxZoom, t.minZoom + 1)) : (t.zoomOffset++, t.maxZoom = Math.max(t.minZoom, t.maxZoom - 1)), t.minZoom = Math.max(0, t.minZoom)) : t.zoomReverse ? t.minZoom = Math.min(t.maxZoom, t.minZoom) : t.maxZoom = Math.max(t.minZoom, t.maxZoom), typeof t.subdomains == "string" && (t.subdomains = t.subdomains.split("")), this.on("tileunload", this._onTileRemove);
3762
+ },
3763
+ setUrl: function(e, t) {
3764
+ return this._url === e && t === void 0 && (t = !0), this._url = e, t || this.redraw(), this;
3765
+ },
3766
+ createTile: function(e, t) {
3767
+ var n = document.createElement("img");
3768
+ return B(n, "load", i(this._tileOnLoad, this, t, n)), B(n, "error", i(this._tileOnError, this, t, n)), (this.options.crossOrigin || this.options.crossOrigin === "") && (n.crossOrigin = this.options.crossOrigin === !0 ? "" : this.options.crossOrigin), typeof this.options.referrerPolicy == "string" && (n.referrerPolicy = this.options.referrerPolicy), n.alt = "", n.src = this.getTileUrl(e), n;
3769
+ },
3770
+ getTileUrl: function(e) {
3771
+ var t = {
3772
+ r: M.retina ? "@2x" : "",
3773
+ s: this._getSubdomain(e),
3774
+ x: e.x,
3775
+ y: e.y,
3776
+ z: this._getZoomForUrl()
3777
+ };
3778
+ if (this._map && !this._map.options.crs.infinite) {
3779
+ var r = this._globalTileRange.max.y - e.y;
3780
+ this.options.tms && (t.y = r), t["-y"] = r;
3781
+ }
3782
+ return h(this._url, n(t, this.options));
3783
+ },
3784
+ _tileOnLoad: function(e, t) {
3785
+ M.ielt9 ? setTimeout(i(e, this, null, t), 0) : e(null, t);
3786
+ },
3787
+ _tileOnError: function(e, t, n) {
3788
+ var r = this.options.errorTileUrl;
3789
+ r && t.getAttribute("src") !== r && (t.src = r), e(n, t);
3790
+ },
3791
+ _onTileRemove: function(e) {
3792
+ e.tile.onload = null;
3793
+ },
3794
+ _getZoomForUrl: function() {
3795
+ var e = this._tileZoom, t = this.options.maxZoom, n = this.options.zoomReverse, r = this.options.zoomOffset;
3796
+ return n && (e = t - e), e + r;
3797
+ },
3798
+ _getSubdomain: function(e) {
3799
+ var t = Math.abs(e.x + e.y) % this.options.subdomains.length;
3800
+ return this.options.subdomains[t];
3801
+ },
3802
+ _abortLoading: function() {
3803
+ var e, t;
3804
+ for (e in this._tiles) if (this._tiles[e].coords.z !== this._tileZoom && (t = this._tiles[e].el, t.onload = l, t.onerror = l, !t.complete)) {
3805
+ t.src = ne;
3806
+ var n = this._tiles[e].coords;
3807
+ P(t), delete this._tiles[e], this.fire("tileabort", {
3808
+ tile: t,
3809
+ coords: n
3810
+ });
3811
+ }
3812
+ },
3813
+ _removeTile: function(e) {
3814
+ var t = this._tiles[e];
3815
+ if (t) return t.el.setAttribute("src", ne), Ir.prototype._removeTile.call(this, e);
3816
+ },
3817
+ _tileReady: function(e, t, n) {
3818
+ if (!(!this._map || n && n.getAttribute("src") === ne)) return Ir.prototype._tileReady.call(this, e, t, n);
3819
+ }
3820
+ });
3821
+ function zr(e, t) {
3822
+ return new Rr(e, t);
3823
+ }
3824
+ var Br = Rr.extend({
3825
+ defaultWmsParams: {
3826
+ service: "WMS",
3827
+ request: "GetMap",
3828
+ layers: "",
3829
+ styles: "",
3830
+ format: "image/jpeg",
3831
+ transparent: !1,
3832
+ version: "1.1.1"
3833
+ },
3834
+ options: {
3835
+ crs: null,
3836
+ uppercase: !1
3837
+ },
3838
+ initialize: function(e, t) {
3839
+ this._url = e;
3840
+ var r = n({}, this.defaultWmsParams);
3841
+ for (var i in t) i in this.options || (r[i] = t[i]);
3842
+ t = p(this, t);
3843
+ var a = t.detectRetina && M.retina ? 2 : 1, o = this.getTileSize();
3844
+ r.width = o.x * a, r.height = o.y * a, this.wmsParams = r;
3845
+ },
3846
+ onAdd: function(e) {
3847
+ this._crs = this.options.crs || e.options.crs, this._wmsVersion = parseFloat(this.wmsParams.version);
3848
+ var t = this._wmsVersion >= 1.3 ? "crs" : "srs";
3849
+ this.wmsParams[t] = this._crs.code, Rr.prototype.onAdd.call(this, e);
3850
+ },
3851
+ getTileUrl: function(e) {
3852
+ var t = this._tileCoordsToNwSe(e), n = this._crs, r = w(n.project(t[0]), n.project(t[1])), i = r.min, a = r.max, o = (this._wmsVersion >= 1.3 && this._crs === Jn ? [
3853
+ i.y,
3854
+ i.x,
3855
+ a.y,
3856
+ a.x
3857
+ ] : [
3858
+ i.x,
3859
+ i.y,
3860
+ a.x,
3861
+ a.y
3862
+ ]).join(","), s = Rr.prototype.getTileUrl.call(this, e);
3863
+ return s + m(this.wmsParams, s, this.options.uppercase) + (this.options.uppercase ? "&BBOX=" : "&bbox=") + o;
3864
+ },
3865
+ setParams: function(e, t) {
3866
+ return n(this.wmsParams, e), t || this.redraw(), this;
3867
+ }
3868
+ });
3869
+ function Vr(e, t) {
3870
+ return new Br(e, t);
3871
+ }
3872
+ Rr.WMS = Br, zr.wms = Vr;
3873
+ var $ = J.extend({
3874
+ options: { padding: .1 },
3875
+ initialize: function(e) {
3876
+ p(this, e), o(this), this._layers = this._layers || {};
3877
+ },
3878
+ onAdd: function() {
3879
+ this._container || (this._initContainer(), F(this._container, "leaflet-zoom-animated")), this.getPane().appendChild(this._container), this._update(), this.on("update", this._updatePaths, this);
3880
+ },
3881
+ onRemove: function() {
3882
+ this.off("update", this._updatePaths, this), this._destroyContainer();
3883
+ },
3884
+ getEvents: function() {
3885
+ var e = {
3886
+ viewreset: this._reset,
3887
+ zoom: this._onZoom,
3888
+ moveend: this._update,
3889
+ zoomend: this._onZoomEnd
3890
+ };
3891
+ return this._zoomAnimated && (e.zoomanim = this._onAnimZoom), e;
3892
+ },
3893
+ _onAnimZoom: function(e) {
3894
+ this._updateTransform(e.center, e.zoom);
3895
+ },
3896
+ _onZoom: function() {
3897
+ this._updateTransform(this._map.getCenter(), this._map.getZoom());
3898
+ },
3899
+ _updateTransform: function(e, t) {
3900
+ var n = this._map.getZoomScale(t, this._zoom), r = this._map.getSize().multiplyBy(.5 + this.options.padding), i = this._map.project(this._center, t), a = r.multiplyBy(-n).add(i).subtract(this._map._getNewPixelOrigin(e, t));
3901
+ M.any3d ? It(this._container, a, n) : z(this._container, a);
3902
+ },
3903
+ _reset: function() {
3904
+ for (var e in this._update(), this._updateTransform(this._center, this._zoom), this._layers) this._layers[e]._reset();
3905
+ },
3906
+ _onZoomEnd: function() {
3907
+ for (var e in this._layers) this._layers[e]._project();
3908
+ },
3909
+ _updatePaths: function() {
3910
+ for (var e in this._layers) this._layers[e]._update();
3911
+ },
3912
+ _update: function() {
3913
+ var e = this.options.padding, t = this._map.getSize(), n = this._map.containerPointToLayerPoint(t.multiplyBy(-e)).round();
3914
+ this._bounds = new C(n, n.add(t.multiplyBy(1 + e * 2)).round()), this._center = this._map.getCenter(), this._zoom = this._map.getZoom();
3915
+ }
3916
+ }), Hr = $.extend({
3917
+ options: { tolerance: 0 },
3918
+ getEvents: function() {
3919
+ var e = $.prototype.getEvents.call(this);
3920
+ return e.viewprereset = this._onViewPreReset, e;
3921
+ },
3922
+ _onViewPreReset: function() {
3923
+ this._postponeUpdatePaths = !0;
3924
+ },
3925
+ onAdd: function() {
3926
+ $.prototype.onAdd.call(this), this._draw();
3927
+ },
3928
+ _initContainer: function() {
3929
+ var e = this._container = document.createElement("canvas");
3930
+ B(e, "mousemove", this._onMouseMove, this), B(e, "click dblclick mousedown mouseup contextmenu", this._onClick, this), B(e, "mouseout", this._handleMouseOut, this), e._leaflet_disable_events = !0, this._ctx = e.getContext("2d");
3931
+ },
3932
+ _destroyContainer: function() {
3933
+ v(this._redrawRequest), delete this._ctx, P(this._container), H(this._container), delete this._container;
3934
+ },
3935
+ _updatePaths: function() {
3936
+ if (!this._postponeUpdatePaths) {
3937
+ var e;
3938
+ for (var t in this._redrawBounds = null, this._layers) e = this._layers[t], e._update();
3939
+ this._redraw();
3940
+ }
3941
+ },
3942
+ _update: function() {
3943
+ if (!(this._map._animatingZoom && this._bounds)) {
3944
+ $.prototype._update.call(this);
3945
+ var e = this._bounds, t = this._container, n = e.getSize(), r = M.retina ? 2 : 1;
3946
+ z(t, e.min), t.width = r * n.x, t.height = r * n.y, t.style.width = n.x + "px", t.style.height = n.y + "px", M.retina && this._ctx.scale(2, 2), this._ctx.translate(-e.min.x, -e.min.y), this.fire("update");
3947
+ }
3948
+ },
3949
+ _reset: function() {
3950
+ $.prototype._reset.call(this), this._postponeUpdatePaths && (this._postponeUpdatePaths = !1, this._updatePaths());
3951
+ },
3952
+ _initPath: function(e) {
3953
+ this._updateDashArray(e), this._layers[o(e)] = e;
3954
+ var t = e._order = {
3955
+ layer: e,
3956
+ prev: this._drawLast,
3957
+ next: null
3958
+ };
3959
+ this._drawLast && (this._drawLast.next = t), this._drawLast = t, this._drawFirst = this._drawFirst || this._drawLast;
3960
+ },
3961
+ _addPath: function(e) {
3962
+ this._requestRedraw(e);
3963
+ },
3964
+ _removePath: function(e) {
3965
+ var t = e._order, n = t.next, r = t.prev;
3966
+ n ? n.prev = r : this._drawLast = r, r ? r.next = n : this._drawFirst = n, delete e._order, delete this._layers[o(e)], this._requestRedraw(e);
3967
+ },
3968
+ _updatePath: function(e) {
3969
+ this._extendRedrawBounds(e), e._project(), e._update(), this._requestRedraw(e);
3970
+ },
3971
+ _updateStyle: function(e) {
3972
+ this._updateDashArray(e), this._requestRedraw(e);
3973
+ },
3974
+ _updateDashArray: function(e) {
3975
+ if (typeof e.options.dashArray == "string") {
3976
+ var t = e.options.dashArray.split(/[, ]+/), n = [], r, i;
3977
+ for (i = 0; i < t.length; i++) {
3978
+ if (r = Number(t[i]), isNaN(r)) return;
3979
+ n.push(r);
3980
+ }
3981
+ e.options._dashArray = n;
3982
+ } else e.options._dashArray = e.options.dashArray;
3983
+ },
3984
+ _requestRedraw: function(e) {
3985
+ this._map && (this._extendRedrawBounds(e), this._redrawRequest = this._redrawRequest || _(this._redraw, this));
3986
+ },
3987
+ _extendRedrawBounds: function(e) {
3988
+ if (e._pxBounds) {
3989
+ var t = (e.options.weight || 0) + 1;
3990
+ this._redrawBounds = this._redrawBounds || new C(), this._redrawBounds.extend(e._pxBounds.min.subtract([t, t])), this._redrawBounds.extend(e._pxBounds.max.add([t, t]));
3991
+ }
3992
+ },
3993
+ _redraw: function() {
3994
+ this._redrawRequest = null, this._redrawBounds && (this._redrawBounds.min._floor(), this._redrawBounds.max._ceil()), this._clear(), this._draw(), this._redrawBounds = null;
3995
+ },
3996
+ _clear: function() {
3997
+ var e = this._redrawBounds;
3998
+ if (e) {
3999
+ var t = e.getSize();
4000
+ this._ctx.clearRect(e.min.x, e.min.y, t.x, t.y);
4001
+ } else this._ctx.save(), this._ctx.setTransform(1, 0, 0, 1, 0, 0), this._ctx.clearRect(0, 0, this._container.width, this._container.height), this._ctx.restore();
4002
+ },
4003
+ _draw: function() {
4004
+ var e, t = this._redrawBounds;
4005
+ if (this._ctx.save(), t) {
4006
+ var n = t.getSize();
4007
+ this._ctx.beginPath(), this._ctx.rect(t.min.x, t.min.y, n.x, n.y), this._ctx.clip();
4008
+ }
4009
+ this._drawing = !0;
4010
+ for (var r = this._drawFirst; r; r = r.next) e = r.layer, (!t || e._pxBounds && e._pxBounds.intersects(t)) && e._updatePath();
4011
+ this._drawing = !1, this._ctx.restore();
4012
+ },
4013
+ _updatePoly: function(e, t) {
4014
+ if (this._drawing) {
4015
+ var n, r, i, a, o = e._parts, s = o.length, c = this._ctx;
4016
+ if (s) {
4017
+ for (c.beginPath(), n = 0; n < s; n++) {
4018
+ for (r = 0, i = o[n].length; r < i; r++) a = o[n][r], c[r ? "lineTo" : "moveTo"](a.x, a.y);
4019
+ t && c.closePath();
4020
+ }
4021
+ this._fillStroke(c, e);
4022
+ }
4023
+ }
4024
+ },
4025
+ _updateCircle: function(e) {
4026
+ if (!(!this._drawing || e._empty())) {
4027
+ var t = e._point, n = this._ctx, r = Math.max(Math.round(e._radius), 1), i = (Math.max(Math.round(e._radiusY), 1) || r) / r;
4028
+ i !== 1 && (n.save(), n.scale(1, i)), n.beginPath(), n.arc(t.x, t.y / i, r, 0, Math.PI * 2, !1), i !== 1 && n.restore(), this._fillStroke(n, e);
4029
+ }
4030
+ },
4031
+ _fillStroke: function(e, t) {
4032
+ var n = t.options;
4033
+ n.fill && (e.globalAlpha = n.fillOpacity, e.fillStyle = n.fillColor || n.color, e.fill(n.fillRule || "evenodd")), n.stroke && n.weight !== 0 && (e.setLineDash && e.setLineDash(t.options && t.options._dashArray || []), e.globalAlpha = n.opacity, e.lineWidth = n.weight, e.strokeStyle = n.color, e.lineCap = n.lineCap, e.lineJoin = n.lineJoin, e.stroke());
4034
+ },
4035
+ _onClick: function(e) {
4036
+ for (var t = this._map.mouseEventToLayerPoint(e), n, r, i = this._drawFirst; i; i = i.next) n = i.layer, n.options.interactive && n._containsPoint(t) && (!(e.type === "click" || e.type === "preclick") || !this._map._draggableMoved(n)) && (r = n);
4037
+ this._fireEvent(r ? [r] : !1, e);
4038
+ },
4039
+ _onMouseMove: function(e) {
4040
+ if (!(!this._map || this._map.dragging.moving() || this._map._animatingZoom)) {
4041
+ var t = this._map.mouseEventToLayerPoint(e);
4042
+ this._handleMouseHover(e, t);
4043
+ }
4044
+ },
4045
+ _handleMouseOut: function(e) {
4046
+ var t = this._hoveredLayer;
4047
+ t && (I(this._container, "leaflet-interactive"), this._fireEvent([t], e, "mouseout"), this._hoveredLayer = null, this._mouseHoverThrottled = !1);
4048
+ },
4049
+ _handleMouseHover: function(e, t) {
4050
+ if (!this._mouseHoverThrottled) {
4051
+ for (var n, r, a = this._drawFirst; a; a = a.next) n = a.layer, n.options.interactive && n._containsPoint(t) && (r = n);
4052
+ r !== this._hoveredLayer && (this._handleMouseOut(e), r && (F(this._container, "leaflet-interactive"), this._fireEvent([r], e, "mouseover"), this._hoveredLayer = r)), this._fireEvent(this._hoveredLayer ? [this._hoveredLayer] : !1, e), this._mouseHoverThrottled = !0, setTimeout(i(function() {
4053
+ this._mouseHoverThrottled = !1;
4054
+ }, this), 32);
4055
+ }
4056
+ },
4057
+ _fireEvent: function(e, t, n) {
4058
+ this._map._fireDOMEvent(t, n || t.type, e);
4059
+ },
4060
+ _bringToFront: function(e) {
4061
+ var t = e._order;
4062
+ if (t) {
4063
+ var n = t.next, r = t.prev;
4064
+ if (n) n.prev = r;
4065
+ else return;
4066
+ r ? r.next = n : n && (this._drawFirst = n), t.prev = this._drawLast, this._drawLast.next = t, t.next = null, this._drawLast = t, this._requestRedraw(e);
4067
+ }
4068
+ },
4069
+ _bringToBack: function(e) {
4070
+ var t = e._order;
4071
+ if (t) {
4072
+ var n = t.next, r = t.prev;
4073
+ if (r) r.next = n;
4074
+ else return;
4075
+ n ? n.prev = r : r && (this._drawLast = r), t.prev = null, t.next = this._drawFirst, this._drawFirst.prev = t, this._drawFirst = t, this._requestRedraw(e);
4076
+ }
4077
+ }
4078
+ });
4079
+ function Ur(e) {
4080
+ return M.canvas ? new Hr(e) : null;
4081
+ }
4082
+ var Wr = (function() {
4083
+ try {
4084
+ return document.namespaces.add("lvml", "urn:schemas-microsoft-com:vml"), function(e) {
4085
+ return document.createElement("<lvml:" + e + " class=\"lvml\">");
4086
+ };
4087
+ } catch {}
4088
+ return function(e) {
4089
+ return document.createElement("<" + e + " xmlns=\"urn:schemas-microsoft.com:vml\" class=\"lvml\">");
4090
+ };
4091
+ })(), Gr = {
4092
+ _initContainer: function() {
4093
+ this._container = N("div", "leaflet-vml-container");
4094
+ },
4095
+ _update: function() {
4096
+ this._map._animatingZoom || ($.prototype._update.call(this), this.fire("update"));
4097
+ },
4098
+ _initPath: function(e) {
4099
+ var t = e._container = Wr("shape");
4100
+ F(t, "leaflet-vml-shape " + (this.options.className || "")), t.coordsize = "1 1", e._path = Wr("path"), t.appendChild(e._path), this._updateStyle(e), this._layers[o(e)] = e;
4101
+ },
4102
+ _addPath: function(e) {
4103
+ var t = e._container;
4104
+ this._container.appendChild(t), e.options.interactive && e.addInteractiveTarget(t);
4105
+ },
4106
+ _removePath: function(e) {
4107
+ var t = e._container;
4108
+ P(t), e.removeInteractiveTarget(t), delete this._layers[o(e)];
4109
+ },
4110
+ _updateStyle: function(e) {
4111
+ var t = e._stroke, n = e._fill, r = e.options, i = e._container;
4112
+ i.stroked = !!r.stroke, i.filled = !!r.fill, r.stroke ? (t ||= e._stroke = Wr("stroke"), i.appendChild(t), t.weight = r.weight + "px", t.color = r.color, t.opacity = r.opacity, r.dashArray ? t.dashStyle = g(r.dashArray) ? r.dashArray.join(" ") : r.dashArray.replace(/( *, *)/g, " ") : t.dashStyle = "", t.endcap = r.lineCap.replace("butt", "flat"), t.joinstyle = r.lineJoin) : t && (i.removeChild(t), e._stroke = null), r.fill ? (n ||= e._fill = Wr("fill"), i.appendChild(n), n.color = r.fillColor || r.color, n.opacity = r.fillOpacity) : n && (i.removeChild(n), e._fill = null);
4113
+ },
4114
+ _updateCircle: function(e) {
4115
+ var t = e._point.round(), n = Math.round(e._radius), r = Math.round(e._radiusY || n);
4116
+ this._setPath(e, e._empty() ? "M0 0" : "AL " + t.x + "," + t.y + " " + n + "," + r + " 0,23592600");
4117
+ },
4118
+ _setPath: function(e, t) {
4119
+ e._path.v = t;
4120
+ },
4121
+ _bringToFront: function(e) {
4122
+ kt(e._container);
4123
+ },
4124
+ _bringToBack: function(e) {
4125
+ At(e._container);
4126
+ }
4127
+ }, Kr = M.vml ? Wr : ve, qr = $.extend({
4128
+ _initContainer: function() {
4129
+ this._container = Kr("svg"), this._container.setAttribute("pointer-events", "none"), this._rootGroup = Kr("g"), this._container.appendChild(this._rootGroup);
4130
+ },
4131
+ _destroyContainer: function() {
4132
+ P(this._container), H(this._container), delete this._container, delete this._rootGroup, delete this._svgSize;
4133
+ },
4134
+ _update: function() {
4135
+ if (!(this._map._animatingZoom && this._bounds)) {
4136
+ $.prototype._update.call(this);
4137
+ var e = this._bounds, t = e.getSize(), n = this._container;
4138
+ (!this._svgSize || !this._svgSize.equals(t)) && (this._svgSize = t, n.setAttribute("width", t.x), n.setAttribute("height", t.y)), z(n, e.min), n.setAttribute("viewBox", [
4139
+ e.min.x,
4140
+ e.min.y,
4141
+ t.x,
4142
+ t.y
4143
+ ].join(" ")), this.fire("update");
4144
+ }
4145
+ },
4146
+ _initPath: function(e) {
4147
+ var t = e._path = Kr("path");
4148
+ e.options.className && F(t, e.options.className), e.options.interactive && F(t, "leaflet-interactive"), this._updateStyle(e), this._layers[o(e)] = e;
4149
+ },
4150
+ _addPath: function(e) {
4151
+ this._rootGroup || this._initContainer(), this._rootGroup.appendChild(e._path), e.addInteractiveTarget(e._path);
4152
+ },
4153
+ _removePath: function(e) {
4154
+ P(e._path), e.removeInteractiveTarget(e._path), delete this._layers[o(e)];
4155
+ },
4156
+ _updatePath: function(e) {
4157
+ e._project(), e._update();
4158
+ },
4159
+ _updateStyle: function(e) {
4160
+ var t = e._path, n = e.options;
4161
+ t && (n.stroke ? (t.setAttribute("stroke", n.color), t.setAttribute("stroke-opacity", n.opacity), t.setAttribute("stroke-width", n.weight), t.setAttribute("stroke-linecap", n.lineCap), t.setAttribute("stroke-linejoin", n.lineJoin), n.dashArray ? t.setAttribute("stroke-dasharray", n.dashArray) : t.removeAttribute("stroke-dasharray"), n.dashOffset ? t.setAttribute("stroke-dashoffset", n.dashOffset) : t.removeAttribute("stroke-dashoffset")) : t.setAttribute("stroke", "none"), n.fill ? (t.setAttribute("fill", n.fillColor || n.color), t.setAttribute("fill-opacity", n.fillOpacity), t.setAttribute("fill-rule", n.fillRule || "evenodd")) : t.setAttribute("fill", "none"));
4162
+ },
4163
+ _updatePoly: function(e, t) {
4164
+ this._setPath(e, ye(e._parts, t));
4165
+ },
4166
+ _updateCircle: function(e) {
4167
+ var t = e._point, n = Math.max(Math.round(e._radius), 1), r = Math.max(Math.round(e._radiusY), 1) || n, i = "a" + n + "," + r + " 0 1,0 ", a = e._empty() ? "M0 0" : "M" + (t.x - n) + "," + t.y + i + n * 2 + ",0 " + i + -n * 2 + ",0 ";
4168
+ this._setPath(e, a);
4169
+ },
4170
+ _setPath: function(e, t) {
4171
+ e._path.setAttribute("d", t);
4172
+ },
4173
+ _bringToFront: function(e) {
4174
+ kt(e._path);
4175
+ },
4176
+ _bringToBack: function(e) {
4177
+ At(e._path);
4178
+ }
4179
+ });
4180
+ M.vml && qr.include(Gr);
4181
+ function Jr(e) {
4182
+ return M.svg || M.vml ? new qr(e) : null;
4183
+ }
4184
+ W.include({
4185
+ getRenderer: function(e) {
4186
+ var t = e.options.renderer || this._getPaneRenderer(e.options.pane) || this.options.renderer || this._renderer;
4187
+ return t ||= this._renderer = this._createRenderer(), this.hasLayer(t) || this.addLayer(t), t;
4188
+ },
4189
+ _getPaneRenderer: function(e) {
4190
+ if (e === "overlayPane" || e === void 0) return !1;
4191
+ var t = this._paneRenderers[e];
4192
+ return t === void 0 && (t = this._createRenderer({ pane: e }), this._paneRenderers[e] = t), t;
4193
+ },
4194
+ _createRenderer: function(e) {
4195
+ return this.options.preferCanvas && Ur(e) || Jr(e);
4196
+ }
4197
+ });
4198
+ var Yr = dr.extend({
4199
+ initialize: function(e, t) {
4200
+ dr.prototype.initialize.call(this, this._boundsToLatLngs(e), t);
4201
+ },
4202
+ setBounds: function(e) {
4203
+ return this.setLatLngs(this._boundsToLatLngs(e));
4204
+ },
4205
+ _boundsToLatLngs: function(e) {
4206
+ return e = E(e), [
4207
+ e.getSouthWest(),
4208
+ e.getNorthWest(),
4209
+ e.getNorthEast(),
4210
+ e.getSouthEast()
4211
+ ];
4212
+ }
4213
+ });
4214
+ function Xr(e, t) {
4215
+ return new Yr(e, t);
4216
+ }
4217
+ qr.create = Kr, qr.pointsToPath = ye, Z.geometryToLayer = pr, Z.coordsToLatLng = hr, Z.coordsToLatLngs = gr, Z.latLngToCoords = _r, Z.latLngsToCoords = vr, Z.getFeature = yr, Z.asFeature = br, W.mergeOptions({ boxZoom: !0 });
4218
+ var Zr = K.extend({
4219
+ initialize: function(e) {
4220
+ this._map = e, this._container = e._container, this._pane = e._panes.overlayPane, this._resetStateTimeout = 0, e.on("unload", this._destroy, this);
4221
+ },
4222
+ addHooks: function() {
4223
+ B(this._container, "mousedown", this._onMouseDown, this);
4224
+ },
4225
+ removeHooks: function() {
4226
+ H(this._container, "mousedown", this._onMouseDown, this);
4227
+ },
4228
+ moved: function() {
4229
+ return this._moved;
4230
+ },
4231
+ _destroy: function() {
4232
+ P(this._pane), delete this._pane;
4233
+ },
4234
+ _resetState: function() {
4235
+ this._resetStateTimeout = 0, this._moved = !1;
4236
+ },
4237
+ _clearDeferredResetState: function() {
4238
+ this._resetStateTimeout !== 0 && (clearTimeout(this._resetStateTimeout), this._resetStateTimeout = 0);
4239
+ },
4240
+ _onMouseDown: function(e) {
4241
+ if (!e.shiftKey || e.which !== 1 && e.button !== 1) return !1;
4242
+ this._clearDeferredResetState(), this._resetState(), Rt(), Ht(), this._startPoint = this._map.mouseEventToContainerPoint(e), B(document, {
4243
+ contextmenu: an,
4244
+ mousemove: this._onMouseMove,
4245
+ mouseup: this._onMouseUp,
4246
+ keydown: this._onKeyDown
4247
+ }, this);
4248
+ },
4249
+ _onMouseMove: function(e) {
4250
+ this._moved || (this._moved = !0, this._box = N("div", "leaflet-zoom-box", this._container), F(this._container, "leaflet-crosshair"), this._map.fire("boxzoomstart")), this._point = this._map.mouseEventToContainerPoint(e);
4251
+ var t = new C(this._point, this._startPoint), n = t.getSize();
4252
+ z(this._box, t.min), this._box.style.width = n.x + "px", this._box.style.height = n.y + "px";
4253
+ },
4254
+ _finish: function() {
4255
+ this._moved && (P(this._box), I(this._container, "leaflet-crosshair")), zt(), Ut(), H(document, {
4256
+ contextmenu: an,
4257
+ mousemove: this._onMouseMove,
4258
+ mouseup: this._onMouseUp,
4259
+ keydown: this._onKeyDown
4260
+ }, this);
4261
+ },
4262
+ _onMouseUp: function(e) {
4263
+ if (!(e.which !== 1 && e.button !== 1) && (this._finish(), this._moved)) {
4264
+ this._clearDeferredResetState(), this._resetStateTimeout = setTimeout(i(this._resetState, this), 0);
4265
+ var t = new T(this._map.containerPointToLatLng(this._startPoint), this._map.containerPointToLatLng(this._point));
4266
+ this._map.fitBounds(t).fire("boxzoomend", { boxZoomBounds: t });
4267
+ }
4268
+ },
4269
+ _onKeyDown: function(e) {
4270
+ e.keyCode === 27 && (this._finish(), this._clearDeferredResetState(), this._resetState());
4271
+ }
4272
+ });
4273
+ W.addInitHook("addHandler", "boxZoom", Zr), W.mergeOptions({ doubleClickZoom: !0 });
4274
+ var Qr = K.extend({
4275
+ addHooks: function() {
4276
+ this._map.on("dblclick", this._onDoubleClick, this);
4277
+ },
4278
+ removeHooks: function() {
4279
+ this._map.off("dblclick", this._onDoubleClick, this);
4280
+ },
4281
+ _onDoubleClick: function(e) {
4282
+ var t = this._map, n = t.getZoom(), r = t.options.zoomDelta, i = e.originalEvent.shiftKey ? n - r : n + r;
4283
+ t.options.doubleClickZoom === "center" ? t.setZoom(i) : t.setZoomAround(e.containerPoint, i);
4284
+ }
4285
+ });
4286
+ W.addInitHook("addHandler", "doubleClickZoom", Qr), W.mergeOptions({
4287
+ dragging: !0,
4288
+ inertia: !0,
4289
+ inertiaDeceleration: 3400,
4290
+ inertiaMaxSpeed: Infinity,
4291
+ easeLinearity: .2,
4292
+ worldCopyJump: !1,
4293
+ maxBoundsViscosity: 0
4294
+ });
4295
+ var $r = K.extend({
4296
+ addHooks: function() {
4297
+ if (!this._draggable) {
4298
+ var e = this._map;
4299
+ this._draggable = new wn(e._mapPane, e._container), this._draggable.on({
4300
+ dragstart: this._onDragStart,
4301
+ drag: this._onDrag,
4302
+ dragend: this._onDragEnd
4303
+ }, this), this._draggable.on("predrag", this._onPreDragLimit, this), e.options.worldCopyJump && (this._draggable.on("predrag", this._onPreDragWrap, this), e.on("zoomend", this._onZoomEnd, this), e.whenReady(this._onZoomEnd, this));
4304
+ }
4305
+ F(this._map._container, "leaflet-grab leaflet-touch-drag"), this._draggable.enable(), this._positions = [], this._times = [];
4306
+ },
4307
+ removeHooks: function() {
4308
+ I(this._map._container, "leaflet-grab"), I(this._map._container, "leaflet-touch-drag"), this._draggable.disable();
4309
+ },
4310
+ moved: function() {
4311
+ return this._draggable && this._draggable._moved;
4312
+ },
4313
+ moving: function() {
4314
+ return this._draggable && this._draggable._moving;
4315
+ },
4316
+ _onDragStart: function() {
4317
+ var e = this._map;
4318
+ if (e._stop(), this._map.options.maxBounds && this._map.options.maxBoundsViscosity) {
4319
+ var t = E(this._map.options.maxBounds);
4320
+ this._offsetLimit = w(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1), this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())), this._viscosity = Math.min(1, Math.max(0, this._map.options.maxBoundsViscosity));
4321
+ } else this._offsetLimit = null;
4322
+ e.fire("movestart").fire("dragstart"), e.options.inertia && (this._positions = [], this._times = []);
4323
+ },
4324
+ _onDrag: function(e) {
4325
+ if (this._map.options.inertia) {
4326
+ var t = this._lastTime = +/* @__PURE__ */ new Date(), n = this._lastPos = this._draggable._absPos || this._draggable._newPos;
4327
+ this._positions.push(n), this._times.push(t), this._prunePositions(t);
4328
+ }
4329
+ this._map.fire("move", e).fire("drag", e);
4330
+ },
4331
+ _prunePositions: function(e) {
4332
+ for (; this._positions.length > 1 && e - this._times[0] > 50;) this._positions.shift(), this._times.shift();
4333
+ },
4334
+ _onZoomEnd: function() {
4335
+ var e = this._map.getSize().divideBy(2);
4336
+ this._initialWorldOffset = this._map.latLngToLayerPoint([0, 0]).subtract(e).x, this._worldWidth = this._map.getPixelWorldBounds().getSize().x;
4337
+ },
4338
+ _viscousLimit: function(e, t) {
4339
+ return e - (e - t) * this._viscosity;
4340
+ },
4341
+ _onPreDragLimit: function() {
4342
+ if (!(!this._viscosity || !this._offsetLimit)) {
4343
+ var e = this._draggable._newPos.subtract(this._draggable._startPos), t = this._offsetLimit;
4344
+ e.x < t.min.x && (e.x = this._viscousLimit(e.x, t.min.x)), e.y < t.min.y && (e.y = this._viscousLimit(e.y, t.min.y)), e.x > t.max.x && (e.x = this._viscousLimit(e.x, t.max.x)), e.y > t.max.y && (e.y = this._viscousLimit(e.y, t.max.y)), this._draggable._newPos = this._draggable._startPos.add(e);
4345
+ }
4346
+ },
4347
+ _onPreDragWrap: function() {
4348
+ var e = this._worldWidth, t = Math.round(e / 2), n = this._initialWorldOffset, r = this._draggable._newPos.x, i = (r - t + n) % e + t - n, a = (r + t + n) % e - t - n, o = Math.abs(i + n) < Math.abs(a + n) ? i : a;
4349
+ this._draggable._absPos = this._draggable._newPos.clone(), this._draggable._newPos.x = o;
4350
+ },
4351
+ _onDragEnd: function(e) {
4352
+ var t = this._map, n = t.options, r = !n.inertia || e.noInertia || this._times.length < 2;
4353
+ if (t.fire("dragend", e), r) t.fire("moveend");
4354
+ else {
4355
+ this._prunePositions(+/* @__PURE__ */ new Date());
4356
+ var i = this._lastPos.subtract(this._positions[0]), a = (this._lastTime - this._times[0]) / 1e3, o = n.easeLinearity, s = i.multiplyBy(o / a), c = s.distanceTo([0, 0]), l = Math.min(n.inertiaMaxSpeed, c), u = s.multiplyBy(l / c), d = l / (n.inertiaDeceleration * o), f = u.multiplyBy(-d / 2).round();
4357
+ !f.x && !f.y ? t.fire("moveend") : (f = t._limitOffset(f, t.options.maxBounds), _(function() {
4358
+ t.panBy(f, {
4359
+ duration: d,
4360
+ easeLinearity: o,
4361
+ noMoveStart: !0,
4362
+ animate: !0
4363
+ });
4364
+ }));
4365
+ }
4366
+ }
4367
+ });
4368
+ W.addInitHook("addHandler", "dragging", $r), W.mergeOptions({
4369
+ keyboard: !0,
4370
+ keyboardPanDelta: 80
4371
+ });
4372
+ var ei = K.extend({
4373
+ keyCodes: {
4374
+ left: [37],
4375
+ right: [39],
4376
+ down: [40],
4377
+ up: [38],
4378
+ zoomIn: [
4379
+ 187,
4380
+ 107,
4381
+ 61,
4382
+ 171
4383
+ ],
4384
+ zoomOut: [
4385
+ 189,
4386
+ 109,
4387
+ 54,
4388
+ 173
4389
+ ]
4390
+ },
4391
+ initialize: function(e) {
4392
+ this._map = e, this._setPanDelta(e.options.keyboardPanDelta), this._setZoomDelta(e.options.zoomDelta);
4393
+ },
4394
+ addHooks: function() {
4395
+ var e = this._map._container;
4396
+ e.tabIndex <= 0 && (e.tabIndex = "0"), B(e, {
4397
+ focus: this._onFocus,
4398
+ blur: this._onBlur,
4399
+ mousedown: this._onMouseDown
4400
+ }, this), this._map.on({
4401
+ focus: this._addHooks,
4402
+ blur: this._removeHooks
4403
+ }, this);
4404
+ },
4405
+ removeHooks: function() {
4406
+ this._removeHooks(), H(this._map._container, {
4407
+ focus: this._onFocus,
4408
+ blur: this._onBlur,
4409
+ mousedown: this._onMouseDown
4410
+ }, this), this._map.off({
4411
+ focus: this._addHooks,
4412
+ blur: this._removeHooks
4413
+ }, this);
4414
+ },
4415
+ _onMouseDown: function() {
4416
+ if (!this._focused) {
4417
+ var e = document.body, t = document.documentElement, n = e.scrollTop || t.scrollTop, r = e.scrollLeft || t.scrollLeft;
4418
+ this._map._container.focus(), window.scrollTo(r, n);
4419
+ }
4420
+ },
4421
+ _onFocus: function() {
4422
+ this._focused = !0, this._map.fire("focus");
4423
+ },
4424
+ _onBlur: function() {
4425
+ this._focused = !1, this._map.fire("blur");
4426
+ },
4427
+ _setPanDelta: function(e) {
4428
+ var t = this._panKeys = {}, n = this.keyCodes, r, i;
4429
+ for (r = 0, i = n.left.length; r < i; r++) t[n.left[r]] = [-1 * e, 0];
4430
+ for (r = 0, i = n.right.length; r < i; r++) t[n.right[r]] = [e, 0];
4431
+ for (r = 0, i = n.down.length; r < i; r++) t[n.down[r]] = [0, e];
4432
+ for (r = 0, i = n.up.length; r < i; r++) t[n.up[r]] = [0, -1 * e];
4433
+ },
4434
+ _setZoomDelta: function(e) {
4435
+ var t = this._zoomKeys = {}, n = this.keyCodes, r, i;
4436
+ for (r = 0, i = n.zoomIn.length; r < i; r++) t[n.zoomIn[r]] = e;
4437
+ for (r = 0, i = n.zoomOut.length; r < i; r++) t[n.zoomOut[r]] = -e;
4438
+ },
4439
+ _addHooks: function() {
4440
+ B(document, "keydown", this._onKeyDown, this);
4441
+ },
4442
+ _removeHooks: function() {
4443
+ H(document, "keydown", this._onKeyDown, this);
4444
+ },
4445
+ _onKeyDown: function(e) {
4446
+ if (!(e.altKey || e.ctrlKey || e.metaKey)) {
4447
+ var t = e.keyCode, n = this._map, r;
4448
+ if (t in this._panKeys) {
4449
+ if (!n._panAnim || !n._panAnim._inProgress) if (r = this._panKeys[t], e.shiftKey && (r = S(r).multiplyBy(3)), n.options.maxBounds && (r = n._limitOffset(S(r), n.options.maxBounds)), n.options.worldCopyJump) {
4450
+ var i = n.wrapLatLng(n.unproject(n.project(n.getCenter()).add(r)));
4451
+ n.panTo(i);
4452
+ } else n.panBy(r);
4453
+ } else if (t in this._zoomKeys) n.setZoom(n.getZoom() + (e.shiftKey ? 3 : 1) * this._zoomKeys[t]);
4454
+ else if (t === 27 && n._popup && n._popup.options.closeOnEscapeKey) n.closePopup();
4455
+ else return;
4456
+ an(e);
4457
+ }
4458
+ }
4459
+ });
4460
+ W.addInitHook("addHandler", "keyboard", ei), W.mergeOptions({
4461
+ scrollWheelZoom: !0,
4462
+ wheelDebounceTime: 40,
4463
+ wheelPxPerZoomLevel: 60
4464
+ });
4465
+ var ti = K.extend({
4466
+ addHooks: function() {
4467
+ B(this._map._container, "wheel", this._onWheelScroll, this), this._delta = 0;
4468
+ },
4469
+ removeHooks: function() {
4470
+ H(this._map._container, "wheel", this._onWheelScroll, this);
4471
+ },
4472
+ _onWheelScroll: function(e) {
4473
+ var t = ln(e), n = this._map.options.wheelDebounceTime;
4474
+ this._delta += t, this._lastMousePos = this._map.mouseEventToContainerPoint(e), this._startTime ||= +/* @__PURE__ */ new Date();
4475
+ var r = Math.max(n - (+/* @__PURE__ */ new Date() - this._startTime), 0);
4476
+ clearTimeout(this._timer), this._timer = setTimeout(i(this._performZoom, this), r), an(e);
4477
+ },
4478
+ _performZoom: function() {
4479
+ var e = this._map, t = e.getZoom(), n = this._map.options.zoomSnap || 0;
4480
+ e._stop();
4481
+ var r = this._delta / (this._map.options.wheelPxPerZoomLevel * 4), i = 4 * Math.log(2 / (1 + Math.exp(-Math.abs(r)))) / Math.LN2, a = n ? Math.ceil(i / n) * n : i, o = e._limitZoom(t + (this._delta > 0 ? a : -a)) - t;
4482
+ this._delta = 0, this._startTime = null, o && (e.options.scrollWheelZoom === "center" ? e.setZoom(t + o) : e.setZoomAround(this._lastMousePos, t + o));
4483
+ }
4484
+ });
4485
+ W.addInitHook("addHandler", "scrollWheelZoom", ti);
4486
+ var ni = 600;
4487
+ W.mergeOptions({
4488
+ tapHold: M.touchNative && M.safari && M.mobile,
4489
+ tapTolerance: 15
4490
+ });
4491
+ var ri = K.extend({
4492
+ addHooks: function() {
4493
+ B(this._map._container, "touchstart", this._onDown, this);
4494
+ },
4495
+ removeHooks: function() {
4496
+ H(this._map._container, "touchstart", this._onDown, this);
4497
+ },
4498
+ _onDown: function(e) {
4499
+ if (clearTimeout(this._holdTimeout), e.touches.length === 1) {
4500
+ var t = e.touches[0];
4501
+ this._startPos = this._newPos = new x(t.clientX, t.clientY), this._holdTimeout = setTimeout(i(function() {
4502
+ this._cancel(), this._isTapValid() && (B(document, "touchend", U), B(document, "touchend touchcancel", this._cancelClickPrevent), this._simulateEvent("contextmenu", t));
4503
+ }, this), ni), B(document, "touchend touchcancel contextmenu", this._cancel, this), B(document, "touchmove", this._onMove, this);
4504
+ }
4505
+ },
4506
+ _cancelClickPrevent: function e() {
4507
+ H(document, "touchend", U), H(document, "touchend touchcancel", e);
4508
+ },
4509
+ _cancel: function() {
4510
+ clearTimeout(this._holdTimeout), H(document, "touchend touchcancel contextmenu", this._cancel, this), H(document, "touchmove", this._onMove, this);
4511
+ },
4512
+ _onMove: function(e) {
4513
+ var t = e.touches[0];
4514
+ this._newPos = new x(t.clientX, t.clientY);
4515
+ },
4516
+ _isTapValid: function() {
4517
+ return this._newPos.distanceTo(this._startPos) <= this._map.options.tapTolerance;
4518
+ },
4519
+ _simulateEvent: function(e, t) {
4520
+ var n = new MouseEvent(e, {
4521
+ bubbles: !0,
4522
+ cancelable: !0,
4523
+ view: window,
4524
+ screenX: t.screenX,
4525
+ screenY: t.screenY,
4526
+ clientX: t.clientX,
4527
+ clientY: t.clientY
4528
+ });
4529
+ n._simulated = !0, t.target.dispatchEvent(n);
4530
+ }
4531
+ });
4532
+ W.addInitHook("addHandler", "tapHold", ri), W.mergeOptions({
4533
+ touchZoom: M.touch,
4534
+ bounceAtZoomLimits: !0
4535
+ });
4536
+ var ii = K.extend({
4537
+ addHooks: function() {
4538
+ F(this._map._container, "leaflet-touch-zoom"), B(this._map._container, "touchstart", this._onTouchStart, this);
4539
+ },
4540
+ removeHooks: function() {
4541
+ I(this._map._container, "leaflet-touch-zoom"), H(this._map._container, "touchstart", this._onTouchStart, this);
4542
+ },
4543
+ _onTouchStart: function(e) {
4544
+ var t = this._map;
4545
+ if (!(!e.touches || e.touches.length !== 2 || t._animatingZoom || this._zooming)) {
4546
+ var n = t.mouseEventToContainerPoint(e.touches[0]), r = t.mouseEventToContainerPoint(e.touches[1]);
4547
+ this._centerPoint = t.getSize()._divideBy(2), this._startLatLng = t.containerPointToLatLng(this._centerPoint), t.options.touchZoom !== "center" && (this._pinchStartLatLng = t.containerPointToLatLng(n.add(r)._divideBy(2))), this._startDist = n.distanceTo(r), this._startZoom = t.getZoom(), this._moved = !1, this._zooming = !0, t._stop(), B(document, "touchmove", this._onTouchMove, this), B(document, "touchend touchcancel", this._onTouchEnd, this), U(e);
4548
+ }
4549
+ },
4550
+ _onTouchMove: function(e) {
4551
+ if (!(!e.touches || e.touches.length !== 2 || !this._zooming)) {
4552
+ var t = this._map, n = t.mouseEventToContainerPoint(e.touches[0]), r = t.mouseEventToContainerPoint(e.touches[1]), a = n.distanceTo(r) / this._startDist;
4553
+ if (this._zoom = t.getScaleZoom(a, this._startZoom), !t.options.bounceAtZoomLimits && (this._zoom < t.getMinZoom() && a < 1 || this._zoom > t.getMaxZoom() && a > 1) && (this._zoom = t._limitZoom(this._zoom)), t.options.touchZoom === "center") {
4554
+ if (this._center = this._startLatLng, a === 1) return;
4555
+ } else {
4556
+ var o = n._add(r)._divideBy(2)._subtract(this._centerPoint);
4557
+ if (a === 1 && o.x === 0 && o.y === 0) return;
4558
+ this._center = t.unproject(t.project(this._pinchStartLatLng, this._zoom).subtract(o), this._zoom);
4559
+ }
4560
+ this._moved ||= (t._moveStart(!0, !1), !0), v(this._animRequest), this._animRequest = _(i(t._move, t, this._center, this._zoom, {
4561
+ pinch: !0,
4562
+ round: !1
4563
+ }, void 0), this, !0), U(e);
4564
+ }
4565
+ },
4566
+ _onTouchEnd: function() {
4567
+ if (!this._moved || !this._zooming) {
4568
+ this._zooming = !1;
4569
+ return;
4570
+ }
4571
+ this._zooming = !1, v(this._animRequest), H(document, "touchmove", this._onTouchMove, this), H(document, "touchend touchcancel", this._onTouchEnd, this), this._map.options.zoomAnimation ? this._map._animateZoom(this._center, this._map._limitZoom(this._zoom), !0, this._map.options.zoomSnap) : this._map._resetView(this._center, this._map._limitZoom(this._zoom));
4572
+ }
4573
+ });
4574
+ W.addInitHook("addHandler", "touchZoom", ii), W.BoxZoom = Zr, W.DoubleClickZoom = Qr, W.Drag = $r, W.Keyboard = ei, W.ScrollWheelZoom = ti, W.TapHold = ri, W.TouchZoom = ii, e.Bounds = C, e.Browser = M, e.CRS = k, e.Canvas = Hr, e.Circle = cr, e.CircleMarker = or, e.Class = y, e.Control = G, e.DivIcon = Pr, e.DivOverlay = Q, e.DomEvent = dn, e.DomUtil = Xt, e.Draggable = wn, e.Evented = ue, e.FeatureGroup = Y, e.GeoJSON = Z, e.GridLayer = Ir, e.Handler = K, e.Icon = $n, e.ImageOverlay = wr, e.LatLng = D, e.LatLngBounds = T, e.Layer = J, e.LayerGroup = Xn, e.LineUtil = Un, e.Map = W, e.Marker = rr, e.Mixin = Sn, e.Path = ar, e.Point = x, e.PolyUtil = On, e.Polygon = dr, e.Polyline = X, e.Popup = Ar, e.PosAnimation = fn, e.Projection = Kn, e.Rectangle = Yr, e.Renderer = $, e.SVG = qr, e.SVGOverlay = Or, e.TileLayer = Rr, e.Tooltip = Mr, e.Transformation = me, e.Util = ce, e.VideoOverlay = Er, e.bind = i, e.bounds = w, e.canvas = Ur, e.circle = lr, e.circleMarker = sr, e.control = mn, e.divIcon = Fr, e.extend = n, e.featureGroup = Qn, e.geoJSON = Sr, e.geoJson = Cr, e.gridLayer = Lr, e.icon = er, e.imageOverlay = Tr, e.latLng = O, e.latLngBounds = E, e.layerGroup = Zn, e.map = pn, e.marker = ir, e.point = S, e.polygon = fr, e.polyline = ur, e.popup = jr, e.rectangle = Xr, e.setOptions = p, e.stamp = o, e.svg = Jr, e.svgOverlay = kr, e.tileLayer = zr, e.tooltip = Nr, e.transformation = he, e.version = t, e.videoOverlay = Dr;
4575
+ var ai = window.L;
4576
+ e.noConflict = function() {
4577
+ return window.L = ai, this;
4578
+ }, window.L = e;
4579
+ }));
4580
+ }));
4581
+ //#endregion
4582
+ export default t();
4583
+ export { t as require_leaflet_src };
4584
+
4585
+ //# sourceMappingURL=leaflet-src.js.map