@revolugo/elements 7.11.2-rc.0 → 7.12.0-alpha.0

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