(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["chunk-b7a16696"], { "16ac": function (t, e, i) { "use strict"; i.r(e); var n = function () { var t = this, e = t.$createElement, i = t._self._c || e; return i("div", [i("div", { attrs: { id: "map" } }, [i("a-drawer", { attrs: { title: "图元属性", placement: "right", width: 600, closable: !1, visible: t.drawerVisible, "get-container": !1, "wrap-style": { position: "absolute" } }, on: { close: t.onCloseDrawer } }, [i("p", [t._v(t._s(t.geosjonData))])])], 1)]) }, o = [], r = (i("d81d"), i("a434"), i("e11e")), a = i.n(r), s = function (t, e) { var i, n = function () { var n = [], o = arguments.length; while (o--) n[o] = arguments[o]; var r = this; i && clearTimeout(i), i = setTimeout((function () { t.apply(r, n), i = null }), e) }; return n.cancel = function () { i && clearTimeout(i) }, n }, h = function (t) { return t && "function" === typeof t.charAt ? t.charAt(0).toUpperCase() + t.slice(1) : t }, l = function (t, e, i, n) { var o = function (n) { var o = "set" + h(n), a = i[n].type === Object || i[n].type === Array || Array.isArray(i[n].type); i[n].custom && t[o] ? t.$watch(n, (function (e, i) { t[o](e, i) }), { deep: a }) : "setOptions" === o ? t.$watch(n, (function (t, i) { Object(r["setOptions"])(e, t) }), { deep: a }) : e[o] && t.$watch(n, (function (t, i) { e[o](t) }), { deep: a }) }; for (var a in i) o(a) }, u = function (t) { var e = {}; for (var i in t) { var n = t[i]; null !== n && void 0 !== n && (e[i] = n) } return e }, c = function (t, e) { var i = e.options && e.options.constructor === Object ? e.options : {}; t = t && t.constructor === Object ? t : {}; var n = u(i); t = u(t); var o = e.$options.props; for (var r in t) { var a = o[r] ? o[r].default && "function" === typeof o[r].default ? o[r].default.call() : o[r].default : Symbol("unique"), s = !1; s = Array.isArray(a) ? JSON.stringify(a) === JSON.stringify(t[r]) : a === t[r], n[r] && !s ? (console.warn(r + " props is overriding the value passed in the options props"), n[r] = t[r]) : n[r] || (n[r] = t[r]) } return n }, p = { props: { options: { type: Object, default: function () { return {} } } } }, d = { name: "LMap", mixins: [p], props: { center: { type: [Object, Array], custom: !0, default: function () { return [0, 0] } }, bounds: { type: [Array, Object], custom: !0, default: null }, maxBounds: { type: [Array, Object], default: null }, zoom: { type: Number, custom: !0, default: 0 }, minZoom: { type: Number, default: null }, maxZoom: { type: Number, default: null }, paddingBottomRight: { type: Array, custom: !0, default: null }, paddingTopLeft: { type: Array, custom: !0, default: null }, padding: { type: Array, custom: !0, default: null }, worldCopyJump: { type: Boolean, default: !1 }, crs: { type: Object, custom: !0, default: function () { return r["CRS"].EPSG3857 } }, maxBoundsViscosity: { type: Number, default: null }, inertia: { type: Boolean, default: null }, inertiaDeceleration: { type: Number, default: null }, inertiaMaxSpeed: { type: Number, default: null }, easeLinearity: { type: Number, default: null }, zoomAnimation: { type: Boolean, default: null }, zoomAnimationThreshold: { type: Number, default: null }, fadeAnimation: { type: Boolean, default: null }, markerZoomAnimation: { type: Boolean, default: null }, noBlockingAnimations: { type: Boolean, default: !1 } }, data: function () { return { ready: !1, lastSetCenter: this.center ? Object(r["latLng"])(this.center) : null, lastSetBounds: this.bounds ? Object(r["latLngBounds"])(this.bounds) : null, layerControl: void 0, layersToAdd: [], layersInControl: [] } }, computed: { fitBoundsOptions: function () { var t = { animate: !this.noBlockingAnimations && null }; return this.padding ? t.padding = this.padding : (this.paddingBottomRight && (t.paddingBottomRight = this.paddingBottomRight), this.paddingTopLeft && (t.paddingTopLeft = this.paddingTopLeft)), t } }, beforeDestroy: function () { this.debouncedMoveEndHandler && this.debouncedMoveEndHandler.cancel(), this.mapObject && this.mapObject.remove() }, mounted: function () { var t = this, e = c({ minZoom: this.minZoom, maxZoom: this.maxZoom, maxBounds: this.maxBounds, maxBoundsViscosity: this.maxBoundsViscosity, worldCopyJump: this.worldCopyJump, crs: this.crs, center: this.center, zoom: this.zoom, inertia: this.inertia, inertiaDeceleration: this.inertiaDeceleration, inertiaMaxSpeed: this.inertiaMaxSpeed, easeLinearity: this.easeLinearity, zoomAnimation: this.zoomAnimation, zoomAnimationThreshold: this.zoomAnimationThreshold, fadeAnimation: this.fadeAnimation, markerZoomAnimation: this.markerZoomAnimation }, this); this.mapObject = Object(r["map"])(this.$el, e), this.bounds && this.fitBounds(this.bounds), this.debouncedMoveEndHandler = s(this.moveEndHandler, 100), this.mapObject.on("moveend", this.debouncedMoveEndHandler), this.mapObject.on("overlayadd", this.overlayAddHandler), this.mapObject.on("overlayremove", this.overlayRemoveHandler), r["DomEvent"].on(this.mapObject, this.$listeners), l(this, this.mapObject, this.$options.props), this.ready = !0, this.$emit("leaflet:load"), this.$nextTick((function () { t.$emit("ready", t.mapObject) })) }, methods: { registerLayerControl: function (t) { var e = this; this.layerControl = t, this.mapObject.addControl(t.mapObject), this.layersToAdd.forEach((function (t) { e.layerControl.addLayer(t) })), this.layersToAdd = [] }, addLayer: function (t, e) { if (void 0 !== t.layerType) if (void 0 === this.layerControl) this.layersToAdd.push(t); else { var i = this.layersInControl.find((function (e) { return e.mapObject._leaflet_id === t.mapObject._leaflet_id })); i || (this.layerControl.addLayer(t), this.layersInControl.push(t)) } e || !1 === t.visible || this.mapObject.addLayer(t.mapObject) }, hideLayer: function (t) { this.mapObject.removeLayer(t.mapObject) }, removeLayer: function (t, e) { void 0 !== t.layerType && (void 0 === this.layerControl ? this.layersToAdd = this.layersToAdd.filter((function (e) { return e.name !== t.name })) : (this.layerControl.removeLayer(t), this.layersInControl = this.layersInControl.filter((function (e) { return e.mapObject._leaflet_id !== t.mapObject._leaflet_id })))), e || this.mapObject.removeLayer(t.mapObject) }, setZoom: function (t, e) { void 0 !== t && null !== t && (this.mapObject.setZoom(t, { animate: !this.noBlockingAnimations && null }), this.cacheMapView()) }, setCenter: function (t, e) { if (null != t) { var i = Object(r["latLng"])(t), n = this.lastSetCenter || this.mapObject.getCenter(); n.lat === i.lat && n.lng === i.lng || (this.lastSetCenter = i, this.mapObject.panTo(i, { animate: !this.noBlockingAnimations && null }), this.cacheMapView(void 0, i)) } }, setBounds: function (t, e) { if (t) { var i = Object(r["latLngBounds"])(t); if (i.isValid()) { var n = this.lastSetBounds || this.mapObject.getBounds(), o = !n.equals(i, 0); o && (this.fitBounds(i), this.cacheMapView(i)) } } }, setPaddingBottomRight: function (t, e) { this.paddingBottomRight = t }, setPaddingTopLeft: function (t, e) { this.paddingTopLeft = t }, setPadding: function (t, e) { this.padding = t }, setCrs: function (t, e) { var i = this.mapObject, n = i.getBounds(); i.options.crs = t, this.fitBounds(n, { animate: !1 }) }, fitBounds: function (t, e) { this.mapObject.fitBounds(t, Object.assign({}, this.fitBoundsOptions, e)) }, moveEndHandler: function () { this.$emit("update:zoom", this.mapObject.getZoom()); var t = this.mapObject.getCenter(); this.$emit("update:center", t); var e = this.mapObject.getBounds(); this.$emit("update:bounds", e) }, overlayAddHandler: function (t) { var e = this.layersInControl.find((function (e) { return e.name === t.name })); e && e.updateVisibleProp(!0) }, overlayRemoveHandler: function (t) { var e = this.layersInControl.find((function (e) { return e.name === t.name })); e && e.updateVisibleProp(!1) }, cacheMapView: function (t, e) { this.lastSetBounds = t || this.mapObject.getBounds(), this.lastSetCenter = e || this.lastSetBounds.getCenter() } } }; function f(t, e, i, n, o, r, a, s, h, l) { "boolean" !== typeof a && (h = s, s = a, a = !1); var u, c = "function" === typeof i ? i.options : i; if (t && t.render && (c.render = t.render, c.staticRenderFns = t.staticRenderFns, c._compiled = !0, o && (c.functional = !0)), n && (c._scopeId = n), r ? (u = function (t) { t = t || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, t || "undefined" === typeof __VUE_SSR_CONTEXT__ || (t = __VUE_SSR_CONTEXT__), e && e.call(this, h(t)), t && t._registeredComponents && t._registeredComponents.add(r) }, c._ssrRegister = u) : e && (u = a ? function (t) { e.call(this, l(t, this.$root.$options.shadowRoot)) } : function (t) { e.call(this, s(t)) }), u) if (c.functional) { var p = c.render; c.render = function (t, e) { return u.call(e), p(t, e) } } else { var d = c.beforeCreate; c.beforeCreate = d ? [].concat(d, u) : [u] } return i } var _, m = "undefined" !== typeof navigator && /msie [6-9]\\b/.test(navigator.userAgent.toLowerCase()); function g(t) { return function (t, e) { return y(t, e) } } var v = {}; function y(t, e) { var i = m ? e.media || "default" : t, n = v[i] || (v[i] = { ids: new Set, styles: [] }); if (!n.ids.has(t)) { n.ids.add(t); var o = e.source; if (e.map && (o += "\n/*# sourceURL=" + e.map.sources[0] + " */", o += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(e.map)))) + " */"), n.element || (n.element = document.createElement("style"), n.element.type = "text/css", e.media && n.element.setAttribute("media", e.media), void 0 === _ && (_ = document.head || document.getElementsByTagName("head")[0]), _.appendChild(n.element)), "styleSheet" in n.element) n.styles.push(o), n.element.styleSheet.cssText = n.styles.filter(Boolean).join("\n"); else { var r = n.ids.size - 1, a = document.createTextNode(o), s = n.element.childNodes; s[r] && n.element.removeChild(s[r]), s.length ? n.element.insertBefore(a, s[r]) : n.element.appendChild(a) } } } var b = d, L = function () { var t = this, e = t.$createElement, i = t._self._c || e; return i("div", { staticClass: "vue2leaflet-map" }, [t.ready ? t._t("default") : t._e()], 2) }, w = [], x = function (t) { t && t("data-v-09f270aa_0", { source: ".vue2leaflet-map{height:100%;width:100%}", map: void 0, media: void 0 }) }, k = void 0, M = void 0, P = !1, C = f({ render: L, staticRenderFns: w }, x, b, k, P, M, !1, g, void 0, void 0), T = C, S = function (t) { return t && "function" === typeof t.charAt ? t.charAt(0).toUpperCase() + t.slice(1) : t }, O = function (t, e, i, n) { var o = function (n) { var o = "set" + S(n), a = i[n].type === Object || i[n].type === Array || Array.isArray(i[n].type); i[n].custom && t[o] ? t.$watch(n, (function (e, i) { t[o](e, i) }), { deep: a }) : "setOptions" === o ? t.$watch(n, (function (t, i) { Object(r["setOptions"])(e, t) }), { deep: a }) : e[o] && t.$watch(n, (function (t, i) { e[o](t) }), { deep: a }) }; for (var a in i) o(a) }, E = function (t) { var e = {}; for (var i in t) { var n = t[i]; null !== n && void 0 !== n && (e[i] = n) } return e }, B = function (t, e) { var i = e.options && e.options.constructor === Object ? e.options : {}; t = t && t.constructor === Object ? t : {}; var n = E(i); t = E(t); var o = e.$options.props; for (var r in t) { var a = o[r] ? o[r].default && "function" === typeof o[r].default ? o[r].default.call() : o[r].default : Symbol("unique"), s = !1; s = Array.isArray(a) ? JSON.stringify(a) === JSON.stringify(t[r]) : a === t[r], n[r] && !s ? (console.warn(r + " props is overriding the value passed in the options props"), n[r] = t[r]) : n[r] || (n[r] = t[r]) } return n }, z = function (t) { var e = !1; while (t && !e) void 0 === t.mapObject ? t = t.$parent : e = !0; return t }, j = { props: { pane: { type: String, default: "overlayPane" }, attribution: { type: String, default: null, custom: !0 }, name: { type: String, custom: !0, default: void 0 }, layerType: { type: String, custom: !0, default: void 0 }, visible: { type: Boolean, custom: !0, default: !0 } }, mounted: function () { this.layerOptions = { attribution: this.attribution, pane: this.pane } }, beforeDestroy: function () { this.unbindPopup(), this.unbindTooltip(), this.parentContainer.removeLayer(this) }, methods: { setAttribution: function (t, e) { var i = this.$parent.mapObject.attributionControl; i.removeAttribution(e).addAttribution(t) }, setName: function () { this.parentContainer.removeLayer(this), this.visible && this.parentContainer.addLayer(this) }, setLayerType: function () { this.parentContainer.removeLayer(this), this.visible && this.parentContainer.addLayer(this) }, setVisible: function (t) { this.mapObject && (t ? this.parentContainer.addLayer(this) : this.parentContainer.hideLayer ? this.parentContainer.hideLayer(this) : this.parentContainer.removeLayer(this)) }, unbindTooltip: function () { var t = this.mapObject ? this.mapObject.getTooltip() : null; t && t.unbindTooltip() }, unbindPopup: function () { var t = this.mapObject ? this.mapObject.getPopup() : null; t && t.unbindPopup() }, updateVisibleProp: function (t) { this.$emit("update:visible", t) } } }, I = { mixins: [j], props: { pane: { type: String, default: "tilePane" }, opacity: { type: Number, custom: !1, default: 1 }, zIndex: { type: Number, default: 1 }, tileSize: { type: Number, default: 256 }, noWrap: { type: Boolean, default: !1 } }, mounted: function () { this.gridLayerOptions = Object.assign({}, this.layerOptions, { pane: this.pane, opacity: this.opacity, zIndex: this.zIndex, tileSize: this.tileSize, noWrap: this.noWrap }) } }, A = { mixins: [I], props: { tms: { type: Boolean, default: !1 }, subdomains: { type: [String, Array], default: "abc", validator: function (t) { return "string" === typeof t || !!Array.isArray(t) && t.every((function (t) { return "string" === typeof t })) } }, detectRetina: { type: Boolean, default: !1 } }, mounted: function () { this.tileLayerOptions = Object.assign({}, this.gridLayerOptions, { tms: this.tms, subdomains: this.subdomains, detectRetina: this.detectRetina }) }, render: function () { return null } }, R = { props: { options: { type: Object, default: function () { return {} } } } }, D = { name: "LTileLayer", mixins: [A, R], props: { url: { type: String, default: null }, tileLayerClass: { type: Function, default: r["tileLayer"] } }, mounted: function () { var t = this, e = B(this.tileLayerOptions, this); this.mapObject = this.tileLayerClass(this.url, e), r["DomEvent"].on(this.mapObject, this.$listeners), O(this, this.mapObject, this.$options.props), this.parentContainer = z(this.$parent), this.parentContainer.addLayer(this, !this.visible), this.$nextTick((function () { t.$emit("ready", t.mapObject) })) } }; function Z(t, e, i, n, o, r, a, s, h, l) { "boolean" !== typeof a && (h = s, s = a, a = !1); var u, c = "function" === typeof i ? i.options : i; if (t && t.render && (c.render = t.render, c.staticRenderFns = t.staticRenderFns, c._compiled = !0, o && (c.functional = !0)), n && (c._scopeId = n), r ? (u = function (t) { t = t || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, t || "undefined" === typeof __VUE_SSR_CONTEXT__ || (t = __VUE_SSR_CONTEXT__), e && e.call(this, h(t)), t && t._registeredComponents && t._registeredComponents.add(r) }, c._ssrRegister = u) : e && (u = a ? function (t) { e.call(this, l(t, this.$root.$options.shadowRoot)) } : function (t) { e.call(this, s(t)) }), u) if (c.functional) { var p = c.render; c.render = function (t, e) { return u.call(e), p(t, e) } } else { var d = c.beforeCreate; c.beforeCreate = d ? [].concat(d, u) : [u] } return i } var N = D, G = function () { var t = this, e = t.$createElement, i = t._self._c || e; return i("div") }, F = [], H = void 0, V = void 0, U = void 0, q = !1, W = Z({ render: G, staticRenderFns: F }, H, N, V, q, U, !1, void 0, void 0, void 0), $ = W, K = function (t, e) { var i, n = function () { var n = [], o = arguments.length; while (o--) n[o] = arguments[o]; var r = this; i && clearTimeout(i), i = setTimeout((function () { t.apply(r, n), i = null }), e) }; return n.cancel = function () { i && clearTimeout(i) }, n }, J = function (t) { return t && "function" === typeof t.charAt ? t.charAt(0).toUpperCase() + t.slice(1) : t }, Y = function (t, e, i, n) { var o = function (n) { var o = "set" + J(n), a = i[n].type === Object || i[n].type === Array || Array.isArray(i[n].type); i[n].custom && t[o] ? t.$watch(n, (function (e, i) { t[o](e, i) }), { deep: a }) : "setOptions" === o ? t.$watch(n, (function (t, i) { Object(r["setOptions"])(e, t) }), { deep: a }) : e[o] && t.$watch(n, (function (t, i) { e[o](t) }), { deep: a }) }; for (var a in i) o(a) }, X = function (t) { var e = {}; for (var i in t) { var n = t[i]; null !== n && void 0 !== n && (e[i] = n) } return e }, Q = function (t, e) { var i = e.options && e.options.constructor === Object ? e.options : {}; t = t && t.constructor === Object ? t : {}; var n = X(i); t = X(t); var o = e.$options.props; for (var r in t) { var a = o[r] ? o[r].default && "function" === typeof o[r].default ? o[r].default.call() : o[r].default : Symbol("unique"), s = !1; s = Array.isArray(a) ? JSON.stringify(a) === JSON.stringify(t[r]) : a === t[r], n[r] && !s ? (console.warn(r + " props is overriding the value passed in the options props"), n[r] = t[r]) : n[r] || (n[r] = t[r]) } return n }, tt = function (t) { var e = !1; while (t && !e) void 0 === t.mapObject ? t = t.$parent : e = !0; return t }, et = { props: { pane: { type: String, default: "overlayPane" }, attribution: { type: String, default: null, custom: !0 }, name: { type: String, custom: !0, default: void 0 }, layerType: { type: String, custom: !0, default: void 0 }, visible: { type: Boolean, custom: !0, default: !0 } }, mounted: function () { this.layerOptions = { attribution: this.attribution, pane: this.pane } }, beforeDestroy: function () { this.unbindPopup(), this.unbindTooltip(), this.parentContainer.removeLayer(this) }, methods: { setAttribution: function (t, e) { var i = this.$parent.mapObject.attributionControl; i.removeAttribution(e).addAttribution(t) }, setName: function () { this.parentContainer.removeLayer(this), this.visible && this.parentContainer.addLayer(this) }, setLayerType: function () { this.parentContainer.removeLayer(this), this.visible && this.parentContainer.addLayer(this) }, setVisible: function (t) { this.mapObject && (t ? this.parentContainer.addLayer(this) : this.parentContainer.hideLayer ? this.parentContainer.hideLayer(this) : this.parentContainer.removeLayer(this)) }, unbindTooltip: function () { var t = this.mapObject ? this.mapObject.getTooltip() : null; t && t.unbindTooltip() }, unbindPopup: function () { var t = this.mapObject ? this.mapObject.getPopup() : null; t && t.unbindPopup() }, updateVisibleProp: function (t) { this.$emit("update:visible", t) } } }, it = { props: { options: { type: Object, default: function () { return {} } } } }, nt = { name: "LMarker", mixins: [et, it], props: { pane: { type: String, default: "markerPane" }, draggable: { type: Boolean, custom: !0, default: !1 }, latLng: { type: [Object, Array], custom: !0, default: null }, icon: { type: [Object], custom: !1, default: function () { return new r["Icon"].Default } }, opacity: { type: Number, custom: !1, default: 1 }, zIndexOffset: { type: Number, custom: !1, default: null } }, data: function () { return { ready: !1 } }, beforeDestroy: function () { this.debouncedLatLngSync && this.debouncedLatLngSync.cancel() }, mounted: function () { var t = this, e = Q(Object.assign({}, this.layerOptions, { icon: this.icon, zIndexOffset: this.zIndexOffset, draggable: this.draggable, opacity: this.opacity }), this); this.mapObject = Object(r["marker"])(this.latLng, e), r["DomEvent"].on(this.mapObject, this.$listeners), this.debouncedLatLngSync = K(this.latLngSync, 100), this.mapObject.on("move", this.debouncedLatLngSync), Y(this, this.mapObject, this.$options.props), this.parentContainer = tt(this.$parent), this.parentContainer.addLayer(this, !this.visible), this.ready = !0, this.$nextTick((function () { t.$emit("ready", t.mapObject) })) }, methods: { setDraggable: function (t, e) { this.mapObject.dragging && (t ? this.mapObject.dragging.enable() : this.mapObject.dragging.disable()) }, setLatLng: function (t) { if (null != t && this.mapObject) { var e = this.mapObject.getLatLng(), i = Object(r["latLng"])(t); i.lat === e.lat && i.lng === e.lng || this.mapObject.setLatLng(i) } }, latLngSync: function (t) { this.$emit("update:latLng", t.latlng), this.$emit("update:lat-lng", t.latlng) } }, render: function (t) { return this.ready && this.$slots.default ? t("div", { style: { display: "none" } }, this.$slots.default) : null } }; function ot(t, e, i, n, o, r, a, s, h, l) { "boolean" !== typeof a && (h = s, s = a, a = !1); var u, c = "function" === typeof i ? i.options : i; if (t && t.render && (c.render = t.render, c.staticRenderFns = t.staticRenderFns, c._compiled = !0, o && (c.functional = !0)), n && (c._scopeId = n), r ? (u = function (t) { t = t || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, t || "undefined" === typeof __VUE_SSR_CONTEXT__ || (t = __VUE_SSR_CONTEXT__), e && e.call(this, h(t)), t && t._registeredComponents && t._registeredComponents.add(r) }, c._ssrRegister = u) : e && (u = a ? function (t) { e.call(this, l(t, this.$root.$options.shadowRoot)) } : function (t) { e.call(this, s(t)) }), u) if (c.functional) { var p = c.render; c.render = function (t, e) { return u.call(e), p(t, e) } } else { var d = c.beforeCreate; c.beforeCreate = d ? [].concat(d, u) : [u] } return i } var rt = nt, at = void 0, st = void 0, ht = void 0, lt = void 0, ut = ot({}, at, rt, st, lt, ht, !1, void 0, void 0, void 0), ct = ut, pt = function (t) { return t && "function" === typeof t.charAt ? t.charAt(0).toUpperCase() + t.slice(1) : t }, dt = function (t, e, i, n) { var o = function (n) { var o = "set" + pt(n), a = i[n].type === Object || i[n].type === Array || Array.isArray(i[n].type); i[n].custom && t[o] ? t.$watch(n, (function (e, i) { t[o](e, i) }), { deep: a }) : "setOptions" === o ? t.$watch(n, (function (t, i) { Object(r["setOptions"])(e, t) }), { deep: a }) : e[o] && t.$watch(n, (function (t, i) { e[o](t) }), { deep: a }) }; for (var a in i) o(a) }, ft = function (t) { var e = {}; for (var i in t) { var n = t[i]; null !== n && void 0 !== n && (e[i] = n) } return e }, _t = function (t, e) { var i = e.options && e.options.constructor === Object ? e.options : {}; t = t && t.constructor === Object ? t : {}; var n = ft(i); t = ft(t); var o = e.$options.props; for (var r in t) { var a = o[r] ? o[r].default && "function" === typeof o[r].default ? o[r].default.call() : o[r].default : Symbol("unique"), s = !1; s = Array.isArray(a) ? JSON.stringify(a) === JSON.stringify(t[r]) : a === t[r], n[r] && !s ? (console.warn(r + " props is overriding the value passed in the options props"), n[r] = t[r]) : n[r] || (n[r] = t[r]) } return n }, mt = { props: { position: { type: String, default: "topright" } }, mounted: function () { this.controlOptions = { position: this.position } }, beforeDestroy: function () { this.mapObject && this.mapObject.remove() } }, gt = { props: { options: { type: Object, default: function () { return {} } } } }, vt = { name: "LControlLayers", mixins: [mt, gt], props: { collapsed: { type: Boolean, default: !0 }, autoZIndex: { type: Boolean, default: !0 }, hideSingleBase: { type: Boolean, default: !1 }, sortLayers: { type: Boolean, default: !1 }, sortFunction: { type: Function, default: void 0 } }, mounted: function () { var t = this, e = _t(Object.assign({}, this.controlOptions, { collapsed: this.collapsed, autoZIndex: this.autoZIndex, hideSingleBase: this.hideSingleBase, sortLayers: this.sortLayers, sortFunction: this.sortFunction }), this); this.mapObject = r["control"].layers(null, null, e), dt(this, this.mapObject, this.$options.props), this.$parent.registerLayerControl(this), this.$nextTick((function () { t.$emit("ready", t.mapObject) })) }, methods: { addLayer: function (t) { "base" === t.layerType ? this.mapObject.addBaseLayer(t.mapObject, t.name) : "overlay" === t.layerType && this.mapObject.addOverlay(t.mapObject, t.name) }, removeLayer: function (t) { this.mapObject.removeLayer(t.mapObject) } }, render: function () { return null } }; function yt(t, e, i, n, o, r, a, s, h, l) { "boolean" !== typeof a && (h = s, s = a, a = !1); var u, c = "function" === typeof i ? i.options : i; if (t && t.render && (c.render = t.render, c.staticRenderFns = t.staticRenderFns, c._compiled = !0, o && (c.functional = !0)), n && (c._scopeId = n), r ? (u = function (t) { t = t || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, t || "undefined" === typeof __VUE_SSR_CONTEXT__ || (t = __VUE_SSR_CONTEXT__), e && e.call(this, h(t)), t && t._registeredComponents && t._registeredComponents.add(r) }, c._ssrRegister = u) : e && (u = a ? function (t) { e.call(this, l(t, this.$root.$options.shadowRoot)) } : function (t) { e.call(this, s(t)) }), u) if (c.functional) { var p = c.render; c.render = function (t, e) { return u.call(e), p(t, e) } } else { var d = c.beforeCreate; c.beforeCreate = d ? [].concat(d, u) : [u] } return i } var bt = vt, Lt = void 0, wt = void 0, xt = void 0, kt = void 0, Mt = yt({}, Lt, bt, wt, kt, xt, !1, void 0, void 0, void 0), Pt = Mt, Ct = (i("6cc5"), i("5092"), i("9a51"), { name: "Map", components: { LMap: T, LTileLayer: $, LMarker: ct, LControlLayers: Pt }, data: function () { return { map: "", drawerVisible: !1, geosjonData: "" } }, mounted: function () { this.initMap(), this.initMapPm(), this.getlatLngs() }, methods: { initMap: function () { this.map = a.a.map("map", { center: [39.064576, 117.06969], zoom: 15, zoomControl: !0, doubleClickZoom: !0, attributionControl: !1 }); var t = { "高德/卫星": a.a.layerGroup([a.a.tileLayer("https://webst0{s}.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}", { maxZoom: 20, maxNativeZoom: 18, minZoom: 3, attribution: "高德地图 AutoNavi.com", subdomains: "1234" }), a.a.tileLayer("https://webst0{s}.is.autonavi.com/appmaptile?style=8&x={x}&y={y}&z={z}", { maxZoom: 20, maxNativeZoom: 18, minZoom: 3, attribution: "高德地图 AutoNavi.com", subdomains: "1234", opacity: .5 })]).addTo(this.map), "高德/街道": a.a.tileLayer("https://webrd0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}", { maxZoom: 20, maxNativeZoom: 18, minZoom: 3, attribution: "高德地图 AutoNavi.com", subdomains: "1234" }), "智图/街道": a.a.tileLayer("https://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetPurplishBlue/MapServer/tile/{z}/{y}/{x}", { maxZoom: 20, maxNativeZoom: 16, minZoom: 3, attribution: "智图 GeoQ.cn" }) }; a.a.control.layers(t, {}, { position: "topright", collapsed: !0 }).addTo(this.map) }, initMapPm: function () { this.map.pm.addControls({ position: "topleft", drawPolygon: !0, drawMarker: !0, drawCircleMarker: !0, drawPolyline: !0, drawRectangle: !0, drawCircle: !0, editMode: !0, dragMode: !0, cutPolygon: !0, removalMode: !0 }), this.map.pm.setPathOptions({ color: "orange", fillColor: "green", fillOpacity: .4 }), this.map.pm.setLang("zh") }, getlatLngs: function () { var t = this; this.map.on("pm:drawstart", (function (t) { })), this.map.on("pm:drawend", (function (t) { })), this.map.on("pm:create", (function (e) { t.GetGeoJson() })) }, GetGeoJson: function () { var t = []; this.map.eachLayer((function (e) { "undefined" !== e.pm && null != e.pm && "" !== e.pm && !1 === e.pm._enabled && !0 === e.pm.options.draggable && t.push(e) })); for (var e = a.a.layerGroup(t).toGeoJSON(), i = 0; i < e.features.length; i++)for (var n = JSON.stringify(e.features[i]), o = i + 1; o < e.features.length; o++) { var r = JSON.stringify(e.features[o]); n === r && e.features.splice(i, 1) } return this.drawerVisible = !0, this.geosjonData = e, e }, onCloseDrawer: function () { this.drawerVisible = !1 } } }), Tt = Ct, St = (i("3d2d"), i("2877")), Ot = Object(St["a"])(Tt, n, o, !1, null, null, null); e["default"] = Ot.exports }, "3d2d": function (t, e, i) { "use strict"; i("a3cb") }, 5092: function (t, e) { !function (t) { var e = {}; function i(n) { if (e[n]) return e[n].exports; var o = e[n] = { i: n, l: !1, exports: {} }; return t[n].call(o.exports, o, o.exports, i), o.l = !0, o.exports } i.m = t, i.c = e, i.d = function (t, e, n) { i.o(t, e) || Object.defineProperty(t, e, { configurable: !1, enumerable: !0, get: n }) }, i.n = function (t) { var e = t && t.__esModule ? function () { return t["default"] } : function () { return t }; return i.d(e, "a", e), e }, i.o = function (t, e) { return Object.prototype.hasOwnProperty.call(t, e) }, i.p = "", i(i.s = 46) }([function (t, e, i) { "use strict"; e.a = function (t) { var e = L.PM.activeLang; return a()(s.a, e) || (e = "en"), o()(s.a[e], t) }, e.b = function (t) { return !function t(e) { return e.filter((function (t) { return ![null, "", void 0].includes(t) })).reduce((function (e, i) { return e.concat(Array.isArray(i) ? t(i) : i) }), []) }(t).length }; var n = i(37), o = i.n(n), r = i(138), a = i.n(r), s = i(36) }, function (t, e, i) { "use strict"; var n = i(40), o = L.Class.extend({ includes: [n.a], options: { snappable: !0, snapDistance: 20, tooltips: !0, cursorMarker: !0, finishOnDoubleClick: !1, finishOn: null, allowSelfIntersection: !0, templineStyle: {}, hintlineStyle: { color: "#3388ff", dashArray: "5,5" }, markerStyle: { draggable: !0 } }, initialize: function (t) { var e = this; this._map = t, this.shapes = ["Marker", "CircleMarker", "Line", "Polygon", "Rectangle", "Circle", "Cut"], this.shapes.forEach((function (t) { e[t] = new L.PM.Draw[t](e._map) })) }, setPathOptions: function (t) { this.options.pathOptions = t }, getShapes: function () { return this.shapes }, enable: function (t, e) { if (!t) throw new Error("Error: Please pass a shape as a parameter. Possible shapes are: ".concat(this.getShapes().join(","))); this.disable(), this[t].enable(e) }, disable: function () { var t = this; this.shapes.forEach((function (e) { t[e].disable() })) }, addControls: function () { var t = this; this.shapes.forEach((function (e) { t[e].addButton() })) } }); e.a = o }, function (t, e, i) { "use strict"; var n = i(40), o = i(151), r = L.Class.extend({ includes: [o.a, n.a], options: { snappable: !0, snapDistance: 20, allowSelfIntersection: !0, draggable: !0 }, isPolygon: function () { return this._layer instanceof L.Polygon } }); e.a = r }, function (t, e) { t.exports = function (t) { var e = typeof t; return null != t && ("object" == e || "function" == e) } }, function (t, e, i) { var n = i(25), o = "object" == typeof self && self && self.Object === Object && self, r = n || o || Function("return this")(); t.exports = r }, function (t, e) { t.exports = function (t) { return null != t && "object" == typeof t } }, function (t, e) { var i = Array.isArray; t.exports = i }, function (t, e, i) { var n = i(16), o = i(66), r = i(67), a = "[object Null]", s = "[object Undefined]", h = n ? n.toStringTag : void 0; t.exports = function (t) { return null == t ? void 0 === t ? s : a : h && h in Object(t) ? o(t) : r(t) } }, function (t, e, i) { "use strict"; function n(t, e, i) { void 0 === i && (i = {}); var n = { type: "Feature" }; return (0 === i.id || i.id) && (n.id = i.id), i.bbox && (n.bbox = i.bbox), n.properties = e || {}, n.geometry = t, n } function o(t, e, i) { return void 0 === i && (i = {}), n({ type: "Point", coordinates: t }, e, i) } function r(t, e, i) { void 0 === i && (i = {}); for (var o = 0, r = t; o < r.length; o++) { var a = r[o]; if (a.length < 4) throw new Error("Each LinearRing of a Polygon must have 4 or more Positions."); for (var s = 0; s < a[a.length - 1].length; s++)if (a[a.length - 1][s] !== a[0][s]) throw new Error("First and last Position are not equivalent.") } return n({ type: "Polygon", coordinates: t }, e, i) } function a(t, e, i) { if (void 0 === i && (i = {}), t.length < 2) throw new Error("coordinates must be an array of two or more positions"); return n({ type: "LineString", coordinates: t }, e, i) } function s(t, e) { void 0 === e && (e = {}); var i = { type: "FeatureCollection" }; return e.id && (i.id = e.id), e.bbox && (i.bbox = e.bbox), i.features = t, i } function h(t, e, i) { return void 0 === i && (i = {}), n({ type: "MultiLineString", coordinates: t }, e, i) } function l(t, e, i) { return void 0 === i && (i = {}), n({ type: "MultiPoint", coordinates: t }, e, i) } function u(t, e, i) { return void 0 === i && (i = {}), n({ type: "MultiPolygon", coordinates: t }, e, i) } function c(t, i) { void 0 === i && (i = "kilometers"); var n = e.factors[i]; if (!n) throw new Error(i + " units is invalid"); return t * n } function p(t, i) { void 0 === i && (i = "kilometers"); var n = e.factors[i]; if (!n) throw new Error(i + " units is invalid"); return t / n } function d(t) { return t % (2 * Math.PI) * 180 / Math.PI } function f(t) { return !isNaN(t) && null !== t && !Array.isArray(t) && !/^\s*$/.test(t) } Object.defineProperty(e, "__esModule", { value: !0 }), e.earthRadius = 6371008.8, e.factors = { centimeters: 100 * e.earthRadius, centimetres: 100 * e.earthRadius, degrees: e.earthRadius / 111325, feet: 3.28084 * e.earthRadius, inches: 39.37 * e.earthRadius, kilometers: e.earthRadius / 1e3, kilometres: e.earthRadius / 1e3, meters: e.earthRadius, metres: e.earthRadius, miles: e.earthRadius / 1609.344, millimeters: 1e3 * e.earthRadius, millimetres: 1e3 * e.earthRadius, nauticalmiles: e.earthRadius / 1852, radians: 1, yards: e.earthRadius / 1.0936 }, e.unitsFactors = { centimeters: 100, centimetres: 100, degrees: 1 / 111325, feet: 3.28084, inches: 39.37, kilometers: .001, kilometres: .001, meters: 1, metres: 1, miles: 1 / 1609.344, millimeters: 1e3, millimetres: 1e3, nauticalmiles: 1 / 1852, radians: 1 / e.earthRadius, yards: 1 / 1.0936 }, e.areaFactors = { acres: 247105e-9, centimeters: 1e4, centimetres: 1e4, feet: 10.763910417, inches: 1550.003100006, kilometers: 1e-6, kilometres: 1e-6, meters: 1, metres: 1, miles: 386e-9, millimeters: 1e6, millimetres: 1e6, yards: 1.195990046 }, e.feature = n, e.geometry = function (t, e, i) { switch (void 0 === i && (i = {}), t) { case "Point": return o(e).geometry; case "LineString": return a(e).geometry; case "Polygon": return r(e).geometry; case "MultiPoint": return l(e).geometry; case "MultiLineString": return h(e).geometry; case "MultiPolygon": return u(e).geometry; default: throw new Error(t + " is invalid") } }, e.point = o, e.points = function (t, e, i) { return void 0 === i && (i = {}), s(t.map((function (t) { return o(t, e) })), i) }, e.polygon = r, e.polygons = function (t, e, i) { return void 0 === i && (i = {}), s(t.map((function (t) { return r(t, e) })), i) }, e.lineString = a, e.lineStrings = function (t, e, i) { return void 0 === i && (i = {}), s(t.map((function (t) { return a(t, e) })), i) }, e.featureCollection = s, e.multiLineString = h, e.multiPoint = l, e.multiPolygon = u, e.geometryCollection = function (t, e, i) { return void 0 === i && (i = {}), n({ type: "GeometryCollection", geometries: t }, e, i) }, e.round = function (t, e) { if (void 0 === e && (e = 0), e && !(e >= 0)) throw new Error("precision must be a positive number"); var i = Math.pow(10, e || 0); return Math.round(t * i) / i }, e.radiansToLength = c, e.lengthToRadians = p, e.lengthToDegrees = function (t, e) { return d(p(t, e)) }, e.bearingToAzimuth = function (t) { var e = t % 360; return e < 0 && (e += 360), e }, e.radiansToDegrees = d, e.degreesToRadians = function (t) { return t % 360 * Math.PI / 180 }, e.convertLength = function (t, e, i) { if (void 0 === e && (e = "kilometers"), void 0 === i && (i = "kilometers"), !(t >= 0)) throw new Error("length must be a positive number"); return c(p(t, e), i) }, e.convertArea = function (t, i, n) { if (void 0 === i && (i = "meters"), void 0 === n && (n = "kilometers"), !(t >= 0)) throw new Error("area must be a positive number"); var o = e.areaFactors[i]; if (!o) throw new Error("invalid original units"); var r = e.areaFactors[n]; if (!r) throw new Error("invalid final units"); return t / o * r }, e.isNumber = f, e.isObject = function (t) { return !!t && t.constructor === Object }, e.validateBBox = function (t) { if (!t) throw new Error("bbox is required"); if (!Array.isArray(t)) throw new Error("bbox must be an Array"); if (4 !== t.length && 6 !== t.length) throw new Error("bbox must be an Array of 4 or 6 numbers"); t.forEach((function (t) { if (!f(t)) throw new Error("bbox must only contain numbers") })) }, e.validateId = function (t) { if (!t) throw new Error("id is required"); if (-1 === ["string", "number"].indexOf(typeof t)) throw new Error("id must be a number or a string") }, e.radians2degrees = function () { throw new Error("method has been renamed to `radiansToDegrees`") }, e.degrees2radians = function () { throw new Error("method has been renamed to `degreesToRadians`") }, e.distanceToDegrees = function () { throw new Error("method has been renamed to `lengthToDegrees`") }, e.distanceToRadians = function () { throw new Error("method has been renamed to `lengthToRadians`") }, e.radiansToDistance = function () { throw new Error("method has been renamed to `radiansToLength`") }, e.bearingToAngle = function () { throw new Error("method has been renamed to `bearingToAzimuth`") }, e.convertDistance = function () { throw new Error("method has been renamed to `convertLength`") } }, function (t, e, i) { var n = i(54), o = i(55), r = i(56), a = i(57), s = i(58); function h(t) { var e = -1, i = null == t ? 0 : t.length; for (this.clear(); ++e < i;) { var n = t[e]; this.set(n[0], n[1]) } } h.prototype.clear = n, h.prototype["delete"] = o, h.prototype.get = r, h.prototype.has = a, h.prototype.set = s, t.exports = h }, function (t, e, i) { var n = i(11); t.exports = function (t, e) { for (var i = t.length; i--;)if (n(t[i][0], e)) return i; return -1 } }, function (t, e) { t.exports = function (t, e) { return t === e || t != t && e != e } }, function (t, e, i) { var n = i(14)(Object, "create"); t.exports = n }, function (t, e, i) { var n = i(80); t.exports = function (t, e) { var i = t.__data__; return n(e) ? i["string" == typeof e ? "string" : "hash"] : i.map } }, function (t, e, i) { var n = i(64), o = i(71); t.exports = function (t, e) { var i = o(t, e); return n(i) ? i : void 0 } }, function (t, e, i) { var n = i(7), o = i(3), r = "[object AsyncFunction]", a = "[object Function]", s = "[object GeneratorFunction]", h = "[object Proxy]"; t.exports = function (t) { if (!o(t)) return !1; var e = n(t); return e == a || e == s || e == r || e == h } }, function (t, e, i) { var n = i(4).Symbol; t.exports = n }, function (t, e, i) { var n = i(28); t.exports = function (t, e, i) { "__proto__" == e && n ? n(t, e, { configurable: !0, enumerable: !0, value: i, writable: !0 }) : t[e] = i } }, function (t, e) { t.exports = function (t) { return t.webpackPolyfill || (t.deprecate = function () { }, t.paths = [], t.children || (t.children = []), Object.defineProperty(t, "loaded", { enumerable: !0, get: function () { return t.l } }), Object.defineProperty(t, "id", { enumerable: !0, get: function () { return t.i } }), t.webpackPolyfill = 1), t } }, function (t, e, i) { var n = i(95), o = i(5), r = Object.prototype, a = r.hasOwnProperty, s = r.propertyIsEnumerable, h = n(function () { return arguments }()) ? n : function (t) { return o(t) && a.call(t, "callee") && !s.call(t, "callee") }; t.exports = h }, function (t, e, i) { var n = i(15), o = i(21); t.exports = function (t) { return null != t && o(t.length) && !n(t) } }, function (t, e) { var i = 9007199254740991; t.exports = function (t) { return "number" == typeof t && t > -1 && t % 1 == 0 && t <= i } }, function (t, e) { var i = 9007199254740991, n = /^(?:0|[1-9]\d*)$/; t.exports = function (t, e) { var o = typeof t; return !!(e = null == e ? i : e) && ("number" == o || "symbol" != o && n.test(t)) && t > -1 && t % 1 == 0 && t < e } }, function (t, e, i) { var n = i(7), o = i(5), r = "[object Symbol]"; t.exports = function (t) { return "symbol" == typeof t || o(t) && n(t) == r } }, function (t, e, i) { var n = i(14)(i(4), "Map"); t.exports = n }, function (t, e, i) { (function (e) { var i = "object" == typeof e && e && e.Object === Object && e; t.exports = i }).call(e, i(65)) }, function (t, e, i) { var n = i(72), o = i(79), r = i(81), a = i(82), s = i(83); function h(t) { var e = -1, i = null == t ? 0 : t.length; for (this.clear(); ++e < i;) { var n = t[e]; this.set(n[0], n[1]) } } h.prototype.clear = n, h.prototype["delete"] = o, h.prototype.get = r, h.prototype.has = a, h.prototype.set = s, t.exports = h }, function (t, e, i) { var n = i(17), o = i(11); t.exports = function (t, e, i) { (void 0 === i || o(t[e], i)) && (void 0 !== i || e in t) || n(t, e, i) } }, function (t, e, i) { var n = i(14), o = function () { try { var t = n(Object, "defineProperty"); return t({}, "", {}), t } catch (e) { } }(); t.exports = o }, function (t, e, i) { var n = i(94)(Object.getPrototypeOf, Object); t.exports = n }, function (t, e) { var i = Object.prototype; t.exports = function (t) { var e = t && t.constructor; return t === ("function" == typeof e && e.prototype || i) } }, function (t, e, i) { (function (t) { var n = i(4), o = i(97), r = "object" == typeof e && e && !e.nodeType && e, a = r && "object" == typeof t && t && !t.nodeType && t, s = a && a.exports === r ? n.Buffer : void 0, h = (s ? s.isBuffer : void 0) || o; t.exports = h }).call(e, i(18)(t)) }, function (t, e, i) { var n = i(99), o = i(100), r = i(101), a = r && r.isTypedArray, s = a ? o(a) : n; t.exports = s }, function (t, e) { t.exports = function (t, e) { if (("constructor" !== e || "function" != typeof t[e]) && "__proto__" != e) return t[e] } }, function (t, e, i) { var n = i(105), o = i(107), r = i(20); t.exports = function (t) { return r(t) ? n(t, !0) : o(t) } }, function (t, e) { t.exports = function (t) { return t } }, function (t, e, i) { "use strict"; var n = i(118), o = i.n(n), r = i(119), a = i.n(r), s = i(120), h = i.n(s), l = i(121), u = i.n(l), c = i(122), p = i.n(c), d = i(123), f = i.n(d), _ = i(124), m = i.n(_), g = i(125), v = i.n(g), y = i(126), b = i.n(y), L = i(127), w = i.n(L); e.a = { en: o.a, de: a.a, it: h.a, ro: u.a, ru: p.a, es: f.a, nl: m.a, fr: v.a, pt_br: w.a, zh: b.a } }, function (t, e, i) { var n = i(130); t.exports = function (t, e, i) { var o = null == t ? void 0 : n(t, e); return void 0 === o ? i : o } }, function (t, e, i) { var n = i(6), o = i(131), r = i(132), a = i(135); t.exports = function (t, e) { return n(t) ? t : o(t, e) ? [t] : r(a(t)) } }, function (t, e, i) { var n = i(23), o = 1 / 0; t.exports = function (t) { if ("string" == typeof t || n(t)) return t; var e = t + ""; return "0" == e && 1 / t == -o ? "-0" : e } }, function (t, e, i) { "use strict"; var n = i(41), o = { _initSnappableMarkers: function () { this.options.snapDistance = this.options.snapDistance || 30, this._assignEvents(this._markers), this._layer.off("pm:dragstart", this._unsnap, this), this._layer.on("pm:dragstart", this._unsnap, this) }, _assignEvents: function (t) { var e = this; t.forEach((function (t) { Array.isArray(t) ? e._assignEvents(t) : (t.off("drag", e._handleSnapping, e), t.on("drag", e._handleSnapping, e), t.off("dragend", e._cleanupSnapping, e), t.on("dragend", e._cleanupSnapping, e)) })) }, _unsnap: function () { delete this._snapLatLng }, _cleanupSnapping: function () { delete this._snapList, this._map.off("pm:remove", this._handleSnapLayerRemoval, this), this.debugIndicatorLines && this.debugIndicatorLines.forEach((function (t) { t.remove() })) }, _handleSnapLayerRemoval: function (t) { var e = t.layer, i = this._snapList.findIndex((function (t) { return t._leaflet_id === e._leaflet_id })); this._snapList.splice(i, 1) }, _handleSnapping: function (t) { var e = this; if (t.originalEvent.altKey) return !1; if (void 0 === this._snapList && this._createSnapList(t), this._snapList.length <= 0) return !1; var i, n = t.target, o = this._calcClosestLayer(n.getLatLng(), this._snapList), r = o.layer instanceof L.Marker || o.layer instanceof L.CircleMarker; i = r ? o.latlng : this._checkPrioritiySnapping(o); var a = this.options.snapDistance, s = { marker: n, snapLatLng: i, segment: o.segment, layer: this._layer, layerInteractedWith: o.layer, distance: o.distance }; if (s.marker.fire("pm:snapdrag", s), this._layer.fire("pm:snapdrag", s), o.distance < a) { n.setLatLng(i), n._snapped = !0; var h = this._snapLatLng || {}, l = i || {}; h.lat === l.lat && h.lng === l.lng || (e._snapLatLng = i, n.fire("pm:snap", s), e._layer.fire("pm:snap", s)) } else this._snapLatLng && (this._unsnap(s), n._snapped = !1, s.marker.fire("pm:unsnap", s), this._layer.fire("pm:unsnap", s)); return !0 }, _checkPrioritiySnapping: function (t) { var e, i = this._map, o = t.segment[0], r = t.segment[1], a = t.latlng, s = this._getDistance(i, o, a), h = this._getDistance(i, r, a), l = s < h ? o : r, u = s < h ? s : h; if (this.options.snapMiddle) { var c = n.a.calcMiddleLatLng(i, o, r), p = this._getDistance(i, c, a); p < s && p < h && (l = c, u = p) } return e = u < this.options.snapDistance ? l : a, Object.assign({}, e) }, _createSnapList: function () { var t = this, e = [], i = [], n = this._map; n.off("pm:remove", this._handleSnapLayerRemoval, this), n.on("pm:remove", this._handleSnapLayerRemoval, this), n.eachLayer((function (t) { if ((t instanceof L.Polyline || t instanceof L.Marker || t instanceof L.CircleMarker) && !0 !== t.options.snapIgnore) { e.push(t); var n = L.polyline([], { color: "red", pmIgnore: !0 }); n._pmTempLayer = !0, i.push(n) } })), e = (e = (e = e.filter((function (e) { return t._layer !== e }))).filter((function (t) { return t._latlng || t._latlngs && t._latlngs.length > 0 }))).filter((function (t) { return !t._pmTempLayer })), this._otherSnapLayers ? this._snapList = e.concat(this._otherSnapLayers) : this._snapList = e, this.debugIndicatorLines = i }, _calcClosestLayer: function (t, e) { var i = this, n = {}; return e.forEach((function (e, o) { var r = i._calcLayerDistances(t, e); i.debugIndicatorLines[o].setLatLngs([t, r.latlng]), (void 0 === n.distance || r.distance < n.distance) && ((n = r).layer = e) })), n }, _calcLayerDistances: function (t, e) { var i, n, o = this, r = this._map, a = e instanceof L.Marker || e instanceof L.CircleMarker, s = e instanceof L.Polygon, h = t, l = a ? e.getLatLng() : e.getLatLngs(); if (a) return { latlng: Object.assign({}, l), distance: this._getDistance(r, l, h) }; !function t(e) { e.forEach((function (a, l) { if (Array.isArray(a)) t(a); else { var u, c = a; u = s ? l + 1 === e.length ? 0 : l + 1 : l + 1 === e.length ? void 0 : l + 1; var p = e[u]; if (p) { var d = o._getDistanceToSegment(r, h, c, p); (void 0 === n || d < n) && (n = d, i = [c, p]) } } })) }(l); var u = this._getClosestPointOnSegment(r, t, i[0], i[1]); return { latlng: Object.assign({}, u), segment: i, distance: n } }, _getClosestPointOnSegment: function (t, e, i, n) { var o = t.getMaxZoom(); o === 1 / 0 && (o = t.getZoom()); var r = t.project(e, o), a = t.project(i, o), s = t.project(n, o), h = L.LineUtil.closestPointOnSegment(r, a, s); return t.unproject(h, o) }, _getDistanceToSegment: function (t, e, i, n) { var o = t.latLngToLayerPoint(e), r = t.latLngToLayerPoint(i), a = t.latLngToLayerPoint(n); return L.LineUtil.pointToSegmentDistance(o, r, a) }, _getDistance: function (t, e, i) { return t.latLngToLayerPoint(e).distanceTo(t.latLngToLayerPoint(i)) } }; e.a = o }, function (t, e, i) { "use strict"; e.a = { calcMiddleLatLng: function (t, e, i) { var n = t.project(e), o = t.project(i); return t.unproject(n._add(o)._divideBy(2)) } } }, function (t, e, i) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }); var n = i(8); function o(t, e, i, n, o, r, a, s) { var h, l, u, c, p = { x: null, y: null, onLine1: !1, onLine2: !1 }; return 0 === (h = (s - r) * (i - t) - (a - o) * (n - e)) ? null !== p.x && null !== p.y && p : (c = (i - t) * (l = e - r) - (n - e) * (u = t - o), l = ((a - o) * l - (s - r) * u) / h, u = c / h, p.x = t + l * (i - t), p.y = e + l * (n - e), l >= 0 && l <= 1 && (p.onLine1 = !0), u >= 0 && u <= 1 && (p.onLine2 = !0), !(!p.onLine1 || !p.onLine2) && [p.x, p.y]) } e["default"] = function (t) { var e, i, r = { type: "FeatureCollection", features: [] }; if ("LineString" === (i = "Feature" === t.type ? t.geometry : t).type) e = [i.coordinates]; else if ("MultiLineString" === i.type) e = i.coordinates; else if ("MultiPolygon" === i.type) e = [].concat.apply([], i.coordinates); else { if ("Polygon" !== i.type) throw new Error("Input must be a LineString, MultiLineString, Polygon, or MultiPolygon Feature or Geometry"); e = i.coordinates } return e.forEach((function (t) { e.forEach((function (e) { for (var i = 0; i < t.length - 1; i++)for (var a = i; a < e.length - 1; a++) { if (t === e) { if (1 === Math.abs(i - a)) continue; if (0 === i && a === t.length - 2 && t[i][0] === t[t.length - 1][0] && t[i][1] === t[t.length - 1][1]) continue } var s = o(t[i][0], t[i][1], t[i + 1][0], t[i + 1][1], e[a][0], e[a][1], e[a + 1][0], e[a + 1][1]); s && r.features.push(n.point([s[0], s[1]])) } })) })), r } }, function (t, e, i) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }); var n = i(8); e.getCoord = function (t) { if (!t) throw new Error("coord is required"); if (!Array.isArray(t)) { if ("Feature" === t.type && null !== t.geometry && "Point" === t.geometry.type) return t.geometry.coordinates; if ("Point" === t.type) return t.coordinates } if (Array.isArray(t) && t.length >= 2 && !Array.isArray(t[0]) && !Array.isArray(t[1])) return t; throw new Error("coord must be GeoJSON Point or an Array of numbers") }, e.getCoords = function (t) { if (Array.isArray(t)) return t; if ("Feature" === t.type) { if (null !== t.geometry) return t.geometry.coordinates } else if (t.coordinates) return t.coordinates; throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array") }, e.containsNumber = function t(e) { if (e.length > 1 && n.isNumber(e[0]) && n.isNumber(e[1])) return !0; if (Array.isArray(e[0]) && e[0].length) return t(e[0]); throw new Error("coordinates must only contain numbers") }, e.geojsonType = function (t, e, i) { if (!e || !i) throw new Error("type and name required"); if (!t || t.type !== e) throw new Error("Invalid input to " + i + ": must be a " + e + ", given " + t.type) }, e.featureOf = function (t, e, i) { if (!t) throw new Error("No feature passed"); if (!i) throw new Error(".featureOf() requires a name"); if (!t || "Feature" !== t.type || !t.geometry) throw new Error("Invalid input to " + i + ", Feature with geometry required"); if (!t.geometry || t.geometry.type !== e) throw new Error("Invalid input to " + i + ": must be a " + e + ", given " + t.geometry.type) }, e.collectionOf = function (t, e, i) { if (!t) throw new Error("No featureCollection passed"); if (!i) throw new Error(".collectionOf() requires a name"); if (!t || "FeatureCollection" !== t.type) throw new Error("Invalid input to " + i + ", FeatureCollection required"); for (var n = 0, o = t.features; n < o.length; n++) { var r = o[n]; if (!r || "Feature" !== r.type || !r.geometry) throw new Error("Invalid input to " + i + ", Feature with geometry required"); if (!r.geometry || r.geometry.type !== e) throw new Error("Invalid input to " + i + ": must be a " + e + ", given " + r.geometry.type) } }, e.getGeom = function (t) { return "Feature" === t.type ? t.geometry : t }, e.getType = function (t, e) { return "FeatureCollection" === t.type ? "FeatureCollection" : "GeometryCollection" === t.type ? "GeometryCollection" : "Feature" === t.type && null !== t.geometry ? t.geometry.type : t.type } }, function (t, e, i) { !function (t, i) { i(e) }(0, (function (t) { "use strict"; function e(t, e) { return t > e ? 1 : t < e ? -1 : 0 } var i = function (t, i) { void 0 === t && (t = e), void 0 === i && (i = !1), this._compare = t, this._root = null, this._size = 0, this._noDuplicates = !!i }, n = { size: { configurable: !0 } }; i.prototype.rotateLeft = function (t) { var e = t.right; e && (t.right = e.left, e.left && (e.left.parent = t), e.parent = t.parent), t.parent ? t === t.parent.left ? t.parent.left = e : t.parent.right = e : this._root = e, e && (e.left = t), t.parent = e }, i.prototype.rotateRight = function (t) { var e = t.left; e && (t.left = e.right, e.right && (e.right.parent = t), e.parent = t.parent), t.parent ? t === t.parent.left ? t.parent.left = e : t.parent.right = e : this._root = e, e && (e.right = t), t.parent = e }, i.prototype._splay = function (t) { for (; t.parent;) { var e = t.parent; e.parent ? e.left === t && e.parent.left === e ? (this.rotateRight(e.parent), this.rotateRight(e)) : e.right === t && e.parent.right === e ? (this.rotateLeft(e.parent), this.rotateLeft(e)) : e.left === t && e.parent.right === e ? (this.rotateRight(e), this.rotateLeft(e)) : (this.rotateLeft(e), this.rotateRight(e)) : e.left === t ? this.rotateRight(e) : this.rotateLeft(e) } }, i.prototype.splay = function (t) { for (var e, i, n, o, r; t.parent;)(i = (e = t.parent).parent) && i.parent ? ((n = i.parent).left === i ? n.left = t : n.right = t, t.parent = n) : (t.parent = null, this._root = t), o = t.left, r = t.right, t === e.left ? (i && (i.left === e ? (e.right ? (i.left = e.right, i.left.parent = i) : i.left = null, e.right = i, i.parent = e) : (o ? (i.right = o, o.parent = i) : i.right = null, t.left = i, i.parent = t)), r ? (e.left = r, r.parent = e) : e.left = null, t.right = e, e.parent = t) : (i && (i.right === e ? (e.left ? (i.right = e.left, i.right.parent = i) : i.right = null, e.left = i, i.parent = e) : (r ? (i.left = r, r.parent = i) : i.left = null, t.right = i, i.parent = t)), o ? (e.right = o, o.parent = e) : e.right = null, t.left = e, e.parent = t) }, i.prototype.replace = function (t, e) { t.parent ? t === t.parent.left ? t.parent.left = e : t.parent.right = e : this._root = e, e && (e.parent = t.parent) }, i.prototype.minNode = function (t) { if (void 0 === t && (t = this._root), t) for (; t.left;)t = t.left; return t }, i.prototype.maxNode = function (t) { if (void 0 === t && (t = this._root), t) for (; t.right;)t = t.right; return t }, i.prototype.insert = function (t, e) { var i = this._root, n = null, o = this._compare; if (this._noDuplicates) for (; i;) { if (n = i, 0 === o(i.key, t)) return; i = o(i.key, t) < 0 ? i.right : i.left } else for (; i;)n = i, i = o(i.key, t) < 0 ? i.right : i.left; return i = { key: t, data: e, left: null, right: null, parent: n }, n ? o(n.key, i.key) < 0 ? n.right = i : n.left = i : this._root = i, this.splay(i), this._size++, i }, i.prototype.find = function (t) { for (var e = this._root, i = this._compare; e;) { var n = i(e.key, t); if (n < 0) e = e.right; else { if (!(n > 0)) return e; e = e.left } } return null }, i.prototype.contains = function (t) { for (var e = this._root, i = this._compare; e;) { var n = i(t, e.key); if (0 === n) return !0; e = n < 0 ? e.left : e.right } return !1 }, i.prototype.remove = function (t) { var e = this.find(t); if (!e) return !1; if (this.splay(e), e.left) if (e.right) { var i = this.minNode(e.right); i.parent !== e && (this.replace(i, i.right), i.right = e.right, i.right.parent = i), this.replace(e, i), i.left = e.left, i.left.parent = i } else this.replace(e, e.left); else this.replace(e, e.right); return this._size--, !0 }, i.prototype.removeNode = function (t) { if (!t) return !1; if (this.splay(t), t.left) if (t.right) { var e = this.minNode(t.right); e.parent !== t && (this.replace(e, e.right), e.right = t.right, e.right.parent = e), this.replace(t, e), e.left = t.left, e.left.parent = e } else this.replace(t, t.left); else this.replace(t, t.right); return this._size--, !0 }, i.prototype.erase = function (t) { var e = this.find(t); if (e) { this.splay(e); var i = e.left, n = e.right, o = null; i && (i.parent = null, o = this.maxNode(i), this.splay(o), this._root = o), n && (i ? o.right = n : this._root = n, n.parent = o), this._size-- } }, i.prototype.pop = function () { var t = this._root, e = null; if (t) { for (; t.left;)t = t.left; e = { key: t.key, data: t.data }, this.remove(t.key) } return e }, i.prototype.next = function (t) { var e = t; if (e) if (e.right) for (e = e.right; e && e.left;)e = e.left; else for (e = t.parent; e && e.right === t;)t = e, e = e.parent; return e }, i.prototype.prev = function (t) { var e = t; if (e) if (e.left) for (e = e.left; e && e.right;)e = e.right; else for (e = t.parent; e && e.left === t;)t = e, e = e.parent; return e }, i.prototype.forEach = function (t) { for (var e = this._root, i = [], n = !1, o = 0; !n;)e ? (i.push(e), e = e.left) : i.length > 0 ? (t(e = i.pop(), o++), e = e.right) : n = !0; return this }, i.prototype.range = function (t, e, i, n) { for (var o = [], r = this._compare, a = this._root; 0 !== o.length || a;)if (a) o.push(a), a = a.left; else { if (r((a = o.pop()).key, e) > 0) break; if (r(a.key, t) >= 0 && i.call(n, a)) return this; a = a.right } return this }, i.prototype.keys = function () { for (var t = this._root, e = [], i = [], n = !1; !n;)t ? (e.push(t), t = t.left) : e.length > 0 ? (t = e.pop(), i.push(t.key), t = t.right) : n = !0; return i }, i.prototype.values = function () { for (var t = this._root, e = [], i = [], n = !1; !n;)t ? (e.push(t), t = t.left) : e.length > 0 ? (t = e.pop(), i.push(t.data), t = t.right) : n = !0; return i }, i.prototype.at = function (t) { for (var e = this._root, i = [], n = !1, o = 0; !n;)if (e) i.push(e), e = e.left; else if (i.length > 0) { if (e = i.pop(), o === t) return e; o++, e = e.right } else n = !0; return null }, i.prototype.load = function (t, e, i) { if (void 0 === t && (t = []), void 0 === e && (e = []), void 0 === i && (i = !1), 0 !== this._size) throw new Error("bulk-load: tree is not empty"); var n = t.length; return i && function t(e, i, n, o, r) { if (!(n >= o)) { for (var a = e[n + o >> 1], s = n - 1, h = o + 1; ;) { do { s++ } while (r(e[s], a) < 0); do { h-- } while (r(e[h], a) > 0); if (s >= h) break; var l = e[s]; e[s] = e[h], e[h] = l, l = i[s], i[s] = i[h], i[h] = l } t(e, i, n, h, r), t(e, i, h + 1, o, r) } }(t, e, 0, n - 1, this._compare), this._root = function t(e, i, n, o, r) { var a = r - o; if (a > 0) { var s = o + Math.floor(a / 2), h = i[s], l = n[s], u = { key: h, data: l, parent: e }; return u.left = t(u, i, n, o, s), u.right = t(u, i, n, s + 1, r), u } return null }(null, t, e, 0, n), this._size = n, this }, i.prototype.min = function () { var t = this.minNode(this._root); return t ? t.key : null }, i.prototype.max = function () { var t = this.maxNode(this._root); return t ? t.key : null }, i.prototype.isEmpty = function () { return null === this._root }, n.size.get = function () { return this._size }, i.createTree = function (t, e, n, o, r) { return new i(n, r).load(t, e, o) }, Object.defineProperties(i.prototype, n); var o = 0, r = 1, a = 2, s = 3, h = 0, l = 1, u = 2, c = 3; function p(t, e, i) { null === e ? (t.inOut = !1, t.otherInOut = !0) : (t.isSubject === e.isSubject ? (t.inOut = !e.inOut, t.otherInOut = e.otherInOut) : (t.inOut = !e.otherInOut, t.otherInOut = e.isVertical() ? !e.inOut : e.inOut), e && (t.prevInResult = !d(e, i) || e.isVertical() ? e.prevInResult : e)), t.inResult = d(t, i) } function d(t, e) { switch (t.type) { case o: switch (e) { case h: return !t.otherInOut; case l: return t.otherInOut; case u: return t.isSubject && t.otherInOut || !t.isSubject && !t.otherInOut; case c: return !0 }break; case a: return e === h || e === l; case s: return e === u; case r: return !1 }return !1 } var f = function (t, e, i, n, r) { this.left = e, this.point = t, this.otherEvent = i, this.isSubject = n, this.type = r || o, this.inOut = !1, this.otherInOut = !1, this.prevInResult = null, this.inResult = !1, this.resultInOut = !1, this.isExteriorRing = !0 }; function _(t, e) { return t[0] === e[0] && t[1] === e[1] } function m(t, e, i) { return (t[0] - i[0]) * (e[1] - i[1]) - (e[0] - i[0]) * (t[1] - i[1]) } function g(t, e) { var i = t.point, n = e.point; return i[0] > n[0] ? 1 : i[0] < n[0] ? -1 : i[1] !== n[1] ? i[1] > n[1] ? 1 : -1 : function (t, e, i, n) { return t.left !== e.left ? t.left ? 1 : -1 : 0 !== m(i, t.otherEvent.point, e.otherEvent.point) ? t.isBelow(e.otherEvent.point) ? -1 : 1 : !t.isSubject && e.isSubject ? 1 : -1 }(t, e, i) } function v(t, e, i) { var n = new f(e, !1, t, t.isSubject), o = new f(e, !0, t.otherEvent, t.isSubject); return _(t.point, t.otherEvent.point) && console.warn("what is that, a collapsed segment?", t), n.contourId = o.contourId = t.contourId, g(o, t.otherEvent) > 0 && (t.otherEvent.left = !0, o.left = !1), t.otherEvent.otherEvent = o, t.otherEvent = n, i.push(o), i.push(n), i } function y(t, e) { return t[0] * e[1] - t[1] * e[0] } function b(t, e) { return t[0] * e[0] + t[1] * e[1] } function L(t, e, i) { var n = function (t, e, i, n, o) { var r = [e[0] - t[0], e[1] - t[1]], a = [n[0] - i[0], n[1] - i[1]]; function s(t, e, i) { return [t[0] + e * i[0], t[1] + e * i[1]] } var h = [i[0] - t[0], i[1] - t[1]], l = y(r, a), u = l * l, c = b(r, r); if (u > 0) { var p = y(h, a) / l; if (p < 0 || p > 1) return null; var d = y(h, r) / l; return d < 0 || d > 1 ? null : 0 === p || 1 === p ? o ? null : [s(t, p, r)] : 0 === d || 1 === d ? o ? null : [s(i, d, a)] : [s(t, p, r)] } if ((u = (l = y(h, r)) * l) > 0) return null; var f = b(r, h) / c, _ = f + b(r, a) / c, m = Math.min(f, _), g = Math.max(f, _); return m <= 1 && g >= 0 ? 1 === m ? o ? null : [s(t, m > 0 ? m : 0, r)] : 0 === g ? o ? null : [s(t, g < 1 ? g : 1, r)] : o && 0 === m && 1 === g ? null : [s(t, m > 0 ? m : 0, r), s(t, g < 1 ? g : 1, r)] : null }(t.point, t.otherEvent.point, e.point, e.otherEvent.point), o = n ? n.length : 0; if (0 === o) return 0; if (1 === o && (_(t.point, e.point) || _(t.otherEvent.point, e.otherEvent.point))) return 0; if (2 === o && t.isSubject === e.isSubject) return 0; if (1 === o) return _(t.point, n[0]) || _(t.otherEvent.point, n[0]) || v(t, n[0], i), _(e.point, n[0]) || _(e.otherEvent.point, n[0]) || v(e, n[0], i), 1; var h = [], l = !1, u = !1; return _(t.point, e.point) ? l = !0 : 1 === g(t, e) ? h.push(e, t) : h.push(t, e), _(t.otherEvent.point, e.otherEvent.point) ? u = !0 : 1 === g(t.otherEvent, e.otherEvent) ? h.push(e.otherEvent, t.otherEvent) : h.push(t.otherEvent, e.otherEvent), l && u || l ? (e.type = r, t.type = e.inOut === t.inOut ? a : s, l && !u && v(h[1].otherEvent, h[0].point, i), 2) : u ? (v(h[0], h[1].point, i), 3) : h[0] !== h[3].otherEvent ? (v(h[0], h[1].point, i), v(h[1], h[2].point, i), 3) : (v(h[0], h[1].point, i), v(h[3].otherEvent, h[2].point, i), 3) } function w(t, e) { if (t === e) return 0; if (0 !== m(t.point, t.otherEvent.point, e.point) || 0 !== m(t.point, t.otherEvent.point, e.otherEvent.point)) return _(t.point, e.point) ? t.isBelow(e.otherEvent.point) ? -1 : 1 : t.point[0] === e.point[0] ? t.point[1] < e.point[1] ? -1 : 1 : 1 === g(t, e) ? e.isAbove(t.point) ? -1 : 1 : t.isBelow(e.point) ? -1 : 1; if (t.isSubject !== e.isSubject) return t.isSubject ? -1 : 1; var i = t.point, n = e.point; return i[0] === n[0] && i[1] === n[1] ? (i = t.otherEvent.point, n = e.otherEvent.point, i[0] === n[0] && i[1] === n[1] ? 0 : t.contourId > e.contourId ? 1 : -1) : 1 === g(t, e) ? 1 : -1 } function x(t, e, i, n) { var o = t + 1, r = e.length; if (o > r - 1) return t - 1; for (var a = e[t].point, s = e[o].point; o < r && s[0] === a[0] && s[1] === a[1];) { if (!i[o]) return o; s = e[++o].point } for (o = t - 1; i[o] && o >= n;)o--; return o } function k(t, e) { var i, n, o, r = function (t) { var e, i, n, o, r = []; for (i = 0, n = t.length; i < n; i++)((e = t[i]).left && e.inResult || !e.left && e.otherEvent.inResult) && r.push(e); for (var a = !1; !a;)for (a = !0, i = 0, n = r.length; i < n; i++)i + 1 < n && 1 === g(r[i], r[i + 1]) && (o = r[i], r[i] = r[i + 1], r[i + 1] = o, a = !1); for (i = 0, n = r.length; i < n; i++)(e = r[i]).pos = i; for (i = 0, n = r.length; i < n; i++)(e = r[i]).left || (o = e.pos, e.pos = e.otherEvent.pos, e.otherEvent.pos = o); return r }(t), a = {}, s = []; for (i = 0, n = r.length; i < n; i++)if (!a[i]) { var h = [[]]; r[i].isExteriorRing ? e === u && !r[i].isSubject && s.length > 1 ? s[s.length - 1].push(h[0]) : s.push(h) : e !== u || r[i].isSubject || 0 !== s.length ? 0 === s.length ? s.push([[h]]) : s[s.length - 1].push(h[0]) : s.push(h); var l = s.length - 1, c = i, p = r[i].point; for (h[0].push(p); c >= i;)o = r[c], a[c] = !0, o.left ? (o.resultInOut = !1, o.contourId = l) : (o.otherEvent.resultInOut = !0, o.otherEvent.contourId = l), a[c = o.pos] = !0, h[0].push(r[c].point), c = x(c, r, a, i); o = r[c = -1 === c ? i : c], a[c] = a[o.pos] = !0, o.otherEvent.resultInOut = !0, o.otherEvent.contourId = l } return s } f.prototype.isBelow = function (t) { var e = this.point, i = this.otherEvent.point; return this.left ? (e[0] - t[0]) * (i[1] - t[1]) - (i[0] - t[0]) * (e[1] - t[1]) > 0 : (i[0] - t[0]) * (e[1] - t[1]) - (e[0] - t[0]) * (i[1] - t[1]) > 0 }, f.prototype.isAbove = function (t) { return !this.isBelow(t) }, f.prototype.isVertical = function () { return this.point[0] === this.otherEvent.point[0] }, f.prototype.clone = function () { var t = new f(this.point, this.left, this.otherEvent, this.isSubject, this.type); return t.inResult = this.inResult, t.prevInResult = this.prevInResult, t.isExteriorRing = this.isExteriorRing, t.inOut = this.inOut, t.otherInOut = this.otherInOut, t }; var M = C, P = C; function C(t, e) { if (!(this instanceof C)) return new C(t, e); if (this.data = t || [], this.length = this.data.length, this.compare = e || T, this.length > 0) for (var i = (this.length >> 1) - 1; i >= 0; i--)this._down(i) } function T(t, e) { return t < e ? -1 : t > e ? 1 : 0 } C.prototype = { push: function (t) { this.data.push(t), this.length++, this._up(this.length - 1) }, pop: function () { if (0 !== this.length) { var t = this.data[0]; return this.length--, this.length > 0 && (this.data[0] = this.data[this.length], this._down(0)), this.data.pop(), t } }, peek: function () { return this.data[0] }, _up: function (t) { for (var e = this.data, i = this.compare, n = e[t]; t > 0;) { var o = t - 1 >> 1, r = e[o]; if (i(n, r) >= 0) break; e[t] = r, t = o } e[t] = n }, _down: function (t) { for (var e = this.data, i = this.compare, n = this.length >> 1, o = e[t]; t < n;) { var r = 1 + (t << 1), a = r + 1, s = e[r]; if (a < this.length && i(e[a], s) < 0 && (r = a, s = e[a]), i(s, o) >= 0) break; e[t] = s, t = r } e[t] = o } }, M["default"] = P; var S = Math.max, O = Math.min, E = 0; function B(t, e, i, n, o, r) { var a, s, h, l, u, c; for (a = 0, s = t.length - 1; a < s; a++)if (h = t[a], l = t[a + 1], u = new f(h, !1, void 0, e), c = new f(l, !1, u, e), u.otherEvent = c, h[0] !== l[0] || h[1] !== l[1]) { u.contourId = c.contourId = i, r || (u.isExteriorRing = !1, c.isExteriorRing = !1), g(u, c) > 0 ? c.left = !0 : u.left = !0; var p = h[0], d = h[1]; o[0] = O(o[0], p), o[1] = O(o[1], d), o[2] = S(o[2], p), o[3] = S(o[3], d), n.push(u), n.push(c) } } var z = []; function j(t, e, n) { "number" == typeof t[0][0][0] && (t = [t]), "number" == typeof e[0][0][0] && (e = [e]); var o = function (t, e, i) { var n = null; return t.length * e.length == 0 && (i === h ? n = z : i === u ? n = t : i !== l && i !== c || (n = 0 === t.length ? e : t)), n }(t, e, n); if (o) return o === z ? null : o; var r = [1 / 0, 1 / 0, -1 / 0, -1 / 0], a = [1 / 0, 1 / 0, -1 / 0, -1 / 0], s = function (t, e, i, n, o) { var r, a, s, h, l, c, p = new M(null, g); for (s = 0, h = t.length; s < h; s++)for (l = 0, c = (r = t[s]).length; l < c; l++)(a = 0 === l) && E++, B(r[l], !0, E, p, i, a); for (s = 0, h = e.length; s < h; s++)for (l = 0, c = (r = e[s]).length; l < c; l++)a = 0 === l, o === u && (a = !1), a && E++, B(r[l], !1, E, p, n, a); return p }(t, e, r, a, n); return (o = function (t, e, i, n, o) { var r = null; return (i[0] > n[2] || n[0] > i[2] || i[1] > n[3] || n[1] > i[3]) && (o === h ? r = z : o === u ? r = t : o !== l && o !== c || (r = t.concat(e))), r }(t, e, r, a, n)) ? o === z ? null : o : k(function (t, e, n, o, r, a) { for (var s, l, c, d = new i(w), f = [], _ = Math.min(o[2], r[2]); 0 !== t.length;) { var m = t.pop(); if (f.push(m), a === h && m.point[0] > _ || a === u && m.point[0] > o[2]) break; if (m.left) { l = s = d.insert(m), s = s !== (c = d.minNode()) ? d.prev(s) : null, l = d.next(l); var g = s ? s.key : null; if (p(m, g, a), l && 2 === L(m, l.key, t) && (p(m, g, a), p(m, l.key, a)), s && 2 === L(s.key, m, t)) { var v = s; p(g, (v = v !== c ? d.prev(v) : null) ? v.key : null, a), p(m, g, a) } } else m = m.otherEvent, l = s = d.find(m), s && l && (s = s !== c ? d.prev(s) : null, l = d.next(l), d.remove(m), l && s && L(s.key, l.key, t)) } return f }(s, 0, 0, r, a, n), n) } var I = { UNION: l, DIFFERENCE: u, INTERSECTION: h, XOR: c }; t.union = function (t, e) { return j(t, e, l) }, t.diff = function (t, e) { return j(t, e, u) }, t.xor = function (t, e) { return j(t, e, c) }, t.intersection = function (t, e) { return j(t, e, h) }, t.operations = I, Object.defineProperty(t, "__esModule", { value: !0 }) })) }, function (t, e, i) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }); var n = i(8); function o(t, e, i) { if (null !== t) for (var n, r, a, s, h, l, u, c, p = 0, d = 0, f = t.type, _ = "FeatureCollection" === f, m = "Feature" === f, g = _ ? t.features.length : 1, v = 0; v < g; v++) { h = (c = !!(u = _ ? t.features[v].geometry : m ? t.geometry : t) && "GeometryCollection" === u.type) ? u.geometries.length : 1; for (var y = 0; y < h; y++) { var b = 0, L = 0; if (null !== (s = c ? u.geometries[y] : u)) { l = s.coordinates; var w = s.type; switch (p = !i || "Polygon" !== w && "MultiPolygon" !== w ? 0 : 1, w) { case null: break; case "Point": if (!1 === e(l, d, v, b, L)) return !1; d++, b++; break; case "LineString": case "MultiPoint": for (n = 0; n < l.length; n++) { if (!1 === e(l[n], d, v, b, L)) return !1; d++, "MultiPoint" === w && b++ } "LineString" === w && b++; break; case "Polygon": case "MultiLineString": for (n = 0; n < l.length; n++) { for (r = 0; r < l[n].length - p; r++) { if (!1 === e(l[n][r], d, v, b, L)) return !1; d++ } "MultiLineString" === w && b++, "Polygon" === w && L++ } "Polygon" === w && b++; break; case "MultiPolygon": for (n = 0; n < l.length; n++) { for (L = 0, r = 0; r < l[n].length; r++) { for (a = 0; a < l[n][r].length - p; a++) { if (!1 === e(l[n][r][a], d, v, b, L)) return !1; d++ } L++ } b++ } break; case "GeometryCollection": for (n = 0; n < s.geometries.length; n++)if (!1 === o(s.geometries[n], e, i)) return !1; break; default: throw new Error("Unknown Geometry Type") } } } } } function r(t, e) { var i; switch (t.type) { case "FeatureCollection": for (i = 0; i < t.features.length && !1 !== e(t.features[i].properties, i); i++); break; case "Feature": e(t.properties, 0) } } function a(t, e) { if ("Feature" === t.type) e(t, 0); else if ("FeatureCollection" === t.type) for (var i = 0; i < t.features.length && !1 !== e(t.features[i], i); i++); } function s(t, e) { var i, n, o, r, a, s, h, l, u, c, p = 0, d = "FeatureCollection" === t.type, f = "Feature" === t.type, _ = d ? t.features.length : 1; for (i = 0; i < _; i++) { for (s = d ? t.features[i].geometry : f ? t.geometry : t, l = d ? t.features[i].properties : f ? t.properties : {}, u = d ? t.features[i].bbox : f ? t.bbox : void 0, c = d ? t.features[i].id : f ? t.id : void 0, a = (h = !!s && "GeometryCollection" === s.type) ? s.geometries.length : 1, o = 0; o < a; o++)if (null !== (r = h ? s.geometries[o] : s)) switch (r.type) { case "Point": case "LineString": case "MultiPoint": case "Polygon": case "MultiLineString": case "MultiPolygon": if (!1 === e(r, p, l, u, c)) return !1; break; case "GeometryCollection": for (n = 0; n < r.geometries.length; n++)if (!1 === e(r.geometries[n], p, l, u, c)) return !1; break; default: throw new Error("Unknown Geometry Type") } else if (!1 === e(null, p, l, u, c)) return !1; p++ } } function h(t, e) { s(t, (function (t, i, o, r, a) { var s, h = null === t ? null : t.type; switch (h) { case null: case "Point": case "LineString": case "Polygon": return !1 !== e(n.feature(t, o, { bbox: r, id: a }), i, 0) && void 0 }switch (h) { case "MultiPoint": s = "Point"; break; case "MultiLineString": s = "LineString"; break; case "MultiPolygon": s = "Polygon" }for (var l = 0; l < t.coordinates.length; l++) { var u = { type: s, coordinates: t.coordinates[l] }; if (!1 === e(n.feature(u, o), i, l)) return !1 } })) } function l(t, e) { h(t, (function (t, i, r) { var a = 0; if (t.geometry) { var s = t.geometry.type; if ("Point" !== s && "MultiPoint" !== s) { var h, l = 0, u = 0, c = 0; return !1 !== o(t, (function (o, s, p, d, f) { if (void 0 === h || i > l || d > u || f > c) return h = o, l = i, u = d, c = f, void (a = 0); var _ = n.lineString([h, o], t.properties); if (!1 === e(_, i, r, f, a)) return !1; a++, h = o })) && void 0 } } })) } function u(t, e) { if (!t) throw new Error("geojson is required"); h(t, (function (t, i, o) { if (null !== t.geometry) { var r = t.geometry.type, a = t.geometry.coordinates; switch (r) { case "LineString": if (!1 === e(t, i, o, 0, 0)) return !1; break; case "Polygon": for (var s = 0; s < a.length; s++)if (!1 === e(n.lineString(a[s], t.properties), i, o, s)) return !1 } } })) } e.coordEach = o, e.coordReduce = function (t, e, i, n) { var r = i; return o(t, (function (t, n, o, a, s) { r = 0 === n && void 0 === i ? t : e(r, t, n, o, a, s) }), n), r }, e.propEach = r, e.propReduce = function (t, e, i) { var n = i; return r(t, (function (t, o) { n = 0 === o && void 0 === i ? t : e(n, t, o) })), n }, e.featureEach = a, e.featureReduce = function (t, e, i) { var n = i; return a(t, (function (t, o) { n = 0 === o && void 0 === i ? t : e(n, t, o) })), n }, e.coordAll = function (t) { var e = []; return o(t, (function (t) { e.push(t) })), e }, e.geomEach = s, e.geomReduce = function (t, e, i) { var n = i; return s(t, (function (t, o, r, a, s) { n = 0 === o && void 0 === i ? t : e(n, t, o, r, a, s) })), n }, e.flattenEach = h, e.flattenReduce = function (t, e, i) { var n = i; return h(t, (function (t, o, r) { n = 0 === o && 0 === r && void 0 === i ? t : e(n, t, o, r) })), n }, e.segmentEach = l, e.segmentReduce = function (t, e, i) { var n = i, o = !1; return l(t, (function (t, r, a, s, h) { n = !1 === o && void 0 === i ? t : e(n, t, r, a, s, h), o = !0 })), n }, e.lineEach = u, e.lineReduce = function (t, e, i) { var n = i; return u(t, (function (t, o, r, a) { n = 0 === o && void 0 === i ? t : e(n, t, o, r, a) })), n }, e.findSegment = function (t, e) { if (e = e || {}, !n.isObject(e)) throw new Error("options is invalid"); var i, o = e.featureIndex || 0, r = e.multiFeatureIndex || 0, a = e.geometryIndex || 0, s = e.segmentIndex || 0, h = e.properties; switch (t.type) { case "FeatureCollection": o < 0 && (o = t.features.length + o), h = h || t.features[o].properties, i = t.features[o].geometry; break; case "Feature": h = h || t.properties, i = t.geometry; break; case "Point": case "MultiPoint": return null; case "LineString": case "Polygon": case "MultiLineString": case "MultiPolygon": i = t; break; default: throw new Error("geojson is invalid") }if (null === i) return null; var l = i.coordinates; switch (i.type) { case "Point": case "MultiPoint": return null; case "LineString": return s < 0 && (s = l.length + s - 1), n.lineString([l[s], l[s + 1]], h, e); case "Polygon": return a < 0 && (a = l.length + a), s < 0 && (s = l[a].length + s - 1), n.lineString([l[a][s], l[a][s + 1]], h, e); case "MultiLineString": return r < 0 && (r = l.length + r), s < 0 && (s = l[r].length + s - 1), n.lineString([l[r][s], l[r][s + 1]], h, e); case "MultiPolygon": return r < 0 && (r = l.length + r), a < 0 && (a = l[r].length + a), s < 0 && (s = l[r][a].length - s - 1), n.lineString([l[r][a][s], l[r][a][s + 1]], h, e) }throw new Error("geojson is invalid") }, e.findPoint = function (t, e) { if (e = e || {}, !n.isObject(e)) throw new Error("options is invalid"); var i, o = e.featureIndex || 0, r = e.multiFeatureIndex || 0, a = e.geometryIndex || 0, s = e.coordIndex || 0, h = e.properties; switch (t.type) { case "FeatureCollection": o < 0 && (o = t.features.length + o), h = h || t.features[o].properties, i = t.features[o].geometry; break; case "Feature": h = h || t.properties, i = t.geometry; break; case "Point": case "MultiPoint": return null; case "LineString": case "Polygon": case "MultiLineString": case "MultiPolygon": i = t; break; default: throw new Error("geojson is invalid") }if (null === i) return null; var l = i.coordinates; switch (i.type) { case "Point": return n.point(l, h, e); case "MultiPoint": return r < 0 && (r = l.length + r), n.point(l[r], h, e); case "LineString": return s < 0 && (s = l.length + s), n.point(l[s], h, e); case "Polygon": return a < 0 && (a = l.length + a), s < 0 && (s = l[a].length + s), n.point(l[a][s], h, e); case "MultiLineString": return r < 0 && (r = l.length + r), s < 0 && (s = l[r].length + s), n.point(l[r][s], h, e); case "MultiPolygon": return r < 0 && (r = l.length + r), a < 0 && (a = l[r].length + a), s < 0 && (s = l[r][a].length - s), n.point(l[r][a][s], h, e) }throw new Error("geojson is invalid") } }, function (t, e, i) { t.exports = i(47) }, function (t, e, i) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }); var n = i(48), o = (i.n(n), i(49)), r = (i.n(o), i(50)), a = i(128), s = i(1), h = (i(141), i(142), i(143), i(144), i(145), i(146), i(147), i(2)), l = (i(152), i(153), i(154), i(155), i(156), i(157), i(158), i(159)), u = (i.n(l), i(160)); i.n(u), L.PM = L.PM || { version: o.version, Map: r.a, Toolbar: a.a, Draw: s.a, Edit: h.a, activeLang: "en", initialize: function () { this.addInitHooks() }, addInitHooks: function () { L.Map.addInitHook((function () { this.options.pmIgnore || (this.pm = new L.PM.Map(this)) })), L.LayerGroup.addInitHook((function () { this.pm = new L.PM.Edit.LayerGroup(this) })), L.Marker.addInitHook((function () { this.options.pmIgnore || (this.pm = new L.PM.Edit.Marker(this)) })), L.CircleMarker.addInitHook((function () { this.options.pmIgnore || (this.pm = new L.PM.Edit.CircleMarker(this)) })), L.Polyline.addInitHook((function () { this.options.pmIgnore || (this.pm = new L.PM.Edit.Line(this)) })), L.Polygon.addInitHook((function () { this.options.pmIgnore || (this.pm = new L.PM.Edit.Polygon(this)) })), L.Rectangle.addInitHook((function () { this.options.pmIgnore || (this.pm = new L.PM.Edit.Rectangle(this)) })), L.Circle.addInitHook((function () { this.options.pmIgnore || (this.pm = new L.PM.Edit.Circle(this)) })) } }, L.PM.initialize() }, function (t, e) { Array.prototype.findIndex = Array.prototype.findIndex || function (t) { if (null === this) throw new TypeError("Array.prototype.findIndex called on null or undefined"); if ("function" != typeof t) throw new TypeError("callback must be a function"); for (var e = Object(this), i = e.length >>> 0, n = arguments[1], o = 0; o < i; o++)if (t.call(n, e[o], o, e)) return o; return -1 }, Array.prototype.find = Array.prototype.find || function (t) { if (null === this) throw new TypeError("Array.prototype.find called on null or undefined"); if ("function" != typeof t) throw new TypeError("callback must be a function"); for (var e = Object(this), i = e.length >>> 0, n = arguments[1], o = 0; o < i; o++) { var r = e[o]; if (t.call(n, r, o, e)) return r } }, "function" != typeof Object.assign && (Object.assign = function (t) { "use strict"; if (null == t) throw new TypeError("Cannot convert undefined or null to object"); t = Object(t); for (var e = 1; e < arguments.length; e++) { var i = arguments[e]; if (null != i) for (var n in i) Object.prototype.hasOwnProperty.call(i, n) && (t[n] = i[n]) } return t }), [Element.prototype, CharacterData.prototype, DocumentType.prototype].forEach((function (t) { t.hasOwnProperty("remove") || Object.defineProperty(t, "remove", { configurable: !0, enumerable: !0, writable: !0, value: function () { this.parentNode.removeChild(this) } }) })) }, function (t, e) { t.exports = { name: "leaflet.pm", version: "2.2.0", description: "A Leaflet Plugin For Editing Geometry Layers in Leaflet 1.0", keywords: ["leaflet", "polygon management", "geometry editing", "map data", "map overlay", "polygon", "geojson", "leaflet-draw", "data-field-geojson", "ui-leaflet-draw"], files: ["dist"], main: "dist/leaflet.pm.min.js", dependencies: { "@turf/difference": "^6.0.2", "@turf/intersect": "^6.1.3", "@turf/kinks": "6.x", lodash: "^4.17.15" }, devDependencies: { "@babel/core": "^7.5.5", "@babel/preset-env": "^7.5.5", "babel-loader": "^8.0.6", "css-loader": "^2.1.1", cypress: "^3.4.1", eslint: "^4.19.1", "eslint-config-airbnb-base": "^12.1.0", "eslint-config-prettier": "^3.6.0", "eslint-plugin-cypress": "^2.6.1", "eslint-plugin-import": "^2.18.2", "extract-text-webpack-plugin": "^3.0.2", "file-loader": "^0.11.1", leaflet: "^1.5.1", prettier: "1.16.1", "style-loader": "^0.19.0", "uglifyjs-webpack-plugin": "^1.3.0", "url-loader": "^0.6.2", webpack: "^3.12.0" }, peerDependencies: { leaflet: "^1.2.0" }, scripts: { start: "npm run dev", dev: "./node_modules/.bin/webpack --config=webpack.dev.js", test: "$(npm bin)/cypress run", cypress: "$(npm bin)/cypress open", build: "./node_modules/.bin/webpack --config=webpack.build.js", prepare: "npm run build", "eslint-check": "eslint --print-config . | eslint-config-prettier-check", eslint: "eslint src/ --fix", prettier: "prettier --write '{src,cypress}/**/*.{js,css}'", lint: "npm run eslint && npm run prettier" }, repository: { type: "git", url: "git://github.com/codeofsumit/leaflet.pm.git" }, author: { name: "Sumit Kumar", email: "sk@outlook.com", url: "http://twitter.com/TweetsOfSumit" }, license: "MIT", bugs: { url: "https://github.com/codeofsumit/leaflet.pm/issues" }, homepage: "https://leafletpm.now.sh", prettier: { trailingComma: "es5", tabWidth: 2, semi: !0, singleQuote: !0 } } }, function (t, e, i) { "use strict"; var n = i(51), o = i.n(n), r = i(36), a = L.Class.extend({ initialize: function (t) { this.map = t, this.Draw = new L.PM.Draw(t), this.Toolbar = new L.PM.Toolbar(t), this._globalRemovalMode = !1 }, setLang: function () { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "en", e = arguments.length > 1 ? arguments[1] : void 0, i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : "en"; e && (r.a[t] = o()(r.a[i], e)), L.PM.activeLang = t, this.map.pm.Toolbar.reinit() }, addControls: function (t) { this.Toolbar.addControls(t) }, removeControls: function () { this.Toolbar.removeControls() }, toggleControls: function () { this.Toolbar.toggleControls() }, controlsVisible: function () { return this.Toolbar.isVisible }, enableDraw: function () { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "Polygon", e = arguments.length > 1 ? arguments[1] : void 0; "Poly" === t && (t = "Polygon"), this.Draw.enable(t, e) }, disableDraw: function () { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "Polygon"; "Poly" === t && (t = "Polygon"), this.Draw.disable(t) }, setPathOptions: function (t) { this.Draw.setPathOptions(t) }, findLayers: function () { var t = []; return this.map.eachLayer((function (e) { (e instanceof L.Polyline || e instanceof L.Marker || e instanceof L.Circle || e instanceof L.CircleMarker) && t.push(e) })), t = (t = t.filter((function (t) { return !!t.pm }))).filter((function (t) { return !t._pmTempLayer })) }, removeLayer: function (t) { var e = t.target; !(e._pmTempLayer || e.pm && e.pm.dragging()) && (e.remove(), this.map.fire("pm:remove", { layer: e })) }, globalDragModeEnabled: function () { return !!this._globalDragMode }, enableGlobalDragMode: function () { var t = this.findLayers(); this._globalDragMode = !0, t.forEach((function (t) { t.pm.enableLayerDrag() })), this.map.on("layeradd", this.layerAddHandler, this), this.Toolbar.toggleButton("dragMode", this._globalDragMode), this._fireDragModeEvent(!0) }, disableGlobalDragMode: function () { var t = this.findLayers(); this._globalDragMode = !1, t.forEach((function (t) { t.pm.disableLayerDrag() })), this.map.off("layeradd", this.layerAddHandler, this), this.Toolbar.toggleButton("dragMode", this._globalDragMode), this._fireDragModeEvent(!1) }, _fireDragModeEvent: function (t) { this.map.fire("pm:globaldragmodetoggled", { enabled: t, map: this.map }) }, toggleGlobalDragMode: function () { this.globalDragModeEnabled() ? this.disableGlobalDragMode() : this.enableGlobalDragMode() }, layerAddHandler: function (t) { var e = t.layer; e.pm && !e._pmTempLayer && (this.globalRemovalEnabled() && (this.disableGlobalRemovalMode(), this.enableGlobalRemovalMode()), this.globalEditEnabled() && (this.disableGlobalEditMode(), this.enableGlobalEditMode()), this.globalDragModeEnabled() && (this.disableGlobalDragMode(), this.enableGlobalDragMode())) }, disableGlobalRemovalMode: function () { var t = this; this._globalRemovalMode = !1, this.map.eachLayer((function (e) { e.off("click", t.removeLayer, t) })), this.map.off("layeradd", this.layerAddHandler, this), this.Toolbar.toggleButton("deleteLayer", this._globalRemovalMode), this._fireRemovalModeEvent(!1) }, enableGlobalRemovalMode: function () { var t = this; this._globalRemovalMode = !0, this.map.eachLayer((function (e) { (function (t) { return t.pm && !(t.pm.options && t.pm.options.preventMarkerRemoval) && !(t instanceof L.LayerGroup) })(e) && e.on("click", t.removeLayer, t) })), this.map.on("layeradd", this.layerAddHandler, this), this.Toolbar.toggleButton("deleteLayer", this._globalRemovalMode), this._fireRemovalModeEvent(!0) }, _fireRemovalModeEvent: function (t) { this.map.fire("pm:globalremovalmodetoggled", { enabled: t, map: this.map }) }, toggleGlobalRemovalMode: function () { this.globalRemovalEnabled() ? this.disableGlobalRemovalMode() : this.enableGlobalRemovalMode() }, globalRemovalEnabled: function () { return !!this._globalRemovalMode }, globalEditEnabled: function () { return this._globalEditMode }, enableGlobalEditMode: function (t) { var e = this.findLayers(); this._globalEditMode = !0, e.forEach((function (e) { e.pm.enable(t) })), this.map.on("layeradd", this.layerAddHandler, this), this.Toolbar.toggleButton("editPolygon", this._globalEditMode), this._fireEditModeEvent(!0) }, disableGlobalEditMode: function () { var t = this.findLayers(); this._globalEditMode = !1, t.forEach((function (t) { t.pm.disable() })), this.map.on("layeroff", this.layerAddHandler, this), this.Toolbar.toggleButton("editPolygon", this._globalEditMode), this._fireEditModeEvent(!1) }, _fireEditModeEvent: function (t) { this.map.fire("pm:globaleditmodetoggled", { enabled: t, map: this.map }) }, toggleGlobalEditMode: function (t) { this.globalEditEnabled() ? this.disableGlobalEditMode() : this.enableGlobalEditMode(t) } }); e.a = a }, function (t, e, i) { var n = i(52), o = i(109)((function (t, e, i) { n(t, e, i) })); t.exports = o }, function (t, e, i) { var n = i(53), o = i(27), r = i(84), a = i(86), s = i(3), h = i(34), l = i(33); t.exports = function t(e, i, u, c, p) { e !== i && r(i, (function (r, h) { if (p || (p = new n), s(r)) a(e, i, h, u, t, c, p); else { var d = c ? c(l(e, h), r, h + "", e, i, p) : void 0; void 0 === d && (d = r), o(e, h, d) } }), h) } }, function (t, e, i) { var n = i(9), o = i(59), r = i(60), a = i(61), s = i(62), h = i(63); function l(t) { var e = this.__data__ = new n(t); this.size = e.size } l.prototype.clear = o, l.prototype["delete"] = r, l.prototype.get = a, l.prototype.has = s, l.prototype.set = h, t.exports = l }, function (t, e) { t.exports = function () { this.__data__ = [], this.size = 0 } }, function (t, e, i) { var n = i(10), o = Array.prototype.splice; t.exports = function (t) { var e = this.__data__, i = n(e, t); return !(i < 0 || (i == e.length - 1 ? e.pop() : o.call(e, i, 1), --this.size, 0)) } }, function (t, e, i) { var n = i(10); t.exports = function (t) { var e = this.__data__, i = n(e, t); return i < 0 ? void 0 : e[i][1] } }, function (t, e, i) { var n = i(10); t.exports = function (t) { return n(this.__data__, t) > -1 } }, function (t, e, i) { var n = i(10); t.exports = function (t, e) { var i = this.__data__, o = n(i, t); return o < 0 ? (++this.size, i.push([t, e])) : i[o][1] = e, this } }, function (t, e, i) { var n = i(9); t.exports = function () { this.__data__ = new n, this.size = 0 } }, function (t, e) { t.exports = function (t) { var e = this.__data__, i = e["delete"](t); return this.size = e.size, i } }, function (t, e) { t.exports = function (t) { return this.__data__.get(t) } }, function (t, e) { t.exports = function (t) { return this.__data__.has(t) } }, function (t, e, i) { var n = i(9), o = i(24), r = i(26), a = 200; t.exports = function (t, e) { var i = this.__data__; if (i instanceof n) { var s = i.__data__; if (!o || s.length < a - 1) return s.push([t, e]), this.size = ++i.size, this; i = this.__data__ = new r(s) } return i.set(t, e), this.size = i.size, this } }, function (t, e, i) { var n = i(15), o = i(68), r = i(3), a = i(70), s = /^\[object .+?Constructor\]$/, h = Function.prototype, l = Object.prototype, u = h.toString, c = l.hasOwnProperty, p = RegExp("^" + u.call(c).replace(/[\\^$.*+?()[\]{}|]/g, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"); t.exports = function (t) { return !(!r(t) || o(t)) && (n(t) ? p : s).test(a(t)) } }, function (t, e) { var i; i = function () { return this }(); try { i = i || Function("return this")() || (0, eval)("this") } catch (n) { "object" == typeof window && (i = window) } t.exports = i }, function (t, e, i) { var n = i(16), o = Object.prototype, r = o.hasOwnProperty, a = o.toString, s = n ? n.toStringTag : void 0; t.exports = function (t) { var e = r.call(t, s), i = t[s]; try { t[s] = void 0; var n = !0 } catch (h) { } var o = a.call(t); return n && (e ? t[s] = i : delete t[s]), o } }, function (t, e) { var i = Object.prototype.toString; t.exports = function (t) { return i.call(t) } }, function (t, e, i) { var n = i(69), o = function () { var t = /[^.]+$/.exec(n && n.keys && n.keys.IE_PROTO || ""); return t ? "Symbol(src)_1." + t : "" }(); t.exports = function (t) { return !!o && o in t } }, function (t, e, i) { var n = i(4)["__core-js_shared__"]; t.exports = n }, function (t, e) { var i = Function.prototype.toString; t.exports = function (t) { if (null != t) { try { return i.call(t) } catch (e) { } try { return t + "" } catch (e) { } } return "" } }, function (t, e) { t.exports = function (t, e) { return null == t ? void 0 : t[e] } }, function (t, e, i) { var n = i(73), o = i(9), r = i(24); t.exports = function () { this.size = 0, this.__data__ = { hash: new n, map: new (r || o), string: new n } } }, function (t, e, i) { var n = i(74), o = i(75), r = i(76), a = i(77), s = i(78); function h(t) { var e = -1, i = null == t ? 0 : t.length; for (this.clear(); ++e < i;) { var n = t[e]; this.set(n[0], n[1]) } } h.prototype.clear = n, h.prototype["delete"] = o, h.prototype.get = r, h.prototype.has = a, h.prototype.set = s, t.exports = h }, function (t, e, i) { var n = i(12); t.exports = function () { this.__data__ = n ? n(null) : {}, this.size = 0 } }, function (t, e) { t.exports = function (t) { var e = this.has(t) && delete this.__data__[t]; return this.size -= e ? 1 : 0, e } }, function (t, e, i) { var n = i(12), o = "__lodash_hash_undefined__", r = Object.prototype.hasOwnProperty; t.exports = function (t) { var e = this.__data__; if (n) { var i = e[t]; return i === o ? void 0 : i } return r.call(e, t) ? e[t] : void 0 } }, function (t, e, i) { var n = i(12), o = Object.prototype.hasOwnProperty; t.exports = function (t) { var e = this.__data__; return n ? void 0 !== e[t] : o.call(e, t) } }, function (t, e, i) { var n = i(12), o = "__lodash_hash_undefined__"; t.exports = function (t, e) { var i = this.__data__; return this.size += this.has(t) ? 0 : 1, i[t] = n && void 0 === e ? o : e, this } }, function (t, e, i) { var n = i(13); t.exports = function (t) { var e = n(this, t)["delete"](t); return this.size -= e ? 1 : 0, e } }, function (t, e) { t.exports = function (t) { var e = typeof t; return "string" == e || "number" == e || "symbol" == e || "boolean" == e ? "__proto__" !== t : null === t } }, function (t, e, i) { var n = i(13); t.exports = function (t) { return n(this, t).get(t) } }, function (t, e, i) { var n = i(13); t.exports = function (t) { return n(this, t).has(t) } }, function (t, e, i) { var n = i(13); t.exports = function (t, e) { var i = n(this, t), o = i.size; return i.set(t, e), this.size += i.size == o ? 0 : 1, this } }, function (t, e, i) { var n = i(85)(); t.exports = n }, function (t, e) { t.exports = function (t) { return function (e, i, n) { for (var o = -1, r = Object(e), a = n(e), s = a.length; s--;) { var h = a[t ? s : ++o]; if (!1 === i(r[h], h, r)) break } return e } } }, function (t, e, i) { var n = i(27), o = i(87), r = i(88), a = i(91), s = i(92), h = i(19), l = i(6), u = i(96), c = i(31), p = i(15), d = i(3), f = i(98), _ = i(32), m = i(33), g = i(102); t.exports = function (t, e, i, v, y, b, L) { var w = m(t, i), x = m(e, i), k = L.get(x); if (k) n(t, i, k); else { var M = b ? b(w, x, i + "", t, e, L) : void 0, P = void 0 === M; if (P) { var C = l(x), T = !C && c(x), S = !C && !T && _(x); M = x, C || T || S ? l(w) ? M = w : u(w) ? M = a(w) : T ? (P = !1, M = o(x, !0)) : S ? (P = !1, M = r(x, !0)) : M = [] : f(x) || h(x) ? (M = w, h(w) ? M = g(w) : d(w) && !p(w) || (M = s(x))) : P = !1 } P && (L.set(x, M), y(M, x, v, b, L), L["delete"](x)), n(t, i, M) } } }, function (t, e, i) { (function (t) { var n = i(4), o = "object" == typeof e && e && !e.nodeType && e, r = o && "object" == typeof t && t && !t.nodeType && t, a = r && r.exports === o ? n.Buffer : void 0, s = a ? a.allocUnsafe : void 0; t.exports = function (t, e) { if (e) return t.slice(); var i = t.length, n = s ? s(i) : new t.constructor(i); return t.copy(n), n } }).call(e, i(18)(t)) }, function (t, e, i) { var n = i(89); t.exports = function (t, e) { var i = e ? n(t.buffer) : t.buffer; return new t.constructor(i, t.byteOffset, t.length) } }, function (t, e, i) { var n = i(90); t.exports = function (t) { var e = new t.constructor(t.byteLength); return new n(e).set(new n(t)), e } }, function (t, e, i) { var n = i(4).Uint8Array; t.exports = n }, function (t, e) { t.exports = function (t, e) { var i = -1, n = t.length; for (e || (e = Array(n)); ++i < n;)e[i] = t[i]; return e } }, function (t, e, i) { var n = i(93), o = i(29), r = i(30); t.exports = function (t) { return "function" != typeof t.constructor || r(t) ? {} : n(o(t)) } }, function (t, e, i) { var n = i(3), o = Object.create, r = function () { function t() { } return function (e) { if (!n(e)) return {}; if (o) return o(e); t.prototype = e; var i = new t; return t.prototype = void 0, i } }(); t.exports = r }, function (t, e) { t.exports = function (t, e) { return function (i) { return t(e(i)) } } }, function (t, e, i) { var n = i(7), o = i(5), r = "[object Arguments]"; t.exports = function (t) { return o(t) && n(t) == r } }, function (t, e, i) { var n = i(20), o = i(5); t.exports = function (t) { return o(t) && n(t) } }, function (t, e) { t.exports = function () { return !1 } }, function (t, e, i) { var n = i(7), o = i(29), r = i(5), a = "[object Object]", s = Function.prototype, h = Object.prototype, l = s.toString, u = h.hasOwnProperty, c = l.call(Object); t.exports = function (t) { if (!r(t) || n(t) != a) return !1; var e = o(t); if (null === e) return !0; var i = u.call(e, "constructor") && e.constructor; return "function" == typeof i && i instanceof i && l.call(i) == c } }, function (t, e, i) { var n = i(7), o = i(21), r = i(5), a = {}; a["[object Float32Array]"] = a["[object Float64Array]"] = a["[object Int8Array]"] = a["[object Int16Array]"] = a["[object Int32Array]"] = a["[object Uint8Array]"] = a["[object Uint8ClampedArray]"] = a["[object Uint16Array]"] = a["[object Uint32Array]"] = !0, a["[object Arguments]"] = a["[object Array]"] = a["[object ArrayBuffer]"] = a["[object Boolean]"] = a["[object DataView]"] = a["[object Date]"] = a["[object Error]"] = a["[object Function]"] = a["[object Map]"] = a["[object Number]"] = a["[object Object]"] = a["[object RegExp]"] = a["[object Set]"] = a["[object String]"] = a["[object WeakMap]"] = !1, t.exports = function (t) { return r(t) && o(t.length) && !!a[n(t)] } }, function (t, e) { t.exports = function (t) { return function (e) { return t(e) } } }, function (t, e, i) { (function (t) { var n = i(25), o = "object" == typeof e && e && !e.nodeType && e, r = o && "object" == typeof t && t && !t.nodeType && t, a = r && r.exports === o && n.process, s = function () { try { var t = r && r.require && r.require("util").types; return t || a && a.binding && a.binding("util") } catch (e) { } }(); t.exports = s }).call(e, i(18)(t)) }, function (t, e, i) { var n = i(103), o = i(34); t.exports = function (t) { return n(t, o(t)) } }, function (t, e, i) { var n = i(104), o = i(17); t.exports = function (t, e, i, r) { var a = !i; i || (i = {}); for (var s = -1, h = e.length; ++s < h;) { var l = e[s], u = r ? r(i[l], t[l], l, i, t) : void 0; void 0 === u && (u = t[l]), a ? o(i, l, u) : n(i, l, u) } return i } }, function (t, e, i) { var n = i(17), o = i(11), r = Object.prototype.hasOwnProperty; t.exports = function (t, e, i) { var a = t[e]; r.call(t, e) && o(a, i) && (void 0 !== i || e in t) || n(t, e, i) } }, function (t, e, i) { var n = i(106), o = i(19), r = i(6), a = i(31), s = i(22), h = i(32), l = Object.prototype.hasOwnProperty; t.exports = function (t, e) { var i = r(t), u = !i && o(t), c = !i && !u && a(t), p = !i && !u && !c && h(t), d = i || u || c || p, f = d ? n(t.length, String) : [], _ = f.length; for (var m in t) !e && !l.call(t, m) || d && ("length" == m || c && ("offset" == m || "parent" == m) || p && ("buffer" == m || "byteLength" == m || "byteOffset" == m) || s(m, _)) || f.push(m); return f } }, function (t, e) { t.exports = function (t, e) { for (var i = -1, n = Array(t); ++i < t;)n[i] = e(i); return n } }, function (t, e, i) { var n = i(3), o = i(30), r = i(108), a = Object.prototype.hasOwnProperty; t.exports = function (t) { if (!n(t)) return r(t); var e = o(t), i = []; for (var s in t) ("constructor" != s || !e && a.call(t, s)) && i.push(s); return i } }, function (t, e) { t.exports = function (t) { var e = []; if (null != t) for (var i in Object(t)) e.push(i); return e } }, function (t, e, i) { var n = i(110), o = i(117); t.exports = function (t) { return n((function (e, i) { var n = -1, r = i.length, a = r > 1 ? i[r - 1] : void 0, s = r > 2 ? i[2] : void 0; for (a = t.length > 3 && "function" == typeof a ? (r--, a) : void 0, s && o(i[0], i[1], s) && (a = r < 3 ? void 0 : a, r = 1), e = Object(e); ++n < r;) { var h = i[n]; h && t(e, h, n, a) } return e })) } }, function (t, e, i) { var n = i(35), o = i(111), r = i(113); t.exports = function (t, e) { return r(o(t, e, n), t + "") } }, function (t, e, i) { var n = i(112), o = Math.max; t.exports = function (t, e, i) { return e = o(void 0 === e ? t.length - 1 : e, 0), function () { for (var r = arguments, a = -1, s = o(r.length - e, 0), h = Array(s); ++a < s;)h[a] = r[e + a]; a = -1; for (var l = Array(e + 1); ++a < e;)l[a] = r[a]; return l[e] = i(h), n(t, this, l) } } }, function (t, e) { t.exports = function (t, e, i) { switch (i.length) { case 0: return t.call(e); case 1: return t.call(e, i[0]); case 2: return t.call(e, i[0], i[1]); case 3: return t.call(e, i[0], i[1], i[2]) }return t.apply(e, i) } }, function (t, e, i) { var n = i(114), o = i(116)(n); t.exports = o }, function (t, e, i) { var n = i(115), o = i(28), r = i(35), a = o ? function (t, e) { return o(t, "toString", { configurable: !0, enumerable: !1, value: n(e), writable: !0 }) } : r; t.exports = a }, function (t, e) { t.exports = function (t) { return function () { return t } } }, function (t, e) { var i = 800, n = 16, o = Date.now; t.exports = function (t) { var e = 0, r = 0; return function () { var a = o(), s = n - (a - r); if (r = a, s > 0) { if (++e >= i) return arguments[0] } else e = 0; return t.apply(void 0, arguments) } } }, function (t, e, i) { var n = i(11), o = i(20), r = i(22), a = i(3); t.exports = function (t, e, i) { if (!a(i)) return !1; var s = typeof e; return !!("number" == s ? o(i) && r(e, i.length) : "string" == s && e in i) && n(i[e], t) } }, function (t, e) { t.exports = { tooltips: { placeMarker: "Click to place marker", firstVertex: "Click to place first vertex", continueLine: "Click to continue drawing", finishLine: "Click any existing marker to finish", finishPoly: "Click first marker to finish", finishRect: "Click to finish", startCircle: "Click to place circle center", finishCircle: "Click to finish circle", placeCircleMarker: "Click to place circle marker" }, actions: { finish: "Finish", cancel: "Cancel", removeLastVertex: "Remove Last Vertex" }, buttonTitles: { drawMarkerButton: "Draw Marker", drawPolyButton: "Draw Polygons", drawLineButton: "Draw Polyline", drawCircleButton: "Draw Circle", drawRectButton: "Draw Rectangle", editButton: "Edit Layers", dragButton: "Drag Layers", cutButton: "Cut Layers", deleteButton: "Remove Layers", drawCircleMarkerButton: "Draw Circle Marker" } } }, function (t, e) { t.exports = { tooltips: { placeMarker: "Platziere den Marker mit Klick", firstVertex: "Platziere den ersten Marker mit Klick", continueLine: "Klicke, um weiter zu zeichnen", finishLine: "Beende mit Klick auf existierenden Marker", finishPoly: "Beende mit Klick auf ersten Marker", finishRect: "Beende mit Klick", startCircle: "Platziere das Kreiszentrum mit Klick", finishCircle: "Beende den Kreis mit Klick", placeCircleMarker: "Platziere den Kreismarker mit Klick" }, actions: { finish: "Beenden", cancel: "Abbrechen", removeLastVertex: "Letzten Vertex löschen" }, buttonTitles: { drawMarkerButton: "Marker zeichnen", drawPolyButton: "Polygon zeichnen", drawLineButton: "Polyline zeichnen", drawCircleButton: "Kreis zeichnen", drawRectButton: "Rechteck zeichnen", editButton: "Layer editieren", dragButton: "Layer bewegen", cutButton: "Layer schneiden", deleteButton: "Layer löschen", drawCircleMarkerButton: "Kreismarker zeichnen" } } }, function (t, e) { t.exports = { tooltips: { placeMarker: "Clicca per posizionare un Marker", firstVertex: "Clicca per posizionare il primo vertice", continueLine: "Clicca per continuare a disegnare", finishLine: "Clicca qualsiasi marker esistente per terminare", finishPoly: "Clicca il primo marker per terminare", finishRect: "Clicca per terminare", startCircle: "Clicca per posizionare il punto centrale del cerchio", finishCircle: "Clicca per terminare il cerchio", placeCircleMarker: "Clicca per posizionare un Marker del cherchio" }, actions: { finish: "Termina", cancel: "Annulla", removeLastVertex: "Rimuovi l'ultimo vertice" }, buttonTitles: { drawMarkerButton: "Disegna Marker", drawPolyButton: "Disegna Poligoni", drawLineButton: "Disegna Polilinea", drawCircleButton: "Disegna Cerchio", drawRectButton: "Disegna Rettangolo", editButton: "Modifica Livelli", dragButton: "Sposta Livelli", cutButton: "Ritaglia Livelli", deleteButton: "Elimina Livelli", drawCircleMarkerButton: "Disegna Marker del Cherchio" } } }, function (t, e) { t.exports = { tooltips: { placeMarker: "Adaugă un punct", firstVertex: "Apasă aici pentru a adăuga primul Vertex", continueLine: "Apasă aici pentru a continua desenul", finishLine: "Apasă pe orice obiect pentru a finisa desenul", finishPoly: "Apasă pe primul obiect pentru a finisa", finishRect: "Apasă pentru a finisa", startCircle: "Apasă pentru a desena un cerc", finishCircle: "Apasă pentru a finisa un cerc", placeCircleMarker: "Adaugă un punct" }, actions: { finish: "Termină", cancel: "Anulează", removeLastVertex: "Șterge ultimul Vertex" }, buttonTitles: { drawMarkerButton: "Adaugă o bulină", drawPolyButton: "Desenează un poligon", drawLineButton: "Desenează o linie", drawCircleButton: "Desenează un cerc", drawRectButton: "Desenează un dreptunghi", editButton: "Editează straturile", dragButton: "Mută straturile", cutButton: "Taie straturile", deleteButton: "Șterge straturile", placeCircleMarker: "Adaugă o bulină" } } }, function (t, e) { t.exports = { tooltips: { placeMarker: "Щелкните, чтобы поместить маркер", firstVertex: "Нажмите, чтобы поместить первый объект", continueLine: "Нажмите, чтобы продолжить рисование", finishLine: "Щелкните любой существующий маркер для завершения", finishPoly: "Выберите первую точку, чтобы закончить", finishRect: "Нажмите, чтобы закончить", startCircle: "Нажмите чтобы добавить круг", finishCircle: "Нажмите чтобы закончить круг", placeCircleMarker: "Click to place circle marker" }, actions: { finish: "Заканчивать", cancel: "Отмена", removeLastVertex: "Удалить последний объект на карте" }, buttonTitles: { drawMarkerButton: "Добавить маркер", drawPolyButton: "Рисовать полигон", drawLineButton: "Рисовать Полилинию", drawCircleButton: "Рисовать круг", drawRectButton: "Рисовать Прямоугольник", editButton: "Редактировать слой", dragButton: "Перетаскивать слой", cutButton: "Вырезать слой", deleteButton: "Удалить слой", placeCircleMarker: "Щелкните, чтобы поместить маркер" } } }, function (t, e) { t.exports = { tooltips: { placeMarker: "Presiona para colocar un marcador", firstVertex: "Presiona para colocar el primer vértice", continueLine: "Presiona para continuar dibujando", finishLine: "Presiona cualquier marcador existente para finalizar", finishPoly: "Presiona el primer marcador para finalizar", finishRect: "Presiona para finalizar", startCircle: "Presiona para colocar el centro del circulo", finishCircle: "Presiona para finalizar el circulo", placeCircleMarker: "Presiona para colocar un marcador de circulo" }, actions: { finish: "Finalizar", cancel: "Cancelar", removeLastVertex: "Remover ultimo vértice" }, buttonTitles: { drawMarkerButton: "Dibujar Marcador", drawPolyButton: "Dibujar Polígono", drawLineButton: "Dibujar Línea", drawCircleButton: "Dibujar Circulo", drawRectButton: "Dibujar Rectángulo", editButton: "Editar Capas", dragButton: "Arrastrar Capas", cutButton: "Cortar Capas", deleteButton: "Remover Capas", drawCircleMarkerButton: "Dibujar Marcador de Circulo" } } }, function (t, e) { t.exports = { tooltips: { placeMarker: "Klik om een marker te plaatsen", firstVertex: "Klik om het eerste punt te plaatsen", continueLine: "Klik om te blijven tekenen", finishLine: "Klik op een bestaand punt om te beëindigen", finishPoly: "Klik op het eerst punt om te beëindigen", finishRect: "Klik om te beëindigen", startCircle: "Klik om het middelpunt te plaatsen", finishCircle: "Klik om de cirkel te beëindigen", placeCircleMarker: "Klik om een marker te plaatsen" }, actions: { finish: "Bewaar", cancel: "Annuleer", removeLastVertex: "Verwijder laatste punt" }, buttonTitles: { drawMarkerButton: "Plaats Marker", drawPolyButton: "Teken een vlak", drawLineButton: "Teken een lijn", drawCircleButton: "Teken een cirkel", drawRectButton: "Teken een vierkant", editButton: "Bewerk", dragButton: "Verplaats", cutButton: "Knip", deleteButton: "Verwijder", drawCircleMarkerButton: "Plaats Marker" } } }, function (t, e) { t.exports = { tooltips: { placeMarker: "Cliquez pour placer un marqueur", firstVertex: "Cliquez pour placer le premier sommet", continueLine: "Cliquez pour continuer à dessiner", finishLine: "Cliquez sur n'importe quel marqueur pour terminer", finishPoly: "Cliquez sur le premier marqueur pour terminer", finishRect: "Cliquez pour terminer", startCircle: "Cliquez pour placer le centre du cercle", finishCircle: "Cliquez pour finir le cercle" }, actions: { finish: "Terminer", cancel: "Annuler", removeLastVertex: "Retirer le dernier sommet" }, buttonTitles: { drawMarkerButton: "Placer des marqueurs", drawPolyButton: "Dessiner des polygones", drawLineButton: "Dessiner des polylignes", drawCircleButton: "Dessiner un cercle", drawRectButton: "Dessiner un rectangle", editButton: "Éditer des calques", dragButton: "Déplacer des calques", cutButton: "Couper des calques", deleteButton: "Supprimer des calques" } } }, function (t, e) { t.exports = { tooltips: { placeMarker: "单击放置标记", firstVertex: "单击放置首个顶点", continueLine: "单击继续绘制", finishLine: "单击任何存在的标记以完成", finishPoly: "单击第一个标记以完成", finishRect: "单击完成", startCircle: "单击放置圆心", finishCircle: "单击完成圆形" }, actions: { finish: "完成", cancel: "取消", removeLastVertex: "移除最后的顶点" }, buttonTitles: { drawMarkerButton: "绘制标记", drawPolyButton: "绘制多边形", drawLineButton: "绘制线段", drawCircleButton: "绘制圆形", drawRectButton: "绘制长方形", editButton: "编辑图层", dragButton: "拖拽图层", cutButton: "剪切图层", deleteButton: "删除图层" } } }, function (t, e) { t.exports = { tooltips: { placeMarker: "Clique para posicionar o marcador", firstVertex: "Clique para posicionar o primeiro vértice", continueLine: "Clique para continuar desenhando", finishLine: "Clique em qualquer marcador existente para finalizar", finishPoly: "Clique no primeiro ponto para fechar o polígono", finishRect: "Clique para finalizar", startCircle: "Clique para posicionar o centro do círculo", finishCircle: "Clique para fechar o círculo" }, actions: { finish: "Finalizar", cancel: "Cancelar", removeLastVertex: "Remover último vértice" }, buttonTitles: { drawMarkerButton: "Desenhar um marcador", drawPolyButton: "Desenhar um polígono", drawLineButton: "Desenhar uma polilinha", drawCircleButton: "Desenhar um círculo", drawRectButton: "Desenhar um retângulo", editButton: "Editar camada(s)", dragButton: "Mover camada(s)", cutButton: "Recortar camada(s)", deleteButton: "Remover camada(s)" } } }, function (t, e, i) { "use strict"; var n = i(129), o = i(0); L.Control.PMButton = n.a; var r = L.Class.extend({ options: { drawMarker: !0, drawRectangle: !0, drawPolyline: !0, drawPolygon: !0, drawCircle: !0, drawCircleMarker: !0, editMode: !0, dragMode: !0, cutPolygon: !0, removalMode: !0, position: "topleft" }, initialize: function (t) { this.init(t) }, reinit: function () { var t = this.isVisible; this.removeControls(), this._defineButtons(), t && this.addControls() }, init: function (t) { this.map = t, this.buttons = {}, this.isVisible = !1, this.drawContainer = L.DomUtil.create("div", "leaflet-pm-toolbar leaflet-pm-draw leaflet-bar leaflet-control"), this.editContainer = L.DomUtil.create("div", "leaflet-pm-toolbar leaflet-pm-edit leaflet-bar leaflet-control"), this._defineButtons() }, getButtons: function () { return this.buttons }, addControls: function () { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.options; "undefined" != typeof t.editPolygon && (t.editMode = t.editPolygon), "undefined" != typeof t.deleteLayer && (t.removalMode = t.deleteLayer), L.Util.setOptions(this, t), this.applyIconStyle(), this._showHideButtons(), this.isVisible = !0 }, applyIconStyle: function () { var t = this.getButtons(), e = { geomanIcons: { drawMarker: "control-icon leaflet-pm-icon-marker", drawPolyline: "control-icon leaflet-pm-icon-polyline", drawRectangle: "control-icon leaflet-pm-icon-rectangle", drawPolygon: "control-icon leaflet-pm-icon-polygon", drawCircle: "control-icon leaflet-pm-icon-circle", drawCircleMarker: "control-icon leaflet-pm-icon-circle-marker", editMode: "control-icon leaflet-pm-icon-edit", dragMode: "control-icon leaflet-pm-icon-drag", cutPolygon: "control-icon leaflet-pm-icon-cut", removalMode: "control-icon leaflet-pm-icon-delete" } }; for (var i in t) { var n = t[i]; L.Util.setOptions(n, { className: e.geomanIcons[i] }) } }, removeControls: function () { var t = this.getButtons(); for (var e in t) t[e].remove(); this.isVisible = !1 }, toggleControls: function () { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.options; this.isVisible ? this.removeControls() : this.addControls(t) }, _addButton: function (t, e) { return this.buttons[t] = e, this.options[t] = this.options[t] || !1, this.buttons[t] }, triggerClickOnToggledButtons: function (t) { for (var e in this.buttons) this.buttons[e] !== t && this.buttons[e].toggled() && this.buttons[e]._triggerClick() }, toggleButton: function (t, e) { return "editPolygon" === t && (t = "editMode"), "deleteLayer" === t && (t = "removalMode"), this.triggerClickOnToggledButtons(this.buttons[t]), this.buttons[t].toggle(e) }, _defineButtons: function () { var t = this, e = { className: "control-icon leaflet-pm-icon-marker", title: Object(o.a)("buttonTitles.drawMarkerButton"), jsClass: "Marker", onClick: function () { }, afterClick: function () { t.map.pm.Draw.Marker.toggle() }, doToggle: !0, toggleStatus: !1, disableOtherButtons: !0, position: this.options.position, actions: ["cancel"] }, i = { title: Object(o.a)("buttonTitles.drawPolyButton"), className: "control-icon leaflet-pm-icon-polygon", jsClass: "Polygon", onClick: function () { }, afterClick: function () { t.map.pm.Draw.Polygon.toggle() }, doToggle: !0, toggleStatus: !1, disableOtherButtons: !0, position: this.options.position, actions: ["finish", "removeLastVertex", "cancel"] }, n = { className: "control-icon leaflet-pm-icon-polyline", title: Object(o.a)("buttonTitles.drawLineButton"), jsClass: "Line", onClick: function () { }, afterClick: function () { t.map.pm.Draw.Line.toggle() }, doToggle: !0, toggleStatus: !1, disableOtherButtons: !0, position: this.options.position, actions: ["finish", "removeLastVertex", "cancel"] }, r = { title: Object(o.a)("buttonTitles.drawCircleButton"), className: "control-icon leaflet-pm-icon-circle", jsClass: "Circle", onClick: function () { }, afterClick: function () { t.map.pm.Draw.Circle.toggle() }, doToggle: !0, toggleStatus: !1, disableOtherButtons: !0, position: this.options.position, actions: ["cancel"] }, a = { title: Object(o.a)("buttonTitles.drawCircleMarkerButton"), className: "control-icon leaflet-pm-icon-circle-marker", jsClass: "CircleMarker", onClick: function () { }, afterClick: function () { t.map.pm.Draw.CircleMarker.toggle() }, doToggle: !0, toggleStatus: !1, disableOtherButtons: !0, position: this.options.position, actions: ["cancel"] }, s = { title: Object(o.a)("buttonTitles.drawRectButton"), className: "control-icon leaflet-pm-icon-rectangle", jsClass: "Rectangle", onClick: function () { }, afterClick: function () { t.map.pm.Draw.Rectangle.toggle() }, doToggle: !0, toggleStatus: !1, disableOtherButtons: !0, position: this.options.position, actions: ["cancel"] }, h = { title: Object(o.a)("buttonTitles.editButton"), className: "control-icon leaflet-pm-icon-edit", onClick: function () { }, afterClick: function () { t.map.pm.toggleGlobalEditMode() }, doToggle: !0, toggleStatus: !1, disableOtherButtons: !0, position: this.options.position, tool: "edit", actions: ["cancel"] }, l = { title: Object(o.a)("buttonTitles.dragButton"), className: "control-icon leaflet-pm-icon-drag", onClick: function () { }, afterClick: function () { t.map.pm.toggleGlobalDragMode() }, doToggle: !0, toggleStatus: !1, disableOtherButtons: !0, position: this.options.position, tool: "edit", actions: ["cancel"] }, u = { title: Object(o.a)("buttonTitles.cutButton"), className: "control-icon leaflet-pm-icon-cut", jsClass: "Cut", onClick: function () { }, afterClick: function () { t.map.pm.Draw.Cut.toggle({ snappable: !0, cursorMarker: !0, allowSelfIntersection: !1 }) }, doToggle: !0, toggleStatus: !1, disableOtherButtons: !0, position: this.options.position, tool: "edit", actions: ["finish", "removeLastVertex", "cancel"] }, c = { title: Object(o.a)("buttonTitles.deleteButton"), className: "control-icon leaflet-pm-icon-delete", onClick: function () { }, afterClick: function () { t.map.pm.toggleGlobalRemovalMode() }, doToggle: !0, toggleStatus: !1, disableOtherButtons: !0, position: this.options.position, tool: "edit", actions: ["cancel"] }; this._addButton("drawMarker", new L.Control.PMButton(e)), this._addButton("drawPolyline", new L.Control.PMButton(n)), this._addButton("drawRectangle", new L.Control.PMButton(s)), this._addButton("drawPolygon", new L.Control.PMButton(i)), this._addButton("drawCircle", new L.Control.PMButton(r)), this._addButton("drawCircleMarker", new L.Control.PMButton(a)), this._addButton("editMode", new L.Control.PMButton(h)), this._addButton("dragMode", new L.Control.PMButton(l)), this._addButton("cutPolygon", new L.Control.PMButton(u)), this._addButton("removalMode", new L.Control.PMButton(c)) }, _showHideButtons: function () { this.removeControls(); var t = this.getButtons(); for (var e in t) this.options[e] && (t[e].setPosition(this.options.position), t[e].addTo(this.map)) } }); e.a = r }, function (t, e, i) { "use strict"; var n = i(0), o = L.Control.extend({ options: { position: "topleft" }, initialize: function (t) { this._button = L.Util.setOptions(this, t) }, onAdd: function (t) { return this._map = t, this._container = "edit" === this._button.tool ? this._map.pm.Toolbar.editContainer : this._map.pm.Toolbar.drawContainer, this.buttonsDomNode = this._makeButton(this._button), this._container.appendChild(this.buttonsDomNode), this._container }, onRemove: function () { return this.buttonsDomNode.remove(), this._container }, getText: function () { return this._button.text }, getIconUrl: function () { return this._button.iconUrl }, destroy: function () { this._button = {}, this._update() }, toggle: function (t) { return this._button.toggleStatus = "boolean" == typeof t ? t : !this._button.toggleStatus, this._applyStyleClasses(), this._button.toggleStatus }, toggled: function () { return this._button.toggleStatus }, onCreate: function () { this.toggle(!1) }, _triggerClick: function (t) { this._button.onClick(t), this._clicked(t), this._button.afterClick(t) }, _makeButton: function (t) { var e = this, i = L.DomUtil.create("div", "button-container", this._container), o = L.DomUtil.create("a", "leaflet-buttons-control-button", i), r = L.DomUtil.create("div", "leaflet-pm-actions-container", i), a = t.actions, s = { cancel: { text: Object(n.a)("actions.cancel"), onClick: function () { this._triggerClick() } }, removeLastVertex: { text: Object(n.a)("actions.removeLastVertex"), onClick: function () { this._map.pm.Draw[t.jsClass]._removeLastVertex() } }, finish: { text: Object(n.a)("actions.finish"), onClick: function (e) { this._map.pm.Draw[t.jsClass]._finishShape(e) } } }; a.forEach((function (t) { var i = s[t], n = L.DomUtil.create("a", "leaflet-pm-action action-".concat(t), r); n.innerHTML = i.text, L.DomEvent.addListener(n, "click", i.onClick, e), L.DomEvent.disableClickPropagation(n) })), t.toggleStatus && L.DomUtil.addClass(o, "active"); var h = L.DomUtil.create("div", "control-icon", o); return t.title && h.setAttribute("title", t.title), t.iconUrl && h.setAttribute("src", t.iconUrl), t.className && L.DomUtil.addClass(h, t.className), L.DomEvent.addListener(o, "click", (function () { e._button.disableOtherButtons && e._map.pm.Toolbar.triggerClickOnToggledButtons(e) })), L.DomEvent.addListener(o, "click", this._triggerClick, this), L.DomEvent.disableClickPropagation(o), i }, _applyStyleClasses: function () { this._container && (this._button.toggleStatus ? L.DomUtil.addClass(this.buttonsDomNode, "active") : L.DomUtil.removeClass(this.buttonsDomNode, "active")) }, _clicked: function () { this._button.doToggle && this.toggle() } }); e.a = o }, function (t, e, i) { var n = i(38), o = i(39); t.exports = function (t, e) { for (var i = 0, r = (e = n(e, t)).length; null != t && i < r;)t = t[o(e[i++])]; return i && i == r ? t : void 0 } }, function (t, e, i) { var n = i(6), o = i(23), r = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, a = /^\w*$/; t.exports = function (t, e) { if (n(t)) return !1; var i = typeof t; return !("number" != i && "symbol" != i && "boolean" != i && null != t && !o(t)) || a.test(t) || !r.test(t) || null != e && t in Object(e) } }, function (t, e, i) { var n = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, o = /\\(\\)?/g, r = i(133)((function (t) { var e = []; return 46 === t.charCodeAt(0) && e.push(""), t.replace(n, (function (t, i, n, r) { e.push(n ? r.replace(o, "$1") : i || t) })), e })); t.exports = r }, function (t, e, i) { var n = i(134), o = 500; t.exports = function (t) { var e = n(t, (function (t) { return i.size === o && i.clear(), t })), i = e.cache; return e } }, function (t, e, i) { var n = i(26), o = "Expected a function"; function r(t, e) { if ("function" != typeof t || null != e && "function" != typeof e) throw new TypeError(o); var i = function () { var n = arguments, o = e ? e.apply(this, n) : n[0], r = i.cache; if (r.has(o)) return r.get(o); var a = t.apply(this, n); return i.cache = r.set(o, a) || r, a }; return i.cache = new (r.Cache || n), i } r.Cache = n, t.exports = r }, function (t, e, i) { var n = i(136); t.exports = function (t) { return null == t ? "" : n(t) } }, function (t, e, i) { var n = i(16), o = i(137), r = i(6), a = i(23), s = 1 / 0, h = n ? n.prototype : void 0, l = h ? h.toString : void 0; t.exports = function t(e) { if ("string" == typeof e) return e; if (r(e)) return o(e, t) + ""; if (a(e)) return l ? l.call(e) : ""; var i = e + ""; return "0" == i && 1 / e == -s ? "-0" : i } }, function (t, e) { t.exports = function (t, e) { for (var i = -1, n = null == t ? 0 : t.length, o = Array(n); ++i < n;)o[i] = e(t[i], i, t); return o } }, function (t, e, i) { var n = i(139), o = i(140); t.exports = function (t, e) { return null != t && o(t, e, n) } }, function (t, e) { var i = Object.prototype.hasOwnProperty; t.exports = function (t, e) { return null != t && i.call(t, e) } }, function (t, e, i) { var n = i(38), o = i(19), r = i(6), a = i(22), s = i(21), h = i(39); t.exports = function (t, e, i) { for (var l = -1, u = (e = n(e, t)).length, c = !1; ++l < u;) { var p = h(e[l]); if (!(c = null != t && i(t, p))) break; t = t[p] } return c || ++l != u ? c : !!(u = null == t ? 0 : t.length) && s(u) && a(p, u) && (r(t) || o(t)) } }, function (t, e, i) { "use strict"; var n = i(1), o = i(0); n.a.Marker = n.a.extend({ initialize: function (t) { this._map = t, this._shape = "Marker", this.toolbarButtonName = "drawMarker" }, enable: function (t) { var e = this; L.Util.setOptions(this, t), this._enabled = !0, this._map.on("click", this._createMarker, this), this._map.pm.Toolbar.toggleButton(this.toolbarButtonName, !0), this._hintMarker = L.marker([0, 0], this.options.markerStyle), this._hintMarker._pmTempLayer = !0, this._hintMarker.addTo(this._map), this.options.tooltips && this._hintMarker.bindTooltip(Object(o.a)("tooltips.placeMarker"), { permanent: !0, offset: L.point(0, 10), direction: "bottom", opacity: .8 }).openTooltip(), this._layer = this._hintMarker, this._map.on("mousemove", this._syncHintMarker, this), this._map.fire("pm:drawstart", { shape: this._shape, workingLayer: this._layer }), this._map.eachLayer((function (t) { e.isRelevantMarker(t) && t.pm.enable() })) }, disable: function () { var t = this; this._enabled && (this._map.off("click", this._createMarker, this), this._hintMarker.remove(), this._map.off("mousemove", this._syncHintMarker, this), this._map.eachLayer((function (e) { t.isRelevantMarker(e) && e.pm.disable() })), this._map.fire("pm:drawend", { shape: this._shape }), this._map.pm.Toolbar.toggleButton(this.toolbarButtonName, !1), this.options.snappable && this._cleanupSnapping(), this._enabled = !1) }, isRelevantMarker: function (t) { return t instanceof L.Marker && t.pm && !t._pmTempLayer }, enabled: function () { return this._enabled }, toggle: function (t) { this.enabled() ? this.disable() : this.enable(t) }, _createMarker: function (t) { if (t.latlng) { this._hintMarker._snapped || this._hintMarker.setLatLng(t.latlng); var e = this._hintMarker.getLatLng(), i = new L.Marker(e, this.options.markerStyle); i.addTo(this._map), i.pm.enable(), this._map.fire("pm:create", { shape: this._shape, marker: i, layer: i }), this._cleanupSnapping() } }, _syncHintMarker: function (t) { if (this._hintMarker.setLatLng(t.latlng), this.options.snappable) { var e = t; e.target = this._hintMarker, this._handleSnapping(e) } } }) }, function (t, e, i) { "use strict"; var n = i(42), o = i.n(n), r = i(1), a = i(0); r.a.Line = r.a.extend({ initialize: function (t) { this._map = t, this._shape = "Line", this.toolbarButtonName = "drawPolyline", this._doesSelfIntersect = !1 }, enable: function (t) { L.Util.setOptions(this, t), this.options.finishOnDoubleClick && !this.options.finishOn && (this.options.finishOn = "dblclick"), this._enabled = !0, this._layerGroup = new L.LayerGroup, this._layerGroup._pmTempLayer = !0, this._layerGroup.addTo(this._map), this._layer = L.polyline([], this.options.templineStyle), this._layer._pmTempLayer = !0, this._layerGroup.addLayer(this._layer), this._hintline = L.polyline([], this.options.hintlineStyle), this._hintline._pmTempLayer = !0, this._layerGroup.addLayer(this._hintline), this._hintMarker = L.marker(this._map.getCenter(), { icon: L.divIcon({ className: "marker-icon cursor-marker" }) }), this._hintMarker._pmTempLayer = !0, this._layerGroup.addLayer(this._hintMarker), this.options.cursorMarker && L.DomUtil.addClass(this._hintMarker._icon, "visible"), this.options.tooltips && this._hintMarker.bindTooltip(Object(a.a)("tooltips.firstVertex"), { permanent: !0, offset: L.point(0, 10), direction: "bottom", opacity: .8 }).openTooltip(), this._map._container.style.cursor = "crosshair", this._map.on("click", this._createVertex, this), this.options.finishOn && this._map.on(this.options.finishOn, this._finishShape, this), "dblclick" === this.options.finishOn && (this.tempMapDoubleClickZoomState = this._map.doubleClickZoom._enabled, this.tempMapDoubleClickZoomState && this._map.doubleClickZoom.disable()), this._map.on("mousemove", this._syncHintMarker, this), this._hintMarker.on("move", this._syncHintLine, this), this._map.fire("pm:drawstart", { shape: this._shape, workingLayer: this._layer }), this._map.pm.Toolbar.toggleButton(this.toolbarButtonName, !0), this._otherSnapLayers = [] }, disable: function () { this._enabled && (this._enabled = !1, this._map._container.style.cursor = "", this._map.off("click", this._createVertex, this), this._map.off("mousemove", this._syncHintMarker, this), this.options.finishOn && this._map.off(this.options.finishOn, this._finishShape, this), this.tempMapDoubleClickZoomState && this._map.doubleClickZoom.enable(), this._map.removeLayer(this._layerGroup), this._map.fire("pm:drawend", { shape: this._shape }), this._map.pm.Toolbar.toggleButton(this.toolbarButtonName, !1), this.options.snappable && this._cleanupSnapping()) }, enabled: function () { return this._enabled }, toggle: function (t) { this.enabled() ? this.disable() : this.enable(t) }, hasSelfIntersection: function () { return o()(this._layer.toGeoJSON(15)).features.length > 0 }, _syncHintLine: function () { var t = this._layer.getLatLngs(); if (t.length > 0) { var e = t[t.length - 1]; this._hintline.setLatLngs([e, this._hintMarker.getLatLng()]) } }, _syncHintMarker: function (t) { if (this._hintMarker.setLatLng(t.latlng), this.options.snappable) { var e = t; e.target = this._hintMarker, this._handleSnapping(e) } this.options.allowSelfIntersection || this._handleSelfIntersection(!0, t.latlng) }, _handleSelfIntersection: function (t, e) { var i = L.polyline(this._layer.getLatLngs()); t && (e || (e = this._hintMarker.getLatLng()), i.addLatLng(e)); var n = o()(i.toGeoJSON(15)); this._doesSelfIntersect = n.features.length > 0, this._doesSelfIntersect ? this._hintline.setStyle({ color: "red" }) : this._hintline.setStyle(this.options.hintlineStyle) }, _removeLastVertex: function () { var t = this._layer.getLatLngs(), e = t.pop(); if (t.length < 1) this.disable(); else { var i = this._layerGroup.getLayers().filter((function (t) { return t instanceof L.Marker })).filter((function (t) { return !L.DomUtil.hasClass(t._icon, "cursor-marker") })).find((function (t) { return t.getLatLng() === e })); this._layerGroup.removeLayer(i), this._layer.setLatLngs(t), this._syncHintLine() } }, _createVertex: function (t) { if (this.options.allowSelfIntersection || (this._handleSelfIntersection(!0, t.latlng), !this._doesSelfIntersect)) { this._hintMarker._snapped || this._hintMarker.setLatLng(t.latlng); var e = this._hintMarker.getLatLng(); if (e.equals(this._layer.getLatLngs()[0])) this._finishShape(t); else { var i = 0 === this._layer.getLatLngs().length; this._layer.addLatLng(e); var n = this._createMarker(e, i); this._hintline.setLatLngs([e, e]), this._layer.fire("pm:vertexadded", { shape: this._shape, workingLayer: this._layer, marker: n, latlng: e }) } } }, _finishShape: function () { if (this.options.allowSelfIntersection || (this._handleSelfIntersection(!1), !this._doesSelfIntersect)) { var t = this._layer.getLatLngs(); if (!(t.length <= 1)) { var e = L.polyline(t, this.options.pathOptions).addTo(this._map); this.disable(), this._map.fire("pm:create", { shape: this._shape, layer: e }), this.options.snappable && this._cleanupSnapping() } } }, _createMarker: function (t, e) { var i = new L.Marker(t, { draggable: !1, icon: L.divIcon({ className: "marker-icon" }) }); return i._pmTempLayer = !0, this._layerGroup.addLayer(i), i.on("click", this._finishShape, this), e && this._hintMarker.setTooltipContent(Object(a.a)("tooltips.continueLine")), 2 === this._layer.getLatLngs().length && this._hintMarker.setTooltipContent(Object(a.a)("tooltips.finishLine")), i } }) }, function (t, e, i) { "use strict"; var n = i(1), o = i(0); n.a.Polygon = n.a.Line.extend({ initialize: function (t) { this._map = t, this._shape = "Polygon", this.toolbarButtonName = "drawPolygon" }, _finishShape: function (t) { if (this.options.allowSelfIntersection || (this._handleSelfIntersection(!1), !this._doesSelfIntersect)) { var e = this._layer.getLatLngs(); if (console.log(e), !(e.length <= 2)) { t && "dblclick" === t.type && e.splice(e.length - 1, 1); var i = L.polygon(e, this.options.pathOptions).addTo(this._map); this.disable(), this._map.fire("pm:create", { shape: this._shape, layer: i }), this._cleanupSnapping(), this._otherSnapLayers.splice(this._tempSnapLayerIndex, 1), delete this._tempSnapLayerIndex } } }, _createMarker: function (t, e) { var i = new L.Marker(t, { draggable: !1, icon: L.divIcon({ className: "marker-icon" }) }); return i._pmTempLayer = !0, this._layerGroup.addLayer(i), e && (i.on("click", this._finishShape, this), this._tempSnapLayerIndex = this._otherSnapLayers.push(i) - 1, this.options.snappable && this._cleanupSnapping()), e && this._hintMarker.setTooltipContent(Object(o.a)("tooltips.continueLine")), 3 === this._layer.getLatLngs().length && this._hintMarker.setTooltipContent(Object(o.a)("tooltips.finishPoly")), i } }) }, function (t, e, i) { "use strict"; var n = i(1), o = i(0); n.a.Rectangle = n.a.extend({ initialize: function (t) { this._map = t, this._shape = "Rectangle", this.toolbarButtonName = "drawRectangle" }, enable: function (t) { if (L.Util.setOptions(this, t), this._enabled = !0, this._layerGroup = new L.LayerGroup, this._layerGroup._pmTempLayer = !0, this._layerGroup.addTo(this._map), this._layer = L.rectangle([[0, 0], [0, 0]], this.options.pathOptions), this._layer._pmTempLayer = !0, this._startMarker = L.marker([0, 0], { icon: L.divIcon({ className: "marker-icon rect-start-marker" }), draggable: !0, zIndexOffset: 100, opacity: this.options.cursorMarker ? 1 : 0 }), this._startMarker._pmTempLayer = !0, this._layerGroup.addLayer(this._startMarker), this._hintMarker = L.marker([0, 0], { icon: L.divIcon({ className: "marker-icon cursor-marker" }) }), this._hintMarker._pmTempLayer = !0, this._layerGroup.addLayer(this._hintMarker), this.options.tooltips && this._hintMarker.bindTooltip(Object(o.a)("tooltips.firstVertex"), { permanent: !0, offset: L.point(0, 10), direction: "bottom", opacity: .8 }).openTooltip(), this.options.cursorMarker) { L.DomUtil.addClass(this._hintMarker._icon, "visible"), this._styleMarkers = []; for (var e = 0; e < 2; e += 1) { var i = L.marker([0, 0], { icon: L.divIcon({ className: "marker-icon rect-style-marker" }), draggable: !0, zIndexOffset: 100 }); i._pmTempLayer = !0, this._layerGroup.addLayer(i), this._styleMarkers.push(i) } } this._map._container.style.cursor = "crosshair", this._map.on("click", this._placeStartingMarkers, this), this._map.on("mousemove", this._syncHintMarker, this), this._map.fire("pm:drawstart", { shape: this._shape, workingLayer: this._layer }), this._map.pm.Toolbar.toggleButton(this.toolbarButtonName, !0), this._otherSnapLayers = [] }, disable: function () { this._enabled && (this._enabled = !1, this._map._container.style.cursor = "", this._map.off("click", this._finishShape, this), this._map.off("click", this._placeStartingMarkers, this), this._map.off("mousemove", this._syncHintMarker, this), this._map.removeLayer(this._layerGroup), this._map.fire("pm:drawend", { shape: this._shape }), this._map.pm.Toolbar.toggleButton(this.toolbarButtonName, !1), this.options.snappable && this._cleanupSnapping()) }, enabled: function () { return this._enabled }, toggle: function (t) { this.enabled() ? this.disable() : this.enable(t) }, _placeStartingMarkers: function (t) { this._hintMarker._snapped || this._hintMarker.setLatLng(t.latlng); var e = this._hintMarker.getLatLng(); L.DomUtil.addClass(this._startMarker._icon, "visible"), this._startMarker.setLatLng(e), this.options.cursorMarker && this._styleMarkers && this._styleMarkers.forEach((function (t) { L.DomUtil.addClass(t._icon, "visible"), t.setLatLng(e) })), this._map.off("click", this._placeStartingMarkers, this), this._map.on("click", this._finishShape, this), this._hintMarker.setTooltipContent(Object(o.a)("tooltips.finishRect")), this._setRectangleOrigin() }, _setRectangleOrigin: function () { var t = this._startMarker.getLatLng(); t && (this._layerGroup.addLayer(this._layer), this._layer.setLatLngs([t, t]), this._hintMarker.on("move", this._syncRectangleSize, this)) }, _syncHintMarker: function (t) { if (this._hintMarker.setLatLng(t.latlng), this.options.snappable) { var e = t; e.target = this._hintMarker, this._handleSnapping(e) } }, _syncRectangleSize: function () { var t = this, e = this._startMarker.getLatLng(), i = this._hintMarker.getLatLng(); if (this._layer.setBounds([e, i]), this.options.cursorMarker && this._styleMarkers) { var n = []; this._findCorners().forEach((function (e) { e.equals(t._startMarker.getLatLng()) || e.equals(t._hintMarker.getLatLng()) || n.push(e) })), n.forEach((function (e, i) { t._styleMarkers[i].setLatLng(e) })) } }, _finishShape: function (t) { var e = this._startMarker.getLatLng(), i = t.latlng, n = L.rectangle([e, i], this.options.pathOptions).addTo(this._map); this.disable(), this._map.fire("pm:create", { shape: this._shape, layer: n }) }, _findCorners: function () { var t = this._layer.getBounds(); return [t.getNorthWest(), t.getNorthEast(), t.getSouthEast(), t.getSouthWest()] } }) }, function (t, e, i) { "use strict"; var n = i(1), o = i(0); n.a.Circle = n.a.extend({ initialize: function (t) { this._map = t, this._shape = "Circle", this.toolbarButtonName = "drawCircle" }, enable: function (t) { L.Util.setOptions(this, t), this.options.radius = 0, this._enabled = !0, this._layerGroup = new L.LayerGroup, this._layerGroup._pmTempLayer = !0, this._layerGroup.addTo(this._map), this._layer = L.circle([0, 0], this.options.templineStyle), this._layer._pmTempLayer = !0, this._layerGroup.addLayer(this._layer), this._centerMarker = L.marker([0, 0], { icon: L.divIcon({ className: "marker-icon" }), draggable: !1, zIndexOffset: 100 }), this._centerMarker._pmTempLayer = !0, this._layerGroup.addLayer(this._centerMarker), this._hintMarker = L.marker([0, 0], { icon: L.divIcon({ className: "marker-icon cursor-marker" }) }), this._hintMarker._pmTempLayer = !0, this._layerGroup.addLayer(this._hintMarker), this.options.cursorMarker && L.DomUtil.addClass(this._hintMarker._icon, "visible"), this.options.tooltips && this._hintMarker.bindTooltip(Object(o.a)("tooltips.startCircle"), { permanent: !0, offset: L.point(0, 10), direction: "bottom", opacity: .8 }).openTooltip(), this._hintline = L.polyline([], this.options.hintlineStyle), this._hintline._pmTempLayer = !0, this._layerGroup.addLayer(this._hintline), this._map._container.style.cursor = "crosshair", this._map.on("click", this._placeCenterMarker, this), this._map.on("mousemove", this._syncHintMarker, this), this._map.fire("pm:drawstart", { shape: this._shape, workingLayer: this._layer }), this._map.pm.Toolbar.toggleButton(this.toolbarButtonName, !0), this._otherSnapLayers = [] }, disable: function () { this._enabled && (this._enabled = !1, this._map._container.style.cursor = "", this._map.off("click", this._finishShape, this), this._map.off("click", this._placeCenterMarker, this), this._map.off("mousemove", this._syncHintMarker, this), this._map.removeLayer(this._layerGroup), this._map.fire("pm:drawend", { shape: this._shape }), this._map.pm.Toolbar.toggleButton(this.toolbarButtonName, !1), this.options.snappable && this._cleanupSnapping()) }, enabled: function () { return this._enabled }, toggle: function (t) { this.enabled() ? this.disable() : this.enable(t) }, _syncHintLine: function () { var t = this._centerMarker.getLatLng(); this._hintline.setLatLngs([t, this._hintMarker.getLatLng()]) }, _syncCircleRadius: function () { var t = this._centerMarker.getLatLng(), e = this._hintMarker.getLatLng(), i = t.distanceTo(e); this._layer.setRadius(i) }, _syncHintMarker: function (t) { if (this._hintMarker.setLatLng(t.latlng), this.options.snappable) { var e = t; e.target = this._hintMarker, this._handleSnapping(e) } }, _placeCenterMarker: function (t) { this._hintMarker._snapped || this._hintMarker.setLatLng(t.latlng); var e = this._hintMarker.getLatLng(); this._centerMarker.setLatLng(e), this._map.off("click", this._placeCenterMarker, this), this._map.on("click", this._finishShape, this), this._placeCircleCenter() }, _placeCircleCenter: function () { var t = this._centerMarker.getLatLng(); t && (this._layer.setLatLng(t), this._hintMarker.on("move", this._syncHintLine, this), this._hintMarker.on("move", this._syncCircleRadius, this), this._hintMarker.setTooltipContent(Object(o.a)("tooltips.finishCircle")), this._layer.fire("pm:centerplaced", { shape: this._shape, workingLayer: this._layer, latlng: t })) }, _finishShape: function (t) { var e = this._centerMarker.getLatLng(), i = t.latlng, n = e.distanceTo(i), o = Object.assign({}, this.options.pathOptions, { radius: n }), r = L.circle(e, o).addTo(this._map); this.disable(), this._map.fire("pm:create", { shape: this._shape, layer: r }) }, _createMarker: function (t) { var e = new L.Marker(t, { draggable: !1, icon: L.divIcon({ className: "marker-icon" }) }); return e._pmTempLayer = !0, this._layerGroup.addLayer(e), e } }) }, function (t, e, i) { "use strict"; var n = i(1), o = i(0); n.a.CircleMarker = n.a.Marker.extend({ initialize: function (t) { this._map = t, this._shape = "CircleMarker", this.toolbarButtonName = "drawCircleMarker" }, enable: function (t) { var e = this; L.Util.setOptions(this, t), this._enabled = !0, this._map.on("click", this._createMarker, this), this._map.pm.Toolbar.toggleButton(this.toolbarButtonName, !0), this._hintMarker = L.circleMarker([0, 0], this.options.templineStyle), this._hintMarker._pmTempLayer = !0, this._hintMarker.addTo(this._map), this.options.tooltips && this._hintMarker.bindTooltip(Object(o.a)("tooltips.placeCircleMarker"), { permanent: !0, offset: L.point(0, 10), direction: "bottom", opacity: .8 }).openTooltip(), this._layer = this._hintMarker, this._map.on("mousemove", this._syncHintMarker, this), this._map.fire("pm:drawstart", { shape: this._shape, workingLayer: this._layer }), this._map.eachLayer((function (t) { e.isRelevantMarker(t) && t.pm.enable() })) }, isRelevantMarker: function (t) { return t instanceof L.CircleMarker && !(t instanceof L.Circle) && t.pm && !t._pmTempLayer }, _createMarker: function (t) { if (t.latlng) { this._hintMarker._snapped || this._hintMarker.setLatLng(t.latlng); var e = this._hintMarker.getLatLng(), i = L.circleMarker(e, this.options.pathOptions); i.addTo(this._map), i.pm.enable(), this._map.fire("pm:create", { shape: this._shape, marker: i, layer: i }), this._cleanupSnapping() } } }) }, function (t, e, i) { "use strict"; var n = i(148), o = i.n(n), r = i(149), a = i(1); a.a.Cut = a.a.Polygon.extend({ initialize: function (t) { this._map = t, this._shape = "Cut", this.toolbarButtonName = "cutPolygon" }, _cut: function (t) { var e = this, i = this._map._layers; Object.keys(i).map((function (t) { return i[t] })).filter((function (t) { return t.pm })).filter((function (t) { return t instanceof L.Polygon })).filter((function (e) { return e !== t })).filter((function (e) { try { return !!o()(t.toGeoJSON(15), e.toGeoJSON(15)) } catch (i) { return console.error("You cant cut polygons with self-intersections"), !1 } })).forEach((function (i) { var n = Object(r.a)(i.toGeoJSON(15), t.toGeoJSON(15)), o = L.geoJSON(n, i.options).addTo(e._map); o.addTo(e._map), o.pm.enable(e.options), o.pm.disable(), i.fire("pm:cut", { shape: e._shape, layer: o, originalLayer: i }), e._map.fire("pm:cut", { shape: e._shape, layer: o, originalLayer: i }), i._pmTempLayer = !0, t._pmTempLayer = !0, i.remove(), t.remove(), 0 === o.getLayers().length && e._map.pm.removeLayer({ target: o }) })) }, _finishShape: function () { if (this.options.allowSelfIntersection || (this._handleSelfIntersection(!1), !this._doesSelfIntersect)) { var t = this._layer.getLatLngs(), e = L.polygon(t, this.options.pathOptions); this._cut(e), this.disable(), this._cleanupSnapping(), this._otherSnapLayers.splice(this._tempSnapLayerIndex, 1), delete this._tempSnapLayerIndex } } }) }, function (t, e, i) { "use strict"; var n = this && this.__importStar || function (t) { if (t && t.__esModule) return t; var e = {}; if (null != t) for (var i in t) Object.hasOwnProperty.call(t, i) && (e[i] = t[i]); return e["default"] = t, e }; Object.defineProperty(e, "__esModule", { value: !0 }); var o = i(8), r = i(43), a = n(i(44)); e["default"] = function t(e, i, n) { void 0 === n && (n = {}); var s = r.getGeom(e), h = r.getGeom(i); if ("Polygon" === s.type && "Polygon" === h.type) { var l = a.intersection(s.coordinates, h.coordinates); if (null === l || 0 === l.length) return null; if (1 === l.length) { var u = l[0][0][0], c = l[0][0][l[0][0].length - 1]; return u[0] === c[0] && u[1] === c[1] ? o.polygon(l[0], n.properties) : null } return o.multiPolygon(l, n.properties) } if ("MultiPolygon" === s.type) { for (var p = [], d = 0, f = s.coordinates; d < f.length; d++) { var _ = f[d], m = t(r.getGeom(o.polygon(_)), h); if (m) { var g = r.getGeom(m); if ("Polygon" === g.type) p.push(g.coordinates); else { if ("MultiPolygon" !== g.type) throw new Error("intersection is invalid"); p = p.concat(g.coordinates) } } } return 0 === p.length ? null : 1 === p.length ? o.polygon(p[0], n.properties) : o.multiPolygon(p, n.properties) } if ("MultiPolygon" === h.type) return t(h, s); throw new Error("poly1 and poly2 must be either polygons or multiPolygons") } }, function (t, e, i) { "use strict"; var n = i(44), o = (i.n(n), i(150)), r = i.n(o), a = i(8), s = (i.n(a), i(43)), h = (i.n(s), i(45)); function l(t) { switch (t.type) { case "Polygon": return r()(t) > 1 ? t : null; case "MultiPolygon": var e = []; if (Object(h.flattenEach)(t, (function (t) { r()(t) > 1 && e.push(t.geometry.coordinates) })), e.length) return { type: "MultiPolygon", coordinates: e } } } i.n(h), e.a = function (t, e) { var i = Object(s.getGeom)(t), o = Object(s.getGeom)(e), r = t.properties || {}; if (i = l(i), o = l(o), !i) return null; if (!o) return Object(a.feature)(i, r); var h = n.diff(i.coordinates, o.coordinates); return 0 === h.length ? null : 1 === h.length ? Object(a.polygon)(h[0], r) : Object(a.multiPolygon)(h, r) } }, function (t, e, i) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }); var n = i(45), o = 6378137; function r(t) { var e = 0; if (t && t.length > 0) { e += Math.abs(a(t[0])); for (var i = 1; i < t.length; i++)e -= Math.abs(a(t[i])) } return e } function a(t) { var e, i, n, r, a, h, l = 0, u = t.length; if (u > 2) { for (h = 0; h < u; h++)h === u - 2 ? (n = u - 2, r = u - 1, a = 0) : h === u - 1 ? (n = u - 1, r = 0, a = 1) : (n = h, r = h + 1, a = h + 2), e = t[n], i = t[r], l += (s(t[a][0]) - s(e[0])) * Math.sin(s(i[1])); l = l * o * o / 2 } return l } function s(t) { return t * Math.PI / 180 } e["default"] = function (t) { return n.geomReduce(t, (function (t, e) { return t + function (t) { var e, i = 0; switch (t.type) { case "Polygon": return r(t.coordinates); case "MultiPolygon": for (e = 0; e < t.coordinates.length; e++)i += r(t.coordinates[e]); return i; case "Point": case "MultiPoint": case "LineString": case "MultiLineString": return 0 }return 0 }(e) }), 0) } }, function (t, e, i) { "use strict"; var n = { enableLayerDrag: function () { if (this._layer instanceof L.Marker) this._layer.dragging.enable(); else { this._tempDragCoord = null; var t = this._layer._path ? this._layer._path : this._layer._renderer._container; L.DomUtil.addClass(t, "leaflet-pm-draggable"), this._originalMapDragState = this._layer._map.dragging._enabled, this._safeToCacheDragState = !0, this._layer.on("mousedown", this._dragMixinOnMouseDown, this) } }, disableLayerDrag: function () { if (this._layer instanceof L.Marker) this._layer.dragging.disable(); else { var t = this._layer._path ? this._layer._path : this._layer._renderer._container; L.DomUtil.removeClass(t, "leaflet-pm-draggable"), this._safeToCacheDragState = !1, this._layer.off("mousedown", this._dragMixinOnMouseDown, this) } }, _dragMixinOnMouseUp: function () { var t = this, e = this._layer._path ? this._layer._path : this._layer._renderer._container; return this._originalMapDragState && this._layer._map.dragging.enable(), this._safeToCacheDragState = !0, this._layer._map.off("mousemove", this._dragMixinOnMouseMove, this), this._layer._map.off("mouseup", this._dragMixinOnMouseUp, this), !!this._dragging && (window.setTimeout((function () { t._dragging = !1, L.DomUtil.removeClass(e, "leaflet-pm-dragging"), t._layer.fire("pm:dragend"), t._fireEdit() }), 10), !0) }, _dragMixinOnMouseMove: function (t) { var e = this._layer._path ? this._layer._path : this._layer._renderer._container; this._dragging || (this._dragging = !0, L.DomUtil.addClass(e, "leaflet-pm-dragging"), this._layer.bringToFront(), this._originalMapDragState && this._layer._map.dragging.disable(), this._layer.fire("pm:dragstart")), this._onLayerDrag(t) }, _dragMixinOnMouseDown: function (t) { t.originalEvent.button > 0 || (this._safeToCacheDragState && (this._originalMapDragState = this._layer._map.dragging._enabled, this._safeToCacheDragState = !1), this._tempDragCoord = t.latlng, this._layer._map.on("mouseup", this._dragMixinOnMouseUp, this), this._layer._map.on("mousemove", this._dragMixinOnMouseMove, this)) }, dragging: function () { return this._dragging }, _onLayerDrag: function (t) { var e = t.latlng, i = e.lat - this._tempDragCoord.lat, n = e.lng - this._tempDragCoord.lng; if (this._layer instanceof L.CircleMarker) this._layer.setLatLng(e); else { var o = function t(e) { return e.map((function (e) { return Array.isArray(e) ? t(e) : { lat: e.lat + i, lng: e.lng + n } })) }(this._layer.getLatLngs()); this._layer.setLatLngs(o) } this._tempDragCoord = e, this._layer.fire("pm:drag", t) } }; e.a = n }, function (t, e, i) { "use strict"; i(2).a.LayerGroup = L.Class.extend({ initialize: function (t) { var e = this; this._layerGroup = t, this._layers = this.findLayers(), this._layers.forEach((function (t) { return e._initLayer(t) })), this._layerGroup.on("layeradd", (function (t) { t.target._pmTempLayer || (e._layers = e.findLayers(), t.layer.pm && e._initLayer(t.layer), t.target.pm.enabled() && e.enable(e.getOptions())) })) }, findLayers: function () { var t = this._layerGroup.getLayers(); return (t = (t = t.filter((function (t) { return !(t instanceof L.LayerGroup) }))).filter((function (t) { return !!t.pm }))).filter((function (t) { return !t._pmTempLayer })) }, _initLayer: function (t) { var e = this;["pm:edit", "pm:update", "pm:remove", "pm:dragstart", "pm:drag", "pm:dragend", "pm:snap", "pm:unsnap", "pm:cut", "pm:intersect", "pm:raiseMarkers", "pm:markerdragend", "pm:markerdragstart", "pm:vertexadded", "pm:vertexremoved", "pm:centerplaced"].forEach((function (i) { t.on(i, e._fireEvent, e) })), t.pm._layerGroup = this._layerGroup }, _fireEvent: function (t) { this._layerGroup.fireEvent(t.type, t) }, toggleEdit: function (t) { this._options = t, this._layers.forEach((function (e) { e.pm.toggleEdit(t) })) }, enable: function (t) { this._options = t, this._layers.forEach((function (e) { e.pm.enable(t) })) }, disable: function () { this._layers.forEach((function (t) { t.pm.disable() })) }, enabled: function () { var t = this._layers.find((function (t) { return t.pm.enabled() })); return !!t }, dragging: function () { var t = this._layers.find((function (t) { return t.pm.dragging() })); return !!t }, getOptions: function () { return this._options } }) }, function (t, e, i) { "use strict"; var n = i(2); n.a.Marker = n.a.extend({ initialize: function (t) { this._layer = t, this._enabled = !1, this._layer.on("dragend", this._onDragEnd, this) }, toggleEdit: function (t) { this.enabled() ? this.disable() : this.enable(t) }, enable: function () { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : { draggable: !0, snappable: !0 }; L.Util.setOptions(this, t), this._map = this._layer._map, this.enabled() || (this._enabled = !0, this.options.preventMarkerRemoval || this._layer.on("contextmenu", this._removeMarker, this), this.options.draggable && this._layer.dragging.enable(), this.options.snappable && this._initSnappableMarkers()) }, enabled: function () { return this._enabled }, disable: function () { this._enabled = !1, this._layer.dragging && this._layer.dragging.disable(), this._layer.off("contextmenu", this._removeMarker, this), this._layerEdited && this._layer.fire("pm:update", {}), this._layerEdited = !1 }, _removeMarker: function (t) { var e = t.target; e.remove(), e.fire("pm:remove") }, _onDragEnd: function (t) { t.target.fire("pm:edit"), this._layerEdited = !0 }, _initSnappableMarkers: function () { var t = this._layer; this.options.snapDistance = this.options.snapDistance || 30, t.off("drag", this._handleSnapping, this), t.on("drag", this._handleSnapping, this), t.off("dragend", this._cleanupSnapping, this), t.on("dragend", this._cleanupSnapping, this), t.off("pm:dragstart", this._unsnap, this), t.on("pm:dragstart", this._unsnap, this) } }) }, function (t, e, i) { "use strict"; var n = i(42), o = i.n(n), r = i(37), a = i.n(r), s = i(2), h = i(41), l = i(0); s.a.Line = s.a.extend({ initialize: function (t) { this._layer = t, this._enabled = !1 }, toggleEdit: function (t) { return this.enabled() ? this.disable() : this.enable(t), this.enabled() }, enable: function (t) { L.Util.setOptions(this, t), this._map = this._layer._map, this._map && (this.enabled() || this.disable(), this._enabled = !0, this._initMarkers(), this._layer.on("remove", this._onLayerRemove, this), this.options.allowSelfIntersection || this._layer.on("pm:vertexremoved", this._handleSelfIntersectionOnVertexRemoval, this), this.options.allowSelfIntersection || (this.cachedColor || (this.cachedColor = this._layer.options.color), this.isRed = !1, this._handleLayerStyle())) }, _onLayerRemove: function (t) { this.disable(t.target) }, enabled: function () { return this._enabled }, disable: function () { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this._layer; if (!this.enabled()) return !1; if (t.pm._dragging) return !1; t.pm._enabled = !1, t.pm._markerGroup.clearLayers(), t.off("mousedown"), t.off("mouseup"), this._layer.off("remove", this._onLayerRemove, this), this.options.allowSelfIntersection || this._layer.off("pm:vertexremoved", this._handleSelfIntersectionOnVertexRemoval); var e = t._path ? t._path : this._layer._renderer._container; return L.DomUtil.removeClass(e, "leaflet-pm-draggable"), this.hasSelfIntersection() && L.DomUtil.removeClass(e, "leaflet-pm-invalid"), this._layerEdited && this._layer.fire("pm:update", {}), this._layerEdited = !1, !0 }, hasSelfIntersection: function () { return o()(this._layer.toGeoJSON(15)).features.length > 0 }, _handleSelfIntersectionOnVertexRemoval: function () { this._handleLayerStyle(!0), this.hasSelfIntersection() && (this._layer.setLatLngs(this._coordsBeforeEdit), this._coordsBeforeEdit = null, this._initMarkers()) }, _handleLayerStyle: function (t) { var e = this, i = this._layer; if (this.hasSelfIntersection()) { if (this.isRed) return; t ? (i.setStyle({ color: "red" }), this.isRed = !0, window.setTimeout((function () { i.setStyle({ color: e.cachedColor }), e.isRed = !1 }), 200)) : (i.setStyle({ color: "red" }), this.isRed = !0), this._layer.fire("pm:intersect", { intersection: o()(this._layer.toGeoJSON(15)) }) } else i.setStyle({ color: this.cachedColor }), this.isRed = !1 }, _initMarkers: function () { var t = this, e = this._map, i = this._layer.getLatLngs(); this._markerGroup && this._markerGroup.clearLayers(), this._markerGroup = new L.LayerGroup, this._markerGroup._pmTempLayer = !0, e.addLayer(this._markerGroup), this._markers = function e(i) { if (Array.isArray(i[0])) return i.map(e, t); var n = i.map(t._createMarker, t); return i.map((function (e, o) { var r = t.isPolygon() ? (o + 1) % i.length : o + 1; return t._createMiddleMarker(n[o], n[r]) })), n }(i), this.options.snappable && this._initSnappableMarkers() }, _createMarker: function (t) { var e = new L.Marker(t, { draggable: !0, icon: L.divIcon({ className: "marker-icon" }) }); return e._pmTempLayer = !0, e.on("dragstart", this._onMarkerDragStart, this), e.on("move", this._onMarkerDrag, this), e.on("dragend", this._onMarkerDragEnd, this), this.options.preventMarkerRemoval || e.on("contextmenu", this._removeMarker, this), this._markerGroup.addLayer(e), e }, _createMiddleMarker: function (t, e) { var i = this; if (!t || !e) return !1; var n = h.a.calcMiddleLatLng(this._map, t.getLatLng(), e.getLatLng()), o = this._createMarker(n), r = L.divIcon({ className: "marker-icon marker-icon-middle" }); return o.setIcon(r), t._middleMarkerNext = o, e._middleMarkerPrev = o, o.on("click", (function () { var n = L.divIcon({ className: "marker-icon" }); o.setIcon(n), i._addMarker(o, t, e) })), o.on("movestart", (function () { o.on("moveend", (function () { var t = L.divIcon({ className: "marker-icon" }); o.setIcon(t), o.off("moveend") })), i._addMarker(o, t, e) })), o }, _addMarker: function (t, e, i) { t.off("movestart"), t.off("click"); var n = t.getLatLng(), o = this._layer._latlngs, r = this.findDeepMarkerIndex(this._markers, e), s = r.indexPath, h = r.index, l = r.parentPath, u = s.length > 1 ? a()(o, l) : o, c = s.length > 1 ? a()(this._markers, l) : this._markers; u.splice(h + 1, 0, n), c.splice(h + 1, 0, t), this._layer.setLatLngs(o), this._createMiddleMarker(e, t), this._createMiddleMarker(t, i), this._fireEdit(), this._layer.fire("pm:vertexadded", { layer: this._layer, marker: t, indexPath: this.findDeepMarkerIndex(this._markers, t).indexPath, latlng: n }), this.options.snappable && this._initSnappableMarkers() }, _removeMarker: function (t) { if (!this.options.allowSelfIntersection) { var e = this._layer.getLatLngs(); this._coordsBeforeEdit = JSON.parse(JSON.stringify(e)) } var i = t.target, n = this._layer.getLatLngs(), o = this.findDeepMarkerIndex(this._markers, i), r = o.indexPath, s = o.index, h = o.parentPath; if (r) { var u, c, p = r.length > 1 ? a()(n, h) : n, d = r.length > 1 ? a()(this._markers, h) : this._markers; if (p.splice(s, 1), this._layer.setLatLngs(n), p.length <= 1 && (p.splice(0, p.length), this._layer.setLatLngs(n), this.disable(), this.enable(this.options)), Object(l.b)(n) && this._layer.remove(), i._middleMarkerPrev && this._markerGroup.removeLayer(i._middleMarkerPrev), i._middleMarkerNext && this._markerGroup.removeLayer(i._middleMarkerNext), this._markerGroup.removeLayer(i), this.isPolygon() ? (u = (s + 1) % d.length, c = (s + (d.length - 1)) % d.length) : (c = s - 1 < 0 ? void 0 : s - 1, u = s + 1 >= d.length ? void 0 : s + 1), u !== c) { var f = d[c], _ = d[u]; this._createMiddleMarker(f, _) } d.splice(s, 1), this._fireEdit(), this._layer.fire("pm:vertexremoved", { layer: this._layer, marker: i, indexPath: r }) } }, findDeepMarkerIndex: function (t, e) { var i; t.some(function t(n) { return function (o, r) { var a = n.concat(r); return o._leaflet_id === e._leaflet_id ? (i = a, !0) : Array.isArray(o) && o.some(t(a)) } }([])); var n = {}; return i && (n = { indexPath: i, index: i[i.length - 1], parentPath: i.slice(0, i.length - 1) }), n }, updatePolygonCoordsFromMarkerDrag: function (t) { var e = this._layer.getLatLngs(), i = t.getLatLng(), n = this.findDeepMarkerIndex(this._markers, t), o = n.indexPath, r = n.index, s = n.parentPath; (o.length > 1 ? a()(e, s) : e).splice(r, 1, i), this._layer.setLatLngs(e) }, _onMarkerDrag: function (t) { var e = t.target, i = this.findDeepMarkerIndex(this._markers, e), n = i.indexPath, o = i.index, r = i.parentPath; if (n) { this.updatePolygonCoordsFromMarkerDrag(e); var s = n.length > 1 ? a()(this._markers, r) : this._markers, l = (o + 1) % s.length, u = (o + (s.length - 1)) % s.length, c = e.getLatLng(), p = s[u].getLatLng(), d = s[l].getLatLng(); if (e._middleMarkerNext) { var f = h.a.calcMiddleLatLng(this._map, c, d); e._middleMarkerNext.setLatLng(f) } if (e._middleMarkerPrev) { var _ = h.a.calcMiddleLatLng(this._map, c, p); e._middleMarkerPrev.setLatLng(_) } this.options.allowSelfIntersection || this._handleLayerStyle() } }, _onMarkerDragEnd: function (t) { var e = t.target, i = this.findDeepMarkerIndex(this._markers, e).indexPath; if (!this.options.allowSelfIntersection && this.hasSelfIntersection()) return this._layer.setLatLngs(this._coordsBeforeEdit), this._coordsBeforeEdit = null, this._initMarkers(), void this._handleLayerStyle(); this._layer.fire("pm:markerdragend", { markerEvent: t, indexPath: i }), this._fireEdit() }, _onMarkerDragStart: function (t) { var e = t.target, i = this.findDeepMarkerIndex(this._markers, e).indexPath; this._layer.fire("pm:markerdragstart", { markerEvent: t, indexPath: i }), this.options.allowSelfIntersection || (this._coordsBeforeEdit = this._layer.getLatLngs()) }, _fireEdit: function () { this._layerEdited = !0, this._layer.fire("pm:edit") } }) }, function (t, e, i) { "use strict"; var n = i(2); n.a.Polygon = n.a.Line.extend({}) }, function (t, e, i) { "use strict"; var n = i(2); function o(t, e) { return function (t) { if (Array.isArray(t)) return t }(t) || function (t, e) { var i = [], n = !0, o = !1, r = void 0; try { for (var a, s = t[Symbol.iterator](); !(n = (a = s.next()).done) && (i.push(a.value), !e || i.length !== e); n = !0); } catch (h) { o = !0, r = h } finally { try { n || null == s["return"] || s["return"]() } finally { if (o) throw r } } return i }(t, e) || function () { throw new TypeError("Invalid attempt to destructure non-iterable instance") }() } n.a.Rectangle = n.a.Polygon.extend({ _initMarkers: function () { var t = this._map, e = this._findCorners(); this._markerGroup && this._markerGroup.clearLayers(), this._markerGroup = new L.LayerGroup, this._markerGroup._pmTempLayer = !0, t.addLayer(this._markerGroup), this._markers = [], this._markers[0] = e.map(this._createMarker, this); var i = o(this._markers, 1); this._cornerMarkers = i[0], this.options.snappable && this._initSnappableMarkers() }, _createMarker: function (t, e) { var i = new L.Marker(t, { draggable: !0, icon: L.divIcon({ className: "marker-icon" }) }); return i._origLatLng = t, i._index = e, i._pmTempLayer = !0, i.on("dragstart", this._onMarkerDragStart, this), i.on("drag", this._onMarkerDrag, this), i.on("dragend", this._onMarkerDragEnd, this), i.on("pm:snap", this._adjustRectangleForMarkerSnap, this), this.options.preventMarkerRemoval || i.on("contextmenu", this._removeMarker, this), this._markerGroup.addLayer(i), i }, _removeMarker: function () { return null }, _onMarkerDragStart: function (t) { var e = t.target, i = this._findCorners(); e._oppositeCornerLatLng = i[(e._index + 2) % 4], e._snapped = !1, this._layer.fire("pm:markerdragstart", { markerEvent: t }) }, _onMarkerDrag: function (t) { var e = t.target; void 0 !== e._index && (e._snapped || this._adjustRectangleForMarkerMove(e)) }, _onMarkerDragEnd: function (t) { var e = this._findCorners(); this._adjustAllMarkers(e), this._cornerMarkers.forEach((function (t) { delete t._oppositeCornerLatLng })), this._layer.setLatLngs(e), this._layer.fire("pm:markerdragend", { markerEvent: t }), this._fireEdit() }, _adjustRectangleForMarkerMove: function (t) { L.extend(t._origLatLng, t._latlng); var e = t.getLatLng(); this._layer.setBounds(L.latLngBounds(e, t._oppositeCornerLatLng)), this._adjustAdjacentMarkers(t), this._layer.redraw() }, _adjustRectangleForMarkerSnap: function (t) { if (this.options.snappable) { var e = t.target; this._adjustRectangleForMarkerMove(e) } }, _adjustAllMarkers: function (t) { t.length && 4 === t.length ? this._cornerMarkers.forEach((function (e, i) { e.setLatLng(t[i]) })) : console.error("_adjustAllMarkers() requires an array of EXACTLY 4 LatLng coordinates") }, _adjustAdjacentMarkers: function (t) { if (t && t.getLatLng && t._oppositeCornerLatLng) { var e = t.getLatLng(), i = t._oppositeCornerLatLng, n = []; this._findCorners().forEach((function (t) { t.equals(e) || t.equals(i) || n.push(t) })); var o = 0; 2 === n.length && this._cornerMarkers.forEach((function (t) { var r = t.getLatLng(); r.equals(e) || r.equals(i) || (t.setLatLng(n[o]), o += 1) })) } else console.error("_adjustAdjacentMarkers() requires a valid Marker object") }, _findCorners: function () { var t = this._layer.getBounds(); return [t.getNorthWest(), t.getNorthEast(), t.getSouthEast(), t.getSouthWest()] } }) }, function (t, e, i) { "use strict"; var n = i(2); n.a.Circle = n.a.extend({ initialize: function (t) { this._layer = t, this._enabled = !1 }, toggleEdit: function (t) { this.enabled() ? this.disable() : this.enable(t) }, enabled: function () { return this._enabled }, enable: function (t) { var e = this; L.Util.setOptions(this, t), this._map = this._layer._map, this.enabled() || this.disable(), this._enabled = !0, this._initMarkers(), this._layer.on("remove", (function (t) { e.disable(t.target) })) }, disable: function () { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this._layer; if (!this.enabled()) return !1; if (t.pm._dragging) return !1; t.pm._enabled = !1, t.pm._helperLayers.clearLayers(), t.off("mousedown"), t.off("mouseup"); var e = t._path ? t._path : this._layer._renderer._container; return L.DomUtil.removeClass(e, "leaflet-pm-draggable"), this._layerEdited && this._layer.fire("pm:update", {}), this._layerEdited = !1, !0 }, _initMarkers: function () { var t = this._map; this._helperLayers && this._helperLayers.clearLayers(), this._helperLayers = new L.LayerGroup, this._helperLayers._pmTempLayer = !0, this._helperLayers.addTo(t); var e = this._layer.getLatLng(), i = this._layer._radius, n = this._getLatLngOnCircle(e, i); this._centerMarker = this._createCenterMarker(e), this._outerMarker = this._createOuterMarker(n), this._markers = [this._centerMarker, this._outerMarker], this._createHintLine(this._centerMarker, this._outerMarker), this.options.snappable && this._initSnappableMarkers() }, _getLatLngOnCircle: function (t, e) { var i = this._map.project(t), n = L.point(i.x + e, i.y); return this._map.unproject(n) }, _resizeCircle: function () { this._syncHintLine(), this._syncCircleRadius() }, _moveCircle: function (t) { var e = t.latlng; this._layer.setLatLng(e); var i = this._layer._radius, n = this._getLatLngOnCircle(e, i); this._outerMarker.setLatLng(n), this._syncHintLine(), this._layer.fire("pm:centerplaced", { layer: this._layer, latlng: e }) }, _onMarkerDragStart: function (t) { this._layer.fire("pm:markerdragstart", { markerEvent: t }) }, _onMarkerDragEnd: function (t) { this._fireEdit(), this._layer.fire("pm:markerdragend", { markerEvent: t }) }, _syncCircleRadius: function () { var t = this._centerMarker.getLatLng(), e = this._outerMarker.getLatLng(), i = t.distanceTo(e); this._layer.setRadius(i) }, _syncHintLine: function () { var t = this._centerMarker.getLatLng(), e = this._outerMarker.getLatLng(); this._hintline.setLatLngs([t, e]) }, _createHintLine: function (t, e) { var i = t.getLatLng(), n = e.getLatLng(); this._hintline = L.polyline([i, n], this.options.hintlineStyle), this._hintline._pmTempLayer = !0, this._helperLayers.addLayer(this._hintline) }, _createCenterMarker: function (t) { var e = this._createMarker(t); return L.DomUtil.addClass(e._icon, "leaflet-pm-draggable"), e.on("drag", this._moveCircle, this), e }, _createOuterMarker: function (t) { var e = this._createMarker(t); return e.on("drag", this._resizeCircle, this), e }, _createMarker: function (t) { var e = new L.Marker(t, { draggable: !0, icon: L.divIcon({ className: "marker-icon" }) }); return e._origLatLng = t, e._pmTempLayer = !0, e.on("dragstart", this._onMarkerDragStart, this), e.on("dragend", this._onMarkerDragEnd, this), this._helperLayers.addLayer(e), e }, _fireEdit: function () { this._layer.fire("pm:edit"), this._layerEdited = !0 } }) }, function (t, e, i) { "use strict"; var n = i(2); n.a.CircleMarker = n.a.extend({ initialize: function (t) { this._layer = t, this._enabled = !1 }, toggleEdit: function (t) { this.enabled() ? this.disable() : this.enable(t) }, enabled: function () { return this._enabled }, enable: function () { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : { draggable: !0, snappable: !0 }; L.Util.setOptions(this, t), this._map = this._layer._map, this._map && (this.enabled() || this.disable(), this._enabled = !0, this.options.preventMarkerRemoval || this._layer.on("contextmenu", this._removeMarker, this), this.options.draggable && this.enableLayerDrag(), this.options.snappable && this._initSnappableMarkers(), this._layer.on("pm:dragend", this._onMarkerDragEnd, this)) }, disable: function () { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this._layer; if (!this.enabled()) return !1; if (t.pm._dragging) return !1; if (t.pm._enabled = !1, t._path) { var e = t._path; L.DomUtil.removeClass(e, "leaflet-pm-draggable") } return this._layerEdited && this._layer.fire("pm:update", {}), this._layerEdited = !1, !0 }, _moveMarker: function (t) { var e = t.latlng; this._layer.setLatLng(e).redraw() }, _removeMarker: function () { this._layer.fire("pm:remove"), this._layer.remove() }, _fireEdit: function () { this._layer.fire("pm:edit"), this._layerEdited = !0 }, _onMarkerDragEnd: function (t) { this._layer.fire("pm:markerdragend", { markerEvent: t }), this._fireEdit() }, _initSnappableMarkers: function () { var t = this._layer; this.options.snapDistance = this.options.snapDistance || 30, t.off("pm:drag", this._handleSnapping, this), t.on("pm:drag", this._handleSnapping, this), t.off("pm:dragend", this._cleanupSnapping, this), t.on("pm:dragend", this._cleanupSnapping, this), t.off("pm:dragstart", this._unsnap, this), t.on("pm:dragstart", this._unsnap, this) } }) }, function (t, e) { }, function (t, e) { }]) }, "6cc5": function (t, e, i) { }, "9a51": function (t, e, i) { }, a3cb: function (t, e, i) { }, e11e: function (t, e, i) { /* @preserve * Leaflet 1.7.1, a JS library for interactive maps. http://leafletjs.com * (c) 2010-2019 Vladimir Agafonkin, (c) 2010-2011 CloudMade */ (function (t, i) { i(e) })(0, (function (t) { "use strict"; var e = "1.7.1"; function i(t) { var e, i, n, o; for (i = 1, n = arguments.length; i < n; i++)for (e in o = arguments[i], o) t[e] = o[e]; return t } var n = Object.create || function () { function t() { } return function (e) { return t.prototype = e, new t } }(); function o(t, e) { var i = Array.prototype.slice; if (t.bind) return t.bind.apply(t, i.call(arguments, 1)); var n = i.call(arguments, 2); return function () { return t.apply(e, n.length ? n.concat(i.call(arguments)) : arguments) } } var r = 0; function a(t) { return t._leaflet_id = t._leaflet_id || ++r, t._leaflet_id } function s(t, e, i) { var n, o, r, a; return a = function () { n = !1, o && (r.apply(i, o), o = !1) }, r = function () { n ? o = arguments : (t.apply(i, arguments), setTimeout(a, e), n = !0) }, r } function h(t, e, i) { var n = e[1], o = e[0], r = n - o; return t === n && i ? t : ((t - o) % r + r) % r + o } function l() { return !1 } function u(t, e) { var i = Math.pow(10, void 0 === e ? 6 : e); return Math.round(t * i) / i } function c(t) { return t.trim ? t.trim() : t.replace(/^\s+|\s+$/g, "") } function p(t) { return c(t).split(/\s+/) } function d(t, e) { for (var i in Object.prototype.hasOwnProperty.call(t, "options") || (t.options = t.options ? n(t.options) : {}), e) t.options[i] = e[i]; return t.options } function f(t, e, i) { var n = []; for (var o in t) n.push(encodeURIComponent(i ? o.toUpperCase() : o) + "=" + encodeURIComponent(t[o])); return (e && -1 !== e.indexOf("?") ? "&" : "?") + n.join("&") } var _ = /\{ *([\w_-]+) *\}/g; function m(t, e) { return t.replace(_, (function (t, i) { var n = e[i]; if (void 0 === n) throw new Error("No value provided for variable " + t); return "function" === typeof n && (n = n(e)), n })) } var g = Array.isArray || function (t) { return "[object Array]" === Object.prototype.toString.call(t) }; function v(t, e) { for (var i = 0; i < t.length; i++)if (t[i] === e) return i; return -1 } var y = "data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="; function b(t) { return window["webkit" + t] || window["moz" + t] || window["ms" + t] } var w = 0; function x(t) { var e = +new Date, i = Math.max(0, 16 - (e - w)); return w = e + i, window.setTimeout(t, i) } var k = window.requestAnimationFrame || b("RequestAnimationFrame") || x, M = window.cancelAnimationFrame || b("CancelAnimationFrame") || b("CancelRequestAnimationFrame") || function (t) { window.clearTimeout(t) }; function P(t, e, i) { if (!i || k !== x) return k.call(window, o(t, e)); t.call(e) } function C(t) { t && M.call(window, t) } var T = { extend: i, create: n, bind: o, lastId: r, stamp: a, throttle: s, wrapNum: h, falseFn: l, formatNum: u, trim: c, splitWords: p, setOptions: d, getParamString: f, template: m, isArray: g, indexOf: v, emptyImageUrl: y, requestFn: k, cancelFn: M, requestAnimFrame: P, cancelAnimFrame: C }; function S() { } function O(t) { if ("undefined" !== typeof L && L && L.Mixin) { t = g(t) ? t : [t]; for (var e = 0; e < t.length; e++)t[e] === L.Mixin.Events && console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.", (new Error).stack) } } S.extend = function (t) { var e = function () { this.initialize && this.initialize.apply(this, arguments), this.callInitHooks() }, o = e.__super__ = this.prototype, r = n(o); for (var a in r.constructor = e, e.prototype = r, this) Object.prototype.hasOwnProperty.call(this, a) && "prototype" !== a && "__super__" !== a && (e[a] = this[a]); return t.statics && (i(e, t.statics), delete t.statics), t.includes && (O(t.includes), i.apply(null, [r].concat(t.includes)), delete t.includes), r.options && (t.options = i(n(r.options), t.options)), i(r, t), r._initHooks = [], r.callInitHooks = function () { if (!this._initHooksCalled) { o.callInitHooks && o.callInitHooks.call(this), this._initHooksCalled = !0; for (var t = 0, e = r._initHooks.length; t < e; t++)r._initHooks[t].call(this) } }, e }, S.include = function (t) { return i(this.prototype, t), this }, S.mergeOptions = function (t) { return i(this.prototype.options, t), this }, S.addInitHook = function (t) { var e = Array.prototype.slice.call(arguments, 1), i = "function" === typeof t ? t : function () { this[t].apply(this, e) }; return this.prototype._initHooks = this.prototype._initHooks || [], this.prototype._initHooks.push(i), this }; var E = { on: function (t, e, i) { if ("object" === typeof t) for (var n in t) this._on(n, t[n], e); else { t = p(t); for (var o = 0, r = t.length; o < r; o++)this._on(t[o], e, i) } return this }, off: function (t, e, i) { if (t) if ("object" === typeof t) for (var n in t) this._off(n, t[n], e); else { t = p(t); for (var o = 0, r = t.length; o < r; o++)this._off(t[o], e, i) } else delete this._events; return this }, _on: function (t, e, i) { this._events = this._events || {}; var n = this._events[t]; n || (n = [], this._events[t] = n), i === this && (i = void 0); for (var o = { fn: e, ctx: i }, r = n, a = 0, s = r.length; a < s; a++)if (r[a].fn === e && r[a].ctx === i) return; r.push(o) }, _off: function (t, e, i) { var n, o, r; if (this._events && (n = this._events[t], n)) if (e) { if (i === this && (i = void 0), n) for (o = 0, r = n.length; o < r; o++) { var a = n[o]; if (a.ctx === i && a.fn === e) return a.fn = l, this._firingCount && (this._events[t] = n = n.slice()), void n.splice(o, 1) } } else { for (o = 0, r = n.length; o < r; o++)n[o].fn = l; delete this._events[t] } }, fire: function (t, e, n) { if (!this.listens(t, n)) return this; var o = i({}, e, { type: t, target: this, sourceTarget: e && e.sourceTarget || this }); if (this._events) { var r = this._events[t]; if (r) { this._firingCount = this._firingCount + 1 || 1; for (var a = 0, s = r.length; a < s; a++) { var h = r[a]; h.fn.call(h.ctx || this, o) } this._firingCount-- } } return n && this._propagateEvent(o), this }, listens: function (t, e) { var i = this._events && this._events[t]; if (i && i.length) return !0; if (e) for (var n in this._eventParents) if (this._eventParents[n].listens(t, e)) return !0; return !1 }, once: function (t, e, i) { if ("object" === typeof t) { for (var n in t) this.once(n, t[n], e); return this } var r = o((function () { this.off(t, e, i).off(t, r, i) }), this); return this.on(t, e, i).on(t, r, i) }, addEventParent: function (t) { return this._eventParents = this._eventParents || {}, this._eventParents[a(t)] = t, this }, removeEventParent: function (t) { return this._eventParents && delete this._eventParents[a(t)], this }, _propagateEvent: function (t) { for (var e in this._eventParents) this._eventParents[e].fire(t.type, i({ layer: t.target, propagatedFrom: t.target }, t), !0) } }; E.addEventListener = E.on, E.removeEventListener = E.clearAllEventListeners = E.off, E.addOneTimeEventListener = E.once, E.fireEvent = E.fire, E.hasEventListeners = E.listens; var B = S.extend(E); function z(t, e, i) { this.x = i ? Math.round(t) : t, this.y = i ? Math.round(e) : e } var j = Math.trunc || function (t) { return t > 0 ? Math.floor(t) : Math.ceil(t) }; function I(t, e, i) { return t instanceof z ? t : g(t) ? new z(t[0], t[1]) : void 0 === t || null === t ? t : "object" === typeof t && "x" in t && "y" in t ? new z(t.x, t.y) : new z(t, e, i) } function A(t, e) { if (t) for (var i = e ? [t, e] : t, n = 0, o = i.length; n < o; n++)this.extend(i[n]) } function R(t, e) { return !t || t instanceof A ? t : new A(t, e) } function D(t, e) { if (t) for (var i = e ? [t, e] : t, n = 0, o = i.length; n < o; n++)this.extend(i[n]) } function Z(t, e) { return t instanceof D ? t : new D(t, e) } function N(t, e, i) { if (isNaN(t) || isNaN(e)) throw new Error("Invalid LatLng object: (" + t + ", " + e + ")"); this.lat = +t, this.lng = +e, void 0 !== i && (this.alt = +i) } function G(t, e, i) { return t instanceof N ? t : g(t) && "object" !== typeof t[0] ? 3 === t.length ? new N(t[0], t[1], t[2]) : 2 === t.length ? new N(t[0], t[1]) : null : void 0 === t || null === t ? t : "object" === typeof t && "lat" in t ? new N(t.lat, "lng" in t ? t.lng : t.lon, t.alt) : void 0 === e ? null : new N(t, e, i) } z.prototype = { clone: function () { return new z(this.x, this.y) }, add: function (t) { return this.clone()._add(I(t)) }, _add: function (t) { return this.x += t.x, this.y += t.y, this }, subtract: function (t) { return this.clone()._subtract(I(t)) }, _subtract: function (t) { return this.x -= t.x, this.y -= t.y, this }, divideBy: function (t) { return this.clone()._divideBy(t) }, _divideBy: function (t) { return this.x /= t, this.y /= t, this }, multiplyBy: function (t) { return this.clone()._multiplyBy(t) }, _multiplyBy: function (t) { return this.x *= t, this.y *= t, this }, scaleBy: function (t) { return new z(this.x * t.x, this.y * t.y) }, unscaleBy: function (t) { return new z(this.x / t.x, this.y / t.y) }, round: function () { return this.clone()._round() }, _round: function () { return this.x = Math.round(this.x), this.y = Math.round(this.y), this }, floor: function () { return this.clone()._floor() }, _floor: function () { return this.x = Math.floor(this.x), this.y = Math.floor(this.y), this }, ceil: function () { return this.clone()._ceil() }, _ceil: function () { return this.x = Math.ceil(this.x), this.y = Math.ceil(this.y), this }, trunc: function () { return this.clone()._trunc() }, _trunc: function () { return this.x = j(this.x), this.y = j(this.y), this }, distanceTo: function (t) { t = I(t); var e = t.x - this.x, i = t.y - this.y; return Math.sqrt(e * e + i * i) }, equals: function (t) { return t = I(t), t.x === this.x && t.y === this.y }, contains: function (t) { return t = I(t), Math.abs(t.x) <= Math.abs(this.x) && Math.abs(t.y) <= Math.abs(this.y) }, toString: function () { return "Point(" + u(this.x) + ", " + u(this.y) + ")" } }, A.prototype = { extend: function (t) { return t = I(t), this.min || this.max ? (this.min.x = Math.min(t.x, this.min.x), this.max.x = Math.max(t.x, this.max.x), this.min.y = Math.min(t.y, this.min.y), this.max.y = Math.max(t.y, this.max.y)) : (this.min = t.clone(), this.max = t.clone()), this }, getCenter: function (t) { return new z((this.min.x + this.max.x) / 2, (this.min.y + this.max.y) / 2, t) }, getBottomLeft: function () { return new z(this.min.x, this.max.y) }, getTopRight: function () { return new z(this.max.x, this.min.y) }, getTopLeft: function () { return this.min }, getBottomRight: function () { return this.max }, getSize: function () { return this.max.subtract(this.min) }, contains: function (t) { var e, i; return t = "number" === typeof t[0] || t instanceof z ? I(t) : R(t), t instanceof A ? (e = t.min, i = t.max) : e = i = t, e.x >= this.min.x && i.x <= this.max.x && e.y >= this.min.y && i.y <= this.max.y }, intersects: function (t) { t = R(t); var e = this.min, i = this.max, n = t.min, o = t.max, r = o.x >= e.x && n.x <= i.x, a = o.y >= e.y && n.y <= i.y; return r && a }, overlaps: function (t) { t = R(t); var e = this.min, i = this.max, n = t.min, o = t.max, r = o.x > e.x && n.x < i.x, a = o.y > e.y && n.y < i.y; return r && a }, isValid: function () { return !(!this.min || !this.max) } }, D.prototype = { extend: function (t) { var e, i, n = this._southWest, o = this._northEast; if (t instanceof N) e = t, i = t; else { if (!(t instanceof D)) return t ? this.extend(G(t) || Z(t)) : this; if (e = t._southWest, i = t._northEast, !e || !i) return this } return n || o ? (n.lat = Math.min(e.lat, n.lat), n.lng = Math.min(e.lng, n.lng), o.lat = Math.max(i.lat, o.lat), o.lng = Math.max(i.lng, o.lng)) : (this._southWest = new N(e.lat, e.lng), this._northEast = new N(i.lat, i.lng)), this }, pad: function (t) { var e = this._southWest, i = this._northEast, n = Math.abs(e.lat - i.lat) * t, o = Math.abs(e.lng - i.lng) * t; return new D(new N(e.lat - n, e.lng - o), new N(i.lat + n, i.lng + o)) }, getCenter: function () { return new N((this._southWest.lat + this._northEast.lat) / 2, (this._southWest.lng + this._northEast.lng) / 2) }, getSouthWest: function () { return this._southWest }, getNorthEast: function () { return this._northEast }, getNorthWest: function () { return new N(this.getNorth(), this.getWest()) }, getSouthEast: function () { return new N(this.getSouth(), this.getEast()) }, getWest: function () { return this._southWest.lng }, getSouth: function () { return this._southWest.lat }, getEast: function () { return this._northEast.lng }, getNorth: function () { return this._northEast.lat }, contains: function (t) { t = "number" === typeof t[0] || t instanceof N || "lat" in t ? G(t) : Z(t); var e, i, n = this._southWest, o = this._northEast; return t instanceof D ? (e = t.getSouthWest(), i = t.getNorthEast()) : e = i = t, e.lat >= n.lat && i.lat <= o.lat && e.lng >= n.lng && i.lng <= o.lng }, intersects: function (t) { t = Z(t); var e = this._southWest, i = this._northEast, n = t.getSouthWest(), o = t.getNorthEast(), r = o.lat >= e.lat && n.lat <= i.lat, a = o.lng >= e.lng && n.lng <= i.lng; return r && a }, overlaps: function (t) { t = Z(t); var e = this._southWest, i = this._northEast, n = t.getSouthWest(), o = t.getNorthEast(), r = o.lat > e.lat && n.lat < i.lat, a = o.lng > e.lng && n.lng < i.lng; return r && a }, toBBoxString: function () { return [this.getWest(), this.getSouth(), this.getEast(), this.getNorth()].join(",") }, equals: function (t, e) { return !!t && (t = Z(t), this._southWest.equals(t.getSouthWest(), e) && this._northEast.equals(t.getNorthEast(), e)) }, isValid: function () { return !(!this._southWest || !this._northEast) } }, N.prototype = { equals: function (t, e) { if (!t) return !1; t = G(t); var i = Math.max(Math.abs(this.lat - t.lat), Math.abs(this.lng - t.lng)); return i <= (void 0 === e ? 1e-9 : e) }, toString: function (t) { return "LatLng(" + u(this.lat, t) + ", " + u(this.lng, t) + ")" }, distanceTo: function (t) { return H.distance(this, G(t)) }, wrap: function () { return H.wrapLatLng(this) }, toBounds: function (t) { var e = 180 * t / 40075017, i = e / Math.cos(Math.PI / 180 * this.lat); return Z([this.lat - e, this.lng - i], [this.lat + e, this.lng + i]) }, clone: function () { return new N(this.lat, this.lng, this.alt) } }; var F = { latLngToPoint: function (t, e) { var i = this.projection.project(t), n = this.scale(e); return this.transformation._transform(i, n) }, pointToLatLng: function (t, e) { var i = this.scale(e), n = this.transformation.untransform(t, i); return this.projection.unproject(n) }, project: function (t) { return this.projection.project(t) }, unproject: function (t) { return this.projection.unproject(t) }, scale: function (t) { return 256 * Math.pow(2, t) }, zoom: function (t) { return Math.log(t / 256) / Math.LN2 }, getProjectedBounds: function (t) { if (this.infinite) return null; var e = this.projection.bounds, i = this.scale(t), n = this.transformation.transform(e.min, i), o = this.transformation.transform(e.max, i); return new A(n, o) }, infinite: !1, wrapLatLng: function (t) { var e = this.wrapLng ? h(t.lng, this.wrapLng, !0) : t.lng, i = this.wrapLat ? h(t.lat, this.wrapLat, !0) : t.lat, n = t.alt; return new N(i, e, n) }, wrapLatLngBounds: function (t) { var e = t.getCenter(), i = this.wrapLatLng(e), n = e.lat - i.lat, o = e.lng - i.lng; if (0 === n && 0 === o) return t; var r = t.getSouthWest(), a = t.getNorthEast(), s = new N(r.lat - n, r.lng - o), h = new N(a.lat - n, a.lng - o); return new D(s, h) } }, H = i({}, F, { wrapLng: [-180, 180], R: 6371e3, distance: function (t, e) { var i = Math.PI / 180, n = t.lat * i, o = e.lat * i, r = Math.sin((e.lat - t.lat) * i / 2), a = Math.sin((e.lng - t.lng) * i / 2), s = r * r + Math.cos(n) * Math.cos(o) * a * a, h = 2 * Math.atan2(Math.sqrt(s), Math.sqrt(1 - s)); return this.R * h } }), V = 6378137, U = { R: V, MAX_LATITUDE: 85.0511287798, project: function (t) { var e = Math.PI / 180, i = this.MAX_LATITUDE, n = Math.max(Math.min(i, t.lat), -i), o = Math.sin(n * e); return new z(this.R * t.lng * e, this.R * Math.log((1 + o) / (1 - o)) / 2) }, unproject: function (t) { var e = 180 / Math.PI; return new N((2 * Math.atan(Math.exp(t.y / this.R)) - Math.PI / 2) * e, t.x * e / this.R) }, bounds: function () { var t = V * Math.PI; return new A([-t, -t], [t, t]) }() }; function q(t, e, i, n) { if (g(t)) return this._a = t[0], this._b = t[1], this._c = t[2], void (this._d = t[3]); this._a = t, this._b = e, this._c = i, this._d = n } function W(t, e, i, n) { return new q(t, e, i, n) } q.prototype = { transform: function (t, e) { return this._transform(t.clone(), e) }, _transform: function (t, e) { return e = e || 1, t.x = e * (this._a * t.x + this._b), t.y = e * (this._c * t.y + this._d), t }, untransform: function (t, e) { return e = e || 1, new z((t.x / e - this._b) / this._a, (t.y / e - this._d) / this._c) } }; var $ = i({}, H, { code: "EPSG:3857", projection: U, transformation: function () { var t = .5 / (Math.PI * U.R); return W(t, .5, -t, .5) }() }), K = i({}, $, { code: "EPSG:900913" }); function J(t) { return document.createElementNS("http://www.w3.org/2000/svg", t) } function Y(t, e) { var i, n, o, r, a, s, h = ""; for (i = 0, o = t.length; i < o; i++) { for (a = t[i], n = 0, r = a.length; n < r; n++)s = a[n], h += (n ? "L" : "M") + s.x + " " + s.y; h += e ? St ? "z" : "x" : "" } return h || "M0 0" } var X = document.documentElement.style, Q = "ActiveXObject" in window, tt = Q && !document.addEventListener, et = "msLaunchUri" in navigator && !("documentMode" in document), it = Et("webkit"), nt = Et("android"), ot = Et("android 2") || Et("android 3"), rt = parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1], 10), at = nt && Et("Google") && rt < 537 && !("AudioNode" in window), st = !!window.opera, ht = !et && Et("chrome"), lt = Et("gecko") && !it && !st && !Q, ut = !ht && Et("safari"), ct = Et("phantom"), pt = "OTransition" in X, dt = 0 === navigator.platform.indexOf("Win"), ft = Q && "transition" in X, _t = "WebKitCSSMatrix" in window && "m11" in new window.WebKitCSSMatrix && !ot, mt = "MozPerspective" in X, gt = !window.L_DISABLE_3D && (ft || _t || mt) && !pt && !ct, vt = "undefined" !== typeof orientation || Et("mobile"), yt = vt && it, bt = vt && _t, Lt = !window.PointerEvent && window.MSPointerEvent, wt = !(!window.PointerEvent && !Lt), xt = !window.L_NO_TOUCH && (wt || "ontouchstart" in window || window.DocumentTouch && document instanceof window.DocumentTouch), kt = vt && st, Mt = vt && lt, Pt = (window.devicePixelRatio || window.screen.deviceXDPI / window.screen.logicalXDPI) > 1, Ct = function () { var t = !1; try { var e = Object.defineProperty({}, "passive", { get: function () { t = !0 } }); window.addEventListener("testPassiveEventSupport", l, e), window.removeEventListener("testPassiveEventSupport", l, e) } catch (i) { } return t }(), Tt = function () { return !!document.createElement("canvas").getContext }(), St = !(!document.createElementNS || !J("svg").createSVGRect), Ot = !St && function () { try { var t = document.createElement("div"); t.innerHTML = ''; var e = t.firstChild; return e.style.behavior = "url(#default#VML)", e && "object" === typeof e.adj } catch (i) { return !1 } }(); function Et(t) { return navigator.userAgent.toLowerCase().indexOf(t) >= 0 } var Bt = { ie: Q, ielt9: tt, edge: et, webkit: it, android: nt, android23: ot, androidStock: at, opera: st, chrome: ht, gecko: lt, safari: ut, phantom: ct, opera12: pt, win: dt, ie3d: ft, webkit3d: _t, gecko3d: mt, any3d: gt, mobile: vt, mobileWebkit: yt, mobileWebkit3d: bt, msPointer: Lt, pointer: wt, touch: xt, mobileOpera: kt, mobileGecko: Mt, retina: Pt, passiveEvents: Ct, canvas: Tt, svg: St, vml: Ot }, zt = Lt ? "MSPointerDown" : "pointerdown", jt = Lt ? "MSPointerMove" : "pointermove", It = Lt ? "MSPointerUp" : "pointerup", At = Lt ? "MSPointerCancel" : "pointercancel", Rt = {}, Dt = !1; function Zt(t, e, i, n) { return "touchstart" === e ? Gt(t, i, n) : "touchmove" === e ? qt(t, i, n) : "touchend" === e && Wt(t, i, n), this } function Nt(t, e, i) { var n = t["_leaflet_" + e + i]; return "touchstart" === e ? t.removeEventListener(zt, n, !1) : "touchmove" === e ? t.removeEventListener(jt, n, !1) : "touchend" === e && (t.removeEventListener(It, n, !1), t.removeEventListener(At, n, !1)), this } function Gt(t, e, i) { var n = o((function (t) { t.MSPOINTER_TYPE_TOUCH && t.pointerType === t.MSPOINTER_TYPE_TOUCH && He(t), Ut(t, e) })); t["_leaflet_touchstart" + i] = n, t.addEventListener(zt, n, !1), Dt || (document.addEventListener(zt, Ft, !0), document.addEventListener(jt, Ht, !0), document.addEventListener(It, Vt, !0), document.addEventListener(At, Vt, !0), Dt = !0) } function Ft(t) { Rt[t.pointerId] = t } function Ht(t) { Rt[t.pointerId] && (Rt[t.pointerId] = t) } function Vt(t) { delete Rt[t.pointerId] } function Ut(t, e) { for (var i in t.touches = [], Rt) t.touches.push(Rt[i]); t.changedTouches = [t], e(t) } function qt(t, e, i) { var n = function (t) { t.pointerType === (t.MSPOINTER_TYPE_MOUSE || "mouse") && 0 === t.buttons || Ut(t, e) }; t["_leaflet_touchmove" + i] = n, t.addEventListener(jt, n, !1) } function Wt(t, e, i) { var n = function (t) { Ut(t, e) }; t["_leaflet_touchend" + i] = n, t.addEventListener(It, n, !1), t.addEventListener(At, n, !1) } var $t = Lt ? "MSPointerDown" : wt ? "pointerdown" : "touchstart", Kt = Lt ? "MSPointerUp" : wt ? "pointerup" : "touchend", Jt = "_leaflet_"; function Yt(t, e, i) { var n, o, r = !1, a = 250; function s(t) { if (wt) { if (!t.isPrimary) return; if ("mouse" === t.pointerType) return } else if (t.touches.length > 1) return; var e = Date.now(), i = e - (n || e); o = t.touches ? t.touches[0] : t, r = i > 0 && i <= a, n = e } function h(t) { if (r && !o.cancelBubble) { if (wt) { if ("mouse" === t.pointerType) return; var i, a, s = {}; for (a in o) i = o[a], s[a] = i && i.bind ? i.bind(o) : i; o = s } o.type = "dblclick", o.button = 0, e(o), n = null } } return t[Jt + $t + i] = s, t[Jt + Kt + i] = h, t[Jt + "dblclick" + i] = e, t.addEventListener($t, s, !!Ct && { passive: !1 }), t.addEventListener(Kt, h, !!Ct && { passive: !1 }), t.addEventListener("dblclick", e, !1), this } function Xt(t, e) { var i = t[Jt + $t + e], n = t[Jt + Kt + e], o = t[Jt + "dblclick" + e]; return t.removeEventListener($t, i, !!Ct && { passive: !1 }), t.removeEventListener(Kt, n, !!Ct && { passive: !1 }), t.removeEventListener("dblclick", o, !1), this } var Qt, te, ee, ie, ne, oe = Le(["transform", "webkitTransform", "OTransform", "MozTransform", "msTransform"]), re = Le(["webkitTransition", "transition", "OTransition", "MozTransition", "msTransition"]), ae = "webkitTransition" === re || "OTransition" === re ? re + "End" : "transitionend"; function se(t) { return "string" === typeof t ? document.getElementById(t) : t } function he(t, e) { var i = t.style[e] || t.currentStyle && t.currentStyle[e]; if ((!i || "auto" === i) && document.defaultView) { var n = document.defaultView.getComputedStyle(t, null); i = n ? n[e] : null } return "auto" === i ? null : i } function le(t, e, i) { var n = document.createElement(t); return n.className = e || "", i && i.appendChild(n), n } function ue(t) { var e = t.parentNode; e && e.removeChild(t) } function ce(t) { while (t.firstChild) t.removeChild(t.firstChild) } function pe(t) { var e = t.parentNode; e && e.lastChild !== t && e.appendChild(t) } function de(t) { var e = t.parentNode; e && e.firstChild !== t && e.insertBefore(t, e.firstChild) } function fe(t, e) { if (void 0 !== t.classList) return t.classList.contains(e); var i = ve(t); return i.length > 0 && new RegExp("(^|\\s)" + e + "(\\s|$)").test(i) } function _e(t, e) { if (void 0 !== t.classList) for (var i = p(e), n = 0, o = i.length; n < o; n++)t.classList.add(i[n]); else if (!fe(t, e)) { var r = ve(t); ge(t, (r ? r + " " : "") + e) } } function me(t, e) { void 0 !== t.classList ? t.classList.remove(e) : ge(t, c((" " + ve(t) + " ").replace(" " + e + " ", " "))) } function ge(t, e) { void 0 === t.className.baseVal ? t.className = e : t.className.baseVal = e } function ve(t) { return t.correspondingElement && (t = t.correspondingElement), void 0 === t.className.baseVal ? t.className : t.className.baseVal } function ye(t, e) { "opacity" in t.style ? t.style.opacity = e : "filter" in t.style && be(t, e) } function be(t, e) { var i = !1, n = "DXImageTransform.Microsoft.Alpha"; try { i = t.filters.item(n) } catch (o) { if (1 === e) return } e = Math.round(100 * e), i ? (i.Enabled = 100 !== e, i.Opacity = e) : t.style.filter += " progid:" + n + "(opacity=" + e + ")" } function Le(t) { for (var e = document.documentElement.style, i = 0; i < t.length; i++)if (t[i] in e) return t[i]; return !1 } function we(t, e, i) { var n = e || new z(0, 0); t.style[oe] = (ft ? "translate(" + n.x + "px," + n.y + "px)" : "translate3d(" + n.x + "px," + n.y + "px,0)") + (i ? " scale(" + i + ")" : "") } function xe(t, e) { t._leaflet_pos = e, gt ? we(t, e) : (t.style.left = e.x + "px", t.style.top = e.y + "px") } function ke(t) { return t._leaflet_pos || new z(0, 0) } if ("onselectstart" in document) Qt = function () { ze(window, "selectstart", He) }, te = function () { Ie(window, "selectstart", He) }; else { var Me = Le(["userSelect", "WebkitUserSelect", "OUserSelect", "MozUserSelect", "msUserSelect"]); Qt = function () { if (Me) { var t = document.documentElement.style; ee = t[Me], t[Me] = "none" } }, te = function () { Me && (document.documentElement.style[Me] = ee, ee = void 0) } } function Pe() { ze(window, "dragstart", He) } function Ce() { Ie(window, "dragstart", He) } function Te(t) { while (-1 === t.tabIndex) t = t.parentNode; t.style && (Se(), ie = t, ne = t.style.outline, t.style.outline = "none", ze(window, "keydown", Se)) } function Se() { ie && (ie.style.outline = ne, ie = void 0, ne = void 0, Ie(window, "keydown", Se)) } function Oe(t) { do { t = t.parentNode } while ((!t.offsetWidth || !t.offsetHeight) && t !== document.body); return t } function Ee(t) { var e = t.getBoundingClientRect(); return { x: e.width / t.offsetWidth || 1, y: e.height / t.offsetHeight || 1, boundingClientRect: e } } var Be = { TRANSFORM: oe, TRANSITION: re, TRANSITION_END: ae, get: se, getStyle: he, create: le, remove: ue, empty: ce, toFront: pe, toBack: de, hasClass: fe, addClass: _e, removeClass: me, setClass: ge, getClass: ve, setOpacity: ye, testProp: Le, setTransform: we, setPosition: xe, getPosition: ke, disableTextSelection: Qt, enableTextSelection: te, disableImageDrag: Pe, enableImageDrag: Ce, preventOutline: Te, restoreOutline: Se, getSizedParentNode: Oe, getScale: Ee }; function ze(t, e, i, n) { if ("object" === typeof e) for (var o in e) De(t, o, e[o], i); else { e = p(e); for (var r = 0, a = e.length; r < a; r++)De(t, e[r], i, n) } return this } var je = "_leaflet_events"; function Ie(t, e, i, n) { if ("object" === typeof e) for (var o in e) Ze(t, o, e[o], i); else if (e) { e = p(e); for (var r = 0, a = e.length; r < a; r++)Ze(t, e[r], i, n) } else { for (var s in t[je]) Ze(t, s, t[je][s]); delete t[je] } return this } function Ae() { if (wt) return !(et || ut) } var Re = { mouseenter: "mouseover", mouseleave: "mouseout", wheel: !("onwheel" in window) && "mousewheel" }; function De(t, e, i, n) { var o = e + a(i) + (n ? "_" + a(n) : ""); if (t[je] && t[je][o]) return this; var r = function (e) { return i.call(n || t, e || window.event) }, s = r; wt && 0 === e.indexOf("touch") ? Zt(t, e, r, o) : xt && "dblclick" === e && !Ae() ? Yt(t, r, o) : "addEventListener" in t ? "touchstart" === e || "touchmove" === e || "wheel" === e || "mousewheel" === e ? t.addEventListener(Re[e] || e, r, !!Ct && { passive: !1 }) : "mouseenter" === e || "mouseleave" === e ? (r = function (e) { e = e || window.event, Ye(t, e) && s(e) }, t.addEventListener(Re[e], r, !1)) : t.addEventListener(e, s, !1) : "attachEvent" in t && t.attachEvent("on" + e, r), t[je] = t[je] || {}, t[je][o] = r } function Ze(t, e, i, n) { var o = e + a(i) + (n ? "_" + a(n) : ""), r = t[je] && t[je][o]; if (!r) return this; wt && 0 === e.indexOf("touch") ? Nt(t, e, o) : xt && "dblclick" === e && !Ae() ? Xt(t, o) : "removeEventListener" in t ? t.removeEventListener(Re[e] || e, r, !1) : "detachEvent" in t && t.detachEvent("on" + e, r), t[je][o] = null } function Ne(t) { return t.stopPropagation ? t.stopPropagation() : t.originalEvent ? t.originalEvent._stopped = !0 : t.cancelBubble = !0, Je(t), this } function Ge(t) { return De(t, "wheel", Ne), this } function Fe(t) { return ze(t, "mousedown touchstart dblclick", Ne), De(t, "click", Ke), this } function He(t) { return t.preventDefault ? t.preventDefault() : t.returnValue = !1, this } function Ve(t) { return He(t), Ne(t), this } function Ue(t, e) { if (!e) return new z(t.clientX, t.clientY); var i = Ee(e), n = i.boundingClientRect; return new z((t.clientX - n.left) / i.x - e.clientLeft, (t.clientY - n.top) / i.y - e.clientTop) } var qe = dt && ht ? 2 * window.devicePixelRatio : lt ? window.devicePixelRatio : 1; function We(t) { return et ? t.wheelDeltaY / 2 : t.deltaY && 0 === t.deltaMode ? -t.deltaY / qe : t.deltaY && 1 === t.deltaMode ? 20 * -t.deltaY : t.deltaY && 2 === t.deltaMode ? 60 * -t.deltaY : t.deltaX || t.deltaZ ? 0 : t.wheelDelta ? (t.wheelDeltaY || t.wheelDelta) / 2 : t.detail && Math.abs(t.detail) < 32765 ? 20 * -t.detail : t.detail ? t.detail / -32765 * 60 : 0 } var $e = {}; function Ke(t) { $e[t.type] = !0 } function Je(t) { var e = $e[t.type]; return $e[t.type] = !1, e } function Ye(t, e) { var i = e.relatedTarget; if (!i) return !0; try { while (i && i !== t) i = i.parentNode } catch (n) { return !1 } return i !== t } var Xe = { on: ze, off: Ie, stopPropagation: Ne, disableScrollPropagation: Ge, disableClickPropagation: Fe, preventDefault: He, stop: Ve, getMousePosition: Ue, getWheelDelta: We, fakeStop: Ke, skipped: Je, isExternalTarget: Ye, addListener: ze, removeListener: Ie }, Qe = B.extend({ run: function (t, e, i, n) { this.stop(), this._el = t, this._inProgress = !0, this._duration = i || .25, this._easeOutPower = 1 / Math.max(n || .5, .2), this._startPos = ke(t), this._offset = e.subtract(this._startPos), this._startTime = +new Date, this.fire("start"), this._animate() }, stop: function () { this._inProgress && (this._step(!0), this._complete()) }, _animate: function () { this._animId = P(this._animate, this), this._step() }, _step: function (t) { var e = +new Date - this._startTime, i = 1e3 * this._duration; e < i ? this._runFrame(this._easeOut(e / i), t) : (this._runFrame(1), this._complete()) }, _runFrame: function (t, e) { var i = this._startPos.add(this._offset.multiplyBy(t)); e && i._round(), xe(this._el, i), this.fire("step") }, _complete: function () { C(this._animId), this._inProgress = !1, this.fire("end") }, _easeOut: function (t) { return 1 - Math.pow(1 - t, this._easeOutPower) } }), ti = B.extend({ options: { crs: $, center: void 0, zoom: void 0, minZoom: void 0, maxZoom: void 0, layers: [], maxBounds: void 0, renderer: void 0, zoomAnimation: !0, zoomAnimationThreshold: 4, fadeAnimation: !0, markerZoomAnimation: !0, transform3DLimit: 8388608, zoomSnap: 1, zoomDelta: 1, trackResize: !0 }, initialize: function (t, e) { e = d(this, e), this._handlers = [], this._layers = {}, this._zoomBoundLayers = {}, this._sizeChanged = !0, this._initContainer(t), this._initLayout(), this._onResize = o(this._onResize, this), this._initEvents(), e.maxBounds && this.setMaxBounds(e.maxBounds), void 0 !== e.zoom && (this._zoom = this._limitZoom(e.zoom)), e.center && void 0 !== e.zoom && this.setView(G(e.center), e.zoom, { reset: !0 }), this.callInitHooks(), this._zoomAnimated = re && gt && !kt && this.options.zoomAnimation, this._zoomAnimated && (this._createAnimProxy(), ze(this._proxy, ae, this._catchTransitionEnd, this)), this._addLayers(this.options.layers) }, setView: function (t, e, n) { if (e = void 0 === e ? this._zoom : this._limitZoom(e), t = this._limitCenter(G(t), e, this.options.maxBounds), n = n || {}, this._stop(), this._loaded && !n.reset && !0 !== n) { void 0 !== n.animate && (n.zoom = i({ animate: n.animate }, n.zoom), n.pan = i({ animate: n.animate, duration: n.duration }, n.pan)); var o = this._zoom !== e ? this._tryAnimatedZoom && this._tryAnimatedZoom(t, e, n.zoom) : this._tryAnimatedPan(t, n.pan); if (o) return clearTimeout(this._sizeTimer), this } return this._resetView(t, e), this }, setZoom: function (t, e) { return this._loaded ? this.setView(this.getCenter(), t, { zoom: e }) : (this._zoom = t, this) }, zoomIn: function (t, e) { return t = t || (gt ? this.options.zoomDelta : 1), this.setZoom(this._zoom + t, e) }, zoomOut: function (t, e) { return t = t || (gt ? this.options.zoomDelta : 1), this.setZoom(this._zoom - t, e) }, setZoomAround: function (t, e, i) { var n = this.getZoomScale(e), o = this.getSize().divideBy(2), r = t instanceof z ? t : this.latLngToContainerPoint(t), a = r.subtract(o).multiplyBy(1 - 1 / n), s = this.containerPointToLatLng(o.add(a)); return this.setView(s, e, { zoom: i }) }, _getBoundsCenterZoom: function (t, e) { e = e || {}, t = t.getBounds ? t.getBounds() : Z(t); var i = I(e.paddingTopLeft || e.padding || [0, 0]), n = I(e.paddingBottomRight || e.padding || [0, 0]), o = this.getBoundsZoom(t, !1, i.add(n)); if (o = "number" === typeof e.maxZoom ? Math.min(e.maxZoom, o) : o, o === 1 / 0) return { center: t.getCenter(), zoom: o }; var r = n.subtract(i).divideBy(2), a = this.project(t.getSouthWest(), o), s = this.project(t.getNorthEast(), o), h = this.unproject(a.add(s).divideBy(2).add(r), o); return { center: h, zoom: o } }, fitBounds: function (t, e) { if (t = Z(t), !t.isValid()) throw new Error("Bounds are not valid."); var i = this._getBoundsCenterZoom(t, e); return this.setView(i.center, i.zoom, e) }, fitWorld: function (t) { return this.fitBounds([[-90, -180], [90, 180]], t) }, panTo: function (t, e) { return this.setView(t, this._zoom, { pan: e }) }, panBy: function (t, e) { if (t = I(t).round(), e = e || {}, !t.x && !t.y) return this.fire("moveend"); if (!0 !== e.animate && !this.getSize().contains(t)) return this._resetView(this.unproject(this.project(this.getCenter()).add(t)), this.getZoom()), this; if (this._panAnim || (this._panAnim = new Qe, this._panAnim.on({ step: this._onPanTransitionStep, end: this._onPanTransitionEnd }, this)), e.noMoveStart || this.fire("movestart"), !1 !== e.animate) { _e(this._mapPane, "leaflet-pan-anim"); var i = this._getMapPanePos().subtract(t).round(); this._panAnim.run(this._mapPane, i, e.duration || .25, e.easeLinearity) } else this._rawPanBy(t), this.fire("move").fire("moveend"); return this }, flyTo: function (t, e, i) { if (i = i || {}, !1 === i.animate || !gt) return this.setView(t, e, i); this._stop(); var n = this.project(this.getCenter()), o = this.project(t), r = this.getSize(), a = this._zoom; t = G(t), e = void 0 === e ? a : e; var s = Math.max(r.x, r.y), h = s * this.getZoomScale(a, e), l = o.distanceTo(n) || 1, u = 1.42, c = u * u; function p(t) { var e = t ? -1 : 1, i = t ? h : s, n = h * h - s * s + e * c * c * l * l, o = 2 * i * c * l, r = n / o, a = Math.sqrt(r * r + 1) - r, u = a < 1e-9 ? -18 : Math.log(a); return u } function d(t) { return (Math.exp(t) - Math.exp(-t)) / 2 } function f(t) { return (Math.exp(t) + Math.exp(-t)) / 2 } function _(t) { return d(t) / f(t) } var m = p(0); function g(t) { return s * (f(m) / f(m + u * t)) } function v(t) { return s * (f(m) * _(m + u * t) - d(m)) / c } function y(t) { return 1 - Math.pow(1 - t, 1.5) } var b = Date.now(), L = (p(1) - m) / u, w = i.duration ? 1e3 * i.duration : 1e3 * L * .8; function x() { var i = (Date.now() - b) / w, r = y(i) * L; i <= 1 ? (this._flyToFrame = P(x, this), this._move(this.unproject(n.add(o.subtract(n).multiplyBy(v(r) / l)), a), this.getScaleZoom(s / g(r), a), { flyTo: !0 })) : this._move(t, e)._moveEnd(!0) } return this._moveStart(!0, i.noMoveStart), x.call(this), this }, flyToBounds: function (t, e) { var i = this._getBoundsCenterZoom(t, e); return this.flyTo(i.center, i.zoom, e) }, setMaxBounds: function (t) { return t = Z(t), t.isValid() ? (this.options.maxBounds && this.off("moveend", this._panInsideMaxBounds), this.options.maxBounds = t, this._loaded && this._panInsideMaxBounds(), this.on("moveend", this._panInsideMaxBounds)) : (this.options.maxBounds = null, this.off("moveend", this._panInsideMaxBounds)) }, setMinZoom: function (t) { var e = this.options.minZoom; return this.options.minZoom = t, this._loaded && e !== t && (this.fire("zoomlevelschange"), this.getZoom() < this.options.minZoom) ? this.setZoom(t) : this }, setMaxZoom: function (t) { var e = this.options.maxZoom; return this.options.maxZoom = t, this._loaded && e !== t && (this.fire("zoomlevelschange"), this.getZoom() > this.options.maxZoom) ? this.setZoom(t) : this }, panInsideBounds: function (t, e) { this._enforcingBounds = !0; var i = this.getCenter(), n = this._limitCenter(i, this._zoom, Z(t)); return i.equals(n) || this.panTo(n, e), this._enforcingBounds = !1, this }, panInside: function (t, e) { e = e || {}; var i = I(e.paddingTopLeft || e.padding || [0, 0]), n = I(e.paddingBottomRight || e.padding || [0, 0]), o = this.getCenter(), r = this.project(o), a = this.project(t), s = this.getPixelBounds(), h = s.getSize().divideBy(2), l = R([s.min.add(i), s.max.subtract(n)]); if (!l.contains(a)) { this._enforcingBounds = !0; var u = r.subtract(a), c = I(a.x + u.x, a.y + u.y); (a.x < l.min.x || a.x > l.max.x) && (c.x = r.x - u.x, u.x > 0 ? c.x += h.x - i.x : c.x -= h.x - n.x), (a.y < l.min.y || a.y > l.max.y) && (c.y = r.y - u.y, u.y > 0 ? c.y += h.y - i.y : c.y -= h.y - n.y), this.panTo(this.unproject(c), e), this._enforcingBounds = !1 } return this }, invalidateSize: function (t) { if (!this._loaded) return this; t = i({ animate: !1, pan: !0 }, !0 === t ? { animate: !0 } : t); var e = this.getSize(); this._sizeChanged = !0, this._lastCenter = null; var n = this.getSize(), r = e.divideBy(2).round(), a = n.divideBy(2).round(), s = r.subtract(a); return s.x || s.y ? (t.animate && t.pan ? this.panBy(s) : (t.pan && this._rawPanBy(s), this.fire("move"), t.debounceMoveend ? (clearTimeout(this._sizeTimer), this._sizeTimer = setTimeout(o(this.fire, this, "moveend"), 200)) : this.fire("moveend")), this.fire("resize", { oldSize: e, newSize: n })) : this }, stop: function () { return this.setZoom(this._limitZoom(this._zoom)), this.options.zoomSnap || this.fire("viewreset"), this._stop() }, locate: function (t) { if (t = this._locateOptions = i({ timeout: 1e4, watch: !1 }, t), !("geolocation" in navigator)) return this._handleGeolocationError({ code: 0, message: "Geolocation not supported." }), this; var e = o(this._handleGeolocationResponse, this), n = o(this._handleGeolocationError, this); return t.watch ? this._locationWatchId = navigator.geolocation.watchPosition(e, n, t) : navigator.geolocation.getCurrentPosition(e, n, t), this }, stopLocate: function () { return navigator.geolocation && navigator.geolocation.clearWatch && navigator.geolocation.clearWatch(this._locationWatchId), this._locateOptions && (this._locateOptions.setView = !1), this }, _handleGeolocationError: function (t) { var e = t.code, i = t.message || (1 === e ? "permission denied" : 2 === e ? "position unavailable" : "timeout"); this._locateOptions.setView && !this._loaded && this.fitWorld(), this.fire("locationerror", { code: e, message: "Geolocation error: " + i + "." }) }, _handleGeolocationResponse: function (t) { var e = t.coords.latitude, i = t.coords.longitude, n = new N(e, i), o = n.toBounds(2 * t.coords.accuracy), r = this._locateOptions; if (r.setView) { var a = this.getBoundsZoom(o); this.setView(n, r.maxZoom ? Math.min(a, r.maxZoom) : a) } var s = { latlng: n, bounds: o, timestamp: t.timestamp }; for (var h in t.coords) "number" === typeof t.coords[h] && (s[h] = t.coords[h]); this.fire("locationfound", s) }, addHandler: function (t, e) { if (!e) return this; var i = this[t] = new e(this); return this._handlers.push(i), this.options[t] && i.enable(), this }, remove: function () { if (this._initEvents(!0), this.off("moveend", this._panInsideMaxBounds), this._containerId !== this._container._leaflet_id) throw new Error("Map container is being reused by another instance"); try { delete this._container._leaflet_id, delete this._containerId } catch (e) { this._container._leaflet_id = void 0, this._containerId = void 0 } var t; for (t in void 0 !== this._locationWatchId && this.stopLocate(), this._stop(), ue(this._mapPane), this._clearControlPos && this._clearControlPos(), this._resizeRequest && (C(this._resizeRequest), this._resizeRequest = null), this._clearHandlers(), this._loaded && this.fire("unload"), this._layers) this._layers[t].remove(); for (t in this._panes) ue(this._panes[t]); return this._layers = [], this._panes = [], delete this._mapPane, delete this._renderer, this }, createPane: function (t, e) { var i = "leaflet-pane" + (t ? " leaflet-" + t.replace("Pane", "") + "-pane" : ""), n = le("div", i, e || this._mapPane); return t && (this._panes[t] = n), n }, getCenter: function () { return this._checkIfLoaded(), this._lastCenter && !this._moved() ? this._lastCenter : this.layerPointToLatLng(this._getCenterLayerPoint()) }, getZoom: function () { return this._zoom }, getBounds: function () { var t = this.getPixelBounds(), e = this.unproject(t.getBottomLeft()), i = this.unproject(t.getTopRight()); return new D(e, i) }, getMinZoom: function () { return void 0 === this.options.minZoom ? this._layersMinZoom || 0 : this.options.minZoom }, getMaxZoom: function () { return void 0 === this.options.maxZoom ? void 0 === this._layersMaxZoom ? 1 / 0 : this._layersMaxZoom : this.options.maxZoom }, getBoundsZoom: function (t, e, i) { t = Z(t), i = I(i || [0, 0]); var n = this.getZoom() || 0, o = this.getMinZoom(), r = this.getMaxZoom(), a = t.getNorthWest(), s = t.getSouthEast(), h = this.getSize().subtract(i), l = R(this.project(s, n), this.project(a, n)).getSize(), u = gt ? this.options.zoomSnap : 1, c = h.x / l.x, p = h.y / l.y, d = e ? Math.max(c, p) : Math.min(c, p); return n = this.getScaleZoom(d, n), u && (n = Math.round(n / (u / 100)) * (u / 100), n = e ? Math.ceil(n / u) * u : Math.floor(n / u) * u), Math.max(o, Math.min(r, n)) }, getSize: function () { return this._size && !this._sizeChanged || (this._size = new z(this._container.clientWidth || 0, this._container.clientHeight || 0), this._sizeChanged = !1), this._size.clone() }, getPixelBounds: function (t, e) { var i = this._getTopLeftPoint(t, e); return new A(i, i.add(this.getSize())) }, getPixelOrigin: function () { return this._checkIfLoaded(), this._pixelOrigin }, getPixelWorldBounds: function (t) { return this.options.crs.getProjectedBounds(void 0 === t ? this.getZoom() : t) }, getPane: function (t) { return "string" === typeof t ? this._panes[t] : t }, getPanes: function () { return this._panes }, getContainer: function () { return this._container }, getZoomScale: function (t, e) { var i = this.options.crs; return e = void 0 === e ? this._zoom : e, i.scale(t) / i.scale(e) }, getScaleZoom: function (t, e) { var i = this.options.crs; e = void 0 === e ? this._zoom : e; var n = i.zoom(t * i.scale(e)); return isNaN(n) ? 1 / 0 : n }, project: function (t, e) { return e = void 0 === e ? this._zoom : e, this.options.crs.latLngToPoint(G(t), e) }, unproject: function (t, e) { return e = void 0 === e ? this._zoom : e, this.options.crs.pointToLatLng(I(t), e) }, layerPointToLatLng: function (t) { var e = I(t).add(this.getPixelOrigin()); return this.unproject(e) }, latLngToLayerPoint: function (t) { var e = this.project(G(t))._round(); return e._subtract(this.getPixelOrigin()) }, wrapLatLng: function (t) { return this.options.crs.wrapLatLng(G(t)) }, wrapLatLngBounds: function (t) { return this.options.crs.wrapLatLngBounds(Z(t)) }, distance: function (t, e) { return this.options.crs.distance(G(t), G(e)) }, containerPointToLayerPoint: function (t) { return I(t).subtract(this._getMapPanePos()) }, layerPointToContainerPoint: function (t) { return I(t).add(this._getMapPanePos()) }, containerPointToLatLng: function (t) { var e = this.containerPointToLayerPoint(I(t)); return this.layerPointToLatLng(e) }, latLngToContainerPoint: function (t) { return this.layerPointToContainerPoint(this.latLngToLayerPoint(G(t))) }, mouseEventToContainerPoint: function (t) { return Ue(t, this._container) }, mouseEventToLayerPoint: function (t) { return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t)) }, mouseEventToLatLng: function (t) { return this.layerPointToLatLng(this.mouseEventToLayerPoint(t)) }, _initContainer: function (t) { var e = this._container = se(t); if (!e) throw new Error("Map container not found."); if (e._leaflet_id) throw new Error("Map container is already initialized."); ze(e, "scroll", this._onScroll, this), this._containerId = a(e) }, _initLayout: function () { var t = this._container; this._fadeAnimated = this.options.fadeAnimation && gt, _e(t, "leaflet-container" + (xt ? " leaflet-touch" : "") + (Pt ? " leaflet-retina" : "") + (tt ? " leaflet-oldie" : "") + (ut ? " leaflet-safari" : "") + (this._fadeAnimated ? " leaflet-fade-anim" : "")); var e = he(t, "position"); "absolute" !== e && "relative" !== e && "fixed" !== e && (t.style.position = "relative"), this._initPanes(), this._initControlPos && this._initControlPos() }, _initPanes: function () { var t = this._panes = {}; this._paneRenderers = {}, this._mapPane = this.createPane("mapPane", this._container), xe(this._mapPane, new z(0, 0)), this.createPane("tilePane"), this.createPane("shadowPane"), this.createPane("overlayPane"), this.createPane("markerPane"), this.createPane("tooltipPane"), this.createPane("popupPane"), this.options.markerZoomAnimation || (_e(t.markerPane, "leaflet-zoom-hide"), _e(t.shadowPane, "leaflet-zoom-hide")) }, _resetView: function (t, e) { xe(this._mapPane, new z(0, 0)); var i = !this._loaded; this._loaded = !0, e = this._limitZoom(e), this.fire("viewprereset"); var n = this._zoom !== e; this._moveStart(n, !1)._move(t, e)._moveEnd(n), this.fire("viewreset"), i && this.fire("load") }, _moveStart: function (t, e) { return t && this.fire("zoomstart"), e || this.fire("movestart"), this }, _move: function (t, e, i) { void 0 === e && (e = this._zoom); var n = this._zoom !== e; return this._zoom = e, this._lastCenter = t, this._pixelOrigin = this._getNewPixelOrigin(t), (n || i && i.pinch) && this.fire("zoom", i), this.fire("move", i) }, _moveEnd: function (t) { return t && this.fire("zoomend"), this.fire("moveend") }, _stop: function () { return C(this._flyToFrame), this._panAnim && this._panAnim.stop(), this }, _rawPanBy: function (t) { xe(this._mapPane, this._getMapPanePos().subtract(t)) }, _getZoomSpan: function () { return this.getMaxZoom() - this.getMinZoom() }, _panInsideMaxBounds: function () { this._enforcingBounds || this.panInsideBounds(this.options.maxBounds) }, _checkIfLoaded: function () { if (!this._loaded) throw new Error("Set map center and zoom first.") }, _initEvents: function (t) { this._targets = {}, this._targets[a(this._container)] = this; var e = t ? Ie : ze; e(this._container, "click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup", this._handleDOMEvent, this), this.options.trackResize && e(window, "resize", this._onResize, this), gt && this.options.transform3DLimit && (t ? this.off : this.on).call(this, "moveend", this._onMoveEnd) }, _onResize: function () { C(this._resizeRequest), this._resizeRequest = P((function () { this.invalidateSize({ debounceMoveend: !0 }) }), this) }, _onScroll: function () { this._container.scrollTop = 0, this._container.scrollLeft = 0 }, _onMoveEnd: function () { var t = this._getMapPanePos(); Math.max(Math.abs(t.x), Math.abs(t.y)) >= this.options.transform3DLimit && this._resetView(this.getCenter(), this.getZoom()) }, _findEventTargets: function (t, e) { var i, n = [], o = "mouseout" === e || "mouseover" === e, r = t.target || t.srcElement, s = !1; while (r) { if (i = this._targets[a(r)], i && ("click" === e || "preclick" === e) && !t._simulated && this._draggableMoved(i)) { s = !0; break } if (i && i.listens(e, !0)) { if (o && !Ye(r, t)) break; if (n.push(i), o) break } if (r === this._container) break; r = r.parentNode } return n.length || s || o || !Ye(r, t) || (n = [this]), n }, _handleDOMEvent: function (t) { if (this._loaded && !Je(t)) { var e = t.type; "mousedown" !== e && "keypress" !== e && "keyup" !== e && "keydown" !== e || Te(t.target || t.srcElement), this._fireDOMEvent(t, e) } }, _mouseEvents: ["click", "dblclick", "mouseover", "mouseout", "contextmenu"], _fireDOMEvent: function (t, e, n) { if ("click" === t.type) { var o = i({}, t); o.type = "preclick", this._fireDOMEvent(o, o.type, n) } if (!t._stopped && (n = (n || []).concat(this._findEventTargets(t, e)), n.length)) { var r = n[0]; "contextmenu" === e && r.listens(e, !0) && He(t); var a = { originalEvent: t }; if ("keypress" !== t.type && "keydown" !== t.type && "keyup" !== t.type) { var s = r.getLatLng && (!r._radius || r._radius <= 10); a.containerPoint = s ? this.latLngToContainerPoint(r.getLatLng()) : this.mouseEventToContainerPoint(t), a.layerPoint = this.containerPointToLayerPoint(a.containerPoint), a.latlng = s ? r.getLatLng() : this.layerPointToLatLng(a.layerPoint) } for (var h = 0; h < n.length; h++)if (n[h].fire(e, a, !0), a.originalEvent._stopped || !1 === n[h].options.bubblingMouseEvents && -1 !== v(this._mouseEvents, e)) return } }, _draggableMoved: function (t) { return t = t.dragging && t.dragging.enabled() ? t : this, t.dragging && t.dragging.moved() || this.boxZoom && this.boxZoom.moved() }, _clearHandlers: function () { for (var t = 0, e = this._handlers.length; t < e; t++)this._handlers[t].disable() }, whenReady: function (t, e) { return this._loaded ? t.call(e || this, { target: this }) : this.on("load", t, e), this }, _getMapPanePos: function () { return ke(this._mapPane) || new z(0, 0) }, _moved: function () { var t = this._getMapPanePos(); return t && !t.equals([0, 0]) }, _getTopLeftPoint: function (t, e) { var i = t && void 0 !== e ? this._getNewPixelOrigin(t, e) : this.getPixelOrigin(); return i.subtract(this._getMapPanePos()) }, _getNewPixelOrigin: function (t, e) { var i = this.getSize()._divideBy(2); return this.project(t, e)._subtract(i)._add(this._getMapPanePos())._round() }, _latLngToNewLayerPoint: function (t, e, i) { var n = this._getNewPixelOrigin(i, e); return this.project(t, e)._subtract(n) }, _latLngBoundsToNewLayerBounds: function (t, e, i) { var n = this._getNewPixelOrigin(i, e); return R([this.project(t.getSouthWest(), e)._subtract(n), this.project(t.getNorthWest(), e)._subtract(n), this.project(t.getSouthEast(), e)._subtract(n), this.project(t.getNorthEast(), e)._subtract(n)]) }, _getCenterLayerPoint: function () { return this.containerPointToLayerPoint(this.getSize()._divideBy(2)) }, _getCenterOffset: function (t) { return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint()) }, _limitCenter: function (t, e, i) { if (!i) return t; var n = this.project(t, e), o = this.getSize().divideBy(2), r = new A(n.subtract(o), n.add(o)), a = this._getBoundsOffset(r, i, e); return a.round().equals([0, 0]) ? t : this.unproject(n.add(a), e) }, _limitOffset: function (t, e) { if (!e) return t; var i = this.getPixelBounds(), n = new A(i.min.add(t), i.max.add(t)); return t.add(this._getBoundsOffset(n, e)) }, _getBoundsOffset: function (t, e, i) { var n = R(this.project(e.getNorthEast(), i), this.project(e.getSouthWest(), i)), o = n.min.subtract(t.min), r = n.max.subtract(t.max), a = this._rebound(o.x, -r.x), s = this._rebound(o.y, -r.y); return new z(a, s) }, _rebound: function (t, e) { return t + e > 0 ? Math.round(t - e) / 2 : Math.max(0, Math.ceil(t)) - Math.max(0, Math.floor(e)) }, _limitZoom: function (t) { var e = this.getMinZoom(), i = this.getMaxZoom(), n = gt ? this.options.zoomSnap : 1; return n && (t = Math.round(t / n) * n), Math.max(e, Math.min(i, t)) }, _onPanTransitionStep: function () { this.fire("move") }, _onPanTransitionEnd: function () { me(this._mapPane, "leaflet-pan-anim"), this.fire("moveend") }, _tryAnimatedPan: function (t, e) { var i = this._getCenterOffset(t)._trunc(); return !(!0 !== (e && e.animate) && !this.getSize().contains(i)) && (this.panBy(i, e), !0) }, _createAnimProxy: function () { var t = this._proxy = le("div", "leaflet-proxy leaflet-zoom-animated"); this._panes.mapPane.appendChild(t), this.on("zoomanim", (function (t) { var e = oe, i = this._proxy.style[e]; we(this._proxy, this.project(t.center, t.zoom), this.getZoomScale(t.zoom, 1)), i === this._proxy.style[e] && this._animatingZoom && this._onZoomTransitionEnd() }), this), this.on("load moveend", this._animMoveEnd, this), this._on("unload", this._destroyAnimProxy, this) }, _destroyAnimProxy: function () { ue(this._proxy), this.off("load moveend", this._animMoveEnd, this), delete this._proxy }, _animMoveEnd: function () { var t = this.getCenter(), e = this.getZoom(); we(this._proxy, this.project(t, e), this.getZoomScale(e, 1)) }, _catchTransitionEnd: function (t) { this._animatingZoom && t.propertyName.indexOf("transform") >= 0 && this._onZoomTransitionEnd() }, _nothingToAnimate: function () { return !this._container.getElementsByClassName("leaflet-zoom-animated").length }, _tryAnimatedZoom: function (t, e, i) { if (this._animatingZoom) return !0; if (i = i || {}, !this._zoomAnimated || !1 === i.animate || this._nothingToAnimate() || Math.abs(e - this._zoom) > this.options.zoomAnimationThreshold) return !1; var n = this.getZoomScale(e), o = this._getCenterOffset(t)._divideBy(1 - 1 / n); return !(!0 !== i.animate && !this.getSize().contains(o)) && (P((function () { this._moveStart(!0, !1)._animateZoom(t, e, !0) }), this), !0) }, _animateZoom: function (t, e, i, n) { this._mapPane && (i && (this._animatingZoom = !0, this._animateToCenter = t, this._animateToZoom = e, _e(this._mapPane, "leaflet-zoom-anim")), this.fire("zoomanim", { center: t, zoom: e, noUpdate: n }), setTimeout(o(this._onZoomTransitionEnd, this), 250)) }, _onZoomTransitionEnd: function () { this._animatingZoom && (this._mapPane && me(this._mapPane, "leaflet-zoom-anim"), this._animatingZoom = !1, this._move(this._animateToCenter, this._animateToZoom), P((function () { this._moveEnd(!0) }), this)) } }); function ei(t, e) { return new ti(t, e) } var ii = S.extend({ options: { position: "topright" }, initialize: function (t) { d(this, t) }, getPosition: function () { return this.options.position }, setPosition: function (t) { var e = this._map; return e && e.removeControl(this), this.options.position = t, e && e.addControl(this), this }, getContainer: function () { return this._container }, addTo: function (t) { this.remove(), this._map = t; var e = this._container = this.onAdd(t), i = this.getPosition(), n = t._controlCorners[i]; return _e(e, "leaflet-control"), -1 !== i.indexOf("bottom") ? n.insertBefore(e, n.firstChild) : n.appendChild(e), this._map.on("unload", this.remove, this), this }, remove: function () { return this._map ? (ue(this._container), this.onRemove && this.onRemove(this._map), this._map.off("unload", this.remove, this), this._map = null, this) : this }, _refocusOnMap: function (t) { this._map && t && t.screenX > 0 && t.screenY > 0 && this._map.getContainer().focus() } }), ni = function (t) { return new ii(t) }; ti.include({ addControl: function (t) { return t.addTo(this), this }, removeControl: function (t) { return t.remove(), this }, _initControlPos: function () { var t = this._controlCorners = {}, e = "leaflet-", i = this._controlContainer = le("div", e + "control-container", this._container); function n(n, o) { var r = e + n + " " + e + o; t[n + o] = le("div", r, i) } n("top", "left"), n("top", "right"), n("bottom", "left"), n("bottom", "right") }, _clearControlPos: function () { for (var t in this._controlCorners) ue(this._controlCorners[t]); ue(this._controlContainer), delete this._controlCorners, delete this._controlContainer } }); var oi = ii.extend({ options: { collapsed: !0, position: "topright", autoZIndex: !0, hideSingleBase: !1, sortLayers: !1, sortFunction: function (t, e, i, n) { return i < n ? -1 : n < i ? 1 : 0 } }, initialize: function (t, e, i) { for (var n in d(this, i), this._layerControlInputs = [], this._layers = [], this._lastZIndex = 0, this._handlingClick = !1, t) this._addLayer(t[n], n); for (n in e) this._addLayer(e[n], n, !0) }, onAdd: function (t) { this._initLayout(), this._update(), this._map = t, t.on("zoomend", this._checkDisabledLayers, this); for (var e = 0; e < this._layers.length; e++)this._layers[e].layer.on("add remove", this._onLayerChange, this); return this._container }, addTo: function (t) { return ii.prototype.addTo.call(this, t), this._expandIfNotCollapsed() }, onRemove: function () { this._map.off("zoomend", this._checkDisabledLayers, this); for (var t = 0; t < this._layers.length; t++)this._layers[t].layer.off("add remove", this._onLayerChange, this) }, addBaseLayer: function (t, e) { return this._addLayer(t, e), this._map ? this._update() : this }, addOverlay: function (t, e) { return this._addLayer(t, e, !0), this._map ? this._update() : this }, removeLayer: function (t) { t.off("add remove", this._onLayerChange, this); var e = this._getLayer(a(t)); return e && this._layers.splice(this._layers.indexOf(e), 1), this._map ? this._update() : this }, expand: function () { _e(this._container, "leaflet-control-layers-expanded"), this._section.style.height = null; var t = this._map.getSize().y - (this._container.offsetTop + 50); return t < this._section.clientHeight ? (_e(this._section, "leaflet-control-layers-scrollbar"), this._section.style.height = t + "px") : me(this._section, "leaflet-control-layers-scrollbar"), this._checkDisabledLayers(), this }, collapse: function () { return me(this._container, "leaflet-control-layers-expanded"), this }, _initLayout: function () { var t = "leaflet-control-layers", e = this._container = le("div", t), i = this.options.collapsed; e.setAttribute("aria-haspopup", !0), Fe(e), Ge(e); var n = this._section = le("section", t + "-list"); i && (this._map.on("click", this.collapse, this), nt || ze(e, { mouseenter: this.expand, mouseleave: this.collapse }, this)); var o = this._layersLink = le("a", t + "-toggle", e); o.href = "#", o.title = "Layers", xt ? (ze(o, "click", Ve), ze(o, "click", this.expand, this)) : ze(o, "focus", this.expand, this), i || this.expand(), this._baseLayersList = le("div", t + "-base", n), this._separator = le("div", t + "-separator", n), this._overlaysList = le("div", t + "-overlays", n), e.appendChild(n) }, _getLayer: function (t) { for (var e = 0; e < this._layers.length; e++)if (this._layers[e] && a(this._layers[e].layer) === t) return this._layers[e] }, _addLayer: function (t, e, i) { this._map && t.on("add remove", this._onLayerChange, this), this._layers.push({ layer: t, name: e, overlay: i }), this.options.sortLayers && this._layers.sort(o((function (t, e) { return this.options.sortFunction(t.layer, e.layer, t.name, e.name) }), this)), this.options.autoZIndex && t.setZIndex && (this._lastZIndex++, t.setZIndex(this._lastZIndex)), this._expandIfNotCollapsed() }, _update: function () { if (!this._container) return this; ce(this._baseLayersList), ce(this._overlaysList), this._layerControlInputs = []; var t, e, i, n, o = 0; for (i = 0; i < this._layers.length; i++)n = this._layers[i], this._addItem(n), e = e || n.overlay, t = t || !n.overlay, o += n.overlay ? 0 : 1; return this.options.hideSingleBase && (t = t && o > 1, this._baseLayersList.style.display = t ? "" : "none"), this._separator.style.display = e && t ? "" : "none", this }, _onLayerChange: function (t) { this._handlingClick || this._update(); var e = this._getLayer(a(t.target)), i = e.overlay ? "add" === t.type ? "overlayadd" : "overlayremove" : "add" === t.type ? "baselayerchange" : null; i && this._map.fire(i, e) }, _createRadioElement: function (t, e) { var i = '", n = document.createElement("div"); return n.innerHTML = i, n.firstChild }, _addItem: function (t) { var e, i = document.createElement("label"), n = this._map.hasLayer(t.layer); t.overlay ? (e = document.createElement("input"), e.type = "checkbox", e.className = "leaflet-control-layers-selector", e.defaultChecked = n) : e = this._createRadioElement("leaflet-base-layers_" + a(this), n), this._layerControlInputs.push(e), e.layerId = a(t.layer), ze(e, "click", this._onInputClick, this); var o = document.createElement("span"); o.innerHTML = " " + t.name; var r = document.createElement("div"); i.appendChild(r), r.appendChild(e), r.appendChild(o); var s = t.overlay ? this._overlaysList : this._baseLayersList; return s.appendChild(i), this._checkDisabledLayers(), i }, _onInputClick: function () { var t, e, i = this._layerControlInputs, n = [], o = []; this._handlingClick = !0; for (var r = i.length - 1; r >= 0; r--)t = i[r], e = this._getLayer(t.layerId).layer, t.checked ? n.push(e) : t.checked || o.push(e); for (r = 0; r < o.length; r++)this._map.hasLayer(o[r]) && this._map.removeLayer(o[r]); for (r = 0; r < n.length; r++)this._map.hasLayer(n[r]) || this._map.addLayer(n[r]); this._handlingClick = !1, this._refocusOnMap() }, _checkDisabledLayers: function () { for (var t, e, i = this._layerControlInputs, n = this._map.getZoom(), o = i.length - 1; o >= 0; o--)t = i[o], e = this._getLayer(t.layerId).layer, t.disabled = void 0 !== e.options.minZoom && n < e.options.minZoom || void 0 !== e.options.maxZoom && n > e.options.maxZoom }, _expandIfNotCollapsed: function () { return this._map && !this.options.collapsed && this.expand(), this }, _expand: function () { return this.expand() }, _collapse: function () { return this.collapse() } }), ri = function (t, e, i) { return new oi(t, e, i) }, ai = ii.extend({ options: { position: "topleft", zoomInText: "+", zoomInTitle: "Zoom in", zoomOutText: "−", zoomOutTitle: "Zoom out" }, onAdd: function (t) { var e = "leaflet-control-zoom", i = le("div", e + " leaflet-bar"), n = this.options; return this._zoomInButton = this._createButton(n.zoomInText, n.zoomInTitle, e + "-in", i, this._zoomIn), this._zoomOutButton = this._createButton(n.zoomOutText, n.zoomOutTitle, e + "-out", i, this._zoomOut), this._updateDisabled(), t.on("zoomend zoomlevelschange", this._updateDisabled, this), i }, onRemove: function (t) { t.off("zoomend zoomlevelschange", this._updateDisabled, this) }, disable: function () { return this._disabled = !0, this._updateDisabled(), this }, enable: function () { return this._disabled = !1, this._updateDisabled(), this }, _zoomIn: function (t) { !this._disabled && this._map._zoom < this._map.getMaxZoom() && this._map.zoomIn(this._map.options.zoomDelta * (t.shiftKey ? 3 : 1)) }, _zoomOut: function (t) { !this._disabled && this._map._zoom > this._map.getMinZoom() && this._map.zoomOut(this._map.options.zoomDelta * (t.shiftKey ? 3 : 1)) }, _createButton: function (t, e, i, n, o) { var r = le("a", i, n); return r.innerHTML = t, r.href = "#", r.title = e, r.setAttribute("role", "button"), r.setAttribute("aria-label", e), Fe(r), ze(r, "click", Ve), ze(r, "click", o, this), ze(r, "click", this._refocusOnMap, this), r }, _updateDisabled: function () { var t = this._map, e = "leaflet-disabled"; me(this._zoomInButton, e), me(this._zoomOutButton, e), (this._disabled || t._zoom === t.getMinZoom()) && _e(this._zoomOutButton, e), (this._disabled || t._zoom === t.getMaxZoom()) && _e(this._zoomInButton, e) } }); ti.mergeOptions({ zoomControl: !0 }), ti.addInitHook((function () { this.options.zoomControl && (this.zoomControl = new ai, this.addControl(this.zoomControl)) })); var si = function (t) { return new ai(t) }, hi = ii.extend({ options: { position: "bottomleft", maxWidth: 100, metric: !0, imperial: !0 }, onAdd: function (t) { var e = "leaflet-control-scale", i = le("div", e), n = this.options; return this._addScales(n, e + "-line", i), t.on(n.updateWhenIdle ? "moveend" : "move", this._update, this), t.whenReady(this._update, this), i }, onRemove: function (t) { t.off(this.options.updateWhenIdle ? "moveend" : "move", this._update, this) }, _addScales: function (t, e, i) { t.metric && (this._mScale = le("div", e, i)), t.imperial && (this._iScale = le("div", e, i)) }, _update: function () { var t = this._map, e = t.getSize().y / 2, i = t.distance(t.containerPointToLatLng([0, e]), t.containerPointToLatLng([this.options.maxWidth, e])); this._updateScales(i) }, _updateScales: function (t) { this.options.metric && t && this._updateMetric(t), this.options.imperial && t && this._updateImperial(t) }, _updateMetric: function (t) { var e = this._getRoundNum(t), i = e < 1e3 ? e + " m" : e / 1e3 + " km"; this._updateScale(this._mScale, i, e / t) }, _updateImperial: function (t) { var e, i, n, o = 3.2808399 * t; o > 5280 ? (e = o / 5280, i = this._getRoundNum(e), this._updateScale(this._iScale, i + " mi", i / e)) : (n = this._getRoundNum(o), this._updateScale(this._iScale, n + " ft", n / o)) }, _updateScale: function (t, e, i) { t.style.width = Math.round(this.options.maxWidth * i) + "px", t.innerHTML = e }, _getRoundNum: function (t) { var e = Math.pow(10, (Math.floor(t) + "").length - 1), i = t / e; return i = i >= 10 ? 10 : i >= 5 ? 5 : i >= 3 ? 3 : i >= 2 ? 2 : 1, e * i } }), li = function (t) { return new hi(t) }, ui = ii.extend({ options: { position: "bottomright", prefix: 'Leaflet' }, initialize: function (t) { d(this, t), this._attributions = {} }, onAdd: function (t) { for (var e in t.attributionControl = this, this._container = le("div", "leaflet-control-attribution"), Fe(this._container), t._layers) t._layers[e].getAttribution && this.addAttribution(t._layers[e].getAttribution()); return this._update(), this._container }, setPrefix: function (t) { return this.options.prefix = t, this._update(), this }, addAttribution: function (t) { return t ? (this._attributions[t] || (this._attributions[t] = 0), this._attributions[t]++, this._update(), this) : this }, removeAttribution: function (t) { return t ? (this._attributions[t] && (this._attributions[t]--, this._update()), this) : this }, _update: function () { if (this._map) { var t = []; for (var e in this._attributions) this._attributions[e] && t.push(e); var i = []; this.options.prefix && i.push(this.options.prefix), t.length && i.push(t.join(", ")), this._container.innerHTML = i.join(" | ") } } }); ti.mergeOptions({ attributionControl: !0 }), ti.addInitHook((function () { this.options.attributionControl && (new ui).addTo(this) })); var ci = function (t) { return new ui(t) }; ii.Layers = oi, ii.Zoom = ai, ii.Scale = hi, ii.Attribution = ui, ni.layers = ri, ni.zoom = si, ni.scale = li, ni.attribution = ci; var pi = S.extend({ initialize: function (t) { this._map = t }, enable: function () { return this._enabled || (this._enabled = !0, this.addHooks()), this }, disable: function () { return this._enabled ? (this._enabled = !1, this.removeHooks(), this) : this }, enabled: function () { return !!this._enabled } }); pi.addTo = function (t, e) { return t.addHandler(e, this), this }; var di, fi = { Events: E }, _i = xt ? "touchstart mousedown" : "mousedown", mi = { mousedown: "mouseup", touchstart: "touchend", pointerdown: "touchend", MSPointerDown: "touchend" }, gi = { mousedown: "mousemove", touchstart: "touchmove", pointerdown: "touchmove", MSPointerDown: "touchmove" }, vi = B.extend({ options: { clickTolerance: 3 }, initialize: function (t, e, i, n) { d(this, n), this._element = t, this._dragStartTarget = e || t, this._preventOutline = i }, enable: function () { this._enabled || (ze(this._dragStartTarget, _i, this._onDown, this), this._enabled = !0) }, disable: function () { this._enabled && (vi._dragging === this && this.finishDrag(), Ie(this._dragStartTarget, _i, this._onDown, this), this._enabled = !1, this._moved = !1) }, _onDown: function (t) { if (!t._simulated && this._enabled && (this._moved = !1, !fe(this._element, "leaflet-zoom-anim") && !(vi._dragging || t.shiftKey || 1 !== t.which && 1 !== t.button && !t.touches) && (vi._dragging = this, this._preventOutline && Te(this._element), Pe(), Qt(), !this._moving))) { this.fire("down"); var e = t.touches ? t.touches[0] : t, i = Oe(this._element); this._startPoint = new z(e.clientX, e.clientY), this._parentScale = Ee(i), ze(document, gi[t.type], this._onMove, this), ze(document, mi[t.type], this._onUp, this) } }, _onMove: function (t) { if (!t._simulated && this._enabled) if (t.touches && t.touches.length > 1) this._moved = !0; else { var e = t.touches && 1 === t.touches.length ? t.touches[0] : t, i = new z(e.clientX, e.clientY)._subtract(this._startPoint); (i.x || i.y) && (Math.abs(i.x) + Math.abs(i.y) < this.options.clickTolerance || (i.x /= this._parentScale.x, i.y /= this._parentScale.y, He(t), this._moved || (this.fire("dragstart"), this._moved = !0, this._startPos = ke(this._element).subtract(i), _e(document.body, "leaflet-dragging"), this._lastTarget = t.target || t.srcElement, window.SVGElementInstance && this._lastTarget instanceof window.SVGElementInstance && (this._lastTarget = this._lastTarget.correspondingUseElement), _e(this._lastTarget, "leaflet-drag-target")), this._newPos = this._startPos.add(i), this._moving = !0, C(this._animRequest), this._lastEvent = t, this._animRequest = P(this._updatePosition, this, !0))) } }, _updatePosition: function () { var t = { originalEvent: this._lastEvent }; this.fire("predrag", t), xe(this._element, this._newPos), this.fire("drag", t) }, _onUp: function (t) { !t._simulated && this._enabled && this.finishDrag() }, finishDrag: function () { for (var t in me(document.body, "leaflet-dragging"), this._lastTarget && (me(this._lastTarget, "leaflet-drag-target"), this._lastTarget = null), gi) Ie(document, gi[t], this._onMove, this), Ie(document, mi[t], this._onUp, this); Ce(), te(), this._moved && this._moving && (C(this._animRequest), this.fire("dragend", { distance: this._newPos.distanceTo(this._startPos) })), this._moving = !1, vi._dragging = !1 } }); function yi(t, e) { if (!e || !t.length) return t.slice(); var i = e * e; return t = ki(t, i), t = wi(t, i), t } function bi(t, e, i) { return Math.sqrt(Si(t, e, i, !0)) } function Li(t, e, i) { return Si(t, e, i) } function wi(t, e) { var i = t.length, n = typeof Uint8Array !== void 0 + "" ? Uint8Array : Array, o = new n(i); o[0] = o[i - 1] = 1, xi(t, o, e, 0, i - 1); var r, a = []; for (r = 0; r < i; r++)o[r] && a.push(t[r]); return a } function xi(t, e, i, n, o) { var r, a, s, h = 0; for (a = n + 1; a <= o - 1; a++)s = Si(t[a], t[n], t[o], !0), s > h && (r = a, h = s); h > i && (e[r] = 1, xi(t, e, i, n, r), xi(t, e, i, r, o)) } function ki(t, e) { for (var i = [t[0]], n = 1, o = 0, r = t.length; n < r; n++)Ti(t[n], t[o]) > e && (i.push(t[n]), o = n); return o < r - 1 && i.push(t[r - 1]), i } function Mi(t, e, i, n, o) { var r, a, s, h = n ? di : Ci(t, i), l = Ci(e, i); di = l; while (1) { if (!(h | l)) return [t, e]; if (h & l) return !1; r = h || l, a = Pi(t, e, r, i, o), s = Ci(a, i), r === h ? (t = a, h = s) : (e = a, l = s) } } function Pi(t, e, i, n, o) { var r, a, s = e.x - t.x, h = e.y - t.y, l = n.min, u = n.max; return 8 & i ? (r = t.x + s * (u.y - t.y) / h, a = u.y) : 4 & i ? (r = t.x + s * (l.y - t.y) / h, a = l.y) : 2 & i ? (r = u.x, a = t.y + h * (u.x - t.x) / s) : 1 & i && (r = l.x, a = t.y + h * (l.x - t.x) / s), new z(r, a, o) } function Ci(t, e) { var i = 0; return t.x < e.min.x ? i |= 1 : t.x > e.max.x && (i |= 2), t.y < e.min.y ? i |= 4 : t.y > e.max.y && (i |= 8), i } function Ti(t, e) { var i = e.x - t.x, n = e.y - t.y; return i * i + n * n } function Si(t, e, i, n) { var o, r = e.x, a = e.y, s = i.x - r, h = i.y - a, l = s * s + h * h; return l > 0 && (o = ((t.x - r) * s + (t.y - a) * h) / l, o > 1 ? (r = i.x, a = i.y) : o > 0 && (r += s * o, a += h * o)), s = t.x - r, h = t.y - a, n ? s * s + h * h : new z(r, a) } function Oi(t) { return !g(t[0]) || "object" !== typeof t[0][0] && "undefined" !== typeof t[0][0] } function Ei(t) { return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."), Oi(t) } var Bi = { simplify: yi, pointToSegmentDistance: bi, closestPointOnSegment: Li, clipSegment: Mi, _getEdgeIntersection: Pi, _getBitCode: Ci, _sqClosestPointOnSegment: Si, isFlat: Oi, _flat: Ei }; function zi(t, e, i) { var n, o, r, a, s, h, l, u, c, p = [1, 4, 2, 8]; for (o = 0, l = t.length; o < l; o++)t[o]._code = Ci(t[o], e); for (a = 0; a < 4; a++) { for (u = p[a], n = [], o = 0, l = t.length, r = l - 1; o < l; r = o++)s = t[o], h = t[r], s._code & u ? h._code & u || (c = Pi(h, s, u, e, i), c._code = Ci(c, e), n.push(c)) : (h._code & u && (c = Pi(h, s, u, e, i), c._code = Ci(c, e), n.push(c)), n.push(s)); t = n } return t } var ji = { clipPolygon: zi }, Ii = { project: function (t) { return new z(t.lng, t.lat) }, unproject: function (t) { return new N(t.y, t.x) }, bounds: new A([-180, -90], [180, 90]) }, Ai = { R: 6378137, R_MINOR: 6356752.314245179, bounds: new A([-20037508.34279, -15496570.73972], [20037508.34279, 18764656.23138]), project: function (t) { var e = Math.PI / 180, i = this.R, n = t.lat * e, o = this.R_MINOR / i, r = Math.sqrt(1 - o * o), a = r * Math.sin(n), s = Math.tan(Math.PI / 4 - n / 2) / Math.pow((1 - a) / (1 + a), r / 2); return n = -i * Math.log(Math.max(s, 1e-10)), new z(t.lng * e * i, n) }, unproject: function (t) { for (var e, i = 180 / Math.PI, n = this.R, o = this.R_MINOR / n, r = Math.sqrt(1 - o * o), a = Math.exp(-t.y / n), s = Math.PI / 2 - 2 * Math.atan(a), h = 0, l = .1; h < 15 && Math.abs(l) > 1e-7; h++)e = r * Math.sin(s), e = Math.pow((1 - e) / (1 + e), r / 2), l = Math.PI / 2 - 2 * Math.atan(a * e) - s, s += l; return new N(s * i, t.x * i / n) } }, Ri = { LonLat: Ii, Mercator: Ai, SphericalMercator: U }, Di = i({}, H, { code: "EPSG:3395", projection: Ai, transformation: function () { var t = .5 / (Math.PI * Ai.R); return W(t, .5, -t, .5) }() }), Zi = i({}, H, { code: "EPSG:4326", projection: Ii, transformation: W(1 / 180, 1, -1 / 180, .5) }), Ni = i({}, F, { projection: Ii, transformation: W(1, 0, -1, 0), scale: function (t) { return Math.pow(2, t) }, zoom: function (t) { return Math.log(t) / Math.LN2 }, distance: function (t, e) { var i = e.lng - t.lng, n = e.lat - t.lat; return Math.sqrt(i * i + n * n) }, infinite: !0 }); F.Earth = H, F.EPSG3395 = Di, F.EPSG3857 = $, F.EPSG900913 = K, F.EPSG4326 = Zi, F.Simple = Ni; var Gi = B.extend({ options: { pane: "overlayPane", attribution: null, bubblingMouseEvents: !0 }, addTo: function (t) { return t.addLayer(this), this }, remove: function () { return this.removeFrom(this._map || this._mapToAdd) }, removeFrom: function (t) { return t && t.removeLayer(this), this }, getPane: function (t) { return this._map.getPane(t ? this.options[t] || t : this.options.pane) }, addInteractiveTarget: function (t) { return this._map._targets[a(t)] = this, this }, removeInteractiveTarget: function (t) { return delete this._map._targets[a(t)], this }, getAttribution: function () { return this.options.attribution }, _layerAdd: function (t) { var e = t.target; if (e.hasLayer(this)) { if (this._map = e, this._zoomAnimated = e._zoomAnimated, this.getEvents) { var i = this.getEvents(); e.on(i, this), this.once("remove", (function () { e.off(i, this) }), this) } this.onAdd(e), this.getAttribution && e.attributionControl && e.attributionControl.addAttribution(this.getAttribution()), this.fire("add"), e.fire("layeradd", { layer: this }) } } }); ti.include({ addLayer: function (t) { if (!t._layerAdd) throw new Error("The provided object is not a Layer."); var e = a(t); return this._layers[e] || (this._layers[e] = t, t._mapToAdd = this, t.beforeAdd && t.beforeAdd(this), this.whenReady(t._layerAdd, t)), this }, removeLayer: function (t) { var e = a(t); return this._layers[e] ? (this._loaded && t.onRemove(this), t.getAttribution && this.attributionControl && this.attributionControl.removeAttribution(t.getAttribution()), delete this._layers[e], this._loaded && (this.fire("layerremove", { layer: t }), t.fire("remove")), t._map = t._mapToAdd = null, this) : this }, hasLayer: function (t) { return !!t && a(t) in this._layers }, eachLayer: function (t, e) { for (var i in this._layers) t.call(e, this._layers[i]); return this }, _addLayers: function (t) { t = t ? g(t) ? t : [t] : []; for (var e = 0, i = t.length; e < i; e++)this.addLayer(t[e]) }, _addZoomLimit: function (t) { !isNaN(t.options.maxZoom) && isNaN(t.options.minZoom) || (this._zoomBoundLayers[a(t)] = t, this._updateZoomLevels()) }, _removeZoomLimit: function (t) { var e = a(t); this._zoomBoundLayers[e] && (delete this._zoomBoundLayers[e], this._updateZoomLevels()) }, _updateZoomLevels: function () { var t = 1 / 0, e = -1 / 0, i = this._getZoomSpan(); for (var n in this._zoomBoundLayers) { var o = this._zoomBoundLayers[n].options; t = void 0 === o.minZoom ? t : Math.min(t, o.minZoom), e = void 0 === o.maxZoom ? e : Math.max(e, o.maxZoom) } this._layersMaxZoom = e === -1 / 0 ? void 0 : e, this._layersMinZoom = t === 1 / 0 ? void 0 : t, i !== this._getZoomSpan() && this.fire("zoomlevelschange"), void 0 === this.options.maxZoom && this._layersMaxZoom && this.getZoom() > this._layersMaxZoom && this.setZoom(this._layersMaxZoom), void 0 === this.options.minZoom && this._layersMinZoom && this.getZoom() < this._layersMinZoom && this.setZoom(this._layersMinZoom) } }); var Fi = Gi.extend({ initialize: function (t, e) { var i, n; if (d(this, e), this._layers = {}, t) for (i = 0, n = t.length; i < n; i++)this.addLayer(t[i]) }, addLayer: function (t) { var e = this.getLayerId(t); return this._layers[e] = t, this._map && this._map.addLayer(t), this }, removeLayer: function (t) { var e = t in this._layers ? t : this.getLayerId(t); return this._map && this._layers[e] && this._map.removeLayer(this._layers[e]), delete this._layers[e], this }, hasLayer: function (t) { if (!t) return !1; var e = "number" === typeof t ? t : this.getLayerId(t); return e in this._layers }, clearLayers: function () { return this.eachLayer(this.removeLayer, this) }, invoke: function (t) { var e, i, n = Array.prototype.slice.call(arguments, 1); for (e in this._layers) i = this._layers[e], i[t] && i[t].apply(i, n); return this }, onAdd: function (t) { this.eachLayer(t.addLayer, t) }, onRemove: function (t) { this.eachLayer(t.removeLayer, t) }, eachLayer: function (t, e) { for (var i in this._layers) t.call(e, this._layers[i]); return this }, getLayer: function (t) { return this._layers[t] }, getLayers: function () { var t = []; return this.eachLayer(t.push, t), t }, setZIndex: function (t) { return this.invoke("setZIndex", t) }, getLayerId: function (t) { return a(t) } }), Hi = function (t, e) { return new Fi(t, e) }, Vi = Fi.extend({ addLayer: function (t) { return this.hasLayer(t) ? this : (t.addEventParent(this), Fi.prototype.addLayer.call(this, t), this.fire("layeradd", { layer: t })) }, removeLayer: function (t) { return this.hasLayer(t) ? (t in this._layers && (t = this._layers[t]), t.removeEventParent(this), Fi.prototype.removeLayer.call(this, t), this.fire("layerremove", { layer: t })) : this }, setStyle: function (t) { return this.invoke("setStyle", t) }, bringToFront: function () { return this.invoke("bringToFront") }, bringToBack: function () { return this.invoke("bringToBack") }, getBounds: function () { var t = new D; for (var e in this._layers) { var i = this._layers[e]; t.extend(i.getBounds ? i.getBounds() : i.getLatLng()) } return t } }), Ui = function (t, e) { return new Vi(t, e) }, qi = S.extend({ options: { popupAnchor: [0, 0], tooltipAnchor: [0, 0] }, initialize: function (t) { d(this, t) }, createIcon: function (t) { return this._createIcon("icon", t) }, createShadow: function (t) { return this._createIcon("shadow", t) }, _createIcon: function (t, e) { var i = this._getIconUrl(t); if (!i) { if ("icon" === t) throw new Error("iconUrl not set in Icon options (see the docs)."); return null } var n = this._createImg(i, e && "IMG" === e.tagName ? e : null); return this._setIconStyles(n, t), n }, _setIconStyles: function (t, e) { var i = this.options, n = i[e + "Size"]; "number" === typeof n && (n = [n, n]); var o = I(n), r = I("shadow" === e && i.shadowAnchor || i.iconAnchor || o && o.divideBy(2, !0)); t.className = "leaflet-marker-" + e + " " + (i.className || ""), r && (t.style.marginLeft = -r.x + "px", t.style.marginTop = -r.y + "px"), o && (t.style.width = o.x + "px", t.style.height = o.y + "px") }, _createImg: function (t, e) { return e = e || document.createElement("img"), e.src = t, e }, _getIconUrl: function (t) { return Pt && this.options[t + "RetinaUrl"] || this.options[t + "Url"] } }); function Wi(t) { return new qi(t) } var $i = qi.extend({ options: { iconUrl: "marker-icon.png", iconRetinaUrl: "marker-icon-2x.png", shadowUrl: "marker-shadow.png", iconSize: [25, 41], iconAnchor: [12, 41], popupAnchor: [1, -34], tooltipAnchor: [16, -28], shadowSize: [41, 41] }, _getIconUrl: function (t) { return $i.imagePath || ($i.imagePath = this._detectIconPath()), (this.options.imagePath || $i.imagePath) + qi.prototype._getIconUrl.call(this, t) }, _detectIconPath: function () { var t = le("div", "leaflet-default-icon-path", document.body), e = he(t, "background-image") || he(t, "backgroundImage"); return document.body.removeChild(t), e = null === e || 0 !== e.indexOf("url") ? "" : e.replace(/^url\(["']?/, "").replace(/marker-icon\.png["']?\)$/, ""), e } }), Ki = pi.extend({ initialize: function (t) { this._marker = t }, addHooks: function () { var t = this._marker._icon; this._draggable || (this._draggable = new vi(t, t, !0)), this._draggable.on({ dragstart: this._onDragStart, predrag: this._onPreDrag, drag: this._onDrag, dragend: this._onDragEnd }, this).enable(), _e(t, "leaflet-marker-draggable") }, removeHooks: function () { this._draggable.off({ dragstart: this._onDragStart, predrag: this._onPreDrag, drag: this._onDrag, dragend: this._onDragEnd }, this).disable(), this._marker._icon && me(this._marker._icon, "leaflet-marker-draggable") }, moved: function () { return this._draggable && this._draggable._moved }, _adjustPan: function (t) { var e = this._marker, i = e._map, n = this._marker.options.autoPanSpeed, o = this._marker.options.autoPanPadding, r = ke(e._icon), a = i.getPixelBounds(), s = i.getPixelOrigin(), h = R(a.min._subtract(s).add(o), a.max._subtract(s).subtract(o)); if (!h.contains(r)) { var l = I((Math.max(h.max.x, r.x) - h.max.x) / (a.max.x - h.max.x) - (Math.min(h.min.x, r.x) - h.min.x) / (a.min.x - h.min.x), (Math.max(h.max.y, r.y) - h.max.y) / (a.max.y - h.max.y) - (Math.min(h.min.y, r.y) - h.min.y) / (a.min.y - h.min.y)).multiplyBy(n); i.panBy(l, { animate: !1 }), this._draggable._newPos._add(l), this._draggable._startPos._add(l), xe(e._icon, this._draggable._newPos), this._onDrag(t), this._panRequest = P(this._adjustPan.bind(this, t)) } }, _onDragStart: function () { this._oldLatLng = this._marker.getLatLng(), this._marker.closePopup && this._marker.closePopup(), this._marker.fire("movestart").fire("dragstart") }, _onPreDrag: function (t) { this._marker.options.autoPan && (C(this._panRequest), this._panRequest = P(this._adjustPan.bind(this, t))) }, _onDrag: function (t) { var e = this._marker, i = e._shadow, n = ke(e._icon), o = e._map.layerPointToLatLng(n); i && xe(i, n), e._latlng = o, t.latlng = o, t.oldLatLng = this._oldLatLng, e.fire("move", t).fire("drag", t) }, _onDragEnd: function (t) { C(this._panRequest), delete this._oldLatLng, this._marker.fire("moveend").fire("dragend", t) } }), Ji = Gi.extend({ options: { icon: new $i, interactive: !0, keyboard: !0, title: "", alt: "", zIndexOffset: 0, opacity: 1, riseOnHover: !1, riseOffset: 250, pane: "markerPane", shadowPane: "shadowPane", bubblingMouseEvents: !1, draggable: !1, autoPan: !1, autoPanPadding: [50, 50], autoPanSpeed: 10 }, initialize: function (t, e) { d(this, e), this._latlng = G(t) }, onAdd: function (t) { this._zoomAnimated = this._zoomAnimated && t.options.markerZoomAnimation, this._zoomAnimated && t.on("zoomanim", this._animateZoom, this), this._initIcon(), this.update() }, onRemove: function (t) { 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() }, getEvents: function () { return { zoom: this.update, viewreset: this.update } }, getLatLng: function () { return this._latlng }, setLatLng: function (t) { var e = this._latlng; return this._latlng = G(t), this.update(), this.fire("move", { oldLatLng: e, latlng: this._latlng }) }, setZIndexOffset: function (t) { return this.options.zIndexOffset = t, this.update() }, getIcon: function () { return this.options.icon }, setIcon: function (t) { return this.options.icon = t, this._map && (this._initIcon(), this.update()), this._popup && this.bindPopup(this._popup, this._popup.options), this }, getElement: function () { return this._icon }, update: function () { if (this._icon && this._map) { var t = this._map.latLngToLayerPoint(this._latlng).round(); this._setPos(t) } return this }, _initIcon: function () { var t = this.options, e = "leaflet-zoom-" + (this._zoomAnimated ? "animated" : "hide"), i = t.icon.createIcon(this._icon), n = !1; i !== this._icon && (this._icon && this._removeIcon(), n = !0, t.title && (i.title = t.title), "IMG" === i.tagName && (i.alt = t.alt || "")), _e(i, e), t.keyboard && (i.tabIndex = "0"), this._icon = i, t.riseOnHover && this.on({ mouseover: this._bringToFront, mouseout: this._resetZIndex }); var o = t.icon.createShadow(this._shadow), r = !1; o !== this._shadow && (this._removeShadow(), r = !0), o && (_e(o, e), o.alt = ""), this._shadow = o, t.opacity < 1 && this._updateOpacity(), n && this.getPane().appendChild(this._icon), this._initInteraction(), o && r && this.getPane(t.shadowPane).appendChild(this._shadow) }, _removeIcon: function () { this.options.riseOnHover && this.off({ mouseover: this._bringToFront, mouseout: this._resetZIndex }), ue(this._icon), this.removeInteractiveTarget(this._icon), this._icon = null }, _removeShadow: function () { this._shadow && ue(this._shadow), this._shadow = null }, _setPos: function (t) { this._icon && xe(this._icon, t), this._shadow && xe(this._shadow, t), this._zIndex = t.y + this.options.zIndexOffset, this._resetZIndex() }, _updateZIndex: function (t) { this._icon && (this._icon.style.zIndex = this._zIndex + t) }, _animateZoom: function (t) { var e = this._map._latLngToNewLayerPoint(this._latlng, t.zoom, t.center).round(); this._setPos(e) }, _initInteraction: function () { if (this.options.interactive && (_e(this._icon, "leaflet-interactive"), this.addInteractiveTarget(this._icon), Ki)) { var t = this.options.draggable; this.dragging && (t = this.dragging.enabled(), this.dragging.disable()), this.dragging = new Ki(this), t && this.dragging.enable() } }, setOpacity: function (t) { return this.options.opacity = t, this._map && this._updateOpacity(), this }, _updateOpacity: function () { var t = this.options.opacity; this._icon && ye(this._icon, t), this._shadow && ye(this._shadow, t) }, _bringToFront: function () { this._updateZIndex(this.options.riseOffset) }, _resetZIndex: function () { this._updateZIndex(0) }, _getPopupAnchor: function () { return this.options.icon.options.popupAnchor }, _getTooltipAnchor: function () { return this.options.icon.options.tooltipAnchor } }); function Yi(t, e) { return new Ji(t, e) } var Xi = Gi.extend({ options: { stroke: !0, color: "#3388ff", weight: 3, opacity: 1, lineCap: "round", lineJoin: "round", dashArray: null, dashOffset: null, fill: !1, fillColor: null, fillOpacity: .2, fillRule: "evenodd", interactive: !0, bubblingMouseEvents: !0 }, beforeAdd: function (t) { this._renderer = t.getRenderer(this) }, onAdd: function () { this._renderer._initPath(this), this._reset(), this._renderer._addPath(this) }, onRemove: function () { this._renderer._removePath(this) }, redraw: function () { return this._map && this._renderer._updatePath(this), this }, setStyle: function (t) { return d(this, t), this._renderer && (this._renderer._updateStyle(this), this.options.stroke && t && Object.prototype.hasOwnProperty.call(t, "weight") && this._updateBounds()), this }, bringToFront: function () { return this._renderer && this._renderer._bringToFront(this), this }, bringToBack: function () { return this._renderer && this._renderer._bringToBack(this), this }, getElement: function () { return this._path }, _reset: function () { this._project(), this._update() }, _clickTolerance: function () { return (this.options.stroke ? this.options.weight / 2 : 0) + this._renderer.options.tolerance } }), Qi = Xi.extend({ options: { fill: !0, radius: 10 }, initialize: function (t, e) { d(this, e), this._latlng = G(t), this._radius = this.options.radius }, setLatLng: function (t) { var e = this._latlng; return this._latlng = G(t), this.redraw(), this.fire("move", { oldLatLng: e, latlng: this._latlng }) }, getLatLng: function () { return this._latlng }, setRadius: function (t) { return this.options.radius = this._radius = t, this.redraw() }, getRadius: function () { return this._radius }, setStyle: function (t) { var e = t && t.radius || this._radius; return Xi.prototype.setStyle.call(this, t), this.setRadius(e), this }, _project: function () { this._point = this._map.latLngToLayerPoint(this._latlng), this._updateBounds() }, _updateBounds: function () { var t = this._radius, e = this._radiusY || t, i = this._clickTolerance(), n = [t + i, e + i]; this._pxBounds = new A(this._point.subtract(n), this._point.add(n)) }, _update: function () { this._map && this._updatePath() }, _updatePath: function () { this._renderer._updateCircle(this) }, _empty: function () { return this._radius && !this._renderer._bounds.intersects(this._pxBounds) }, _containsPoint: function (t) { return t.distanceTo(this._point) <= this._radius + this._clickTolerance() } }); function tn(t, e) { return new Qi(t, e) } var en = Qi.extend({ initialize: function (t, e, n) { if ("number" === typeof e && (e = i({}, n, { radius: e })), d(this, e), this._latlng = G(t), isNaN(this.options.radius)) throw new Error("Circle radius cannot be NaN"); this._mRadius = this.options.radius }, setRadius: function (t) { return this._mRadius = t, this.redraw() }, getRadius: function () { return this._mRadius }, getBounds: function () { var t = [this._radius, this._radiusY || this._radius]; return new D(this._map.layerPointToLatLng(this._point.subtract(t)), this._map.layerPointToLatLng(this._point.add(t))) }, setStyle: Xi.prototype.setStyle, _project: function () { var t = this._latlng.lng, e = this._latlng.lat, i = this._map, n = i.options.crs; if (n.distance === H.distance) { var o = Math.PI / 180, r = this._mRadius / H.R / o, a = i.project([e + r, t]), s = i.project([e - r, t]), h = a.add(s).divideBy(2), l = i.unproject(h).lat, u = Math.acos((Math.cos(r * o) - Math.sin(e * o) * Math.sin(l * o)) / (Math.cos(e * o) * Math.cos(l * o))) / o; (isNaN(u) || 0 === u) && (u = r / Math.cos(Math.PI / 180 * e)), this._point = h.subtract(i.getPixelOrigin()), this._radius = isNaN(u) ? 0 : h.x - i.project([l, t - u]).x, this._radiusY = h.y - a.y } else { var c = n.unproject(n.project(this._latlng).subtract([this._mRadius, 0])); this._point = i.latLngToLayerPoint(this._latlng), this._radius = this._point.x - i.latLngToLayerPoint(c).x } this._updateBounds() } }); function nn(t, e, i) { return new en(t, e, i) } var on = Xi.extend({ options: { smoothFactor: 1, noClip: !1 }, initialize: function (t, e) { d(this, e), this._setLatLngs(t) }, getLatLngs: function () { return this._latlngs }, setLatLngs: function (t) { return this._setLatLngs(t), this.redraw() }, isEmpty: function () { return !this._latlngs.length }, closestLayerPoint: function (t) { for (var e, i, n = 1 / 0, o = null, r = Si, a = 0, s = this._parts.length; a < s; a++)for (var h = this._parts[a], l = 1, u = h.length; l < u; l++) { e = h[l - 1], i = h[l]; var c = r(t, e, i, !0); c < n && (n = c, o = r(t, e, i)) } return o && (o.distance = Math.sqrt(n)), o }, getCenter: function () { if (!this._map) throw new Error("Must add layer to map before using getCenter()"); var t, e, i, n, o, r, a, s = this._rings[0], h = s.length; if (!h) return null; for (t = 0, e = 0; t < h - 1; t++)e += s[t].distanceTo(s[t + 1]) / 2; if (0 === e) return this._map.layerPointToLatLng(s[0]); for (t = 0, n = 0; t < h - 1; t++)if (o = s[t], r = s[t + 1], i = o.distanceTo(r), n += i, n > e) return a = (n - e) / i, this._map.layerPointToLatLng([r.x - a * (r.x - o.x), r.y - a * (r.y - o.y)]) }, getBounds: function () { return this._bounds }, addLatLng: function (t, e) { return e = e || this._defaultShape(), t = G(t), e.push(t), this._bounds.extend(t), this.redraw() }, _setLatLngs: function (t) { this._bounds = new D, this._latlngs = this._convertLatLngs(t) }, _defaultShape: function () { return Oi(this._latlngs) ? this._latlngs : this._latlngs[0] }, _convertLatLngs: function (t) { for (var e = [], i = Oi(t), n = 0, o = t.length; n < o; n++)i ? (e[n] = G(t[n]), this._bounds.extend(e[n])) : e[n] = this._convertLatLngs(t[n]); return e }, _project: function () { var t = new A; this._rings = [], this._projectLatlngs(this._latlngs, this._rings, t), this._bounds.isValid() && t.isValid() && (this._rawPxBounds = t, this._updateBounds()) }, _updateBounds: function () { var t = this._clickTolerance(), e = new z(t, t); this._pxBounds = new A([this._rawPxBounds.min.subtract(e), this._rawPxBounds.max.add(e)]) }, _projectLatlngs: function (t, e, i) { var n, o, r = t[0] instanceof N, a = t.length; if (r) { for (o = [], n = 0; n < a; n++)o[n] = this._map.latLngToLayerPoint(t[n]), i.extend(o[n]); e.push(o) } else for (n = 0; n < a; n++)this._projectLatlngs(t[n], e, i) }, _clipPoints: function () { var t = this._renderer._bounds; if (this._parts = [], this._pxBounds && this._pxBounds.intersects(t)) if (this.options.noClip) this._parts = this._rings; else { var e, i, n, o, r, a, s, h = this._parts; for (e = 0, n = 0, o = this._rings.length; e < o; e++)for (s = this._rings[e], i = 0, r = s.length; i < r - 1; i++)a = Mi(s[i], s[i + 1], t, i, !0), a && (h[n] = h[n] || [], h[n].push(a[0]), a[1] === s[i + 1] && i !== r - 2 || (h[n].push(a[1]), n++)) } }, _simplifyPoints: function () { for (var t = this._parts, e = this.options.smoothFactor, i = 0, n = t.length; i < n; i++)t[i] = yi(t[i], e) }, _update: function () { this._map && (this._clipPoints(), this._simplifyPoints(), this._updatePath()) }, _updatePath: function () { this._renderer._updatePoly(this) }, _containsPoint: function (t, e) { var i, n, o, r, a, s, h = this._clickTolerance(); if (!this._pxBounds || !this._pxBounds.contains(t)) return !1; for (i = 0, r = this._parts.length; i < r; i++)for (s = this._parts[i], n = 0, a = s.length, o = a - 1; n < a; o = n++)if ((e || 0 !== n) && bi(t, s[o], s[n]) <= h) return !0; return !1 } }); function rn(t, e) { return new on(t, e) } on._flat = Ei; var an = on.extend({ options: { fill: !0 }, isEmpty: function () { return !this._latlngs.length || !this._latlngs[0].length }, getCenter: function () { if (!this._map) throw new Error("Must add layer to map before using getCenter()"); var t, e, i, n, o, r, a, s, h, l = this._rings[0], u = l.length; if (!u) return null; for (r = a = s = 0, t = 0, e = u - 1; t < u; e = t++)i = l[t], n = l[e], o = i.y * n.x - n.y * i.x, a += (i.x + n.x) * o, s += (i.y + n.y) * o, r += 3 * o; return h = 0 === r ? l[0] : [a / r, s / r], this._map.layerPointToLatLng(h) }, _convertLatLngs: function (t) { var e = on.prototype._convertLatLngs.call(this, t), i = e.length; return i >= 2 && e[0] instanceof N && e[0].equals(e[i - 1]) && e.pop(), e }, _setLatLngs: function (t) { on.prototype._setLatLngs.call(this, t), Oi(this._latlngs) && (this._latlngs = [this._latlngs]) }, _defaultShape: function () { return Oi(this._latlngs[0]) ? this._latlngs[0] : this._latlngs[0][0] }, _clipPoints: function () { var t = this._renderer._bounds, e = this.options.weight, i = new z(e, e); if (t = new A(t.min.subtract(i), t.max.add(i)), this._parts = [], this._pxBounds && this._pxBounds.intersects(t)) if (this.options.noClip) this._parts = this._rings; else for (var n, o = 0, r = this._rings.length; o < r; o++)n = zi(this._rings[o], t, !0), n.length && this._parts.push(n) }, _updatePath: function () { this._renderer._updatePoly(this, !0) }, _containsPoint: function (t) { var e, i, n, o, r, a, s, h, l = !1; if (!this._pxBounds || !this._pxBounds.contains(t)) return !1; for (o = 0, s = this._parts.length; o < s; o++)for (e = this._parts[o], r = 0, h = e.length, a = h - 1; r < h; a = r++)i = e[r], n = e[a], i.y > t.y !== n.y > t.y && t.x < (n.x - i.x) * (t.y - i.y) / (n.y - i.y) + i.x && (l = !l); return l || on.prototype._containsPoint.call(this, t, !0) } }); function sn(t, e) { return new an(t, e) } var hn = Vi.extend({ initialize: function (t, e) { d(this, e), this._layers = {}, t && this.addData(t) }, addData: function (t) { var e, i, n, o = g(t) ? t : t.features; if (o) { for (e = 0, i = o.length; e < i; e++)n = o[e], (n.geometries || n.geometry || n.features || n.coordinates) && this.addData(n); return this } var r = this.options; if (r.filter && !r.filter(t)) return this; var a = ln(t, r); return a ? (a.feature = mn(t), a.defaultOptions = a.options, this.resetStyle(a), r.onEachFeature && r.onEachFeature(t, a), this.addLayer(a)) : this }, resetStyle: function (t) { return void 0 === t ? this.eachLayer(this.resetStyle, this) : (t.options = i({}, t.defaultOptions), this._setLayerStyle(t, this.options.style), this) }, setStyle: function (t) { return this.eachLayer((function (e) { this._setLayerStyle(e, t) }), this) }, _setLayerStyle: function (t, e) { t.setStyle && ("function" === typeof e && (e = e(t.feature)), t.setStyle(e)) } }); function ln(t, e) { var i, n, o, r, a = "Feature" === t.type ? t.geometry : t, s = a ? a.coordinates : null, h = [], l = e && e.pointToLayer, u = e && e.coordsToLatLng || cn; if (!s && !a) return null; switch (a.type) { case "Point": return i = u(s), un(l, t, i, e); case "MultiPoint": for (o = 0, r = s.length; o < r; o++)i = u(s[o]), h.push(un(l, t, i, e)); return new Vi(h); case "LineString": case "MultiLineString": return n = pn(s, "LineString" === a.type ? 0 : 1, u), new on(n, e); case "Polygon": case "MultiPolygon": return n = pn(s, "Polygon" === a.type ? 1 : 2, u), new an(n, e); case "GeometryCollection": for (o = 0, r = a.geometries.length; o < r; o++) { var c = ln({ geometry: a.geometries[o], type: "Feature", properties: t.properties }, e); c && h.push(c) } return new Vi(h); default: throw new Error("Invalid GeoJSON object.") } } function un(t, e, i, n) { return t ? t(e, i) : new Ji(i, n && n.markersInheritOptions && n) } function cn(t) { return new N(t[1], t[0], t[2]) } function pn(t, e, i) { for (var n, o = [], r = 0, a = t.length; r < a; r++)n = e ? pn(t[r], e - 1, i) : (i || cn)(t[r]), o.push(n); return o } function dn(t, e) { return e = "number" === typeof e ? e : 6, void 0 !== t.alt ? [u(t.lng, e), u(t.lat, e), u(t.alt, e)] : [u(t.lng, e), u(t.lat, e)] } function fn(t, e, i, n) { for (var o = [], r = 0, a = t.length; r < a; r++)o.push(e ? fn(t[r], e - 1, i, n) : dn(t[r], n)); return !e && i && o.push(o[0]), o } function _n(t, e) { return t.feature ? i({}, t.feature, { geometry: e }) : mn(e) } function mn(t) { return "Feature" === t.type || "FeatureCollection" === t.type ? t : { type: "Feature", properties: {}, geometry: t } } var gn = { toGeoJSON: function (t) { return _n(this, { type: "Point", coordinates: dn(this.getLatLng(), t) }) } }; function vn(t, e) { return new hn(t, e) } Ji.include(gn), en.include(gn), Qi.include(gn), on.include({ toGeoJSON: function (t) { var e = !Oi(this._latlngs), i = fn(this._latlngs, e ? 1 : 0, !1, t); return _n(this, { type: (e ? "Multi" : "") + "LineString", coordinates: i }) } }), an.include({ toGeoJSON: function (t) { var e = !Oi(this._latlngs), i = e && !Oi(this._latlngs[0]), n = fn(this._latlngs, i ? 2 : e ? 1 : 0, !0, t); return e || (n = [n]), _n(this, { type: (i ? "Multi" : "") + "Polygon", coordinates: n }) } }), Fi.include({ toMultiPoint: function (t) { var e = []; return this.eachLayer((function (i) { e.push(i.toGeoJSON(t).geometry.coordinates) })), _n(this, { type: "MultiPoint", coordinates: e }) }, toGeoJSON: function (t) { var e = this.feature && this.feature.geometry && this.feature.geometry.type; if ("MultiPoint" === e) return this.toMultiPoint(t); var i = "GeometryCollection" === e, n = []; return this.eachLayer((function (e) { if (e.toGeoJSON) { var o = e.toGeoJSON(t); if (i) n.push(o.geometry); else { var r = mn(o); "FeatureCollection" === r.type ? n.push.apply(n, r.features) : n.push(r) } } })), i ? _n(this, { geometries: n, type: "GeometryCollection" }) : { type: "FeatureCollection", features: n } } }); var yn = vn, bn = Gi.extend({ options: { opacity: 1, alt: "", interactive: !1, crossOrigin: !1, errorOverlayUrl: "", zIndex: 1, className: "" }, initialize: function (t, e, i) { this._url = t, this._bounds = Z(e), d(this, i) }, onAdd: function () { this._image || (this._initImage(), this.options.opacity < 1 && this._updateOpacity()), this.options.interactive && (_e(this._image, "leaflet-interactive"), this.addInteractiveTarget(this._image)), this.getPane().appendChild(this._image), this._reset() }, onRemove: function () { ue(this._image), this.options.interactive && this.removeInteractiveTarget(this._image) }, setOpacity: function (t) { return this.options.opacity = t, this._image && this._updateOpacity(), this }, setStyle: function (t) { return t.opacity && this.setOpacity(t.opacity), this }, bringToFront: function () { return this._map && pe(this._image), this }, bringToBack: function () { return this._map && de(this._image), this }, setUrl: function (t) { return this._url = t, this._image && (this._image.src = t), this }, setBounds: function (t) { return this._bounds = Z(t), this._map && this._reset(), this }, getEvents: function () { var t = { zoom: this._reset, viewreset: this._reset }; return this._zoomAnimated && (t.zoomanim = this._animateZoom), t }, setZIndex: function (t) { return this.options.zIndex = t, this._updateZIndex(), this }, getBounds: function () { return this._bounds }, getElement: function () { return this._image }, _initImage: function () { var t = "IMG" === this._url.tagName, e = this._image = t ? this._url : le("img"); _e(e, "leaflet-image-layer"), this._zoomAnimated && _e(e, "leaflet-zoom-animated"), this.options.className && _e(e, this.options.className), e.onselectstart = l, e.onmousemove = l, e.onload = o(this.fire, this, "load"), e.onerror = o(this._overlayOnError, this, "error"), (this.options.crossOrigin || "" === this.options.crossOrigin) && (e.crossOrigin = !0 === this.options.crossOrigin ? "" : this.options.crossOrigin), this.options.zIndex && this._updateZIndex(), t ? this._url = e.src : (e.src = this._url, e.alt = this.options.alt) }, _animateZoom: function (t) { var e = this._map.getZoomScale(t.zoom), i = this._map._latLngBoundsToNewLayerBounds(this._bounds, t.zoom, t.center).min; we(this._image, i, e) }, _reset: function () { var t = this._image, e = new A(this._map.latLngToLayerPoint(this._bounds.getNorthWest()), this._map.latLngToLayerPoint(this._bounds.getSouthEast())), i = e.getSize(); xe(t, e.min), t.style.width = i.x + "px", t.style.height = i.y + "px" }, _updateOpacity: function () { ye(this._image, this.options.opacity) }, _updateZIndex: function () { this._image && void 0 !== this.options.zIndex && null !== this.options.zIndex && (this._image.style.zIndex = this.options.zIndex) }, _overlayOnError: function () { this.fire("error"); var t = this.options.errorOverlayUrl; t && this._url !== t && (this._url = t, this._image.src = t) } }), Ln = function (t, e, i) { return new bn(t, e, i) }, wn = bn.extend({ options: { autoplay: !0, loop: !0, keepAspectRatio: !0, muted: !1 }, _initImage: function () { var t = "VIDEO" === this._url.tagName, e = this._image = t ? this._url : le("video"); if (_e(e, "leaflet-image-layer"), this._zoomAnimated && _e(e, "leaflet-zoom-animated"), this.options.className && _e(e, this.options.className), e.onselectstart = l, e.onmousemove = l, e.onloadeddata = o(this.fire, this, "load"), t) { for (var i = e.getElementsByTagName("source"), n = [], r = 0; r < i.length; r++)n.push(i[r].src); this._url = i.length > 0 ? n : [e.src] } else { g(this._url) || (this._url = [this._url]), !this.options.keepAspectRatio && Object.prototype.hasOwnProperty.call(e.style, "objectFit") && (e.style["objectFit"] = "fill"), e.autoplay = !!this.options.autoplay, e.loop = !!this.options.loop, e.muted = !!this.options.muted; for (var a = 0; a < this._url.length; a++) { var s = le("source"); s.src = this._url[a], e.appendChild(s) } } } }); function xn(t, e, i) { return new wn(t, e, i) } var kn = bn.extend({ _initImage: function () { var t = this._image = this._url; _e(t, "leaflet-image-layer"), this._zoomAnimated && _e(t, "leaflet-zoom-animated"), this.options.className && _e(t, this.options.className), t.onselectstart = l, t.onmousemove = l } }); function Mn(t, e, i) { return new kn(t, e, i) } var Pn = Gi.extend({ options: { offset: [0, 7], className: "", pane: "popupPane" }, initialize: function (t, e) { d(this, t), this._source = e }, onAdd: function (t) { this._zoomAnimated = t._zoomAnimated, this._container || this._initLayout(), t._fadeAnimated && ye(this._container, 0), clearTimeout(this._removeTimeout), this.getPane().appendChild(this._container), this.update(), t._fadeAnimated && ye(this._container, 1), this.bringToFront() }, onRemove: function (t) { t._fadeAnimated ? (ye(this._container, 0), this._removeTimeout = setTimeout(o(ue, void 0, this._container), 200)) : ue(this._container) }, getLatLng: function () { return this._latlng }, setLatLng: function (t) { return this._latlng = G(t), this._map && (this._updatePosition(), this._adjustPan()), this }, getContent: function () { return this._content }, setContent: function (t) { return this._content = t, this.update(), this }, getElement: function () { return this._container }, update: function () { this._map && (this._container.style.visibility = "hidden", this._updateContent(), this._updateLayout(), this._updatePosition(), this._container.style.visibility = "", this._adjustPan()) }, getEvents: function () { var t = { zoom: this._updatePosition, viewreset: this._updatePosition }; return this._zoomAnimated && (t.zoomanim = this._animateZoom), t }, isOpen: function () { return !!this._map && this._map.hasLayer(this) }, bringToFront: function () { return this._map && pe(this._container), this }, bringToBack: function () { return this._map && de(this._container), this }, _prepareOpen: function (t, e, i) { if (e instanceof Gi || (i = e, e = t), e instanceof Vi) for (var n in t._layers) { e = t._layers[n]; break } if (!i) if (e.getCenter) i = e.getCenter(); else { if (!e.getLatLng) throw new Error("Unable to get source layer LatLng."); i = e.getLatLng() } return this._source = e, this.update(), i }, _updateContent: function () { if (this._content) { var t = this._contentNode, e = "function" === typeof this._content ? this._content(this._source || this) : this._content; if ("string" === typeof e) t.innerHTML = e; else { while (t.hasChildNodes()) t.removeChild(t.firstChild); t.appendChild(e) } this.fire("contentupdate") } }, _updatePosition: function () { if (this._map) { var t = this._map.latLngToLayerPoint(this._latlng), e = I(this.options.offset), i = this._getAnchor(); this._zoomAnimated ? xe(this._container, t.add(i)) : e = e.add(t).add(i); var n = this._containerBottom = -e.y, o = this._containerLeft = -Math.round(this._containerWidth / 2) + e.x; this._container.style.bottom = n + "px", this._container.style.left = o + "px" } }, _getAnchor: function () { return [0, 0] } }), Cn = Pn.extend({ options: { maxWidth: 300, minWidth: 50, maxHeight: null, autoPan: !0, autoPanPaddingTopLeft: null, autoPanPaddingBottomRight: null, autoPanPadding: [5, 5], keepInView: !1, closeButton: !0, autoClose: !0, closeOnEscapeKey: !0, className: "" }, openOn: function (t) { return t.openPopup(this), this }, onAdd: function (t) { Pn.prototype.onAdd.call(this, t), t.fire("popupopen", { popup: this }), this._source && (this._source.fire("popupopen", { popup: this }, !0), this._source instanceof Xi || this._source.on("preclick", Ne)) }, onRemove: function (t) { Pn.prototype.onRemove.call(this, t), t.fire("popupclose", { popup: this }), this._source && (this._source.fire("popupclose", { popup: this }, !0), this._source instanceof Xi || this._source.off("preclick", Ne)) }, getEvents: function () { var t = Pn.prototype.getEvents.call(this); return (void 0 !== this.options.closeOnClick ? this.options.closeOnClick : this._map.options.closePopupOnClick) && (t.preclick = this._close), this.options.keepInView && (t.moveend = this._adjustPan), t }, _close: function () { this._map && this._map.closePopup(this) }, _initLayout: function () { var t = "leaflet-popup", e = this._container = le("div", t + " " + (this.options.className || "") + " leaflet-zoom-animated"), i = this._wrapper = le("div", t + "-content-wrapper", e); if (this._contentNode = le("div", t + "-content", i), Fe(e), Ge(this._contentNode), ze(e, "contextmenu", Ne), this._tipContainer = le("div", t + "-tip-container", e), this._tip = le("div", t + "-tip", this._tipContainer), this.options.closeButton) { var n = this._closeButton = le("a", t + "-close-button", e); n.href = "#close", n.innerHTML = "×", ze(n, "click", this._onCloseButtonClick, this) } }, _updateLayout: function () { var t = this._contentNode, e = t.style; e.width = "", e.whiteSpace = "nowrap"; var i = t.offsetWidth; i = Math.min(i, this.options.maxWidth), i = Math.max(i, this.options.minWidth), e.width = i + 1 + "px", e.whiteSpace = "", e.height = ""; var n = t.offsetHeight, o = this.options.maxHeight, r = "leaflet-popup-scrolled"; o && n > o ? (e.height = o + "px", _e(t, r)) : me(t, r), this._containerWidth = this._container.offsetWidth }, _animateZoom: function (t) { var e = this._map._latLngToNewLayerPoint(this._latlng, t.zoom, t.center), i = this._getAnchor(); xe(this._container, e.add(i)) }, _adjustPan: function () { if (this.options.autoPan) { this._map._panAnim && this._map._panAnim.stop(); var t = this._map, e = parseInt(he(this._container, "marginBottom"), 10) || 0, i = this._container.offsetHeight + e, n = this._containerWidth, o = new z(this._containerLeft, -i - this._containerBottom); o._add(ke(this._container)); var r = t.layerPointToContainerPoint(o), a = I(this.options.autoPanPadding), s = I(this.options.autoPanPaddingTopLeft || a), h = I(this.options.autoPanPaddingBottomRight || a), l = t.getSize(), u = 0, c = 0; r.x + n + h.x > l.x && (u = r.x + n - l.x + h.x), r.x - u - s.x < 0 && (u = r.x - s.x), r.y + i + h.y > l.y && (c = r.y + i - l.y + h.y), r.y - c - s.y < 0 && (c = r.y - s.y), (u || c) && t.fire("autopanstart").panBy([u, c]) } }, _onCloseButtonClick: function (t) { this._close(), Ve(t) }, _getAnchor: function () { return I(this._source && this._source._getPopupAnchor ? this._source._getPopupAnchor() : [0, 0]) } }), Tn = function (t, e) { return new Cn(t, e) }; ti.mergeOptions({ closePopupOnClick: !0 }), ti.include({ openPopup: function (t, e, i) { return t instanceof Cn || (t = new Cn(i).setContent(t)), e && t.setLatLng(e), this.hasLayer(t) ? this : (this._popup && this._popup.options.autoClose && this.closePopup(), this._popup = t, this.addLayer(t)) }, closePopup: function (t) { return t && t !== this._popup || (t = this._popup, this._popup = null), t && this.removeLayer(t), this } }), Gi.include({ bindPopup: function (t, e) { return t instanceof Cn ? (d(t, e), this._popup = t, t._source = this) : (this._popup && !e || (this._popup = new Cn(e, this)), this._popup.setContent(t)), this._popupHandlersAdded || (this.on({ click: this._openPopup, keypress: this._onKeyPress, remove: this.closePopup, move: this._movePopup }), this._popupHandlersAdded = !0), this }, unbindPopup: function () { return this._popup && (this.off({ click: this._openPopup, keypress: this._onKeyPress, remove: this.closePopup, move: this._movePopup }), this._popupHandlersAdded = !1, this._popup = null), this }, openPopup: function (t, e) { return this._popup && this._map && (e = this._popup._prepareOpen(this, t, e), this._map.openPopup(this._popup, e)), this }, closePopup: function () { return this._popup && this._popup._close(), this }, togglePopup: function (t) { return this._popup && (this._popup._map ? this.closePopup() : this.openPopup(t)), this }, isPopupOpen: function () { return !!this._popup && this._popup.isOpen() }, setPopupContent: function (t) { return this._popup && this._popup.setContent(t), this }, getPopup: function () { return this._popup }, _openPopup: function (t) { var e = t.layer || t.target; this._popup && this._map && (Ve(t), e instanceof Xi ? this.openPopup(t.layer || t.target, t.latlng) : this._map.hasLayer(this._popup) && this._popup._source === e ? this.closePopup() : this.openPopup(e, t.latlng)) }, _movePopup: function (t) { this._popup.setLatLng(t.latlng) }, _onKeyPress: function (t) { 13 === t.originalEvent.keyCode && this._openPopup(t) } }); var Sn = Pn.extend({ options: { pane: "tooltipPane", offset: [0, 0], direction: "auto", permanent: !1, sticky: !1, interactive: !1, opacity: .9 }, onAdd: function (t) { Pn.prototype.onAdd.call(this, t), this.setOpacity(this.options.opacity), t.fire("tooltipopen", { tooltip: this }), this._source && this._source.fire("tooltipopen", { tooltip: this }, !0) }, onRemove: function (t) { Pn.prototype.onRemove.call(this, t), t.fire("tooltipclose", { tooltip: this }), this._source && this._source.fire("tooltipclose", { tooltip: this }, !0) }, getEvents: function () { var t = Pn.prototype.getEvents.call(this); return xt && !this.options.permanent && (t.preclick = this._close), t }, _close: function () { this._map && this._map.closeTooltip(this) }, _initLayout: function () { var t = "leaflet-tooltip", e = t + " " + (this.options.className || "") + " leaflet-zoom-" + (this._zoomAnimated ? "animated" : "hide"); this._contentNode = this._container = le("div", e) }, _updateLayout: function () { }, _adjustPan: function () { }, _setPosition: function (t) { var e, i, n = this._map, o = this._container, r = n.latLngToContainerPoint(n.getCenter()), a = n.layerPointToContainerPoint(t), s = this.options.direction, h = o.offsetWidth, l = o.offsetHeight, u = I(this.options.offset), c = this._getAnchor(); "top" === s ? (e = h / 2, i = l) : "bottom" === s ? (e = h / 2, i = 0) : "center" === s ? (e = h / 2, i = l / 2) : "right" === s ? (e = 0, i = l / 2) : "left" === s ? (e = h, i = l / 2) : a.x < r.x ? (s = "right", e = 0, i = l / 2) : (s = "left", e = h + 2 * (u.x + c.x), i = l / 2), t = t.subtract(I(e, i, !0)).add(u).add(c), me(o, "leaflet-tooltip-right"), me(o, "leaflet-tooltip-left"), me(o, "leaflet-tooltip-top"), me(o, "leaflet-tooltip-bottom"), _e(o, "leaflet-tooltip-" + s), xe(o, t) }, _updatePosition: function () { var t = this._map.latLngToLayerPoint(this._latlng); this._setPosition(t) }, setOpacity: function (t) { this.options.opacity = t, this._container && ye(this._container, t) }, _animateZoom: function (t) { var e = this._map._latLngToNewLayerPoint(this._latlng, t.zoom, t.center); this._setPosition(e) }, _getAnchor: function () { return I(this._source && this._source._getTooltipAnchor && !this.options.sticky ? this._source._getTooltipAnchor() : [0, 0]) } }), On = function (t, e) { return new Sn(t, e) }; ti.include({ openTooltip: function (t, e, i) { return t instanceof Sn || (t = new Sn(i).setContent(t)), e && t.setLatLng(e), this.hasLayer(t) ? this : this.addLayer(t) }, closeTooltip: function (t) { return t && this.removeLayer(t), this } }), Gi.include({ bindTooltip: function (t, e) { return t instanceof Sn ? (d(t, e), this._tooltip = t, t._source = this) : (this._tooltip && !e || (this._tooltip = new Sn(e, this)), this._tooltip.setContent(t)), this._initTooltipInteractions(), this._tooltip.options.permanent && this._map && this._map.hasLayer(this) && this.openTooltip(), this }, unbindTooltip: function () { return this._tooltip && (this._initTooltipInteractions(!0), this.closeTooltip(), this._tooltip = null), this }, _initTooltipInteractions: function (t) { if (t || !this._tooltipHandlersAdded) { var e = t ? "off" : "on", i = { remove: this.closeTooltip, move: this._moveTooltip }; this._tooltip.options.permanent ? i.add = this._openTooltip : (i.mouseover = this._openTooltip, i.mouseout = this.closeTooltip, this._tooltip.options.sticky && (i.mousemove = this._moveTooltip), xt && (i.click = this._openTooltip)), this[e](i), this._tooltipHandlersAdded = !t } }, openTooltip: function (t, e) { return this._tooltip && this._map && (e = this._tooltip._prepareOpen(this, t, e), this._map.openTooltip(this._tooltip, e), this._tooltip.options.interactive && this._tooltip._container && (_e(this._tooltip._container, "leaflet-clickable"), this.addInteractiveTarget(this._tooltip._container))), this }, closeTooltip: function () { return this._tooltip && (this._tooltip._close(), this._tooltip.options.interactive && this._tooltip._container && (me(this._tooltip._container, "leaflet-clickable"), this.removeInteractiveTarget(this._tooltip._container))), this }, toggleTooltip: function (t) { return this._tooltip && (this._tooltip._map ? this.closeTooltip() : this.openTooltip(t)), this }, isTooltipOpen: function () { return this._tooltip.isOpen() }, setTooltipContent: function (t) { return this._tooltip && this._tooltip.setContent(t), this }, getTooltip: function () { return this._tooltip }, _openTooltip: function (t) { var e = t.layer || t.target; this._tooltip && this._map && this.openTooltip(e, this._tooltip.options.sticky ? t.latlng : void 0) }, _moveTooltip: function (t) { var e, i, n = t.latlng; this._tooltip.options.sticky && t.originalEvent && (e = this._map.mouseEventToContainerPoint(t.originalEvent), i = this._map.containerPointToLayerPoint(e), n = this._map.layerPointToLatLng(i)), this._tooltip.setLatLng(n) } }); var En = qi.extend({ options: { iconSize: [12, 12], html: !1, bgPos: null, className: "leaflet-div-icon" }, createIcon: function (t) { var e = t && "DIV" === t.tagName ? t : document.createElement("div"), i = this.options; if (i.html instanceof Element ? (ce(e), e.appendChild(i.html)) : e.innerHTML = !1 !== i.html ? i.html : "", i.bgPos) { var n = I(i.bgPos); e.style.backgroundPosition = -n.x + "px " + -n.y + "px" } return this._setIconStyles(e, "icon"), e }, createShadow: function () { return null } }); function Bn(t) { return new En(t) } qi.Default = $i; var zn = Gi.extend({ options: { tileSize: 256, opacity: 1, updateWhenIdle: vt, updateWhenZooming: !0, updateInterval: 200, zIndex: 1, bounds: null, minZoom: 0, maxZoom: void 0, maxNativeZoom: void 0, minNativeZoom: void 0, noWrap: !1, pane: "tilePane", className: "", keepBuffer: 2 }, initialize: function (t) { d(this, t) }, onAdd: function () { this._initContainer(), this._levels = {}, this._tiles = {}, this._resetView(), this._update() }, beforeAdd: function (t) { t._addZoomLimit(this) }, onRemove: function (t) { this._removeAllTiles(), ue(this._container), t._removeZoomLimit(this), this._container = null, this._tileZoom = void 0 }, bringToFront: function () { return this._map && (pe(this._container), this._setAutoZIndex(Math.max)), this }, bringToBack: function () { return this._map && (de(this._container), this._setAutoZIndex(Math.min)), this }, getContainer: function () { return this._container }, setOpacity: function (t) { return this.options.opacity = t, this._updateOpacity(), this }, setZIndex: function (t) { return this.options.zIndex = t, this._updateZIndex(), this }, isLoading: function () { return this._loading }, redraw: function () { return this._map && (this._removeAllTiles(), this._update()), this }, getEvents: function () { var t = { viewprereset: this._invalidateAll, viewreset: this._resetView, zoom: this._resetView, moveend: this._onMoveEnd }; return this.options.updateWhenIdle || (this._onMove || (this._onMove = s(this._onMoveEnd, this.options.updateInterval, this)), t.move = this._onMove), this._zoomAnimated && (t.zoomanim = this._animateZoom), t }, createTile: function () { return document.createElement("div") }, getTileSize: function () { var t = this.options.tileSize; return t instanceof z ? t : new z(t, t) }, _updateZIndex: function () { this._container && void 0 !== this.options.zIndex && null !== this.options.zIndex && (this._container.style.zIndex = this.options.zIndex) }, _setAutoZIndex: function (t) { for (var e, i = this.getPane().children, n = -t(-1 / 0, 1 / 0), o = 0, r = i.length; o < r; o++)e = i[o].style.zIndex, i[o] !== this._container && e && (n = t(n, +e)); isFinite(n) && (this.options.zIndex = n + t(-1, 1), this._updateZIndex()) }, _updateOpacity: function () { if (this._map && !tt) { ye(this._container, this.options.opacity); var t = +new Date, e = !1, i = !1; for (var n in this._tiles) { var o = this._tiles[n]; if (o.current && o.loaded) { var r = Math.min(1, (t - o.loaded) / 200); ye(o.el, r), r < 1 ? e = !0 : (o.active ? i = !0 : this._onOpaqueTile(o), o.active = !0) } } i && !this._noPrune && this._pruneTiles(), e && (C(this._fadeFrame), this._fadeFrame = P(this._updateOpacity, this)) } }, _onOpaqueTile: l, _initContainer: function () { this._container || (this._container = le("div", "leaflet-layer " + (this.options.className || "")), this._updateZIndex(), this.options.opacity < 1 && this._updateOpacity(), this.getPane().appendChild(this._container)) }, _updateLevels: function () { var t = this._tileZoom, e = this.options.maxZoom; if (void 0 !== t) { for (var i in this._levels) i = Number(i), this._levels[i].el.children.length || i === t ? (this._levels[i].el.style.zIndex = e - Math.abs(t - i), this._onUpdateLevel(i)) : (ue(this._levels[i].el), this._removeTilesAtZoom(i), this._onRemoveLevel(i), delete this._levels[i]); var n = this._levels[t], o = this._map; return n || (n = this._levels[t] = {}, n.el = le("div", "leaflet-tile-container leaflet-zoom-animated", this._container), n.el.style.zIndex = e, n.origin = o.project(o.unproject(o.getPixelOrigin()), t).round(), n.zoom = t, this._setZoomTransform(n, o.getCenter(), o.getZoom()), l(n.el.offsetWidth), this._onCreateLevel(n)), this._level = n, n } }, _onUpdateLevel: l, _onRemoveLevel: l, _onCreateLevel: l, _pruneTiles: function () { if (this._map) { var t, e, i = this._map.getZoom(); if (i > this.options.maxZoom || i < this.options.minZoom) this._removeAllTiles(); else { for (t in this._tiles) e = this._tiles[t], e.retain = e.current; for (t in this._tiles) if (e = this._tiles[t], e.current && !e.active) { var n = e.coords; this._retainParent(n.x, n.y, n.z, n.z - 5) || this._retainChildren(n.x, n.y, n.z, n.z + 2) } for (t in this._tiles) this._tiles[t].retain || this._removeTile(t) } } }, _removeTilesAtZoom: function (t) { for (var e in this._tiles) this._tiles[e].coords.z === t && this._removeTile(e) }, _removeAllTiles: function () { for (var t in this._tiles) this._removeTile(t) }, _invalidateAll: function () { for (var t in this._levels) ue(this._levels[t].el), this._onRemoveLevel(Number(t)), delete this._levels[t]; this._removeAllTiles(), this._tileZoom = void 0 }, _retainParent: function (t, e, i, n) { var o = Math.floor(t / 2), r = Math.floor(e / 2), a = i - 1, s = new z(+o, +r); s.z = +a; var h = this._tileCoordsToKey(s), l = this._tiles[h]; return l && l.active ? (l.retain = !0, !0) : (l && l.loaded && (l.retain = !0), a > n && this._retainParent(o, r, a, n)) }, _retainChildren: function (t, e, i, n) { for (var o = 2 * t; o < 2 * t + 2; o++)for (var r = 2 * e; r < 2 * e + 2; r++) { var a = new z(o, r); a.z = i + 1; var s = this._tileCoordsToKey(a), h = this._tiles[s]; h && h.active ? h.retain = !0 : (h && h.loaded && (h.retain = !0), i + 1 < n && this._retainChildren(o, r, i + 1, n)) } }, _resetView: function (t) { var e = t && (t.pinch || t.flyTo); this._setView(this._map.getCenter(), this._map.getZoom(), e, e) }, _animateZoom: function (t) { this._setView(t.center, t.zoom, !0, t.noUpdate) }, _clampZoom: function (t) { var e = this.options; return void 0 !== e.minNativeZoom && t < e.minNativeZoom ? e.minNativeZoom : void 0 !== e.maxNativeZoom && e.maxNativeZoom < t ? e.maxNativeZoom : t }, _setView: function (t, e, i, n) { var o = Math.round(e); o = void 0 !== this.options.maxZoom && o > this.options.maxZoom || void 0 !== this.options.minZoom && o < this.options.minZoom ? void 0 : this._clampZoom(o); var r = this.options.updateWhenZooming && o !== this._tileZoom; n && !r || (this._tileZoom = o, this._abortLoading && this._abortLoading(), this._updateLevels(), this._resetGrid(), void 0 !== o && this._update(t), i || this._pruneTiles(), this._noPrune = !!i), this._setZoomTransforms(t, e) }, _setZoomTransforms: function (t, e) { for (var i in this._levels) this._setZoomTransform(this._levels[i], t, e) }, _setZoomTransform: function (t, e, i) { var n = this._map.getZoomScale(i, t.zoom), o = t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(e, i)).round(); gt ? we(t.el, o, n) : xe(t.el, o) }, _resetGrid: function () { var t = this._map, e = t.options.crs, i = this._tileSize = this.getTileSize(), n = this._tileZoom, o = this._map.getPixelWorldBounds(this._tileZoom); o && (this._globalTileRange = this._pxBoundsToTileRange(o)), this._wrapX = e.wrapLng && !this.options.noWrap && [Math.floor(t.project([0, e.wrapLng[0]], n).x / i.x), Math.ceil(t.project([0, e.wrapLng[1]], n).x / i.y)], this._wrapY = e.wrapLat && !this.options.noWrap && [Math.floor(t.project([e.wrapLat[0], 0], n).y / i.x), Math.ceil(t.project([e.wrapLat[1], 0], n).y / i.y)] }, _onMoveEnd: function () { this._map && !this._map._animatingZoom && this._update() }, _getTiledPixelBounds: function (t) { var e = this._map, i = e._animatingZoom ? Math.max(e._animateToZoom, e.getZoom()) : e.getZoom(), n = e.getZoomScale(i, this._tileZoom), o = e.project(t, this._tileZoom).floor(), r = e.getSize().divideBy(2 * n); return new A(o.subtract(r), o.add(r)) }, _update: function (t) { var e = this._map; if (e) { var i = this._clampZoom(e.getZoom()); if (void 0 === t && (t = e.getCenter()), void 0 !== this._tileZoom) { var n = this._getTiledPixelBounds(t), o = this._pxBoundsToTileRange(n), r = o.getCenter(), a = [], s = this.options.keepBuffer, h = new A(o.getBottomLeft().subtract([s, -s]), o.getTopRight().add([s, -s])); 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"); for (var l in this._tiles) { var u = this._tiles[l].coords; u.z === this._tileZoom && h.contains(new z(u.x, u.y)) || (this._tiles[l].current = !1) } if (Math.abs(i - this._tileZoom) > 1) this._setView(t, i); else { for (var c = o.min.y; c <= o.max.y; c++)for (var p = o.min.x; p <= o.max.x; p++) { var d = new z(p, c); if (d.z = this._tileZoom, this._isValidTile(d)) { var f = this._tiles[this._tileCoordsToKey(d)]; f ? f.current = !0 : a.push(d) } } if (a.sort((function (t, e) { return t.distanceTo(r) - e.distanceTo(r) })), 0 !== a.length) { this._loading || (this._loading = !0, this.fire("loading")); var _ = document.createDocumentFragment(); for (p = 0; p < a.length; p++)this._addTile(a[p], _); this._level.el.appendChild(_) } } } } }, _isValidTile: function (t) { var e = this._map.options.crs; if (!e.infinite) { var i = this._globalTileRange; if (!e.wrapLng && (t.x < i.min.x || t.x > i.max.x) || !e.wrapLat && (t.y < i.min.y || t.y > i.max.y)) return !1 } if (!this.options.bounds) return !0; var n = this._tileCoordsToBounds(t); return Z(this.options.bounds).overlaps(n) }, _keyToBounds: function (t) { return this._tileCoordsToBounds(this._keyToTileCoords(t)) }, _tileCoordsToNwSe: function (t) { var e = this._map, i = this.getTileSize(), n = t.scaleBy(i), o = n.add(i), r = e.unproject(n, t.z), a = e.unproject(o, t.z); return [r, a] }, _tileCoordsToBounds: function (t) { var e = this._tileCoordsToNwSe(t), i = new D(e[0], e[1]); return this.options.noWrap || (i = this._map.wrapLatLngBounds(i)), i }, _tileCoordsToKey: function (t) { return t.x + ":" + t.y + ":" + t.z }, _keyToTileCoords: function (t) { var e = t.split(":"), i = new z(+e[0], +e[1]); return i.z = +e[2], i }, _removeTile: function (t) { var e = this._tiles[t]; e && (ue(e.el), delete this._tiles[t], this.fire("tileunload", { tile: e.el, coords: this._keyToTileCoords(t) })) }, _initTile: function (t) { _e(t, "leaflet-tile"); var e = this.getTileSize(); t.style.width = e.x + "px", t.style.height = e.y + "px", t.onselectstart = l, t.onmousemove = l, tt && this.options.opacity < 1 && ye(t, this.options.opacity), nt && !ot && (t.style.WebkitBackfaceVisibility = "hidden") }, _addTile: function (t, e) { var i = this._getTilePos(t), n = this._tileCoordsToKey(t), r = this.createTile(this._wrapCoords(t), o(this._tileReady, this, t)); this._initTile(r), this.createTile.length < 2 && P(o(this._tileReady, this, t, null, r)), xe(r, i), this._tiles[n] = { el: r, coords: t, current: !0 }, e.appendChild(r), this.fire("tileloadstart", { tile: r, coords: t }) }, _tileReady: function (t, e, i) { e && this.fire("tileerror", { error: e, tile: i, coords: t }); var n = this._tileCoordsToKey(t); i = this._tiles[n], i && (i.loaded = +new Date, this._map._fadeAnimated ? (ye(i.el, 0), C(this._fadeFrame), this._fadeFrame = P(this._updateOpacity, this)) : (i.active = !0, this._pruneTiles()), e || (_e(i.el, "leaflet-tile-loaded"), this.fire("tileload", { tile: i.el, coords: t })), this._noTilesToLoad() && (this._loading = !1, this.fire("load"), tt || !this._map._fadeAnimated ? P(this._pruneTiles, this) : setTimeout(o(this._pruneTiles, this), 250))) }, _getTilePos: function (t) { return t.scaleBy(this.getTileSize()).subtract(this._level.origin) }, _wrapCoords: function (t) { var e = new z(this._wrapX ? h(t.x, this._wrapX) : t.x, this._wrapY ? h(t.y, this._wrapY) : t.y); return e.z = t.z, e }, _pxBoundsToTileRange: function (t) { var e = this.getTileSize(); return new A(t.min.unscaleBy(e).floor(), t.max.unscaleBy(e).ceil().subtract([1, 1])) }, _noTilesToLoad: function () { for (var t in this._tiles) if (!this._tiles[t].loaded) return !1; return !0 } }); function jn(t) { return new zn(t) } var In = zn.extend({ options: { minZoom: 0, maxZoom: 18, subdomains: "abc", errorTileUrl: "", zoomOffset: 0, tms: !1, zoomReverse: !1, detectRetina: !1, crossOrigin: !1 }, initialize: function (t, e) { this._url = t, e = d(this, e), e.detectRetina && Pt && e.maxZoom > 0 && (e.tileSize = Math.floor(e.tileSize / 2), e.zoomReverse ? (e.zoomOffset--, e.minZoom++) : (e.zoomOffset++, e.maxZoom--), e.minZoom = Math.max(0, e.minZoom)), "string" === typeof e.subdomains && (e.subdomains = e.subdomains.split("")), nt || this.on("tileunload", this._onTileRemove) }, setUrl: function (t, e) { return this._url === t && void 0 === e && (e = !0), this._url = t, e || this.redraw(), this }, createTile: function (t, e) { var i = document.createElement("img"); return ze(i, "load", o(this._tileOnLoad, this, e, i)), ze(i, "error", o(this._tileOnError, this, e, i)), (this.options.crossOrigin || "" === this.options.crossOrigin) && (i.crossOrigin = !0 === this.options.crossOrigin ? "" : this.options.crossOrigin), i.alt = "", i.setAttribute("role", "presentation"), i.src = this.getTileUrl(t), i }, getTileUrl: function (t) { var e = { r: Pt ? "@2x" : "", s: this._getSubdomain(t), x: t.x, y: t.y, z: this._getZoomForUrl() }; if (this._map && !this._map.options.crs.infinite) { var n = this._globalTileRange.max.y - t.y; this.options.tms && (e["y"] = n), e["-y"] = n } return m(this._url, i(e, this.options)) }, _tileOnLoad: function (t, e) { tt ? setTimeout(o(t, this, null, e), 0) : t(null, e) }, _tileOnError: function (t, e, i) { var n = this.options.errorTileUrl; n && e.getAttribute("src") !== n && (e.src = n), t(i, e) }, _onTileRemove: function (t) { t.tile.onload = null }, _getZoomForUrl: function () { var t = this._tileZoom, e = this.options.maxZoom, i = this.options.zoomReverse, n = this.options.zoomOffset; return i && (t = e - t), t + n }, _getSubdomain: function (t) { var e = Math.abs(t.x + t.y) % this.options.subdomains.length; return this.options.subdomains[e] }, _abortLoading: function () { var t, e; for (t in this._tiles) this._tiles[t].coords.z !== this._tileZoom && (e = this._tiles[t].el, e.onload = l, e.onerror = l, e.complete || (e.src = y, ue(e), delete this._tiles[t])) }, _removeTile: function (t) { var e = this._tiles[t]; if (e) return at || e.el.setAttribute("src", y), zn.prototype._removeTile.call(this, t) }, _tileReady: function (t, e, i) { if (this._map && (!i || i.getAttribute("src") !== y)) return zn.prototype._tileReady.call(this, t, e, i) } }); function An(t, e) { return new In(t, e) } var Rn = In.extend({ defaultWmsParams: { service: "WMS", request: "GetMap", layers: "", styles: "", format: "image/jpeg", transparent: !1, version: "1.1.1" }, options: { crs: null, uppercase: !1 }, initialize: function (t, e) { this._url = t; var n = i({}, this.defaultWmsParams); for (var o in e) o in this.options || (n[o] = e[o]); e = d(this, e); var r = e.detectRetina && Pt ? 2 : 1, a = this.getTileSize(); n.width = a.x * r, n.height = a.y * r, this.wmsParams = n }, onAdd: function (t) { this._crs = this.options.crs || t.options.crs, this._wmsVersion = parseFloat(this.wmsParams.version); var e = this._wmsVersion >= 1.3 ? "crs" : "srs"; this.wmsParams[e] = this._crs.code, In.prototype.onAdd.call(this, t) }, getTileUrl: function (t) { var e = this._tileCoordsToNwSe(t), i = this._crs, n = R(i.project(e[0]), i.project(e[1])), o = n.min, r = n.max, a = (this._wmsVersion >= 1.3 && this._crs === Zi ? [o.y, o.x, r.y, r.x] : [o.x, o.y, r.x, r.y]).join(","), s = In.prototype.getTileUrl.call(this, t); return s + f(this.wmsParams, s, this.options.uppercase) + (this.options.uppercase ? "&BBOX=" : "&bbox=") + a }, setParams: function (t, e) { return i(this.wmsParams, t), e || this.redraw(), this } }); function Dn(t, e) { return new Rn(t, e) } In.WMS = Rn, An.wms = Dn; var Zn = Gi.extend({ options: { padding: .1, tolerance: 0 }, initialize: function (t) { d(this, t), a(this), this._layers = this._layers || {} }, onAdd: function () { this._container || (this._initContainer(), this._zoomAnimated && _e(this._container, "leaflet-zoom-animated")), this.getPane().appendChild(this._container), this._update(), this.on("update", this._updatePaths, this) }, onRemove: function () { this.off("update", this._updatePaths, this), this._destroyContainer() }, getEvents: function () { var t = { viewreset: this._reset, zoom: this._onZoom, moveend: this._update, zoomend: this._onZoomEnd }; return this._zoomAnimated && (t.zoomanim = this._onAnimZoom), t }, _onAnimZoom: function (t) { this._updateTransform(t.center, t.zoom) }, _onZoom: function () { this._updateTransform(this._map.getCenter(), this._map.getZoom()) }, _updateTransform: function (t, e) { var i = this._map.getZoomScale(e, this._zoom), n = ke(this._container), o = this._map.getSize().multiplyBy(.5 + this.options.padding), r = this._map.project(this._center, e), a = this._map.project(t, e), s = a.subtract(r), h = o.multiplyBy(-i).add(n).add(o).subtract(s); gt ? we(this._container, h, i) : xe(this._container, h) }, _reset: function () { for (var t in this._update(), this._updateTransform(this._center, this._zoom), this._layers) this._layers[t]._reset() }, _onZoomEnd: function () { for (var t in this._layers) this._layers[t]._project() }, _updatePaths: function () { for (var t in this._layers) this._layers[t]._update() }, _update: function () { var t = this.options.padding, e = this._map.getSize(), i = this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round(); this._bounds = new A(i, i.add(e.multiplyBy(1 + 2 * t)).round()), this._center = this._map.getCenter(), this._zoom = this._map.getZoom() } }), Nn = Zn.extend({ getEvents: function () { var t = Zn.prototype.getEvents.call(this); return t.viewprereset = this._onViewPreReset, t }, _onViewPreReset: function () { this._postponeUpdatePaths = !0 }, onAdd: function () { Zn.prototype.onAdd.call(this), this._draw() }, _initContainer: function () { var t = this._container = document.createElement("canvas"); ze(t, "mousemove", this._onMouseMove, this), ze(t, "click dblclick mousedown mouseup contextmenu", this._onClick, this), ze(t, "mouseout", this._handleMouseOut, this), this._ctx = t.getContext("2d") }, _destroyContainer: function () { C(this._redrawRequest), delete this._ctx, ue(this._container), Ie(this._container), delete this._container }, _updatePaths: function () { if (!this._postponeUpdatePaths) { var t; for (var e in this._redrawBounds = null, this._layers) t = this._layers[e], t._update(); this._redraw() } }, _update: function () { if (!this._map._animatingZoom || !this._bounds) { Zn.prototype._update.call(this); var t = this._bounds, e = this._container, i = t.getSize(), n = Pt ? 2 : 1; xe(e, t.min), e.width = n * i.x, e.height = n * i.y, e.style.width = i.x + "px", e.style.height = i.y + "px", Pt && this._ctx.scale(2, 2), this._ctx.translate(-t.min.x, -t.min.y), this.fire("update") } }, _reset: function () { Zn.prototype._reset.call(this), this._postponeUpdatePaths && (this._postponeUpdatePaths = !1, this._updatePaths()) }, _initPath: function (t) { this._updateDashArray(t), this._layers[a(t)] = t; var e = t._order = { layer: t, prev: this._drawLast, next: null }; this._drawLast && (this._drawLast.next = e), this._drawLast = e, this._drawFirst = this._drawFirst || this._drawLast }, _addPath: function (t) { this._requestRedraw(t) }, _removePath: function (t) { var e = t._order, i = e.next, n = e.prev; i ? i.prev = n : this._drawLast = n, n ? n.next = i : this._drawFirst = i, delete t._order, delete this._layers[a(t)], this._requestRedraw(t) }, _updatePath: function (t) { this._extendRedrawBounds(t), t._project(), t._update(), this._requestRedraw(t) }, _updateStyle: function (t) { this._updateDashArray(t), this._requestRedraw(t) }, _updateDashArray: function (t) { if ("string" === typeof t.options.dashArray) { var e, i, n = t.options.dashArray.split(/[, ]+/), o = []; for (i = 0; i < n.length; i++) { if (e = Number(n[i]), isNaN(e)) return; o.push(e) } t.options._dashArray = o } else t.options._dashArray = t.options.dashArray }, _requestRedraw: function (t) { this._map && (this._extendRedrawBounds(t), this._redrawRequest = this._redrawRequest || P(this._redraw, this)) }, _extendRedrawBounds: function (t) { if (t._pxBounds) { var e = (t.options.weight || 0) + 1; this._redrawBounds = this._redrawBounds || new A, this._redrawBounds.extend(t._pxBounds.min.subtract([e, e])), this._redrawBounds.extend(t._pxBounds.max.add([e, e])) } }, _redraw: function () { this._redrawRequest = null, this._redrawBounds && (this._redrawBounds.min._floor(), this._redrawBounds.max._ceil()), this._clear(), this._draw(), this._redrawBounds = null }, _clear: function () { var t = this._redrawBounds; if (t) { var e = t.getSize(); this._ctx.clearRect(t.min.x, t.min.y, e.x, e.y) } else this._ctx.save(), this._ctx.setTransform(1, 0, 0, 1, 0, 0), this._ctx.clearRect(0, 0, this._container.width, this._container.height), this._ctx.restore() }, _draw: function () { var t, e = this._redrawBounds; if (this._ctx.save(), e) { var i = e.getSize(); this._ctx.beginPath(), this._ctx.rect(e.min.x, e.min.y, i.x, i.y), this._ctx.clip() } this._drawing = !0; for (var n = this._drawFirst; n; n = n.next)t = n.layer, (!e || t._pxBounds && t._pxBounds.intersects(e)) && t._updatePath(); this._drawing = !1, this._ctx.restore() }, _updatePoly: function (t, e) { if (this._drawing) { var i, n, o, r, a = t._parts, s = a.length, h = this._ctx; if (s) { for (h.beginPath(), i = 0; i < s; i++) { for (n = 0, o = a[i].length; n < o; n++)r = a[i][n], h[n ? "lineTo" : "moveTo"](r.x, r.y); e && h.closePath() } this._fillStroke(h, t) } } }, _updateCircle: function (t) { if (this._drawing && !t._empty()) { var e = t._point, i = this._ctx, n = Math.max(Math.round(t._radius), 1), o = (Math.max(Math.round(t._radiusY), 1) || n) / n; 1 !== o && (i.save(), i.scale(1, o)), i.beginPath(), i.arc(e.x, e.y / o, n, 0, 2 * Math.PI, !1), 1 !== o && i.restore(), this._fillStroke(i, t) } }, _fillStroke: function (t, e) { var i = e.options; i.fill && (t.globalAlpha = i.fillOpacity, t.fillStyle = i.fillColor || i.color, t.fill(i.fillRule || "evenodd")), i.stroke && 0 !== i.weight && (t.setLineDash && t.setLineDash(e.options && e.options._dashArray || []), t.globalAlpha = i.opacity, t.lineWidth = i.weight, t.strokeStyle = i.color, t.lineCap = i.lineCap, t.lineJoin = i.lineJoin, t.stroke()) }, _onClick: function (t) { for (var e, i, n = this._map.mouseEventToLayerPoint(t), o = this._drawFirst; o; o = o.next)e = o.layer, e.options.interactive && e._containsPoint(n) && ("click" !== t.type && "preclick" === t.type || !this._map._draggableMoved(e)) && (i = e); i && (Ke(t), this._fireEvent([i], t)) }, _onMouseMove: function (t) { if (this._map && !this._map.dragging.moving() && !this._map._animatingZoom) { var e = this._map.mouseEventToLayerPoint(t); this._handleMouseHover(t, e) } }, _handleMouseOut: function (t) { var e = this._hoveredLayer; e && (me(this._container, "leaflet-interactive"), this._fireEvent([e], t, "mouseout"), this._hoveredLayer = null, this._mouseHoverThrottled = !1) }, _handleMouseHover: function (t, e) { if (!this._mouseHoverThrottled) { for (var i, n, r = this._drawFirst; r; r = r.next)i = r.layer, i.options.interactive && i._containsPoint(e) && (n = i); n !== this._hoveredLayer && (this._handleMouseOut(t), n && (_e(this._container, "leaflet-interactive"), this._fireEvent([n], t, "mouseover"), this._hoveredLayer = n)), this._hoveredLayer && this._fireEvent([this._hoveredLayer], t), this._mouseHoverThrottled = !0, setTimeout(o((function () { this._mouseHoverThrottled = !1 }), this), 32) } }, _fireEvent: function (t, e, i) { this._map._fireDOMEvent(e, i || e.type, t) }, _bringToFront: function (t) { var e = t._order; if (e) { var i = e.next, n = e.prev; i && (i.prev = n, n ? n.next = i : i && (this._drawFirst = i), e.prev = this._drawLast, this._drawLast.next = e, e.next = null, this._drawLast = e, this._requestRedraw(t)) } }, _bringToBack: function (t) { var e = t._order; if (e) { var i = e.next, n = e.prev; n && (n.next = i, i ? i.prev = n : n && (this._drawLast = n), e.prev = null, e.next = this._drawFirst, this._drawFirst.prev = e, this._drawFirst = e, this._requestRedraw(t)) } } }); function Gn(t) { return Tt ? new Nn(t) : null } var Fn = function () { try { return document.namespaces.add("lvml", "urn:schemas-microsoft-com:vml"), function (t) { return document.createElement("') } } catch (t) { return function (t) { return document.createElement("<" + t + ' xmlns="urn:schemas-microsoft.com:vml" class="lvml">') } } }(), Hn = { _initContainer: function () { this._container = le("div", "leaflet-vml-container") }, _update: function () { this._map._animatingZoom || (Zn.prototype._update.call(this), this.fire("update")) }, _initPath: function (t) { var e = t._container = Fn("shape"); _e(e, "leaflet-vml-shape " + (this.options.className || "")), e.coordsize = "1 1", t._path = Fn("path"), e.appendChild(t._path), this._updateStyle(t), this._layers[a(t)] = t }, _addPath: function (t) { var e = t._container; this._container.appendChild(e), t.options.interactive && t.addInteractiveTarget(e) }, _removePath: function (t) { var e = t._container; ue(e), t.removeInteractiveTarget(e), delete this._layers[a(t)] }, _updateStyle: function (t) { var e = t._stroke, i = t._fill, n = t.options, o = t._container; o.stroked = !!n.stroke, o.filled = !!n.fill, n.stroke ? (e || (e = t._stroke = Fn("stroke")), o.appendChild(e), e.weight = n.weight + "px", e.color = n.color, e.opacity = n.opacity, n.dashArray ? e.dashStyle = g(n.dashArray) ? n.dashArray.join(" ") : n.dashArray.replace(/( *, *)/g, " ") : e.dashStyle = "", e.endcap = n.lineCap.replace("butt", "flat"), e.joinstyle = n.lineJoin) : e && (o.removeChild(e), t._stroke = null), n.fill ? (i || (i = t._fill = Fn("fill")), o.appendChild(i), i.color = n.fillColor || n.color, i.opacity = n.fillOpacity) : i && (o.removeChild(i), t._fill = null) }, _updateCircle: function (t) { var e = t._point.round(), i = Math.round(t._radius), n = Math.round(t._radiusY || i); this._setPath(t, t._empty() ? "M0 0" : "AL " + e.x + "," + e.y + " " + i + "," + n + " 0,23592600") }, _setPath: function (t, e) { t._path.v = e }, _bringToFront: function (t) { pe(t._container) }, _bringToBack: function (t) { de(t._container) } }, Vn = Ot ? Fn : J, Un = Zn.extend({ getEvents: function () { var t = Zn.prototype.getEvents.call(this); return t.zoomstart = this._onZoomStart, t }, _initContainer: function () { this._container = Vn("svg"), this._container.setAttribute("pointer-events", "none"), this._rootGroup = Vn("g"), this._container.appendChild(this._rootGroup) }, _destroyContainer: function () { ue(this._container), Ie(this._container), delete this._container, delete this._rootGroup, delete this._svgSize }, _onZoomStart: function () { this._update() }, _update: function () { if (!this._map._animatingZoom || !this._bounds) { Zn.prototype._update.call(this); var t = this._bounds, e = t.getSize(), i = this._container; this._svgSize && this._svgSize.equals(e) || (this._svgSize = e, i.setAttribute("width", e.x), i.setAttribute("height", e.y)), xe(i, t.min), i.setAttribute("viewBox", [t.min.x, t.min.y, e.x, e.y].join(" ")), this.fire("update") } }, _initPath: function (t) { var e = t._path = Vn("path"); t.options.className && _e(e, t.options.className), t.options.interactive && _e(e, "leaflet-interactive"), this._updateStyle(t), this._layers[a(t)] = t }, _addPath: function (t) { this._rootGroup || this._initContainer(), this._rootGroup.appendChild(t._path), t.addInteractiveTarget(t._path) }, _removePath: function (t) { ue(t._path), t.removeInteractiveTarget(t._path), delete this._layers[a(t)] }, _updatePath: function (t) { t._project(), t._update() }, _updateStyle: function (t) { var e = t._path, i = t.options; e && (i.stroke ? (e.setAttribute("stroke", i.color), e.setAttribute("stroke-opacity", i.opacity), e.setAttribute("stroke-width", i.weight), e.setAttribute("stroke-linecap", i.lineCap), e.setAttribute("stroke-linejoin", i.lineJoin), i.dashArray ? e.setAttribute("stroke-dasharray", i.dashArray) : e.removeAttribute("stroke-dasharray"), i.dashOffset ? e.setAttribute("stroke-dashoffset", i.dashOffset) : e.removeAttribute("stroke-dashoffset")) : e.setAttribute("stroke", "none"), i.fill ? (e.setAttribute("fill", i.fillColor || i.color), e.setAttribute("fill-opacity", i.fillOpacity), e.setAttribute("fill-rule", i.fillRule || "evenodd")) : e.setAttribute("fill", "none")) }, _updatePoly: function (t, e) { this._setPath(t, Y(t._parts, e)) }, _updateCircle: function (t) { var e = t._point, i = Math.max(Math.round(t._radius), 1), n = Math.max(Math.round(t._radiusY), 1) || i, o = "a" + i + "," + n + " 0 1,0 ", r = t._empty() ? "M0 0" : "M" + (e.x - i) + "," + e.y + o + 2 * i + ",0 " + o + 2 * -i + ",0 "; this._setPath(t, r) }, _setPath: function (t, e) { t._path.setAttribute("d", e) }, _bringToFront: function (t) { pe(t._path) }, _bringToBack: function (t) { de(t._path) } }); function qn(t) { return St || Ot ? new Un(t) : null } Ot && Un.include(Hn), ti.include({ getRenderer: function (t) { var e = t.options.renderer || this._getPaneRenderer(t.options.pane) || this.options.renderer || this._renderer; return e || (e = this._renderer = this._createRenderer()), this.hasLayer(e) || this.addLayer(e), e }, _getPaneRenderer: function (t) { if ("overlayPane" === t || void 0 === t) return !1; var e = this._paneRenderers[t]; return void 0 === e && (e = this._createRenderer({ pane: t }), this._paneRenderers[t] = e), e }, _createRenderer: function (t) { return this.options.preferCanvas && Gn(t) || qn(t) } }); var Wn = an.extend({ initialize: function (t, e) { an.prototype.initialize.call(this, this._boundsToLatLngs(t), e) }, setBounds: function (t) { return this.setLatLngs(this._boundsToLatLngs(t)) }, _boundsToLatLngs: function (t) { return t = Z(t), [t.getSouthWest(), t.getNorthWest(), t.getNorthEast(), t.getSouthEast()] } }); function $n(t, e) { return new Wn(t, e) } Un.create = Vn, Un.pointsToPath = Y, hn.geometryToLayer = ln, hn.coordsToLatLng = cn, hn.coordsToLatLngs = pn, hn.latLngToCoords = dn, hn.latLngsToCoords = fn, hn.getFeature = _n, hn.asFeature = mn, ti.mergeOptions({ boxZoom: !0 }); var Kn = pi.extend({ initialize: function (t) { this._map = t, this._container = t._container, this._pane = t._panes.overlayPane, this._resetStateTimeout = 0, t.on("unload", this._destroy, this) }, addHooks: function () { ze(this._container, "mousedown", this._onMouseDown, this) }, removeHooks: function () { Ie(this._container, "mousedown", this._onMouseDown, this) }, moved: function () { return this._moved }, _destroy: function () { ue(this._pane), delete this._pane }, _resetState: function () { this._resetStateTimeout = 0, this._moved = !1 }, _clearDeferredResetState: function () { 0 !== this._resetStateTimeout && (clearTimeout(this._resetStateTimeout), this._resetStateTimeout = 0) }, _onMouseDown: function (t) { if (!t.shiftKey || 1 !== t.which && 1 !== t.button) return !1; this._clearDeferredResetState(), this._resetState(), Qt(), Pe(), this._startPoint = this._map.mouseEventToContainerPoint(t), ze(document, { contextmenu: Ve, mousemove: this._onMouseMove, mouseup: this._onMouseUp, keydown: this._onKeyDown }, this) }, _onMouseMove: function (t) { this._moved || (this._moved = !0, this._box = le("div", "leaflet-zoom-box", this._container), _e(this._container, "leaflet-crosshair"), this._map.fire("boxzoomstart")), this._point = this._map.mouseEventToContainerPoint(t); var e = new A(this._point, this._startPoint), i = e.getSize(); xe(this._box, e.min), this._box.style.width = i.x + "px", this._box.style.height = i.y + "px" }, _finish: function () { this._moved && (ue(this._box), me(this._container, "leaflet-crosshair")), te(), Ce(), Ie(document, { contextmenu: Ve, mousemove: this._onMouseMove, mouseup: this._onMouseUp, keydown: this._onKeyDown }, this) }, _onMouseUp: function (t) { if ((1 === t.which || 1 === t.button) && (this._finish(), this._moved)) { this._clearDeferredResetState(), this._resetStateTimeout = setTimeout(o(this._resetState, this), 0); var e = new D(this._map.containerPointToLatLng(this._startPoint), this._map.containerPointToLatLng(this._point)); this._map.fitBounds(e).fire("boxzoomend", { boxZoomBounds: e }) } }, _onKeyDown: function (t) { 27 === t.keyCode && this._finish() } }); ti.addInitHook("addHandler", "boxZoom", Kn), ti.mergeOptions({ doubleClickZoom: !0 }); var Jn = pi.extend({ addHooks: function () { this._map.on("dblclick", this._onDoubleClick, this) }, removeHooks: function () { this._map.off("dblclick", this._onDoubleClick, this) }, _onDoubleClick: function (t) { var e = this._map, i = e.getZoom(), n = e.options.zoomDelta, o = t.originalEvent.shiftKey ? i - n : i + n; "center" === e.options.doubleClickZoom ? e.setZoom(o) : e.setZoomAround(t.containerPoint, o) } }); ti.addInitHook("addHandler", "doubleClickZoom", Jn), ti.mergeOptions({ dragging: !0, inertia: !ot, inertiaDeceleration: 3400, inertiaMaxSpeed: 1 / 0, easeLinearity: .2, worldCopyJump: !1, maxBoundsViscosity: 0 }); var Yn = pi.extend({ addHooks: function () { if (!this._draggable) { var t = this._map; this._draggable = new vi(t._mapPane, t._container), this._draggable.on({ dragstart: this._onDragStart, drag: this._onDrag, dragend: this._onDragEnd }, 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)) } _e(this._map._container, "leaflet-grab leaflet-touch-drag"), this._draggable.enable(), this._positions = [], this._times = [] }, removeHooks: function () { me(this._map._container, "leaflet-grab"), me(this._map._container, "leaflet-touch-drag"), this._draggable.disable() }, moved: function () { return this._draggable && this._draggable._moved }, moving: function () { return this._draggable && this._draggable._moving }, _onDragStart: function () { var t = this._map; if (t._stop(), this._map.options.maxBounds && this._map.options.maxBoundsViscosity) { var e = Z(this._map.options.maxBounds); this._offsetLimit = R(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1), this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())), this._viscosity = Math.min(1, Math.max(0, this._map.options.maxBoundsViscosity)) } else this._offsetLimit = null; t.fire("movestart").fire("dragstart"), t.options.inertia && (this._positions = [], this._times = []) }, _onDrag: function (t) { if (this._map.options.inertia) { var e = this._lastTime = +new Date, i = this._lastPos = this._draggable._absPos || this._draggable._newPos; this._positions.push(i), this._times.push(e), this._prunePositions(e) } this._map.fire("move", t).fire("drag", t) }, _prunePositions: function (t) { while (this._positions.length > 1 && t - this._times[0] > 50) this._positions.shift(), this._times.shift() }, _onZoomEnd: function () { var t = this._map.getSize().divideBy(2), e = this._map.latLngToLayerPoint([0, 0]); this._initialWorldOffset = e.subtract(t).x, this._worldWidth = this._map.getPixelWorldBounds().getSize().x }, _viscousLimit: function (t, e) { return t - (t - e) * this._viscosity }, _onPreDragLimit: function () { if (this._viscosity && this._offsetLimit) { var t = this._draggable._newPos.subtract(this._draggable._startPos), e = this._offsetLimit; t.x < e.min.x && (t.x = this._viscousLimit(t.x, e.min.x)), t.y < e.min.y && (t.y = this._viscousLimit(t.y, e.min.y)), t.x > e.max.x && (t.x = this._viscousLimit(t.x, e.max.x)), t.y > e.max.y && (t.y = this._viscousLimit(t.y, e.max.y)), this._draggable._newPos = this._draggable._startPos.add(t) } }, _onPreDragWrap: function () { var t = this._worldWidth, e = Math.round(t / 2), i = this._initialWorldOffset, n = this._draggable._newPos.x, o = (n - e + i) % t + e - i, r = (n + e + i) % t - e - i, a = Math.abs(o + i) < Math.abs(r + i) ? o : r; this._draggable._absPos = this._draggable._newPos.clone(), this._draggable._newPos.x = a }, _onDragEnd: function (t) { var e = this._map, i = e.options, n = !i.inertia || this._times.length < 2; if (e.fire("dragend", t), n) e.fire("moveend"); else { this._prunePositions(+new Date); var o = this._lastPos.subtract(this._positions[0]), r = (this._lastTime - this._times[0]) / 1e3, a = i.easeLinearity, s = o.multiplyBy(a / r), h = s.distanceTo([0, 0]), l = Math.min(i.inertiaMaxSpeed, h), u = s.multiplyBy(l / h), c = l / (i.inertiaDeceleration * a), p = u.multiplyBy(-c / 2).round(); p.x || p.y ? (p = e._limitOffset(p, e.options.maxBounds), P((function () { e.panBy(p, { duration: c, easeLinearity: a, noMoveStart: !0, animate: !0 }) }))) : e.fire("moveend") } } }); ti.addInitHook("addHandler", "dragging", Yn), ti.mergeOptions({ keyboard: !0, keyboardPanDelta: 80 }); var Xn = pi.extend({ keyCodes: { left: [37], right: [39], down: [40], up: [38], zoomIn: [187, 107, 61, 171], zoomOut: [189, 109, 54, 173] }, initialize: function (t) { this._map = t, this._setPanDelta(t.options.keyboardPanDelta), this._setZoomDelta(t.options.zoomDelta) }, addHooks: function () { var t = this._map._container; t.tabIndex <= 0 && (t.tabIndex = "0"), ze(t, { focus: this._onFocus, blur: this._onBlur, mousedown: this._onMouseDown }, this), this._map.on({ focus: this._addHooks, blur: this._removeHooks }, this) }, removeHooks: function () { this._removeHooks(), Ie(this._map._container, { focus: this._onFocus, blur: this._onBlur, mousedown: this._onMouseDown }, this), this._map.off({ focus: this._addHooks, blur: this._removeHooks }, this) }, _onMouseDown: function () { if (!this._focused) { var t = document.body, e = document.documentElement, i = t.scrollTop || e.scrollTop, n = t.scrollLeft || e.scrollLeft; this._map._container.focus(), window.scrollTo(n, i) } }, _onFocus: function () { this._focused = !0, this._map.fire("focus") }, _onBlur: function () { this._focused = !1, this._map.fire("blur") }, _setPanDelta: function (t) { var e, i, n = this._panKeys = {}, o = this.keyCodes; for (e = 0, i = o.left.length; e < i; e++)n[o.left[e]] = [-1 * t, 0]; for (e = 0, i = o.right.length; e < i; e++)n[o.right[e]] = [t, 0]; for (e = 0, i = o.down.length; e < i; e++)n[o.down[e]] = [0, t]; for (e = 0, i = o.up.length; e < i; e++)n[o.up[e]] = [0, -1 * t] }, _setZoomDelta: function (t) { var e, i, n = this._zoomKeys = {}, o = this.keyCodes; for (e = 0, i = o.zoomIn.length; e < i; e++)n[o.zoomIn[e]] = t; for (e = 0, i = o.zoomOut.length; e < i; e++)n[o.zoomOut[e]] = -t }, _addHooks: function () { ze(document, "keydown", this._onKeyDown, this) }, _removeHooks: function () { Ie(document, "keydown", this._onKeyDown, this) }, _onKeyDown: function (t) { if (!(t.altKey || t.ctrlKey || t.metaKey)) { var e, i = t.keyCode, n = this._map; if (i in this._panKeys) n._panAnim && n._panAnim._inProgress || (e = this._panKeys[i], t.shiftKey && (e = I(e).multiplyBy(3)), n.panBy(e), n.options.maxBounds && n.panInsideBounds(n.options.maxBounds)); else if (i in this._zoomKeys) n.setZoom(n.getZoom() + (t.shiftKey ? 3 : 1) * this._zoomKeys[i]); else { if (27 !== i || !n._popup || !n._popup.options.closeOnEscapeKey) return; n.closePopup() } Ve(t) } } }); ti.addInitHook("addHandler", "keyboard", Xn), ti.mergeOptions({ scrollWheelZoom: !0, wheelDebounceTime: 40, wheelPxPerZoomLevel: 60 }); var Qn = pi.extend({ addHooks: function () { ze(this._map._container, "wheel", this._onWheelScroll, this), this._delta = 0 }, removeHooks: function () { Ie(this._map._container, "wheel", this._onWheelScroll, this) }, _onWheelScroll: function (t) { var e = We(t), i = this._map.options.wheelDebounceTime; this._delta += e, this._lastMousePos = this._map.mouseEventToContainerPoint(t), this._startTime || (this._startTime = +new Date); var n = Math.max(i - (+new Date - this._startTime), 0); clearTimeout(this._timer), this._timer = setTimeout(o(this._performZoom, this), n), Ve(t) }, _performZoom: function () { var t = this._map, e = t.getZoom(), i = this._map.options.zoomSnap || 0; t._stop(); var n = this._delta / (4 * this._map.options.wheelPxPerZoomLevel), o = 4 * Math.log(2 / (1 + Math.exp(-Math.abs(n)))) / Math.LN2, r = i ? Math.ceil(o / i) * i : o, a = t._limitZoom(e + (this._delta > 0 ? r : -r)) - e; this._delta = 0, this._startTime = null, a && ("center" === t.options.scrollWheelZoom ? t.setZoom(e + a) : t.setZoomAround(this._lastMousePos, e + a)) } }); ti.addInitHook("addHandler", "scrollWheelZoom", Qn), ti.mergeOptions({ tap: !0, tapTolerance: 15 }); var to = pi.extend({ addHooks: function () { ze(this._map._container, "touchstart", this._onDown, this) }, removeHooks: function () { Ie(this._map._container, "touchstart", this._onDown, this) }, _onDown: function (t) { if (t.touches) { if (He(t), this._fireClick = !0, t.touches.length > 1) return this._fireClick = !1, void clearTimeout(this._holdTimeout); var e = t.touches[0], i = e.target; this._startPos = this._newPos = new z(e.clientX, e.clientY), i.tagName && "a" === i.tagName.toLowerCase() && _e(i, "leaflet-active"), this._holdTimeout = setTimeout(o((function () { this._isTapValid() && (this._fireClick = !1, this._onUp(), this._simulateEvent("contextmenu", e)) }), this), 1e3), this._simulateEvent("mousedown", e), ze(document, { touchmove: this._onMove, touchend: this._onUp }, this) } }, _onUp: function (t) { if (clearTimeout(this._holdTimeout), Ie(document, { touchmove: this._onMove, touchend: this._onUp }, this), this._fireClick && t && t.changedTouches) { var e = t.changedTouches[0], i = e.target; i && i.tagName && "a" === i.tagName.toLowerCase() && me(i, "leaflet-active"), this._simulateEvent("mouseup", e), this._isTapValid() && this._simulateEvent("click", e) } }, _isTapValid: function () { return this._newPos.distanceTo(this._startPos) <= this._map.options.tapTolerance }, _onMove: function (t) { var e = t.touches[0]; this._newPos = new z(e.clientX, e.clientY), this._simulateEvent("mousemove", e) }, _simulateEvent: function (t, e) { var i = document.createEvent("MouseEvents"); i._simulated = !0, e.target._simulatedClick = !0, i.initMouseEvent(t, !0, !0, window, 1, e.screenX, e.screenY, e.clientX, e.clientY, !1, !1, !1, !1, 0, null), e.target.dispatchEvent(i) } }); !xt || wt && !ut || ti.addInitHook("addHandler", "tap", to), ti.mergeOptions({ touchZoom: xt && !ot, bounceAtZoomLimits: !0 }); var eo = pi.extend({ addHooks: function () { _e(this._map._container, "leaflet-touch-zoom"), ze(this._map._container, "touchstart", this._onTouchStart, this) }, removeHooks: function () { me(this._map._container, "leaflet-touch-zoom"), Ie(this._map._container, "touchstart", this._onTouchStart, this) }, _onTouchStart: function (t) { var e = this._map; if (t.touches && 2 === t.touches.length && !e._animatingZoom && !this._zooming) { var i = e.mouseEventToContainerPoint(t.touches[0]), n = e.mouseEventToContainerPoint(t.touches[1]); this._centerPoint = e.getSize()._divideBy(2), this._startLatLng = e.containerPointToLatLng(this._centerPoint), "center" !== e.options.touchZoom && (this._pinchStartLatLng = e.containerPointToLatLng(i.add(n)._divideBy(2))), this._startDist = i.distanceTo(n), this._startZoom = e.getZoom(), this._moved = !1, this._zooming = !0, e._stop(), ze(document, "touchmove", this._onTouchMove, this), ze(document, "touchend", this._onTouchEnd, this), He(t) } }, _onTouchMove: function (t) { if (t.touches && 2 === t.touches.length && this._zooming) { var e = this._map, i = e.mouseEventToContainerPoint(t.touches[0]), n = e.mouseEventToContainerPoint(t.touches[1]), r = i.distanceTo(n) / this._startDist; if (this._zoom = e.getScaleZoom(r, this._startZoom), !e.options.bounceAtZoomLimits && (this._zoom < e.getMinZoom() && r < 1 || this._zoom > e.getMaxZoom() && r > 1) && (this._zoom = e._limitZoom(this._zoom)), "center" === e.options.touchZoom) { if (this._center = this._startLatLng, 1 === r) return } else { var a = i._add(n)._divideBy(2)._subtract(this._centerPoint); if (1 === r && 0 === a.x && 0 === a.y) return; this._center = e.unproject(e.project(this._pinchStartLatLng, this._zoom).subtract(a), this._zoom) } this._moved || (e._moveStart(!0, !1), this._moved = !0), C(this._animRequest); var s = o(e._move, e, this._center, this._zoom, { pinch: !0, round: !1 }); this._animRequest = P(s, this, !0), He(t) } }, _onTouchEnd: function () { this._moved && this._zooming ? (this._zooming = !1, C(this._animRequest), Ie(document, "touchmove", this._onTouchMove, this), Ie(document, "touchend", 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))) : this._zooming = !1 } }); ti.addInitHook("addHandler", "touchZoom", eo), ti.BoxZoom = Kn, ti.DoubleClickZoom = Jn, ti.Drag = Yn, ti.Keyboard = Xn, ti.ScrollWheelZoom = Qn, ti.Tap = to, ti.TouchZoom = eo, t.version = e, t.Control = ii, t.control = ni, t.Browser = Bt, t.Evented = B, t.Mixin = fi, t.Util = T, t.Class = S, t.Handler = pi, t.extend = i, t.bind = o, t.stamp = a, t.setOptions = d, t.DomEvent = Xe, t.DomUtil = Be, t.PosAnimation = Qe, t.Draggable = vi, t.LineUtil = Bi, t.PolyUtil = ji, t.Point = z, t.point = I, t.Bounds = A, t.bounds = R, t.Transformation = q, t.transformation = W, t.Projection = Ri, t.LatLng = N, t.latLng = G, t.LatLngBounds = D, t.latLngBounds = Z, t.CRS = F, t.GeoJSON = hn, t.geoJSON = vn, t.geoJson = yn, t.Layer = Gi, t.LayerGroup = Fi, t.layerGroup = Hi, t.FeatureGroup = Vi, t.featureGroup = Ui, t.ImageOverlay = bn, t.imageOverlay = Ln, t.VideoOverlay = wn, t.videoOverlay = xn, t.SVGOverlay = kn, t.svgOverlay = Mn, t.DivOverlay = Pn, t.Popup = Cn, t.popup = Tn, t.Tooltip = Sn, t.tooltip = On, t.Icon = qi, t.icon = Wi, t.DivIcon = En, t.divIcon = Bn, t.Marker = Ji, t.marker = Yi, t.TileLayer = In, t.tileLayer = An, t.GridLayer = zn, t.gridLayer = jn, t.SVG = Un, t.svg = qn, t.Renderer = Zn, t.Canvas = Nn, t.canvas = Gn, t.Path = Xi, t.CircleMarker = Qi, t.circleMarker = tn, t.Circle = en, t.circle = nn, t.Polyline = on, t.polyline = rn, t.Polygon = an, t.polygon = sn, t.Rectangle = Wn, t.rectangle = $n, t.Map = ti, t.map = ei; var io = window.L; t.noConflict = function () { return window.L = io, this }, window.L = t })) } }]);