@mattilsynet/design 2.2.19 → 2.2.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"leaflet-src.js","sources":["../../../../node_modules/leaflet/dist/leaflet-src.js"],"sourcesContent":["/* @preserve\n * Leaflet 2.0.0-alpha.1, a JS library for interactive maps. https://leafletjs.com\n * (c) 2010-2025 Volodymyr Agafonkin, (c) 2010-2011 CloudMade\n */\n\n/*\r\n * @namespace Util\r\n *\r\n * Various utility functions, used by Leaflet internally.\r\n */\r\n\r\n// @property lastId: Number\r\n// Last unique ID used by [`stamp()`](#util-stamp)\r\nlet lastId = 0;\r\n\r\n// @function stamp(obj: Object): Number\r\n// Returns the unique ID of an object, assigning it one if it doesn't have it.\r\nfunction stamp(obj) {\r\n\tif (!('_leaflet_id' in obj)) {\r\n\t\tobj['_leaflet_id'] = ++lastId;\r\n\t}\r\n\treturn obj._leaflet_id;\r\n}\r\n\r\n// @function throttle(fn: Function, time: Number, context: Object): Function\r\n// Returns a function which executes function `fn` with the given scope `context`\r\n// (so that the `this` keyword refers to `context` inside `fn`'s code). The function\r\n// `fn` will be called no more than one time per given amount of `time`. The arguments\r\n// received by the bound function will be any arguments passed when binding the\r\n// function, followed by any arguments passed when invoking the bound function.\r\nfunction throttle(fn, time, context) {\r\n\tlet lock, queuedArgs;\r\n\r\n\tfunction later() {\r\n\t\t// reset lock and call if queued\r\n\t\tlock = false;\r\n\t\tif (queuedArgs) {\r\n\t\t\twrapperFn.apply(context, queuedArgs);\r\n\t\t\tqueuedArgs = false;\r\n\t\t}\r\n\t}\r\n\r\n\tfunction wrapperFn(...args) {\r\n\t\tif (lock) {\r\n\t\t\t// called too soon, queue to call later\r\n\t\t\tqueuedArgs = args;\r\n\r\n\t\t} else {\r\n\t\t\t// call and lock until later\r\n\t\t\tfn.apply(context, args);\r\n\t\t\tsetTimeout(later, time);\r\n\t\t\tlock = true;\r\n\t\t}\r\n\t}\r\n\r\n\treturn wrapperFn;\r\n}\r\n\r\n// @function wrapNum(num: Number, range: Number[], includeMax?: Boolean): Number\r\n// Returns the number `num` modulo `range` in such a way so it lies within\r\n// `range[0]` and `range[1]`. The returned value will be always smaller than\r\n// `range[1]` unless `includeMax` is set to `true`.\r\nfunction wrapNum(x, range, includeMax) {\r\n\tconst max = range[1],\r\n\tmin = range[0],\r\n\td = max - min;\r\n\treturn x === max && includeMax ? x : ((x - min) % d + d) % d + min;\r\n}\r\n\r\n// @function falseFn(): Function\r\n// Returns a function which always returns `false`.\r\nfunction falseFn() { return false; }\r\n\r\n// @function formatNum(num: Number, precision?: Number|false): Number\r\n// Returns the number `num` rounded with specified `precision`.\r\n// The default `precision` value is 6 decimal places.\r\n// `false` can be passed to skip any processing (can be useful to avoid round-off errors).\r\nfunction formatNum(num, precision) {\r\n\tif (precision === false) { return num; }\r\n\tconst pow = 10 ** (precision === undefined ? 6 : precision);\r\n\treturn Math.round(num * pow) / pow;\r\n}\r\n\r\n// @function splitWords(str: String): String[]\r\n// Trims and splits the string on whitespace and returns the array of parts.\r\nfunction splitWords(str) {\r\n\treturn str.trim().split(/\\s+/);\r\n}\r\n\r\n// @function setOptions(obj: Object, options: Object): Object\r\n// Merges the given properties to the `options` of the `obj` object, returning the resulting options. See `Class options`.\r\nfunction setOptions(obj, options) {\r\n\tif (!Object.hasOwn(obj, 'options')) {\r\n\t\tobj.options = obj.options ? Object.create(obj.options) : {};\r\n\t}\r\n\tfor (const i in options) {\r\n\t\tif (Object.hasOwn(options, i)) {\r\n\t\t\tobj.options[i] = options[i];\r\n\t\t}\r\n\t}\r\n\treturn obj.options;\r\n}\r\n\r\nconst templateRe = /\\{ *([\\w_ -]+) *\\}/g;\r\n\r\n// @function template(str: String, data: Object): String\r\n// Simple templating facility, accepts a template string of the form `'Hello {a}, {b}'`\r\n// and a data object like `{a: 'foo', b: 'bar'}`, returns evaluated string\r\n// `('Hello foo, bar')`. You can also specify functions instead of strings for\r\n// data values — they will be evaluated passing `data` as an argument.\r\nfunction template(str, data) {\r\n\treturn str.replace(templateRe, (str, key) => {\r\n\t\tlet value = data[key];\r\n\r\n\t\tif (value === undefined) {\r\n\t\t\tthrow new Error(`No value provided for variable ${str}`);\r\n\r\n\t\t} else if (typeof value === 'function') {\r\n\t\t\tvalue = value(data);\r\n\t\t}\r\n\t\treturn value;\r\n\t});\r\n}\r\n\r\n// @property emptyImageUrl: String\r\n// Data URI string containing a base64-encoded empty GIF image.\r\n// Used as a hack to free memory from unused images on WebKit-powered\r\n// mobile devices (by setting image `src` to this string).\r\nconst emptyImageUrl = 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=';\n\nvar Util = {\n\t__proto__: null,\n\temptyImageUrl: emptyImageUrl,\n\tfalseFn: falseFn,\n\tformatNum: formatNum,\n\tget lastId () { return lastId; },\n\tsetOptions: setOptions,\n\tsplitWords: splitWords,\n\tstamp: stamp,\n\ttemplate: template,\n\tthrottle: throttle,\n\twrapNum: wrapNum\n};\n\n// @class Class\r\n\r\n// @section\r\n// @uninheritable\r\n\r\n// Thanks to John Resig and Dean Edwards for inspiration!\r\n\r\nclass Class {\r\n\t// @function extend(props: Object): Function\r\n\t// [Extends the current class](#class-inheritance) given the properties to be included.\r\n\t// Deprecated - use `class X extends Class` instead!\r\n\t// Returns a Javascript function that is a class constructor (to be called with `new`).\r\n\tstatic extend({statics, includes, ...props}) {\r\n\t\tconst NewClass = class extends this {};\r\n\r\n\t\t// inherit parent's static properties\r\n\t\tObject.setPrototypeOf(NewClass, this);\r\n\r\n\t\tconst parentProto = this.prototype;\r\n\t\tconst proto = NewClass.prototype;\r\n\r\n\t\t// mix static properties into the class\r\n\t\tif (statics) {\r\n\t\t\tObject.assign(NewClass, statics);\r\n\t\t}\r\n\r\n\t\t// mix includes into the prototype\r\n\t\tif (Array.isArray(includes)) {\r\n\t\t\tfor (const include of includes) {\r\n\t\t\t\tObject.assign(proto, include);\r\n\t\t\t}\r\n\t\t} else if (includes) {\r\n\t\t\tObject.assign(proto, includes);\r\n\t\t}\r\n\r\n\t\t// mix given properties into the prototype\r\n\t\tObject.assign(proto, props);\r\n\r\n\t\t// merge options\r\n\t\tif (proto.options) {\r\n\t\t\tproto.options = parentProto.options ? Object.create(parentProto.options) : {};\r\n\t\t\tObject.assign(proto.options, props.options);\r\n\t\t}\r\n\r\n\t\tproto._initHooks = [];\r\n\r\n\t\treturn NewClass;\r\n\t}\r\n\r\n\t// @function include(properties: Object): this\r\n\t// [Includes a mixin](#class-includes) into the current class.\r\n\tstatic include(props) {\r\n\t\tconst parentOptions = this.prototype.options;\r\n\t\tObject.assign(this.prototype, props);\r\n\t\tif (props.options) {\r\n\t\t\tthis.prototype.options = parentOptions;\r\n\t\t\tthis.mergeOptions(props.options);\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @function setDefaultOptions(options: Object): this\r\n\t// Configures the [default `options`](#class-options) on the prototype of this class.\r\n\tstatic setDefaultOptions(options) {\r\n\t\tsetOptions(this.prototype, options);\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @function mergeOptions(options: Object): this\r\n\t// [Merges `options`](#class-options) into the defaults of the class.\r\n\tstatic mergeOptions(options) {\r\n\t\tthis.prototype.options ??= {};\r\n\t\tObject.assign(this.prototype.options, options);\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @function addInitHook(fn: Function): this\r\n\t// Adds a [constructor hook](#class-constructor-hooks) to the class.\r\n\tstatic addInitHook(fn, ...args) { // (Function) || (String, args...)\r\n\t\tconst init = typeof fn === 'function' ? fn : function () {\r\n\t\t\tthis[fn].apply(this, args);\r\n\t\t};\r\n\r\n\t\tthis.prototype._initHooks ??= [];\r\n\t\tthis.prototype._initHooks.push(init);\r\n\t\treturn this;\r\n\t}\r\n\r\n\tconstructor(...args) {\r\n\t\tthis._initHooksCalled = false;\r\n\r\n\t\tsetOptions(this);\r\n\r\n\t\t// call the constructor\r\n\t\tif (this.initialize) {\r\n\t\t\tthis.initialize(...args);\r\n\t\t}\r\n\r\n\t\t// call all constructor hooks\r\n\t\tthis.callInitHooks();\r\n\t}\r\n\r\n\tinitialize(/* ...args */) {\r\n\t\t// Override this method in subclasses to implement custom initialization logic.\r\n\t\t// This method is called automatically when a new instance of the class is created.\r\n\t}\r\n\r\n\tcallInitHooks() {\r\n\t\tif (this._initHooksCalled) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// collect all prototypes in chain\r\n\t\tconst prototypes = [];\r\n\t\tlet current = this;\r\n\r\n\t\twhile ((current = Object.getPrototypeOf(current)) !== null) {\r\n\t\t\tprototypes.push(current);\r\n\t\t}\r\n\r\n\t\t// reverse so the parent prototype is first\r\n\t\tprototypes.reverse();\r\n\r\n\t\t// call init hooks on each prototype\r\n\t\tfor (const proto of prototypes) {\r\n\t\t\tfor (const hook of proto._initHooks ?? []) {\r\n\t\t\t\thook.call(this);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._initHooksCalled = true;\r\n\t}\r\n}\n\n/*\r\n * @class Evented\r\n * @inherits Class\r\n *\r\n * A set of methods shared between event-powered classes (like `Map` and `Marker`). Generally, events allow you to execute some function when something happens with an object (e.g. the user clicks on the map, causing the map to fire `'click'` event).\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * map.on('click', function(e) {\r\n * \talert(e.latlng);\r\n * } );\r\n * ```\r\n *\r\n * Leaflet deals with event listeners by reference, so if you want to add a listener and then remove it, define it as a function:\r\n *\r\n * ```js\r\n * function onClick(e) { ... }\r\n *\r\n * map.on('click', onClick);\r\n * map.off('click', onClick);\r\n * ```\r\n */\r\n\r\nclass Evented extends Class {\r\n\t/* @method on(type: String, fn: Function, context?: Object): this\r\n\t * Adds a listener function (`fn`) to a particular event type of the object. You can optionally specify the context of the listener (object the this keyword will point to). You can also pass several space-separated types (e.g. `'click dblclick'`).\r\n\t *\r\n\t * @alternative\r\n\t * @method on(eventMap: Object): this\r\n\t * Adds a set of type/listener pairs, e.g. `{click: onClick, pointermove: onPointerMove}`\r\n\t */\r\n\ton(types, fn, context) {\r\n\r\n\t\t// types can be a map of types/handlers\r\n\t\tif (typeof types === 'object') {\r\n\t\t\tfor (const [type, f] of Object.entries(types)) {\r\n\t\t\t\t// we don't process space-separated events here for performance;\r\n\t\t\t\t// it's a hot path since Layer uses the on(obj) syntax\r\n\t\t\t\tthis._on(type, f, fn);\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\t// types can be a string of space-separated words\r\n\t\t\tfor (const type of splitWords(types)) {\r\n\t\t\t\tthis._on(type, fn, context);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t}\r\n\r\n\t/* @method off(type: String, fn?: Function, context?: Object): this\r\n\t * Removes a previously added listener function. If no function is specified, it will remove all the listeners of that particular event from the object. Note that if you passed a custom context to `on`, you must pass the same context to `off` in order to remove the listener.\r\n\t *\r\n\t * @alternative\r\n\t * @method off(eventMap: Object): this\r\n\t * Removes a set of type/listener pairs.\r\n\t *\r\n\t * @alternative\r\n\t * @method off: this\r\n\t * Removes all listeners to all events on the object. This includes implicitly attached events.\r\n\t */\r\n\toff(types, fn, context) {\r\n\r\n\t\tif (!arguments.length) {\r\n\t\t\t// clear all listeners if called without arguments\r\n\t\t\tdelete this._events;\r\n\r\n\t\t} else if (typeof types === 'object') {\r\n\t\t\tfor (const [type, f] of Object.entries(types)) {\r\n\t\t\t\tthis._off(type, f, fn);\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tconst removeAll = arguments.length === 1;\r\n\t\t\tfor (const type of splitWords(types)) {\r\n\t\t\t\tif (removeAll) {\r\n\t\t\t\t\tthis._off(type);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis._off(type, fn, context);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// attach listener (without syntactic sugar now)\r\n\t_on(type, fn, context, _once) {\r\n\t\tif (typeof fn !== 'function') {\r\n\t\t\tconsole.warn(`wrong listener type: ${typeof fn}`);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// check if fn already there\r\n\t\tif (this._listens(type, fn, context) !== false) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (context === this) {\r\n\t\t\t// Less memory footprint.\r\n\t\t\tcontext = undefined;\r\n\t\t}\r\n\r\n\t\tconst newListener = {fn, ctx: context};\r\n\t\tif (_once) {\r\n\t\t\tnewListener.once = true;\r\n\t\t}\r\n\r\n\t\tthis._events ??= {};\r\n\t\tthis._events[type] ??= [];\r\n\t\tthis._events[type].push(newListener);\r\n\t}\r\n\r\n\t_off(type, fn, context) {\r\n\t\tif (!this._events) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tlet listeners = this._events[type];\r\n\t\tif (!listeners) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (arguments.length === 1) { // remove all\r\n\t\t\tif (this._firingCount) {\r\n\t\t\t\t// Set all removed listeners to noop\r\n\t\t\t\t// so they are not called if remove happens in fire\r\n\t\t\t\tfor (const listener of listeners) {\r\n\t\t\t\t\tlistener.fn = falseFn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// clear all listeners for a type if function isn't specified\r\n\t\t\tdelete this._events[type];\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (typeof fn !== 'function') {\r\n\t\t\tconsole.warn(`wrong listener type: ${typeof fn}`);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// find fn and remove it\r\n\t\tconst index = this._listens(type, fn, context);\r\n\t\tif (index !== false) {\r\n\t\t\tconst listener = listeners[index];\r\n\t\t\tif (this._firingCount) {\r\n\t\t\t\t// set the removed listener to noop so that's not called if remove happens in fire\r\n\t\t\t\tlistener.fn = falseFn;\r\n\r\n\t\t\t\t/* copy array in case events are being fired */\r\n\t\t\t\tthis._events[type] = listeners = listeners.slice();\r\n\t\t\t}\r\n\t\t\tlisteners.splice(index, 1);\r\n\t\t}\r\n\t}\r\n\r\n\t// @method fire(type: String, data?: Object, propagate?: Boolean): this\r\n\t// Fires an event of the specified type. You can optionally provide a data\r\n\t// object — the first argument of the listener function will contain its\r\n\t// properties. The event can optionally be propagated to event parents.\r\n\tfire(type, data, propagate) {\r\n\t\tif (!this.listens(type, propagate)) { return this; }\r\n\r\n\t\tconst event = {\r\n\t\t\t...data,\r\n\t\t\ttype,\r\n\t\t\ttarget: this,\r\n\t\t\tsourceTarget: data?.sourceTarget || this\r\n\t\t};\r\n\r\n\t\tif (this._events) {\r\n\t\t\tconst listeners = this._events[type];\r\n\t\t\tif (listeners) {\r\n\t\t\t\tthis._firingCount = (this._firingCount + 1) || 1;\r\n\t\t\t\tfor (const l of listeners) {\r\n\t\t\t\t\t// off overwrites l.fn, so we need to copy fn to a variable\r\n\t\t\t\t\tconst fn = l.fn;\r\n\t\t\t\t\tif (l.once) {\r\n\t\t\t\t\t\tthis.off(type, fn, l.ctx);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfn.call(l.ctx || this, event);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._firingCount--;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (propagate) {\r\n\t\t\t// propagate the event to parents (set with addEventParent)\r\n\t\t\tthis._propagateEvent(event);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method listens(type: String, propagate?: Boolean): Boolean\r\n\t// @method listens(type: String, fn: Function, context?: Object, propagate?: Boolean): Boolean\r\n\t// Returns `true` if a particular event type has any listeners attached to it.\r\n\t// The verification can optionally be propagated, it will return `true` if parents have the listener attached to it.\r\n\tlistens(type, fn, context, propagate) {\r\n\t\tif (typeof type !== 'string') {\r\n\t\t\tconsole.warn('\"string\" type argument expected');\r\n\t\t}\r\n\r\n\t\t// we don't overwrite the input `fn` value, because we need to use it for propagation\r\n\t\tlet _fn = fn;\r\n\t\tif (typeof fn !== 'function') {\r\n\t\t\tpropagate = !!fn;\r\n\t\t\t_fn = undefined;\r\n\t\t\tcontext = undefined;\r\n\t\t}\r\n\r\n\t\tif (this._events?.[type]?.length) {\r\n\t\t\tif (this._listens(type, _fn, context) !== false) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (propagate) {\r\n\t\t\t// also check parents for listeners if event propagates\r\n\t\t\tfor (const p of Object.values(this._eventParents ?? {})) {\r\n\t\t\t\tif (p.listens(type, fn, context, propagate)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\t// returns the index (number) or false\r\n\t_listens(type, fn, context) {\r\n\t\tif (!this._events) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tconst listeners = this._events[type] ?? [];\r\n\t\tif (!fn) {\r\n\t\t\treturn !!listeners.length;\r\n\t\t}\r\n\r\n\t\tif (context === this) {\r\n\t\t\t// Less memory footprint.\r\n\t\t\tcontext = undefined;\r\n\t\t}\r\n\r\n\t\tconst index = listeners.findIndex(l => l.fn === fn && l.ctx === context);\r\n\t\treturn index === -1 ? false : index;\r\n\r\n\t}\r\n\r\n\t// @method once(…): this\r\n\t// Behaves as [`on(…)`](#evented-on), except the listener will only get fired once and then removed.\r\n\tonce(types, fn, context) {\r\n\r\n\t\t// types can be a map of types/handlers\r\n\t\tif (typeof types === 'object') {\r\n\t\t\tfor (const [type, f] of Object.entries(types)) {\r\n\t\t\t\t// we don't process space-separated events here for performance;\r\n\t\t\t\t// it's a hot path since Layer uses the on(obj) syntax\r\n\t\t\t\tthis._on(type, f, fn, true);\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\t// types can be a string of space-separated words\r\n\t\t\tfor (const type of splitWords(types)) {\r\n\t\t\t\tthis._on(type, fn, context, true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method addEventParent(obj: Evented): this\r\n\t// Adds an event parent - an `Evented` that will receive propagated events\r\n\taddEventParent(obj) {\r\n\t\tthis._eventParents ??= {};\r\n\t\tthis._eventParents[stamp(obj)] = obj;\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method removeEventParent(obj: Evented): this\r\n\t// Removes an event parent, so it will stop receiving propagated events\r\n\tremoveEventParent(obj) {\r\n\t\tif (this._eventParents) {\r\n\t\t\tdelete this._eventParents[stamp(obj)];\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n\r\n\t_propagateEvent(e) {\r\n\t\tfor (const p of Object.values(this._eventParents ?? {})) {\r\n\t\t\tp.fire(e.type, {\r\n\t\t\t\tpropagatedFrom: e.target,\r\n\t\t\t\t...e\r\n\t\t\t}, true);\r\n\t\t}\r\n\t}\r\n}\n\n/*\r\n * @class Point\r\n *\r\n * Represents a point with `x` and `y` coordinates in pixels.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * const point = new Point(200, 300);\r\n * ```\r\n *\r\n * All Leaflet methods and options that accept `Point` objects also accept them in a simple Array form (unless noted otherwise), so these lines are equivalent:\r\n *\r\n * ```js\r\n * map.panBy([200, 300]);\r\n * map.panBy(new Point(200, 300));\r\n * ```\r\n *\r\n * Note that `Point` does not inherit from Leaflet's `Class` object,\r\n * which means new classes can't inherit from it, and new methods\r\n * can't be added to it with the `include` function.\r\n */\r\n\r\n// @constructor Point(x: Number, y: Number, round?: Boolean)\r\n// Creates a Point object with the given `x` and `y` coordinates. If optional `round` is set to true, rounds the `x` and `y` values.\r\n\r\n// @alternative\r\n// @constructor Point(coords: Number[])\r\n// Expects an array of the form `[x, y]` instead.\r\n\r\n// @alternative\r\n// @constructor Point(coords: Object)\r\n// Expects a plain object of the form `{x: Number, y: Number}` instead.\r\nclass Point {\r\n\tconstructor(x, y, round) {\r\n\r\n\t\tconst valid = Point.validate(x, y);\r\n\t\tif (!valid) {\r\n\t\t\tthrow new Error(`Invalid Point object: (${x}, ${y})`);\r\n\t\t}\r\n\r\n\t\tlet _x, _y;\r\n\t\tif (x instanceof Point) {\r\n\t\t\t// We can use the same object, no need to clone it\r\n\t\t\t// eslint-disable-next-line no-constructor-return\r\n\t\t\treturn x;\r\n\t\t} else if (Array.isArray(x)) {\r\n\t\t\t_x = x[0];\r\n\t\t\t_y = x[1];\r\n\t\t} else if (typeof x === 'object' && 'x' in x && 'y' in x) {\r\n\t\t\t_x = x.x;\r\n\t\t\t_y = x.y;\r\n\t\t} else {\r\n\t\t\t_x = x;\r\n\t\t\t_y = y;\r\n\t\t}\r\n\r\n\t\t// @property x: Number; The `x` coordinate of the point\r\n\t\tthis.x = (round ? Math.round(_x) : _x);\r\n\t\t// @property y: Number; The `y` coordinate of the point\r\n\t\tthis.y = (round ? Math.round(_y) : _y);\r\n\t}\r\n\r\n\t// @section\r\n\t// There are several static functions which can be called without instantiating Point:\r\n\r\n\t// @function validate(x: Number, y: Number): Boolean\r\n\t// Returns `true` if the Point object can be properly initialized.\r\n\r\n\t// @alternative\r\n\t// @function validate(coords: Number[]): Boolean\r\n\t// Expects an array of the form `[x, y]`. Returns `true` if the Point object can be properly initialized.\r\n\r\n\t// @alternative\r\n\t// @function validate(coords: Object): Boolean\r\n\t// Returns `true` if the Point object can be properly initialized.\r\n\tstatic validate(x, y) {\r\n\t\tif (x instanceof Point || Array.isArray(x)) {\r\n\t\t\treturn true;\r\n\t\t} else if (x && typeof x === 'object' && 'x' in x && 'y' in x) {\r\n\t\t\treturn true;\r\n\t\t} else if ((x || x === 0) && (y || y === 0)) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\t// @method clone(): Point\r\n\t// Returns a copy of the current point.\r\n\tclone() {\r\n\t\t// to skip the validation in the constructor we need to initialize with 0 and then set the values later\r\n\t\tconst p = new Point(0, 0);\r\n\t\tp.x = this.x;\r\n\t\tp.y = this.y;\r\n\t\treturn p;\r\n\t}\r\n\r\n\t// @method add(otherPoint: Point): Point\r\n\t// Returns the result of addition of the current and the given points.\r\n\tadd(point) {\r\n\t\t// non-destructive, returns a new point\r\n\t\treturn this.clone()._add(new Point(point));\r\n\t}\r\n\r\n\t_add(point) {\r\n\t\t// destructive, used directly for performance in situations where it's safe to modify existing point\r\n\t\tthis.x += point.x;\r\n\t\tthis.y += point.y;\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method subtract(otherPoint: Point): Point\r\n\t// Returns the result of subtraction of the given point from the current.\r\n\tsubtract(point) {\r\n\t\treturn this.clone()._subtract(new Point(point));\r\n\t}\r\n\r\n\t_subtract(point) {\r\n\t\tthis.x -= point.x;\r\n\t\tthis.y -= point.y;\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method divideBy(num: Number): Point\r\n\t// Returns the result of division of the current point by the given number.\r\n\tdivideBy(num) {\r\n\t\treturn this.clone()._divideBy(num);\r\n\t}\r\n\r\n\t_divideBy(num) {\r\n\t\tthis.x /= num;\r\n\t\tthis.y /= num;\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method multiplyBy(num: Number): Point\r\n\t// Returns the result of multiplication of the current point by the given number.\r\n\tmultiplyBy(num) {\r\n\t\treturn this.clone()._multiplyBy(num);\r\n\t}\r\n\r\n\t_multiplyBy(num) {\r\n\t\tthis.x *= num;\r\n\t\tthis.y *= num;\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method scaleBy(scale: Point): Point\r\n\t// Multiply each coordinate of the current point by each coordinate of\r\n\t// `scale`. In linear algebra terms, multiply the point by the\r\n\t// [scaling matrix](https://en.wikipedia.org/wiki/Scaling_%28geometry%29#Matrix_representation)\r\n\t// defined by `scale`.\r\n\tscaleBy(point) {\r\n\t\treturn new Point(this.x * point.x, this.y * point.y);\r\n\t}\r\n\r\n\t// @method unscaleBy(scale: Point): Point\r\n\t// Inverse of `scaleBy`. Divide each coordinate of the current point by\r\n\t// each coordinate of `scale`.\r\n\tunscaleBy(point) {\r\n\t\treturn new Point(this.x / point.x, this.y / point.y);\r\n\t}\r\n\r\n\t// Returns a copy of the current point with rounded coordinates.\r\n\tround() {\r\n\t\treturn this.clone()._round();\r\n\t}\r\n\r\n\t_round() {\r\n\t\tthis.x = Math.round(this.x);\r\n\t\tthis.y = Math.round(this.y);\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method floor(): Point\r\n\t// Returns a copy of the current point with floored coordinates (rounded down).\r\n\tfloor() {\r\n\t\treturn this.clone()._floor();\r\n\t}\r\n\r\n\t_floor() {\r\n\t\tthis.x = Math.floor(this.x);\r\n\t\tthis.y = Math.floor(this.y);\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method ceil(): Point\r\n\t// Returns a copy of the current point with ceiled coordinates (rounded up).\r\n\tceil() {\r\n\t\treturn this.clone()._ceil();\r\n\t}\r\n\r\n\t_ceil() {\r\n\t\tthis.x = Math.ceil(this.x);\r\n\t\tthis.y = Math.ceil(this.y);\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// Returns a copy of the current point with truncated coordinates (rounded towards zero).\r\n\ttrunc() {\r\n\t\treturn this.clone()._trunc();\r\n\t}\r\n\r\n\t_trunc() {\r\n\t\tthis.x = Math.trunc(this.x);\r\n\t\tthis.y = Math.trunc(this.y);\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method distanceTo(otherPoint: Point): Number\r\n\t// Returns the cartesian distance between the current and the given points.\r\n\tdistanceTo(point) {\r\n\t\tpoint = new Point(point);\r\n\r\n\t\tconst x = point.x - this.x,\r\n\t\ty = point.y - this.y;\r\n\r\n\t\treturn Math.sqrt(x * x + y * y);\r\n\t}\r\n\r\n\t// @method equals(otherPoint: Point): Boolean\r\n\t// Returns `true` if the given point has the same coordinates.\r\n\tequals(point) {\r\n\t\tpoint = new Point(point);\r\n\r\n\t\treturn point.x === this.x &&\r\n\t\t point.y === this.y;\r\n\t}\r\n\r\n\t// @method contains(otherPoint: Point): Boolean\r\n\t// Returns `true` if both coordinates of the given point are less than the corresponding current point coordinates (in absolute values).\r\n\tcontains(point) {\r\n\t\tpoint = new Point(point);\r\n\r\n\t\treturn Math.abs(point.x) <= Math.abs(this.x) &&\r\n\t\t Math.abs(point.y) <= Math.abs(this.y);\r\n\t}\r\n\r\n\t// @method toString(): String\r\n\t// Returns a string representation of the point for debugging purposes.\r\n\ttoString() {\r\n\t\treturn `Point(${formatNum(this.x)}, ${formatNum(this.y)})`;\r\n\t}\r\n}\n\n/*\r\n * @class Bounds\r\n *\r\n * Represents a rectangular area in pixel coordinates.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * const p1 = new Point(10, 10),\r\n * p2 = new Point(40, 60),\r\n * bounds = new Bounds(p1, p2);\r\n * ```\r\n *\r\n * All Leaflet methods that accept `Bounds` objects also accept them in a simple Array form (unless noted otherwise), so the bounds example above can be passed like this:\r\n *\r\n * ```js\r\n * otherBounds.intersects([[10, 10], [40, 60]]);\r\n * ```\r\n *\r\n * Note that `Bounds` does not inherit from Leaflet's `Class` object,\r\n * which means new classes can't inherit from it, and new methods\r\n * can't be added to it with the `include` function.\r\n */\r\n\r\n\r\n// @constructor Bounds(corner1: Point, corner2: Point)\r\n// Creates a Bounds object from two corners coordinate pairs.\r\n// @alternative\r\n// @constructor Bounds(points: Point[])\r\n// Creates a Bounds object from the given array of points.\r\nclass Bounds {\r\n\tconstructor(a, b) {\r\n\t\tif (!a) { return; }\r\n\r\n\t\tif (a instanceof Bounds) {\r\n\t\t\t// We can use the same object, no need to clone it\r\n\t\t\t// eslint-disable-next-line no-constructor-return\r\n\t\t\treturn a;\r\n\t\t}\r\n\r\n\t\tconst points = b ? [a, b] : a;\r\n\t\tfor (const point of points) {\r\n\t\t\tthis.extend(point);\r\n\t\t}\r\n\t}\r\n\r\n\t// @method extend(point: Point): this\r\n\t// Extends the bounds to contain the given point.\r\n\r\n\t// @alternative\r\n\t// @method extend(otherBounds: Bounds): this\r\n\t// Extend the bounds to contain the given bounds\r\n\textend(obj) {\r\n\t\tlet min2, max2;\r\n\t\tif (!obj) { return this; }\r\n\r\n\t\tif (obj instanceof Point || typeof obj[0] === 'number' || 'x' in obj) {\r\n\t\t\tmin2 = max2 = new Point(obj);\r\n\t\t} else {\r\n\t\t\tobj = new Bounds(obj);\r\n\t\t\tmin2 = obj.min;\r\n\t\t\tmax2 = obj.max;\r\n\r\n\t\t\tif (!min2 || !max2) { return this; }\r\n\t\t}\r\n\r\n\t\t// @property min: Point\r\n\t\t// The top left corner of the rectangle.\r\n\t\t// @property max: Point\r\n\t\t// The bottom right corner of the rectangle.\r\n\t\tif (!this.min && !this.max) {\r\n\t\t\tthis.min = min2.clone();\r\n\t\t\tthis.max = max2.clone();\r\n\t\t} else {\r\n\t\t\tthis.min.x = Math.min(min2.x, this.min.x);\r\n\t\t\tthis.max.x = Math.max(max2.x, this.max.x);\r\n\t\t\tthis.min.y = Math.min(min2.y, this.min.y);\r\n\t\t\tthis.max.y = Math.max(max2.y, this.max.y);\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method getCenter(round?: Boolean): Point\r\n\t// Returns the center point of the bounds.\r\n\tgetCenter(round) {\r\n\t\treturn new Point(\r\n\t\t\t(this.min.x + this.max.x) / 2,\r\n\t\t\t(this.min.y + this.max.y) / 2, round);\r\n\t}\r\n\r\n\t// @method getBottomLeft(): Point\r\n\t// Returns the bottom-left point of the bounds.\r\n\tgetBottomLeft() {\r\n\t\treturn new Point(this.min.x, this.max.y);\r\n\t}\r\n\r\n\t// @method getTopRight(): Point\r\n\t// Returns the top-right point of the bounds.\r\n\tgetTopRight() { // -> Point\r\n\t\treturn new Point(this.max.x, this.min.y);\r\n\t}\r\n\r\n\t// @method getTopLeft(): Point\r\n\t// Returns the top-left point of the bounds (i.e. [`this.min`](#bounds-min)).\r\n\tgetTopLeft() {\r\n\t\treturn this.min; // left, top\r\n\t}\r\n\r\n\t// @method getBottomRight(): Point\r\n\t// Returns the bottom-right point of the bounds (i.e. [`this.max`](#bounds-max)).\r\n\tgetBottomRight() {\r\n\t\treturn this.max; // right, bottom\r\n\t}\r\n\r\n\t// @method getSize(): Point\r\n\t// Returns the size of the given bounds\r\n\tgetSize() {\r\n\t\treturn this.max.subtract(this.min);\r\n\t}\r\n\r\n\t// @method contains(otherBounds: Bounds): Boolean\r\n\t// Returns `true` if the rectangle contains the given one.\r\n\t// @alternative\r\n\t// @method contains(point: Point): Boolean\r\n\t// Returns `true` if the rectangle contains the given point.\r\n\tcontains(obj) {\r\n\t\tlet min, max;\r\n\r\n\t\tif (typeof obj[0] === 'number' || obj instanceof Point) {\r\n\t\t\tobj = new Point(obj);\r\n\t\t} else {\r\n\t\t\tobj = new Bounds(obj);\r\n\t\t}\r\n\r\n\t\tif (obj instanceof Bounds) {\r\n\t\t\tmin = obj.min;\r\n\t\t\tmax = obj.max;\r\n\t\t} else {\r\n\t\t\tmin = max = obj;\r\n\t\t}\r\n\r\n\t\treturn (min.x >= this.min.x) &&\r\n\t\t (max.x <= this.max.x) &&\r\n\t\t (min.y >= this.min.y) &&\r\n\t\t (max.y <= this.max.y);\r\n\t}\r\n\r\n\t// @method intersects(otherBounds: Bounds): Boolean\r\n\t// Returns `true` if the rectangle intersects the given bounds. Two bounds\r\n\t// intersect if they have at least one point in common.\r\n\tintersects(bounds) { // (Bounds) -> Boolean\r\n\t\tbounds = new Bounds(bounds);\r\n\r\n\t\tconst min = this.min,\r\n\t\tmax = this.max,\r\n\t\tmin2 = bounds.min,\r\n\t\tmax2 = bounds.max,\r\n\t\txIntersects = (max2.x >= min.x) && (min2.x <= max.x),\r\n\t\tyIntersects = (max2.y >= min.y) && (min2.y <= max.y);\r\n\r\n\t\treturn xIntersects && yIntersects;\r\n\t}\r\n\r\n\t// @method overlaps(otherBounds: Bounds): Boolean\r\n\t// Returns `true` if the rectangle overlaps the given bounds. Two bounds\r\n\t// overlap if their intersection is an area.\r\n\toverlaps(bounds) { // (Bounds) -> Boolean\r\n\t\tbounds = new Bounds(bounds);\r\n\r\n\t\tconst min = this.min,\r\n\t\tmax = this.max,\r\n\t\tmin2 = bounds.min,\r\n\t\tmax2 = bounds.max,\r\n\t\txOverlaps = (max2.x > min.x) && (min2.x < max.x),\r\n\t\tyOverlaps = (max2.y > min.y) && (min2.y < max.y);\r\n\r\n\t\treturn xOverlaps && yOverlaps;\r\n\t}\r\n\r\n\t// @method isValid(): Boolean\r\n\t// Returns `true` if the bounds are properly initialized.\r\n\tisValid() {\r\n\t\treturn !!(this.min && this.max);\r\n\t}\r\n\r\n\r\n\t// @method pad(bufferRatio: Number): Bounds\r\n\t// Returns bounds created by extending or retracting the current bounds by a given ratio in each direction.\r\n\t// For example, a ratio of 0.5 extends the bounds by 50% in each direction.\r\n\t// Negative values will retract the bounds.\r\n\tpad(bufferRatio) {\r\n\t\tconst min = this.min,\r\n\t\tmax = this.max,\r\n\t\theightBuffer = Math.abs(min.x - max.x) * bufferRatio,\r\n\t\twidthBuffer = Math.abs(min.y - max.y) * bufferRatio;\r\n\r\n\r\n\t\treturn new Bounds(\r\n\t\t\tnew Point(min.x - heightBuffer, min.y - widthBuffer),\r\n\t\t\tnew Point(max.x + heightBuffer, max.y + widthBuffer));\r\n\t}\r\n\r\n\r\n\t// @method equals(otherBounds: Bounds): Boolean\r\n\t// Returns `true` if the rectangle is equivalent to the given bounds.\r\n\tequals(bounds) {\r\n\t\tif (!bounds) { return false; }\r\n\r\n\t\tbounds = new Bounds(bounds);\r\n\r\n\t\treturn this.min.equals(bounds.getTopLeft()) &&\r\n\t\t\tthis.max.equals(bounds.getBottomRight());\r\n\t}\r\n}\n\n/*\r\n * @class LatLngBounds\r\n *\r\n * Represents a rectangular geographical area on a map.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * const corner1 = new LatLng(40.712, -74.227),\r\n * corner2 = new LatLng(40.774, -74.125),\r\n * bounds = new LatLngBounds(corner1, corner2);\r\n * ```\r\n *\r\n * All Leaflet methods that accept LatLngBounds objects also accept them in a simple Array form (unless noted otherwise), so the bounds example above can be passed like this:\r\n *\r\n * ```js\r\n * map.fitBounds([\r\n * \t[40.712, -74.227],\r\n * \t[40.774, -74.125]\r\n * ]);\r\n * ```\r\n *\r\n * Caution: if the area crosses the antimeridian (often confused with the International Date Line), you must specify corners _outside_ the [-180, 180] degrees longitude range.\r\n *\r\n * Note that `LatLngBounds` does not inherit from Leaflet's `Class` object,\r\n * which means new classes can't inherit from it, and new methods\r\n * can't be added to it with the `include` function.\r\n */\r\n\r\n// TODO International date line?\r\n\r\n// @constructor LatLngBounds(corner1: LatLng, corner2: LatLng)\r\n// Creates a `LatLngBounds` object by defining two diagonally opposite corners of the rectangle.\r\n\r\n// @alternative\r\n// @constructor LatLngBounds(latlngs: LatLng[])\r\n// Creates a `LatLngBounds` object defined by the geographical points it contains. Very useful for zooming the map to fit a particular set of locations with [`fitBounds`](#map-fitbounds).\r\nclass LatLngBounds {\r\n\tconstructor(corner1, corner2) { // (LatLng, LatLng) or (LatLng[])\r\n\t\tif (!corner1) { return; }\r\n\r\n\t\tif (corner1 instanceof LatLngBounds) {\r\n\t\t\t// We can use the same object, no need to clone it\r\n\t\t\t// eslint-disable-next-line no-constructor-return\r\n\t\t\treturn corner1;\r\n\t\t}\r\n\r\n\t\tconst latlngs = corner2 ? [corner1, corner2] : corner1;\r\n\r\n\t\tfor (const latlng of latlngs) {\r\n\t\t\tthis.extend(latlng);\r\n\t\t}\r\n\t}\r\n\r\n\t// @method extend(latlng: LatLng): this\r\n\t// Extend the bounds to contain the given point\r\n\r\n\t// @alternative\r\n\t// @method extend(otherBounds: LatLngBounds): this\r\n\t// Extend the bounds to contain the given bounds\r\n\textend(obj) {\r\n\t\tconst sw = this._southWest,\r\n\t\tne = this._northEast;\r\n\t\tlet sw2, ne2;\r\n\r\n\t\tif (obj instanceof LatLng) {\r\n\t\t\tsw2 = obj;\r\n\t\t\tne2 = obj;\r\n\r\n\t\t} else if (obj instanceof LatLngBounds) {\r\n\t\t\tsw2 = obj._southWest;\r\n\t\t\tne2 = obj._northEast;\r\n\r\n\t\t\tif (!sw2 || !ne2) { return this; }\r\n\r\n\t\t} else {\r\n\t\t\tif (!obj) {\r\n\t\t\t\treturn this;\r\n\t\t\t}\r\n\t\t\tif (LatLng.validate(obj)) {\r\n\t\t\t\treturn this.extend(new LatLng(obj));\r\n\t\t\t}\r\n\t\t\treturn this.extend(new LatLngBounds(obj));\r\n\t\t}\r\n\r\n\t\tif (!sw && !ne) {\r\n\t\t\tthis._southWest = new LatLng(sw2.lat, sw2.lng);\r\n\t\t\tthis._northEast = new LatLng(ne2.lat, ne2.lng);\r\n\t\t} else {\r\n\t\t\tsw.lat = Math.min(sw2.lat, sw.lat);\r\n\t\t\tsw.lng = Math.min(sw2.lng, sw.lng);\r\n\t\t\tne.lat = Math.max(ne2.lat, ne.lat);\r\n\t\t\tne.lng = Math.max(ne2.lng, ne.lng);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method pad(bufferRatio: Number): LatLngBounds\r\n\t// Returns bounds created by extending or retracting the current bounds by a given ratio in each direction.\r\n\t// For example, a ratio of 0.5 extends the bounds by 50% in each direction.\r\n\t// Negative values will retract the bounds.\r\n\tpad(bufferRatio) {\r\n\t\tconst sw = this._southWest,\r\n\t\tne = this._northEast,\r\n\t\theightBuffer = Math.abs(sw.lat - ne.lat) * bufferRatio,\r\n\t\twidthBuffer = Math.abs(sw.lng - ne.lng) * bufferRatio;\r\n\r\n\t\treturn new LatLngBounds(\r\n\t\t\tnew LatLng(sw.lat - heightBuffer, sw.lng - widthBuffer),\r\n\t\t\tnew LatLng(ne.lat + heightBuffer, ne.lng + widthBuffer));\r\n\t}\r\n\r\n\t// @method getCenter(): LatLng\r\n\t// Returns the center point of the bounds.\r\n\tgetCenter() {\r\n\t\treturn new LatLng(\r\n\t\t\t(this._southWest.lat + this._northEast.lat) / 2,\r\n\t\t\t(this._southWest.lng + this._northEast.lng) / 2);\r\n\t}\r\n\r\n\t// @method getSouthWest(): LatLng\r\n\t// Returns the south-west point of the bounds.\r\n\tgetSouthWest() {\r\n\t\treturn this._southWest;\r\n\t}\r\n\r\n\t// @method getNorthEast(): LatLng\r\n\t// Returns the north-east point of the bounds.\r\n\tgetNorthEast() {\r\n\t\treturn this._northEast;\r\n\t}\r\n\r\n\t// @method getNorthWest(): LatLng\r\n\t// Returns the north-west point of the bounds.\r\n\tgetNorthWest() {\r\n\t\treturn new LatLng(this.getNorth(), this.getWest());\r\n\t}\r\n\r\n\t// @method getSouthEast(): LatLng\r\n\t// Returns the south-east point of the bounds.\r\n\tgetSouthEast() {\r\n\t\treturn new LatLng(this.getSouth(), this.getEast());\r\n\t}\r\n\r\n\t// @method getWest(): Number\r\n\t// Returns the west longitude of the bounds\r\n\tgetWest() {\r\n\t\treturn this._southWest.lng;\r\n\t}\r\n\r\n\t// @method getSouth(): Number\r\n\t// Returns the south latitude of the bounds\r\n\tgetSouth() {\r\n\t\treturn this._southWest.lat;\r\n\t}\r\n\r\n\t// @method getEast(): Number\r\n\t// Returns the east longitude of the bounds\r\n\tgetEast() {\r\n\t\treturn this._northEast.lng;\r\n\t}\r\n\r\n\t// @method getNorth(): Number\r\n\t// Returns the north latitude of the bounds\r\n\tgetNorth() {\r\n\t\treturn this._northEast.lat;\r\n\t}\r\n\r\n\t// @method contains(otherBounds: LatLngBounds): Boolean\r\n\t// Returns `true` if the rectangle contains the given one.\r\n\r\n\t// @alternative\r\n\t// @method contains (latlng: LatLng): Boolean\r\n\t// Returns `true` if the rectangle contains the given point.\r\n\tcontains(obj) { // (LatLngBounds) or (LatLng) -> Boolean\r\n\t\tif (LatLng.validate(obj)) {\r\n\t\t\tobj = new LatLng(obj);\r\n\t\t} else {\r\n\t\t\tobj = new LatLngBounds(obj);\r\n\t\t}\r\n\r\n\t\tconst sw = this._southWest,\r\n\t\tne = this._northEast;\r\n\t\tlet sw2, ne2;\r\n\r\n\t\tif (obj instanceof LatLngBounds) {\r\n\t\t\tsw2 = obj.getSouthWest();\r\n\t\t\tne2 = obj.getNorthEast();\r\n\t\t} else {\r\n\t\t\tsw2 = ne2 = obj;\r\n\t\t}\r\n\r\n\t\treturn (sw2.lat >= sw.lat) && (ne2.lat <= ne.lat) &&\r\n\t\t (sw2.lng >= sw.lng) && (ne2.lng <= ne.lng);\r\n\t}\r\n\r\n\t// @method intersects(otherBounds: LatLngBounds): Boolean\r\n\t// Returns `true` if the rectangle intersects the given bounds. Two bounds intersect if they have at least one point in common.\r\n\tintersects(bounds) {\r\n\t\tbounds = new LatLngBounds(bounds);\r\n\r\n\t\tconst sw = this._southWest,\r\n\t\tne = this._northEast,\r\n\t\tsw2 = bounds.getSouthWest(),\r\n\t\tne2 = bounds.getNorthEast(),\r\n\r\n\t\tlatIntersects = (ne2.lat >= sw.lat) && (sw2.lat <= ne.lat),\r\n\t\tlngIntersects = (ne2.lng >= sw.lng) && (sw2.lng <= ne.lng);\r\n\r\n\t\treturn latIntersects && lngIntersects;\r\n\t}\r\n\r\n\t// @method overlaps(otherBounds: LatLngBounds): Boolean\r\n\t// Returns `true` if the rectangle overlaps the given bounds. Two bounds overlap if their intersection is an area.\r\n\toverlaps(bounds) {\r\n\t\tbounds = new LatLngBounds(bounds);\r\n\r\n\t\tconst sw = this._southWest,\r\n\t\tne = this._northEast,\r\n\t\tsw2 = bounds.getSouthWest(),\r\n\t\tne2 = bounds.getNorthEast(),\r\n\r\n\t\tlatOverlaps = (ne2.lat > sw.lat) && (sw2.lat < ne.lat),\r\n\t\tlngOverlaps = (ne2.lng > sw.lng) && (sw2.lng < ne.lng);\r\n\r\n\t\treturn latOverlaps && lngOverlaps;\r\n\t}\r\n\r\n\t// @method toBBoxString(): String\r\n\t// Returns a string with bounding box coordinates in a 'southwest_lng,southwest_lat,northeast_lng,northeast_lat' format. Useful for sending requests to web services that return geo data.\r\n\ttoBBoxString() {\r\n\t\treturn [this.getWest(), this.getSouth(), this.getEast(), this.getNorth()].join(',');\r\n\t}\r\n\r\n\t// @method equals(otherBounds: LatLngBounds, maxMargin?: Number): Boolean\r\n\t// Returns `true` if the rectangle is equivalent (within a small margin of error) to the given bounds. The margin of error can be overridden by setting `maxMargin` to a small number.\r\n\tequals(bounds, maxMargin) {\r\n\t\tif (!bounds) { return false; }\r\n\r\n\t\tbounds = new LatLngBounds(bounds);\r\n\r\n\t\treturn this._southWest.equals(bounds.getSouthWest(), maxMargin) &&\r\n\t\t this._northEast.equals(bounds.getNorthEast(), maxMargin);\r\n\t}\r\n\r\n\t// @method isValid(): Boolean\r\n\t// Returns `true` if the bounds are properly initialized.\r\n\tisValid() {\r\n\t\treturn !!(this._southWest && this._northEast);\r\n\t}\r\n}\n\n/* @class LatLng\r\n *\r\n * Represents a geographical point with a certain latitude and longitude.\r\n *\r\n * @example\r\n *\r\n * ```\r\n * const latlng = new LatLng(50.5, 30.5);\r\n * ```\r\n *\r\n * All Leaflet methods that accept LatLng objects also accept them in a simple Array form and simple object form (unless noted otherwise), so these lines are equivalent:\r\n *\r\n * ```\r\n * map.panTo([50, 30]);\r\n * map.panTo({lat: 50, lng: 30});\r\n * map.panTo({lat: 50, lon: 30});\r\n * map.panTo(new LatLng(50, 30));\r\n * ```\r\n *\r\n * Note that `LatLng` does not inherit from Leaflet's `Class` object,\r\n * which means new classes can't inherit from it, and new methods\r\n * can't be added to it with the `include` function.\r\n */\r\n\r\n// @constructor LatLng(latitude: Number, longitude: Number, altitude?: Number): LatLng\r\n// Creates an object representing a geographical point with the given latitude and longitude (and optionally altitude).\r\n\r\n// @alternative\r\n// @constructor LatLng(coords: Array): LatLng\r\n// Expects an array of the form `[Number, Number]` or `[Number, Number, Number]` instead.\r\n\r\n// @alternative\r\n// @constructor LatLng(coords: Object): LatLng\r\n// Expects an plain object of the form `{lat: Number, lng: Number}` or `{lat: Number, lng: Number, alt: Number}` instead.\r\n// You can also use `lon` in place of `lng` in the object form.\r\nclass LatLng {\r\n\tconstructor(lat, lng, alt) {\r\n\t\tconst valid = LatLng.validate(lat, lng, alt);\r\n\t\tif (!valid) {\r\n\t\t\tthrow new Error(`Invalid LatLng object: (${lat}, ${lng})`);\r\n\t\t}\r\n\r\n\t\tlet _lat, _lng, _alt;\r\n\t\tif (lat instanceof LatLng) {\r\n\t\t\t// We can use the same object, no need to clone it\r\n\t\t\t// eslint-disable-next-line no-constructor-return\r\n\t\t\treturn lat;\r\n\t\t} else if (Array.isArray(lat) && typeof lat[0] !== 'object') {\r\n\t\t\tif (lat.length === 3) {\r\n\t\t\t\t_lat = lat[0];\r\n\t\t\t\t_lng = lat[1];\r\n\t\t\t\t_alt = lat[2];\r\n\t\t\t} else if (lat.length === 2) {\r\n\t\t\t\t_lat = lat[0];\r\n\t\t\t\t_lng = lat[1];\r\n\t\t\t}\r\n\t\t} else if (typeof lat === 'object' && 'lat' in lat) {\r\n\t\t\t_lat = lat.lat;\r\n\t\t\t_lng = 'lng' in lat ? lat.lng : lat.lon;\r\n\t\t\t_alt = lat.alt;\r\n\t\t} else {\r\n\t\t\t_lat = lat;\r\n\t\t\t_lng = lng;\r\n\t\t\t_alt = alt;\r\n\t\t}\r\n\r\n\r\n\t\t// @property lat: Number\r\n\t\t// Latitude in degrees\r\n\t\tthis.lat = +_lat;\r\n\r\n\t\t// @property lng: Number\r\n\t\t// Longitude in degrees\r\n\t\tthis.lng = +_lng;\r\n\r\n\t\t// @property alt: Number\r\n\t\t// Altitude in meters (optional)\r\n\t\tif (_alt !== undefined) {\r\n\t\t\tthis.alt = +_alt;\r\n\t\t}\r\n\t}\r\n\r\n\t// @section\r\n\t// There are several static functions which can be called without instantiating LatLng:\r\n\r\n\t// @function validate(latitude: Number, longitude: Number, altitude?: Number): Boolean\r\n\t// Returns `true` if the LatLng object can be properly initialized.\r\n\r\n\t// @alternative\r\n\t// @function validate(coords: Array): Boolean\r\n\t// Expects an array of the form `[Number, Number]` or `[Number, Number, Number]`.\r\n\t// Returns `true` if the LatLng object can be properly initialized.\r\n\r\n\t// @alternative\r\n\t// @function validate(coords: Object): Boolean\r\n\t// Returns `true` if the LatLng object can be properly initialized.\r\n\r\n\t// eslint-disable-next-line no-unused-vars\r\n\tstatic validate(lat, lng, alt) {\r\n\t\tif (lat instanceof LatLng || (typeof lat === 'object' && 'lat' in lat)) {\r\n\t\t\treturn true;\r\n\t\t} else if (lat && Array.isArray(lat) && typeof lat[0] !== 'object') {\r\n\t\t\tif (lat.length === 3 || lat.length === 2) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t} else if ((lat || lat === 0) && (lng || lng === 0)) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\r\n\t// @method equals(otherLatLng: LatLng, maxMargin?: Number): Boolean\r\n\t// Returns `true` if the given `LatLng` point is at the same position (within a small margin of error). The margin of error can be overridden by setting `maxMargin` to a small number.\r\n\tequals(obj, maxMargin) {\r\n\t\tif (!obj) { return false; }\r\n\r\n\t\tobj = new LatLng(obj);\r\n\r\n\t\tconst margin = Math.max(\r\n\t\t\tMath.abs(this.lat - obj.lat),\r\n\t\t\tMath.abs(this.lng - obj.lng));\r\n\r\n\t\treturn margin <= (maxMargin ?? 1.0E-9);\r\n\t}\r\n\r\n\t// @method toString(precision?: Number): String\r\n\t// Returns a string representation of the point (for debugging purposes).\r\n\ttoString(precision) {\r\n\t\treturn `LatLng(${formatNum(this.lat, precision)}, ${formatNum(this.lng, precision)})`;\r\n\t}\r\n\r\n\t// @method distanceTo(otherLatLng: LatLng): Number\r\n\t// Returns the distance (in meters) to the given `LatLng` calculated using the [Haversine formula](https://en.wikipedia.org/wiki/Haversine_formula).\r\n\tdistanceTo(other) {\r\n\t\treturn Earth.distance(this, new LatLng(other));\r\n\t}\r\n\r\n\t// @method wrap(): LatLng\r\n\t// Returns a new `LatLng` object with the longitude wrapped so it's always between -180 and +180 degrees.\r\n\twrap() {\r\n\t\treturn Earth.wrapLatLng(this);\r\n\t}\r\n\r\n\t// @method toBounds(sizeInMeters: Number): LatLngBounds\r\n\t// Returns a new `LatLngBounds` object in which each boundary is `sizeInMeters/2` meters apart from the `LatLng`.\r\n\ttoBounds(sizeInMeters) {\r\n\t\tconst latAccuracy = 180 * sizeInMeters / 40075017,\r\n\t\tlngAccuracy = latAccuracy / Math.cos((Math.PI / 180) * this.lat);\r\n\r\n\t\treturn new LatLngBounds(\r\n\t\t\t[this.lat - latAccuracy, this.lng - lngAccuracy],\r\n\t\t\t[this.lat + latAccuracy, this.lng + lngAccuracy]);\r\n\t}\r\n\r\n\t// @method clone(): LatLng\r\n\t// Returns a copy of the current LatLng.\r\n\tclone() {\r\n\t\t// to skip the validation in the constructor we need to initialize with 0 and then set the values later\r\n\t\tconst latlng = new LatLng(0, 0);\r\n\t\tlatlng.lat = this.lat;\r\n\t\tlatlng.lng = this.lng;\r\n\t\tlatlng.alt = this.alt;\r\n\t\treturn latlng;\r\n\t}\r\n}\n\n/*\r\n * @namespace CRS\r\n * @crs CRS.Base\r\n * Object that defines coordinate reference systems for projecting\r\n * geographical points into pixel (screen) coordinates and back (and to\r\n * coordinates in other units for [WMS](https://en.wikipedia.org/wiki/Web_Map_Service) services). See\r\n * [spatial reference system](https://en.wikipedia.org/wiki/Spatial_reference_system).\r\n *\r\n * Leaflet defines the most usual CRSs by default. If you want to use a\r\n * CRS not defined by default, take a look at the\r\n * [Proj4Leaflet](https://github.com/kartena/Proj4Leaflet) plugin.\r\n *\r\n * Note that the CRS instances do not inherit from Leaflet's `Class` object,\r\n * and can't be instantiated. Also, new classes can't inherit from them,\r\n * and methods can't be added to them with the `include` function.\r\n */\r\n\r\nclass CRS {\r\n\tstatic projection = undefined;\r\n\tstatic transformation = undefined;\r\n\r\n\t// @method latLngToPoint(latlng: LatLng, zoom: Number): Point\r\n\t// Projects geographical coordinates into pixel coordinates for a given zoom.\r\n\tstatic latLngToPoint(latlng, zoom) {\r\n\t\tconst projectedPoint = this.projection.project(latlng),\r\n\t\tscale = this.scale(zoom);\r\n\r\n\t\treturn this.transformation._transform(projectedPoint, scale);\r\n\t}\r\n\r\n\t// @method pointToLatLng(point: Point, zoom: Number): LatLng\r\n\t// The inverse of `latLngToPoint`. Projects pixel coordinates on a given\r\n\t// zoom into geographical coordinates.\r\n\tstatic pointToLatLng(point, zoom) {\r\n\t\tconst scale = this.scale(zoom),\r\n\t\tuntransformedPoint = this.transformation.untransform(point, scale);\r\n\r\n\t\treturn this.projection.unproject(untransformedPoint);\r\n\t}\r\n\r\n\t// @method project(latlng: LatLng): Point\r\n\t// Projects geographical coordinates into coordinates in units accepted for\r\n\t// this CRS (e.g. meters for EPSG:3857, for passing it to WMS services).\r\n\tstatic project(latlng) {\r\n\t\treturn this.projection.project(latlng);\r\n\t}\r\n\r\n\t// @method unproject(point: Point): LatLng\r\n\t// Given a projected coordinate returns the corresponding LatLng.\r\n\t// The inverse of `project`.\r\n\tstatic unproject(point) {\r\n\t\treturn this.projection.unproject(point);\r\n\t}\r\n\r\n\t// @method scale(zoom: Number): Number\r\n\t// Returns the scale used when transforming projected coordinates into\r\n\t// pixel coordinates for a particular zoom. For example, it returns\r\n\t// `256 * 2^zoom` for Mercator-based CRS.\r\n\tstatic scale(zoom) {\r\n\t\treturn 256 * 2 ** zoom;\r\n\t}\r\n\r\n\t// @method zoom(scale: Number): Number\r\n\t// Inverse of `scale()`, returns the zoom level corresponding to a scale\r\n\t// factor of `scale`.\r\n\tstatic zoom(scale) {\r\n\t\treturn Math.log(scale / 256) / Math.LN2;\r\n\t}\r\n\r\n\t// @method getProjectedBounds(zoom: Number): Bounds\r\n\t// Returns the projection's bounds scaled and transformed for the provided `zoom`.\r\n\tstatic getProjectedBounds(zoom) {\r\n\t\tif (this.infinite) { return null; }\r\n\r\n\t\tconst b = this.projection.bounds,\r\n\t\ts = this.scale(zoom),\r\n\t\tmin = this.transformation.transform(b.min, s),\r\n\t\tmax = this.transformation.transform(b.max, s);\r\n\r\n\t\treturn new Bounds(min, max);\r\n\t}\r\n\r\n\t// @method distance(latlng1: LatLng, latlng2: LatLng): Number\r\n\t// Returns the distance between two geographical coordinates.\r\n\r\n\t// @property code: String\r\n\t// Standard code name of the CRS passed into WMS services (e.g. `'EPSG:3857'`)\r\n\t//\r\n\t// @property wrapLng: Number[]\r\n\t// An array of two numbers defining whether the longitude (horizontal) coordinate\r\n\t// axis wraps around a given range and how. Defaults to `[-180, 180]` in most\r\n\t// geographical CRSs. If `undefined`, the longitude axis does not wrap around.\r\n\t//\r\n\t// @property wrapLat: Number[]\r\n\t// Like `wrapLng`, but for the latitude (vertical) axis.\r\n\r\n\t// wrapLng: [min, max],\r\n\t// wrapLat: [min, max],\r\n\r\n\t// @property infinite: Boolean\r\n\t// If true, the coordinate space will be unbounded (infinite in both axes)\r\n\tstatic infinite = false;\r\n\r\n\t// @method wrapLatLng(latlng: LatLng): LatLng\r\n\t// Returns a `LatLng` where lat and lng has been wrapped according to the\r\n\t// CRS's `wrapLat` and `wrapLng` properties, if they are outside the CRS's bounds.\r\n\tstatic wrapLatLng(latlng) {\r\n\t\tlatlng = new LatLng(latlng);\r\n\t\tconst lng = this.wrapLng ? wrapNum(latlng.lng, this.wrapLng, true) : latlng.lng,\r\n\t\tlat = this.wrapLat ? wrapNum(latlng.lat, this.wrapLat, true) : latlng.lat,\r\n\t\talt = latlng.alt;\r\n\r\n\t\treturn new LatLng(lat, lng, alt);\r\n\t}\r\n\r\n\t// @method wrapLatLngBounds(bounds: LatLngBounds): LatLngBounds\r\n\t// Returns a `LatLngBounds` with the same size as the given one, ensuring\r\n\t// that its center is within the CRS's bounds.\r\n\tstatic wrapLatLngBounds(bounds) {\r\n\t\tbounds = new LatLngBounds(bounds);\r\n\t\tconst center = bounds.getCenter(),\r\n\t\tnewCenter = this.wrapLatLng(center),\r\n\t\tlatShift = center.lat - newCenter.lat,\r\n\t\tlngShift = center.lng - newCenter.lng;\r\n\r\n\t\tif (latShift === 0 && lngShift === 0) {\r\n\t\t\treturn bounds;\r\n\t\t}\r\n\r\n\t\tconst sw = bounds.getSouthWest(),\r\n\t\tne = bounds.getNorthEast(),\r\n\t\tnewSw = new LatLng(sw.lat - latShift, sw.lng - lngShift),\r\n\t\tnewNe = new LatLng(ne.lat - latShift, ne.lng - lngShift);\r\n\r\n\t\treturn new LatLngBounds(newSw, newNe);\r\n\t}\r\n}\n\n/*\n * @namespace CRS\n * @crs CRS.Earth\n *\n * Serves as the base for CRS that are global such that they cover the earth.\n * Can only be used as the base for other CRS and cannot be used directly,\n * since it does not have a `code`, `projection` or `transformation`. `distance()` returns\n * meters.\n */\n\nclass Earth extends CRS {\n\tstatic wrapLng = [-180, 180];\n\n\t// Mean Earth Radius, as recommended for use by\n\t// the International Union of Geodesy and Geophysics,\n\t// see https://rosettacode.org/wiki/Haversine_formula\n\tstatic R = 6371000;\n\n\t// distance between two geographical points using Haversine approximation\n\tstatic distance(latlng1, latlng2) {\n\t\tconst rad = Math.PI / 180,\n\t\tlat1 = latlng1.lat * rad,\n\t\tlat2 = latlng2.lat * rad,\n\t\tsinDLat = Math.sin((latlng2.lat - latlng1.lat) * rad / 2),\n\t\tsinDLon = Math.sin((latlng2.lng - latlng1.lng) * rad / 2),\n\t\ta = sinDLat * sinDLat + Math.cos(lat1) * Math.cos(lat2) * sinDLon * sinDLon,\n\t\tc = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n\t\treturn this.R * c;\n\t}\n}\n\n/*\r\n * @namespace Projection\r\n * @projection Projection.SphericalMercator\r\n *\r\n * Spherical Mercator projection — the most common projection for online maps,\r\n * used by almost all free and commercial tile providers. Assumes that Earth is\r\n * a sphere. Used by the `EPSG:3857` CRS.\r\n */\r\n\r\nconst earthRadius$1 = 6378137;\r\n\r\nconst SphericalMercator = {\r\n\r\n\tR: earthRadius$1,\r\n\tMAX_LATITUDE: 85.0511287798,\r\n\r\n\tproject(latlng) {\r\n\t\tlatlng = new LatLng(latlng);\r\n\t\tconst d = Math.PI / 180,\r\n\t\tmax = this.MAX_LATITUDE,\r\n\t\tlat = Math.max(Math.min(max, latlng.lat), -max),\r\n\t\tsin = Math.sin(lat * d);\r\n\r\n\t\treturn new Point(\r\n\t\t\tthis.R * latlng.lng * d,\r\n\t\t\tthis.R * Math.log((1 + sin) / (1 - sin)) / 2);\r\n\t},\r\n\r\n\tunproject(point) {\r\n\t\tpoint = new Point(point);\r\n\t\tconst d = 180 / Math.PI;\r\n\r\n\t\treturn new LatLng(\r\n\t\t\t(2 * Math.atan(Math.exp(point.y / this.R)) - (Math.PI / 2)) * d,\r\n\t\t\tpoint.x * d / this.R);\r\n\t},\r\n\r\n\tbounds: (() => {\r\n\t\tconst d = earthRadius$1 * Math.PI;\r\n\t\treturn new Bounds([-d, -d], [d, d]);\r\n\t})()\r\n};\n\n/*\r\n * @class Transformation\r\n *\r\n * Represents an affine transformation: a set of coefficients `a`, `b`, `c`, `d`\r\n * for transforming a point of a form `(x, y)` into `(a*x + b, c*y + d)` and doing\r\n * the reverse. Used by Leaflet in its projections code.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * const transformation = new Transformation(2, 5, -1, 10),\r\n * \tp = new Point(1, 2),\r\n * \tp2 = transformation.transform(p), // new Point(7, 8)\r\n * \tp3 = transformation.untransform(p2); // new Point(1, 2)\r\n * ```\r\n */\r\n\r\n// @constructor Transformation(a: Number, b: Number, c: Number, d: Number)\r\n// Instantiates a Transformation object with the given coefficients.\r\n\r\n// @alternative\r\n// @constructor Transformation(coefficients: Array): Transformation\r\n// Expects an coefficients array of the form\r\n// `[a: Number, b: Number, c: Number, d: Number]`.\r\nclass Transformation {\r\n\tconstructor(a, b, c, d) {\r\n\t\tif (Array.isArray(a)) {\r\n\t\t\t// use array properties\r\n\t\t\tthis._a = a[0];\r\n\t\t\tthis._b = a[1];\r\n\t\t\tthis._c = a[2];\r\n\t\t\tthis._d = a[3];\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._a = a;\r\n\t\tthis._b = b;\r\n\t\tthis._c = c;\r\n\t\tthis._d = d;\r\n\t}\r\n\r\n\t// @method transform(point: Point, scale?: Number): Point\r\n\t// Returns a transformed point, optionally multiplied by the given scale.\r\n\t// Only accepts actual `Point` instances, not arrays.\r\n\ttransform(point, scale) { // (Point, Number) -> Point\r\n\t\treturn this._transform(point.clone(), scale);\r\n\t}\r\n\r\n\t// destructive transform (faster)\r\n\t_transform(point, scale) {\r\n\t\tscale ||= 1;\r\n\t\tpoint.x = scale * (this._a * point.x + this._b);\r\n\t\tpoint.y = scale * (this._c * point.y + this._d);\r\n\t\treturn point;\r\n\t}\r\n\r\n\t// @method untransform(point: Point, scale?: Number): Point\r\n\t// Returns the reverse transformation of the given point, optionally divided\r\n\t// by the given scale. Only accepts actual `Point` instances, not arrays.\r\n\tuntransform(point, scale) {\r\n\t\tscale ||= 1;\r\n\t\treturn new Point(\r\n\t\t\t(point.x / scale - this._b) / this._a,\r\n\t\t\t(point.y / scale - this._d) / this._c);\r\n\t}\r\n}\n\n/*\r\n * @namespace CRS\r\n * @crs CRS.EPSG3857\r\n *\r\n * The most common CRS for online maps, used by almost all free and commercial\r\n * tile providers. Uses Spherical Mercator projection. Set in by default in\r\n * Map's `crs` option.\r\n */\r\n\r\nclass EPSG3857 extends Earth {\r\n\tstatic code = 'EPSG:3857';\r\n\tstatic projection = SphericalMercator;\r\n\r\n\tstatic transformation = (() => {\r\n\t\tconst scale = 0.5 / (Math.PI * SphericalMercator.R);\r\n\t\treturn new Transformation(scale, 0.5, -scale, 0.5);\r\n\t})();\r\n}\r\n\r\nclass EPSG900913 extends EPSG3857 {\r\n\tstatic code = 'EPSG:900913';\r\n}\n\n/*\r\n * @namespace Browser\r\n *\r\n * A namespace with static properties for browser/feature detection used by Leaflet internally.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * if (Browser.chrome) {\r\n * alert('You are running Chrome!');\r\n * }\r\n * ```\r\n */\r\n\r\n// @property chrome: Boolean; `true` for the Chrome browser.\r\nconst chrome = userAgentContains('chrome');\r\n\r\n// @property safari: Boolean; `true` for the Safari browser.\r\nconst safari = !chrome && userAgentContains('safari');\r\n\r\n// @property mobile: Boolean; `true` for all browsers running in a mobile device.\r\nconst mobile = typeof orientation !== 'undefined' || userAgentContains('mobile');\r\n\r\n// @property pointer: Boolean\r\n// `true` for all browsers supporting [pointer events](https://msdn.microsoft.com/en-us/library/dn433244%28v=vs.85%29.aspx).\r\nconst pointer = typeof window === 'undefined' ? false : !!window.PointerEvent;\r\n\r\n// @property touchNative: Boolean\r\n// `true` for all browsers supporting [touch events](https://developer.mozilla.org/docs/Web/API/Touch_events).\r\n// **This does not necessarily mean** that the browser is running in a computer with\r\n// a touchscreen, it only means that the browser is capable of understanding\r\n// touch events.\r\nconst touchNative = typeof window === 'undefined' ? false : 'ontouchstart' in window || !!(window.TouchEvent);\r\n\r\n// @property touch: Boolean\r\n// `true` for all browsers supporting either [touch](#browser-touch) or [pointer](#browser-pointer) events.\r\n// Note: pointer events will be preferred (if available), and processed for all `touch*` listeners.\r\nconst touch = touchNative || pointer;\r\n\r\n// @property retina: Boolean\r\n// `true` for browsers on a high-resolution \"retina\" screen or on any screen when browser's display zoom is more than 100%.\r\nconst retina = typeof window === 'undefined' || typeof window.devicePixelRatio === 'undefined' ? false : window.devicePixelRatio > 1;\r\n\r\n// @property mac: Boolean; `true` when the browser is running in a Mac platform\r\nconst mac = typeof navigator === 'undefined' || typeof navigator.platform === 'undefined' ? false : navigator.platform.startsWith('Mac');\r\n\r\n// @property linux: Boolean; `true` when the browser is running in a Linux platform\r\nconst linux = typeof navigator === 'undefined' || typeof navigator.platform === 'undefined' ? false : navigator.platform.startsWith('Linux');\r\n\r\nfunction userAgentContains(str) {\r\n\tif (typeof navigator === 'undefined' || typeof navigator.userAgent === 'undefined') {\r\n\t\treturn false;\r\n\t}\r\n\treturn navigator.userAgent.toLowerCase().includes(str);\r\n}\r\n\r\nvar Browser = {\r\n\tchrome,\r\n\tsafari,\r\n\tmobile,\r\n\tpointer,\r\n\ttouch,\r\n\ttouchNative,\r\n\tretina,\r\n\tmac,\r\n\tlinux\r\n};\n\n/*\r\n * Extends the event handling code with double tap support for mobile browsers.\r\n *\r\n * Note: currently most browsers fire native dblclick, with only a few exceptions\r\n * (see https://github.com/Leaflet/Leaflet/issues/7012#issuecomment-595087386)\r\n */\r\n\r\nfunction makeDblclick(ev) {\r\n\tlet init = {\r\n\t\t// EventInit\r\n\t\tbubbles: ev.bubbles,\r\n\t\tcancelable: ev.cancelable,\r\n\t\tcomposed: ev.composed,\r\n\r\n\t\t// UIEventInit\r\n\t\tdetail: 2,\r\n\t\tview: ev.view,\r\n\r\n\t\t// mouseEventInit\r\n\t\tscreenX: ev.screenX,\r\n\t\tscreenY: ev.screenY,\r\n\t\tclientX: ev.clientX,\r\n\t\tclientY: ev.clientY,\r\n\t\tctrlKey: ev.ctrlKey,\r\n\t\tshiftKey: ev.shiftKey,\r\n\t\taltKey: ev.altKey,\r\n\t\tmetaKey: ev.metaKey,\r\n\t\tbutton: ev.button,\r\n\t\tbuttons: ev.buttons,\r\n\t\trelatedTarget: ev.relatedTarget,\r\n\t\tregion: ev.region,\r\n\t};\r\n\r\n\tlet newEvent;\r\n\t// The `click` event received should be a PointerEvent - but some\r\n\t// Firefox versions still use MouseEvent.\r\n\tif (ev instanceof PointerEvent) {\r\n\t\tinit = {\r\n\t\t\t...init,\r\n\t\t\tpointerId: ev.pointerId,\r\n\t\t\twidth: ev.width,\r\n\t\t\theight: ev.height,\r\n\t\t\tpressure: ev.pressure,\r\n\t\t\ttangentialPressure: ev.tangentialPressure,\r\n\t\t\ttiltX: ev.tiltX,\r\n\t\t\ttiltY: ev.tiltY,\r\n\t\t\ttwist: ev.twist,\r\n\t\t\tpointerType: ev.pointerType,\r\n\t\t\tisPrimary: ev.isPrimary,\r\n\t\t};\r\n\t\tnewEvent = new PointerEvent('dblclick', init);\r\n\t} else {\r\n\t\tnewEvent = new MouseEvent('dblclick', init);\r\n\t}\r\n\treturn newEvent;\r\n}\r\n\r\nconst delay = 200;\r\nfunction addDoubleTapListener(obj, handler) {\r\n\t// Most browsers handle double tap natively\r\n\tobj.addEventListener('dblclick', handler);\r\n\r\n\t// On some platforms the browser doesn't fire native dblclicks for touch events.\r\n\t// It seems that in all such cases `detail` property of `click` event is always `1`.\r\n\t// So here we rely on that fact to avoid excessive 'dblclick' simulation when not needed.\r\n\tlet last = 0,\r\n\tdetail;\r\n\tfunction simDblclick(ev) {\r\n\t\tif (ev.detail !== 1) {\r\n\t\t\tdetail = ev.detail; // keep in sync to avoid false dblclick in some cases\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (ev.pointerType === 'mouse' ||\r\n\t\t\t(ev.sourceCapabilities && !ev.sourceCapabilities.firesTouchEvents)) {\r\n\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// When clicking on an <input>, the browser generates a click on its\r\n\t\t// <label> (and vice versa) triggering two clicks in quick succession.\r\n\t\t// This ignores clicks on elements which are a label with a 'for'\r\n\t\t// attribute (or children of such a label), but not children of\r\n\t\t// a <input>.\r\n\t\tconst path = getPropagationPath(ev);\r\n\t\tif (path.some(el => el instanceof HTMLLabelElement && el.attributes.for) &&\r\n\t\t\t!path.some(el => (\r\n\t\t\t\tel instanceof HTMLInputElement ||\r\n\t\t\t\t\tel instanceof HTMLSelectElement\r\n\t\t\t))\r\n\t\t) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst now = Date.now();\r\n\t\tif (now - last <= delay) {\r\n\t\t\tdetail++;\r\n\t\t\tif (detail === 2) {\r\n\t\t\t\tev.target.dispatchEvent(makeDblclick(ev));\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tdetail = 1;\r\n\t\t}\r\n\t\tlast = now;\r\n\t}\r\n\r\n\tobj.addEventListener('click', simDblclick);\r\n\r\n\treturn {\r\n\t\tdblclick: handler,\r\n\t\tsimDblclick\r\n\t};\r\n}\r\n\r\nfunction removeDoubleTapListener(obj, handlers) {\r\n\tobj.removeEventListener('dblclick', handlers.dblclick);\r\n\tobj.removeEventListener('click', handlers.simDblclick);\r\n}\n\n/*\r\n * @namespace DomUtil\r\n *\r\n * Utility functions to work with the [DOM](https://developer.mozilla.org/docs/Web/API/Document_Object_Model)\r\n * tree, used by Leaflet internally.\r\n *\r\n * Most functions expecting or returning a `HTMLElement` also work for\r\n * SVG elements. The only difference is that classes refer to CSS classes\r\n * in HTML and SVG classes in SVG.\r\n */\r\n\r\n// @function get(id: String|HTMLElement): HTMLElement\r\n// Returns an element given its DOM id, or returns the element itself\r\n// if it was passed directly.\r\nfunction get(id) {\r\n\treturn typeof id === 'string' ? document.getElementById(id) : id;\r\n}\r\n\r\n// @function create(tagName: String, className?: String, container?: HTMLElement): HTMLElement\r\n// Creates an HTML element with `tagName`, sets its class to `className`, and optionally appends it to `container` element.\r\nfunction create$1(tagName, className, container) {\r\n\tconst el = document.createElement(tagName);\r\n\tel.className = className ?? '';\r\n\r\n\tcontainer?.appendChild(el);\r\n\treturn el;\r\n}\r\n\r\n// @function toFront(el: HTMLElement)\r\n// Makes `el` the last child of its parent, so it renders in front of the other children.\r\nfunction toFront(el) {\r\n\tconst parent = el.parentNode;\r\n\tif (parent && parent.lastChild !== el) {\r\n\t\tparent.appendChild(el);\r\n\t}\r\n}\r\n\r\n// @function toBack(el: HTMLElement)\r\n// Makes `el` the first child of its parent, so it renders behind the other children.\r\nfunction toBack(el) {\r\n\tconst parent = el.parentNode;\r\n\tif (parent && parent.firstChild !== el) {\r\n\t\tparent.insertBefore(el, parent.firstChild);\r\n\t}\r\n}\r\n\r\n// @function setTransform(el: HTMLElement, offset: Point, scale?: Number)\r\n// Resets the 3D CSS transform of `el` so it is translated by `offset` pixels\r\n// and optionally scaled by `scale`. Does not have an effect if the\r\n// browser doesn't support 3D CSS transforms.\r\nfunction setTransform(el, offset, scale) {\r\n\tconst pos = offset ?? new Point(0, 0);\r\n\r\n\tel.style.transform = `translate3d(${pos.x}px,${pos.y}px,0)${scale ? ` scale(${scale})` : ''}`;\r\n}\r\n\r\nconst positions = new WeakMap();\r\n\r\n// @function setPosition(el: HTMLElement, position: Point)\r\n// Sets the position of `el` to coordinates specified by `position`,\r\n// using CSS translate or top/left positioning depending on the browser\r\n// (used by Leaflet internally to position its layers).\r\nfunction setPosition(el, point) {\r\n\tpositions.set(el, point);\r\n\tsetTransform(el, point);\r\n}\r\n\r\n// @function getPosition(el: HTMLElement): Point\r\n// Returns the coordinates of an element previously positioned with setPosition.\r\nfunction getPosition(el) {\r\n\t// this method is only used for elements previously positioned using setPosition,\r\n\t// so it's safe to cache the position for performance\r\n\treturn positions.get(el) ?? new Point(0, 0);\r\n}\r\n\r\nconst documentStyle = typeof document === 'undefined' ? {} : document.documentElement.style;\r\n// Safari still needs a vendor prefix, we need to detect with property name is supported.\r\nconst userSelectProp = ['userSelect', 'WebkitUserSelect'].find(prop => prop in documentStyle);\r\nlet prevUserSelect;\r\n\r\n// @function disableTextSelection()\r\n// Prevents the user from selecting text in the document. Used internally\r\n// by Leaflet to override the behaviour of any click-and-drag interaction on\r\n// the map. Affects drag interactions on the whole document.\r\nfunction disableTextSelection() {\r\n\tconst value = documentStyle[userSelectProp];\r\n\r\n\tif (value === 'none') {\r\n\t\treturn;\r\n\t}\r\n\r\n\tprevUserSelect = value;\r\n\tdocumentStyle[userSelectProp] = 'none';\r\n}\r\n\r\n// @function enableTextSelection()\r\n// Cancels the effects of a previous [`DomUtil.disableTextSelection`](#domutil-disabletextselection).\r\nfunction enableTextSelection() {\r\n\tif (typeof prevUserSelect === 'undefined') {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdocumentStyle[userSelectProp] = prevUserSelect;\r\n\tprevUserSelect = undefined;\r\n}\r\n\r\n// @function disableImageDrag()\r\n// Prevents the user from generating `dragstart` DOM events, usually generated when the user drags an image.\r\nfunction disableImageDrag() {\r\n\ton(window, 'dragstart', preventDefault);\r\n}\r\n\r\n// @function enableImageDrag()\r\n// Cancels the effects of a previous [`DomUtil.disableImageDrag`](#domutil-disableimagedrag).\r\nfunction enableImageDrag() {\r\n\toff(window, 'dragstart', preventDefault);\r\n}\r\n\r\nlet _outlineElement, _outlineStyle;\r\n// @function preventOutline(el: HTMLElement)\r\n// Makes the [outline](https://developer.mozilla.org/docs/Web/CSS/outline)\r\n// of the element `el` invisible. Used internally by Leaflet to prevent\r\n// focusable elements from displaying an outline when the user performs a\r\n// drag interaction on them.\r\nfunction preventOutline(element) {\r\n\twhile (element.tabIndex === -1) {\r\n\t\telement = element.parentNode;\r\n\t}\r\n\tif (!element.style) { return; }\r\n\trestoreOutline();\r\n\t_outlineElement = element;\r\n\t_outlineStyle = element.style.outlineStyle;\r\n\telement.style.outlineStyle = 'none';\r\n\ton(window, 'keydown', restoreOutline);\r\n}\r\n\r\n// @function restoreOutline()\r\n// Cancels the effects of a previous [`DomUtil.preventOutline`](#domutil-preventoutline).\r\nfunction restoreOutline() {\r\n\tif (!_outlineElement) { return; }\r\n\t_outlineElement.style.outlineStyle = _outlineStyle;\r\n\t_outlineElement = undefined;\r\n\t_outlineStyle = undefined;\r\n\toff(window, 'keydown', restoreOutline);\r\n}\r\n\r\n// @function getSizedParentNode(el: HTMLElement): HTMLElement\r\n// Finds the closest parent node which size (width and height) is not null.\r\nfunction getSizedParentNode(element) {\r\n\tdo {\r\n\t\telement = element.parentNode;\r\n\t} while ((!element.offsetWidth || !element.offsetHeight) && element !== document.body);\r\n\treturn element;\r\n}\r\n\r\n// @function getScale(el: HTMLElement): Object\r\n// Computes the CSS scale currently applied on the element.\r\n// Returns an object with `x` and `y` members as horizontal and vertical scales respectively,\r\n// and `boundingClientRect` as the result of [`getBoundingClientRect()`](https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect).\r\nfunction getScale(element) {\r\n\tconst rect = element.getBoundingClientRect(); // Read-only in old browsers.\r\n\r\n\treturn {\r\n\t\tx: rect.width / element.offsetWidth || 1,\r\n\t\ty: rect.height / element.offsetHeight || 1,\r\n\t\tboundingClientRect: rect\r\n\t};\r\n}\n\nvar DomUtil = {\n\t__proto__: null,\n\tcreate: create$1,\n\tdisableImageDrag: disableImageDrag,\n\tdisableTextSelection: disableTextSelection,\n\tenableImageDrag: enableImageDrag,\n\tenableTextSelection: enableTextSelection,\n\tget: get,\n\tgetPosition: getPosition,\n\tgetScale: getScale,\n\tgetSizedParentNode: getSizedParentNode,\n\tpreventOutline: preventOutline,\n\trestoreOutline: restoreOutline,\n\tsetPosition: setPosition,\n\tsetTransform: setTransform,\n\ttoBack: toBack,\n\ttoFront: toFront\n};\n\n/*\n/* @namespace DomEvent\n * @section Pointer detection\n * Detects the pointers that are currently active on the document.\n */\n\nlet activePointers = new Map();\nlet initialized = false;\n\n// @function enablePointerDetection()\n// Enables pointer detection for the document.\nfunction enablePointerDetection() {\n\tif (initialized) {\n\t\treturn;\n\t}\n\tinitialized = true;\n\tdocument.addEventListener('pointerdown', _onSet, {capture: true});\n\tdocument.addEventListener('pointermove', _onUpdate, {capture: true});\n\tdocument.addEventListener('pointerup', _onDelete, {capture: true});\n\tdocument.addEventListener('pointercancel', _onDelete, {capture: true});\n\tactivePointers = new Map();\n}\n\n// @function disablePointerDetection()\n// Disables pointer detection for the document.\nfunction disablePointerDetection() {\n\tdocument.removeEventListener('pointerdown', _onSet, {capture: true});\n\tdocument.removeEventListener('pointermove', _onUpdate, {capture: true});\n\tdocument.removeEventListener('pointerup', _onDelete, {capture: true});\n\tdocument.removeEventListener('pointercancel', _onDelete, {capture: true});\n\tinitialized = false;\n}\n\nfunction _onSet(e) {\n\tactivePointers.set(e.pointerId, e);\n}\n\nfunction _onUpdate(e) {\n\tif (activePointers.has(e.pointerId)) {\n\t\tactivePointers.set(e.pointerId, e);\n\t}\n}\n\nfunction _onDelete(e) {\n\tactivePointers.delete(e.pointerId);\n}\n\n// @function getPointers(): PointerEvent[]\n// Returns the active pointers on the document.\nfunction getPointers() {\n\treturn [...activePointers.values()];\n}\n\n// @function cleanupPointers()\n// Clears the detected pointers on the document.\n// Note: This function should be not necessary to call, as the pointers are automatically cleared with `pointerup`, `pointercancel` and `pointerout` events.\nfunction cleanupPointers() {\n\tactivePointers.clear();\n}\n\nvar DomEvent_PointerEvents = {\n\t__proto__: null,\n\tcleanupPointers: cleanupPointers,\n\tdisablePointerDetection: disablePointerDetection,\n\tenablePointerDetection: enablePointerDetection,\n\tgetPointers: getPointers\n};\n\n/*\r\n * @namespace DomEvent\r\n * Utility functions to work with the [DOM events](https://developer.mozilla.org/docs/Web/API/Event), used by Leaflet internally.\r\n */\r\n\r\n// Inspired by John Resig, Dean Edwards and YUI addEvent implementations.\r\n\r\n// @function on(el: HTMLElement, types: String, fn: Function, context?: Object): this\r\n// Adds a listener function (`fn`) to a particular DOM event type of the\r\n// element `el`. You can optionally specify the context of the listener\r\n// (object the `this` keyword will point to). You can also pass several\r\n// space-separated types (e.g. `'click dblclick'`).\r\n\r\n// @alternative\r\n// @function on(el: HTMLElement, eventMap: Object, context?: Object): this\r\n// Adds a set of type/listener pairs, e.g. `{click: onClick, pointermove: onPointerMove}`\r\nfunction on(obj, types, fn, context) {\r\n\r\n\tif (types && typeof types === 'object') {\r\n\t\tfor (const [type, listener] of Object.entries(types)) {\r\n\t\t\taddOne(obj, type, listener, fn);\r\n\t\t}\r\n\t} else {\r\n\t\tfor (const type of splitWords(types)) {\r\n\t\t\taddOne(obj, type, fn, context);\r\n\t\t}\r\n\t}\r\n\r\n\treturn this;\r\n}\r\n\r\nconst eventsKey = '_leaflet_events';\r\n\r\n// @function off(el: HTMLElement, types: String, fn: Function, context?: Object): this\r\n// Removes a previously added listener function.\r\n// Note that if you passed a custom context to on, you must pass the same\r\n// context to `off` in order to remove the listener.\r\n\r\n// @alternative\r\n// @function off(el: HTMLElement, eventMap: Object, context?: Object): this\r\n// Removes a set of type/listener pairs, e.g. `{click: onClick, pointermove: onPointerMove}`\r\n\r\n// @alternative\r\n// @function off(el: HTMLElement, types: String): this\r\n// Removes all previously added listeners of given types.\r\n\r\n// @alternative\r\n// @function off(el: HTMLElement): this\r\n// Removes all previously added listeners from given HTMLElement\r\nfunction off(obj, types, fn, context) {\r\n\r\n\tif (arguments.length === 1) {\r\n\t\tbatchRemove(obj);\r\n\t\tdelete obj[eventsKey];\r\n\r\n\t} else if (types && typeof types === 'object') {\r\n\t\tfor (const [type, listener] of Object.entries(types)) {\r\n\t\t\tremoveOne(obj, type, listener, fn);\r\n\t\t}\r\n\r\n\t} else {\r\n\t\ttypes = splitWords(types);\r\n\r\n\t\tif (arguments.length === 2) {\r\n\t\t\tbatchRemove(obj, type => types.includes(type));\r\n\t\t} else {\r\n\t\t\tfor (const type of types) {\r\n\t\t\t\tremoveOne(obj, type, fn, context);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn this;\r\n}\r\n\r\nfunction batchRemove(obj, filterFn) {\r\n\tfor (const id of Object.keys(obj[eventsKey] ?? {})) {\r\n\t\tconst type = id.split(/\\d/)[0];\r\n\t\tif (!filterFn || filterFn(type)) {\r\n\t\t\tremoveOne(obj, type, null, null, id);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nconst pointerSubst = {\r\n\tpointerenter: 'pointerover',\r\n\tpointerleave: 'pointerout',\r\n\twheel: typeof window === 'undefined' ? false : !('onwheel' in window) && 'mousewheel'\r\n};\r\n\r\nfunction addOne(obj, type, fn, context) {\r\n\tconst id = type + stamp(fn) + (context ? `_${stamp(context)}` : '');\r\n\r\n\tif (obj[eventsKey] && obj[eventsKey][id]) { return this; }\r\n\r\n\tlet handler = function (e) {\r\n\t\treturn fn.call(context || obj, e || window.event);\r\n\t};\r\n\r\n\tconst originalHandler = handler;\r\n\r\n\tif (Browser.touch && (type === 'dblclick')) {\r\n\t\thandler = addDoubleTapListener(obj, handler);\r\n\r\n\t} else if ('addEventListener' in obj) {\r\n\r\n\t\tif (type === 'wheel' || type === 'mousewheel') {\r\n\t\t\tobj.addEventListener(pointerSubst[type] || type, handler, {passive: false});\r\n\t\t} else if (type === 'pointerenter' || type === 'pointerleave') {\r\n\t\t\thandler = function (e) {\r\n\t\t\t\te ??= window.event;\r\n\t\t\t\tif (isExternalTarget(obj, e)) {\r\n\t\t\t\t\toriginalHandler(e);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\tobj.addEventListener(pointerSubst[type], handler, false);\r\n\r\n\t\t} else {\r\n\t\t\tobj.addEventListener(type, originalHandler, false);\r\n\t\t}\r\n\r\n\t} else {\r\n\t\tobj.attachEvent(`on${type}`, handler);\r\n\t}\r\n\r\n\tobj[eventsKey] ??= {};\r\n\tobj[eventsKey][id] = handler;\r\n}\r\n\r\nfunction removeOne(obj, type, fn, context, id) {\r\n\tid ??= type + stamp(fn) + (context ? `_${stamp(context)}` : '');\r\n\tconst handler = obj[eventsKey] && obj[eventsKey][id];\r\n\r\n\tif (!handler) { return this; }\r\n\r\n\tif (Browser.touch && (type === 'dblclick')) {\r\n\t\tremoveDoubleTapListener(obj, handler);\r\n\r\n\t} else if ('removeEventListener' in obj) {\r\n\r\n\t\tobj.removeEventListener(pointerSubst[type] || type, handler, false);\r\n\r\n\t} else {\r\n\t\tobj.detachEvent(`on${type}`, handler);\r\n\t}\r\n\r\n\tobj[eventsKey][id] = null;\r\n}\r\n\r\n// @function stopPropagation(ev: DOMEvent): this\r\n// Stop the given event from propagation to parent elements. Used inside the listener functions:\r\n// ```js\r\n// DomEvent.on(div, 'click', DomEvent.stopPropagation);\r\n// ```\r\nfunction stopPropagation(e) {\r\n\r\n\tif (e.stopPropagation) {\r\n\t\te.stopPropagation();\r\n\t} else if (e.originalEvent) { // In case of Leaflet event.\r\n\t\te.originalEvent._stopped = true;\r\n\t} else {\r\n\t\te.cancelBubble = true;\r\n\t}\r\n\r\n\treturn this;\r\n}\r\n\r\n// @function disableScrollPropagation(el: HTMLElement): this\r\n// Adds `stopPropagation` to the element's `'wheel'` events (plus browser variants).\r\nfunction disableScrollPropagation(el) {\r\n\taddOne(el, 'wheel', stopPropagation);\r\n\treturn this;\r\n}\r\n\r\n// @function disableClickPropagation(el: HTMLElement): this\r\n// Adds `stopPropagation` to the element's `'click'`, `'dblclick'`, `'contextmenu'`\r\n// and `'pointerdown'` events (plus browser variants).\r\nfunction disableClickPropagation(el) {\r\n\ton(el, 'pointerdown dblclick contextmenu', stopPropagation);\r\n\tel['_leaflet_disable_click'] = true;\r\n\treturn this;\r\n}\r\n\r\n// @function preventDefault(ev: DOMEvent): this\r\n// Prevents the default action of the DOM Event `ev` from happening (such as\r\n// following a link in the href of the a element, or doing a POST request\r\n// with page reload when a `<form>` is submitted).\r\n// Use it inside listener functions.\r\nfunction preventDefault(e) {\r\n\tif (e.preventDefault) {\r\n\t\te.preventDefault();\r\n\t} else {\r\n\t\te.returnValue = false;\r\n\t}\r\n\treturn this;\r\n}\r\n\r\n// @function stop(ev: DOMEvent): this\r\n// Does `stopPropagation` and `preventDefault` at the same time.\r\nfunction stop(e) {\r\n\tpreventDefault(e);\r\n\tstopPropagation(e);\r\n\treturn this;\r\n}\r\n\r\n// @function getPropagationPath(ev: DOMEvent): Array\r\n// Returns an array containing the `HTMLElement`s that the given DOM event\r\n// should propagate to (if not stopped).\r\nfunction getPropagationPath(ev) {\r\n\treturn ev.composedPath();\r\n}\r\n\r\n\r\n// @function getPointerPosition(ev: DOMEvent, container?: HTMLElement): Point\r\n// Gets normalized pointer position from a DOM event relative to the\r\n// `container` (border excluded) or to the whole page if not specified.\r\nfunction getPointerPosition(e, container) {\r\n\tif (!container) {\r\n\t\treturn new Point(e.clientX, e.clientY);\r\n\t}\r\n\r\n\tconst scale = getScale(container),\r\n\toffset = scale.boundingClientRect; // left and top values are in page scale (like the event clientX/Y)\r\n\r\n\treturn new Point(\r\n\t\t// offset.left/top values are in page scale (like clientX/Y),\r\n\t\t// whereas clientLeft/Top (border width) values are the original values (before CSS scale applies).\r\n\t\t(e.clientX - offset.left) / scale.x - container.clientLeft,\r\n\t\t(e.clientY - offset.top) / scale.y - container.clientTop\r\n\t);\r\n}\r\n\r\n// @function getWheelPxFactor(): Number\r\n// Gets the wheel pixel factor based on the devicePixelRatio\r\nfunction getWheelPxFactor() {\r\n\t// We need double the scroll pixels (see #7403 and #4538) for all Browsers\r\n\t// except OSX (Mac) -> 3x, Chrome running on Linux 1x\r\n\tconst ratio = window.devicePixelRatio;\r\n\treturn Browser.linux && Browser.chrome ? ratio :\r\n\t\tBrowser.mac ? ratio * 3 :\r\n\t\tratio > 0 ? 2 * ratio : 1;\r\n}\r\n\r\n// @function getWheelDelta(ev: DOMEvent): Number\r\n// Gets normalized wheel delta from a wheel DOM event, in vertical\r\n// pixels scrolled (negative if scrolling down).\r\n// Events from pointing devices without precise scrolling are mapped to\r\n// a best guess of 60 pixels.\r\nfunction getWheelDelta(e) {\r\n\treturn (e.deltaY && e.deltaMode === 0) ? -e.deltaY / getWheelPxFactor() : // Pixels\r\n\t\t(e.deltaY && e.deltaMode === 1) ? -e.deltaY * 20 : // Lines\r\n\t\t(e.deltaY && e.deltaMode === 2) ? -e.deltaY * 60 : // Pages\r\n\t\t(e.deltaX || e.deltaZ) ? 0 :\t// Skip horizontal/depth wheel events\r\n\t\t0;\r\n}\r\n\r\n// check if element really left/entered the event target (for pointerenter/pointerleave)\r\nfunction isExternalTarget(el, e) {\r\n\r\n\tlet related = e.relatedTarget;\r\n\r\n\tif (!related) { return true; }\r\n\r\n\ttry {\r\n\t\twhile (related && (related !== el)) {\r\n\t\t\trelated = related.parentNode;\r\n\t\t}\r\n\t} catch (err) {\r\n\t\treturn false;\r\n\t}\r\n\treturn (related !== el);\r\n}\n\nvar DomEvent = {\n\t__proto__: null,\n\tPointerEvents: DomEvent_PointerEvents,\n\tdisableClickPropagation: disableClickPropagation,\n\tdisableScrollPropagation: disableScrollPropagation,\n\tgetPointerPosition: getPointerPosition,\n\tgetPropagationPath: getPropagationPath,\n\tgetWheelDelta: getWheelDelta,\n\tgetWheelPxFactor: getWheelPxFactor,\n\tisExternalTarget: isExternalTarget,\n\toff: off,\n\ton: on,\n\tpreventDefault: preventDefault,\n\tstop: stop,\n\tstopPropagation: stopPropagation\n};\n\n/*\n * @class PosAnimation\n * @inherits Evented\n * Used internally for panning animations and utilizing CSS Transitions for modern browsers.\n *\n * @example\n * ```js\n * const myPositionMarker = new Marker([48.864716, 2.294694]).addTo(map);\n *\n * myPositionMarker.on(\"click\", function() {\n * \tconst pos = map.latLngToLayerPoint(myPositionMarker.getLatLng());\n * \tpos.y -= 25;\n * \tconst fx = new PosAnimation();\n *\n * \tfx.once('end',function() {\n * \t\tpos.y += 25;\n * \t\tfx.run(myPositionMarker._icon, pos, 0.8);\n * \t});\n *\n * \tfx.run(myPositionMarker._icon, pos, 0.3);\n * });\n *\n * ```\n *\n * @constructor PosAnimation()\n * Creates a `PosAnimation` object.\n *\n */\n\nclass PosAnimation extends Evented {\n\n\t// @method run(el: HTMLElement, newPos: Point, duration?: Number, easeLinearity?: Number)\n\t// Run an animation of a given element to a new position, optionally setting\n\t// duration in seconds (`0.25` by default) and easing linearity factor (3rd\n\t// argument of the [cubic bezier curve](https://cubic-bezier.com/#0,0,.5,1),\n\t// `0.5` by default).\n\trun(el, newPos, duration, easeLinearity) {\n\t\tthis.stop();\n\n\t\tthis._el = el;\n\t\tthis._inProgress = true;\n\t\tthis._duration = duration ?? 0.25;\n\t\tthis._easeOutPower = 1 / Math.max(easeLinearity ?? 0.5, 0.2);\n\n\t\tthis._startPos = getPosition(el);\n\t\tthis._offset = newPos.subtract(this._startPos);\n\t\tthis._startTime = +new Date();\n\n\t\t// @event start: Event\n\t\t// Fired when the animation starts\n\t\tthis.fire('start');\n\n\t\tthis._animate();\n\t}\n\n\t// @method stop()\n\t// Stops the animation (if currently running).\n\tstop() {\n\t\tif (!this._inProgress) { return; }\n\n\t\tthis._step(true);\n\t\tthis._complete();\n\t}\n\n\t_animate() {\n\t\t// animation loop\n\t\tthis._animId = requestAnimationFrame(this._animate.bind(this));\n\t\tthis._step();\n\t}\n\n\t_step(round) {\n\t\tconst elapsed = (+new Date()) - this._startTime,\n\t\tduration = this._duration * 1000;\n\n\t\tif (elapsed < duration) {\n\t\t\tthis._runFrame(this._easeOut(elapsed / duration), round);\n\t\t} else {\n\t\t\tthis._runFrame(1);\n\t\t\tthis._complete();\n\t\t}\n\t}\n\n\t_runFrame(progress, round) {\n\t\tconst pos = this._startPos.add(this._offset.multiplyBy(progress));\n\t\tif (round) {\n\t\t\tpos._round();\n\t\t}\n\t\tsetPosition(this._el, pos);\n\n\t\t// @event step: Event\n\t\t// Fired continuously during the animation.\n\t\tthis.fire('step');\n\t}\n\n\t_complete() {\n\t\tcancelAnimationFrame(this._animId);\n\n\t\tthis._inProgress = false;\n\t\t// @event end: Event\n\t\t// Fired when the animation ends.\n\t\tthis.fire('end');\n\t}\n\n\t_easeOut(t) {\n\t\treturn 1 - (1 - t) ** this._easeOutPower;\n\t}\n}\n\n/*\r\n * @class Map\r\n * @inherits Evented\r\n *\r\n * The central class of the API — it is used to create a map on a page and manipulate it.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * // initialize the map on the \"map\" div with a given center and zoom\r\n * const map = new Map('map', {\r\n * \tcenter: [51.505, -0.09],\r\n * \tzoom: 13\r\n * });\r\n * ```\r\n *\r\n */\r\n\r\n// @section\r\n// @constructor Map(id: String, options?: Map options)\r\n// Instantiates a map object given the DOM ID of a `<div>` element\r\n// and optionally an object literal with `Map options`.\r\n//\r\n// @alternative\r\n// @constructor Map(el: HTMLElement, options?: Map options)\r\n// Instantiates a map object given an instance of a `<div>` HTML element\r\n// and optionally an object literal with `Map options`.\r\n//\r\n// @alternative\r\n// @constructor LeafletMap(id: String, options?: LeafletMap options)\r\n// Instantiates a map object given the DOM ID of a `<div>` element\r\n// and optionally an object literal with `LeafletMap options`.\r\n//\r\n// @alternative\r\n// @constructor LeafletMap(el: HTMLElement, options?: LeafletMap options)\r\n// Instantiates a map object given an instance of a `<div>` HTML element\r\n// and optionally an object literal with `LeafletMap options`.\r\nlet Map$1 = class Map extends Evented {\r\n\r\n\tstatic {\r\n\t\tthis.setDefaultOptions({\r\n\t\t\t// @section Map State Options\r\n\t\t\t// @option crs: CRS = CRS.EPSG3857\r\n\t\t\t// The [Coordinate Reference System](#crs) to use. Don't change this if you're not\r\n\t\t\t// sure what it means.\r\n\t\t\tcrs: EPSG3857,\r\n\r\n\t\t\t// @option center: LatLng = undefined\r\n\t\t\t// Initial geographic center of the map\r\n\t\t\tcenter: undefined,\r\n\r\n\t\t\t// @option zoom: Number = undefined\r\n\t\t\t// Initial map zoom level\r\n\t\t\tzoom: undefined,\r\n\r\n\t\t\t// @option minZoom: Number = *\r\n\t\t\t// Minimum zoom level of the map.\r\n\t\t\t// If not specified and at least one `GridLayer` or `TileLayer` is in the map,\r\n\t\t\t// the lowest of their `minZoom` options will be used instead.\r\n\t\t\tminZoom: undefined,\r\n\r\n\t\t\t// @option maxZoom: Number = *\r\n\t\t\t// Maximum zoom level of the map.\r\n\t\t\t// If not specified and at least one `GridLayer` or `TileLayer` is in the map,\r\n\t\t\t// the highest of their `maxZoom` options will be used instead.\r\n\t\t\tmaxZoom: undefined,\r\n\r\n\t\t\t// @option layers: Layer[] = []\r\n\t\t\t// Array of layers that will be added to the map initially\r\n\t\t\tlayers: [],\r\n\r\n\t\t\t// @option maxBounds: LatLngBounds = null\r\n\t\t\t// When this option is set, the map restricts the view to the given\r\n\t\t\t// geographical bounds, bouncing the user back if the user tries to pan\r\n\t\t\t// outside the view. To set the restriction dynamically, use\r\n\t\t\t// [`setMaxBounds`](#map-setmaxbounds) method.\r\n\t\t\tmaxBounds: undefined,\r\n\r\n\t\t\t// @option renderer: Renderer = *\r\n\t\t\t// The default method for drawing vector layers on the map. `SVG`\r\n\t\t\t// or `Canvas` by default depending on browser support.\r\n\t\t\trenderer: undefined,\r\n\r\n\r\n\t\t\t// @section Animation Options\r\n\t\t\t// @option zoomAnimation: Boolean = true\r\n\t\t\t// Whether the map zoom animation is enabled. By default it's enabled\r\n\t\t\t// in all browsers that support CSS Transitions except Android.\r\n\t\t\tzoomAnimation: true,\r\n\r\n\t\t\t// @option zoomAnimationThreshold: Number = 4\r\n\t\t\t// Won't animate zoom if the zoom difference exceeds this value.\r\n\t\t\tzoomAnimationThreshold: 4,\r\n\r\n\t\t\t// @option fadeAnimation: Boolean = true\r\n\t\t\t// Whether the tile fade animation is enabled. By default it's enabled\r\n\t\t\t// in all browsers that support CSS Transitions except Android.\r\n\t\t\tfadeAnimation: true,\r\n\r\n\t\t\t// @option markerZoomAnimation: Boolean = true\r\n\t\t\t// Whether markers animate their zoom with the zoom animation, if disabled\r\n\t\t\t// they will disappear for the length of the animation. By default it's\r\n\t\t\t// enabled in all browsers that support CSS Transitions except Android.\r\n\t\t\tmarkerZoomAnimation: true,\r\n\r\n\t\t\t// @option transform3DLimit: Number = 2^23\r\n\t\t\t// Defines the maximum size of a CSS translation transform. The default\r\n\t\t\t// value should not be changed unless a web browser positions layers in\r\n\t\t\t// the wrong place after doing a large `panBy`.\r\n\t\t\ttransform3DLimit: 8388608, // Precision limit of a 32-bit float\r\n\r\n\t\t\t// @section Interaction Options\r\n\t\t\t// @option zoomSnap: Number = 1\r\n\t\t\t// Forces the map's zoom level to always be a multiple of this, particularly\r\n\t\t\t// right after a [`fitBounds()`](#map-fitbounds) or a pinch-zoom.\r\n\t\t\t// By default, the zoom level snaps to the nearest integer; lower values\r\n\t\t\t// (e.g. `0.5` or `0.1`) allow for greater granularity. A value of `0`\r\n\t\t\t// means the zoom level will not be snapped after `fitBounds` or a pinch-zoom.\r\n\t\t\tzoomSnap: 1,\r\n\r\n\t\t\t// @option zoomDelta: Number = 1\r\n\t\t\t// Controls how much the map's zoom level will change after a\r\n\t\t\t// [`zoomIn()`](#map-zoomin), [`zoomOut()`](#map-zoomout), pressing `+`\r\n\t\t\t// or `-` on the keyboard, or using the [zoom controls](#control-zoom).\r\n\t\t\t// Values smaller than `1` (e.g. `0.5`) allow for greater granularity.\r\n\t\t\tzoomDelta: 1,\r\n\r\n\t\t\t// @option trackResize: Boolean = true\r\n\t\t\t// Whether the map automatically handles browser window resize to update itself.\r\n\t\t\ttrackResize: true\r\n\t\t});\r\n\t}\r\n\r\n\tinitialize(id, options) { // (HTMLElement or String, Object)\r\n\t\toptions = setOptions(this, options);\r\n\r\n\t\t// Make sure to assign internal flags at the beginning,\r\n\t\t// to avoid inconsistent state in some edge cases.\r\n\t\tthis._handlers = [];\r\n\t\tthis._layers = {};\r\n\t\tthis._zoomBoundLayers = {};\r\n\t\tthis._sizeChanged = true;\r\n\r\n\t\tthis._initContainer(id);\r\n\t\tthis._initLayout();\r\n\r\n\t\tthis._initEvents();\r\n\r\n\t\tif (options.maxBounds) {\r\n\t\t\tthis.setMaxBounds(options.maxBounds);\r\n\t\t}\r\n\r\n\t\tif (options.zoom !== undefined) {\r\n\t\t\tthis._zoom = this._limitZoom(options.zoom);\r\n\t\t}\r\n\r\n\t\tif (options.center && options.zoom !== undefined) {\r\n\t\t\tthis.setView(new LatLng(options.center), options.zoom, {reset: true});\r\n\t\t}\r\n\r\n\t\tthis.callInitHooks();\r\n\r\n\t\t// don't animate on browsers without hardware-accelerated transitions or old Android\r\n\t\tthis._zoomAnimated = this.options.zoomAnimation;\r\n\r\n\t\t// zoom transitions run with the same duration for all layers, so if one of transitionend events\r\n\t\t// happens after starting zoom animation (propagating to the map pane), we know that it ended globally\r\n\t\tif (this._zoomAnimated) {\r\n\t\t\tthis._createAnimProxy();\r\n\t\t}\r\n\r\n\t\tthis._addLayers(this.options.layers);\r\n\t}\r\n\r\n\t// @section Methods for modifying map state\r\n\r\n\t// @method setView(center: LatLng, zoom?: Number, options?: Zoom/pan options): this\r\n\t// Sets the view of the map (geographical center and zoom) with the given\r\n\t// animation options.\r\n\tsetView(center, zoom, options) {\r\n\r\n\t\tzoom = zoom === undefined ? this._zoom : this._limitZoom(zoom);\r\n\t\tcenter = this._limitCenter(new LatLng(center), zoom, this.options.maxBounds);\r\n\t\toptions ??= {};\r\n\r\n\t\tthis._stop();\r\n\r\n\t\tif (this._loaded && !options.reset && options !== true) {\r\n\r\n\t\t\tif (options.animate !== undefined) {\r\n\t\t\t\toptions.zoom = {animate: options.animate, ...options.zoom};\r\n\t\t\t\toptions.pan = {animate: options.animate, duration: options.duration, ...options.pan};\r\n\t\t\t}\r\n\r\n\t\t\t// try animating pan or zoom\r\n\t\t\tconst moved = (this._zoom !== zoom) ?\r\n\t\t\t\tthis._tryAnimatedZoom && this._tryAnimatedZoom(center, zoom, options.zoom) :\r\n\t\t\t\tthis._tryAnimatedPan(center, options.pan);\r\n\r\n\t\t\tif (moved) {\r\n\t\t\t\t// prevent resize handler call, the view will refresh after animation anyway\r\n\t\t\t\tclearTimeout(this._sizeTimer);\r\n\t\t\t\treturn this;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// animation didn't start, just reset the map view\r\n\t\tthis._resetView(center, zoom, options.pan?.noMoveStart);\r\n\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method setZoom(zoom: Number, options?: Zoom/pan options): this\r\n\t// Sets the zoom of the map.\r\n\tsetZoom(zoom, options) {\r\n\t\tif (!this._loaded) {\r\n\t\t\tthis._zoom = zoom;\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\treturn this.setView(this.getCenter(), zoom, {zoom: options});\r\n\t}\r\n\r\n\t// @method zoomIn(delta?: Number, options?: Zoom options): this\r\n\t// Increases the zoom of the map by `delta` ([`zoomDelta`](#map-zoomdelta) by default).\r\n\tzoomIn(delta, options) {\r\n\t\tdelta ??= this.options.zoomDelta;\r\n\t\treturn this.setZoom(this._zoom + delta, options);\r\n\t}\r\n\r\n\t// @method zoomOut(delta?: Number, options?: Zoom options): this\r\n\t// Decreases the zoom of the map by `delta` ([`zoomDelta`](#map-zoomdelta) by default).\r\n\tzoomOut(delta, options) {\r\n\t\tdelta ??= this.options.zoomDelta;\r\n\t\treturn this.setZoom(this._zoom - delta, options);\r\n\t}\r\n\r\n\t// @method setZoomAround(latlng: LatLng, zoom: Number, options: Zoom options): this\r\n\t// Zooms the map while keeping a specified geographical point on the map\r\n\t// stationary (e.g. used internally for scroll zoom and double-click zoom).\r\n\t// @alternative\r\n\t// @method setZoomAround(offset: Point, zoom: Number, options: Zoom options): this\r\n\t// Zooms the map while keeping a specified pixel on the map (relative to the top-left corner) stationary.\r\n\tsetZoomAround(latlng, zoom, options) {\r\n\t\tconst scale = this.getZoomScale(zoom),\r\n\t\tviewHalf = this.getSize().divideBy(2),\r\n\t\tcontainerPoint = latlng instanceof Point ? latlng : this.latLngToContainerPoint(latlng),\r\n\r\n\t\tcenterOffset = containerPoint.subtract(viewHalf).multiplyBy(1 - 1 / scale),\r\n\t\tnewCenter = this.containerPointToLatLng(viewHalf.add(centerOffset));\r\n\r\n\t\treturn this.setView(newCenter, zoom, {zoom: options});\r\n\t}\r\n\r\n\t_getBoundsCenterZoom(bounds, options) {\r\n\r\n\t\toptions ??= {};\r\n\t\tbounds = bounds.getBounds ? bounds.getBounds() : new LatLngBounds(bounds);\r\n\r\n\t\tconst paddingTL = new Point(options.paddingTopLeft || options.padding || [0, 0]),\r\n\t\tpaddingBR = new Point(options.paddingBottomRight || options.padding || [0, 0]);\r\n\r\n\t\tlet zoom = this.getBoundsZoom(bounds, false, paddingTL.add(paddingBR));\r\n\r\n\t\tzoom = (typeof options.maxZoom === 'number') ? Math.min(options.maxZoom, zoom) : zoom;\r\n\r\n\t\tif (zoom === Infinity) {\r\n\t\t\treturn {\r\n\t\t\t\tcenter: bounds.getCenter(),\r\n\t\t\t\tzoom\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tconst paddingOffset = paddingBR.subtract(paddingTL).divideBy(2),\r\n\r\n\t\tswPoint = this.project(bounds.getSouthWest(), zoom),\r\n\t\tnePoint = this.project(bounds.getNorthEast(), zoom),\r\n\t\tcenter = this.unproject(swPoint.add(nePoint).divideBy(2).add(paddingOffset), zoom);\r\n\r\n\t\treturn {\r\n\t\t\tcenter,\r\n\t\t\tzoom\r\n\t\t};\r\n\t}\r\n\r\n\t// @method fitBounds(bounds: LatLngBounds, options?: fitBounds options): this\r\n\t// Sets a map view that contains the given geographical bounds with the\r\n\t// maximum zoom level possible.\r\n\tfitBounds(bounds, options) {\r\n\r\n\t\tbounds = new LatLngBounds(bounds);\r\n\r\n\t\tif (!bounds.isValid()) {\r\n\t\t\tthrow new Error('Bounds are not valid.');\r\n\t\t}\r\n\r\n\t\tconst target = this._getBoundsCenterZoom(bounds, options);\r\n\t\treturn this.setView(target.center, target.zoom, options);\r\n\t}\r\n\r\n\t// @method fitWorld(options?: fitBounds options): this\r\n\t// Sets a map view that mostly contains the whole world with the maximum\r\n\t// zoom level possible.\r\n\tfitWorld(options) {\r\n\t\treturn this.fitBounds([[-90, -180], [90, 180]], options);\r\n\t}\r\n\r\n\t// @method panTo(latlng: LatLng, options?: Pan options): this\r\n\t// Pans the map to a given center.\r\n\tpanTo(center, options) {\r\n\t\treturn this.setView(center, this._zoom, {pan: options});\r\n\t}\r\n\r\n\t// @method panBy(offset: Point, options?: Pan options): this\r\n\t// Pans the map by a given number of pixels (animated).\r\n\tpanBy(offset, options) {\r\n\t\toffset = new Point(offset).round();\r\n\t\toptions ??= {};\r\n\r\n\t\tif (!offset.x && !offset.y) {\r\n\t\t\treturn this.fire('moveend');\r\n\t\t}\r\n\t\t// If we pan too far, Chrome gets issues with tiles\r\n\t\t// and makes them disappear or appear in the wrong place (slightly offset) #2602\r\n\t\tif (options.animate !== true && !this.getSize().contains(offset)) {\r\n\t\t\tthis._resetView(this.unproject(this.project(this.getCenter()).add(offset)), this.getZoom());\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tif (!this._panAnim) {\r\n\t\t\tthis._panAnim = new PosAnimation();\r\n\r\n\t\t\tthis._panAnim.on({\r\n\t\t\t\t'step': this._onPanTransitionStep,\r\n\t\t\t\t'end': this._onPanTransitionEnd\r\n\t\t\t}, this);\r\n\t\t}\r\n\r\n\t\t// don't fire movestart if animating inertia\r\n\t\tif (!options.noMoveStart) {\r\n\t\t\tthis.fire('movestart');\r\n\t\t}\r\n\r\n\t\t// animate pan unless animate: false specified\r\n\t\tif (options.animate !== false) {\r\n\t\t\tthis._mapPane.classList.add('leaflet-pan-anim');\r\n\r\n\t\t\tconst newPos = this._getMapPanePos().subtract(offset).round();\r\n\t\t\tthis._panAnim.run(this._mapPane, newPos, options.duration || 0.25, options.easeLinearity);\r\n\t\t} else {\r\n\t\t\tthis._rawPanBy(offset);\r\n\t\t\tthis.fire('move').fire('moveend');\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method flyTo(latlng: LatLng, zoom?: Number, options?: Zoom/pan options): this\r\n\t// Sets the view of the map (geographical center and zoom) performing a smooth\r\n\t// pan-zoom animation.\r\n\tflyTo(targetCenter, targetZoom, options) {\r\n\r\n\t\toptions ??= {};\r\n\t\tif (options.animate === false) {\r\n\t\t\treturn this.setView(targetCenter, targetZoom, options);\r\n\t\t}\r\n\r\n\t\tthis._stop();\r\n\r\n\t\tconst from = this.project(this.getCenter()),\r\n\t\tto = this.project(targetCenter),\r\n\t\tsize = this.getSize(),\r\n\t\tstartZoom = this._zoom;\r\n\r\n\t\ttargetCenter = new LatLng(targetCenter);\r\n\t\ttargetZoom = targetZoom === undefined ? startZoom : this._limitZoom(targetZoom);\r\n\r\n\t\tconst w0 = Math.max(size.x, size.y),\r\n\t\tw1 = w0 * this.getZoomScale(startZoom, targetZoom),\r\n\t\tu1 = (to.distanceTo(from)) || 1,\r\n\t\trho = 1.42,\r\n\t\trho2 = rho * rho;\r\n\r\n\t\tfunction r(i) {\r\n\t\t\tconst s1 = i ? -1 : 1,\r\n\t\t\ts2 = i ? w1 : w0,\r\n\t\t\tt1 = w1 * w1 - w0 * w0 + s1 * rho2 * rho2 * u1 * u1,\r\n\t\t\tb1 = 2 * s2 * rho2 * u1,\r\n\t\t\tb = t1 / b1,\r\n\t\t\tsq = Math.sqrt(b * b + 1) - b;\r\n\r\n\t\t\t// workaround for floating point precision bug when sq = 0, log = -Infinite,\r\n\t\t\t// thus triggering an infinite loop in flyTo\r\n\t\t\tconst log = sq < 0.000000001 ? -18 : Math.log(sq);\r\n\r\n\t\t\treturn log;\r\n\t\t}\r\n\r\n\t\tfunction sinh(n) { return (Math.exp(n) - Math.exp(-n)) / 2; }\r\n\t\tfunction cosh(n) { return (Math.exp(n) + Math.exp(-n)) / 2; }\r\n\t\tfunction tanh(n) { return sinh(n) / cosh(n); }\r\n\r\n\t\tconst r0 = r(0);\r\n\r\n\t\tfunction w(s) { return w0 * (cosh(r0) / cosh(r0 + rho * s)); }\r\n\t\tfunction u(s) { return w0 * (cosh(r0) * tanh(r0 + rho * s) - sinh(r0)) / rho2; }\r\n\r\n\t\tfunction easeOut(t) { return 1 - (1 - t) ** 1.5; }\r\n\r\n\t\tconst start = Date.now(),\r\n\t\tS = (r(1) - r0) / rho,\r\n\t\tduration = options.duration ? 1000 * options.duration : 1000 * S * 0.8;\r\n\r\n\t\tconst frame = () => {\r\n\t\t\tconst t = (Date.now() - start) / duration,\r\n\t\t\ts = easeOut(t) * S;\r\n\r\n\t\t\tif (t <= 1) {\r\n\t\t\t\tthis._flyToFrame = requestAnimationFrame(frame);\r\n\r\n\t\t\t\tthis._move(\r\n\t\t\t\t\tthis.unproject(from.add(to.subtract(from).multiplyBy(u(s) / u1)), startZoom),\r\n\t\t\t\t\tthis.getScaleZoom(w0 / w(s), startZoom),\r\n\t\t\t\t\t{flyTo: true});\r\n\r\n\t\t\t} else {\r\n\t\t\t\tthis\r\n\t\t\t\t\t._move(targetCenter, targetZoom)\r\n\t\t\t\t\t._moveEnd(true);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis._moveStart(true, options.noMoveStart);\r\n\r\n\t\tframe();\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method flyToBounds(bounds: LatLngBounds, options?: fitBounds options): this\r\n\t// Sets the view of the map with a smooth animation like [`flyTo`](#map-flyto),\r\n\t// but takes a bounds parameter like [`fitBounds`](#map-fitbounds).\r\n\tflyToBounds(bounds, options) {\r\n\t\tconst target = this._getBoundsCenterZoom(bounds, options);\r\n\t\treturn this.flyTo(target.center, target.zoom, options);\r\n\t}\r\n\r\n\t// @method setMaxBounds(bounds: LatLngBounds): this\r\n\t// Restricts the map view to the given bounds (see the [maxBounds](#map-maxbounds) option).\r\n\tsetMaxBounds(bounds) {\r\n\t\tbounds = new LatLngBounds(bounds);\r\n\r\n\t\tif (this.listens('moveend', this._panInsideMaxBounds)) {\r\n\t\t\tthis.off('moveend', this._panInsideMaxBounds);\r\n\t\t}\r\n\r\n\t\tif (!bounds.isValid()) {\r\n\t\t\tthis.options.maxBounds = null;\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tthis.options.maxBounds = bounds;\r\n\r\n\t\tif (this._loaded) {\r\n\t\t\tthis._panInsideMaxBounds();\r\n\t\t}\r\n\r\n\t\treturn this.on('moveend', this._panInsideMaxBounds);\r\n\t}\r\n\r\n\t// @method setMinZoom(zoom: Number): this\r\n\t// Sets the lower limit for the available zoom levels (see the [minZoom](#map-minzoom) option).\r\n\tsetMinZoom(zoom) {\r\n\t\tconst oldZoom = this.options.minZoom;\r\n\t\tthis.options.minZoom = zoom;\r\n\r\n\t\tif (this._loaded && oldZoom !== zoom) {\r\n\t\t\tthis.fire('zoomlevelschange');\r\n\r\n\t\t\tif (this.getZoom() < this.options.minZoom) {\r\n\t\t\t\treturn this.setZoom(zoom);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method setMaxZoom(zoom: Number): this\r\n\t// Sets the upper limit for the available zoom levels (see the [maxZoom](#map-maxzoom) option).\r\n\tsetMaxZoom(zoom) {\r\n\t\tconst oldZoom = this.options.maxZoom;\r\n\t\tthis.options.maxZoom = zoom;\r\n\r\n\t\tif (this._loaded && oldZoom !== zoom) {\r\n\t\t\tthis.fire('zoomlevelschange');\r\n\r\n\t\t\tif (this.getZoom() > this.options.maxZoom) {\r\n\t\t\t\treturn this.setZoom(zoom);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method panInsideBounds(bounds: LatLngBounds, options?: Pan options): this\r\n\t// Pans the map to the closest view that would lie inside the given bounds (if it's not already), controlling the animation using the options specific, if any.\r\n\tpanInsideBounds(bounds, options) {\r\n\t\tthis._enforcingBounds = true;\r\n\t\tconst center = this.getCenter(),\r\n\t\tnewCenter = this._limitCenter(center, this._zoom, new LatLngBounds(bounds));\r\n\r\n\t\tif (!center.equals(newCenter)) {\r\n\t\t\tthis.panTo(newCenter, options);\r\n\t\t}\r\n\r\n\t\tthis._enforcingBounds = false;\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method panInside(latlng: LatLng, options?: padding options): this\r\n\t// Pans the map the minimum amount to make the `latlng` visible. Use\r\n\t// padding options to fit the display to more restricted bounds.\r\n\t// If `latlng` is already within the (optionally padded) display bounds,\r\n\t// the map will not be panned.\r\n\tpanInside(latlng, options) {\r\n\t\toptions ??= {};\r\n\r\n\t\tconst paddingTL = new Point(options.paddingTopLeft || options.padding || [0, 0]),\r\n\t\tpaddingBR = new Point(options.paddingBottomRight || options.padding || [0, 0]),\r\n\t\tpixelCenter = this.project(this.getCenter()),\r\n\t\tpixelPoint = this.project(latlng),\r\n\t\tpixelBounds = this.getPixelBounds(),\r\n\t\tpaddedBounds = new Bounds([pixelBounds.min.add(paddingTL), pixelBounds.max.subtract(paddingBR)]),\r\n\t\tpaddedSize = paddedBounds.getSize();\r\n\r\n\t\tif (!paddedBounds.contains(pixelPoint)) {\r\n\t\t\tthis._enforcingBounds = true;\r\n\t\t\tconst centerOffset = pixelPoint.subtract(paddedBounds.getCenter());\r\n\t\t\tconst offset = paddedBounds.extend(pixelPoint).getSize().subtract(paddedSize);\r\n\t\t\tpixelCenter.x += centerOffset.x < 0 ? -offset.x : offset.x;\r\n\t\t\tpixelCenter.y += centerOffset.y < 0 ? -offset.y : offset.y;\r\n\t\t\tthis.panTo(this.unproject(pixelCenter), options);\r\n\t\t\tthis._enforcingBounds = false;\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method invalidateSize(options: invalidateSize options): this\r\n\t// Checks if the map container size changed and updates the map if so —\r\n\t// call it after you've changed the map size dynamically, also animating\r\n\t// pan by default. If `options.pan` is `false`, panning will not occur.\r\n\t// If `options.debounceMoveend` is `true`, it will delay `moveend` event so\r\n\t// that it doesn't happen often even if the method is called many\r\n\t// times in a row.\r\n\r\n\t// @alternative\r\n\t// @method invalidateSize(animate: Boolean): this\r\n\t// Checks if the map container size changed and updates the map if so —\r\n\t// call it after you've changed the map size dynamically, also animating\r\n\t// pan by default.\r\n\tinvalidateSize(options) {\r\n\t\tif (!this._loaded) { return this; }\r\n\r\n\t\toptions = {\r\n\t\t\tanimate: false,\r\n\t\t\tpan: true,\r\n\t\t\t...(options === true ? {animate: true} : options)\r\n\t\t};\r\n\r\n\t\tconst oldSize = this.getSize();\r\n\t\tthis._sizeChanged = true;\r\n\t\tthis._lastCenter = null;\r\n\r\n\t\tconst newSize = this.getSize(),\r\n\t\toldCenter = oldSize.divideBy(2).round(),\r\n\t\tnewCenter = newSize.divideBy(2).round(),\r\n\t\toffset = oldCenter.subtract(newCenter);\r\n\r\n\t\tif (!offset.x && !offset.y) { return this; }\r\n\r\n\t\tif (options.animate && options.pan) {\r\n\t\t\tthis.panBy(offset);\r\n\r\n\t\t} else {\r\n\t\t\tif (options.pan) {\r\n\t\t\t\tthis._rawPanBy(offset);\r\n\t\t\t}\r\n\r\n\t\t\tthis.fire('move');\r\n\r\n\t\t\tif (options.debounceMoveend) {\r\n\t\t\t\tclearTimeout(this._sizeTimer);\r\n\t\t\t\tthis._sizeTimer = setTimeout(this.fire.bind(this, 'moveend'), 200);\r\n\t\t\t} else {\r\n\t\t\t\tthis.fire('moveend');\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// @section Map state change events\r\n\t\t// @event resize: ResizeEvent\r\n\t\t// Fired when the map is resized.\r\n\t\treturn this.fire('resize', {\r\n\t\t\toldSize,\r\n\t\t\tnewSize\r\n\t\t});\r\n\t}\r\n\r\n\t// @section Methods for modifying map state\r\n\t// @method stop(): this\r\n\t// Stops the currently running `panTo` or `flyTo` animation, if any.\r\n\tstop() {\r\n\t\tthis.setZoom(this._limitZoom(this._zoom));\r\n\t\tif (!this.options.zoomSnap) {\r\n\t\t\tthis.fire('viewreset');\r\n\t\t}\r\n\t\treturn this._stop();\r\n\t}\r\n\r\n\t// @section Geolocation methods\r\n\t// @method locate(options?: Locate options): this\r\n\t// Tries to locate the user using the Geolocation API, firing a [`locationfound`](#map-locationfound)\r\n\t// event with location data on success or a [`locationerror`](#map-locationerror) event on failure,\r\n\t// and optionally sets the map view to the user's location with respect to\r\n\t// detection accuracy (or to the world view if geolocation failed).\r\n\t// Note that, if your page doesn't use HTTPS, this method will fail in\r\n\t// modern browsers ([Chrome 50 and newer](https://sites.google.com/a/chromium.org/dev/Home/chromium-security/deprecating-powerful-features-on-insecure-origins))\r\n\t// See `Locate options` for more details.\r\n\tlocate(options) {\r\n\r\n\t\toptions = this._locateOptions = {\r\n\t\t\ttimeout: 10000,\r\n\t\t\twatch: false,\r\n\t\t\t// setView: false\r\n\t\t\t// maxZoom: <Number>\r\n\t\t\t// maximumAge: 0\r\n\t\t\t// enableHighAccuracy: false\r\n\t\t\t...options\r\n\t\t};\r\n\r\n\t\tif (!('geolocation' in navigator)) {\r\n\t\t\tthis._handleGeolocationError({\r\n\t\t\t\tcode: 0,\r\n\t\t\t\tmessage: 'Geolocation not supported.'\r\n\t\t\t});\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tconst onResponse = this._handleGeolocationResponse.bind(this),\r\n\t\tonError = this._handleGeolocationError.bind(this);\r\n\r\n\t\tif (options.watch) {\r\n\t\t\tif (this._locationWatchId !== undefined) {\r\n\t\t\t\tnavigator.geolocation.clearWatch(this._locationWatchId);\r\n\t\t\t}\r\n\t\t\tthis._locationWatchId =\r\n\t\t\t navigator.geolocation.watchPosition(onResponse, onError, options);\r\n\t\t} else {\r\n\t\t\tnavigator.geolocation.getCurrentPosition(onResponse, onError, options);\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method stopLocate(): this\r\n\t// Stops watching location previously initiated by `map.locate({watch: true})`\r\n\t// and aborts resetting the map view if map.locate was called with\r\n\t// `{setView: true}`.\r\n\tstopLocate() {\r\n\t\tnavigator.geolocation?.clearWatch?.(this._locationWatchId);\r\n\t\tif (this._locateOptions) {\r\n\t\t\tthis._locateOptions.setView = false;\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n\r\n\t_handleGeolocationError(error) {\r\n\t\tif (!this._container._leaflet_id) { return; }\r\n\r\n\t\tconst c = error.code,\r\n\t\tmessage = error.message ||\r\n\t\t (c === 1 ? 'permission denied' :\r\n\t\t (c === 2 ? 'position unavailable' : 'timeout'));\r\n\r\n\t\tif (this._locateOptions.setView && !this._loaded) {\r\n\t\t\tthis.fitWorld();\r\n\t\t}\r\n\r\n\t\t// @section Location events\r\n\t\t// @event locationerror: ErrorEvent\r\n\t\t// Fired when geolocation (using the [`locate`](#map-locate) method) failed.\r\n\t\tthis.fire('locationerror', {\r\n\t\t\tcode: c,\r\n\t\t\tmessage: `Geolocation error: ${message}.`\r\n\t\t});\r\n\t}\r\n\r\n\t_handleGeolocationResponse(pos) {\r\n\t\tif (!this._container._leaflet_id) { return; }\r\n\r\n\t\tconst lat = pos.coords.latitude,\r\n\t\tlng = pos.coords.longitude,\r\n\t\tlatlng = new LatLng(lat, lng),\r\n\t\tbounds = latlng.toBounds(pos.coords.accuracy * 2),\r\n\t\toptions = this._locateOptions;\r\n\r\n\t\tif (options.setView) {\r\n\t\t\tconst zoom = this.getBoundsZoom(bounds);\r\n\t\t\tthis.setView(latlng, options.maxZoom ? Math.min(zoom, options.maxZoom) : zoom);\r\n\t\t}\r\n\r\n\t\tconst data = {\r\n\t\t\tlatlng,\r\n\t\t\tbounds,\r\n\t\t\ttimestamp: pos.timestamp\r\n\t\t};\r\n\r\n\t\tfor (const i in pos.coords) { // do not use Object.keys here to access getters of GeolocationCoordinates\r\n\t\t\tif (typeof pos.coords[i] === 'number') {\r\n\t\t\t\tdata[i] = pos.coords[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// @event locationfound: LocationEvent\r\n\t\t// Fired when geolocation (using the [`locate`](#map-locate) method)\r\n\t\t// went successfully.\r\n\t\tthis.fire('locationfound', data);\r\n\t}\r\n\r\n\t// TODO Appropriate docs section?\r\n\t// @section Other Methods\r\n\t// @method addHandler(name: String, HandlerClass: Function): this\r\n\t// Adds a new `Handler` to the map, given its name and constructor function.\r\n\taddHandler(name, HandlerClass) {\r\n\t\tif (!HandlerClass) { return this; }\r\n\r\n\t\tconst handler = this[name] = new HandlerClass(this);\r\n\r\n\t\tthis._handlers.push(handler);\r\n\r\n\t\tif (this.options[name]) {\r\n\t\t\thandler.enable();\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method remove(): this\r\n\t// Destroys the map and clears all related event listeners.\r\n\tremove() {\r\n\r\n\t\tthis._initEvents(true);\r\n\t\tif (this.options.maxBounds) { this.off('moveend', this._panInsideMaxBounds); }\r\n\r\n\t\tif (this._containerId !== this._container._leaflet_id) {\r\n\t\t\tthrow new Error('Map container is being reused by another instance');\r\n\t\t}\r\n\r\n\t\tdelete this._container._leaflet_id;\r\n\t\tdelete this._containerId;\r\n\r\n\t\tif (this._locationWatchId !== undefined) {\r\n\t\t\tthis.stopLocate();\r\n\t\t}\r\n\r\n\t\tthis._stop();\r\n\r\n\t\tthis._mapPane.remove();\r\n\r\n\t\tif (this._clearControlPos) {\r\n\t\t\tthis._clearControlPos();\r\n\t\t}\r\n\t\tif (this._resizeRequest) {\r\n\t\t\tcancelAnimationFrame(this._resizeRequest);\r\n\t\t\tthis._resizeRequest = null;\r\n\t\t}\r\n\r\n\t\tthis._clearHandlers();\r\n\r\n\t\tclearTimeout(this._transitionEndTimer);\r\n\t\tclearTimeout(this._sizeTimer);\r\n\r\n\t\tif (this._loaded) {\r\n\t\t\t// @section Map state change events\r\n\t\t\t// @event unload: Event\r\n\t\t\t// Fired when the map is destroyed with [remove](#map-remove) method.\r\n\t\t\tthis.fire('unload');\r\n\t\t}\r\n\r\n\t\tthis._destroyAnimProxy();\r\n\r\n\t\tfor (const layer of Object.values(this._layers)) {\r\n\t\t\tlayer.remove();\r\n\t\t}\r\n\t\tfor (const pane of Object.values(this._panes)) {\r\n\t\t\tpane.remove();\r\n\t\t}\r\n\r\n\t\tthis._layers = {};\r\n\t\tthis._panes = {};\r\n\t\tdelete this._mapPane;\r\n\t\tdelete this._renderer;\r\n\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @section Other Methods\r\n\t// @method createPane(name: String, container?: HTMLElement): HTMLElement\r\n\t// Creates a new [map pane](#map-pane) with the given name if it doesn't exist already,\r\n\t// then returns it. The pane is created as a child of `container`, or\r\n\t// as a child of the main map pane if not set.\r\n\tcreatePane(name, container) {\r\n\t\tconst className = `leaflet-pane${name ? ` leaflet-${name.replace('Pane', '')}-pane` : ''}`,\r\n\t\tpane = create$1('div', className, container || this._mapPane);\r\n\r\n\t\tif (name) {\r\n\t\t\tthis._panes[name] = pane;\r\n\t\t}\r\n\t\treturn pane;\r\n\t}\r\n\r\n\t// @section Methods for Getting Map State\r\n\r\n\t// @method getCenter(): LatLng\r\n\t// Returns the geographical center of the map view\r\n\tgetCenter() {\r\n\t\tthis._checkIfLoaded();\r\n\r\n\t\tif (this._lastCenter && !this._moved()) {\r\n\t\t\treturn this._lastCenter.clone();\r\n\t\t}\r\n\t\treturn this.layerPointToLatLng(this._getCenterLayerPoint());\r\n\t}\r\n\r\n\t// @method getZoom(): Number\r\n\t// Returns the current zoom level of the map view\r\n\tgetZoom() {\r\n\t\treturn this._zoom;\r\n\t}\r\n\r\n\t// @method getBounds(): LatLngBounds\r\n\t// Returns the geographical bounds visible in the current map view\r\n\tgetBounds() {\r\n\t\tconst bounds = this.getPixelBounds(),\r\n\t\tsw = this.unproject(bounds.getBottomLeft()),\r\n\t\tne = this.unproject(bounds.getTopRight());\r\n\r\n\t\treturn new LatLngBounds(sw, ne);\r\n\t}\r\n\r\n\t// @method getMinZoom(): Number\r\n\t// Returns the minimum zoom level of the map (if set in the `minZoom` option of the map or of any layers), or `0` by default.\r\n\tgetMinZoom() {\r\n\t\treturn this.options.minZoom ?? this._layersMinZoom ?? 0;\r\n\t}\r\n\r\n\t// @method getMaxZoom(): Number\r\n\t// Returns the maximum zoom level of the map (if set in the `maxZoom` option of the map or of any layers).\r\n\tgetMaxZoom() {\r\n\t\treturn this.options.maxZoom ?? this._layersMaxZoom ?? Infinity;\r\n\t}\r\n\r\n\t// @method getBoundsZoom(bounds: LatLngBounds, inside?: Boolean, padding?: Point): Number\r\n\t// Returns the maximum zoom level on which the given bounds fit to the map\r\n\t// view in its entirety. If `inside` (optional) is set to `true`, the method\r\n\t// instead returns the minimum zoom level on which the map view fits into\r\n\t// the given bounds in its entirety.\r\n\tgetBoundsZoom(bounds, inside, padding) { // (LatLngBounds[, Boolean, Point]) -> Number\r\n\t\tbounds = new LatLngBounds(bounds);\r\n\t\tpadding = new Point(padding ?? [0, 0]);\r\n\r\n\t\tlet zoom = this.getZoom() ?? 0;\r\n\t\tconst min = this.getMinZoom(),\r\n\t\tmax = this.getMaxZoom(),\r\n\t\tnw = bounds.getNorthWest(),\r\n\t\tse = bounds.getSouthEast(),\r\n\t\tsize = this.getSize().subtract(padding),\r\n\t\tboundsSize = new Bounds(this.project(se, zoom), this.project(nw, zoom)).getSize(),\r\n\t\tsnap = this.options.zoomSnap,\r\n\t\tscalex = size.x / boundsSize.x,\r\n\t\tscaley = size.y / boundsSize.y,\r\n\t\tscale = inside ? Math.max(scalex, scaley) : Math.min(scalex, scaley);\r\n\r\n\t\tzoom = this.getScaleZoom(scale, zoom);\r\n\r\n\t\tif (snap) {\r\n\t\t\tzoom = Math.round(zoom / (snap / 100)) * (snap / 100); // don't jump if within 1% of a snap level\r\n\t\t\tzoom = inside ? Math.ceil(zoom / snap) * snap : Math.floor(zoom / snap) * snap;\r\n\t\t}\r\n\r\n\t\treturn Math.max(min, Math.min(max, zoom));\r\n\t}\r\n\r\n\t// @method getSize(): Point\r\n\t// Returns the current size of the map container (in pixels).\r\n\tgetSize() {\r\n\t\tif (!this._size || this._sizeChanged) {\r\n\t\t\tthis._size = new Point(\r\n\t\t\t\tthis._container.clientWidth || 0,\r\n\t\t\t\tthis._container.clientHeight || 0);\r\n\r\n\t\t\tthis._sizeChanged = false;\r\n\t\t}\r\n\t\treturn this._size.clone();\r\n\t}\r\n\r\n\t// @method getPixelBounds(center?: LatLng, zoom?: Number): Bounds\r\n\t// Returns the bounds of the current map view in projected pixel\r\n\t// coordinates (sometimes useful in layer and overlay implementations).\r\n\t// If `center` and `zoom` is omitted, the map's current zoom level and center is used.\r\n\tgetPixelBounds(center, zoom) {\r\n\t\tconst topLeftPoint = this._getTopLeftPoint(center, zoom);\r\n\t\treturn new Bounds(topLeftPoint, topLeftPoint.add(this.getSize()));\r\n\t}\r\n\r\n\t// TODO: Check semantics - isn't the pixel origin the 0,0 coord relative to\r\n\t// the map pane? \"left point of the map layer\" can be confusing, specially\r\n\t// since there can be negative offsets.\r\n\t// @method getPixelOrigin(): Point\r\n\t// Returns the projected pixel coordinates of the top left point of\r\n\t// the map layer (useful in custom layer and overlay implementations).\r\n\tgetPixelOrigin() {\r\n\t\tthis._checkIfLoaded();\r\n\t\treturn this._pixelOrigin;\r\n\t}\r\n\r\n\t// @method getPixelWorldBounds(zoom?: Number): Bounds\r\n\t// Returns the world's bounds in pixel coordinates for zoom level `zoom`.\r\n\t// If `zoom` is omitted, the map's current zoom level is used.\r\n\tgetPixelWorldBounds(zoom) {\r\n\t\treturn this.options.crs.getProjectedBounds(zoom ?? this.getZoom());\r\n\t}\r\n\r\n\t// @section Other Methods\r\n\r\n\t// @method getPane(pane: String|HTMLElement): HTMLElement\r\n\t// Returns a [map pane](#map-pane), given its name or its HTML element (its identity).\r\n\tgetPane(pane) {\r\n\t\treturn typeof pane === 'string' ? this._panes[pane] : pane;\r\n\t}\r\n\r\n\t// @method getPanes(): Object\r\n\t// Returns a plain object containing the names of all [panes](#map-pane) as keys and\r\n\t// the panes as values.\r\n\tgetPanes() {\r\n\t\treturn this._panes;\r\n\t}\r\n\r\n\t// @method getContainer: HTMLElement\r\n\t// Returns the HTML element that contains the map.\r\n\tgetContainer() {\r\n\t\treturn this._container;\r\n\t}\r\n\r\n\r\n\t// @section Conversion Methods\r\n\r\n\t// @method getZoomScale(toZoom: Number, fromZoom?: Number): Number\r\n\t// Returns the scale factor to be applied to a map transition from zoom level\r\n\t// `fromZoom` to `toZoom`. Used internally to help with zoom animations.\r\n\tgetZoomScale(toZoom, fromZoom) {\r\n\t\t// TODO replace with universal implementation after refactoring projections\r\n\t\tconst crs = this.options.crs;\r\n\t\tfromZoom ??= this._zoom;\r\n\t\treturn crs.scale(toZoom) / crs.scale(fromZoom);\r\n\t}\r\n\r\n\t// @method getScaleZoom(scale: Number, fromZoom?: Number): Number\r\n\t// Returns the zoom level that the map would end up at, if it is at `fromZoom`\r\n\t// level and everything is scaled by a factor of `scale`. Inverse of\r\n\t// [`getZoomScale`](#map-getZoomScale).\r\n\tgetScaleZoom(scale, fromZoom) {\r\n\t\tconst crs = this.options.crs;\r\n\t\tfromZoom ??= this._zoom;\r\n\t\tconst zoom = crs.zoom(scale * crs.scale(fromZoom));\r\n\t\treturn isNaN(zoom) ? Infinity : zoom;\r\n\t}\r\n\r\n\t// @method project(latlng: LatLng, zoom?: Number): Point\r\n\t// Projects a geographical coordinate `LatLng` according to the projection\r\n\t// of the map's CRS, then scales it according to `zoom` and the CRS's\r\n\t// `Transformation`. The result is pixel coordinate relative to\r\n\t// the CRS origin.\r\n\tproject(latlng, zoom) {\r\n\t\tzoom ??= this._zoom;\r\n\t\treturn this.options.crs.latLngToPoint(new LatLng(latlng), zoom);\r\n\t}\r\n\r\n\t// @method unproject(point: Point, zoom?: Number): LatLng\r\n\t// Inverse of [`project`](#map-project).\r\n\tunproject(point, zoom) {\r\n\t\tzoom ??= this._zoom;\r\n\t\treturn this.options.crs.pointToLatLng(new Point(point), zoom);\r\n\t}\r\n\r\n\t// @method layerPointToLatLng(point: Point): LatLng\r\n\t// Given a pixel coordinate relative to the [origin pixel](#map-getpixelorigin),\r\n\t// returns the corresponding geographical coordinate (for the current zoom level).\r\n\tlayerPointToLatLng(point) {\r\n\t\tconst projectedPoint = new Point(point).add(this.getPixelOrigin());\r\n\t\treturn this.unproject(projectedPoint);\r\n\t}\r\n\r\n\t// @method latLngToLayerPoint(latlng: LatLng): Point\r\n\t// Given a geographical coordinate, returns the corresponding pixel coordinate\r\n\t// relative to the [origin pixel](#map-getpixelorigin).\r\n\tlatLngToLayerPoint(latlng) {\r\n\t\tconst projectedPoint = this.project(new LatLng(latlng))._round();\r\n\t\treturn projectedPoint._subtract(this.getPixelOrigin());\r\n\t}\r\n\r\n\t// @method wrapLatLng(latlng: LatLng): LatLng\r\n\t// Returns a `LatLng` where `lat` and `lng` has been wrapped according to the\r\n\t// map's CRS's `wrapLat` and `wrapLng` properties, if they are outside the\r\n\t// CRS's bounds.\r\n\t// By default this means longitude is wrapped around the dateline so its\r\n\t// value is between -180 and +180 degrees.\r\n\twrapLatLng(latlng) {\r\n\t\treturn this.options.crs.wrapLatLng(new LatLng(latlng));\r\n\t}\r\n\r\n\t// @method wrapLatLngBounds(bounds: LatLngBounds): LatLngBounds\r\n\t// Returns a `LatLngBounds` with the same size as the given one, ensuring that\r\n\t// its center is within the CRS's bounds.\r\n\t// By default this means the center longitude is wrapped around the dateline so its\r\n\t// value is between -180 and +180 degrees, and the majority of the bounds\r\n\t// overlaps the CRS's bounds.\r\n\twrapLatLngBounds(bounds) {\r\n\t\treturn this.options.crs.wrapLatLngBounds(new LatLngBounds(bounds));\r\n\t}\r\n\r\n\t// @method distance(latlng1: LatLng, latlng2: LatLng): Number\r\n\t// Returns the distance between two geographical coordinates according to\r\n\t// the map's CRS. By default this measures distance in meters.\r\n\tdistance(latlng1, latlng2) {\r\n\t\treturn this.options.crs.distance(new LatLng(latlng1), new LatLng(latlng2));\r\n\t}\r\n\r\n\t// @method containerPointToLayerPoint(point: Point): Point\r\n\t// Given a pixel coordinate relative to the map container, returns the corresponding\r\n\t// pixel coordinate relative to the [origin pixel](#map-getpixelorigin).\r\n\tcontainerPointToLayerPoint(point) { // (Point)\r\n\t\treturn new Point(point).subtract(this._getMapPanePos());\r\n\t}\r\n\r\n\t// @method layerPointToContainerPoint(point: Point): Point\r\n\t// Given a pixel coordinate relative to the [origin pixel](#map-getpixelorigin),\r\n\t// returns the corresponding pixel coordinate relative to the map container.\r\n\tlayerPointToContainerPoint(point) { // (Point)\r\n\t\treturn new Point(point).add(this._getMapPanePos());\r\n\t}\r\n\r\n\t// @method containerPointToLatLng(point: Point): LatLng\r\n\t// Given a pixel coordinate relative to the map container, returns\r\n\t// the corresponding geographical coordinate (for the current zoom level).\r\n\tcontainerPointToLatLng(point) {\r\n\t\tconst layerPoint = this.containerPointToLayerPoint(new Point(point));\r\n\t\treturn this.layerPointToLatLng(layerPoint);\r\n\t}\r\n\r\n\t// @method latLngToContainerPoint(latlng: LatLng): Point\r\n\t// Given a geographical coordinate, returns the corresponding pixel coordinate\r\n\t// relative to the map container.\r\n\tlatLngToContainerPoint(latlng) {\r\n\t\treturn this.layerPointToContainerPoint(this.latLngToLayerPoint(new LatLng(latlng)));\r\n\t}\r\n\r\n\t// @method pointerEventToContainerPoint(ev: PointerEvent): Point\r\n\t// Given a PointerEvent object, returns the pixel coordinate relative to the\r\n\t// map container where the event took place.\r\n\tpointerEventToContainerPoint(e) {\r\n\t\treturn getPointerPosition(e, this._container);\r\n\t}\r\n\r\n\t// @method pointerEventToLayerPoint(ev: PointerEvent): Point\r\n\t// Given a PointerEvent object, returns the pixel coordinate relative to\r\n\t// the [origin pixel](#map-getpixelorigin) where the event took place.\r\n\tpointerEventToLayerPoint(e) {\r\n\t\treturn this.containerPointToLayerPoint(this.pointerEventToContainerPoint(e));\r\n\t}\r\n\r\n\t// @method pointerEventToLayerPoint(ev: PointerEvent): LatLng\r\n\t// Given a PointerEvent object, returns geographical coordinate where the\r\n\t// event took place.\r\n\tpointerEventToLatLng(e) { // (PointerEvent)\r\n\t\treturn this.layerPointToLatLng(this.pointerEventToLayerPoint(e));\r\n\t}\r\n\r\n\r\n\t// map initialization methods\r\n\r\n\t_initContainer(id) {\r\n\t\tconst container = this._container = get(id);\r\n\r\n\t\tif (!container) {\r\n\t\t\tthrow new Error('Map container not found.');\r\n\t\t} else if (container._leaflet_id) {\r\n\t\t\tthrow new Error('Map container is already initialized.');\r\n\t\t}\r\n\r\n\t\ton(container, 'scroll', this._onScroll, this);\r\n\t\tthis._containerId = stamp(container);\r\n\r\n\t\tenablePointerDetection();\r\n\t}\r\n\r\n\t_initLayout() {\r\n\t\tconst container = this._container;\r\n\r\n\t\tthis._fadeAnimated = this.options.fadeAnimation;\r\n\r\n\t\tconst classes = ['leaflet-container', 'leaflet-touch'];\r\n\r\n\t\tif (Browser.retina) { classes.push('leaflet-retina'); }\r\n\t\tif (Browser.safari) { classes.push('leaflet-safari'); }\r\n\t\tif (this._fadeAnimated) { classes.push('leaflet-fade-anim'); }\r\n\r\n\t\tcontainer.classList.add(...classes);\r\n\r\n\t\tconst {position} = getComputedStyle(container);\r\n\r\n\t\tif (position !== 'absolute' && position !== 'relative' && position !== 'fixed' && position !== 'sticky') {\r\n\t\t\tcontainer.style.position = 'relative';\r\n\t\t}\r\n\r\n\t\tthis._initPanes();\r\n\r\n\t\tif (this._initControlPos) {\r\n\t\t\tthis._initControlPos();\r\n\t\t}\r\n\t}\r\n\r\n\t_initPanes() {\r\n\t\tconst panes = this._panes = {};\r\n\t\tthis._paneRenderers = {};\r\n\r\n\t\t// @section\r\n\t\t//\r\n\t\t// Panes are DOM elements used to control the ordering of layers on the map. You\r\n\t\t// can access panes with [`map.getPane`](#map-getpane) or\r\n\t\t// [`map.getPanes`](#map-getpanes) methods. New panes can be created with the\r\n\t\t// [`map.createPane`](#map-createpane) method.\r\n\t\t//\r\n\t\t// Every map has the following default panes that differ only in zIndex.\r\n\t\t//\r\n\t\t// @pane mapPane: HTMLElement = 'auto'\r\n\t\t// Pane that contains all other map panes\r\n\r\n\t\tthis._mapPane = this.createPane('mapPane', this._container);\r\n\t\tsetPosition(this._mapPane, new Point(0, 0));\r\n\r\n\t\t// @pane tilePane: HTMLElement = 200\r\n\t\t// Pane for `GridLayer`s and `TileLayer`s\r\n\t\tthis.createPane('tilePane');\r\n\t\t// @pane overlayPane: HTMLElement = 400\r\n\t\t// Pane for vectors (`Path`s, like `Polyline`s and `Polygon`s), `ImageOverlay`s and `VideoOverlay`s\r\n\t\tthis.createPane('overlayPane');\r\n\t\t// @pane shadowPane: HTMLElement = 500\r\n\t\t// Pane for overlay shadows (e.g. `Marker` shadows)\r\n\t\tthis.createPane('shadowPane');\r\n\t\t// @pane markerPane: HTMLElement = 600\r\n\t\t// Pane for `Icon`s of `Marker`s\r\n\t\tthis.createPane('markerPane');\r\n\t\t// @pane tooltipPane: HTMLElement = 650\r\n\t\t// Pane for `Tooltip`s.\r\n\t\tthis.createPane('tooltipPane');\r\n\t\t// @pane popupPane: HTMLElement = 700\r\n\t\t// Pane for `Popup`s.\r\n\t\tthis.createPane('popupPane');\r\n\r\n\t\tif (!this.options.markerZoomAnimation) {\r\n\t\t\tpanes.markerPane.classList.add('leaflet-zoom-hide');\r\n\t\t\tpanes.shadowPane.classList.add('leaflet-zoom-hide');\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t// private methods that modify map state\r\n\r\n\t// @section Map state change events\r\n\t_resetView(center, zoom, noMoveStart) {\r\n\t\tsetPosition(this._mapPane, new Point(0, 0));\r\n\r\n\t\tconst loading = !this._loaded;\r\n\t\tthis._loaded = true;\r\n\t\tzoom = this._limitZoom(zoom);\r\n\r\n\t\tthis.fire('viewprereset');\r\n\r\n\t\tconst zoomChanged = this._zoom !== zoom;\r\n\t\tthis\r\n\t\t\t._moveStart(zoomChanged, noMoveStart)\r\n\t\t\t._move(center, zoom)\r\n\t\t\t._moveEnd(zoomChanged);\r\n\r\n\t\t// @event viewreset: Event\r\n\t\t// Fired when the map needs to redraw its content (this usually happens\r\n\t\t// on map zoom or load). Very useful for creating custom overlays.\r\n\t\tthis.fire('viewreset');\r\n\r\n\t\t// @event load: Event\r\n\t\t// Fired when the map is initialized (when its center and zoom are set\r\n\t\t// for the first time).\r\n\t\tif (loading) {\r\n\t\t\tthis.fire('load');\r\n\t\t}\r\n\t}\r\n\r\n\t_moveStart(zoomChanged, noMoveStart) {\r\n\t\t// @event zoomstart: Event\r\n\t\t// Fired when the map zoom is about to change (e.g. before zoom animation).\r\n\t\t// @event movestart: Event\r\n\t\t// Fired when the view of the map starts changing (e.g. user starts dragging the map).\r\n\t\tif (zoomChanged) {\r\n\t\t\tthis.fire('zoomstart');\r\n\t\t}\r\n\t\tif (!noMoveStart) {\r\n\t\t\tthis.fire('movestart');\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n\r\n\t_move(center, zoom, data, supressEvent) {\r\n\t\tif (zoom === undefined) {\r\n\t\t\tzoom = this._zoom;\r\n\t\t}\r\n\t\tconst zoomChanged = this._zoom !== zoom;\r\n\r\n\t\tthis._zoom = zoom;\r\n\t\tthis._lastCenter = center;\r\n\t\tthis._pixelOrigin = this._getNewPixelOrigin(center);\r\n\r\n\t\tif (!supressEvent) {\r\n\t\t\t// @event zoom: Event\r\n\t\t\t// Fired repeatedly during any change in zoom level,\r\n\t\t\t// including zoom and fly animations.\r\n\t\t\tif (zoomChanged || (data?.pinch)) {\t// Always fire 'zoom' if pinching because #3530\r\n\t\t\t\tthis.fire('zoom', data);\r\n\t\t\t}\r\n\r\n\t\t\t// @event move: Event\r\n\t\t\t// Fired repeatedly during any movement of the map,\r\n\t\t\t// including pan and fly animations.\r\n\t\t\tthis.fire('move', data);\r\n\t\t} else if (data?.pinch) {\t// Always fire 'zoom' if pinching because #3530\r\n\t\t\tthis.fire('zoom', data);\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n\r\n\t_moveEnd(zoomChanged) {\r\n\t\t// @event zoomend: Event\r\n\t\t// Fired when the map zoom changed, after any animations.\r\n\t\tif (zoomChanged) {\r\n\t\t\tthis.fire('zoomend');\r\n\t\t}\r\n\r\n\t\t// @event moveend: Event\r\n\t\t// Fired when the center of the map stops changing\r\n\t\t// (e.g. user stopped dragging the map or after non-centered zoom).\r\n\t\treturn this.fire('moveend');\r\n\t}\r\n\r\n\t_stop() {\r\n\t\tcancelAnimationFrame(this._flyToFrame);\r\n\t\tthis._panAnim?.stop();\r\n\t\treturn this;\r\n\t}\r\n\r\n\t_rawPanBy(offset) {\r\n\t\tsetPosition(this._mapPane, this._getMapPanePos().subtract(offset));\r\n\t}\r\n\r\n\t_getZoomSpan() {\r\n\t\treturn this.getMaxZoom() - this.getMinZoom();\r\n\t}\r\n\r\n\t_panInsideMaxBounds() {\r\n\t\tif (!this._enforcingBounds) {\r\n\t\t\tthis.panInsideBounds(this.options.maxBounds);\r\n\t\t}\r\n\t}\r\n\r\n\t_checkIfLoaded() {\r\n\t\tif (!this._loaded) {\r\n\t\t\tthrow new Error('Set map center and zoom first.');\r\n\t\t}\r\n\t}\r\n\r\n\t// DOM event handling\r\n\r\n\t// @section Interaction events\r\n\t_initEvents(remove) {\r\n\t\tthis._targets = {};\r\n\t\tthis._targets[stamp(this._container)] = this;\r\n\r\n\t\tconst onOff = remove ? off : on;\r\n\r\n\t\t// @event click: PointerEvent\r\n\t\t// Fired when the user clicks (or taps) the map.\r\n\t\t// @event dblclick: PointerEvent\r\n\t\t// Fired when the user double-clicks (or double-taps) the map.\r\n\t\t// @event pointerdown: PointerEvent\r\n\t\t// Fired when the user pushes the pointer on the map.\r\n\t\t// @event pointerup: PointerEvent\r\n\t\t// Fired when the user releases the pointer on the map.\r\n\t\t// @event pointerover: PointerEvent\r\n\t\t// Fired when the pointer enters the map.\r\n\t\t// @event pointerout: PointerEvent\r\n\t\t// Fired when the pointer leaves the map.\r\n\t\t// @event pointermove: PointerEvent\r\n\t\t// Fired while the pointer moves over the map.\r\n\t\t// @event contextmenu: PointerEvent\r\n\t\t// Fired when the user pushes the right mouse button on the map, prevents\r\n\t\t// default browser context menu from showing if there are listeners on\r\n\t\t// this event. Also fired on mobile when the user holds a single touch\r\n\t\t// for a second (also called long press).\r\n\t\t// @event keypress: KeyboardEvent\r\n\t\t// Fired when the user presses a key from the keyboard that produces a character value while the map is focused.\r\n\t\t// @event keydown: KeyboardEvent\r\n\t\t// Fired when the user presses a key from the keyboard while the map is focused. Unlike the `keypress` event,\r\n\t\t// the `keydown` event is fired for keys that produce a character value and for keys\r\n\t\t// that do not produce a character value.\r\n\t\t// @event keyup: KeyboardEvent\r\n\t\t// Fired when the user releases a key from the keyboard while the map is focused.\r\n\t\tonOff(this._container, 'click dblclick pointerdown pointerup ' +\r\n\t\t\t'pointerover pointerout pointermove contextmenu keypress keydown keyup', this._handleDOMEvent, this);\r\n\r\n\t\tif (this.options.trackResize) {\r\n\t\t\tif (!remove) {\r\n\t\t\t\tif (!this._resizeObserver) {\r\n\t\t\t\t\tthis._resizeObserver = new ResizeObserver(this._onResize.bind(this));\r\n\t\t\t\t}\r\n\t\t\t\tthis._resizeObserver.observe(this._container);\r\n\t\t\t} else {\r\n\t\t\t\tthis._resizeObserver.disconnect();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (this.options.transform3DLimit) {\r\n\t\t\t(remove ? this.off : this.on).call(this, 'moveend', this._onMoveEnd);\r\n\t\t}\r\n\t}\r\n\r\n\t_onResize() {\r\n\t\tcancelAnimationFrame(this._resizeRequest);\r\n\t\tthis._resizeRequest = requestAnimationFrame(() => { this.invalidateSize({debounceMoveend: true}); });\r\n\t}\r\n\r\n\t_onScroll() {\r\n\t\tthis._container.scrollTop = 0;\r\n\t\tthis._container.scrollLeft = 0;\r\n\t}\r\n\r\n\t_onMoveEnd() {\r\n\t\tconst pos = this._getMapPanePos();\r\n\t\tif (Math.max(Math.abs(pos.x), Math.abs(pos.y)) >= this.options.transform3DLimit) {\r\n\t\t\t// https://bugzilla.mozilla.org/show_bug.cgi?id=1203873 but Webkit also have\r\n\t\t\t// a pixel offset on very high values, see: https://jsfiddle.net/dg6r5hhb/\r\n\t\t\tthis._resetView(this.getCenter(), this.getZoom());\r\n\t\t}\r\n\t}\r\n\r\n\t_findEventTargets(e, type) {\r\n\t\tlet targets = [],\r\n\t\ttarget,\r\n\t\tsrc = e.target || e.srcElement,\r\n\t\tdragging = false;\r\n\t\tconst isHover = type === 'pointerout' || type === 'pointerover';\r\n\r\n\t\twhile (src) {\r\n\t\t\ttarget = this._targets[stamp(src)];\r\n\t\t\tif (target && (type === 'click' || type === 'preclick') && this._draggableMoved(target)) {\r\n\t\t\t\t// Prevent firing click after you just dragged an object.\r\n\t\t\t\tdragging = true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif (target && target.listens(type, true)) {\r\n\t\t\t\tif (isHover && !isExternalTarget(src, e)) { break; }\r\n\t\t\t\ttargets.push(target);\r\n\t\t\t\tif (isHover) { break; }\r\n\t\t\t}\r\n\t\t\tif (src === this._container) { break; }\r\n\t\t\tsrc = src.parentNode;\r\n\t\t}\r\n\t\tif (!targets.length && !dragging && !isHover && this.listens(type, true)) {\r\n\t\t\ttargets = [this];\r\n\t\t}\r\n\t\treturn targets;\r\n\t}\r\n\r\n\t_isClickDisabled(el) {\r\n\t\twhile (el && el !== this._container) {\r\n\t\t\tif (el['_leaflet_disable_click'] || !el.parentNode) { return true; }\r\n\t\t\tel = el.parentNode;\r\n\t\t}\r\n\t}\r\n\r\n\t_handleDOMEvent(e) {\r\n\t\tconst el = e.target ?? e.srcElement;\r\n\t\tif (!this._loaded || el['_leaflet_disable_events'] || e.type === 'click' && this._isClickDisabled(el)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst type = e.type;\r\n\r\n\t\tif (type === 'pointerdown') {\r\n\t\t\t// prevents outline when clicking on keyboard-focusable element\r\n\t\t\tpreventOutline(el);\r\n\t\t}\r\n\r\n\t\tthis._fireDOMEvent(e, type);\r\n\t};\r\n\r\n\tstatic _pointerEvents = ['click', 'dblclick', 'pointerover', 'pointerout', 'contextmenu'];\r\n\r\n\t_fireDOMEvent(e, type, canvasTargets) {\r\n\r\n\t\tif (type === 'click') {\r\n\t\t\t// Fire a synthetic 'preclick' event which propagates up (mainly for closing popups).\r\n\t\t\t// @event preclick: PointerEvent\r\n\t\t\t// Fired before pointer click on the map (sometimes useful when you\r\n\t\t\t// want something to happen on click before any existing click\r\n\t\t\t// handlers start running).\r\n\t\t\tthis._fireDOMEvent(e, 'preclick', canvasTargets);\r\n\t\t}\r\n\r\n\t\t// Find the layer the event is propagating from and its parents.\r\n\t\tlet targets = this._findEventTargets(e, type);\r\n\r\n\t\tif (canvasTargets) {\r\n\t\t\t// pick only targets with listeners\r\n\t\t\tconst filtered = canvasTargets.filter(t => t.listens(type, true));\r\n\t\t\ttargets = filtered.concat(targets);\r\n\t\t}\r\n\r\n\t\tif (!targets.length) { return; }\r\n\r\n\t\tif (type === 'contextmenu') {\r\n\t\t\tpreventDefault(e);\r\n\t\t}\r\n\r\n\t\tconst target = targets[0];\r\n\t\tconst data = {\r\n\t\t\toriginalEvent: e\r\n\t\t};\r\n\r\n\t\tif (e.type !== 'keypress' && e.type !== 'keydown' && e.type !== 'keyup') {\r\n\t\t\tconst isMarker = target.getLatLng && (!target._radius || target._radius <= 10);\r\n\t\t\tdata.containerPoint = isMarker ?\r\n\t\t\t\tthis.latLngToContainerPoint(target.getLatLng()) : this.pointerEventToContainerPoint(e);\r\n\t\t\tdata.layerPoint = this.containerPointToLayerPoint(data.containerPoint);\r\n\t\t\tdata.latlng = isMarker ? target.getLatLng() : this.layerPointToLatLng(data.layerPoint);\r\n\t\t}\r\n\r\n\t\tfor (const t of targets) {\r\n\t\t\tt.fire(type, data, true);\r\n\t\t\tif (data.originalEvent._stopped ||\r\n\t\t\t\t(t.options.bubblingPointerEvents === false && Map._pointerEvents.includes(type))) { return; }\r\n\t\t}\r\n\t}\r\n\r\n\t_draggableMoved(obj) {\r\n\t\tobj = obj.dragging?.enabled() ? obj : this;\r\n\t\treturn obj.dragging?.moved() || this.boxZoom?.moved();\r\n\t}\r\n\r\n\t_clearHandlers() {\r\n\t\tfor (const handler of this._handlers) {\r\n\t\t\thandler.disable();\r\n\t\t}\r\n\t}\r\n\r\n\t// @section Other Methods\r\n\r\n\t// @method whenReady(fn: Function, context?: Object): this\r\n\t// Runs the given function `fn` when the map gets initialized with\r\n\t// a view (center and zoom) and at least one layer, or immediately\r\n\t// if it's already initialized, optionally passing a function context.\r\n\twhenReady(callback, context) {\r\n\t\tif (this._loaded) {\r\n\t\t\tcallback.call(context || this, {target: this});\r\n\t\t} else {\r\n\t\t\tthis.on('load', callback, context);\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n\r\n\r\n\t// private methods for getting map state\r\n\r\n\t_getMapPanePos() {\r\n\t\treturn getPosition(this._mapPane);\r\n\t}\r\n\r\n\t_moved() {\r\n\t\tconst pos = this._getMapPanePos();\r\n\t\treturn pos && !pos.equals([0, 0]);\r\n\t}\r\n\r\n\t_getTopLeftPoint(center, zoom) {\r\n\t\tconst pixelOrigin = center && zoom !== undefined ?\r\n\t\t\tthis._getNewPixelOrigin(center, zoom) :\r\n\t\t\tthis.getPixelOrigin();\r\n\t\treturn pixelOrigin.subtract(this._getMapPanePos());\r\n\t}\r\n\r\n\t_getNewPixelOrigin(center, zoom) {\r\n\t\tconst viewHalf = this.getSize()._divideBy(2);\r\n\t\treturn this.project(center, zoom)._subtract(viewHalf)._add(this._getMapPanePos())._round();\r\n\t}\r\n\r\n\t_latLngToNewLayerPoint(latlng, zoom, center) {\r\n\t\tconst topLeft = this._getNewPixelOrigin(center, zoom);\r\n\t\treturn this.project(latlng, zoom)._subtract(topLeft);\r\n\t}\r\n\r\n\t_latLngBoundsToNewLayerBounds(latLngBounds, zoom, center) {\r\n\t\tconst topLeft = this._getNewPixelOrigin(center, zoom);\r\n\t\treturn new Bounds([\r\n\t\t\tthis.project(latLngBounds.getSouthWest(), zoom)._subtract(topLeft),\r\n\t\t\tthis.project(latLngBounds.getNorthWest(), zoom)._subtract(topLeft),\r\n\t\t\tthis.project(latLngBounds.getSouthEast(), zoom)._subtract(topLeft),\r\n\t\t\tthis.project(latLngBounds.getNorthEast(), zoom)._subtract(topLeft)\r\n\t\t]);\r\n\t}\r\n\r\n\t// layer point of the current center\r\n\t_getCenterLayerPoint() {\r\n\t\treturn this.containerPointToLayerPoint(this.getSize()._divideBy(2));\r\n\t}\r\n\r\n\t// offset of the specified place to the current center in pixels\r\n\t_getCenterOffset(latlng) {\r\n\t\treturn this.latLngToLayerPoint(latlng).subtract(this._getCenterLayerPoint());\r\n\t}\r\n\r\n\t// adjust center for view to get inside bounds\r\n\t_limitCenter(center, zoom, bounds) {\r\n\r\n\t\tif (!bounds) { return center; }\r\n\r\n\t\tconst centerPoint = this.project(center, zoom),\r\n\t\tviewHalf = this.getSize().divideBy(2),\r\n\t\tviewBounds = new Bounds(centerPoint.subtract(viewHalf), centerPoint.add(viewHalf)),\r\n\t\toffset = this._getBoundsOffset(viewBounds, bounds, zoom);\r\n\r\n\t\t// If offset is less than a pixel, ignore.\r\n\t\t// This prevents unstable projections from getting into\r\n\t\t// an infinite loop of tiny offsets.\r\n\t\tif (Math.abs(offset.x) <= 1 && Math.abs(offset.y) <= 1) {\r\n\t\t\treturn center;\r\n\t\t}\r\n\r\n\t\treturn this.unproject(centerPoint.add(offset), zoom);\r\n\t}\r\n\r\n\t// adjust offset for view to get inside bounds\r\n\t_limitOffset(offset, bounds) {\r\n\t\tif (!bounds) { return offset; }\r\n\r\n\t\tconst viewBounds = this.getPixelBounds(),\r\n\t\tnewBounds = new Bounds(viewBounds.min.add(offset), viewBounds.max.add(offset));\r\n\r\n\t\treturn offset.add(this._getBoundsOffset(newBounds, bounds));\r\n\t}\r\n\r\n\t// returns offset needed for pxBounds to get inside maxBounds at a specified zoom\r\n\t_getBoundsOffset(pxBounds, maxBounds, zoom) {\r\n\t\tconst projectedMaxBounds = new Bounds(\r\n\t\t\tthis.project(maxBounds.getNorthEast(), zoom),\r\n\t\t\tthis.project(maxBounds.getSouthWest(), zoom)\r\n\t\t),\r\n\t\tminOffset = projectedMaxBounds.min.subtract(pxBounds.min),\r\n\t\tmaxOffset = projectedMaxBounds.max.subtract(pxBounds.max),\r\n\r\n\t\tdx = this._rebound(minOffset.x, -maxOffset.x),\r\n\t\tdy = this._rebound(minOffset.y, -maxOffset.y);\r\n\r\n\t\treturn new Point(dx, dy);\r\n\t}\r\n\r\n\t_rebound(left, right) {\r\n\t\treturn left + right > 0 ?\r\n\t\t\tMath.round(left - right) / 2 :\r\n\t\t\tMath.max(0, Math.ceil(left)) - Math.max(0, Math.floor(right));\r\n\t}\r\n\r\n\t_limitZoom(zoom) {\r\n\t\tconst min = this.getMinZoom(),\r\n\t\tmax = this.getMaxZoom(),\r\n\t\tsnap = this.options.zoomSnap;\r\n\t\tif (snap) {\r\n\t\t\tzoom = Math.round(zoom / snap) * snap;\r\n\t\t}\r\n\t\treturn Math.max(min, Math.min(max, zoom));\r\n\t}\r\n\r\n\t_onPanTransitionStep() {\r\n\t\tthis.fire('move');\r\n\t}\r\n\r\n\t_onPanTransitionEnd() {\r\n\t\tthis._mapPane.classList.remove('leaflet-pan-anim');\r\n\t\tthis.fire('moveend');\r\n\t}\r\n\r\n\t_tryAnimatedPan(center, options) {\r\n\t\t// difference between the new and current centers in pixels\r\n\t\tconst offset = this._getCenterOffset(center)._trunc();\r\n\r\n\t\t// don't animate too far unless animate: true specified in options\r\n\t\tif (options?.animate !== true && !this.getSize().contains(offset)) { return false; }\r\n\r\n\t\tthis.panBy(offset, options);\r\n\r\n\t\treturn true;\r\n\t}\r\n\r\n\t_createAnimProxy() {\r\n\t\tthis._proxy = create$1('div', 'leaflet-proxy leaflet-zoom-animated');\r\n\t\tthis._panes.mapPane.appendChild(this._proxy);\r\n\r\n\t\tthis.on('zoomanim', this._animateProxyZoom, this);\r\n\t\tthis.on('load moveend', this._animMoveEnd, this);\r\n\r\n\t\ton(this._proxy, 'transitionend', this._catchTransitionEnd, this);\r\n\t}\r\n\r\n\t_animateProxyZoom(e) {\r\n\t\tconst transform = this._proxy.style.transform;\r\n\r\n\t\tsetTransform(\r\n\t\t\tthis._proxy,\r\n\t\t\tthis.project(e.center, e.zoom),\r\n\t\t\tthis.getZoomScale(e.zoom, 1),\r\n\t\t);\r\n\r\n\t\t// workaround for case when transform is the same and so transitionend event is not fired\r\n\t\tif (transform === this._proxy.style.transform && this._animatingZoom) {\r\n\t\t\tthis._onZoomTransitionEnd();\r\n\t\t}\r\n\t}\r\n\r\n\t_animMoveEnd() {\r\n\t\tconst c = this.getCenter();\r\n\t\tconst z = this.getZoom();\r\n\r\n\r\n\r\n\t\tsetTransform(\r\n\t\t\tthis._proxy,\r\n\t\t\tthis.project(c, z),\r\n\t\t\tthis.getZoomScale(z, 1),\r\n\t\t);\r\n\t}\r\n\r\n\t_destroyAnimProxy() {\r\n\t\t// Just make sure this method is safe to call from anywhere, without knowledge\r\n\t\t// of whether the animation proxy was created in the first place.\r\n\t\tif (this._proxy) {\r\n\t\t\toff(this._proxy, 'transitionend', this._catchTransitionEnd, this);\r\n\r\n\t\t\tthis._proxy.remove();\r\n\t\t\tthis.off('zoomanim', this._animateProxyZoom, this);\r\n\t\t\tthis.off('load moveend', this._animMoveEnd, this);\r\n\r\n\t\t\tdelete this._proxy;\r\n\t\t}\r\n\t}\r\n\r\n\t_catchTransitionEnd(e) {\r\n\t\tif (this._animatingZoom && e.propertyName.includes('transform')) {\r\n\t\t\tthis._onZoomTransitionEnd();\r\n\t\t}\r\n\t}\r\n\r\n\t_nothingToAnimate() {\r\n\t\treturn !this._container.getElementsByClassName('leaflet-zoom-animated').length;\r\n\t}\r\n\r\n\t_tryAnimatedZoom(center, zoom, options) {\r\n\r\n\t\tif (this._animatingZoom) { return true; }\r\n\r\n\t\toptions ??= {};\r\n\r\n\t\t// don't animate if disabled, not supported or zoom difference is too large\r\n\t\tif (!this._zoomAnimated || options.animate === false || this._nothingToAnimate() ||\r\n\t\t Math.abs(zoom - this._zoom) > this.options.zoomAnimationThreshold) { return false; }\r\n\r\n\t\t// offset is the pixel coords of the zoom origin relative to the current center\r\n\t\tconst scale = this.getZoomScale(zoom),\r\n\t\toffset = this._getCenterOffset(center)._divideBy(1 - 1 / scale);\r\n\r\n\t\t// don't animate if the zoom origin isn't within one screen from the current center, unless forced\r\n\t\tif (options.animate !== true && !this.getSize().contains(offset)) { return false; }\r\n\r\n\t\trequestAnimationFrame(() => {\r\n\t\t\tthis\r\n\t\t\t\t._moveStart(true, options.noMoveStart ?? false)\r\n\t\t\t\t._animateZoom(center, zoom, true);\r\n\t\t});\r\n\r\n\t\treturn true;\r\n\t}\r\n\r\n\t_animateZoom(center, zoom, startAnim, noUpdate) {\r\n\t\tif (!this._mapPane) { return; }\r\n\r\n\t\tif (startAnim) {\r\n\t\t\tthis._animatingZoom = true;\r\n\r\n\t\t\t// remember what center/zoom to set after animation\r\n\t\t\tthis._animateToCenter = center;\r\n\t\t\tthis._animateToZoom = zoom;\r\n\r\n\t\t\tthis._mapPane.classList.add('leaflet-zoom-anim');\r\n\t\t}\r\n\r\n\t\t// @section Other Events\r\n\t\t// @event zoomanim: ZoomAnimEvent\r\n\t\t// Fired at least once per zoom animation. For continuous zoom, like pinch zooming, fired once per frame during zoom.\r\n\t\tthis.fire('zoomanim', {\r\n\t\t\tcenter,\r\n\t\t\tzoom,\r\n\t\t\tnoUpdate\r\n\t\t});\r\n\r\n\t\tif (!this._tempFireZoomEvent) {\r\n\t\t\tthis._tempFireZoomEvent = this._zoom !== this._animateToZoom;\r\n\t\t}\r\n\r\n\t\tthis._move(this._animateToCenter, this._animateToZoom, undefined, true);\r\n\r\n\t\t// Work around webkit not firing 'transitionend', see https://github.com/Leaflet/Leaflet/issues/3689, 2693\r\n\t\tthis._transitionEndTimer = setTimeout(this._onZoomTransitionEnd.bind(this), 250);\r\n\t}\r\n\r\n\t_onZoomTransitionEnd() {\r\n\t\tif (!this._animatingZoom) { return; }\r\n\r\n\t\tthis._mapPane?.classList.remove('leaflet-zoom-anim');\r\n\r\n\t\tthis._animatingZoom = false;\r\n\r\n\t\tthis._move(this._animateToCenter, this._animateToZoom, undefined, true);\r\n\r\n\t\tif (this._tempFireZoomEvent) {\r\n\t\t\tthis.fire('zoom');\r\n\t\t}\r\n\t\tdelete this._tempFireZoomEvent;\r\n\r\n\t\tthis.fire('move');\r\n\r\n\t\tthis._moveEnd(true);\r\n\t}\r\n};\r\n\r\nconst LeafletMap = Map$1;\n\n/*\r\n * @class Control\r\n * @inherits Class\r\n *\r\n * Control is a base class for implementing map controls. Handles positioning.\r\n * All other controls extend from this class.\r\n */\r\n\r\nclass Control extends Class {\r\n\r\n\tstatic {\r\n\t\t// @section\r\n\t\t// @aka Control Options\r\n\t\tthis.setDefaultOptions({\r\n\t\t\t// @option position: String = 'topright'\r\n\t\t\t// The position of the control (one of the map corners). Possible values are `'topleft'`,\r\n\t\t\t// `'topright'`, `'bottomleft'` or `'bottomright'`\r\n\t\t\tposition: 'topright'\r\n\t\t});\r\n\t}\r\n\r\n\r\n\tinitialize(options) {\r\n\t\tsetOptions(this, options);\r\n\t}\r\n\r\n\t/* @section\r\n\t * Classes extending Control will inherit the following methods:\r\n\t *\r\n\t * @method getPosition: string\r\n\t * Returns the position of the control.\r\n\t */\r\n\tgetPosition() {\r\n\t\treturn this.options.position;\r\n\t}\r\n\r\n\t// @method setPosition(position: string): this\r\n\t// Sets the position of the control.\r\n\tsetPosition(position) {\r\n\t\tconst map = this._map;\r\n\r\n\t\tmap?.removeControl(this);\r\n\r\n\t\tthis.options.position = position;\r\n\r\n\t\tmap?.addControl(this);\r\n\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method getContainer: HTMLElement\r\n\t// Returns the HTMLElement that contains the control.\r\n\tgetContainer() {\r\n\t\treturn this._container;\r\n\t}\r\n\r\n\t// @method addTo(map: Map): this\r\n\t// Adds the control to the given map.\r\n\taddTo(map) {\r\n\t\tthis.remove();\r\n\t\tthis._map = map;\r\n\r\n\t\tconst container = this._container = this.onAdd(map),\r\n\t\tpos = this.getPosition(),\r\n\t\tcorner = map._controlCorners[pos];\r\n\r\n\t\tcontainer.classList.add('leaflet-control');\r\n\r\n\t\tif (pos.includes('bottom')) {\r\n\t\t\tcorner.insertBefore(container, corner.firstChild);\r\n\t\t} else {\r\n\t\t\tcorner.appendChild(container);\r\n\t\t}\r\n\r\n\t\tthis._map.on('unload', this.remove, this);\r\n\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method remove: this\r\n\t// Removes the control from the map it is currently active on.\r\n\tremove() {\r\n\t\tif (!this._map) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tthis._container.remove();\r\n\r\n\t\tif (this.onRemove) {\r\n\t\t\tthis.onRemove(this._map);\r\n\t\t}\r\n\r\n\t\tthis._map.off('unload', this.remove, this);\r\n\t\tthis._map = null;\r\n\r\n\t\treturn this;\r\n\t}\r\n\r\n\t_refocusOnMap(e) {\r\n\t\t// We exclude keyboard-click event to keep the focus on the control for accessibility.\r\n\t\t// The position of keyboard-click events are x=0 and y=0.\r\n\t\tif (this._map && e && !(e.screenX === 0 && e.screenY === 0)) {\r\n\t\t\tthis._map.getContainer().focus();\r\n\t\t}\r\n\t}\r\n}\r\n\r\n/* @section Extension methods\r\n * @uninheritable\r\n *\r\n * Every control should extend from `Control` and (re-)implement the following methods.\r\n *\r\n * @method onAdd(map: Map): HTMLElement\r\n * Should return the container DOM element for the control and add listeners on relevant map events. Called on [`control.addTo(map)`](#control-addTo).\r\n *\r\n * @method onRemove(map: Map)\r\n * Optional method. Should contain all clean up code that removes the listeners previously added in [`onAdd`](#control-onadd). Called on [`control.remove()`](#control-remove).\r\n */\r\n\r\n/* @namespace Map\r\n * @section Methods for Layers and Controls\r\n */\r\nMap$1.include({\r\n\t// @method addControl(control: Control): this\r\n\t// Adds the given control to the map\r\n\taddControl(control) {\r\n\t\tcontrol.addTo(this);\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method removeControl(control: Control): this\r\n\t// Removes the given control from the map\r\n\tremoveControl(control) {\r\n\t\tcontrol.remove();\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_initControlPos() {\r\n\t\tconst corners = this._controlCorners = {},\r\n\t\tl = 'leaflet-',\r\n\t\tcontainer = this._controlContainer =\r\n\t\t create$1('div', `${l}control-container`, this._container);\r\n\r\n\t\tfunction createCorner(vSide, hSide) {\r\n\t\t\tconst className = `${l + vSide} ${l}${hSide}`;\r\n\r\n\t\t\tcorners[vSide + hSide] = create$1('div', className, container);\r\n\t\t}\r\n\r\n\t\tcreateCorner('top', 'left');\r\n\t\tcreateCorner('top', 'right');\r\n\t\tcreateCorner('bottom', 'left');\r\n\t\tcreateCorner('bottom', 'right');\r\n\t},\r\n\r\n\t_clearControlPos() {\r\n\t\tfor (const c of Object.values(this._controlCorners)) {\r\n\t\t\tc.remove();\r\n\t\t}\r\n\t\tthis._controlContainer.remove();\r\n\t\tdelete this._controlCorners;\r\n\t\tdelete this._controlContainer;\r\n\t}\r\n});\n\n/*\r\n * @class Control.Layers\r\n * @inherits Control\r\n *\r\n * The layers control gives users the ability to switch between different base layers and switch overlays on/off (check out the [detailed example](https://leafletjs.com/examples/layers-control/)). Extends `Control`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * const baseLayers = {\r\n * \t\"Mapbox\": mapbox,\r\n * \t\"OpenStreetMap\": osm\r\n * };\r\n *\r\n * const overlays = {\r\n * \t\"Marker\": marker,\r\n * \t\"Roads\": roadsLayer\r\n * };\r\n *\r\n * new Control.Layers(baseLayers, overlays).addTo(map);\r\n * ```\r\n *\r\n * The `baseLayers` and `overlays` parameters are object literals with layer names as keys and `Layer` objects as values:\r\n *\r\n * ```js\r\n * {\r\n * \"<someName1>\": layer1,\r\n * \"<someName2>\": layer2\r\n * }\r\n * ```\r\n *\r\n * The layer names can contain HTML, which allows you to add additional styling to the items:\r\n *\r\n * ```js\r\n * {\"<img src='my-layer-icon' /> <span class='my-layer-item'>My Layer</span>\": myLayer}\r\n * ```\r\n */\r\n\r\n// @constructor Control.Layers(baselayers?: Object, overlays?: Object, options?: Control.Layers options)\r\n// Creates a layers control with the given layers. Base layers will be switched with radio buttons, while overlays will be switched with checkboxes. Note that all base layers should be passed in the base layers object, but only one should be added to the map during map instantiation.\r\nclass Layers extends Control {\r\n\r\n\tstatic {\r\n\t\t// @section\r\n\t\t// @aka Control.Layers options\r\n\t\tthis.setDefaultOptions({\r\n\t\t\t// @option collapsed: Boolean = true\r\n\t\t\t// If `true`, the control will be collapsed into an icon and expanded on pointer hover, touch, or keyboard activation.\r\n\t\t\tcollapsed: true,\r\n\r\n\t\t\t// @option collapseDelay: Number = 0\r\n\t\t\t// Collapse delay in milliseconds. If greater than 0, the control will remain open longer, making it easier to scroll through long layer lists.\r\n\t\t\tcollapseDelay: 0,\r\n\r\n\t\t\tposition: 'topright',\r\n\r\n\t\t\t// @option autoZIndex: Boolean = true\r\n\t\t\t// If `true`, the control will assign zIndexes in increasing order to all of its layers so that the order is preserved when switching them on/off.\r\n\t\t\tautoZIndex: true,\r\n\r\n\t\t\t// @option hideSingleBase: Boolean = false\r\n\t\t\t// If `true`, the base layers in the control will be hidden when there is only one.\r\n\t\t\thideSingleBase: false,\r\n\r\n\t\t\t// @option sortLayers: Boolean = false\r\n\t\t\t// Whether to sort the layers. When `false`, layers will keep the order\r\n\t\t\t// in which they were added to the control.\r\n\t\t\tsortLayers: false,\r\n\r\n\t\t\t// @option sortFunction: Function = *\r\n\t\t\t// A [compare function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/sort)\r\n\t\t\t// that will be used for sorting the layers, when `sortLayers` is `true`.\r\n\t\t\t// The function receives both the `Layer` instances and their names, as in\r\n\t\t\t// `sortFunction(layerA, layerB, nameA, nameB)`.\r\n\t\t\t// By default, it sorts layers alphabetically by their name.\r\n\t\t\tsortFunction(layerA, layerB, nameA, nameB) {\r\n\t\t\t\treturn nameA < nameB ? -1 : (nameB < nameA ? 1 : 0);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tinitialize(baseLayers, overlays, options) {\r\n\t\tsetOptions(this, options);\r\n\r\n\t\tthis._layerControlInputs = [];\r\n\t\tthis._layers = [];\r\n\t\tthis._lastZIndex = 0;\r\n\t\tthis._handlingClick = false;\r\n\t\tthis._preventClick = false;\r\n\r\n\t\tfor (const [name, layer] of Object.entries(baseLayers ?? {})) {\r\n\t\t\tthis._addLayer(layer, name);\r\n\t\t}\r\n\r\n\t\tfor (const [name, layer] of Object.entries(overlays ?? {})) {\r\n\t\t\tthis._addLayer(layer, name, true);\r\n\t\t}\r\n\t}\r\n\r\n\tonAdd(map) {\r\n\t\tthis._initLayout();\r\n\t\tthis._update();\r\n\r\n\t\tthis._map = map;\r\n\t\tmap.on('zoomend', this._checkDisabledLayers, this);\r\n\r\n\t\tfor (const layer of this._layers) {\r\n\t\t\tlayer.layer.on('add remove', this._onLayerChange, this);\r\n\t\t}\r\n\r\n\t\tif (!this.options.collapsed) {\r\n\t\t\t// update the height of the container after resizing the window\r\n\t\t\tmap.on('resize', this._expandIfNotCollapsed, this);\r\n\t\t}\r\n\r\n\t\treturn this._container;\r\n\t}\r\n\r\n\taddTo(map) {\r\n\t\tControl.prototype.addTo.call(this, map);\r\n\t\t// Trigger expand after Layers Control has been inserted into DOM so that is now has an actual height.\r\n\t\treturn this._expandIfNotCollapsed();\r\n\t}\r\n\r\n\tonRemove() {\r\n\t\tthis._map.off('zoomend', this._checkDisabledLayers, this);\r\n\r\n\t\tfor (const layer of this._layers) {\r\n\t\t\tlayer.layer.off('add remove', this._onLayerChange, this);\r\n\t\t}\r\n\r\n\t\tthis._map.off('resize', this._expandIfNotCollapsed, this);\r\n\t}\r\n\r\n\t// @method addBaseLayer(layer: Layer, name: String): this\r\n\t// Adds a base layer (radio button entry) with the given name to the control.\r\n\taddBaseLayer(layer, name) {\r\n\t\tthis._addLayer(layer, name);\r\n\t\treturn (this._map) ? this._update() : this;\r\n\t}\r\n\r\n\t// @method addOverlay(layer: Layer, name: String): this\r\n\t// Adds an overlay (checkbox entry) with the given name to the control.\r\n\taddOverlay(layer, name) {\r\n\t\tthis._addLayer(layer, name, true);\r\n\t\treturn (this._map) ? this._update() : this;\r\n\t}\r\n\r\n\t// @method removeLayer(layer: Layer): this\r\n\t// Remove the given layer from the control.\r\n\tremoveLayer(layer) {\r\n\t\tlayer.off('add remove', this._onLayerChange, this);\r\n\r\n\t\tconst obj = this._getLayer(stamp(layer));\r\n\t\tif (obj) {\r\n\t\t\tthis._layers.splice(this._layers.indexOf(obj), 1);\r\n\t\t}\r\n\t\treturn (this._map) ? this._update() : this;\r\n\t}\r\n\r\n\t// @method expand(): this\r\n\t// Expand the control container if collapsed.\r\n\texpand() {\r\n\t\tclearTimeout(this._collapseDelayTimeout);\r\n\r\n\t\tthis._container.classList.add('leaflet-control-layers-expanded');\r\n\t\tthis._section.style.height = null;\r\n\t\tconst acceptableHeight = this._map.getSize().y - (this._container.offsetTop + 50);\r\n\t\tif (acceptableHeight < this._section.clientHeight) {\r\n\t\t\tthis._section.classList.add('leaflet-control-layers-scrollbar');\r\n\t\t\tthis._section.style.height = `${acceptableHeight}px`;\r\n\t\t} else {\r\n\t\t\tthis._section.classList.remove('leaflet-control-layers-scrollbar');\r\n\t\t}\r\n\t\tthis._checkDisabledLayers();\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method collapse(): this\r\n\t// Collapse the control container if expanded.\r\n\tcollapse(ev) {\r\n\t\t// On touch devices `pointerleave` & `pointerout` is fired while clicking on a checkbox.\r\n\t\t// The control was collapsed instead of adding the layer to the map.\r\n\t\t// So we allow collapse only if it is not touch.\r\n\t\tif (!ev || !((ev.type === 'pointerleave' || ev.type === 'pointerout') && ev.pointerType === 'touch')) {\r\n\t\t\tif (this.options.collapseDelay > 0) {\r\n\t\t\t\t// Collapse delayed\r\n\t\t\t\tthis._collapseDelayTimeout = setTimeout(() => {\r\n\t\t\t\t\tthis._container.classList.remove('leaflet-control-layers-expanded');\r\n\t\t\t\t}, this.options.collapseDelay);\r\n\t\t\t\treturn this;\r\n\t\t\t}\r\n\r\n\t\t\t// Collapse immediatelly\r\n\t\t\tthis._container.classList.remove('leaflet-control-layers-expanded');\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n\r\n\t_initLayout() {\r\n\t\tconst className = 'leaflet-control-layers',\r\n\t\tcontainer = this._container = create$1('div', className),\r\n\t\tcollapsed = this.options.collapsed;\r\n\r\n\t\tdisableClickPropagation(container);\r\n\t\tdisableScrollPropagation(container);\r\n\r\n\t\tconst section = this._section = create$1('fieldset', `${className}-list`);\r\n\r\n\t\tif (collapsed) {\r\n\t\t\tthis._map.on('click', this.collapse, this);\r\n\r\n\t\t\ton(container, {\r\n\t\t\t\tpointerenter: this._expandSafely,\r\n\t\t\t\tpointerleave: this.collapse\r\n\t\t\t}, this);\r\n\t\t}\r\n\r\n\t\tconst link = this._layersLink = create$1('a', `${className}-toggle`, container);\r\n\t\tlink.href = '#';\r\n\t\tlink.title = 'Layers';\r\n\t\tlink.setAttribute('role', 'button');\r\n\r\n\t\ton(link, {\r\n\t\t\tkeydown(e) {\r\n\t\t\t\tif (e.code === 'Enter') {\r\n\t\t\t\t\tthis._expandSafely();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t// Certain screen readers intercept the key event and instead send a click event\r\n\t\t\tclick(e) {\r\n\t\t\t\tpreventDefault(e);\r\n\t\t\t\tthis._expandSafely();\r\n\t\t\t}\r\n\t\t}, this);\r\n\r\n\t\tif (!collapsed) {\r\n\t\t\tthis.expand();\r\n\t\t}\r\n\r\n\t\tthis._baseLayersList = create$1('div', `${className}-base`, section);\r\n\t\tthis._separator = create$1('div', `${className}-separator`, section);\r\n\t\tthis._overlaysList = create$1('div', `${className}-overlays`, section);\r\n\r\n\t\tcontainer.appendChild(section);\r\n\t}\r\n\r\n\t_getLayer(id) {\r\n\t\tfor (const layer of this._layers) {\r\n\t\t\tif (layer && stamp(layer.layer) === id) {\r\n\t\t\t\treturn layer;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t_addLayer(layer, name, overlay) {\r\n\t\tif (this._map) {\r\n\t\t\tlayer.on('add remove', this._onLayerChange, this);\r\n\t\t}\r\n\r\n\t\tthis._layers.push({\r\n\t\t\tlayer,\r\n\t\t\tname,\r\n\t\t\toverlay\r\n\t\t});\r\n\r\n\t\tif (this.options.sortLayers) {\r\n\t\t\tthis._layers.sort(((a, b) => this.options.sortFunction(a.layer, b.layer, a.name, b.name)));\r\n\t\t}\r\n\r\n\t\tif (this.options.autoZIndex && layer.setZIndex) {\r\n\t\t\tthis._lastZIndex++;\r\n\t\t\tlayer.setZIndex(this._lastZIndex);\r\n\t\t}\r\n\r\n\t\tthis._expandIfNotCollapsed();\r\n\t}\r\n\r\n\t_update() {\r\n\t\tif (!this._container) { return this; }\r\n\r\n\t\tthis._baseLayersList.replaceChildren();\r\n\t\tthis._overlaysList.replaceChildren();\r\n\r\n\t\tthis._layerControlInputs = [];\r\n\t\tlet baseLayersPresent, overlaysPresent, baseLayersCount = 0;\r\n\r\n\t\tfor (const obj of this._layers) {\r\n\t\t\tthis._addItem(obj);\r\n\t\t\toverlaysPresent ||= obj.overlay;\r\n\t\t\tbaseLayersPresent ||= !obj.overlay;\r\n\t\t\tbaseLayersCount += !obj.overlay ? 1 : 0;\r\n\t\t}\r\n\r\n\t\t// Hide base layers section if there's only one layer.\r\n\t\tif (this.options.hideSingleBase) {\r\n\t\t\tbaseLayersPresent = baseLayersPresent && baseLayersCount > 1;\r\n\t\t\tthis._baseLayersList.style.display = baseLayersPresent ? '' : 'none';\r\n\t\t}\r\n\r\n\t\tthis._separator.style.display = overlaysPresent && baseLayersPresent ? '' : 'none';\r\n\r\n\t\treturn this;\r\n\t}\r\n\r\n\t_onLayerChange(e) {\r\n\t\tif (!this._handlingClick) {\r\n\t\t\tthis._update();\r\n\t\t}\r\n\r\n\t\tconst obj = this._getLayer(stamp(e.target));\r\n\r\n\t\t// @namespace Map\r\n\t\t// @section Layer events\r\n\t\t// @event baselayerchange: LayersControlEvent\r\n\t\t// Fired when the base layer is changed through the [layers control](#control-layers).\r\n\t\t// @event overlayadd: LayersControlEvent\r\n\t\t// Fired when an overlay is selected through the [layers control](#control-layers).\r\n\t\t// @event overlayremove: LayersControlEvent\r\n\t\t// Fired when an overlay is deselected through the [layers control](#control-layers).\r\n\t\t// @namespace Control.Layers\r\n\t\tconst type = obj.overlay ?\r\n\t\t\t(e.type === 'add' ? 'overlayadd' : 'overlayremove') :\r\n\t\t\t(e.type === 'add' ? 'baselayerchange' : null);\r\n\r\n\t\tif (type) {\r\n\t\t\tthis._map.fire(type, obj);\r\n\t\t}\r\n\t}\r\n\r\n\t_addItem(obj) {\r\n\t\tconst label = document.createElement('label'),\r\n\t\tchecked = this._map.hasLayer(obj.layer);\r\n\r\n\t\tconst input = document.createElement('input');\r\n\t\tinput.type = obj.overlay ? 'checkbox' : 'radio';\r\n\t\tinput.className = 'leaflet-control-layers-selector';\r\n\t\tinput.defaultChecked = checked;\r\n\t\tif (!obj.overlay) {\r\n\t\t\tinput.name = `leaflet-base-layers_${stamp(this)}`;\r\n\t\t}\r\n\r\n\t\tthis._layerControlInputs.push(input);\r\n\t\tinput.layerId = stamp(obj.layer);\r\n\r\n\t\ton(input, 'click', this._onInputClick, this);\r\n\r\n\t\tconst name = document.createElement('span');\r\n\t\tname.innerHTML = ` ${obj.name}`;\r\n\r\n\t\t// Helps from preventing layer control flicker when checkboxes are disabled\r\n\t\t// https://github.com/Leaflet/Leaflet/issues/2771\r\n\t\tconst holder = document.createElement('span');\r\n\r\n\t\tlabel.appendChild(holder);\r\n\t\tholder.appendChild(input);\r\n\t\tholder.appendChild(name);\r\n\r\n\t\tconst container = obj.overlay ? this._overlaysList : this._baseLayersList;\r\n\t\tcontainer.appendChild(label);\r\n\r\n\t\tthis._checkDisabledLayers();\r\n\t\treturn label;\r\n\t}\r\n\r\n\t_onInputClick(e) {\r\n\t\t// expanding the control on mobile with a click can cause adding a layer - we don't want this\r\n\t\tif (this._preventClick) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst inputs = this._layerControlInputs,\r\n\t\taddedLayers = [],\r\n\t\tremovedLayers = [];\r\n\r\n\t\tthis._handlingClick = true;\r\n\r\n\t\tfor (const input of inputs) {\r\n\t\t\tconst layer = this._getLayer(input.layerId).layer;\r\n\r\n\t\t\tif (input.checked) {\r\n\t\t\t\taddedLayers.push(layer);\r\n\t\t\t} else if (!input.checked) {\r\n\t\t\t\tremovedLayers.push(layer);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Bugfix issue 2318: Should remove all old layers before readding new ones\r\n\t\tfor (const layer of removedLayers) {\r\n\t\t\tif (this._map.hasLayer(layer)) {\r\n\t\t\t\tthis._map.removeLayer(layer);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (const layer of addedLayers) {\r\n\t\t\tif (!this._map.hasLayer(layer)) {\r\n\t\t\t\tthis._map.addLayer(layer);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._handlingClick = false;\r\n\r\n\t\tthis._refocusOnMap(e);\r\n\t}\r\n\r\n\t_checkDisabledLayers() {\r\n\t\tconst inputs = this._layerControlInputs,\r\n\t\tzoom = this._map.getZoom();\r\n\r\n\t\tfor (const input of inputs) {\r\n\t\t\tconst layer = this._getLayer(input.layerId).layer;\r\n\t\t\tinput.disabled = (layer.options.minZoom !== undefined && zoom < layer.options.minZoom) ||\r\n\t\t\t (layer.options.maxZoom !== undefined && zoom > layer.options.maxZoom);\r\n\r\n\t\t}\r\n\t}\r\n\r\n\t_expandIfNotCollapsed() {\r\n\t\tif (this._map && !this.options.collapsed) {\r\n\t\t\tthis.expand();\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n\r\n\t_expandSafely() {\r\n\t\tconst section = this._section;\r\n\t\tthis._preventClick = true;\r\n\t\ton(section, 'click', preventDefault);\r\n\t\tthis.expand();\r\n\t\tsetTimeout(() => {\r\n\t\t\toff(section, 'click', preventDefault);\r\n\t\t\tthis._preventClick = false;\r\n\t\t});\r\n\t}\r\n\r\n}\n\n/*\r\n * @class Control.Zoom\r\n * @inherits Control\r\n *\r\n * A basic zoom control with two buttons (zoom in and zoom out). It is put on the map by default unless you set its [`zoomControl` option](#map-zoomcontrol) to `false`. Extends `Control`.\r\n */\r\n\r\n// @namespace Control.Zoom\r\n// @constructor Control.Zoom(options: Control.Zoom options)\r\n// Creates a zoom control\r\nclass Zoom extends Control {\r\n\r\n\tstatic {\r\n\t\t// @section\r\n\t\t// @aka Control.Zoom options\r\n\t\tthis.setDefaultOptions({\r\n\t\t\t// @option position: String = 'topleft'\r\n\t\t\t// The position of the control (one of the map corners). Possible values are `'topleft'`,\r\n\t\t\t// `'topright'`, `'bottomleft'` or `'bottomright'`\r\n\t\t\tposition: 'topleft',\r\n\r\n\t\t\t// @option zoomInText: String = '<span aria-hidden=\"true\">+</span>'\r\n\t\t\t// The text set on the 'zoom in' button.\r\n\t\t\tzoomInText: '<span aria-hidden=\"true\">+</span>',\r\n\r\n\t\t\t// @option zoomInTitle: String = 'Zoom in'\r\n\t\t\t// The title set on the 'zoom in' button.\r\n\t\t\tzoomInTitle: 'Zoom in',\r\n\r\n\t\t\t// @option zoomOutText: String = '<span aria-hidden=\"true\">&#x2212;</span>'\r\n\t\t\t// The text set on the 'zoom out' button.\r\n\t\t\tzoomOutText: '<span aria-hidden=\"true\">&#x2212;</span>',\r\n\r\n\t\t\t// @option zoomOutTitle: String = 'Zoom out'\r\n\t\t\t// The title set on the 'zoom out' button.\r\n\t\t\tzoomOutTitle: 'Zoom out'\r\n\t\t});\r\n\t}\r\n\r\n\tonAdd(map) {\r\n\t\tconst zoomName = 'leaflet-control-zoom',\r\n\t\tcontainer = create$1('div', `${zoomName} leaflet-bar`),\r\n\t\toptions = this.options;\r\n\r\n\t\tthis._zoomInButton = this._createButton(options.zoomInText, options.zoomInTitle,\r\n\t\t\t`${zoomName}-in`, container, this._zoomIn);\r\n\t\tthis._zoomOutButton = this._createButton(options.zoomOutText, options.zoomOutTitle,\r\n\t\t\t`${zoomName}-out`, container, this._zoomOut);\r\n\r\n\t\tthis._updateDisabled();\r\n\t\tmap.on('zoomend zoomlevelschange', this._updateDisabled, this);\r\n\r\n\t\treturn container;\r\n\t}\r\n\r\n\tonRemove(map) {\r\n\t\tmap.off('zoomend zoomlevelschange', this._updateDisabled, this);\r\n\t}\r\n\r\n\tdisable() {\r\n\t\tthis._disabled = true;\r\n\t\tthis._updateDisabled();\r\n\t\treturn this;\r\n\t}\r\n\r\n\tenable() {\r\n\t\tthis._disabled = false;\r\n\t\tthis._updateDisabled();\r\n\t\treturn this;\r\n\t}\r\n\r\n\t_zoomIn(e) {\r\n\t\tif (!this._disabled && this._map._zoom < this._map.getMaxZoom()) {\r\n\t\t\tthis._map.zoomIn(this._map.options.zoomDelta * (e.shiftKey ? 3 : 1));\r\n\t\t}\r\n\t}\r\n\r\n\t_zoomOut(e) {\r\n\t\tif (!this._disabled && this._map._zoom > this._map.getMinZoom()) {\r\n\t\t\tthis._map.zoomOut(this._map.options.zoomDelta * (e.shiftKey ? 3 : 1));\r\n\t\t}\r\n\t}\r\n\r\n\t_createButton(html, title, className, container, fn) {\r\n\t\tconst link = create$1('a', className, container);\r\n\t\tlink.innerHTML = html;\r\n\t\tlink.href = '#';\r\n\t\tlink.title = title;\r\n\r\n\t\t/*\r\n\t\t * Will force screen readers like VoiceOver to read this as \"Zoom in - button\"\r\n\t\t */\r\n\t\tlink.setAttribute('role', 'button');\r\n\t\tlink.setAttribute('aria-label', title);\r\n\r\n\t\tdisableClickPropagation(link);\r\n\t\ton(link, 'click', stop);\r\n\t\ton(link, 'click', fn, this);\r\n\t\ton(link, 'click', this._refocusOnMap, this);\r\n\r\n\t\treturn link;\r\n\t}\r\n\r\n\t_updateDisabled() {\r\n\t\tconst map = this._map,\r\n\t\tclassName = 'leaflet-disabled';\r\n\r\n\t\tthis._zoomInButton.classList.remove(className);\r\n\t\tthis._zoomOutButton.classList.remove(className);\r\n\t\tthis._zoomInButton.setAttribute('aria-disabled', 'false');\r\n\t\tthis._zoomOutButton.setAttribute('aria-disabled', 'false');\r\n\r\n\t\tif (this._disabled || map._zoom === map.getMinZoom()) {\r\n\t\t\tthis._zoomOutButton.classList.add(className);\r\n\t\t\tthis._zoomOutButton.setAttribute('aria-disabled', 'true');\r\n\t\t}\r\n\t\tif (this._disabled || map._zoom === map.getMaxZoom()) {\r\n\t\t\tthis._zoomInButton.classList.add(className);\r\n\t\t\tthis._zoomInButton.setAttribute('aria-disabled', 'true');\r\n\t\t}\r\n\t}\r\n}\r\n\r\n// @namespace Map\r\n// @section Control options\r\n// @option zoomControl: Boolean = true\r\n// Whether a [zoom control](#control-zoom) is added to the map by default.\r\nMap$1.mergeOptions({\r\n\tzoomControl: true\r\n});\r\n\r\nMap$1.addInitHook(function () {\r\n\tif (this.options.zoomControl) {\r\n\t\t// @section Controls\r\n\t\t// @property zoomControl: Control.Zoom\r\n\t\t// The default zoom control (only available if the\r\n\t\t// [`zoomControl` option](#map-zoomcontrol) was `true` when creating the map).\r\n\t\tthis.zoomControl = new Zoom();\r\n\t\tthis.addControl(this.zoomControl);\r\n\t}\r\n});\n\n/*\n * @class Control.Scale\n * @inherits Control\n *\n * A simple scale control that shows the scale of the current center of screen in metric (m/km) and imperial (mi/ft) systems. Extends `Control`.\n *\n * @example\n *\n * ```js\n * new Control.Scale().addTo(map);\n * ```\n */\n\n// @constructor Control.Scale(options?: Control.Scale options)\n// Creates an scale control with the given options.\nclass Scale extends Control {\n\n\tstatic {\n\t\t// @section\n\t\t// @aka Control.Scale options\n\t\tthis.setDefaultOptions({\n\t\t\t// @option position: String = 'bottomleft'\n\t\t\t// The position of the control (one of the map corners). Possible values are `'topleft'`,\n\t\t\t// `'topright'`, `'bottomleft'` or `'bottomright'`\n\t\t\tposition: 'bottomleft',\n\n\t\t\t// @option maxWidth: Number = 100\n\t\t\t// Maximum width of the control in pixels. The width is set dynamically to show round values (e.g. 100, 200, 500).\n\t\t\tmaxWidth: 100,\n\n\t\t\t// @option metric: Boolean = True\n\t\t\t// Whether to show the metric scale line (m/km).\n\t\t\tmetric: true,\n\n\t\t\t// @option imperial: Boolean = True\n\t\t\t// Whether to show the imperial scale line (mi/ft).\n\t\t\timperial: true,\n\n\t\t\t// @option updateWhenIdle: Boolean = false\n\t\t\t// If `true`, the control is updated on [`moveend`](#map-moveend), otherwise it's always up-to-date (updated on [`move`](#map-move)).\n\t\t\tupdateWhenIdle: false\n\t\t});\n\t}\n\n\tonAdd(map) {\n\t\tconst className = 'leaflet-control-scale',\n\t\tcontainer = create$1('div', className),\n\t\toptions = this.options;\n\n\t\tthis._addScales(options, `${className}-line`, container);\n\n\t\tmap.on(options.updateWhenIdle ? 'moveend' : 'move', this._update, this);\n\t\tmap.whenReady(this._update, this);\n\n\t\treturn container;\n\t}\n\n\tonRemove(map) {\n\t\tmap.off(this.options.updateWhenIdle ? 'moveend' : 'move', this._update, this);\n\t}\n\n\t_addScales(options, className, container) {\n\t\tif (options.metric) {\n\t\t\tthis._mScale = create$1('div', className, container);\n\t\t}\n\t\tif (options.imperial) {\n\t\t\tthis._iScale = create$1('div', className, container);\n\t\t}\n\t}\n\n\t_update() {\n\t\tconst map = this._map,\n\t\ty = map.getSize().y / 2;\n\n\t\tconst maxMeters = map.distance(\n\t\t\tmap.containerPointToLatLng([0, y]),\n\t\t\tmap.containerPointToLatLng([this.options.maxWidth, y]));\n\n\t\tthis._updateScales(maxMeters);\n\t}\n\n\t_updateScales(maxMeters) {\n\t\tif (this.options.metric && maxMeters) {\n\t\t\tthis._updateMetric(maxMeters);\n\t\t}\n\t\tif (this.options.imperial && maxMeters) {\n\t\t\tthis._updateImperial(maxMeters);\n\t\t}\n\t}\n\n\t_updateMetric(maxMeters) {\n\t\tconst meters = this._getRoundNum(maxMeters),\n\t\tlabel = meters < 1000 ? `${meters} m` : `${meters / 1000} km`;\n\n\t\tthis._updateScale(this._mScale, label, meters / maxMeters);\n\t}\n\n\t_updateImperial(maxMeters) {\n\t\tconst maxFeet = maxMeters * 3.2808399;\n\t\tlet maxMiles, miles, feet;\n\n\t\tif (maxFeet > 5280) {\n\t\t\tmaxMiles = maxFeet / 5280;\n\t\t\tmiles = this._getRoundNum(maxMiles);\n\t\t\tthis._updateScale(this._iScale, `${miles} mi`, miles / maxMiles);\n\n\t\t} else {\n\t\t\tfeet = this._getRoundNum(maxFeet);\n\t\t\tthis._updateScale(this._iScale, `${feet} ft`, feet / maxFeet);\n\t\t}\n\t}\n\n\t_updateScale(scale, text, ratio) {\n\t\tscale.style.width = `${Math.round(this.options.maxWidth * ratio)}px`;\n\t\tscale.innerHTML = text;\n\t}\n\n\t_getRoundNum(num) {\n\t\tconst pow10 = 10 ** ((`${Math.floor(num)}`).length - 1);\n\t\tlet d = num / pow10;\n\n\t\td = d >= 10 ? 10 :\n\t\t\td >= 5 ? 5 :\n\t\t\td >= 3 ? 3 :\n\t\t\td >= 2 ? 2 : 1;\n\n\t\treturn pow10 * d;\n\t}\n}\n\nconst ukrainianFlag = '<svg aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"8\" viewBox=\"0 0 12 8\" class=\"leaflet-attribution-flag\"><path fill=\"#4C7BE1\" d=\"M0 0h12v4H0z\"/><path fill=\"#FFD500\" d=\"M0 4h12v3H0z\"/><path fill=\"#E0BC00\" d=\"M0 7h12v1H0z\"/></svg>';\r\n\r\n\r\n/*\r\n * @class Control.Attribution\r\n * @inherits Control\r\n *\r\n * The attribution control allows you to display attribution data in a small text box on a map. It is put on the map by default unless you set its [`attributionControl` option](#map-attributioncontrol) to `false`, and it fetches attribution texts from layers with the [`getAttribution` method](#layer-getattribution) automatically. Extends Control.\r\n */\r\n\r\n// @namespace Control.Attribution\r\n// @constructor Control.Attribution(options: Control.Attribution options)\r\n// Creates an attribution control.\r\nclass Attribution extends Control {\r\n\r\n\tstatic {\r\n\t\t// @section\r\n\t\t// @aka Control.Attribution options\r\n\t\tthis.setDefaultOptions({\r\n\t\t\t// @option position: String = 'bottomright'\r\n\t\t\t// The position of the control (one of the map corners). Possible values are `'topleft'`,\r\n\t\t\t// `'topright'`, `'bottomleft'` or `'bottomright'`\r\n\t\t\tposition: 'bottomright',\r\n\r\n\t\t\t// @option prefix: String|false = 'Leaflet'\r\n\t\t\t// The HTML text shown before the attributions. Pass `false` to disable.\r\n\t\t\tprefix: `<a target=\"_blank\" href=\"https://leafletjs.com\" title=\"A JavaScript library for interactive maps\">${ukrainianFlag}Leaflet</a>`\r\n\t\t});\r\n\t}\r\n\r\n\tinitialize(options) {\r\n\t\tsetOptions(this, options);\r\n\r\n\t\tthis._attributions = {};\r\n\t}\r\n\r\n\tonAdd(map) {\r\n\t\tmap.attributionControl = this;\r\n\t\tthis._container = create$1('div', 'leaflet-control-attribution');\r\n\t\tdisableClickPropagation(this._container);\r\n\r\n\t\t// TODO ugly, refactor\r\n\t\tfor (const layer of Object.values(map._layers)) {\r\n\t\t\tif (layer.getAttribution) {\r\n\t\t\t\tthis.addAttribution(layer.getAttribution());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._update();\r\n\r\n\t\tmap.on('layeradd', this._addAttribution, this);\r\n\r\n\t\treturn this._container;\r\n\t}\r\n\r\n\tonRemove(map) {\r\n\t\tmap.off('layeradd', this._addAttribution, this);\r\n\t}\r\n\r\n\t_addAttribution(ev) {\r\n\t\tif (ev.layer.getAttribution) {\r\n\t\t\tthis.addAttribution(ev.layer.getAttribution());\r\n\t\t\tev.layer.once('remove', () => this.removeAttribution(ev.layer.getAttribution()));\r\n\t\t}\r\n\t}\r\n\r\n\t// @method setPrefix(prefix: String|false): this\r\n\t// The HTML text shown before the attributions. Pass `false` to disable.\r\n\tsetPrefix(prefix) {\r\n\t\tthis.options.prefix = prefix;\r\n\t\tthis._update();\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method addAttribution(text: String): this\r\n\t// Adds an attribution text (e.g. `'&copy; OpenStreetMap contributors'`).\r\n\taddAttribution(text) {\r\n\t\tif (!text) { return this; }\r\n\r\n\t\tif (!this._attributions[text]) {\r\n\t\t\tthis._attributions[text] = 0;\r\n\t\t}\r\n\t\tthis._attributions[text]++;\r\n\r\n\t\tthis._update();\r\n\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method removeAttribution(text: String): this\r\n\t// Removes an attribution text.\r\n\tremoveAttribution(text) {\r\n\t\tif (!text) { return this; }\r\n\r\n\t\tif (this._attributions[text]) {\r\n\t\t\tthis._attributions[text]--;\r\n\t\t\tthis._update();\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t}\r\n\r\n\t_update() {\r\n\t\tif (!this._map) { return; }\r\n\r\n\t\tconst attribs = Object.keys(this._attributions).filter(i => this._attributions[i]);\r\n\r\n\t\tconst prefixAndAttribs = [];\r\n\r\n\t\tif (this.options.prefix) {\r\n\t\t\tprefixAndAttribs.push(this.options.prefix);\r\n\t\t}\r\n\t\tif (attribs.length) {\r\n\t\t\tprefixAndAttribs.push(attribs.join(', '));\r\n\t\t}\r\n\r\n\t\tthis._container.innerHTML = prefixAndAttribs.join(' <span aria-hidden=\"true\">|</span> ');\r\n\t}\r\n}\r\n\r\n// @namespace Map\r\n// @section Control options\r\n// @option attributionControl: Boolean = true\r\n// Whether a [attribution control](#control-attribution) is added to the map by default.\r\nMap$1.mergeOptions({\r\n\tattributionControl: true\r\n});\r\n\r\nMap$1.addInitHook(function () {\r\n\tif (this.options.attributionControl) {\r\n\t\tnew Attribution().addTo(this);\r\n\t}\r\n});\n\nControl.Layers = Layers;\nControl.Zoom = Zoom;\nControl.Scale = Scale;\nControl.Attribution = Attribution;\n\n/*\n\tHandler is a base class for handler classes that are used internally to inject\n\tinteraction features like dragging to classes like Map and Marker.\n*/\n\n// @class Handler\n// Abstract class for map interaction handlers\n\nclass Handler extends Class {\n\tinitialize(map) {\n\t\tthis._map = map;\n\t}\n\n\t// @method enable(): this\n\t// Enables the handler\n\tenable() {\n\t\tif (this._enabled) { return this; }\n\n\t\tthis._enabled = true;\n\t\tthis.addHooks();\n\t\treturn this;\n\t}\n\n\t// @method disable(): this\n\t// Disables the handler\n\tdisable() {\n\t\tif (!this._enabled) { return this; }\n\n\t\tthis._enabled = false;\n\t\tthis.removeHooks();\n\t\treturn this;\n\t}\n\n\t// @method enabled(): Boolean\n\t// Returns `true` if the handler is enabled\n\tenabled() {\n\t\treturn !!this._enabled;\n\t}\n\n\t// @section Extension methods\n\t// Classes inheriting from `Handler` must implement the two following methods:\n\t// @method addHooks()\n\t// Called when the handler is enabled, should add event hooks.\n\t// @method removeHooks()\n\t// Called when the handler is disabled, should remove the event hooks added previously.\n}\n\n// @section There is static function which can be called without instantiating Handler:\n// @function addTo(map: Map, name: String): this\n// Adds a new Handler to the given map with the given name.\nHandler.addTo = function (map, name) {\n\tmap.addHandler(name, this);\n\treturn this;\n};\n\n/*\r\n * @class Draggable\r\n * @inherits Evented\r\n *\r\n * A class for making DOM elements draggable.\r\n * Used internally for map and marker dragging. Works on any DOM element\r\n *\r\n * @example\r\n * ```js\r\n * const draggable = new Draggable(elementToDrag);\r\n * draggable.enable();\r\n * ```\r\n */\r\n\r\nclass Draggable extends Evented {\r\n\r\n\tstatic {\r\n\t\tthis.setDefaultOptions({\r\n\t\t\t// @section\r\n\t\t\t// @aka Draggable options\r\n\t\t\t// @option clickTolerance: Number = 3\r\n\t\t\t// The max number of pixels a user can shift the pointer during a click\r\n\t\t\t// for it to be considered a valid click (as opposed to a pointer drag).\r\n\t\t\tclickTolerance: 3\r\n\t\t});\r\n\t}\r\n\r\n\t// @constructor Draggable(el: HTMLElement, dragHandle?: HTMLElement, preventOutline?: Boolean, options?: Draggable options)\r\n\t// Creates a `Draggable` object for moving `el` when you start dragging the `dragHandle` element (equals `el` itself by default).\r\n\tinitialize(element, dragStartTarget, preventOutline, options) {\r\n\t\tsetOptions(this, options);\r\n\r\n\t\tthis._element = element;\r\n\t\tthis._dragStartTarget = dragStartTarget ?? element;\r\n\t\tthis._preventOutline = preventOutline;\r\n\t}\r\n\r\n\t// @method enable()\r\n\t// Enables the dragging ability\r\n\tenable() {\r\n\t\tif (this._enabled) { return; }\r\n\r\n\t\ton(this._dragStartTarget, 'pointerdown', this._onDown, this);\r\n\r\n\t\tthis._enabled = true;\r\n\t}\r\n\r\n\t// @method disable()\r\n\t// Disables the dragging ability\r\n\tdisable() {\r\n\t\tif (!this._enabled) { return; }\r\n\r\n\t\t// If we're currently dragging this draggable,\r\n\t\t// disabling it counts as first ending the drag.\r\n\t\tif (Draggable._dragging === this) {\r\n\t\t\tthis.finishDrag(true);\r\n\t\t}\r\n\r\n\t\toff(this._dragStartTarget, 'pointerdown', this._onDown, this);\r\n\r\n\t\tthis._enabled = false;\r\n\t\tthis._moved = false;\r\n\t}\r\n\r\n\t_onDown(e) {\r\n\t\tthis._moved = false;\r\n\r\n\t\tif (this._element.classList.contains('leaflet-zoom-anim')) { return; }\r\n\r\n\t\tif (getPointers().length !== 1) {\r\n\t\t\t// Finish dragging to avoid conflict with touchZoom\r\n\t\t\tif (Draggable._dragging === this) {\r\n\t\t\t\tthis.finishDrag();\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (Draggable._dragging || e.shiftKey || (e.button !== 0 && e.pointerType !== 'touch')) { return; }\r\n\t\tDraggable._dragging = this; // Prevent dragging multiple objects at once.\r\n\r\n\t\tif (this._preventOutline) {\r\n\t\t\tpreventOutline(this._element);\r\n\t\t}\r\n\r\n\t\tdisableImageDrag();\r\n\t\tdisableTextSelection();\r\n\r\n\t\tif (this._moving) { return; }\r\n\r\n\t\t// @event down: Event\r\n\t\t// Fired when a drag is about to start.\r\n\t\tthis.fire('down');\r\n\r\n\t\tconst sizedParent = getSizedParentNode(this._element);\r\n\r\n\t\tthis._startPoint = new Point(e.clientX, e.clientY);\r\n\t\tthis._startPos = getPosition(this._element);\r\n\r\n\t\t// Cache the scale, so that we can continuously compensate for it during drag (_onMove).\r\n\t\tthis._parentScale = getScale(sizedParent);\r\n\r\n\t\ton(document, 'pointermove', this._onMove, this);\r\n\t\ton(document, 'pointerup pointercancel', this._onUp, this);\r\n\t}\r\n\r\n\t_onMove(e) {\r\n\t\tif (getPointers().length > 1) {\r\n\t\t\tthis._moved = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst offset = new Point(e.clientX, e.clientY)._subtract(this._startPoint);\r\n\r\n\t\tif (!offset.x && !offset.y) { return; }\r\n\t\tif (Math.abs(offset.x) + Math.abs(offset.y) < this.options.clickTolerance) { return; }\r\n\r\n\t\t// We assume that the parent container's position, border and scale do not change for the duration of the drag.\r\n\t\t// Therefore there is no need to account for the position and border (they are eliminated by the subtraction)\r\n\t\t// and we can use the cached value for the scale.\r\n\t\toffset.x /= this._parentScale.x;\r\n\t\toffset.y /= this._parentScale.y;\r\n\r\n\t\tif (e.cancelable) {\r\n\t\t\tpreventDefault(e);\r\n\t\t}\r\n\r\n\t\tif (!this._moved) {\r\n\t\t\t// @event dragstart: Event\r\n\t\t\t// Fired when a drag starts\r\n\t\t\tthis.fire('dragstart');\r\n\r\n\t\t\tthis._moved = true;\r\n\r\n\t\t\tdocument.body.classList.add('leaflet-dragging');\r\n\r\n\t\t\tthis._lastTarget = e.target ?? e.srcElement;\r\n\t\t\tthis._lastTarget.classList.add('leaflet-drag-target');\r\n\t\t}\r\n\r\n\t\tthis._newPos = this._startPos.add(offset);\r\n\t\tthis._moving = true;\r\n\r\n\t\tthis._lastEvent = e;\r\n\t\tthis._updatePosition();\r\n\t}\r\n\r\n\t_updatePosition() {\r\n\t\tconst e = {originalEvent: this._lastEvent};\r\n\r\n\t\t// @event predrag: Event\r\n\t\t// Fired continuously during dragging *before* each corresponding\r\n\t\t// update of the element's position.\r\n\t\tthis.fire('predrag', e);\r\n\t\tsetPosition(this._element, this._newPos);\r\n\r\n\t\t// @event drag: Event\r\n\t\t// Fired continuously during dragging.\r\n\t\tthis.fire('drag', e);\r\n\t}\r\n\r\n\t_onUp() {\r\n\t\tthis.finishDrag();\r\n\t}\r\n\r\n\tfinishDrag(noInertia) {\r\n\t\tdocument.body.classList.remove('leaflet-dragging');\r\n\r\n\t\tif (this._lastTarget) {\r\n\t\t\tthis._lastTarget.classList.remove('leaflet-drag-target');\r\n\t\t\tthis._lastTarget = null;\r\n\t\t}\r\n\r\n\t\toff(document, 'pointermove', this._onMove, this);\r\n\t\toff(document, 'pointerup pointercancel', this._onUp, this);\r\n\r\n\t\tenableImageDrag();\r\n\t\tenableTextSelection();\r\n\r\n\t\tconst fireDragend = this._moved && this._moving;\r\n\r\n\t\tthis._moving = false;\r\n\t\tDraggable._dragging = false;\r\n\r\n\t\tif (fireDragend) {\r\n\t\t\t// @event dragend: DragEndEvent\r\n\t\t\t// Fired when the drag ends.\r\n\t\t\tthis.fire('dragend', {\r\n\t\t\t\tnoInertia,\r\n\t\t\t\tdistance: this._newPos.distanceTo(this._startPos)\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n}\n\n/*\r\n * @namespace PolyUtil\r\n * Various utility functions for polygon geometries.\r\n */\r\n\r\n/* @function clipPolygon(points: Point[], bounds: Bounds, round?: Boolean): Point[]\r\n * Clips the polygon geometry defined by the given `points` by the given bounds (using the [Sutherland-Hodgman algorithm](https://en.wikipedia.org/wiki/Sutherland%E2%80%93Hodgman_algorithm)).\r\n * Used by Leaflet to only show polygon points that are on the screen or near, increasing\r\n * performance. Note that polygon points needs different algorithm for clipping\r\n * than polyline, so there's a separate method for it.\r\n */\r\nfunction clipPolygon(points, bounds, round) {\r\n\tlet clippedPoints,\r\n\ti, j, k,\r\n\ta, b,\r\n\tlen, edge, p;\r\n\tconst edges = [1, 4, 2, 8];\r\n\r\n\tfor (i = 0, len = points.length; i < len; i++) {\r\n\t\tpoints[i]._code = _getBitCode(points[i], bounds);\r\n\t}\r\n\r\n\t// for each edge (left, bottom, right, top)\r\n\tfor (k = 0; k < 4; k++) {\r\n\t\tedge = edges[k];\r\n\t\tclippedPoints = [];\r\n\r\n\t\tfor (i = 0, len = points.length, j = len - 1; i < len; j = i++) {\r\n\t\t\ta = points[i];\r\n\t\t\tb = points[j];\r\n\r\n\t\t\t// if a is inside the clip window\r\n\t\t\tif (!(a._code & edge)) {\r\n\t\t\t\t// if b is outside the clip window (a->b goes out of screen)\r\n\t\t\t\tif (b._code & edge) {\r\n\t\t\t\t\tp = _getEdgeIntersection(b, a, edge, bounds, round);\r\n\t\t\t\t\tp._code = _getBitCode(p, bounds);\r\n\t\t\t\t\tclippedPoints.push(p);\r\n\t\t\t\t}\r\n\t\t\t\tclippedPoints.push(a);\r\n\r\n\t\t\t// else if b is inside the clip window (a->b enters the screen)\r\n\t\t\t} else if (!(b._code & edge)) {\r\n\t\t\t\tp = _getEdgeIntersection(b, a, edge, bounds, round);\r\n\t\t\t\tp._code = _getBitCode(p, bounds);\r\n\t\t\t\tclippedPoints.push(p);\r\n\t\t\t}\r\n\t\t}\r\n\t\tpoints = clippedPoints;\r\n\t}\r\n\r\n\treturn points;\r\n}\r\n\r\n/* @function polygonCenter(latlngs: LatLng[], crs: CRS): LatLng\r\n * Returns the center ([centroid](http://en.wikipedia.org/wiki/Centroid)) of the passed LatLngs (first ring) from a polygon.\r\n */\r\nfunction polygonCenter(latlngs, crs) {\r\n\tlet i, j, p1, p2, f, area, x, y, center;\r\n\r\n\tif (!latlngs || latlngs.length === 0) {\r\n\t\tthrow new Error('latlngs not passed');\r\n\t}\r\n\r\n\tif (!isFlat(latlngs)) {\r\n\t\tconsole.warn('latlngs are not flat! Only the first ring will be used');\r\n\t\tlatlngs = latlngs[0];\r\n\t}\r\n\r\n\tlet centroidLatLng = new LatLng([0, 0]);\r\n\r\n\tconst bounds = new LatLngBounds(latlngs);\r\n\tconst areaBounds = bounds.getNorthWest().distanceTo(bounds.getSouthWest()) * bounds.getNorthEast().distanceTo(bounds.getNorthWest());\r\n\t// tests showed that below 1700 rounding errors are happening\r\n\tif (areaBounds < 1700) {\r\n\t\t// getting a inexact center, to move the latlngs near to [0, 0] to prevent rounding errors\r\n\t\tcentroidLatLng = centroid(latlngs);\r\n\t}\r\n\r\n\tconst len = latlngs.length;\r\n\tconst points = [];\r\n\tfor (i = 0; i < len; i++) {\r\n\t\tconst latlng = new LatLng(latlngs[i]);\r\n\t\tpoints.push(crs.project(new LatLng([latlng.lat - centroidLatLng.lat, latlng.lng - centroidLatLng.lng])));\r\n\t}\r\n\r\n\tarea = x = y = 0;\r\n\r\n\t// polygon centroid algorithm;\r\n\tfor (i = 0, j = len - 1; i < len; j = i++) {\r\n\t\tp1 = points[i];\r\n\t\tp2 = points[j];\r\n\r\n\t\tf = p1.y * p2.x - p2.y * p1.x;\r\n\t\tx += (p1.x + p2.x) * f;\r\n\t\ty += (p1.y + p2.y) * f;\r\n\t\tarea += f * 3;\r\n\t}\r\n\r\n\tif (area === 0) {\r\n\t\t// Polygon is so small that all points are on same pixel.\r\n\t\tcenter = points[0];\r\n\t} else {\r\n\t\tcenter = [x / area, y / area];\r\n\t}\r\n\r\n\tconst latlngCenter = crs.unproject(new Point(center));\r\n\treturn new LatLng([latlngCenter.lat + centroidLatLng.lat, latlngCenter.lng + centroidLatLng.lng]);\r\n}\r\n\r\n/* @function centroid(latlngs: LatLng[]): LatLng\r\n * Returns the 'center of mass' of the passed LatLngs.\r\n */\r\nfunction centroid(coords) {\r\n\tlet latSum = 0;\r\n\tlet lngSum = 0;\r\n\tlet len = 0;\r\n\tfor (const coord of coords) {\r\n\t\tconst latlng = new LatLng(coord);\r\n\t\tlatSum += latlng.lat;\r\n\t\tlngSum += latlng.lng;\r\n\t\tlen++;\r\n\t}\r\n\treturn new LatLng([latSum / len, lngSum / len]);\r\n}\n\nvar PolyUtil = {\n\t__proto__: null,\n\tcentroid: centroid,\n\tclipPolygon: clipPolygon,\n\tpolygonCenter: polygonCenter\n};\n\n/*\r\n * @namespace LineUtil\r\n *\r\n * Various utility functions for polyline points processing, used by Leaflet internally to make polylines lightning-fast.\r\n */\r\n\r\n// Simplify polyline with vertex reduction and Douglas-Peucker simplification.\r\n// Improves rendering performance dramatically by lessening the number of points to draw.\r\n\r\n// @function simplify(points: Point[], tolerance: Number): Point[]\r\n// Dramatically reduces the number of points in a polyline while retaining\r\n// its shape and returns a new array of simplified points, using the\r\n// [Ramer-Douglas-Peucker algorithm](https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm).\r\n// Used for a huge performance boost when processing/displaying Leaflet polylines for\r\n// each zoom level and also reducing visual noise. tolerance affects the amount of\r\n// simplification (lesser value means higher quality but slower and with more points).\r\n// Also released as a separated micro-library [Simplify.js](https://mourner.github.io/simplify-js/).\r\nfunction simplify(points, tolerance) {\r\n\tif (!tolerance || !points.length) {\r\n\t\treturn points.slice();\r\n\t}\r\n\r\n\tconst sqTolerance = tolerance * tolerance;\r\n\r\n\t// stage 1: vertex reduction\r\n\tpoints = _reducePoints(points, sqTolerance);\r\n\r\n\t// stage 2: Douglas-Peucker simplification\r\n\tpoints = _simplifyDP(points, sqTolerance);\r\n\r\n\treturn points;\r\n}\r\n\r\n// @function pointToSegmentDistance(p: Point, p1: Point, p2: Point): Number\r\n// Returns the distance between point `p` and segment `p1` to `p2`.\r\nfunction pointToSegmentDistance(p, p1, p2) {\r\n\treturn Math.sqrt(_sqClosestPointOnSegment(p, p1, p2, true));\r\n}\r\n\r\n// @function closestPointOnSegment(p: Point, p1: Point, p2: Point): Number\r\n// Returns the closest point from a point `p` on a segment `p1` to `p2`.\r\nfunction closestPointOnSegment(p, p1, p2) {\r\n\treturn _sqClosestPointOnSegment(p, p1, p2);\r\n}\r\n\r\n// Ramer-Douglas-Peucker simplification, see https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm\r\nfunction _simplifyDP(points, sqTolerance) {\r\n\r\n\tconst len = points.length,\r\n\tmarkers = new Uint8Array(len);\r\n\tmarkers[0] = markers[len - 1] = 1;\r\n\r\n\t_simplifyDPStep(points, markers, sqTolerance, 0, len - 1);\r\n\r\n\tlet i;\r\n\tconst newPoints = [];\r\n\r\n\tfor (i = 0; i < len; i++) {\r\n\t\tif (markers[i]) {\r\n\t\t\tnewPoints.push(points[i]);\r\n\t\t}\r\n\t}\r\n\r\n\treturn newPoints;\r\n}\r\n\r\nfunction _simplifyDPStep(points, markers, sqTolerance, first, last) {\r\n\r\n\tlet maxSqDist = 0,\r\n\tindex, i, sqDist;\r\n\r\n\tfor (i = first + 1; i <= last - 1; i++) {\r\n\t\tsqDist = _sqClosestPointOnSegment(points[i], points[first], points[last], true);\r\n\r\n\t\tif (sqDist > maxSqDist) {\r\n\t\t\tindex = i;\r\n\t\t\tmaxSqDist = sqDist;\r\n\t\t}\r\n\t}\r\n\r\n\tif (maxSqDist > sqTolerance) {\r\n\t\tmarkers[index] = 1;\r\n\r\n\t\t_simplifyDPStep(points, markers, sqTolerance, first, index);\r\n\t\t_simplifyDPStep(points, markers, sqTolerance, index, last);\r\n\t}\r\n}\r\n\r\n// reduce points that are too close to each other to a single point\r\nfunction _reducePoints(points, sqTolerance) {\r\n\tconst reducedPoints = [points[0]];\r\n\tlet prev = 0;\r\n\r\n\tfor (let i = 1; i < points.length; i++) {\r\n\t\tif (_sqDist(points[i], points[prev]) > sqTolerance) {\r\n\t\t\treducedPoints.push(points[i]);\r\n\t\t\tprev = i;\r\n\t\t}\r\n\t}\r\n\tif (prev < points.length - 1) {\r\n\t\treducedPoints.push(points[points.length - 1]);\r\n\t}\r\n\treturn reducedPoints;\r\n}\r\n\r\nlet _lastCode;\r\n\r\n// @function clipSegment(a: Point, b: Point, bounds: Bounds, useLastCode?: Boolean, round?: Boolean): Point[]|Boolean\r\n// Clips the segment a to b by rectangular bounds with the\r\n// [Cohen-Sutherland algorithm](https://en.wikipedia.org/wiki/Cohen%E2%80%93Sutherland_algorithm)\r\n// (modifying the segment points directly!). Used by Leaflet to only show polyline\r\n// points that are on the screen or near, increasing performance.\r\nfunction clipSegment(a, b, bounds, useLastCode, round) {\r\n\tlet codeA = useLastCode ? _lastCode : _getBitCode(a, bounds),\r\n\tcodeB = _getBitCode(b, bounds),\r\n\r\n\tcodeOut, p, newCode;\r\n\r\n\t// save 2nd code to avoid calculating it on the next segment\r\n\t_lastCode = codeB;\r\n\r\n\twhile (true) {\r\n\t\t// if a,b is inside the clip window (trivial accept)\r\n\t\tif (!(codeA | codeB)) {\r\n\t\t\treturn [a, b];\r\n\t\t}\r\n\r\n\t\t// if a,b is outside the clip window (trivial reject)\r\n\t\tif (codeA & codeB) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// other cases\r\n\t\tcodeOut = codeA || codeB;\r\n\t\tp = _getEdgeIntersection(a, b, codeOut, bounds, round);\r\n\t\tnewCode = _getBitCode(p, bounds);\r\n\r\n\t\tif (codeOut === codeA) {\r\n\t\t\ta = p;\r\n\t\t\tcodeA = newCode;\r\n\t\t} else {\r\n\t\t\tb = p;\r\n\t\t\tcodeB = newCode;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction _getEdgeIntersection(a, b, code, bounds, round) {\r\n\tconst dx = b.x - a.x,\r\n\tdy = b.y - a.y,\r\n\tmin = bounds.min,\r\n\tmax = bounds.max;\r\n\tlet x, y;\r\n\r\n\tif (code & 8) { // top\r\n\t\tx = a.x + dx * (max.y - a.y) / dy;\r\n\t\ty = max.y;\r\n\r\n\t} else if (code & 4) { // bottom\r\n\t\tx = a.x + dx * (min.y - a.y) / dy;\r\n\t\ty = min.y;\r\n\r\n\t} else if (code & 2) { // right\r\n\t\tx = max.x;\r\n\t\ty = a.y + dy * (max.x - a.x) / dx;\r\n\r\n\t} else if (code & 1) { // left\r\n\t\tx = min.x;\r\n\t\ty = a.y + dy * (min.x - a.x) / dx;\r\n\t}\r\n\r\n\treturn new Point(x, y, round);\r\n}\r\n\r\nfunction _getBitCode(p, bounds) {\r\n\tlet code = 0;\r\n\r\n\tif (p.x < bounds.min.x) { // left\r\n\t\tcode |= 1;\r\n\t} else if (p.x > bounds.max.x) { // right\r\n\t\tcode |= 2;\r\n\t}\r\n\r\n\tif (p.y < bounds.min.y) { // bottom\r\n\t\tcode |= 4;\r\n\t} else if (p.y > bounds.max.y) { // top\r\n\t\tcode |= 8;\r\n\t}\r\n\r\n\treturn code;\r\n}\r\n\r\n// square distance (to avoid unnecessary Math.sqrt calls)\r\nfunction _sqDist(p1, p2) {\r\n\tconst dx = p2.x - p1.x,\r\n\tdy = p2.y - p1.y;\r\n\treturn dx * dx + dy * dy;\r\n}\r\n\r\n// return closest point on segment or distance to that point\r\nfunction _sqClosestPointOnSegment(p, p1, p2, sqDist) {\r\n\tlet x = p1.x,\r\n\ty = p1.y,\r\n\tdx = p2.x - x,\r\n\tdy = p2.y - y,\r\n\tt;\r\n\tconst dot = dx * dx + dy * dy;\r\n\r\n\tif (dot > 0) {\r\n\t\tt = ((p.x - x) * dx + (p.y - y) * dy) / dot;\r\n\r\n\t\tif (t > 1) {\r\n\t\t\tx = p2.x;\r\n\t\t\ty = p2.y;\r\n\t\t} else if (t > 0) {\r\n\t\t\tx += dx * t;\r\n\t\t\ty += dy * t;\r\n\t\t}\r\n\t}\r\n\r\n\tdx = p.x - x;\r\n\tdy = p.y - y;\r\n\r\n\treturn sqDist ? dx * dx + dy * dy : new Point(x, y);\r\n}\r\n\r\n\r\n// @function isFlat(latlngs: LatLng[]): Boolean\r\n// Returns true if `latlngs` is a flat array, false is nested.\r\nfunction isFlat(latlngs) {\r\n\treturn !Array.isArray(latlngs[0]) || (typeof latlngs[0][0] !== 'object' && typeof latlngs[0][0] !== 'undefined');\r\n}\r\n\r\n/* @function polylineCenter(latlngs: LatLng[], crs: CRS): LatLng\r\n * Returns the center ([centroid](http://en.wikipedia.org/wiki/Centroid)) of the passed LatLngs (first ring) from a polyline.\r\n */\r\nfunction polylineCenter(latlngs, crs) {\r\n\tlet i, halfDist, segDist, dist, p1, p2, ratio, center;\r\n\r\n\tif (!latlngs || latlngs.length === 0) {\r\n\t\tthrow new Error('latlngs not passed');\r\n\t}\r\n\r\n\tif (!isFlat(latlngs)) {\r\n\t\tconsole.warn('latlngs are not flat! Only the first ring will be used');\r\n\t\tlatlngs = latlngs[0];\r\n\t}\r\n\r\n\tlet centroidLatLng = new LatLng([0, 0]);\r\n\r\n\tconst bounds = new LatLngBounds(latlngs);\r\n\tconst areaBounds = bounds.getNorthWest().distanceTo(bounds.getSouthWest()) * bounds.getNorthEast().distanceTo(bounds.getNorthWest());\r\n\t// tests showed that below 1700 rounding errors are happening\r\n\tif (areaBounds < 1700) {\r\n\t\t// getting a inexact center, to move the latlngs near to [0, 0] to prevent rounding errors\r\n\t\tcentroidLatLng = centroid(latlngs);\r\n\t}\r\n\r\n\tconst len = latlngs.length;\r\n\tconst points = [];\r\n\tfor (i = 0; i < len; i++) {\r\n\t\tconst latlng = new LatLng(latlngs[i]);\r\n\t\tpoints.push(crs.project(new LatLng([latlng.lat - centroidLatLng.lat, latlng.lng - centroidLatLng.lng])));\r\n\t}\r\n\r\n\tfor (i = 0, halfDist = 0; i < len - 1; i++) {\r\n\t\thalfDist += points[i].distanceTo(points[i + 1]) / 2;\r\n\t}\r\n\r\n\t// The line is so small in the current view that all points are on the same pixel.\r\n\tif (halfDist === 0) {\r\n\t\tcenter = points[0];\r\n\t} else {\r\n\t\tfor (i = 0, dist = 0; i < len - 1; i++) {\r\n\t\t\tp1 = points[i];\r\n\t\t\tp2 = points[i + 1];\r\n\t\t\tsegDist = p1.distanceTo(p2);\r\n\t\t\tdist += segDist;\r\n\r\n\t\t\tif (dist > halfDist) {\r\n\t\t\t\tratio = (dist - halfDist) / segDist;\r\n\t\t\t\tcenter = [\r\n\t\t\t\t\tp2.x - ratio * (p2.x - p1.x),\r\n\t\t\t\t\tp2.y - ratio * (p2.y - p1.y)\r\n\t\t\t\t];\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tconst latlngCenter = crs.unproject(new Point(center));\r\n\treturn new LatLng([latlngCenter.lat + centroidLatLng.lat, latlngCenter.lng + centroidLatLng.lng]);\r\n}\n\nvar LineUtil = {\n\t__proto__: null,\n\t_getBitCode: _getBitCode,\n\t_getEdgeIntersection: _getEdgeIntersection,\n\t_sqClosestPointOnSegment: _sqClosestPointOnSegment,\n\tclipSegment: clipSegment,\n\tclosestPointOnSegment: closestPointOnSegment,\n\tisFlat: isFlat,\n\tpointToSegmentDistance: pointToSegmentDistance,\n\tpolylineCenter: polylineCenter,\n\tsimplify: simplify\n};\n\n/*\r\n * @namespace Projection\r\n * @section\r\n * Leaflet comes with a set of already defined Projections out of the box:\r\n *\r\n * @projection Projection.LonLat\r\n *\r\n * Equirectangular, or Plate Carree projection — the most simple projection,\r\n * mostly used by GIS enthusiasts. Directly maps `x` as longitude, and `y` as\r\n * latitude. Also suitable for flat worlds, e.g. game maps. Used by the\r\n * `EPSG:4326` and `Simple` CRS.\r\n */\r\n\r\nconst LonLat = {\r\n\tproject(latlng) {\r\n\t\tlatlng = new LatLng(latlng);\r\n\t\treturn new Point(latlng.lng, latlng.lat);\r\n\t},\r\n\r\n\tunproject(point) {\r\n\t\tpoint = new Point(point);\r\n\t\treturn new LatLng(point.y, point.x);\r\n\t},\r\n\r\n\tbounds: new Bounds([-180, -90], [180, 90])\r\n};\n\n/*\r\n * @namespace Projection\r\n * @projection Projection.Mercator\r\n *\r\n * Elliptical Mercator projection — more complex than Spherical Mercator. Assumes that Earth is an ellipsoid. Used by the EPSG:3395 CRS.\r\n */\r\n\r\nconst earthRadius = 6378137;\r\n\r\nconst Mercator = {\r\n\tR: earthRadius,\r\n\tR_MINOR: 6356752.314245179,\r\n\r\n\tbounds: new Bounds([-20037508.34279, -15496570.73972], [20037508.34279, 18764656.23138]),\r\n\r\n\tproject(latlng) {\r\n\t\tlatlng = new LatLng(latlng);\r\n\t\tconst d = Math.PI / 180,\r\n\t\tr = this.R,\r\n\t\ttmp = this.R_MINOR / r,\r\n\t\te = Math.sqrt(1 - tmp * tmp);\r\n\t\tlet y = latlng.lat * d;\r\n\t\tconst con = e * Math.sin(y);\r\n\r\n\t\tconst ts = Math.tan(Math.PI / 4 - y / 2) / ((1 - con) / (1 + con)) ** (e / 2);\r\n\t\ty = -r * Math.log(Math.max(ts, 1E-10));\r\n\r\n\t\treturn new Point(latlng.lng * d * r, y);\r\n\t},\r\n\r\n\tunproject(point) {\r\n\t\tpoint = new Point(point);\r\n\t\tconst d = 180 / Math.PI,\r\n\t\tr = this.R,\r\n\t\ttmp = this.R_MINOR / r,\r\n\t\te = Math.sqrt(1 - tmp * tmp),\r\n\t\tts = Math.exp(-point.y / r);\r\n\t\tlet phi = Math.PI / 2 - 2 * Math.atan(ts);\r\n\r\n\t\tfor (let i = 0, dphi = 0.1, con; i < 15 && Math.abs(dphi) > 1e-7; i++) {\r\n\t\t\tcon = e * Math.sin(phi);\r\n\t\t\tcon = ((1 - con) / (1 + con)) ** (e / 2);\r\n\t\t\tdphi = Math.PI / 2 - 2 * Math.atan(ts * con) - phi;\r\n\t\t\tphi += dphi;\r\n\t\t}\r\n\r\n\t\treturn new LatLng(phi * d, point.x * d / r);\r\n\t}\r\n};\n\n/*\n * @class Projection\n\n * An object with methods for projecting geographical coordinates of the world onto\n * a flat surface (and back). See [Map projection](https://en.wikipedia.org/wiki/Map_projection).\n\n * @property bounds: Bounds\n * The bounds (specified in CRS units) where the projection is valid\n\n * @method project(latlng: LatLng): Point\n * Projects geographical coordinates into a 2D point.\n * Only accepts actual `LatLng` instances, not arrays.\n\n * @method unproject(point: Point): LatLng\n * The inverse of `project`. Projects a 2D point into a geographical location.\n * Only accepts actual `Point` instances, not arrays.\n\n * Note that the projection instances do not inherit from Leaflet's `Class` object,\n * and can't be instantiated. Also, new classes can't inherit from them,\n * and methods can't be added to them with the `include` function.\n\n */\n\nvar index = {\n\t__proto__: null,\n\tLonLat: LonLat,\n\tMercator: Mercator,\n\tSphericalMercator: SphericalMercator\n};\n\n/*\r\n * @namespace CRS\r\n * @crs CRS.EPSG3395\r\n *\r\n * Rarely used by some commercial tile providers. Uses Elliptical Mercator projection.\r\n */\r\nclass EPSG3395 extends Earth {\r\n\tstatic code = 'EPSG:3395';\r\n\tstatic projection = Mercator;\r\n\r\n\tstatic transformation = (() => {\r\n\t\tconst scale = 0.5 / (Math.PI * Mercator.R);\r\n\t\treturn new Transformation(scale, 0.5, -scale, 0.5);\r\n\t})();\r\n}\n\n/*\r\n * @namespace CRS\r\n * @crs CRS.EPSG4326\r\n *\r\n * A common CRS among GIS enthusiasts. Uses simple Equirectangular projection.\r\n *\r\n * Leaflet complies with the [TMS coordinate scheme for EPSG:4326](https://wiki.osgeo.org/wiki/Tile_Map_Service_Specification#global-geodetic).\r\n * If you are using a `TileLayer` with this CRS, ensure that there are two 256x256 pixel tiles covering the\r\n * whole earth at zoom level zero, and that the tile coordinate origin is (-180,+90),\r\n * or (-180,-90) for `TileLayer`s with [the `tms` option](#tilelayer-tms) set.\r\n */\r\n\r\nclass EPSG4326 extends Earth {\r\n\tstatic code = 'EPSG:4326';\r\n\tstatic projection = LonLat;\r\n\tstatic transformation = new Transformation(1 / 180, 1, -1 / 180, 0.5);\r\n}\n\n/*\n * @namespace CRS\n * @crs CRS.Simple\n *\n * A simple CRS that maps longitude and latitude into `x` and `y` directly.\n * May be used for maps of flat surfaces (e.g. game maps). Note that the `y`\n * axis should still be inverted (going from bottom to top). `distance()` returns\n * simple euclidean distance.\n */\n\nclass Simple extends CRS {\n\tstatic projection = LonLat;\n\tstatic transformation = new Transformation(1, 0, -1, 0);\n\n\tstatic scale(zoom) {\n\t\treturn 2 ** zoom;\n\t}\n\n\tstatic zoom(scale) {\n\t\treturn Math.log(scale) / Math.LN2;\n\t}\n\n\tstatic distance(latlng1, latlng2) {\n\t\tconst dx = latlng2.lng - latlng1.lng,\n\t\tdy = latlng2.lat - latlng1.lat;\n\n\t\treturn Math.sqrt(dx * dx + dy * dy);\n\t}\n\n\tstatic infinite = true;\n}\n\nCRS.Earth = Earth;\nCRS.EPSG3395 = EPSG3395;\nCRS.EPSG3857 = EPSG3857;\nCRS.EPSG900913 = EPSG900913;\nCRS.EPSG4326 = EPSG4326;\nCRS.Simple = Simple;\n\n/*\n * @class Layer\n * @inherits Evented\n * @aka ILayer\n *\n * A set of methods from the Layer base class that all Leaflet layers use.\n * Inherits all methods, options and events from `Evented`.\n *\n * @example\n *\n * ```js\n * const layer = new Marker(latlng).addTo(map);\n * layer.addTo(map);\n * layer.remove();\n * ```\n *\n * @event add: Event\n * Fired after the layer is added to a map\n *\n * @event remove: Event\n * Fired after the layer is removed from a map\n */\n\n\nclass Layer extends Evented {\n\n\tstatic {\n\t\t// Classes extending `Layer` will inherit the following options:\n\t\tthis.setDefaultOptions({\n\t\t\t// @option pane: String = 'overlayPane'\n\t\t\t// By default the layer will be added to the map's [overlay pane](#map-overlaypane). Overriding this option will cause the layer to be placed on another pane by default.\n\t\t\t// Not effective if the `renderer` option is set (the `renderer` option will override the `pane` option).\n\t\t\tpane: 'overlayPane',\n\n\t\t\t// @option attribution: String = null\n\t\t\t// String to be shown in the attribution control, e.g. \"© OpenStreetMap contributors\". It describes the layer data and is often a legal obligation towards copyright holders and tile providers.\n\t\t\tattribution: null,\n\n\t\t\tbubblingPointerEvents: true\n\t\t});\n\t}\n\n\t/* @section\n\t * Classes extending `Layer` will inherit the following methods:\n\t *\n\t * @method addTo(map: Map|LayerGroup): this\n\t * Adds the layer to the given map or layer group.\n\t */\n\taddTo(map) {\n\t\tmap.addLayer(this);\n\t\treturn this;\n\t}\n\n\t// @method remove: this\n\t// Removes the layer from the map it is currently active on.\n\tremove() {\n\t\treturn this.removeFrom(this._map || this._mapToAdd);\n\t}\n\n\t// @method removeFrom(map: Map): this\n\t// Removes the layer from the given map\n\t//\n\t// @alternative\n\t// @method removeFrom(group: LayerGroup): this\n\t// Removes the layer from the given `LayerGroup`\n\tremoveFrom(obj) {\n\t\tobj?.removeLayer(this);\n\t\treturn this;\n\t}\n\n\t// @method getPane(name? : String): HTMLElement\n\t// Returns the `HTMLElement` representing the named pane on the map. If `name` is omitted, returns the pane for this layer.\n\tgetPane(name) {\n\t\treturn this._map.getPane(name ? (this.options[name] || name) : this.options.pane);\n\t}\n\n\taddInteractiveTarget(targetEl) {\n\t\tthis._map._targets[stamp(targetEl)] = this;\n\t\treturn this;\n\t}\n\n\tremoveInteractiveTarget(targetEl) {\n\t\tdelete this._map._targets[stamp(targetEl)];\n\t\treturn this;\n\t}\n\n\t// @method getAttribution: String\n\t// Used by the `attribution control`, returns the [attribution option](#gridlayer-attribution).\n\tgetAttribution() {\n\t\treturn this.options.attribution;\n\t}\n\n\t_layerAdd(e) {\n\t\tconst map = e.target;\n\n\t\t// check in case layer gets added and then removed before the map is ready\n\t\tif (!map.hasLayer(this)) { return; }\n\n\t\tthis._map = map;\n\t\tthis._zoomAnimated = map._zoomAnimated;\n\n\t\tif (this.getEvents) {\n\t\t\tconst events = this.getEvents();\n\t\t\tmap.on(events, this);\n\t\t\tthis.once('remove', () => map.off(events, this));\n\t\t}\n\n\t\tthis.onAdd(map);\n\n\t\tthis.fire('add');\n\t\tmap.fire('layeradd', {layer: this});\n\t}\n}\n\n/* @section Extension methods\n * @uninheritable\n *\n * Every layer should extend from `Layer` and (re-)implement the following methods.\n *\n * @method onAdd(map: Map): this\n * Should contain code that creates DOM elements for the layer, adds them to `map panes` where they should belong and puts listeners on relevant map events. Called on [`map.addLayer(layer)`](#map-addlayer).\n *\n * @method onRemove(map: Map): this\n * Should contain all clean up code that removes the layer's elements from the DOM and removes listeners previously added in [`onAdd`](#layer-onadd). Called on [`map.removeLayer(layer)`](#map-removelayer).\n *\n * @method getEvents(): Object\n * This optional method should return an object like `{ viewreset: this._reset }` for [`on`](#evented-on). The event handlers in this object will be automatically added and removed from the map with your layer.\n *\n * @method getAttribution(): String\n * This optional method should return a string containing HTML to be shown on the `Attribution control` whenever the layer is visible.\n *\n * @method beforeAdd(map: Map): this\n * Optional method. Called on [`map.addLayer(layer)`](#map-addlayer), before the layer is added to the map, before events are initialized, without waiting until the map is in a usable state. Use for early initialization only.\n */\n\n\n/* @namespace Map\n * @section Layer events\n *\n * @event layeradd: LayerEvent\n * Fired when a new layer is added to the map.\n *\n * @event layerremove: LayerEvent\n * Fired when some layer is removed from the map\n *\n * @section Methods for Layers and Controls\n */\nMap$1.include({\n\t// @method addLayer(layer: Layer): this\n\t// Adds the given layer to the map\n\taddLayer(layer) {\n\t\tif (!layer._layerAdd) {\n\t\t\tthrow new Error('The provided object is not a Layer.');\n\t\t}\n\n\t\tconst id = stamp(layer);\n\t\tif (this._layers[id]) { return this; }\n\t\tthis._layers[id] = layer;\n\n\t\tlayer._mapToAdd = this;\n\n\t\tif (layer.beforeAdd) {\n\t\t\tlayer.beforeAdd(this);\n\t\t}\n\n\t\tthis.whenReady(layer._layerAdd, layer);\n\n\t\treturn this;\n\t},\n\n\t// @method removeLayer(layer: Layer): this\n\t// Removes the given layer from the map.\n\tremoveLayer(layer) {\n\t\tconst id = stamp(layer);\n\n\t\tif (!this._layers[id]) { return this; }\n\n\t\tif (this._loaded) {\n\t\t\tlayer.onRemove(this);\n\t\t}\n\n\t\tdelete this._layers[id];\n\n\t\tif (this._loaded) {\n\t\t\tthis.fire('layerremove', {layer});\n\t\t\tlayer.fire('remove');\n\t\t}\n\n\t\tlayer._map = layer._mapToAdd = null;\n\n\t\treturn this;\n\t},\n\n\t// @method hasLayer(layer: Layer): Boolean\n\t// Returns `true` if the given layer is currently added to the map\n\thasLayer(layer) {\n\t\treturn stamp(layer) in this._layers;\n\t},\n\n\t/* @method eachLayer(fn: Function, context?: Object): this\n\t * Iterates over the layers of the map, optionally specifying context of the iterator function.\n\t * ```\n\t * map.eachLayer(function(layer){\n\t * layer.bindPopup('Hello');\n\t * });\n\t * ```\n\t */\n\teachLayer(method, context) {\n\t\tfor (const layer of Object.values(this._layers)) {\n\t\t\tmethod.call(context, layer);\n\t\t}\n\t\treturn this;\n\t},\n\n\t_addLayers(layers) {\n\t\tlayers = layers ? (Array.isArray(layers) ? layers : [layers]) : [];\n\n\t\tfor (const layer of layers) {\n\t\t\tthis.addLayer(layer);\n\t\t}\n\t},\n\n\t_addZoomLimit(layer) {\n\t\tif (!isNaN(layer.options.maxZoom) || !isNaN(layer.options.minZoom)) {\n\t\t\tthis._zoomBoundLayers[stamp(layer)] = layer;\n\t\t\tthis._updateZoomLevels();\n\t\t}\n\t},\n\n\t_removeZoomLimit(layer) {\n\t\tconst id = stamp(layer);\n\n\t\tif (this._zoomBoundLayers[id]) {\n\t\t\tdelete this._zoomBoundLayers[id];\n\t\t\tthis._updateZoomLevels();\n\t\t}\n\t},\n\n\t_updateZoomLevels() {\n\t\tlet minZoom = Infinity,\n\t\tmaxZoom = -Infinity;\n\t\tconst oldZoomSpan = this._getZoomSpan();\n\n\t\tfor (const l of Object.values(this._zoomBoundLayers)) {\n\t\t\tconst options = l.options;\n\t\t\tminZoom = Math.min(minZoom, options.minZoom ?? Infinity);\n\t\t\tmaxZoom = Math.max(maxZoom, options.maxZoom ?? -Infinity);\n\t\t}\n\n\t\tthis._layersMaxZoom = maxZoom === -Infinity ? undefined : maxZoom;\n\t\tthis._layersMinZoom = minZoom === Infinity ? undefined : minZoom;\n\n\t\t// @section Map state change events\n\t\t// @event zoomlevelschange: Event\n\t\t// Fired when the number of zoomlevels on the map is changed due\n\t\t// to adding or removing a layer.\n\t\tif (oldZoomSpan !== this._getZoomSpan()) {\n\t\t\tthis.fire('zoomlevelschange');\n\t\t}\n\n\t\tif (this.options.maxZoom === undefined && this._layersMaxZoom && this.getZoom() > this._layersMaxZoom) {\n\t\t\tthis.setZoom(this._layersMaxZoom);\n\t\t}\n\t\tif (this.options.minZoom === undefined && this._layersMinZoom && this.getZoom() < this._layersMinZoom) {\n\t\t\tthis.setZoom(this._layersMinZoom);\n\t\t}\n\t}\n});\n\n/*\r\n * @class LayerGroup\r\n * @inherits Interactive layer\r\n *\r\n * Used to group several layers and handle them as one. If you add it to the map,\r\n * any layers added or removed from the group will be added/removed on the map as\r\n * well. Extends `Layer`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * new LayerGroup([marker1, marker2])\r\n * \t.addLayer(polyline)\r\n * \t.addTo(map);\r\n * ```\r\n */\r\n\r\n// @constructor LayerGroup(layers?: Layer[], options?: Object)\r\n// Create a layer group, optionally given an initial set of layers and an `options` object.\r\nclass LayerGroup extends Layer {\r\n\r\n\tinitialize(layers, options) { // for compatibility of code using `LayerGroup.extend`\r\n\t\tsetOptions(this, options);\r\n\r\n\t\tthis._layers = {};\r\n\r\n\t\tfor (const layer of layers ?? []) {\r\n\t\t\tthis.addLayer(layer);\r\n\t\t}\r\n\t}\r\n\r\n\t// @method addLayer(layer: Layer): this\r\n\t// Adds the given layer to the group.\r\n\taddLayer(layer) {\r\n\t\tconst id = this.getLayerId(layer);\r\n\r\n\t\tthis._layers[id] = layer;\r\n\r\n\t\tthis._map?.addLayer(layer);\r\n\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method removeLayer(layer: Layer): this\r\n\t// Removes the given layer from the group.\r\n\t// @alternative\r\n\t// @method removeLayer(id: Number): this\r\n\t// Removes the layer with the given internal ID from the group.\r\n\tremoveLayer(layer) {\r\n\t\tconst id = layer in this._layers ? layer : this.getLayerId(layer);\r\n\r\n\t\tif (this._map && this._layers[id]) {\r\n\t\t\tthis._map.removeLayer(this._layers[id]);\r\n\t\t}\r\n\r\n\t\tdelete this._layers[id];\r\n\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method hasLayer(layer: Layer): Boolean\r\n\t// Returns `true` if the given layer is currently added to the group.\r\n\t// @alternative\r\n\t// @method hasLayer(id: Number): Boolean\r\n\t// Returns `true` if the given internal ID is currently added to the group.\r\n\thasLayer(layer) {\r\n\t\tconst layerId = typeof layer === 'number' ? layer : this.getLayerId(layer);\r\n\t\treturn layerId in this._layers;\r\n\t}\r\n\r\n\t// @method clearLayers(): this\r\n\t// Removes all the layers from the group.\r\n\tclearLayers() {\r\n\t\treturn this.eachLayer(this.removeLayer, this);\r\n\t}\r\n\r\n\t// @method invoke(methodName: String, …): this\r\n\t// Calls `methodName` on every layer contained in this group, passing any\r\n\t// additional parameters. Has no effect if the layers contained do not\r\n\t// implement `methodName`.\r\n\tinvoke(methodName, ...args) {\r\n\t\tfor (const layer of Object.values(this._layers)) {\r\n\t\t\tlayer[methodName]?.apply(layer, args);\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n\r\n\tonAdd(map) {\r\n\t\tthis.eachLayer(map.addLayer, map);\r\n\t}\r\n\r\n\tonRemove(map) {\r\n\t\tthis.eachLayer(map.removeLayer, map);\r\n\t}\r\n\r\n\t// @method eachLayer(fn: Function, context?: Object): this\r\n\t// Iterates over the layers of the group, optionally specifying context of the iterator function.\r\n\t// ```js\r\n\t// group.eachLayer(layer => layer.bindPopup('Hello'));\r\n\t// ```\r\n\teachLayer(method, context) {\r\n\t\tfor (const layer of Object.values(this._layers)) {\r\n\t\t\tmethod.call(context, layer);\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method getLayer(id: Number): Layer\r\n\t// Returns the layer with the given internal ID.\r\n\tgetLayer(id) {\r\n\t\treturn this._layers[id];\r\n\t}\r\n\r\n\t// @method getLayers(): Layer[]\r\n\t// Returns an array of all the layers added to the group.\r\n\tgetLayers() {\r\n\t\tconst layers = [];\r\n\t\tthis.eachLayer(layers.push, layers);\r\n\t\treturn layers;\r\n\t}\r\n\r\n\t// @method setZIndex(zIndex: Number): this\r\n\t// Calls `setZIndex` on every layer contained in this group, passing the z-index.\r\n\tsetZIndex(zIndex) {\r\n\t\treturn this.invoke('setZIndex', zIndex);\r\n\t}\r\n\r\n\t// @method getLayerId(layer: Layer): Number\r\n\t// Returns the internal ID for a layer\r\n\tgetLayerId(layer) {\r\n\t\treturn stamp(layer);\r\n\t}\r\n}\n\n/*\r\n * @class FeatureGroup\r\n * @inherits LayerGroup\r\n *\r\n * Extended `LayerGroup` that makes it easier to do the same thing to all its member layers:\r\n * * [`bindPopup`](#layer-bindpopup) binds a popup to all of the layers at once (likewise with [`bindTooltip`](#layer-bindtooltip))\r\n * * Events are propagated to the `FeatureGroup`, so if the group has an event\r\n * handler, it will handle events from any of the layers. This includes pointer events\r\n * and custom events.\r\n * * Has `layeradd` and `layerremove` events\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * new FeatureGroup([marker1, marker2, polyline])\r\n * \t.bindPopup('Hello world!')\r\n * \t.on('click', function() { alert('Clicked on a member of the group!'); })\r\n * \t.addTo(map);\r\n * ```\r\n */\r\n\r\n// @constructor FeatureGroup(layers?: Layer[], options?: Object)\r\n// Create a feature group, optionally given an initial set of layers and an `options` object.\r\nclass FeatureGroup extends LayerGroup {\r\n\r\n\taddLayer(layer) {\r\n\t\tif (this.hasLayer(layer)) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tlayer.addEventParent(this);\r\n\r\n\t\tLayerGroup.prototype.addLayer.call(this, layer);\r\n\r\n\t\t// @event layeradd: LayerEvent\r\n\t\t// Fired when a layer is added to this `FeatureGroup`\r\n\t\treturn this.fire('layeradd', {layer});\r\n\t}\r\n\r\n\tremoveLayer(layer) {\r\n\t\tif (!this.hasLayer(layer)) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\tif (layer in this._layers) {\r\n\t\t\tlayer = this._layers[layer];\r\n\t\t}\r\n\r\n\t\tlayer.removeEventParent(this);\r\n\r\n\t\tLayerGroup.prototype.removeLayer.call(this, layer);\r\n\r\n\t\t// @event layerremove: LayerEvent\r\n\t\t// Fired when a layer is removed from this `FeatureGroup`\r\n\t\treturn this.fire('layerremove', {layer});\r\n\t}\r\n\r\n\t// @method setStyle(style: Path options): this\r\n\t// Sets the given path options to each layer of the group that has a `setStyle` method.\r\n\tsetStyle(style) {\r\n\t\treturn this.invoke('setStyle', style);\r\n\t}\r\n\r\n\t// @method bringToFront(): this\r\n\t// Brings the layer group to the top of all other layers\r\n\tbringToFront() {\r\n\t\treturn this.invoke('bringToFront');\r\n\t}\r\n\r\n\t// @method bringToBack(): this\r\n\t// Brings the layer group to the back of all other layers\r\n\tbringToBack() {\r\n\t\treturn this.invoke('bringToBack');\r\n\t}\r\n\r\n\t// @method getBounds(): LatLngBounds\r\n\t// Returns the LatLngBounds of the Feature Group (created from bounds and coordinates of its children).\r\n\tgetBounds() {\r\n\t\tconst bounds = new LatLngBounds();\r\n\r\n\t\tfor (const layer of Object.values(this._layers)) {\r\n\t\t\tbounds.extend(layer.getBounds ? layer.getBounds() : layer.getLatLng());\r\n\t\t}\r\n\t\treturn bounds;\r\n\t}\r\n}\n\n/*\r\n * @class Icon\r\n *\r\n * Represents an icon to provide when creating a marker.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * const myIcon = new Icon({\r\n * iconUrl: 'my-icon.png',\r\n * iconRetinaUrl: 'my-icon@2x.png',\r\n * iconSize: [38, 95],\r\n * iconAnchor: [22, 94],\r\n * popupAnchor: [-3, -76],\r\n * shadowUrl: 'my-icon-shadow.png',\r\n * shadowRetinaUrl: 'my-icon-shadow@2x.png',\r\n * shadowSize: [68, 95],\r\n * shadowAnchor: [22, 94]\r\n * });\r\n *\r\n * new Marker([50.505, 30.57], {icon: myIcon}).addTo(map);\r\n * ```\r\n *\r\n * `Icon.Default` extends `Icon` and is the blue icon Leaflet uses for markers by default.\r\n *\r\n */\r\n\r\n// @constructor Icon(options: Icon options)\r\n// Creates an icon instance with the given options.\r\nclass Icon extends Class {\r\n\r\n\tstatic {\r\n\t\t/* @section\r\n\t\t * @aka Icon options\r\n\t\t *\r\n\t\t * @option iconUrl: String = null\r\n\t\t * **(required)** The URL to the icon image (absolute or relative to your script path).\r\n\t\t *\r\n\t\t * @option iconRetinaUrl: String = null\r\n\t\t * The URL to a retina sized version of the icon image (absolute or relative to your\r\n\t\t * script path). Used for Retina screen devices.\r\n\t\t *\r\n\t\t * @option iconSize: Point = null\r\n\t\t * Size of the icon image in pixels.\r\n\t\t *\r\n\t\t * @option iconAnchor: Point = null\r\n\t\t * The coordinates of the \"tip\" of the icon (relative to its top left corner). The icon\r\n\t\t * will be aligned so that this point is at the marker's geographical location. Centered\r\n\t\t * by default if size is specified, also can be set in CSS with negative margins.\r\n\t\t *\r\n\t\t * @option popupAnchor: Point = [0, 0]\r\n\t\t * The coordinates of the point from which popups will \"open\", relative to the icon anchor.\r\n\t\t *\r\n\t\t * @option tooltipAnchor: Point = [0, 0]\r\n\t\t * The coordinates of the point from which tooltips will \"open\", relative to the icon anchor.\r\n\t\t *\r\n\t\t * @option shadowUrl: String = null\r\n\t\t * The URL to the icon shadow image. If not specified, no shadow image will be created.\r\n\t\t *\r\n\t\t * @option shadowRetinaUrl: String = null\r\n\t\t *\r\n\t\t * @option shadowSize: Point = null\r\n\t\t * Size of the shadow image in pixels.\r\n\t\t *\r\n\t\t * @option shadowAnchor: Point = null\r\n\t\t * The coordinates of the \"tip\" of the shadow (relative to its top left corner) (the same\r\n\t\t * as iconAnchor if not specified).\r\n\t\t *\r\n\t\t * @option className: String = ''\r\n\t\t * A custom class name to assign to both icon and shadow images. Empty by default.\r\n\t\t */\r\n\t\tthis.setDefaultOptions({\r\n\t\t\tpopupAnchor: [0, 0],\r\n\t\t\ttooltipAnchor: [0, 0],\r\n\r\n\t\t\t// @option crossOrigin: Boolean|String = false\r\n\t\t\t// Whether the crossOrigin attribute will be added to the tiles.\r\n\t\t\t// If a String is provided, all tiles will have their crossOrigin attribute set to the String provided. This is needed if you want to access tile pixel data.\r\n\t\t\t// Refer to [CORS Settings](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for valid String values.\r\n\t\t\tcrossOrigin: false\r\n\t\t});\r\n\t}\r\n\r\n\tinitialize(options) {\r\n\t\tsetOptions(this, options);\r\n\t}\r\n\r\n\t// @method createIcon(oldIcon?: HTMLElement): HTMLElement\r\n\t// Called internally when the icon has to be shown, returns a `<img>` HTML element\r\n\t// styled according to the options.\r\n\tcreateIcon(oldIcon) {\r\n\t\treturn this._createIcon('icon', oldIcon);\r\n\t}\r\n\r\n\t// @method createShadow(oldIcon?: HTMLElement): HTMLElement\r\n\t// As `createIcon`, but for the shadow beneath it.\r\n\tcreateShadow(oldIcon) {\r\n\t\treturn this._createIcon('shadow', oldIcon);\r\n\t}\r\n\r\n\t_createIcon(name, oldIcon) {\r\n\t\tconst src = this._getIconUrl(name);\r\n\r\n\t\tif (!src) {\r\n\t\t\tif (name === 'icon') {\r\n\t\t\t\tthrow new Error('iconUrl not set in Icon options (see the docs).');\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tconst img = this._createImg(src, oldIcon && oldIcon.tagName === 'IMG' ? oldIcon : null);\r\n\t\tthis._setIconStyles(img, name);\r\n\r\n\t\tif (this.options.crossOrigin || this.options.crossOrigin === '') {\r\n\t\t\timg.crossOrigin = this.options.crossOrigin === true ? '' : this.options.crossOrigin;\r\n\t\t}\r\n\r\n\t\treturn img;\r\n\t}\r\n\r\n\t_setIconStyles(img, name) {\r\n\t\tconst options = this.options;\r\n\t\tlet sizeOption = options[`${name}Size`];\r\n\r\n\t\tif (typeof sizeOption === 'number') {\r\n\t\t\tsizeOption = [sizeOption, sizeOption];\r\n\t\t}\r\n\r\n\t\tconst size = Point.validate(sizeOption) && new Point(sizeOption);\r\n\r\n\t\tconst anchorPosition = name === 'shadow' && options.shadowAnchor || options.iconAnchor || size && size.divideBy(2, true);\r\n\t\tconst anchor = Point.validate(anchorPosition) && new Point(anchorPosition);\r\n\r\n\t\timg.className = `leaflet-marker-${name} ${options.className || ''}`;\r\n\r\n\t\tif (anchor) {\r\n\t\t\timg.style.marginLeft = `${-anchor.x}px`;\r\n\t\t\timg.style.marginTop = `${-anchor.y}px`;\r\n\t\t}\r\n\r\n\t\tif (size) {\r\n\t\t\timg.style.width = `${size.x}px`;\r\n\t\t\timg.style.height = `${size.y}px`;\r\n\t\t}\r\n\t}\r\n\r\n\t_createImg(src, el) {\r\n\t\tel ??= document.createElement('img');\r\n\t\tel.src = src;\r\n\t\treturn el;\r\n\t}\r\n\r\n\t_getIconUrl(name) {\r\n\t\treturn Browser.retina && this.options[`${name}RetinaUrl`] || this.options[`${name}Url`];\r\n\t}\r\n}\n\n/*\n * @miniclass Icon.Default (Icon)\n * @section\n *\n * A trivial subclass of `Icon`, represents the icon to use in `Marker`s when\n * no icon is specified. Points to the blue marker image distributed with Leaflet\n * releases.\n *\n * In order to customize the default icon, just change the properties of `Icon.Default.prototype.options`\n * (which is a set of `Icon options`).\n *\n * If you want to _completely_ replace the default icon, override the\n * `Marker.prototype.options.icon` with your own icon instead.\n */\n\nclass IconDefault extends Icon {\n\n\tstatic {\n\t\tthis.setDefaultOptions({\n\t\t\ticonUrl: 'marker-icon.png',\n\t\t\ticonRetinaUrl: 'marker-icon-2x.png',\n\t\t\tshadowUrl: 'marker-shadow.png',\n\t\t\ticonSize: [25, 41],\n\t\t\ticonAnchor: [12, 41],\n\t\t\tpopupAnchor: [1, -34],\n\t\t\ttooltipAnchor: [16, -28],\n\t\t\tshadowSize: [41, 41]\n\t\t});\n\t}\n\n\t_getIconUrl(name) {\n\t\t// only detect once\n\t\tif (!IconDefault.imagePath) {\n\t\t\tIconDefault.imagePath = this._detectIconPath();\n\t\t}\n\n\t\tconst url = Icon.prototype._getIconUrl.call(this, name);\n\t\tif (!url) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// @option imagePath: String\n\t\t// `Icon.Default` will try to auto-detect the location of the\n\t\t// blue icon images. If you are placing these images in a non-standard\n\t\t// way, set this option to point to the right path.\n\t\treturn (this.options.imagePath || IconDefault.imagePath) + url;\n\t}\n\n\t_stripUrl(path) {\t// separate function to use in tests\n\t\tconst strip = function (str, re, idx) {\n\t\t\tconst match = re.exec(str);\n\t\t\treturn match && match[idx];\n\t\t};\n\t\tpath = strip(path, /^url\\((['\"])?(.+)\\1\\)$/, 2);\n\t\treturn path && strip(path, /^(.*)marker-icon\\.png$/, 1);\n\t}\n\n\t_detectIconPath() {\n\t\tconst el = create$1('div', 'leaflet-default-icon-path', document.body);\n\t\tconst path = this._stripUrl(getComputedStyle(el).backgroundImage);\n\n\t\tdocument.body.removeChild(el);\n\t\tif (path) { return path; }\n\t\tconst link = document.querySelector('link[href$=\"leaflet.css\"]');\n\t\tif (!link) { return ''; }\n\t\treturn link.href.substring(0, link.href.length - 'leaflet.css'.length - 1);\n\t}\n}\n\n/*\n * Handler.MarkerDrag is used internally by Marker to make the markers draggable.\n */\n\n\n/* @namespace Marker\n * @section Interaction handlers\n *\n * Interaction handlers are properties of a marker instance that allow you to control interaction behavior in runtime, enabling or disabling certain features such as dragging (see `Handler` methods). Example:\n *\n * ```js\n * marker.dragging.disable();\n * ```\n *\n * @property dragging: Handler\n * Marker dragging handler. Only valid when the marker is on the map (Otherwise set [`marker.options.draggable`](#marker-draggable)).\n */\n\nclass MarkerDrag extends Handler {\n\tinitialize(marker) {\n\t\tthis._marker = marker;\n\t}\n\n\taddHooks() {\n\t\tconst icon = this._marker._icon;\n\n\t\tif (!this._draggable) {\n\t\t\tthis._draggable = new Draggable(icon, icon, true);\n\t\t}\n\n\t\tthis._draggable.on({\n\t\t\tdragstart: this._onDragStart,\n\t\t\tpredrag: this._onPreDrag,\n\t\t\tdrag: this._onDrag,\n\t\t\tdragend: this._onDragEnd\n\t\t}, this).enable();\n\n\t\ticon.classList.add('leaflet-marker-draggable');\n\t}\n\n\tremoveHooks() {\n\t\tthis._draggable.off({\n\t\t\tdragstart: this._onDragStart,\n\t\t\tpredrag: this._onPreDrag,\n\t\t\tdrag: this._onDrag,\n\t\t\tdragend: this._onDragEnd\n\t\t}, this).disable();\n\n\t\tthis._marker._icon?.classList.remove('leaflet-marker-draggable');\n\t}\n\n\tmoved() {\n\t\treturn this._draggable?._moved;\n\t}\n\n\t_adjustPan(e) {\n\t\tconst marker = this._marker,\n\t\tmap = marker._map,\n\t\tspeed = this._marker.options.autoPanSpeed,\n\t\tpadding = this._marker.options.autoPanPadding,\n\t\ticonPos = getPosition(marker._icon),\n\t\tbounds = map.getPixelBounds(),\n\t\torigin = map.getPixelOrigin();\n\n\t\tconst panBounds = new Bounds(\n\t\t\tbounds.min._subtract(origin).add(padding),\n\t\t\tbounds.max._subtract(origin).subtract(padding)\n\t\t);\n\n\t\tif (!panBounds.contains(iconPos)) {\n\t\t\t// Compute incremental movement\n\t\t\tconst movement = new Point(\n\t\t\t\t(Math.max(panBounds.max.x, iconPos.x) - panBounds.max.x) / (bounds.max.x - panBounds.max.x) -\n\t\t\t\t(Math.min(panBounds.min.x, iconPos.x) - panBounds.min.x) / (bounds.min.x - panBounds.min.x),\n\n\t\t\t\t(Math.max(panBounds.max.y, iconPos.y) - panBounds.max.y) / (bounds.max.y - panBounds.max.y) -\n\t\t\t\t(Math.min(panBounds.min.y, iconPos.y) - panBounds.min.y) / (bounds.min.y - panBounds.min.y)\n\t\t\t).multiplyBy(speed);\n\n\t\t\tmap.panBy(movement, {animate: false});\n\n\t\t\tthis._draggable._newPos._add(movement);\n\t\t\tthis._draggable._startPos._add(movement);\n\n\t\t\tsetPosition(marker._icon, this._draggable._newPos);\n\t\t\tthis._onDrag(e);\n\n\t\t\tthis._panRequest = requestAnimationFrame(this._adjustPan.bind(this, e));\n\t\t}\n\t}\n\n\t_onDragStart() {\n\t\t// @section Dragging events\n\t\t// @event dragstart: Event\n\t\t// Fired when the user starts dragging the marker.\n\n\t\t// @event movestart: Event\n\t\t// Fired when the marker starts moving (because of dragging).\n\n\t\tthis._oldLatLng = this._marker.getLatLng();\n\n\t\t// When using ES6 imports it could not be set when `Popup` was not imported as well\n\t\tthis._marker.closePopup?.();\n\n\t\tthis._marker\n\t\t\t.fire('movestart')\n\t\t\t.fire('dragstart');\n\t}\n\n\t_onPreDrag(e) {\n\t\tif (this._marker.options.autoPan) {\n\t\t\tcancelAnimationFrame(this._panRequest);\n\t\t\tthis._panRequest = requestAnimationFrame(this._adjustPan.bind(this, e));\n\t\t}\n\t}\n\n\t_onDrag(e) {\n\t\tconst marker = this._marker,\n\t\tshadow = marker._shadow,\n\t\ticonPos = getPosition(marker._icon),\n\t\tlatlng = marker._map.layerPointToLatLng(iconPos);\n\n\t\t// update shadow position\n\t\tif (shadow) {\n\t\t\tsetPosition(shadow, iconPos);\n\t\t}\n\n\t\tmarker._latlng = latlng;\n\t\te.latlng = latlng;\n\t\te.oldLatLng = this._oldLatLng;\n\n\t\t// @event drag: Event\n\t\t// Fired repeatedly while the user drags the marker.\n\t\tmarker\n\t\t\t.fire('move', e)\n\t\t\t.fire('drag', e);\n\t}\n\n\t_onDragEnd(e) {\n\t\t// @event dragend: DragEndEvent\n\t\t// Fired when the user stops dragging the marker.\n\n\t\tcancelAnimationFrame(this._panRequest);\n\n\t\t// @event moveend: Event\n\t\t// Fired when the marker stops moving (because of dragging).\n\t\tdelete this._oldLatLng;\n\t\tthis._marker\n\t\t\t.fire('moveend')\n\t\t\t.fire('dragend', e);\n\t}\n}\n\n/*\r\n * @class Marker\r\n * @inherits Interactive layer\r\n * Marker is used to display clickable/draggable icons on the map. Extends `Layer`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * new Marker([50.5, 30.5]).addTo(map);\r\n * ```\r\n */\r\n\r\n// @constructor Marker(latlng: LatLng, options? : Marker options)\r\n// Instantiates a Marker object given a geographical point and optionally an options object.\r\nclass Marker extends Layer {\r\n\r\n\tstatic {\r\n\t\t// @section\r\n\t\t// @aka Marker options\r\n\t\tthis.setDefaultOptions({\r\n\t\t\t// @option icon: Icon = *\r\n\t\t\t// Icon instance to use for rendering the marker.\r\n\t\t\t// See [Icon documentation](#Icon) for details on how to customize the marker icon.\r\n\t\t\t// If not specified, a common instance of `Icon.Default` is used.\r\n\t\t\ticon: new IconDefault(),\r\n\r\n\t\t\t// Option inherited from \"Interactive layer\" abstract class\r\n\t\t\tinteractive: true,\r\n\r\n\t\t\t// @option keyboard: Boolean = true\r\n\t\t\t// Whether the marker can be tabbed to with a keyboard and clicked by pressing enter.\r\n\t\t\tkeyboard: true,\r\n\r\n\t\t\t// @option title: String = ''\r\n\t\t\t// Text for the browser tooltip that appear on marker hover (no tooltip by default).\r\n\t\t\t// [Useful for accessibility](https://leafletjs.com/examples/accessibility/#markers-must-be-labelled).\r\n\t\t\ttitle: '',\r\n\r\n\t\t\t// @option alt: String = 'Marker'\r\n\t\t\t// Text for the `alt` attribute of the icon image.\r\n\t\t\t// [Useful for accessibility](https://leafletjs.com/examples/accessibility/#markers-must-be-labelled).\r\n\t\t\talt: 'Marker',\r\n\r\n\t\t\t// @option zIndexOffset: Number = 0\r\n\t\t\t// By default, marker images zIndex is set automatically based on its latitude. Use this option if you want to put the marker on top of all others (or below), specifying a high value like `1000` (or high negative value, respectively).\r\n\t\t\tzIndexOffset: 0,\r\n\r\n\t\t\t// @option opacity: Number = 1.0\r\n\t\t\t// The opacity of the marker.\r\n\t\t\topacity: 1,\r\n\r\n\t\t\t// @option riseOnHover: Boolean = false\r\n\t\t\t// If `true`, the marker will get on top of others when you hover the pointer over it.\r\n\t\t\triseOnHover: false,\r\n\r\n\t\t\t// @option riseOffset: Number = 250\r\n\t\t\t// The z-index offset used for the `riseOnHover` feature.\r\n\t\t\triseOffset: 250,\r\n\r\n\t\t\t// @option pane: String = 'markerPane'\r\n\t\t\t// `Map pane` where the markers icon will be added.\r\n\t\t\tpane: 'markerPane',\r\n\r\n\t\t\t// @option shadowPane: String = 'shadowPane'\r\n\t\t\t// `Map pane` where the markers shadow will be added.\r\n\t\t\tshadowPane: 'shadowPane',\r\n\r\n\t\t\t// @option bubblingPointerEvents: Boolean = false\r\n\t\t\t// When `true`, a pointer event on this marker will trigger the same event on the map\r\n\t\t\t// (unless [`DomEvent.stopPropagation`](#domevent-stoppropagation) is used).\r\n\t\t\tbubblingPointerEvents: false,\r\n\r\n\t\t\t// @option autoPanOnFocus: Boolean = true\r\n\t\t\t// When `true`, the map will pan whenever the marker is focused (via\r\n\t\t\t// e.g. pressing `tab` on the keyboard) to ensure the marker is\r\n\t\t\t// visible within the map's bounds\r\n\t\t\tautoPanOnFocus: true,\r\n\r\n\t\t\t// @section Draggable marker options\r\n\t\t\t// @option draggable: Boolean = false\r\n\t\t\t// Whether the marker is draggable with pointer or not.\r\n\t\t\tdraggable: false,\r\n\r\n\t\t\t// @option autoPan: Boolean = false\r\n\t\t\t// Whether to pan the map when dragging this marker near its edge or not.\r\n\t\t\tautoPan: false,\r\n\r\n\t\t\t// @option autoPanPadding: Point = Point(50, 50)\r\n\t\t\t// Distance (in pixels to the left/right and to the top/bottom) of the\r\n\t\t\t// map edge to start panning the map.\r\n\t\t\tautoPanPadding: [50, 50],\r\n\r\n\t\t\t// @option autoPanSpeed: Number = 10\r\n\t\t\t// Number of pixels the map should pan by.\r\n\t\t\tautoPanSpeed: 10\r\n\t\t});\r\n\t}\r\n\r\n\t/* @section\r\n\t *\r\n\t * In addition to [shared layer methods](#Layer) like `addTo()` and `remove()` and [popup methods](#Popup) like bindPopup() you can also use the following methods:\r\n\t */\r\n\r\n\tinitialize(latlng, options) {\r\n\t\tsetOptions(this, options);\r\n\t\tthis._latlng = new LatLng(latlng);\r\n\t}\r\n\r\n\tonAdd(map) {\r\n\t\tthis._zoomAnimated = this._zoomAnimated && map.options.markerZoomAnimation;\r\n\r\n\t\tif (this._zoomAnimated) {\r\n\t\t\tmap.on('zoomanim', this._animateZoom, this);\r\n\t\t}\r\n\r\n\t\tthis._initIcon();\r\n\t\tthis.update();\r\n\t}\r\n\r\n\tonRemove(map) {\r\n\t\tif (this.dragging?.enabled()) {\r\n\t\t\tthis.options.draggable = true;\r\n\t\t\tthis.dragging.removeHooks();\r\n\t\t}\r\n\t\tdelete this.dragging;\r\n\r\n\t\tif (this._zoomAnimated) {\r\n\t\t\tmap.off('zoomanim', this._animateZoom, this);\r\n\t\t}\r\n\r\n\t\tthis._removeIcon();\r\n\t\tthis._removeShadow();\r\n\t}\r\n\r\n\tgetEvents() {\r\n\t\treturn {\r\n\t\t\tzoom: this.update,\r\n\t\t\tviewreset: this.update\r\n\t\t};\r\n\t}\r\n\r\n\t// @method getLatLng: LatLng\r\n\t// Returns the current geographical position of the marker.\r\n\tgetLatLng() {\r\n\t\treturn this._latlng;\r\n\t}\r\n\r\n\t// @method setLatLng(latlng: LatLng): this\r\n\t// Changes the marker position to the given point.\r\n\tsetLatLng(latlng) {\r\n\t\tconst oldLatLng = this._latlng;\r\n\t\tthis._latlng = new LatLng(latlng);\r\n\t\tthis.update();\r\n\r\n\t\t// @event move: Event\r\n\t\t// Fired when the marker is moved via [`setLatLng`](#marker-setlatlng) or by [dragging](#marker-dragging). Old and new coordinates are included in event arguments as `oldLatLng`, `latlng`.\r\n\t\treturn this.fire('move', {oldLatLng, latlng: this._latlng});\r\n\t}\r\n\r\n\t// @method setZIndexOffset(offset: Number): this\r\n\t// Changes the [zIndex offset](#marker-zindexoffset) of the marker.\r\n\tsetZIndexOffset(offset) {\r\n\t\tthis.options.zIndexOffset = offset;\r\n\t\treturn this.update();\r\n\t}\r\n\r\n\t// @method getIcon: Icon\r\n\t// Returns the current icon used by the marker\r\n\tgetIcon() {\r\n\t\treturn this.options.icon;\r\n\t}\r\n\r\n\t// @method setIcon(icon: Icon): this\r\n\t// Changes the marker icon.\r\n\tsetIcon(icon) {\r\n\r\n\t\tthis.options.icon = icon;\r\n\r\n\t\tif (this._map) {\r\n\t\t\tthis._initIcon();\r\n\t\t\tthis.update();\r\n\t\t}\r\n\r\n\t\tif (this._popup) {\r\n\t\t\tthis.bindPopup(this._popup, this._popup.options);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method getElement(): HTMLElement\r\n\t// Returns the instance of [`HTMLElement`](https://developer.mozilla.org/docs/Web/API/HTMLElement)\r\n\t// used by Marker layer.\r\n\tgetElement() {\r\n\t\treturn this._icon;\r\n\t}\r\n\r\n\tupdate() {\r\n\r\n\t\tif (this._icon && this._map) {\r\n\t\t\tconst pos = this._map.latLngToLayerPoint(this._latlng).round();\r\n\t\t\tthis._setPos(pos);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t}\r\n\r\n\t_initIcon() {\r\n\t\tconst options = this.options,\r\n\t\tclassToAdd = `leaflet-zoom-${this._zoomAnimated ? 'animated' : 'hide'}`;\r\n\r\n\t\tconst icon = options.icon.createIcon(this._icon);\r\n\t\tlet addIcon = false;\r\n\r\n\t\t// if we're not reusing the icon, remove the old one and init new one\r\n\t\tif (icon !== this._icon) {\r\n\t\t\tif (this._icon) {\r\n\t\t\t\tthis._removeIcon();\r\n\t\t\t}\r\n\t\t\taddIcon = true;\r\n\r\n\t\t\tif (options.title) {\r\n\t\t\t\ticon.title = options.title;\r\n\t\t\t}\r\n\r\n\t\t\tif (icon.tagName === 'IMG') {\r\n\t\t\t\ticon.alt = options.alt ?? '';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ticon.classList.add(classToAdd);\r\n\r\n\t\tif (options.keyboard) {\r\n\t\t\ticon.tabIndex = '0';\r\n\t\t\ticon.setAttribute('role', 'button');\r\n\t\t}\r\n\r\n\t\tthis._icon = icon;\r\n\r\n\t\tif (options.riseOnHover) {\r\n\t\t\tthis.on({\r\n\t\t\t\tpointerover: this._bringToFront,\r\n\t\t\t\tpointerout: this._resetZIndex\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif (this.options.autoPanOnFocus) {\r\n\t\t\ton(icon, 'focus', this._panOnFocus, this);\r\n\t\t}\r\n\r\n\t\tconst newShadow = options.icon.createShadow(this._shadow);\r\n\t\tlet addShadow = false;\r\n\r\n\t\tif (newShadow !== this._shadow) {\r\n\t\t\tthis._removeShadow();\r\n\t\t\taddShadow = true;\r\n\t\t}\r\n\r\n\t\tif (newShadow) {\r\n\t\t\tnewShadow.classList.add(classToAdd);\r\n\t\t\tnewShadow.alt = '';\r\n\t\t}\r\n\t\tthis._shadow = newShadow;\r\n\r\n\r\n\t\tif (options.opacity < 1) {\r\n\t\t\tthis._updateOpacity();\r\n\t\t}\r\n\r\n\r\n\t\tif (addIcon) {\r\n\t\t\tthis.getPane().appendChild(this._icon);\r\n\t\t}\r\n\t\tthis._initInteraction();\r\n\t\tif (newShadow && addShadow) {\r\n\t\t\tthis.getPane(options.shadowPane).appendChild(this._shadow);\r\n\t\t}\r\n\t}\r\n\r\n\t_removeIcon() {\r\n\t\tif (this.options.riseOnHover) {\r\n\t\t\tthis.off({\r\n\t\t\t\tpointerover: this._bringToFront,\r\n\t\t\t\tpointerout: this._resetZIndex\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif (this.options.autoPanOnFocus) {\r\n\t\t\toff(this._icon, 'focus', this._panOnFocus, this);\r\n\t\t}\r\n\r\n\t\tthis._icon.remove();\r\n\t\tthis.removeInteractiveTarget(this._icon);\r\n\r\n\t\tthis._icon = null;\r\n\t}\r\n\r\n\t_removeShadow() {\r\n\t\tthis._shadow?.remove();\r\n\t\tthis._shadow = null;\r\n\t}\r\n\r\n\t_setPos(pos) {\r\n\r\n\t\tif (this._icon) {\r\n\t\t\tsetPosition(this._icon, pos);\r\n\t\t}\r\n\r\n\t\tif (this._shadow) {\r\n\t\t\tsetPosition(this._shadow, pos);\r\n\t\t}\r\n\r\n\t\tthis._zIndex = pos.y + this.options.zIndexOffset;\r\n\r\n\t\tthis._resetZIndex();\r\n\t}\r\n\r\n\t_updateZIndex(offset) {\r\n\t\tif (this._icon) {\r\n\t\t\tthis._icon.style.zIndex = this._zIndex + offset;\r\n\t\t}\r\n\t}\r\n\r\n\t_animateZoom(opt) {\r\n\t\tconst pos = this._map._latLngToNewLayerPoint(this._latlng, opt.zoom, opt.center).round();\r\n\r\n\t\tthis._setPos(pos);\r\n\t}\r\n\r\n\t_initInteraction() {\r\n\r\n\t\tif (!this.options.interactive) { return; }\r\n\r\n\t\tthis._icon.classList.add('leaflet-interactive');\r\n\r\n\t\tthis.addInteractiveTarget(this._icon);\r\n\r\n\t\tif (MarkerDrag) {\r\n\t\t\tlet draggable = this.options.draggable;\r\n\t\t\tif (this.dragging) {\r\n\t\t\t\tdraggable = this.dragging.enabled();\r\n\t\t\t\tthis.dragging.disable();\r\n\t\t\t}\r\n\r\n\t\t\tthis.dragging = new MarkerDrag(this);\r\n\r\n\t\t\tif (draggable) {\r\n\t\t\t\tthis.dragging.enable();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// @method setOpacity(opacity: Number): this\r\n\t// Changes the opacity of the marker.\r\n\tsetOpacity(opacity) {\r\n\t\tthis.options.opacity = opacity;\r\n\t\tif (this._map) {\r\n\t\t\tthis._updateOpacity();\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t}\r\n\r\n\t_updateOpacity() {\r\n\t\tconst opacity = this.options.opacity;\r\n\r\n\t\tif (this._icon) {\r\n\t\t\tthis._icon.style.opacity = opacity;\r\n\t\t}\r\n\r\n\t\tif (this._shadow) {\r\n\t\t\tthis._shadow.style.opacity = opacity;\r\n\t\t}\r\n\t}\r\n\r\n\t_bringToFront() {\r\n\t\tthis._updateZIndex(this.options.riseOffset);\r\n\t}\r\n\r\n\t_resetZIndex() {\r\n\t\tthis._updateZIndex(0);\r\n\t}\r\n\r\n\t_panOnFocus() {\r\n\t\tconst map = this._map;\r\n\t\tif (!map) { return; }\r\n\r\n\t\tconst iconOpts = this.options.icon.options;\r\n\t\tconst size = iconOpts.iconSize ? new Point(iconOpts.iconSize) : new Point(0, 0);\r\n\t\tconst anchor = iconOpts.iconAnchor ? new Point(iconOpts.iconAnchor) : new Point(0, 0);\r\n\r\n\t\tmap.panInside(this._latlng, {\r\n\t\t\tpaddingTopLeft: anchor,\r\n\t\t\tpaddingBottomRight: size.subtract(anchor)\r\n\t\t});\r\n\t}\r\n\r\n\t_getPopupAnchor() {\r\n\t\treturn this.options.icon.options.popupAnchor;\r\n\t}\r\n\r\n\t_getTooltipAnchor() {\r\n\t\treturn this.options.icon.options.tooltipAnchor;\r\n\t}\r\n}\n\n/*\n * @class Path\n * @inherits Interactive layer\n *\n * An abstract class that contains options and constants shared between vector\n * overlays (Polygon, Polyline, Circle). Do not use it directly. Extends `Layer`.\n */\n\nclass Path extends Layer {\n\n\tstatic {\n\t\t// @section\n\t\t// @aka Path options\n\t\tthis.setDefaultOptions({\n\t\t\t// @option stroke: Boolean = true\n\t\t\t// Whether to draw stroke along the path. Set it to `false` to disable borders on polygons or circles.\n\t\t\tstroke: true,\n\n\t\t\t// @option color: String = '#3388ff'\n\t\t\t// Stroke color\n\t\t\tcolor: '#3388ff',\n\n\t\t\t// @option weight: Number = 3\n\t\t\t// Stroke width in pixels\n\t\t\tweight: 3,\n\n\t\t\t// @option opacity: Number = 1.0\n\t\t\t// Stroke opacity\n\t\t\topacity: 1,\n\n\t\t\t// @option lineCap: String= 'round'\n\t\t\t// A string that defines [shape to be used at the end](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-linecap) of the stroke.\n\t\t\tlineCap: 'round',\n\n\t\t\t// @option lineJoin: String = 'round'\n\t\t\t// A string that defines [shape to be used at the corners](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-linejoin) of the stroke.\n\t\t\tlineJoin: 'round',\n\n\t\t\t// @option dashArray: String = null\n\t\t\t// A string that defines the stroke [dash pattern](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-dasharray).\n\t\t\tdashArray: null,\n\n\t\t\t// @option dashOffset: String = null\n\t\t\t// A string that defines the [distance into the dash pattern to start the dash](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-dashoffset).\n\t\t\tdashOffset: null,\n\n\t\t\t// @option fill: Boolean = depends\n\t\t\t// Whether to fill the path with color. Set it to `false` to disable filling on polygons or circles.\n\t\t\tfill: false,\n\n\t\t\t// @option fillColor: String = *\n\t\t\t// Fill color. Defaults to the value of the [`color`](#path-color) option\n\t\t\tfillColor: null,\n\n\t\t\t// @option fillOpacity: Number = 0.2\n\t\t\t// Fill opacity.\n\t\t\tfillOpacity: 0.2,\n\n\t\t\t// @option fillRule: String = 'evenodd'\n\t\t\t// A string that defines [how the inside of a shape](https://developer.mozilla.org/docs/Web/SVG/Attribute/fill-rule) is determined.\n\t\t\tfillRule: 'evenodd',\n\n\t\t\t// className: '',\n\n\t\t\t// Option inherited from \"Interactive layer\" abstract class\n\t\t\tinteractive: true,\n\n\t\t\t// @option bubblingPointerEvents: Boolean = true\n\t\t\t// When `true`, a pointer event on this path will trigger the same event on the map\n\t\t\t// (unless [`DomEvent.stopPropagation`](#domevent-stoppropagation) is used).\n\t\t\tbubblingPointerEvents: true\n\t\t});\n\t}\n\n\tbeforeAdd(map) {\n\t\t// Renderer is set here because we need to call renderer.getEvents\n\t\t// before this.getEvents.\n\t\tthis._renderer = map.getRenderer(this);\n\t}\n\n\tonAdd() {\n\t\tthis._renderer._initPath(this);\n\t\tthis._reset();\n\t\tthis._renderer._addPath(this);\n\t}\n\n\tonRemove() {\n\t\tthis._renderer._removePath(this);\n\t}\n\n\t// @method redraw(): this\n\t// Redraws the layer. Sometimes useful after you changed the coordinates that the path uses.\n\tredraw() {\n\t\tif (this._map) {\n\t\t\tthis._renderer._updatePath(this);\n\t\t}\n\t\treturn this;\n\t}\n\n\t// @method setStyle(style: Path options): this\n\t// Changes the appearance of a Path based on the options in the `Path options` object.\n\tsetStyle(style) {\n\t\tsetOptions(this, style);\n\t\tif (this._renderer) {\n\t\t\tthis._renderer._updateStyle(this);\n\t\t\tif (this.options.stroke && style && Object.hasOwn(style, 'weight')) {\n\t\t\t\tthis._updateBounds();\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\t// @method bringToFront(): this\n\t// Brings the layer to the top of all path layers.\n\tbringToFront() {\n\t\tthis._renderer?._bringToFront(this);\n\t\treturn this;\n\t}\n\n\t// @method bringToBack(): this\n\t// Brings the layer to the bottom of all path layers.\n\tbringToBack() {\n\t\tthis._renderer?._bringToBack(this);\n\t\treturn this;\n\t}\n\n\tgetElement() {\n\t\treturn this._path;\n\t}\n\n\t_reset() {\n\t\t// defined in child classes\n\t\tthis._project();\n\t\tthis._update();\n\t}\n\n\t_clickTolerance() {\n\t\t// used when doing hit detection for Canvas layers\n\t\treturn (this.options.stroke ? this.options.weight / 2 : 0) +\n\t\t (this._renderer.options.tolerance || 0);\n\t}\n}\n\n/*\n * @class CircleMarker\n * @inherits Path\n *\n * A circle of a fixed size with radius specified in pixels. Extends `Path`.\n */\n\n// @constructor CircleMarker(latlng: LatLng, options?: CircleMarker options)\n// Instantiates a circle marker object given a geographical point, and an optional options object.\nclass CircleMarker extends Path {\n\n\tstatic {\n\t\t// @section\n\t\t// @aka CircleMarker options\n\t\tthis.setDefaultOptions({\n\t\t\tfill: true,\n\n\t\t\t// @option radius: Number = 10\n\t\t\t// Radius of the circle marker, in pixels\n\t\t\tradius: 10\n\t\t});\n\t}\n\n\tinitialize(latlng, options) {\n\t\tsetOptions(this, options);\n\t\tthis._latlng = new LatLng(latlng);\n\t\tthis._radius = this.options.radius;\n\t}\n\n\t// @method setLatLng(latLng: LatLng): this\n\t// Sets the position of a circle marker to a new location.\n\tsetLatLng(latlng) {\n\t\tconst oldLatLng = this._latlng;\n\t\tthis._latlng = new LatLng(latlng);\n\t\tthis.redraw();\n\n\t\t// @event move: Event\n\t\t// Fired when the marker is moved via [`setLatLng`](#circlemarker-setlatlng). Old and new coordinates are included in event arguments as `oldLatLng`, `latlng`.\n\t\treturn this.fire('move', {oldLatLng, latlng: this._latlng});\n\t}\n\n\t// @method getLatLng(): LatLng\n\t// Returns the current geographical position of the circle marker\n\tgetLatLng() {\n\t\treturn this._latlng;\n\t}\n\n\t// @method setRadius(radius: Number): this\n\t// Sets the radius of a circle marker. Units are in pixels.\n\tsetRadius(radius) {\n\t\tthis.options.radius = this._radius = radius;\n\t\treturn this.redraw();\n\t}\n\n\t// @method getRadius(): Number\n\t// Returns the current radius of the circle\n\tgetRadius() {\n\t\treturn this._radius;\n\t}\n\n\tsetStyle(options) {\n\t\tconst radius = options?.radius ?? this._radius;\n\t\tPath.prototype.setStyle.call(this, options);\n\t\tthis.setRadius(radius);\n\t\treturn this;\n\t}\n\n\t_project() {\n\t\tthis._point = this._map.latLngToLayerPoint(this._latlng);\n\t\tthis._updateBounds();\n\t}\n\n\t_updateBounds() {\n\t\tconst r = this._radius,\n\t\tr2 = this._radiusY ?? r,\n\t\tw = this._clickTolerance(),\n\t\tp = [r + w, r2 + w];\n\t\tthis._pxBounds = new Bounds(this._point.subtract(p), this._point.add(p));\n\t}\n\n\t_update() {\n\t\tif (this._map) {\n\t\t\tthis._updatePath();\n\t\t}\n\t}\n\n\t_updatePath() {\n\t\tthis._renderer._updateCircle(this);\n\t}\n\n\t_empty() {\n\t\treturn this._radius && !this._renderer._bounds.intersects(this._pxBounds);\n\t}\n\n\t// Needed by the `Canvas` renderer for interactivity\n\t_containsPoint(p) {\n\t\treturn p.distanceTo(this._point) <= this._radius + this._clickTolerance();\n\t}\n}\n\n/*\n * @class Circle\n * @inherits CircleMarker\n *\n * A class for drawing circle overlays on a map. Extends `CircleMarker`.\n *\n * It's an approximation and starts to diverge from a real circle closer to poles (due to projection distortion).\n *\n * @example\n *\n * ```js\n * new Circle([50.5, 30.5], {radius: 200}).addTo(map);\n * ```\n */\n\n// @constructor Circle(latlng: LatLng, options?: Circle options)\n// Instantiates a circle object given a geographical point, and an options object\n// which contains the circle radius.\nclass Circle extends CircleMarker {\n\n\tinitialize(latlng, options) {\n\t\tsetOptions(this, options);\n\t\tthis._latlng = new LatLng(latlng);\n\n\t\tif (isNaN(this.options.radius)) { throw new Error('Circle radius cannot be NaN'); }\n\n\t\t// @section\n\t\t// @aka Circle options\n\t\t// @option radius: Number; Radius of the circle, in meters.\n\t\tthis._mRadius = this.options.radius;\n\t}\n\n\t// @method setRadius(radius: Number): this\n\t// Sets the radius of a circle. Units are in meters.\n\tsetRadius(radius) {\n\t\tthis._mRadius = radius;\n\t\treturn this.redraw();\n\t}\n\n\t// @method getRadius(): Number\n\t// Returns the current radius of a circle. Units are in meters.\n\tgetRadius() {\n\t\treturn this._mRadius;\n\t}\n\n\t// @method getBounds(): LatLngBounds\n\t// Returns the `LatLngBounds` of the path.\n\tgetBounds() {\n\t\tconst half = [this._radius, this._radiusY ?? this._radius];\n\n\t\treturn new LatLngBounds(\n\t\t\tthis._map.layerPointToLatLng(this._point.subtract(half)),\n\t\t\tthis._map.layerPointToLatLng(this._point.add(half)));\n\t}\n\n\tsetStyle = Path.prototype.setStyle;\n\n\t_project() {\n\n\t\tconst lng = this._latlng.lng,\n\t\tlat = this._latlng.lat,\n\t\tmap = this._map,\n\t\tcrs = map.options.crs;\n\n\t\tif (crs.distance === Earth.distance) {\n\t\t\tconst d = Math.PI / 180,\n\t\t\tlatR = (this._mRadius / Earth.R) / d,\n\t\t\ttop = map.project([lat + latR, lng]),\n\t\t\tbottom = map.project([lat - latR, lng]),\n\t\t\tp = top.add(bottom).divideBy(2),\n\t\t\tlat2 = map.unproject(p).lat;\n\t\t\tlet lngR = Math.acos((Math.cos(latR * d) - Math.sin(lat * d) * Math.sin(lat2 * d)) /\n\t\t\t (Math.cos(lat * d) * Math.cos(lat2 * d))) / d;\n\n\t\t\tif (isNaN(lngR) || lngR === 0) {\n\t\t\t\tlngR = latR / Math.cos(Math.PI / 180 * lat); // Fallback for edge case, #2425\n\t\t\t}\n\n\t\t\tthis._point = p.subtract(map.getPixelOrigin());\n\t\t\tthis._radius = isNaN(lngR) ? 0 : p.x - map.project([lat2, lng - lngR]).x;\n\t\t\tthis._radiusY = p.y - top.y;\n\n\t\t} else {\n\t\t\tconst latlng2 = crs.unproject(crs.project(this._latlng).subtract([this._mRadius, 0]));\n\n\t\t\tthis._point = map.latLngToLayerPoint(this._latlng);\n\t\t\tthis._radius = Math.abs(this._point.x - map.latLngToLayerPoint(latlng2).x);\n\t\t}\n\n\t\tthis._updateBounds();\n\t}\n}\n\n/*\n * @class Polyline\n * @inherits Path\n *\n * A class for drawing polyline overlays on a map. Extends `Path`.\n *\n * @example\n *\n * ```js\n * // create a red polyline from an array of LatLng points\n * const latlngs = [\n * \t[45.51, -122.68],\n * \t[37.77, -122.43],\n * \t[34.04, -118.2]\n * ];\n *\n * const polyline = new Polyline(latlngs, {color: 'red'}).addTo(map);\n *\n * // zoom the map to the polyline\n * map.fitBounds(polyline.getBounds());\n * ```\n *\n * You can also pass a multi-dimensional array to represent a `MultiPolyline` shape:\n *\n * ```js\n * // create a red polyline from an array of arrays of LatLng points\n * const latlngs = [\n * \t[[45.51, -122.68],\n * \t [37.77, -122.43],\n * \t [34.04, -118.2]],\n * \t[[40.78, -73.91],\n * \t [41.83, -87.62],\n * \t [32.76, -96.72]]\n * ];\n * ```\n */\n\n// @constructor Polyline(latlngs: LatLng[], options?: Polyline options)\n// Instantiates a polyline object given an array of geographical points and\n// optionally an options object. You can create a `Polyline` object with\n// multiple separate lines (`MultiPolyline`) by passing an array of arrays\n// of geographic points.\nclass Polyline extends Path {\n\n\tstatic {\n\t\t// @section\n\t\t// @aka Polyline options\n\t\tthis.setDefaultOptions({\n\t\t\t// @option smoothFactor: Number = 1.0\n\t\t\t// How much to simplify the polyline on each zoom level. More means\n\t\t\t// better performance and smoother look, and less means more accurate representation.\n\t\t\tsmoothFactor: 1.0,\n\n\t\t\t// @option noClip: Boolean = false\n\t\t\t// Disable polyline clipping.\n\t\t\tnoClip: false\n\t\t});\n\t}\n\n\tinitialize(latlngs, options) {\n\t\tsetOptions(this, options);\n\t\tthis._setLatLngs(latlngs);\n\t}\n\n\t// @method getLatLngs(): LatLng[]\n\t// Returns an array of the points in the path, or nested arrays of points in case of multi-polyline.\n\tgetLatLngs() {\n\t\treturn this._latlngs;\n\t}\n\n\t// @method setLatLngs(latlngs: LatLng[]): this\n\t// Replaces all the points in the polyline with the given array of geographical points.\n\tsetLatLngs(latlngs) {\n\t\tthis._setLatLngs(latlngs);\n\t\treturn this.redraw();\n\t}\n\n\t// @method isEmpty(): Boolean\n\t// Returns `true` if the Polyline has no LatLngs.\n\tisEmpty() {\n\t\treturn !this._latlngs.length;\n\t}\n\n\t// @method closestLayerPoint(p: Point): Point\n\t// Returns the point closest to `p` on the Polyline.\n\tclosestLayerPoint(p) {\n\t\tp = new Point(p);\n\t\tlet minDistance = Infinity,\n\t\tminPoint = null,\n\t\tp1, p2;\n\t\tconst closest = _sqClosestPointOnSegment;\n\n\t\tfor (const points of this._parts) {\n\t\t\tfor (let i = 1, len = points.length; i < len; i++) {\n\t\t\t\tp1 = points[i - 1];\n\t\t\t\tp2 = points[i];\n\n\t\t\t\tconst sqDist = closest(p, p1, p2, true);\n\n\t\t\t\tif (sqDist < minDistance) {\n\t\t\t\t\tminDistance = sqDist;\n\t\t\t\t\tminPoint = closest(p, p1, p2);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (minPoint) {\n\t\t\tminPoint.distance = Math.sqrt(minDistance);\n\t\t}\n\t\treturn minPoint;\n\t}\n\n\t// @method getCenter(): LatLng\n\t// Returns the center ([centroid](https://en.wikipedia.org/wiki/Centroid)) of the polyline.\n\tgetCenter() {\n\t\t// throws error when not yet added to map as this center calculation requires projected coordinates\n\t\tif (!this._map) {\n\t\t\tthrow new Error('Must add layer to map before using getCenter()');\n\t\t}\n\t\treturn polylineCenter(this._defaultShape(), this._map.options.crs);\n\t}\n\n\t// @method getBounds(): LatLngBounds\n\t// Returns the `LatLngBounds` of the path.\n\tgetBounds() {\n\t\treturn this._bounds;\n\t}\n\n\t// @method addLatLng(latlng: LatLng, latlngs?: LatLng[]): this\n\t// Adds a given point to the polyline. By default, adds to the first ring of\n\t// the polyline in case of a multi-polyline, but can be overridden by passing\n\t// a specific ring as a LatLng array (that you can earlier access with [`getLatLngs`](#polyline-getlatlngs)).\n\taddLatLng(latlng, latlngs) {\n\t\tlatlngs ??= this._defaultShape();\n\t\tlatlng = new LatLng(latlng);\n\t\tlatlngs.push(latlng);\n\t\tthis._bounds.extend(latlng);\n\t\treturn this.redraw();\n\t}\n\n\t_setLatLngs(latlngs) {\n\t\tthis._bounds = new LatLngBounds();\n\t\tthis._latlngs = this._convertLatLngs(latlngs);\n\t}\n\n\t_defaultShape() {\n\t\treturn isFlat(this._latlngs) ? this._latlngs : this._latlngs[0];\n\t}\n\n\t// recursively convert latlngs input into actual LatLng instances; calculate bounds along the way\n\t_convertLatLngs(latlngs) {\n\t\tconst result = [],\n\t\tflat = isFlat(latlngs);\n\n\t\tfor (let i = 0, len = latlngs.length; i < len; i++) {\n\t\t\tif (flat) {\n\t\t\t\tresult[i] = new LatLng(latlngs[i]);\n\t\t\t\tthis._bounds.extend(result[i]);\n\t\t\t} else {\n\t\t\t\tresult[i] = this._convertLatLngs(latlngs[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t_project() {\n\t\tconst pxBounds = new Bounds();\n\t\tthis._rings = [];\n\t\tthis._projectLatlngs(this._latlngs, this._rings, pxBounds);\n\n\t\tif (this._bounds.isValid() && pxBounds.isValid()) {\n\t\t\tthis._rawPxBounds = pxBounds;\n\t\t\tthis._updateBounds();\n\t\t}\n\t}\n\n\t_updateBounds() {\n\t\tconst w = this._clickTolerance(),\n\t\tp = new Point(w, w);\n\n\t\tif (!this._rawPxBounds) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._pxBounds = new Bounds([\n\t\t\tthis._rawPxBounds.min.subtract(p),\n\t\t\tthis._rawPxBounds.max.add(p)\n\t\t]);\n\t}\n\n\t// recursively turns latlngs into a set of rings with projected coordinates\n\t_projectLatlngs(latlngs, result, projectedBounds) {\n\t\tconst flat = latlngs[0] instanceof LatLng;\n\n\t\tif (flat) {\n\t\t\tconst ring = latlngs.map(latlng => this._map.latLngToLayerPoint(latlng));\n\t\t\tring.forEach(r => projectedBounds.extend(r));\n\t\t\tresult.push(ring);\n\t\t} else {\n\t\t\tlatlngs.forEach(latlng => this._projectLatlngs(latlng, result, projectedBounds));\n\t\t}\n\t}\n\n\t// clip polyline by renderer bounds so that we have less to render for performance\n\t_clipPoints() {\n\t\tconst bounds = this._renderer._bounds;\n\n\t\tthis._parts = [];\n\t\tif (!this._pxBounds || !this._pxBounds.intersects(bounds)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.options.noClip) {\n\t\t\tthis._parts = this._rings;\n\t\t\treturn;\n\t\t}\n\n\t\tconst parts = this._parts;\n\t\tlet i, j, k, len, len2, segment, points;\n\n\t\tfor (i = 0, k = 0, len = this._rings.length; i < len; i++) {\n\t\t\tpoints = this._rings[i];\n\n\t\t\tfor (j = 0, len2 = points.length; j < len2 - 1; j++) {\n\t\t\t\tsegment = clipSegment(points[j], points[j + 1], bounds, j, true);\n\n\t\t\t\tif (!segment) { continue; }\n\n\t\t\t\tparts[k] ??= [];\n\t\t\t\tparts[k].push(segment[0]);\n\n\t\t\t\t// if segment goes out of screen, or it's the last one, it's the end of the line part\n\t\t\t\tif ((segment[1] !== points[j + 1]) || (j === len2 - 2)) {\n\t\t\t\t\tparts[k].push(segment[1]);\n\t\t\t\t\tk++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// simplify each clipped part of the polyline for performance\n\t_simplifyPoints() {\n\t\tconst parts = this._parts,\n\t\ttolerance = this.options.smoothFactor;\n\n\t\tfor (let i = 0, len = parts.length; i < len; i++) {\n\t\t\tparts[i] = simplify(parts[i], tolerance);\n\t\t}\n\t}\n\n\t_update() {\n\t\tif (!this._map) { return; }\n\n\t\tthis._clipPoints();\n\t\tthis._simplifyPoints();\n\t\tthis._updatePath();\n\t}\n\n\t_updatePath() {\n\t\tthis._renderer._updatePoly(this);\n\t}\n\n\t// Needed by the `Canvas` renderer for interactivity\n\t_containsPoint(p, closed) {\n\t\tlet i, j, k, len, len2, part;\n\t\tconst w = this._clickTolerance();\n\n\t\tif (!this._pxBounds || !this._pxBounds.contains(p)) { return false; }\n\n\t\t// hit detection for polylines\n\t\tfor (i = 0, len = this._parts.length; i < len; i++) {\n\t\t\tpart = this._parts[i];\n\n\t\t\tfor (j = 0, len2 = part.length, k = len2 - 1; j < len2; k = j++) {\n\t\t\t\tif (!closed && (j === 0)) { continue; }\n\n\t\t\t\tif (pointToSegmentDistance(p, part[k], part[j]) <= w) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n}\n\n/*\n * @class Polygon\n * @inherits Polyline\n *\n * A class for drawing polygon overlays on a map. Extends `Polyline`.\n *\n * Note that points you pass when creating a polygon shouldn't have an additional last point equal to the first one — it's better to filter out such points.\n *\n *\n * @example\n *\n * ```js\n * // create a red polygon from an array of LatLng points\n * const latlngs = [[37, -109.05],[41, -109.03],[41, -102.05],[37, -102.04]];\n *\n * const polygon = new Polygon(latlngs, {color: 'red'}).addTo(map);\n *\n * // zoom the map to the polygon\n * map.fitBounds(polygon.getBounds());\n * ```\n *\n * You can also pass an array of arrays of latlngs, with the first array representing the outer shape and the other arrays representing holes in the outer shape:\n *\n * ```js\n * const latlngs = [\n * [[37, -109.05],[41, -109.03],[41, -102.05],[37, -102.04]], // outer ring\n * [[37.29, -108.58],[40.71, -108.58],[40.71, -102.50],[37.29, -102.50]] // hole\n * ];\n * ```\n *\n * Additionally, you can pass a multi-dimensional array to represent a MultiPolygon shape.\n *\n * ```js\n * const latlngs = [\n * [ // first polygon\n * [[37, -109.05],[41, -109.03],[41, -102.05],[37, -102.04]], // outer ring\n * [[37.29, -108.58],[40.71, -108.58],[40.71, -102.50],[37.29, -102.50]] // hole\n * ],\n * [ // second polygon\n * [[41, -111.03],[45, -111.04],[45, -104.05],[41, -104.05]]\n * ]\n * ];\n * ```\n */\n\n// @constructor Polygon(latlngs: LatLng[], options?: Polyline options)\nclass Polygon extends Polyline {\n\n\tstatic {\n\t\tthis.setDefaultOptions({\n\t\t\tfill: true\n\t\t});\n\t}\n\n\tisEmpty() {\n\t\treturn !this._latlngs.length || !this._latlngs[0].length;\n\t}\n\n\t// @method getCenter(): LatLng\n\t// Returns the center ([centroid](http://en.wikipedia.org/wiki/Centroid)) of the Polygon.\n\tgetCenter() {\n\t\t// throws error when not yet added to map as this center calculation requires projected coordinates\n\t\tif (!this._map) {\n\t\t\tthrow new Error('Must add layer to map before using getCenter()');\n\t\t}\n\t\treturn polygonCenter(this._defaultShape(), this._map.options.crs);\n\t}\n\n\t_convertLatLngs(latlngs) {\n\t\tconst result = Polyline.prototype._convertLatLngs.call(this, latlngs),\n\t\tlen = result.length;\n\n\t\t// remove last point if it equals first one\n\t\tif (len >= 2 && result[0] instanceof LatLng && result[0].equals(result[len - 1])) {\n\t\t\tresult.pop();\n\t\t}\n\t\treturn result;\n\t}\n\n\t_setLatLngs(latlngs) {\n\t\tPolyline.prototype._setLatLngs.call(this, latlngs);\n\t\tif (isFlat(this._latlngs)) {\n\t\t\tthis._latlngs = [this._latlngs];\n\t\t}\n\t}\n\n\t_defaultShape() {\n\t\treturn isFlat(this._latlngs[0]) ? this._latlngs[0] : this._latlngs[0][0];\n\t}\n\n\t_clipPoints() {\n\t\t// polygons need a different clipping algorithm so we redefine that\n\n\t\tlet bounds = this._renderer._bounds;\n\t\tconst w = this.options.weight,\n\t\tp = new Point(w, w);\n\n\t\t// increase clip padding by stroke width to avoid stroke on clip edges\n\t\tbounds = new Bounds(bounds.min.subtract(p), bounds.max.add(p));\n\n\t\tthis._parts = [];\n\t\tif (!this._pxBounds || !this._pxBounds.intersects(bounds)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.options.noClip) {\n\t\t\tthis._parts = this._rings;\n\t\t\treturn;\n\t\t}\n\n\t\tfor (const ring of this._rings) {\n\t\t\tconst clipped = clipPolygon(ring, bounds, true);\n\t\t\tif (clipped.length) {\n\t\t\t\tthis._parts.push(clipped);\n\t\t\t}\n\t\t}\n\t}\n\n\t_updatePath() {\n\t\tthis._renderer._updatePoly(this, true);\n\t}\n\n\t// Needed by the `Canvas` renderer for interactivity\n\t_containsPoint(p) {\n\t\tlet inside = false,\n\t\tpart, p1, p2, i, j, k, len, len2;\n\n\t\tif (!this._pxBounds || !this._pxBounds.contains(p)) { return false; }\n\n\t\t// ray casting algorithm for detecting if point is in polygon\n\t\tfor (i = 0, len = this._parts.length; i < len; i++) {\n\t\t\tpart = this._parts[i];\n\n\t\t\tfor (j = 0, len2 = part.length, k = len2 - 1; j < len2; k = j++) {\n\t\t\t\tp1 = part[j];\n\t\t\t\tp2 = part[k];\n\n\t\t\t\tif (((p1.y > p.y) !== (p2.y > p.y)) && (p.x < (p2.x - p1.x) * (p.y - p1.y) / (p2.y - p1.y) + p1.x)) {\n\t\t\t\t\tinside = !inside;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// also check if it's on polygon stroke\n\t\treturn inside || Polyline.prototype._containsPoint.call(this, p, true);\n\t}\n\n}\n\n/*\r\n * @class GeoJSON\r\n * @inherits FeatureGroup\r\n *\r\n * Represents a GeoJSON object or an array of GeoJSON objects. Allows you to parse\r\n * GeoJSON data and display it on the map. Extends `FeatureGroup`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * new GeoJSON(data, {\r\n * \tstyle: function (feature) {\r\n * \t\treturn {color: feature.properties.color};\r\n * \t}\r\n * }).bindPopup(function (layer) {\r\n * \treturn layer.feature.properties.description;\r\n * }).addTo(map);\r\n * ```\r\n */\r\n\r\n// @namespace GeoJSON\r\n// @constructor GeoJSON(geojson?: Object, options?: GeoJSON options)\r\n// Creates a GeoJSON layer. Optionally accepts an object in\r\n// [GeoJSON format](https://tools.ietf.org/html/rfc7946) to display on the map\r\n// (you can alternatively add it later with `addData` method) and an `options` object.\r\nclass GeoJSON extends FeatureGroup {\r\n\r\n\t/* @section\r\n\t * @aka GeoJSON options\r\n\t *\r\n\t * @option pointToLayer: Function = *\r\n\t * A `Function` defining how GeoJSON points spawn Leaflet layers. It is internally\r\n\t * called when data is added, passing the GeoJSON point feature and its `LatLng`.\r\n\t * The default is to spawn a default `Marker`:\r\n\t * ```js\r\n\t * function(geoJsonPoint, latlng) {\r\n\t * \treturn new Marker(latlng);\r\n\t * }\r\n\t * ```\r\n\t *\r\n\t * @option style: Function = *\r\n\t * A `Function` defining the `Path options` for styling GeoJSON lines and polygons,\r\n\t * called internally when data is added.\r\n\t * The default value is to not override any defaults:\r\n\t * ```js\r\n\t * function (geoJsonFeature) {\r\n\t * \treturn {}\r\n\t * }\r\n\t * ```\r\n\t *\r\n\t * @option onEachFeature: Function = *\r\n\t * A `Function` that will be called once for each created `Feature`, after it has\r\n\t * been created and styled. Useful for attaching events and popups to features.\r\n\t * The default is to do nothing with the newly created layers:\r\n\t * ```js\r\n\t * function (feature, layer) {}\r\n\t * ```\r\n\t *\r\n\t * @option filter: Function = *\r\n\t * A `Function` that will be used to decide whether to include a feature or not.\r\n\t * The default is to include all features:\r\n\t * ```js\r\n\t * function (geoJsonFeature) {\r\n\t * \treturn true;\r\n\t * }\r\n\t * ```\r\n\t * Note: dynamically changing the `filter` option will have effect only on newly\r\n\t * added data. It will _not_ re-evaluate already included features.\r\n\t *\r\n\t * @option coordsToLatLng: Function = *\r\n\t * A `Function` that will be used for converting GeoJSON coordinates to `LatLng`s.\r\n\t * The default is the `coordsToLatLng` static method.\r\n\t *\r\n\t * @option markersInheritOptions: Boolean = false\r\n\t * Whether default Markers for \"Point\" type Features inherit from group options.\r\n\t */\r\n\r\n\tinitialize(geojson, options) {\r\n\t\tsetOptions(this, options);\r\n\r\n\t\tthis._layers = {};\r\n\r\n\t\tif (geojson) {\r\n\t\t\tthis.addData(geojson);\r\n\t\t}\r\n\t}\r\n\r\n\t// @method addData( <GeoJSON> data ): this\r\n\t// Adds a GeoJSON object to the layer.\r\n\taddData(geojson) {\r\n\t\tconst features = Array.isArray(geojson) ? geojson : geojson.features;\r\n\r\n\t\tif (features) {\r\n\t\t\tfor (const feature of features) {\r\n\t\t\t\t// only add this if geometry or geometries are set and not null\r\n\t\t\t\tif (feature.geometries || feature.geometry || feature.features || feature.coordinates) {\r\n\t\t\t\t\tthis.addData(feature);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tconst options = this.options;\r\n\r\n\t\tif (options.filter && !options.filter(geojson)) { return this; }\r\n\r\n\t\tconst layer = geometryToLayer(geojson, options);\r\n\t\tif (!layer) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\tlayer.feature = asFeature(geojson);\r\n\r\n\t\tlayer.defaultOptions = layer.options;\r\n\t\tthis.resetStyle(layer);\r\n\r\n\t\tif (options.onEachFeature) {\r\n\t\t\toptions.onEachFeature(geojson, layer);\r\n\t\t}\r\n\r\n\t\treturn this.addLayer(layer);\r\n\t}\r\n\r\n\t// @method resetStyle( <Path> layer? ): this\r\n\t// Resets the given vector layer's style to the original GeoJSON style, useful for resetting style after hover events.\r\n\t// If `layer` is omitted, the style of all features in the current layer is reset.\r\n\tresetStyle(layer) {\r\n\t\tif (layer === undefined) {\r\n\t\t\treturn this.eachLayer(this.resetStyle, this);\r\n\t\t}\r\n\t\t// reset any custom styles\r\n\t\tlayer.options = Object.create(layer.defaultOptions);\r\n\t\tthis._setLayerStyle(layer, this.options.style);\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method setStyle( <Function> style ): this\r\n\t// Changes styles of GeoJSON vector layers with the given style function.\r\n\tsetStyle(style) {\r\n\t\treturn this.eachLayer(layer => this._setLayerStyle(layer, style));\r\n\t}\r\n\r\n\t_setLayerStyle(layer, style) {\r\n\t\tif (layer.setStyle) {\r\n\t\t\tif (typeof style === 'function') {\r\n\t\t\t\tstyle = style(layer.feature);\r\n\t\t\t}\r\n\t\t\tlayer.setStyle(style);\r\n\t\t}\r\n\t}\r\n}\r\n\r\n// @section\r\n// There are several static functions which can be called without instantiating GeoJSON:\r\n\r\n// @function geometryToLayer(featureData: Object, options?: GeoJSON options): Layer\r\n// Creates a `Layer` from a given GeoJSON feature. Can use a custom\r\n// [`pointToLayer`](#geojson-pointtolayer) and/or [`coordsToLatLng`](#geojson-coordstolatlng)\r\n// functions if provided as options.\r\nfunction geometryToLayer(geojson, options) {\r\n\r\n\tconst geometry = geojson.type === 'Feature' ? geojson.geometry : geojson,\r\n\tcoords = geometry?.coordinates,\r\n\tlayers = [],\r\n\tpointToLayer = options?.pointToLayer,\r\n\t_coordsToLatLng = options?.coordsToLatLng ?? coordsToLatLng;\r\n\tlet latlng, latlngs;\r\n\r\n\tif (!coords && !geometry) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\tswitch (geometry.type) {\r\n\tcase 'Point':\r\n\t\tlatlng = _coordsToLatLng(coords);\r\n\t\treturn _pointToLayer(pointToLayer, geojson, latlng, options);\r\n\r\n\tcase 'MultiPoint':\r\n\t\tfor (const coord of coords) {\r\n\t\t\tlatlng = _coordsToLatLng(coord);\r\n\t\t\tlayers.push(_pointToLayer(pointToLayer, geojson, latlng, options));\r\n\t\t}\r\n\t\treturn new FeatureGroup(layers);\r\n\r\n\tcase 'LineString':\r\n\tcase 'MultiLineString':\r\n\t\tlatlngs = coordsToLatLngs(coords, geometry.type === 'LineString' ? 0 : 1, _coordsToLatLng);\r\n\t\treturn new Polyline(latlngs, options);\r\n\r\n\tcase 'Polygon':\r\n\tcase 'MultiPolygon':\r\n\t\tlatlngs = coordsToLatLngs(coords, geometry.type === 'Polygon' ? 1 : 2, _coordsToLatLng);\r\n\t\treturn new Polygon(latlngs, options);\r\n\r\n\tcase 'GeometryCollection':\r\n\t\tfor (const g of geometry.geometries) {\r\n\t\t\tconst geoLayer = geometryToLayer({\r\n\t\t\t\tgeometry: g,\r\n\t\t\t\ttype: 'Feature',\r\n\t\t\t\tproperties: geojson.properties\r\n\t\t\t}, options);\r\n\r\n\t\t\tif (geoLayer) {\r\n\t\t\t\tlayers.push(geoLayer);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new FeatureGroup(layers);\r\n\r\n\tcase 'FeatureCollection':\r\n\t\tfor (const f of geometry.features) {\r\n\t\t\tconst featureLayer = geometryToLayer(f, options);\r\n\r\n\t\t\tif (featureLayer) {\r\n\t\t\t\tlayers.push(featureLayer);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new FeatureGroup(layers);\r\n\r\n\tdefault:\r\n\t\tthrow new Error('Invalid GeoJSON object.');\r\n\t}\r\n}\r\n\r\nfunction _pointToLayer(pointToLayerFn, geojson, latlng, options) {\r\n\treturn pointToLayerFn ?\r\n\t\tpointToLayerFn(geojson, latlng) :\r\n\t\tnew Marker(latlng, options?.markersInheritOptions && options);\r\n}\r\n\r\n// @function coordsToLatLng(coords: Array): LatLng\r\n// Creates a `LatLng` object from an array of 2 numbers (longitude, latitude)\r\n// or 3 numbers (longitude, latitude, altitude) used in GeoJSON for points.\r\nfunction coordsToLatLng(coords) {\r\n\treturn new LatLng(coords[1], coords[0], coords[2]);\r\n}\r\n\r\n// @function coordsToLatLngs(coords: Array, levelsDeep?: Number, coordsToLatLng?: Function): Array\r\n// Creates a multidimensional array of `LatLng`s from a GeoJSON coordinates array.\r\n// `levelsDeep` specifies the nesting level (0 is for an array of points, 1 for an array of arrays of points, etc., 0 by default).\r\n// Can use a custom [`coordsToLatLng`](#geojson-coordstolatlng) function.\r\nfunction coordsToLatLngs(coords, levelsDeep, _coordsToLatLng) {\r\n\treturn coords.map(coord => (levelsDeep ?\r\n\t\tcoordsToLatLngs(coord, levelsDeep - 1, _coordsToLatLng) :\r\n\t\t(_coordsToLatLng || coordsToLatLng)(coord)));\r\n}\r\n\r\n// @function latLngToCoords(latlng: LatLng, precision?: Number|false): Array\r\n// Reverse of [`coordsToLatLng`](#geojson-coordstolatlng)\r\n// Coordinates values are rounded with [`formatNum`](#util-formatnum) function.\r\nfunction latLngToCoords(latlng, precision) {\r\n\tlatlng = new LatLng(latlng);\r\n\treturn latlng.alt !== undefined ?\r\n\t\t[formatNum(latlng.lng, precision), formatNum(latlng.lat, precision), formatNum(latlng.alt, precision)] :\r\n\t\t[formatNum(latlng.lng, precision), formatNum(latlng.lat, precision)];\r\n}\r\n\r\n// @function latLngsToCoords(latlngs: Array, levelsDeep?: Number, close?: Boolean, precision?: Number|false): Array\r\n// Reverse of [`coordsToLatLngs`](#geojson-coordstolatlngs)\r\n// `close` determines whether the first point should be appended to the end of the array to close the feature, only used when `levelsDeep` is 0. False by default.\r\n// Coordinates values are rounded with [`formatNum`](#util-formatnum) function.\r\nfunction latLngsToCoords(latlngs, levelsDeep, close, precision) {\r\n\t// Check for flat arrays required to ensure unbalanced arrays are correctly converted in recursion\r\n\tconst coords = latlngs.map(latlng => (levelsDeep ?\r\n\t\tlatLngsToCoords(latlng, isFlat(latlng) ? 0 : levelsDeep - 1, close, precision) :\r\n\t\tlatLngToCoords(latlng, precision)));\r\n\r\n\tif (!levelsDeep && close && coords.length > 0) {\r\n\t\tcoords.push(coords[0].slice());\r\n\t}\r\n\r\n\treturn coords;\r\n}\r\n\r\n// @function getFeature(layer: Layer, newGeometry: Object): Object\r\n// Returns GeoJSON geometries/features of layer with new GeoJSON geometry.\r\nfunction getFeature(layer, newGeometry) {\r\n\treturn layer.feature ?\r\n\t\t{...layer.feature, geometry: newGeometry} :\r\n\t\tasFeature(newGeometry);\r\n}\r\n\r\n// @function asFeature(geojson: Object): Object\r\n// Normalize GeoJSON geometries/features into GeoJSON features.\r\nfunction asFeature(geojson) {\r\n\tif (geojson.type === 'Feature' || geojson.type === 'FeatureCollection') {\r\n\t\treturn geojson;\r\n\t}\r\n\r\n\treturn {\r\n\t\ttype: 'Feature',\r\n\t\tproperties: {},\r\n\t\tgeometry: geojson\r\n\t};\r\n}\r\n\r\nconst PointToGeoJSON = {\r\n\ttoGeoJSON(precision) {\r\n\t\treturn getFeature(this, {\r\n\t\t\ttype: 'Point',\r\n\t\t\tcoordinates: latLngToCoords(this.getLatLng(), precision)\r\n\t\t});\r\n\t}\r\n};\r\n\r\n// @namespace Marker\r\n// @section Other methods\r\n// @method toGeoJSON(precision?: Number|false): Object\r\n// Coordinates values are rounded with [`formatNum`](#util-formatnum) function with given `precision`.\r\n// Returns a [`GeoJSON`](https://en.wikipedia.org/wiki/GeoJSON) representation of the marker (as a GeoJSON `Point` Feature).\r\nMarker.include(PointToGeoJSON);\r\n\r\n// @namespace CircleMarker\r\n// @method toGeoJSON(precision?: Number|false): Object\r\n// Coordinates values are rounded with [`formatNum`](#util-formatnum) function with given `precision`.\r\n// Returns a [`GeoJSON`](https://en.wikipedia.org/wiki/GeoJSON) representation of the circle marker (as a GeoJSON `Point` Feature).\r\nCircle.include(PointToGeoJSON);\r\nCircleMarker.include(PointToGeoJSON);\r\n\r\n\r\n// @namespace Polyline\r\n// @method toGeoJSON(precision?: Number|false): Object\r\n// Coordinates values are rounded with [`formatNum`](#util-formatnum) function with given `precision`.\r\n// Returns a [`GeoJSON`](https://en.wikipedia.org/wiki/GeoJSON) representation of the polyline (as a GeoJSON `LineString` or `MultiLineString` Feature).\r\nPolyline.include({\r\n\ttoGeoJSON(precision) {\r\n\t\tconst multi = !isFlat(this._latlngs);\r\n\r\n\t\tconst coords = latLngsToCoords(this._latlngs, multi ? 1 : 0, false, precision);\r\n\r\n\t\treturn getFeature(this, {\r\n\t\t\ttype: `${multi ? 'Multi' : ''}LineString`,\r\n\t\t\tcoordinates: coords\r\n\t\t});\r\n\t}\r\n});\r\n\r\n// @namespace Polygon\r\n// @method toGeoJSON(precision?: Number|false): Object\r\n// Coordinates values are rounded with [`formatNum`](#util-formatnum) function with given `precision`.\r\n// Returns a [`GeoJSON`](https://en.wikipedia.org/wiki/GeoJSON) representation of the polygon (as a GeoJSON `Polygon` or `MultiPolygon` Feature).\r\nPolygon.include({\r\n\ttoGeoJSON(precision) {\r\n\t\tconst holes = !isFlat(this._latlngs),\r\n\t\tmulti = holes && !isFlat(this._latlngs[0]);\r\n\r\n\t\tlet coords = latLngsToCoords(this._latlngs, multi ? 2 : holes ? 1 : 0, true, precision);\r\n\r\n\t\tif (!holes) {\r\n\t\t\tcoords = [coords];\r\n\t\t}\r\n\r\n\t\treturn getFeature(this, {\r\n\t\t\ttype: `${multi ? 'Multi' : ''}Polygon`,\r\n\t\t\tcoordinates: coords\r\n\t\t});\r\n\t}\r\n});\r\n\r\n\r\n// @namespace LayerGroup\r\nLayerGroup.include({\r\n\ttoMultiPoint(precision) {\r\n\t\tconst coords = [];\r\n\r\n\t\tthis.eachLayer((layer) => {\r\n\t\t\tcoords.push(layer.toGeoJSON(precision).geometry.coordinates);\r\n\t\t});\r\n\r\n\t\treturn getFeature(this, {\r\n\t\t\ttype: 'MultiPoint',\r\n\t\t\tcoordinates: coords\r\n\t\t});\r\n\t},\r\n\r\n\t// @method toGeoJSON(precision?: Number|false): Object\r\n\t// Coordinates values are rounded with [`formatNum`](#util-formatnum) function with given `precision`.\r\n\t// Returns a [`GeoJSON`](https://en.wikipedia.org/wiki/GeoJSON) representation of the layer group (as a GeoJSON `FeatureCollection`, `GeometryCollection`, or `MultiPoint`).\r\n\ttoGeoJSON(precision) {\r\n\r\n\t\tconst type = this.feature?.geometry?.type;\r\n\r\n\t\tif (type === 'MultiPoint') {\r\n\t\t\treturn this.toMultiPoint(precision);\r\n\t\t}\r\n\r\n\t\tconst isGeometryCollection = type === 'GeometryCollection',\r\n\t\tjsons = [];\r\n\r\n\t\tthis.eachLayer((layer) => {\r\n\t\t\tif (layer.toGeoJSON) {\r\n\t\t\t\tconst json = layer.toGeoJSON(precision);\r\n\t\t\t\tif (isGeometryCollection) {\r\n\t\t\t\t\tjsons.push(json.geometry);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tconst feature = asFeature(json);\r\n\t\t\t\t\t// Squash nested feature collections\r\n\t\t\t\t\tif (feature.type === 'FeatureCollection') {\r\n\t\t\t\t\t\tjsons.push.apply(jsons, feature.features);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tjsons.push(feature);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif (isGeometryCollection) {\r\n\t\t\treturn getFeature(this, {\r\n\t\t\t\tgeometries: jsons,\r\n\t\t\t\ttype: 'GeometryCollection'\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\ttype: 'FeatureCollection',\r\n\t\t\tfeatures: jsons\r\n\t\t};\r\n\t}\r\n});\n\n/*\n * @class BlanketOverlay\n * @inherits Layer\n *\n * Represents an HTML element that covers (\"blankets\") the entire surface\n * of the map.\n *\n * Do not use this class directly. It's meant for `Renderer`, and for plugins\n * that rely on one single HTML element\n */\n\nclass BlanketOverlay extends Layer {\n\n\tstatic {\n\t\t// @section\n\t\t// @aka BlanketOverlay options\n\t\tthis.setDefaultOptions({\n\t\t\t// @option padding: Number = 0.1\n\t\t\t// How much to extend the clip area around the map view (relative to its size)\n\t\t\t// e.g. 0.1 would be 10% of map view in each direction\n\t\t\tpadding: 0.1,\n\n\t\t\t// @option continuous: Boolean = false\n\t\t\t// When `false`, the blanket will update its position only when the\n\t\t\t// map state settles (*after* a pan/zoom animation). When `true`,\n\t\t\t// it will update when the map state changes (*during* pan/zoom\n\t\t\t// animations)\n\t\t\tcontinuous: false,\n\t\t});\n\t}\n\n\tinitialize(options) {\n\t\tsetOptions(this, options);\n\t}\n\n\tonAdd() {\n\t\tif (!this._container) {\n\t\t\tthis._initContainer(); // defined by renderer implementations\n\n\t\t\t// always keep transform-origin as 0 0, #8794\n\t\t\tthis._container.classList.add('leaflet-zoom-animated');\n\t\t}\n\n\t\tthis.getPane().appendChild(this._container);\n\t\tthis._resizeContainer();\n\t\tthis._onMoveEnd();\n\t}\n\n\tonRemove() {\n\t\tthis._destroyContainer();\n\t}\n\n\tgetEvents() {\n\t\tconst events = {\n\t\t\tviewreset: this._reset,\n\t\t\tzoom: this._onZoom,\n\t\t\tmoveend: this._onMoveEnd,\n\t\t\tzoomend: this._onZoomEnd\n\t\t};\n\t\tif (this._zoomAnimated) {\n\t\t\tevents.zoomanim = this._onAnimZoom;\n\t\t}\n\t\tif (this.options.continuous) {\n\t\t\tevents.move = this._onMoveEnd;\n\t\t}\n\t\treturn events;\n\t}\n\n\t_onAnimZoom(ev) {\n\t\tthis._updateTransform(ev.center, ev.zoom);\n\t}\n\n\t_onZoom() {\n\t\tthis._updateTransform(this._map.getCenter(), this._map.getZoom());\n\t}\n\n\t_updateTransform(center, zoom) {\n\t\tconst scale = this._map.getZoomScale(zoom, this._zoom),\n\t\tviewHalf = this._map.getSize().multiplyBy(0.5 + this.options.padding),\n\t\tcurrentCenterPoint = this._map.project(this._center, zoom),\n\t\ttopLeftOffset = viewHalf.multiplyBy(-scale).add(currentCenterPoint)\n\t\t\t.subtract(this._map._getNewPixelOrigin(center, zoom));\n\n\t\tsetTransform(this._container, topLeftOffset, scale);\n\t}\n\n\t_onMoveEnd(ev) {\n\t\t// Update pixel bounds of renderer container (for positioning/sizing/clipping later)\n\t\tconst p = this.options.padding,\n\t\tsize = this._map.getSize(),\n\t\tmin = this._map.containerPointToLayerPoint(size.multiplyBy(-p)).round();\n\n\t\tthis._bounds = new Bounds(min, min.add(size.multiplyBy(1 + p * 2)).round());\n\n\t\tthis._center = this._map.getCenter();\n\t\tthis._zoom = this._map.getZoom();\n\t\tthis._updateTransform(this._center, this._zoom);\n\n\t\tthis._onSettled(ev);\n\n\t\tthis._resizeContainer();\n\t}\n\n\t_reset() {\n\t\tthis._onSettled();\n\t\tthis._updateTransform(this._center, this._zoom);\n\t\tthis._onViewReset();\n\t}\n\n\t/*\n\t * @section Subclass interface\n\t * @uninheritable\n\t * Subclasses must define the following methods:\n\t *\n\t * @method _initContainer(): undefined\n\t * Must initialize the HTML element to use as blanket, and store it as\n\t * `this._container`. The base implementation creates a blank `<div>`\n\t *\n\t * @method _destroyContainer(): undefined\n\t * Must destroy the HTML element in `this._container` and free any other\n\t * resources. The base implementation destroys the element and removes\n\t * any event handlers attached to it.\n\t *\n\t * @method _resizeContainer(): Point\n\t * The base implementation resizes the container (based on the map's size\n\t * and taking into account the padding), returning the new size in CSS pixels.\n\t *\n\t * Subclass implementations shall reset container parameters and data\n\t * structures as needed.\n\t *\n\t * @method _onZoomEnd(ev?: PointerEvent): undefined\n\t * (Optional) Runs on the map's `zoomend` event.\n\t *\n\t * @method _onViewReset(ev?: PointerEvent): undefined\n\t * (Optional) Runs on the map's `viewreset` event.\n\t *\n\t * @method _onSettled(): undefined\n\t * Runs whenever the map state settles after changing (at the end of pan/zoom\n\t * animations, etc). This should trigger the bulk of any rendering logic.\n\t *\n\t * If the `continuous` option is set to `true`, then this also runs on\n\t * any map state change (including *during* pan/zoom animations).\n\t */\n\t_initContainer() {\n\t\tthis._container = create$1('div');\n\t}\n\t_destroyContainer() {\n\t\toff(this._container);\n\t\tthis._container.remove();\n\t\tdelete this._container;\n\t}\n\t_resizeContainer() {\n\t\tconst p = this.options.padding,\n\t\tsize = this._map.getSize().multiplyBy(1 + p * 2).round();\n\t\tthis._container.style.width = `${size.x}px`;\n\t\tthis._container.style.height = `${size.y}px`;\n\t\treturn size;\n\t}\n\t_onZoomEnd() {}\n\t_onViewReset() {}\n\t_onSettled() {}\n}\n\n/*\r\n * @class ImageOverlay\r\n * @inherits Interactive layer\r\n *\r\n * Used to load and display a single image over specific bounds of the map. Extends `Layer`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * const imageUrl = 'https://maps.lib.utexas.edu/maps/historical/newark_nj_1922.jpg',\r\n * \timageBounds = [[40.712216, -74.22655], [40.773941, -74.12544]];\r\n * new ImageOverlay(imageUrl, imageBounds).addTo(map);\r\n * ```\r\n */\r\n\r\n// @constructor ImageOverlay(imageUrl: String, bounds: LatLngBounds, options?: ImageOverlay options)\r\n// Instantiates an image overlay object given the URL of the image and the\r\n// geographical bounds it is tied to.\r\nclass ImageOverlay extends Layer {\r\n\r\n\tstatic {\r\n\t\t// @section\r\n\t\t// @aka ImageOverlay options\r\n\t\tthis.setDefaultOptions({\r\n\t\t\t// @option opacity: Number = 1.0\r\n\t\t\t// The opacity of the image overlay.\r\n\t\t\topacity: 1,\r\n\r\n\t\t\t// @option alt: String = ''\r\n\t\t\t// Text for the `alt` attribute of the image (useful for accessibility).\r\n\t\t\talt: '',\r\n\r\n\t\t\t// @option interactive: Boolean = false\r\n\t\t\t// If `true`, the image overlay will emit [pointer events](#interactive-layer) when clicked or hovered.\r\n\t\t\tinteractive: false,\r\n\r\n\t\t\t// @option crossOrigin: Boolean|String = false\r\n\t\t\t// Whether the crossOrigin attribute will be added to the image.\r\n\t\t\t// If a String is provided, the image will have its crossOrigin attribute set to the String provided. This is needed if you want to access image pixel data.\r\n\t\t\t// Refer to [CORS Settings](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for valid String values.\r\n\t\t\tcrossOrigin: false,\r\n\r\n\t\t\t// @option errorOverlayUrl: String = ''\r\n\t\t\t// URL to the overlay image to show in place of the overlay that failed to load.\r\n\t\t\terrorOverlayUrl: '',\r\n\r\n\t\t\t// @option zIndex: Number = 1\r\n\t\t\t// The explicit [zIndex](https://developer.mozilla.org/docs/Web/CSS/CSS_Positioning/Understanding_z_index) of the overlay layer.\r\n\t\t\tzIndex: 1,\r\n\r\n\t\t\t// @option className: String = ''\r\n\t\t\t// A custom class name to assign to the image. Empty by default.\r\n\t\t\tclassName: '',\r\n\r\n\t\t\t// @option decoding: String = 'auto'\r\n\t\t\t// Tells the browser whether to decode the image in a synchronous fashion,\r\n\t\t\t// as per the [`decoding` HTML attribute](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/decoding).\r\n\t\t\t// If the image overlay is flickering when being added/removed, set\r\n\t\t\t// this option to `'sync'`.\r\n\t\t\tdecoding: 'auto'\r\n\t\t});\r\n\t}\r\n\r\n\tinitialize(url, bounds, options) { // (String, LatLngBounds, Object)\r\n\t\tthis._url = url;\r\n\t\tthis._bounds = new LatLngBounds(bounds);\r\n\r\n\t\tsetOptions(this, options);\r\n\t}\r\n\r\n\tonAdd() {\r\n\t\tif (!this._image) {\r\n\t\t\tthis._initImage();\r\n\r\n\t\t\tif (this.options.opacity < 1) {\r\n\t\t\t\tthis._updateOpacity();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (this.options.interactive) {\r\n\t\t\tthis._image.classList.add('leaflet-interactive');\r\n\t\t\tthis.addInteractiveTarget(this._image);\r\n\t\t}\r\n\r\n\t\tthis.getPane().appendChild(this._image);\r\n\t\tthis._reset();\r\n\t}\r\n\r\n\tonRemove() {\r\n\t\tthis._image.remove();\r\n\t\tif (this.options.interactive) {\r\n\t\t\tthis.removeInteractiveTarget(this._image);\r\n\t\t}\r\n\t}\r\n\r\n\t// @method setOpacity(opacity: Number): this\r\n\t// Sets the opacity of the overlay.\r\n\tsetOpacity(opacity) {\r\n\t\tthis.options.opacity = opacity;\r\n\r\n\t\tif (this._image) {\r\n\t\t\tthis._updateOpacity();\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n\r\n\tsetStyle(styleOpts) {\r\n\t\tif (styleOpts.opacity) {\r\n\t\t\tthis.setOpacity(styleOpts.opacity);\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method bringToFront(): this\r\n\t// Brings the layer to the top of all overlays.\r\n\tbringToFront() {\r\n\t\tif (this._map) {\r\n\t\t\ttoFront(this._image);\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method bringToBack(): this\r\n\t// Brings the layer to the bottom of all overlays.\r\n\tbringToBack() {\r\n\t\tif (this._map) {\r\n\t\t\ttoBack(this._image);\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method setUrl(url: String): this\r\n\t// Changes the URL of the image.\r\n\tsetUrl(url) {\r\n\t\tthis._url = url;\r\n\r\n\t\tif (this._image) {\r\n\t\t\tthis._image.src = url;\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method setBounds(bounds: LatLngBounds): this\r\n\t// Update the bounds that this ImageOverlay covers\r\n\tsetBounds(bounds) {\r\n\t\tthis._bounds = new LatLngBounds(bounds);\r\n\r\n\t\tif (this._map) {\r\n\t\t\tthis._reset();\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n\r\n\tgetEvents() {\r\n\t\tconst events = {\r\n\t\t\tzoom: this._reset,\r\n\t\t\tviewreset: this._reset\r\n\t\t};\r\n\r\n\t\tif (this._zoomAnimated) {\r\n\t\t\tevents.zoomanim = this._animateZoom;\r\n\t\t}\r\n\r\n\t\treturn events;\r\n\t}\r\n\r\n\t// @method setZIndex(value: Number): this\r\n\t// Changes the [zIndex](#imageoverlay-zindex) of the image overlay.\r\n\tsetZIndex(value) {\r\n\t\tthis.options.zIndex = value;\r\n\t\tthis._updateZIndex();\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method getBounds(): LatLngBounds\r\n\t// Get the bounds that this ImageOverlay covers\r\n\tgetBounds() {\r\n\t\treturn this._bounds;\r\n\t}\r\n\r\n\t// @method getElement(): HTMLElement\r\n\t// Returns the instance of [`HTMLImageElement`](https://developer.mozilla.org/docs/Web/API/HTMLImageElement)\r\n\t// used by this overlay.\r\n\tgetElement() {\r\n\t\treturn this._image;\r\n\t}\r\n\r\n\t_initImage() {\r\n\t\tconst wasElementSupplied = this._url.tagName === 'IMG';\r\n\t\tconst img = this._image = wasElementSupplied ? this._url : create$1('img');\r\n\r\n\t\timg.classList.add('leaflet-image-layer');\r\n\t\tif (this._zoomAnimated) { img.classList.add('leaflet-zoom-animated'); }\r\n\t\tif (this.options.className) { img.classList.add(...splitWords(this.options.className)); }\r\n\r\n\t\timg.onselectstart = falseFn;\r\n\t\timg.onpointermove = falseFn;\r\n\r\n\t\t// @event load: Event\r\n\t\t// Fired when the ImageOverlay layer has loaded its image\r\n\t\timg.onload = this.fire.bind(this, 'load');\r\n\t\timg.onerror = this._overlayOnError.bind(this);\r\n\r\n\t\tif (this.options.crossOrigin || this.options.crossOrigin === '') {\r\n\t\t\timg.crossOrigin = this.options.crossOrigin === true ? '' : this.options.crossOrigin;\r\n\t\t}\r\n\r\n\t\timg.decoding = this.options.decoding;\r\n\r\n\t\tif (this.options.zIndex) {\r\n\t\t\tthis._updateZIndex();\r\n\t\t}\r\n\r\n\t\tif (wasElementSupplied) {\r\n\t\t\tthis._url = img.src;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\timg.src = this._url;\r\n\t\timg.alt = this.options.alt;\r\n\t}\r\n\r\n\t_animateZoom(e) {\r\n\t\tconst scale = this._map.getZoomScale(e.zoom),\r\n\t\toffset = this._map._latLngBoundsToNewLayerBounds(this._bounds, e.zoom, e.center).min;\r\n\r\n\t\tsetTransform(this._image, offset, scale);\r\n\t}\r\n\r\n\t_reset() {\r\n\t\tconst image = this._image,\r\n\t\tbounds = new Bounds(\r\n\t\t\tthis._map.latLngToLayerPoint(this._bounds.getNorthWest()),\r\n\t\t\tthis._map.latLngToLayerPoint(this._bounds.getSouthEast())),\r\n\t\tsize = bounds.getSize();\r\n\r\n\t\tsetPosition(image, bounds.min);\r\n\r\n\t\timage.style.width = `${size.x}px`;\r\n\t\timage.style.height = `${size.y}px`;\r\n\t}\r\n\r\n\t_updateOpacity() {\r\n\t\tthis._image.style.opacity = this.options.opacity;\r\n\t}\r\n\r\n\t_updateZIndex() {\r\n\t\tif (this._image && this.options.zIndex !== undefined && this.options.zIndex !== null) {\r\n\t\t\tthis._image.style.zIndex = this.options.zIndex;\r\n\t\t}\r\n\t}\r\n\r\n\t_overlayOnError() {\r\n\t\t// @event error: Event\r\n\t\t// Fired when the ImageOverlay layer fails to load its image\r\n\t\tthis.fire('error');\r\n\r\n\t\tconst errorUrl = this.options.errorOverlayUrl;\r\n\t\tif (errorUrl && this._url !== errorUrl) {\r\n\t\t\tthis._url = errorUrl;\r\n\t\t\tthis._image.src = errorUrl;\r\n\t\t}\r\n\t}\r\n\r\n\t// @method getCenter(): LatLng\r\n\t// Returns the center of the ImageOverlay.\r\n\tgetCenter() {\r\n\t\treturn this._bounds.getCenter();\r\n\t}\r\n}\n\n/*\r\n * @class VideoOverlay\r\n * @inherits ImageOverlay\r\n *\r\n * Used to load and display a video player over specific bounds of the map. Extends `ImageOverlay`.\r\n *\r\n * A video overlay uses the [`<video>`](https://developer.mozilla.org/docs/Web/HTML/Element/video)\r\n * HTML element.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * const videoUrl = 'https://www.mapbox.com/bites/00188/patricia_nasa.webm',\r\n * \tvideoBounds = [[ 32, -130], [ 13, -100]];\r\n * new VideoOverlay(videoUrl, videoBounds ).addTo(map);\r\n * ```\r\n */\r\n\r\n// @constructor VideoOverlay(video: String|Array|HTMLVideoElement, bounds: LatLngBounds, options?: VideoOverlay options)\r\n// Instantiates an image overlay object given the URL of the video (or array of URLs, or even a video element) and the\r\n// geographical bounds it is tied to.\r\nclass VideoOverlay extends ImageOverlay {\r\n\r\n\tstatic {\r\n\t\t// @section\r\n\t\t// @aka VideoOverlay options\r\n\t\tthis.setDefaultOptions({\r\n\t\t\t// @option autoplay: Boolean = true\r\n\t\t\t// Whether the video starts playing automatically when loaded.\r\n\t\t\t// On some browsers autoplay will only work with `muted: true`\r\n\t\t\tautoplay: true,\r\n\r\n\t\t\t// @option loop: Boolean = false\r\n\t\t\t// Whether the browser will offer controls to allow the user to control video playback, including volume, seeking, and pause/resume playback.\r\n\t\t\tcontrols: false,\r\n\r\n\t\t\t// @option loop: Boolean = true\r\n\t\t\t// Whether the video will loop back to the beginning when played.\r\n\t\t\tloop: true,\r\n\r\n\t\t\t// @option keepAspectRatio: Boolean = true\r\n\t\t\t// Whether the video will save aspect ratio after the projection.\r\n\t\t\tkeepAspectRatio: true,\r\n\r\n\t\t\t// @option muted: Boolean = false\r\n\t\t\t// Whether the video starts on mute when loaded.\r\n\t\t\tmuted: false,\r\n\r\n\t\t\t// @option playsInline: Boolean = true\r\n\t\t\t// Mobile browsers will play the video right where it is instead of open it up in fullscreen mode.\r\n\t\t\tplaysInline: true\r\n\t\t});\r\n\t}\r\n\r\n\t_initImage() {\r\n\t\tconst wasElementSupplied = this._url.tagName === 'VIDEO';\r\n\t\tconst vid = this._image = wasElementSupplied ? this._url : create$1('video');\r\n\r\n\t\tvid.classList.add('leaflet-image-layer');\r\n\t\tif (this._zoomAnimated) { vid.classList.add('leaflet-zoom-animated'); }\r\n\t\tif (this.options.className) { vid.classList.add(...splitWords(this.options.className)); }\r\n\r\n\t\ton(vid, 'pointerdown', (e) => {\r\n\t\t\tif (vid.controls) {\r\n\t\t\t\t// Prevent the map from moving when the video or the seekbar is moved\r\n\t\t\t\tstopPropagation(e);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t// @event load: Event\r\n\t\t// Fired when the video has finished loading the first frame\r\n\t\tvid.onloadeddata = this.fire.bind(this, 'load');\r\n\r\n\t\tif (wasElementSupplied) {\r\n\t\t\tconst sourceElements = vid.getElementsByTagName('source');\r\n\t\t\tconst sources = sourceElements.map(e => e.src);\r\n\t\t\tthis._url = (sourceElements.length > 0) ? sources : [vid.src];\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (!Array.isArray(this._url)) { this._url = [this._url]; }\r\n\r\n\t\tif (!this.options.keepAspectRatio && Object.hasOwn(vid.style, 'objectFit')) {\r\n\t\t\tvid.style['objectFit'] = 'fill';\r\n\t\t}\r\n\t\tvid.autoplay = !!this.options.autoplay;\r\n\t\tvid.controls = !!this.options.controls;\r\n\t\tvid.loop = !!this.options.loop;\r\n\t\tvid.muted = !!this.options.muted;\r\n\t\tvid.playsInline = !!this.options.playsInline;\r\n\t\tfor (const url of this._url) {\r\n\t\t\tconst source = create$1('source');\r\n\t\t\tsource.src = url;\r\n\t\t\tvid.appendChild(source);\r\n\t\t}\r\n\t}\r\n\r\n\t// @method getElement(): HTMLVideoElement\r\n\t// Returns the instance of [`HTMLVideoElement`](https://developer.mozilla.org/docs/Web/API/HTMLVideoElement)\r\n\t// used by this overlay.\r\n}\n\n/*\n * @class SVGOverlay\n * @inherits ImageOverlay\n *\n * Used to load, display and provide DOM access to an SVG file over specific bounds of the map. Extends `ImageOverlay`.\n *\n * An SVG overlay uses the [`<svg>`](https://developer.mozilla.org/docs/Web/SVG/Element/svg) element.\n *\n * @example\n *\n * ```js\n * const svgElement = document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\");\n * svgElement.setAttribute('xmlns', \"http://www.w3.org/2000/svg\");\n * svgElement.setAttribute('viewBox', \"0 0 200 200\");\n * svgElement.innerHTML = '<rect width=\"200\" height=\"200\"/><rect x=\"75\" y=\"23\" width=\"50\" height=\"50\" style=\"fill:red\"/><rect x=\"75\" y=\"123\" width=\"50\" height=\"50\" style=\"fill:#0013ff\"/>';\n * const svgElementBounds = [ [ 32, -130 ], [ 13, -100 ] ];\n * new SVGOverlay(svgElement, svgElementBounds).addTo(map);\n * ```\n */\n\n// @constructor SVGOverlay(svg: String|SVGElement, bounds: LatLngBounds, options?: SVGOverlay options)\n// Instantiates an image overlay object given an SVG element and the geographical bounds it is tied to.\n// A viewBox attribute is required on the SVG element to zoom in and out properly.\nclass SVGOverlay extends ImageOverlay {\n\t_initImage() {\n\t\tconst el = this._image = this._url;\n\n\t\tel.classList.add('leaflet-image-layer');\n\t\tif (this._zoomAnimated) { el.classList.add('leaflet-zoom-animated'); }\n\t\tif (this.options.className) { el.classList.add(...splitWords(this.options.className)); }\n\n\t\tel.onselectstart = falseFn;\n\t\tel.onpointermove = falseFn;\n\t}\n\n\t// @method getElement(): SVGElement\n\t// Returns the instance of [`SVGElement`](https://developer.mozilla.org/docs/Web/API/SVGElement)\n\t// used by this overlay.\n}\n\n/*\r\n * @class DivOverlay\r\n * @inherits Interactive layer\r\n * Base model for Popup and Tooltip. Inherit from it for custom overlays like plugins.\r\n */\r\n\r\n// @namespace DivOverlay\r\nclass DivOverlay extends Layer {\r\n\r\n\tstatic {\r\n\t\t// @section\r\n\t\t// @aka DivOverlay options\r\n\t\tthis.setDefaultOptions({\r\n\t\t\t// @option interactive: Boolean = false\r\n\t\t\t// If true, the popup/tooltip will listen to the pointer events.\r\n\t\t\tinteractive: false,\r\n\r\n\t\t\t// @option offset: Point = Point(0, 0)\r\n\t\t\t// The offset of the overlay position.\r\n\t\t\toffset: [0, 0],\r\n\r\n\t\t\t// @option className: String = ''\r\n\t\t\t// A custom CSS class name to assign to the overlay.\r\n\t\t\tclassName: '',\r\n\r\n\t\t\t// @option pane: String = undefined\r\n\t\t\t// `Map pane` where the overlay will be added.\r\n\t\t\tpane: undefined,\r\n\r\n\t\t\t// @option content: String|HTMLElement|Function = ''\r\n\t\t\t// Sets the HTML content of the overlay while initializing. If a function is passed the source layer will be\r\n\t\t\t// passed to the function. The function should return a `String` or `HTMLElement` to be used in the overlay.\r\n\t\t\tcontent: ''\r\n\t\t});\r\n\t}\r\n\r\n\tinitialize(options, source) {\r\n\t\tif (options instanceof LatLng || Array.isArray(options)) {\r\n\t\t\tthis._latlng = new LatLng(options);\r\n\t\t\tsetOptions(this, source);\r\n\t\t} else {\r\n\t\t\tsetOptions(this, options);\r\n\t\t\tthis._source = source;\r\n\t\t}\r\n\t\tif (this.options.content) {\r\n\t\t\tthis._content = this.options.content;\r\n\t\t}\r\n\t}\r\n\r\n\t// @method openOn(map: Map): this\r\n\t// Adds the overlay to the map.\r\n\t// Alternative to `map.openPopup(popup)`/`.openTooltip(tooltip)`.\r\n\topenOn(map) {\r\n\t\tmap = arguments.length ? map : this._source._map; // experimental, not the part of public api\r\n\t\tif (!map.hasLayer(this)) {\r\n\t\t\tmap.addLayer(this);\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method close(): this\r\n\t// Closes the overlay.\r\n\t// Alternative to `map.closePopup(popup)`/`.closeTooltip(tooltip)`\r\n\t// and `layer.closePopup()`/`.closeTooltip()`.\r\n\tclose() {\r\n\t\tthis._map?.removeLayer(this);\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method toggle(layer?: Layer): this\r\n\t// Opens or closes the overlay bound to layer depending on its current state.\r\n\t// Argument may be omitted only for overlay bound to layer.\r\n\t// Alternative to `layer.togglePopup()`/`.toggleTooltip()`.\r\n\ttoggle(layer) {\r\n\t\tif (this._map) {\r\n\t\t\tthis.close();\r\n\t\t} else {\r\n\t\t\tif (arguments.length) {\r\n\t\t\t\tthis._source = layer;\r\n\t\t\t} else {\r\n\t\t\t\tlayer = this._source;\r\n\t\t\t}\r\n\t\t\tthis._prepareOpen();\r\n\r\n\t\t\t// open the overlay on the map\r\n\t\t\tthis.openOn(layer._map);\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n\r\n\tonAdd(map) {\r\n\t\tthis._zoomAnimated = map._zoomAnimated;\r\n\r\n\t\tif (!this._container) {\r\n\t\t\tthis._initLayout();\r\n\t\t}\r\n\r\n\t\tif (map._fadeAnimated) {\r\n\t\t\tthis._container.style.opacity = 0;\r\n\t\t}\r\n\r\n\t\tclearTimeout(this._removeTimeout);\r\n\t\tthis.getPane().appendChild(this._container);\r\n\t\tthis.update();\r\n\r\n\t\tif (map._fadeAnimated) {\r\n\t\t\tthis._container.style.opacity = 1;\r\n\t\t}\r\n\r\n\t\tthis.bringToFront();\r\n\r\n\t\tif (this.options.interactive) {\r\n\t\t\tthis._container.classList.add('leaflet-interactive');\r\n\t\t\tthis.addInteractiveTarget(this._container);\r\n\t\t}\r\n\t}\r\n\r\n\tonRemove(map) {\r\n\t\tif (map._fadeAnimated) {\r\n\t\t\tthis._container.style.opacity = 0;\r\n\t\t\tthis._removeTimeout = setTimeout(() => this._container.remove(), 200);\r\n\t\t} else {\r\n\t\t\tthis._container.remove();\r\n\t\t}\r\n\r\n\t\tif (this.options.interactive) {\r\n\t\t\tthis._container.classList.remove('leaflet-interactive');\r\n\t\t\tthis.removeInteractiveTarget(this._container);\r\n\t\t}\r\n\t}\r\n\r\n\t// @namespace DivOverlay\r\n\t// @method getLatLng: LatLng\r\n\t// Returns the geographical point of the overlay.\r\n\tgetLatLng() {\r\n\t\treturn this._latlng;\r\n\t}\r\n\r\n\t// @method setLatLng(latlng: LatLng): this\r\n\t// Sets the geographical point where the overlay will open.\r\n\tsetLatLng(latlng) {\r\n\t\tthis._latlng = new LatLng(latlng);\r\n\t\tif (this._map) {\r\n\t\t\tthis._updatePosition();\r\n\t\t\tthis._adjustPan();\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method getContent: String|HTMLElement|Function)\r\n\t// Returns the content of the overlay.\r\n\tgetContent() {\r\n\t\treturn this._content;\r\n\t}\r\n\r\n\t// @method setContent(htmlContent: String|HTMLElement|Function): this\r\n\t// Sets the HTML content of the overlay. If a function is passed the source layer will be passed to the function.\r\n\t// The function should return a `String` or `HTMLElement` to be used in the overlay.\r\n\tsetContent(content) {\r\n\t\tthis._content = content;\r\n\t\tthis.update();\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method getElement: HTMLElement\r\n\t// Returns the HTML container of the overlay.\r\n\tgetElement() {\r\n\t\treturn this._container;\r\n\t}\r\n\r\n\t// @method update: null\r\n\t// Updates the overlay content, layout and position. Useful for updating the overlay after something inside changed, e.g. image loaded.\r\n\tupdate() {\r\n\t\tif (!this._map) { return; }\r\n\r\n\t\tthis._container.style.visibility = 'hidden';\r\n\r\n\t\tthis._updateContent();\r\n\t\tthis._updateLayout();\r\n\t\tthis._updatePosition();\r\n\r\n\t\tthis._container.style.visibility = '';\r\n\r\n\t\tthis._adjustPan();\r\n\t}\r\n\r\n\tgetEvents() {\r\n\t\tconst events = {\r\n\t\t\tzoom: this._updatePosition,\r\n\t\t\tviewreset: this._updatePosition\r\n\t\t};\r\n\r\n\t\tif (this._zoomAnimated) {\r\n\t\t\tevents.zoomanim = this._animateZoom;\r\n\t\t}\r\n\t\treturn events;\r\n\t}\r\n\r\n\t// @method isOpen: Boolean\r\n\t// Returns `true` when the overlay is visible on the map.\r\n\tisOpen() {\r\n\t\treturn !!this._map && this._map.hasLayer(this);\r\n\t}\r\n\r\n\t// @method bringToFront: this\r\n\t// Brings this overlay in front of other overlays (in the same map pane).\r\n\tbringToFront() {\r\n\t\tif (this._map) {\r\n\t\t\ttoFront(this._container);\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method bringToBack: this\r\n\t// Brings this overlay to the back of other overlays (in the same map pane).\r\n\tbringToBack() {\r\n\t\tif (this._map) {\r\n\t\t\ttoBack(this._container);\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// prepare bound overlay to open: update latlng pos / content source (for FeatureGroup)\r\n\t_prepareOpen(latlng) {\r\n\t\tlet source = this._source;\r\n\t\tif (!source._map) { return false; }\r\n\r\n\t\tif (source instanceof FeatureGroup) {\r\n\t\t\tsource = null;\r\n\t\t\tfor (const layer of Object.values(this._source._layers)) {\r\n\t\t\t\tif (layer._map) {\r\n\t\t\t\t\tsource = layer;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!source) { return false; } // Unable to get source layer.\r\n\r\n\t\t\t// set overlay source to this layer\r\n\t\t\tthis._source = source;\r\n\t\t}\r\n\r\n\t\tif (!latlng) {\r\n\t\t\tif (source.getCenter) {\r\n\t\t\t\tlatlng = source.getCenter();\r\n\t\t\t} else if (source.getLatLng) {\r\n\t\t\t\tlatlng = source.getLatLng();\r\n\t\t\t} else if (source.getBounds) {\r\n\t\t\t\tlatlng = source.getBounds().getCenter();\r\n\t\t\t} else {\r\n\t\t\t\tthrow new Error('Unable to get source layer LatLng.');\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.setLatLng(latlng);\r\n\r\n\t\tif (this._map) {\r\n\t\t\t// update the overlay (content, layout, etc...)\r\n\t\t\tthis.update();\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}\r\n\r\n\t_updateContent() {\r\n\t\tif (!this._content) { return; }\r\n\r\n\t\tconst node = this._contentNode;\r\n\t\tconst content = (typeof this._content === 'function') ? this._content(this._source ?? this) : this._content;\r\n\r\n\t\tif (typeof content === 'string') {\r\n\t\t\tnode.innerHTML = content;\r\n\t\t} else {\r\n\t\t\twhile (node.hasChildNodes()) {\r\n\t\t\t\tnode.removeChild(node.firstChild);\r\n\t\t\t}\r\n\t\t\tnode.appendChild(content);\r\n\t\t}\r\n\r\n\t\t// @namespace DivOverlay\r\n\t\t// @section DivOverlay events\r\n\t\t// @event contentupdate: Event\r\n\t\t// Fired when the content of the overlay is updated\r\n\t\tthis.fire('contentupdate');\r\n\t}\r\n\r\n\t_updatePosition() {\r\n\t\tif (!this._map) { return; }\r\n\r\n\t\tconst pos = this._map.latLngToLayerPoint(this._latlng),\r\n\t\tanchor = this._getAnchor();\r\n\t\tlet offset = new Point(this.options.offset);\r\n\r\n\t\tif (this._zoomAnimated) {\r\n\t\t\tsetPosition(this._container, pos.add(anchor));\r\n\t\t} else {\r\n\t\t\toffset = offset.add(pos).add(anchor);\r\n\t\t}\r\n\r\n\t\tconst bottom = this._containerBottom = -offset.y,\r\n\t\tleft = this._containerLeft = -Math.round(this._containerWidth / 2) + offset.x;\r\n\r\n\t\t// bottom position the overlay in case the height of the overlay changes (images loading etc)\r\n\t\tthis._container.style.bottom = `${bottom}px`;\r\n\t\tthis._container.style.left = `${left}px`;\r\n\t}\r\n\r\n\t_getAnchor() {\r\n\t\treturn [0, 0];\r\n\t}\r\n\r\n}\r\n\r\nMap$1.include({\r\n\t_initOverlay(OverlayClass, content, latlng, options) {\r\n\t\tlet overlay = content;\r\n\t\tif (!(overlay instanceof OverlayClass)) {\r\n\t\t\toverlay = new OverlayClass(options).setContent(content);\r\n\t\t}\r\n\t\tif (latlng) {\r\n\t\t\toverlay.setLatLng(latlng);\r\n\t\t}\r\n\t\treturn overlay;\r\n\t}\r\n});\r\n\r\n\r\nLayer.include({\r\n\t_initOverlay(OverlayClass, old, content, options) {\r\n\t\tlet overlay = content;\r\n\t\tif (overlay instanceof OverlayClass) {\r\n\t\t\tsetOptions(overlay, options);\r\n\t\t\toverlay._source = this;\r\n\t\t} else {\r\n\t\t\toverlay = (old && !options) ? old : new OverlayClass(options, this);\r\n\t\t\toverlay.setContent(content);\r\n\t\t}\r\n\t\treturn overlay;\r\n\t}\r\n});\n\n/*\r\n * @class Popup\r\n * @inherits DivOverlay\r\n * Used to open popups in certain places of the map. Use [Map.openPopup](#map-openpopup) to\r\n * open popups while making sure that only one popup is open at one time\r\n * (recommended for usability), or use [Map.addLayer](#map-addlayer) to open as many as you want.\r\n *\r\n * @example\r\n *\r\n * If you want to just bind a popup to marker click and then open it, it's really easy:\r\n *\r\n * ```js\r\n * marker.bindPopup(popupContent).openPopup();\r\n * ```\r\n * Path overlays like polylines also have a `bindPopup` method.\r\n *\r\n * A popup can be also standalone:\r\n *\r\n * ```js\r\n * const popup = new Popup()\r\n * \t.setLatLng(latlng)\r\n * \t.setContent('<p>Hello world!<br />This is a nice popup.</p>')\r\n * \t.openOn(map);\r\n * ```\r\n * or\r\n * ```js\r\n * const popup = new Popup(latlng, {content: '<p>Hello world!<br />This is a nice popup.</p>'})\r\n * \t.openOn(map);\r\n * ```\r\n */\r\n\r\n\r\n// @namespace Popup\r\n// @constructor Popup(options?: Popup options, source?: Layer)\r\n// Instantiates a `Popup` object given an optional `options` object that describes its appearance and location and an optional `source` object that is used to tag the popup with a reference to the Layer to which it refers.\r\n// @alternative\r\n// @constructor Popup(latlng: LatLng, options?: Popup options)\r\n// Instantiates a `Popup` object given `latlng` where the popup will open and an optional `options` object that describes its appearance and location.\r\nclass Popup extends DivOverlay {\r\n\r\n\tstatic {\r\n\t\t// @section\r\n\t\t// @aka Popup options\r\n\t\tthis.setDefaultOptions({\r\n\t\t\t// @option pane: String = 'popupPane'\r\n\t\t\t// `Map pane` where the popup will be added.\r\n\t\t\tpane: 'popupPane',\r\n\r\n\t\t\t// @option offset: Point = Point(0, 7)\r\n\t\t\t// The offset of the popup position.\r\n\t\t\toffset: [0, 7],\r\n\r\n\t\t\t// @option maxWidth: Number = 300\r\n\t\t\t// Max width of the popup, in pixels.\r\n\t\t\tmaxWidth: 300,\r\n\r\n\t\t\t// @option minWidth: Number = 50\r\n\t\t\t// Min width of the popup, in pixels.\r\n\t\t\tminWidth: 50,\r\n\r\n\t\t\t// @option maxHeight: Number = null\r\n\t\t\t// If set, creates a scrollable container of the given height\r\n\t\t\t// inside a popup if its content exceeds it.\r\n\t\t\t// The scrollable container can be styled using the\r\n\t\t\t// `leaflet-popup-scrolled` CSS class selector.\r\n\t\t\tmaxHeight: null,\r\n\r\n\t\t\t// @option autoPan: Boolean = true\r\n\t\t\t// Set it to `false` if you don't want the map to do panning animation\r\n\t\t\t// to fit the opened popup.\r\n\t\t\tautoPan: true,\r\n\r\n\t\t\t// @option autoPanPaddingTopLeft: Point = null\r\n\t\t\t// The margin between the popup and the top left corner of the map\r\n\t\t\t// view after autopanning was performed.\r\n\t\t\tautoPanPaddingTopLeft: null,\r\n\r\n\t\t\t// @option autoPanPaddingBottomRight: Point = null\r\n\t\t\t// The margin between the popup and the bottom right corner of the map\r\n\t\t\t// view after autopanning was performed.\r\n\t\t\tautoPanPaddingBottomRight: null,\r\n\r\n\t\t\t// @option autoPanPadding: Point = Point(5, 5)\r\n\t\t\t// Equivalent of setting both top left and bottom right autopan padding to the same value.\r\n\t\t\tautoPanPadding: [5, 5],\r\n\r\n\t\t\t// @option keepInView: Boolean = false\r\n\t\t\t// Set it to `true` if you want to prevent users from panning the popup\r\n\t\t\t// off of the screen while it is open.\r\n\t\t\tkeepInView: false,\r\n\r\n\t\t\t// @option closeButton: Boolean = true\r\n\t\t\t// Controls the presence of a close button in the popup.\r\n\t\t\tcloseButton: true,\r\n\r\n\t\t\t// @option closeButtonLabel: String = 'Close popup'\r\n\t\t\t// Specifies the 'aria-label' attribute of the close button.\r\n\t\t\tcloseButtonLabel: 'Close popup',\r\n\r\n\t\t\t// @option autoClose: Boolean = true\r\n\t\t\t// Set it to `false` if you want to override the default behavior of\r\n\t\t\t// the popup closing when another popup is opened.\r\n\t\t\tautoClose: true,\r\n\r\n\t\t\t// @option closeOnEscapeKey: Boolean = true\r\n\t\t\t// Set it to `false` if you want to override the default behavior of\r\n\t\t\t// the ESC key for closing of the popup.\r\n\t\t\tcloseOnEscapeKey: true,\r\n\r\n\t\t\t// @option closeOnClick: Boolean = *\r\n\t\t\t// Set it if you want to override the default behavior of the popup closing when user clicks\r\n\t\t\t// on the map. Defaults to the map's [`closePopupOnClick`](#map-closepopuponclick) option.\r\n\r\n\t\t\t// @option className: String = ''\r\n\t\t\t// A custom CSS class name to assign to the popup.\r\n\t\t\tclassName: '',\r\n\r\n\t\t\t// @option trackResize: Boolean = true\r\n\t\t\t// Whether the popup shall react to changes in the size of its contents\r\n\t\t\t// (e.g. when an image inside the popup loads) and reposition itself.\r\n\t\t\ttrackResize: true,\r\n\t\t});\r\n\t}\r\n\r\n\t// @namespace Popup\r\n\t// @method openOn(map: Map): this\r\n\t// Alternative to `map.openPopup(popup)`.\r\n\t// Adds the popup to the map and closes the previous one.\r\n\topenOn(map) {\r\n\t\tmap = arguments.length ? map : this._source._map; // experimental, not the part of public api\r\n\r\n\t\tif (!map.hasLayer(this) && map._popup && map._popup.options.autoClose) {\r\n\t\t\tmap.removeLayer(map._popup);\r\n\t\t}\r\n\t\tmap._popup = this;\r\n\r\n\t\treturn DivOverlay.prototype.openOn.call(this, map);\r\n\t}\r\n\r\n\tonAdd(map) {\r\n\t\tDivOverlay.prototype.onAdd.call(this, map);\r\n\r\n\t\t// @namespace Map\r\n\t\t// @section Popup events\r\n\t\t// @event popupopen: PopupEvent\r\n\t\t// Fired when a popup is opened in the map\r\n\t\tmap.fire('popupopen', {popup: this});\r\n\r\n\t\tif (this._source) {\r\n\t\t\t// @namespace Layer\r\n\t\t\t// @section Popup events\r\n\t\t\t// @event popupopen: PopupEvent\r\n\t\t\t// Fired when a popup bound to this layer is opened\r\n\t\t\tthis._source.fire('popupopen', {popup: this}, true);\r\n\t\t\t// For non-path layers, we toggle the popup when clicking\r\n\t\t\t// again the layer, so prevent the map to reopen it.\r\n\t\t\tif (!(this._source instanceof Path)) {\r\n\t\t\t\tthis._source.on('preclick', stopPropagation);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tonRemove(map) {\r\n\t\tDivOverlay.prototype.onRemove.call(this, map);\r\n\r\n\t\t// @namespace Map\r\n\t\t// @section Popup events\r\n\t\t// @event popupclose: PopupEvent\r\n\t\t// Fired when a popup in the map is closed\r\n\t\tmap.fire('popupclose', {popup: this});\r\n\r\n\t\tif (this._source) {\r\n\t\t\t// @namespace Layer\r\n\t\t\t// @section Popup events\r\n\t\t\t// @event popupclose: PopupEvent\r\n\t\t\t// Fired when a popup bound to this layer is closed\r\n\t\t\tthis._source.fire('popupclose', {popup: this}, true);\r\n\t\t\tif (!(this._source instanceof Path)) {\r\n\t\t\t\tthis._source.off('preclick', stopPropagation);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgetEvents() {\r\n\t\tconst events = DivOverlay.prototype.getEvents.call(this);\r\n\r\n\t\tif (this.options.closeOnClick ?? this._map.options.closePopupOnClick) {\r\n\t\t\tevents.preclick = this.close;\r\n\t\t}\r\n\r\n\t\tif (this.options.keepInView) {\r\n\t\t\tevents.moveend = this._adjustPan;\r\n\t\t}\r\n\r\n\t\treturn events;\r\n\t}\r\n\r\n\t_initLayout() {\r\n\t\tconst prefix = 'leaflet-popup',\r\n\t\tcontainer = this._container = create$1('div', `${prefix} ${this.options.className || ''} leaflet-zoom-animated`);\r\n\r\n\t\tconst wrapper = this._wrapper = create$1('div', `${prefix}-content-wrapper`, container);\r\n\t\tthis._contentNode = create$1('div', `${prefix}-content`, wrapper);\r\n\r\n\t\tdisableClickPropagation(container);\r\n\t\tdisableScrollPropagation(this._contentNode);\r\n\t\ton(container, 'contextmenu', stopPropagation);\r\n\r\n\t\tthis._tipContainer = create$1('div', `${prefix}-tip-container`, container);\r\n\t\tthis._tip = create$1('div', `${prefix}-tip`, this._tipContainer);\r\n\r\n\t\tif (this.options.closeButton) {\r\n\t\t\tconst closeButton = this._closeButton = create$1('a', `${prefix}-close-button`, container);\r\n\t\t\tcloseButton.setAttribute('role', 'button'); // overrides the implicit role=link of <a> elements #7399\r\n\t\t\tcloseButton.setAttribute('aria-label', this.options.closeButtonLabel);\r\n\r\n\t\t\tcloseButton.href = '#close';\r\n\t\t\tcloseButton.innerHTML = '<span aria-hidden=\"true\">&#215;</span>';\r\n\r\n\t\t\ton(closeButton, 'click', (ev) => {\r\n\t\t\t\tpreventDefault(ev);\r\n\t\t\t\tthis.close();\r\n\t\t\t});\r\n\t\t}\r\n\r\n\r\n\t\tif (this.options.trackResize) {\r\n\t\t\tthis._resizeObserver = new ResizeObserver(((entries) => {\r\n\t\t\t\tif (!this._map) { return; }\r\n\t\t\t\tthis._containerWidth = entries[0]?.contentRect?.width;\r\n\t\t\t\tthis._containerHeight = entries[0]?.contentRect?.height;\r\n\r\n\t\t\t\tthis._updateLayout();\r\n\t\t\t\tthis._updatePosition();\r\n\t\t\t\tthis._adjustPan();\r\n\t\t\t}));\r\n\r\n\t\t\tthis._resizeObserver.observe(this._contentNode);\r\n\t\t}\r\n\t}\r\n\r\n\t_updateLayout() {\r\n\t\tconst container = this._contentNode,\r\n\t\tstyle = container.style;\r\n\r\n\t\tstyle.maxWidth = `${this.options.maxWidth}px`;\r\n\t\tstyle.minWidth = `${this.options.minWidth}px`;\r\n\r\n\t\tconst height = this._containerHeight ?? container.offsetHeight,\r\n\t\tmaxHeight = this.options.maxHeight,\r\n\t\tscrolledClass = 'leaflet-popup-scrolled';\r\n\r\n\t\tif (maxHeight && height > maxHeight) {\r\n\t\t\tstyle.height = `${maxHeight}px`;\r\n\t\t\tcontainer.classList.add(scrolledClass);\r\n\t\t} else {\r\n\t\t\tcontainer.classList.remove(scrolledClass);\r\n\t\t}\r\n\r\n\t\tthis._containerWidth = this._container.offsetWidth;\r\n\t\tthis._containerHeight = this._container.offsetHeight;\r\n\t}\r\n\r\n\t_animateZoom(e) {\r\n\t\tconst pos = this._map._latLngToNewLayerPoint(this._latlng, e.zoom, e.center),\r\n\t\tanchor = this._getAnchor();\r\n\t\tsetPosition(this._container, pos.add(anchor));\r\n\t}\r\n\r\n\t_adjustPan() {\r\n\t\tif (!this.options.autoPan) { return; }\r\n\t\tthis._map._panAnim?.stop();\r\n\r\n\t\t// We can endlessly recurse if keepInView is set and the view resets.\r\n\t\t// Let's guard against that by exiting early if we're responding to our own autopan.\r\n\t\tif (this._autopanning) {\r\n\t\t\tthis._autopanning = false;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst map = this._map,\r\n\t\tmarginBottom = parseInt(getComputedStyle(this._container).marginBottom, 10) || 0,\r\n\t\tcontainerHeight = this._containerHeight + marginBottom,\r\n\t\tcontainerWidth = this._containerWidth,\r\n\t\tlayerPos = new Point(this._containerLeft, -containerHeight - this._containerBottom);\r\n\r\n\t\tlayerPos._add(getPosition(this._container));\r\n\r\n\t\tconst containerPos = map.layerPointToContainerPoint(layerPos),\r\n\t\tpadding = new Point(this.options.autoPanPadding),\r\n\t\tpaddingTL = new Point(this.options.autoPanPaddingTopLeft ?? padding),\r\n\t\tpaddingBR = new Point(this.options.autoPanPaddingBottomRight ?? padding),\r\n\t\tsize = map.getSize();\r\n\t\tlet dx = 0,\r\n\t\tdy = 0;\r\n\r\n\t\tif (containerPos.x + containerWidth + paddingBR.x > size.x) { // right\r\n\t\t\tdx = containerPos.x + containerWidth - size.x + paddingBR.x;\r\n\t\t}\r\n\t\tif (containerPos.x - dx - paddingTL.x < 0) { // left\r\n\t\t\tdx = containerPos.x - paddingTL.x;\r\n\t\t}\r\n\t\tif (containerPos.y + containerHeight + paddingBR.y > size.y) { // bottom\r\n\t\t\tdy = containerPos.y + containerHeight - size.y + paddingBR.y;\r\n\t\t}\r\n\t\tif (containerPos.y - dy - paddingTL.y < 0) { // top\r\n\t\t\tdy = containerPos.y - paddingTL.y;\r\n\t\t}\r\n\r\n\t\t// @namespace Map\r\n\t\t// @section Popup events\r\n\t\t// @event autopanstart: Event\r\n\t\t// Fired when the map starts autopanning when opening a popup.\r\n\t\tif (dx || dy) {\r\n\t\t\t// Track that we're autopanning, as this function will be re-ran on moveend\r\n\t\t\tif (this.options.keepInView) {\r\n\t\t\t\tthis._autopanning = true;\r\n\t\t\t}\r\n\r\n\t\t\tmap\r\n\t\t\t\t.fire('autopanstart')\r\n\t\t\t\t.panBy([dx, dy]);\r\n\t\t}\r\n\t}\r\n\r\n\t_getAnchor() {\r\n\t\t// Where should we anchor the popup on the source layer?\r\n\t\treturn new Point(this._source?._getPopupAnchor ? this._source._getPopupAnchor() : [0, 0]);\r\n\t}\r\n\r\n}\r\n\r\n\r\n/* @namespace Map\r\n * @section Interaction Options\r\n * @option closePopupOnClick: Boolean = true\r\n * Set it to `false` if you don't want popups to close when user clicks the map.\r\n */\r\nMap$1.mergeOptions({\r\n\tclosePopupOnClick: true\r\n});\r\n\r\n\r\n// @namespace Map\r\n// @section Methods for Layers and Controls\r\nMap$1.include({\r\n\t// @method openPopup(popup: Popup): this\r\n\t// Opens the specified popup while closing the previously opened (to make sure only one is opened at one time for usability).\r\n\t// @alternative\r\n\t// @method openPopup(content: String|HTMLElement, latlng: LatLng, options?: Popup options): this\r\n\t// Creates a popup with the specified content and options and opens it in the given point on a map.\r\n\topenPopup(popup, latlng, options) {\r\n\t\tthis._initOverlay(Popup, popup, latlng, options)\r\n\t\t\t.openOn(this);\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method closePopup(popup?: Popup): this\r\n\t// Closes the popup previously opened with [openPopup](#map-openpopup) (or the given one).\r\n\tclosePopup(popup) {\r\n\t\tpopup = arguments.length ? popup : this._popup;\r\n\t\tpopup?.close();\r\n\t\treturn this;\r\n\t}\r\n});\r\n\r\n/*\r\n * @namespace Layer\r\n * @section Popup methods example\r\n *\r\n * All layers share a set of methods convenient for binding popups to it.\r\n *\r\n * ```js\r\n * const layer = new Polygon(latlngs).bindPopup('Hi There!').addTo(map);\r\n * layer.openPopup();\r\n * layer.closePopup();\r\n * ```\r\n *\r\n * Popups will also be automatically opened when the layer is clicked on and closed when the layer is removed from the map or another popup is opened.\r\n */\r\n\r\n// @section Popup methods\r\nLayer.include({\r\n\r\n\t// @method bindPopup(content: String|HTMLElement|Function|Popup, options?: Popup options): this\r\n\t// Binds a popup to the layer with the passed `content` and sets up the\r\n\t// necessary event listeners. If a `Function` is passed it will receive\r\n\t// the layer as the first argument and should return a `String` or `HTMLElement`.\r\n\tbindPopup(content, options) {\r\n\t\tthis._popup = this._initOverlay(Popup, this._popup, content, options);\r\n\t\tif (!this._popupHandlersAdded) {\r\n\t\t\tthis.on({\r\n\t\t\t\tclick: this._openPopup,\r\n\t\t\t\tkeypress: this._onKeyPress,\r\n\t\t\t\tremove: this.closePopup,\r\n\t\t\t\tmove: this._movePopup\r\n\t\t\t});\r\n\t\t\tthis._popupHandlersAdded = true;\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method unbindPopup(): this\r\n\t// Removes the popup previously bound with `bindPopup`.\r\n\tunbindPopup() {\r\n\t\tif (this._popup) {\r\n\t\t\tthis.off({\r\n\t\t\t\tclick: this._openPopup,\r\n\t\t\t\tkeypress: this._onKeyPress,\r\n\t\t\t\tremove: this.closePopup,\r\n\t\t\t\tmove: this._movePopup\r\n\t\t\t});\r\n\t\t\tthis._popupHandlersAdded = false;\r\n\t\t\tthis._popup = null;\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method openPopup(latlng?: LatLng): this\r\n\t// Opens the bound popup at the specified `latlng` or at the default popup anchor if no `latlng` is passed.\r\n\topenPopup(latlng) {\r\n\t\tif (this._popup) {\r\n\t\t\tif (!(this instanceof FeatureGroup)) {\r\n\t\t\t\tthis._popup._source = this;\r\n\t\t\t}\r\n\t\t\tif (this._popup._prepareOpen(latlng || this._latlng)) {\r\n\t\t\t\t// open the popup on the map\r\n\t\t\t\tthis._popup.openOn(this._map);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method closePopup(): this\r\n\t// Closes the popup bound to this layer if it is open.\r\n\tclosePopup() {\r\n\t\tthis._popup?.close();\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method togglePopup(): this\r\n\t// Opens or closes the popup bound to this layer depending on its current state.\r\n\ttogglePopup() {\r\n\t\tthis._popup?.toggle(this);\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method isPopupOpen(): boolean\r\n\t// Returns `true` if the popup bound to this layer is currently open.\r\n\tisPopupOpen() {\r\n\t\treturn this._popup?.isOpen() ?? false;\r\n\t},\r\n\r\n\t// @method setPopupContent(content: String|HTMLElement|Popup): this\r\n\t// Sets the content of the popup bound to this layer.\r\n\tsetPopupContent(content) {\r\n\t\tthis._popup?.setContent(content);\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method getPopup(): Popup\r\n\t// Returns the popup bound to this layer.\r\n\tgetPopup() {\r\n\t\treturn this._popup;\r\n\t},\r\n\r\n\t_openPopup(e) {\r\n\t\tif (!this._popup || !this._map) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// prevent map click\r\n\t\tstop(e);\r\n\r\n\t\tconst target = e.propagatedFrom ?? e.target;\r\n\t\tif (this._popup._source === target && !(target instanceof Path)) {\r\n\t\t\t// treat it like a marker and figure out\r\n\t\t\t// if we should toggle it open/closed\r\n\t\t\tif (this._map.hasLayer(this._popup)) {\r\n\t\t\t\tthis.closePopup();\r\n\t\t\t} else {\r\n\t\t\t\tthis.openPopup(e.latlng);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._popup._source = target;\r\n\t\tthis.openPopup(e.latlng);\r\n\t},\r\n\r\n\t_movePopup(e) {\r\n\t\tthis._popup.setLatLng(e.latlng);\r\n\t},\r\n\r\n\t_onKeyPress(e) {\r\n\t\tif (e.originalEvent.code === 'Enter') {\r\n\t\t\tthis._openPopup(e);\r\n\t\t}\r\n\t}\r\n});\n\n/*\n * @class Tooltip\n * @inherits DivOverlay\n * Used to display small texts on top of map layers.\n *\n * @example\n * If you want to just bind a tooltip to marker:\n *\n * ```js\n * marker.bindTooltip(\"my tooltip text\").openTooltip();\n * ```\n * Path overlays like polylines also have a `bindTooltip` method.\n *\n * A tooltip can be also standalone:\n *\n * ```js\n * const tooltip = new Tooltip()\n * \t.setLatLng(latlng)\n * \t.setContent('Hello world!<br />This is a nice tooltip.')\n * \t.addTo(map);\n * ```\n * or\n * ```js\n * const tooltip = new Tooltip(latlng, {content: 'Hello world!<br />This is a nice tooltip.'})\n * \t.addTo(map);\n * ```\n *\n *\n * Note about tooltip offset. Leaflet takes two options in consideration\n * for computing tooltip offsetting:\n * - the `offset` Tooltip option: it defaults to [0, 0], and it's specific to one tooltip.\n * Add a positive x offset to move the tooltip to the right, and a positive y offset to\n * move it to the bottom. Negatives will move to the left and top.\n * - the `tooltipAnchor` Icon option: this will only be considered for Marker. You\n * should adapt this value if you use a custom icon.\n */\n\n\n// @namespace Tooltip\n// @constructor Tooltip(options?: Tooltip options, source?: Layer)\n// Instantiates a `Tooltip` object given an optional `options` object that describes its appearance and location and an optional `source` object that is used to tag the tooltip with a reference to the Layer to which it refers.\n// @alternative\n// @constructor Tooltip(latlng: LatLng, options?: Tooltip options)\n// Instantiates a `Tooltip` object given `latlng` where the tooltip will open and an optional `options` object that describes its appearance and location.\nclass Tooltip extends DivOverlay {\n\n\tstatic {\n\t\t// @section\n\t\t// @aka Tooltip options\n\t\tthis.setDefaultOptions({\n\t\t\t// @option pane: String = 'tooltipPane'\n\t\t\t// `Map pane` where the tooltip will be added.\n\t\t\tpane: 'tooltipPane',\n\n\t\t\t// @option offset: Point = Point(0, 0)\n\t\t\t// Optional offset of the tooltip position.\n\t\t\toffset: [0, 0],\n\n\t\t\t// @option direction: String = 'auto'\n\t\t\t// Direction where to open the tooltip. Possible values are: `right`, `left`,\n\t\t\t// `top`, `bottom`, `center`, `auto`.\n\t\t\t// `auto` will dynamically switch between `right` and `left` according to the tooltip\n\t\t\t// position on the map.\n\t\t\tdirection: 'auto',\n\n\t\t\t// @option permanent: Boolean = false\n\t\t\t// Whether to open the tooltip permanently or only on pointerover.\n\t\t\tpermanent: false,\n\n\t\t\t// @option sticky: Boolean = false\n\t\t\t// If true, the tooltip will follow the pointer instead of being fixed at the feature center.\n\t\t\tsticky: false,\n\n\t\t\t// @option opacity: Number = 0.9\n\t\t\t// Tooltip container opacity.\n\t\t\topacity: 0.9\n\t\t});\n\t}\n\n\tonAdd(map) {\n\t\tDivOverlay.prototype.onAdd.call(this, map);\n\t\tthis.setOpacity(this.options.opacity);\n\n\t\t// @namespace Map\n\t\t// @section Tooltip events\n\t\t// @event tooltipopen: TooltipEvent\n\t\t// Fired when a tooltip is opened in the map.\n\t\tmap.fire('tooltipopen', {tooltip: this});\n\n\t\tif (this._source) {\n\t\t\tthis.addEventParent(this._source);\n\n\t\t\t// @namespace Layer\n\t\t\t// @section Tooltip events\n\t\t\t// @event tooltipopen: TooltipEvent\n\t\t\t// Fired when a tooltip bound to this layer is opened.\n\t\t\tthis._source.fire('tooltipopen', {tooltip: this}, true);\n\t\t}\n\t}\n\n\tonRemove(map) {\n\t\tDivOverlay.prototype.onRemove.call(this, map);\n\n\t\t// @namespace Map\n\t\t// @section Tooltip events\n\t\t// @event tooltipclose: TooltipEvent\n\t\t// Fired when a tooltip in the map is closed.\n\t\tmap.fire('tooltipclose', {tooltip: this});\n\n\t\tif (this._source) {\n\t\t\tthis.removeEventParent(this._source);\n\n\t\t\t// @namespace Layer\n\t\t\t// @section Tooltip events\n\t\t\t// @event tooltipclose: TooltipEvent\n\t\t\t// Fired when a tooltip bound to this layer is closed.\n\t\t\tthis._source.fire('tooltipclose', {tooltip: this}, true);\n\t\t}\n\t}\n\n\tgetEvents() {\n\t\tconst events = DivOverlay.prototype.getEvents.call(this);\n\n\t\tif (!this.options.permanent) {\n\t\t\tevents.preclick = this.close;\n\t\t}\n\n\t\treturn events;\n\t}\n\n\t_initLayout() {\n\t\tconst prefix = 'leaflet-tooltip',\n\t\tclassName = `${prefix} ${this.options.className || ''} leaflet-zoom-${this._zoomAnimated ? 'animated' : 'hide'}`;\n\n\t\tthis._contentNode = this._container = create$1('div', className);\n\n\t\tthis._container.setAttribute('role', 'tooltip');\n\t\tthis._container.setAttribute('id', `leaflet-tooltip-${stamp(this)}`);\n\t}\n\n\t_updateLayout() {}\n\n\t_adjustPan() {}\n\n\t_setPosition(pos) {\n\t\tlet subX, subY, direction = this.options.direction;\n\t\tconst map = this._map,\n\t\tcontainer = this._container,\n\t\tcenterPoint = map.latLngToContainerPoint(map.getCenter()),\n\t\ttooltipPoint = map.layerPointToContainerPoint(pos),\n\t\ttooltipWidth = container.offsetWidth,\n\t\ttooltipHeight = container.offsetHeight,\n\t\toffset = new Point(this.options.offset),\n\t\tanchor = this._getAnchor();\n\n\t\tif (direction === 'top') {\n\t\t\tsubX = tooltipWidth / 2;\n\t\t\tsubY = tooltipHeight;\n\t\t} else if (direction === 'bottom') {\n\t\t\tsubX = tooltipWidth / 2;\n\t\t\tsubY = 0;\n\t\t} else if (direction === 'center') {\n\t\t\tsubX = tooltipWidth / 2;\n\t\t\tsubY = tooltipHeight / 2;\n\t\t} else if (direction === 'right') {\n\t\t\tsubX = 0;\n\t\t\tsubY = tooltipHeight / 2;\n\t\t} else if (direction === 'left') {\n\t\t\tsubX = tooltipWidth;\n\t\t\tsubY = tooltipHeight / 2;\n\t\t} else if (tooltipPoint.x < centerPoint.x) {\n\t\t\tdirection = 'right';\n\t\t\tsubX = 0;\n\t\t\tsubY = tooltipHeight / 2;\n\t\t} else {\n\t\t\tdirection = 'left';\n\t\t\tsubX = tooltipWidth + (offset.x + anchor.x) * 2;\n\t\t\tsubY = tooltipHeight / 2;\n\t\t}\n\n\t\tpos = pos.subtract(new Point(subX, subY, true)).add(offset).add(anchor);\n\n\t\tcontainer.classList.remove(\n\t\t\t'leaflet-tooltip-right',\n\t\t\t'leaflet-tooltip-left',\n\t\t\t'leaflet-tooltip-top',\n\t\t\t'leaflet-tooltip-bottom'\n\t\t);\n\t\tcontainer.classList.add(`leaflet-tooltip-${direction}`);\n\t\tsetPosition(container, pos);\n\t}\n\n\t_updatePosition() {\n\t\tconst pos = this._map.latLngToLayerPoint(this._latlng);\n\t\tthis._setPosition(pos);\n\t}\n\n\tsetOpacity(opacity) {\n\t\tthis.options.opacity = opacity;\n\n\t\tif (this._container) {\n\t\t\tthis._container.style.opacity = opacity;\n\t\t}\n\t}\n\n\t_animateZoom(e) {\n\t\tconst pos = this._map._latLngToNewLayerPoint(this._latlng, e.zoom, e.center);\n\t\tthis._setPosition(pos);\n\t}\n\n\t_getAnchor() {\n\t\t// Where should we anchor the tooltip on the source layer?\n\t\treturn new Point(this._source?._getTooltipAnchor && !this.options.sticky ? this._source._getTooltipAnchor() : [0, 0]);\n\t}\n\n}\n\n// @namespace Map\n// @section Methods for Layers and Controls\nMap$1.include({\n\n\t// @method openTooltip(tooltip: Tooltip): this\n\t// Opens the specified tooltip.\n\t// @alternative\n\t// @method openTooltip(content: String|HTMLElement, latlng: LatLng, options?: Tooltip options): this\n\t// Creates a tooltip with the specified content and options and open it.\n\topenTooltip(tooltip, latlng, options) {\n\t\tthis._initOverlay(Tooltip, tooltip, latlng, options)\n\t\t\t.openOn(this);\n\n\t\treturn this;\n\t},\n\n\t// @method closeTooltip(tooltip: Tooltip): this\n\t// Closes the tooltip given as parameter.\n\tcloseTooltip(tooltip) {\n\t\ttooltip.close();\n\t\treturn this;\n\t}\n\n});\n\n/*\n * @namespace Layer\n * @section Tooltip methods example\n *\n * All layers share a set of methods convenient for binding tooltips to it.\n *\n * ```js\n * const layer = new Polygon(latlngs).bindTooltip('Hi There!').addTo(map);\n * layer.openTooltip();\n * layer.closeTooltip();\n * ```\n */\n\n// @section Tooltip methods\nLayer.include({\n\n\t// @method bindTooltip(content: String|HTMLElement|Function|Tooltip, options?: Tooltip options): this\n\t// Binds a tooltip to the layer with the passed `content` and sets up the\n\t// necessary event listeners. If a `Function` is passed it will receive\n\t// the layer as the first argument and should return a `String` or `HTMLElement`.\n\tbindTooltip(content, options) {\n\n\t\tif (this._tooltip && this.isTooltipOpen()) {\n\t\t\tthis.unbindTooltip();\n\t\t}\n\n\t\tthis._tooltip = this._initOverlay(Tooltip, this._tooltip, content, options);\n\t\tthis._initTooltipInteractions();\n\n\t\tif (this._tooltip.options.permanent && this._map && this._map.hasLayer(this)) {\n\t\t\tthis.openTooltip();\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t// @method unbindTooltip(): this\n\t// Removes the tooltip previously bound with `bindTooltip`.\n\tunbindTooltip() {\n\t\tif (this._tooltip) {\n\t\t\tthis._initTooltipInteractions(true);\n\t\t\tthis.closeTooltip();\n\t\t\tthis._tooltip = null;\n\t\t}\n\t\treturn this;\n\t},\n\n\t_initTooltipInteractions(remove) {\n\t\tif (!remove && this._tooltipHandlersAdded) { return; }\n\t\tconst onOff = remove ? 'off' : 'on',\n\t\tevents = {\n\t\t\tremove: this.closeTooltip,\n\t\t\tmove: this._moveTooltip\n\t\t};\n\t\tif (!this._tooltip.options.permanent) {\n\t\t\tevents.pointerover = this._openTooltip;\n\t\t\tevents.pointerout = this.closeTooltip;\n\t\t\tevents.click = this._openTooltip;\n\t\t\tif (this._map) {\n\t\t\t\tthis._addFocusListeners(remove);\n\t\t\t} else {\n\t\t\t\tevents.add = () => this._addFocusListeners(remove);\n\t\t\t}\n\t\t} else {\n\t\t\tevents.add = this._openTooltip;\n\t\t}\n\t\tif (this._tooltip.options.sticky) {\n\t\t\tevents.pointermove = this._moveTooltip;\n\t\t}\n\t\tthis[onOff](events);\n\t\tthis._tooltipHandlersAdded = !remove;\n\t},\n\n\t// @method openTooltip(latlng?: LatLng): this\n\t// Opens the bound tooltip at the specified `latlng` or at the default tooltip anchor if no `latlng` is passed.\n\topenTooltip(latlng) {\n\t\tif (this._tooltip) {\n\t\t\tif (!(this instanceof FeatureGroup)) {\n\t\t\t\tthis._tooltip._source = this;\n\t\t\t}\n\t\t\tif (this._tooltip._prepareOpen(latlng)) {\n\t\t\t\t// open the tooltip on the map\n\t\t\t\tthis._tooltip.openOn(this._map);\n\n\t\t\t\tif (this.getElement) {\n\t\t\t\t\tthis._setAriaDescribedByOnLayer(this);\n\t\t\t\t} else if (this.eachLayer) {\n\t\t\t\t\tthis.eachLayer(this._setAriaDescribedByOnLayer, this);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method closeTooltip(): this\n\t// Closes the tooltip bound to this layer if it is open.\n\tcloseTooltip() {\n\t\tif (this._tooltip) {\n\t\t\treturn this._tooltip.close();\n\t\t}\n\t},\n\n\t// @method toggleTooltip(): this\n\t// Opens or closes the tooltip bound to this layer depending on its current state.\n\ttoggleTooltip() {\n\t\tthis._tooltip?.toggle(this);\n\t\treturn this;\n\t},\n\n\t// @method isTooltipOpen(): boolean\n\t// Returns `true` if the tooltip bound to this layer is currently open.\n\tisTooltipOpen() {\n\t\treturn this._tooltip.isOpen();\n\t},\n\n\t// @method setTooltipContent(content: String|HTMLElement|Tooltip): this\n\t// Sets the content of the tooltip bound to this layer.\n\tsetTooltipContent(content) {\n\t\tthis._tooltip?.setContent(content);\n\t\treturn this;\n\t},\n\n\t// @method getTooltip(): Tooltip\n\t// Returns the tooltip bound to this layer.\n\tgetTooltip() {\n\t\treturn this._tooltip;\n\t},\n\n\t_addFocusListeners(remove) {\n\t\tif (this.getElement) {\n\t\t\tthis._addFocusListenersOnLayer(this, remove);\n\t\t} else if (this.eachLayer) {\n\t\t\tthis.eachLayer(layer => this._addFocusListenersOnLayer(layer, remove), this);\n\t\t}\n\t},\n\n\t_addFocusListenersOnLayer(layer, remove) {\n\t\tconst el = typeof layer.getElement === 'function' && layer.getElement();\n\t\tif (el) {\n\t\t\tconst onOff = remove ? 'off' : 'on';\n\t\t\tif (!remove) {\n\t\t\t\t// Remove focus listener, if already existing\n\t\t\t\tel._leaflet_focus_handler && off(el, 'focus', el._leaflet_focus_handler, this);\n\n\t\t\t\t// eslint-disable-next-line camelcase\n\t\t\t\tel._leaflet_focus_handler = () => {\n\t\t\t\t\tif (this._tooltip) {\n\t\t\t\t\t\tthis._tooltip._source = layer;\n\t\t\t\t\t\tthis.openTooltip();\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tel._leaflet_focus_handler && DomEvent[onOff](el, 'focus', el._leaflet_focus_handler, this);\n\t\t\tDomEvent[onOff](el, 'blur', this.closeTooltip, this);\n\n\t\t\tif (remove) {\n\t\t\t\tdelete el._leaflet_focus_handler;\n\t\t\t}\n\t\t}\n\t},\n\n\t_setAriaDescribedByOnLayer(layer) {\n\t\tconst el = typeof layer.getElement === 'function' && layer.getElement();\n\t\tel?.setAttribute?.('aria-describedby', this._tooltip._container.id);\n\t},\n\n\n\t_openTooltip(e) {\n\t\tif (!this._tooltip || !this._map) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If the map is moving, we will show the tooltip after it's done.\n\t\tif (this._map.dragging?.moving()) {\n\t\t\tif (e.type === 'add' && !this._moveEndOpensTooltip) {\n\t\t\t\tthis._moveEndOpensTooltip = true;\n\t\t\t\tthis._map.once('moveend', () => {\n\t\t\t\t\tthis._moveEndOpensTooltip = false;\n\t\t\t\t\tthis._openTooltip(e);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tthis._tooltip._source = e.propagatedFrom ?? e.target;\n\n\t\tthis.openTooltip(this._tooltip.options.sticky ? e.latlng : undefined);\n\t},\n\n\t_moveTooltip(e) {\n\t\tlet latlng = e.latlng, containerPoint, layerPoint;\n\t\tif (this._tooltip.options.sticky && e.originalEvent) {\n\t\t\tcontainerPoint = this._map.pointerEventToContainerPoint(e.originalEvent);\n\t\t\tlayerPoint = this._map.containerPointToLayerPoint(containerPoint);\n\t\t\tlatlng = this._map.layerPointToLatLng(layerPoint);\n\t\t}\n\t\tthis._tooltip.setLatLng(latlng);\n\t}\n});\n\n/*\n * @class DivIcon\n * @inherits Icon\n *\n * Represents a lightweight icon for markers that uses a simple `<div>`\n * element instead of an image. Inherits from `Icon` but ignores the `iconUrl` and shadow options.\n *\n * @example\n * ```js\n * const myIcon = new DivIcon({className: 'my-div-icon'});\n * // you can set .my-div-icon styles in CSS\n *\n * new Marker([50.505, 30.57], {icon: myIcon}).addTo(map);\n * ```\n *\n * By default, it has a 'leaflet-div-icon' CSS class and is styled as a little white square with a shadow.\n */\n\n// @constructor DivIcon(options: DivIcon options)\n// Creates a `DivIcon` instance with the given options.\nclass DivIcon extends Icon {\n\n\tstatic {\n\t\tthis.setDefaultOptions({\n\t\t\t// @section\n\t\t\t// @aka DivIcon options\n\t\t\ticonSize: [12, 12], // also can be set through CSS\n\n\t\t\t// iconAnchor: (Point),\n\t\t\t// popupAnchor: (Point),\n\n\t\t\t// @option html: String|HTMLElement = ''\n\t\t\t// Custom HTML code to put inside the div element, empty by default. Alternatively,\n\t\t\t// an instance of `HTMLElement`.\n\t\t\thtml: false,\n\n\t\t\t// @option bgPos: Point = [0, 0]\n\t\t\t// Optional relative position of the background, in pixels\n\t\t\tbgPos: null,\n\n\t\t\tclassName: 'leaflet-div-icon'\n\t\t});\n\t}\n\n\tcreateIcon(oldIcon) {\n\t\tconst div = (oldIcon && oldIcon.tagName === 'DIV') ? oldIcon : document.createElement('div'),\n\t\toptions = this.options;\n\n\t\tif (options.html instanceof Element) {\n\t\t\tdiv.replaceChildren();\n\t\t\tdiv.appendChild(options.html);\n\t\t} else {\n\t\t\tdiv.innerHTML = options.html !== false ? options.html : '';\n\t\t}\n\n\t\tif (options.bgPos) {\n\t\t\tconst bgPos = new Point(options.bgPos);\n\t\t\tdiv.style.backgroundPosition = `${-bgPos.x}px ${-bgPos.y}px`;\n\t\t}\n\t\tthis._setIconStyles(div, 'icon');\n\n\t\treturn div;\n\t}\n\n\tcreateShadow() {\n\t\treturn null;\n\t}\n}\n\nIcon.Default = IconDefault;\n\n/*\n * @class GridLayer\n * @inherits Layer\n *\n * Generic class for handling a tiled grid of HTML elements. This is the base class for all tile layers and replaces `TileLayer.Canvas`.\n * GridLayer can be extended to create a tiled grid of HTML elements like `<canvas>`, `<img>` or `<div>`. GridLayer will handle creating and animating these DOM elements for you.\n *\n *\n * @section Synchronous usage\n * @example\n *\n * To create a custom layer, extend GridLayer and implement the `createTile()` method, which will be passed a `Point` object with the `x`, `y`, and `z` (zoom level) coordinates to draw your tile.\n *\n * ```js\n * class CanvasLayer extends GridLayer {\n * createTile(coords) {\n * // create a <canvas> element for drawing\n * const tile = DomUtil.create('canvas', 'leaflet-tile');\n *\n * // setup tile width and height according to the options\n * const size = this.getTileSize();\n * tile.width = size.x;\n * tile.height = size.y;\n *\n * // get a canvas context and draw something on it using coords.x, coords.y and coords.z\n * const ctx = tile.getContext('2d');\n *\n * // return the tile so it can be rendered on screen\n * return tile;\n * }\n * }\n * ```\n *\n * @section Asynchronous usage\n * @example\n *\n * Tile creation can also be asynchronous, this is useful when using a third-party drawing library. Once the tile is finished drawing it can be passed to the `done()` callback.\n *\n * ```js\n * class CanvasLayer extends GridLayer {\n * createTile(coords, done) {\n * const error;\n *\n * // create a <canvas> element for drawing\n * const tile = DomUtil.create('canvas', 'leaflet-tile');\n *\n * // setup tile width and height according to the options\n * const size = this.getTileSize();\n * tile.width = size.x;\n * tile.height = size.y;\n *\n * // draw something asynchronously and pass the tile to the done() callback\n * setTimeout(function() {\n * done(error, tile);\n * }, 1000);\n *\n * return tile;\n * }\n * }\n * ```\n *\n * @section\n */\n\n\n// @constructor GridLayer(options?: GridLayer options)\n// Creates a new instance of GridLayer with the supplied options.\nclass GridLayer extends Layer {\n\n\tstatic {\n\t// @section\n\t// @aka GridLayer options\n\t\tthis.setDefaultOptions({\n\t\t\t// @option tileSize: Number|Point = 256\n\t\t\t// Width and height of tiles in the grid. Use a number if width and height are equal, or `Point(width, height)` otherwise.\n\t\t\ttileSize: 256,\n\n\t\t\t// @option opacity: Number = 1.0\n\t\t\t// Opacity of the tiles. Can be used in the `createTile()` function.\n\t\t\topacity: 1,\n\n\t\t\t// @option updateWhenIdle: Boolean = (depends)\n\t\t\t// Load new tiles only when panning ends.\n\t\t\t// `true` by default on mobile browsers, in order to avoid too many requests and keep smooth navigation.\n\t\t\t// `false` otherwise in order to display new tiles _during_ panning, since it is easy to pan outside the\n\t\t\t// [`keepBuffer`](#gridlayer-keepbuffer) option in desktop browsers.\n\t\t\tupdateWhenIdle: Browser.mobile,\n\n\t\t\t// @option updateWhenZooming: Boolean = true\n\t\t\t// By default, a smooth zoom animation (during a [pinch zoom](#map-pinchzoom) or a [`flyTo()`](#map-flyto)) will update grid layers every integer zoom level. Setting this option to `false` will update the grid layer only when the smooth animation ends.\n\t\t\tupdateWhenZooming: true,\n\n\t\t\t// @option updateInterval: Number = 200\n\t\t\t// Tiles will not update more than once every `updateInterval` milliseconds when panning.\n\t\t\tupdateInterval: 200,\n\n\t\t\t// @option zIndex: Number = 1\n\t\t\t// The explicit zIndex of the tile layer.\n\t\t\tzIndex: 1,\n\n\t\t\t// @option bounds: LatLngBounds = undefined\n\t\t\t// If set, tiles will only be loaded inside the set `LatLngBounds`.\n\t\t\tbounds: null,\n\n\t\t\t// @option minZoom: Number = 0\n\t\t\t// The minimum zoom level down to which this layer will be displayed (inclusive).\n\t\t\tminZoom: 0,\n\n\t\t\t// @option maxZoom: Number = undefined\n\t\t\t// The maximum zoom level up to which this layer will be displayed (inclusive).\n\t\t\tmaxZoom: undefined,\n\n\t\t\t// @option maxNativeZoom: Number = undefined\n\t\t\t// Maximum zoom number the tile source has available. If it is specified,\n\t\t\t// the tiles on all zoom levels higher than `maxNativeZoom` will be loaded\n\t\t\t// from `maxNativeZoom` level and auto-scaled.\n\t\t\tmaxNativeZoom: undefined,\n\n\t\t\t// @option minNativeZoom: Number = undefined\n\t\t\t// Minimum zoom number the tile source has available. If it is specified,\n\t\t\t// the tiles on all zoom levels lower than `minNativeZoom` will be loaded\n\t\t\t// from `minNativeZoom` level and auto-scaled.\n\t\t\tminNativeZoom: undefined,\n\n\t\t\t// @option noWrap: Boolean = false\n\t\t\t// Whether the layer is wrapped around the antimeridian. If `true`, the\n\t\t\t// GridLayer will only be displayed once at low zoom levels. Has no\n\t\t\t// effect when the [map CRS](#map-crs) doesn't wrap around. Can be used\n\t\t\t// in combination with [`bounds`](#gridlayer-bounds) to prevent requesting\n\t\t\t// tiles outside the CRS limits.\n\t\t\tnoWrap: false,\n\n\t\t\t// @option pane: String = 'tilePane'\n\t\t\t// `Map pane` where the grid layer will be added.\n\t\t\tpane: 'tilePane',\n\n\t\t\t// @option className: String = ''\n\t\t\t// A custom class name to assign to the tile layer. Empty by default.\n\t\t\tclassName: '',\n\n\t\t\t// @option keepBuffer: Number = 2\n\t\t\t// When panning the map, keep this many rows and columns of tiles before unloading them.\n\t\t\tkeepBuffer: 2\n\t\t});\n\t}\n\n\tinitialize(options) {\n\t\tsetOptions(this, options);\n\t}\n\n\tonAdd() {\n\t\tthis._initContainer();\n\n\t\tthis._levels = {};\n\t\tthis._tiles = {};\n\n\t\tthis._resetView(); // implicit _update() call\n\t}\n\n\tbeforeAdd(map) {\n\t\tmap._addZoomLimit(this);\n\t}\n\n\tonRemove(map) {\n\t\tthis._removeAllTiles();\n\t\tthis._container.remove();\n\t\tmap._removeZoomLimit(this);\n\t\tthis._container = null;\n\t\tthis._tileZoom = undefined;\n\t\tclearTimeout(this._pruneTimeout);\n\t}\n\n\t// @method bringToFront: this\n\t// Brings the tile layer to the top of all tile layers.\n\tbringToFront() {\n\t\tif (this._map) {\n\t\t\ttoFront(this._container);\n\t\t\tthis._setAutoZIndex(Math.max);\n\t\t}\n\t\treturn this;\n\t}\n\n\t// @method bringToBack: this\n\t// Brings the tile layer to the bottom of all tile layers.\n\tbringToBack() {\n\t\tif (this._map) {\n\t\t\ttoBack(this._container);\n\t\t\tthis._setAutoZIndex(Math.min);\n\t\t}\n\t\treturn this;\n\t}\n\n\t// @method getContainer: HTMLElement\n\t// Returns the HTML element that contains the tiles for this layer.\n\tgetContainer() {\n\t\treturn this._container;\n\t}\n\n\t// @method setOpacity(opacity: Number): this\n\t// Changes the [opacity](#gridlayer-opacity) of the grid layer.\n\tsetOpacity(opacity) {\n\t\tthis.options.opacity = opacity;\n\t\tthis._updateOpacity();\n\t\treturn this;\n\t}\n\n\t// @method setZIndex(zIndex: Number): this\n\t// Changes the [zIndex](#gridlayer-zindex) of the grid layer.\n\tsetZIndex(zIndex) {\n\t\tthis.options.zIndex = zIndex;\n\t\tthis._updateZIndex();\n\n\t\treturn this;\n\t}\n\n\t// @method isLoading: Boolean\n\t// Returns `true` if any tile in the grid layer has not finished loading.\n\tisLoading() {\n\t\treturn this._loading;\n\t}\n\n\t// @method redraw: this\n\t// Causes the layer to clear all the tiles and request them again.\n\tredraw() {\n\t\tif (this._map) {\n\t\t\tthis._removeAllTiles();\n\t\t\tconst tileZoom = this._clampZoom(this._map.getZoom());\n\t\t\tif (tileZoom !== this._tileZoom) {\n\t\t\t\tthis._tileZoom = tileZoom;\n\t\t\t\tthis._updateLevels();\n\t\t\t}\n\t\t\tthis._update();\n\t\t}\n\t\treturn this;\n\t}\n\n\tgetEvents() {\n\t\tconst events = {\n\t\t\tviewprereset: this._invalidateAll,\n\t\t\tviewreset: this._resetView,\n\t\t\tzoom: this._resetView,\n\t\t\tmoveend: this._onMoveEnd\n\t\t};\n\n\t\tif (!this.options.updateWhenIdle) {\n\t\t\t// update tiles on move, but not more often than once per given interval\n\t\t\tif (!this._onMove) {\n\t\t\t\tthis._onMove = throttle(this._onMoveEnd, this.options.updateInterval, this);\n\t\t\t}\n\n\t\t\tevents.move = this._onMove;\n\t\t}\n\n\t\tif (this._zoomAnimated) {\n\t\t\tevents.zoomanim = this._animateZoom;\n\t\t}\n\n\t\treturn events;\n\t}\n\n\t// @section Extension methods\n\t// Layers extending `GridLayer` shall reimplement the following method.\n\t// @method createTile(coords: Object, done?: Function): HTMLElement\n\t// Called only internally, must be overridden by classes extending `GridLayer`.\n\t// Returns the `HTMLElement` corresponding to the given `coords`. If the `done` callback\n\t// is specified, it must be called when the tile has finished loading and drawing.\n\tcreateTile() {\n\t\treturn document.createElement('div');\n\t}\n\n\t// @section\n\t// @method getTileSize: Point\n\t// Normalizes the [tileSize option](#gridlayer-tilesize) into a point. Used by the `createTile()` method.\n\tgetTileSize() {\n\t\tconst s = this.options.tileSize;\n\t\treturn s instanceof Point ? s : new Point(s, s);\n\t}\n\n\t_updateZIndex() {\n\t\tif (this._container && this.options.zIndex !== undefined && this.options.zIndex !== null) {\n\t\t\tthis._container.style.zIndex = this.options.zIndex;\n\t\t}\n\t}\n\n\t_setAutoZIndex(compare) {\n\t\t// go through all other layers of the same pane, set zIndex to max + 1 (front) or min - 1 (back)\n\n\t\tconst layers = this.getPane().children;\n\t\tlet edgeZIndex = -compare(-Infinity, Infinity); // -Infinity for max, Infinity for min\n\n\t\tfor (const layer of layers) {\n\t\t\tconst zIndex = layer.style.zIndex;\n\n\t\t\tif (layer !== this._container && zIndex) {\n\t\t\t\tedgeZIndex = compare(edgeZIndex, +zIndex);\n\t\t\t}\n\t\t}\n\n\t\tif (isFinite(edgeZIndex)) {\n\t\t\tthis.options.zIndex = edgeZIndex + compare(-1, 1);\n\t\t\tthis._updateZIndex();\n\t\t}\n\t}\n\n\t_updateOpacity() {\n\t\tif (!this._map) { return; }\n\n\t\tthis._container.style.opacity = this.options.opacity;\n\n\t\tconst now = +new Date();\n\t\tlet nextFrame = false,\n\t\twillPrune = false;\n\n\t\tfor (const tile of Object.values(this._tiles ?? {})) {\n\t\t\tif (!tile.current || !tile.loaded) { continue; }\n\n\t\t\tconst fade = Math.min(1, (now - tile.loaded) / 200);\n\n\t\t\ttile.el.style.opacity = fade;\n\t\t\tif (fade < 1) {\n\t\t\t\tnextFrame = true;\n\t\t\t} else {\n\t\t\t\tif (tile.active) {\n\t\t\t\t\twillPrune = true;\n\t\t\t\t} else {\n\t\t\t\t\tthis._onOpaqueTile(tile);\n\t\t\t\t}\n\t\t\t\ttile.active = true;\n\t\t\t}\n\t\t}\n\n\t\tif (willPrune && !this._noPrune) { this._pruneTiles(); }\n\n\t\tif (nextFrame) {\n\t\t\tcancelAnimationFrame(this._fadeFrame);\n\t\t\tthis._fadeFrame = requestAnimationFrame(this._updateOpacity.bind(this));\n\t\t}\n\t}\n\n\t_onOpaqueTile() {}\n\n\t_initContainer() {\n\t\tif (this._container) { return; }\n\n\t\tthis._container = create$1('div', `leaflet-layer ${this.options.className ?? ''}`);\n\t\tthis._updateZIndex();\n\n\t\tif (this.options.opacity < 1) {\n\t\t\tthis._updateOpacity();\n\t\t}\n\n\t\tthis.getPane().appendChild(this._container);\n\t}\n\n\t_updateLevels() {\n\n\t\tconst zoom = this._tileZoom,\n\t\tmaxZoom = this.options.maxZoom;\n\n\t\tif (zoom === undefined) { return undefined; }\n\n\t\tfor (let z of Object.keys(this._levels)) {\n\t\t\tz = Number(z);\n\t\t\tif (this._levels[z].el.children.length || z === zoom) {\n\t\t\t\tthis._levels[z].el.style.zIndex = maxZoom - Math.abs(zoom - z);\n\t\t\t\tthis._onUpdateLevel(z);\n\t\t\t} else {\n\t\t\t\tthis._levels[z].el.remove();\n\t\t\t\tthis._removeTilesAtZoom(z);\n\t\t\t\tthis._onRemoveLevel(z);\n\t\t\t\tdelete this._levels[z];\n\t\t\t}\n\t\t}\n\n\t\tlet level = this._levels[zoom];\n\t\tconst map = this._map;\n\n\t\tif (!level) {\n\t\t\tlevel = this._levels[zoom] = {};\n\n\t\t\tlevel.el = create$1('div', 'leaflet-tile-container leaflet-zoom-animated', this._container);\n\t\t\tlevel.el.style.zIndex = maxZoom;\n\n\t\t\tlevel.origin = map.project(map.unproject(map.getPixelOrigin()), zoom).round();\n\t\t\tlevel.zoom = zoom;\n\n\t\t\tthis._setZoomTransform(level, map.getCenter(), map.getZoom());\n\n\t\t\t// force reading offsetWidth so the browser considers the newly added element for transition\n\t\t\tfalseFn(level.el.offsetWidth);\n\n\t\t\tthis._onCreateLevel(level);\n\t\t}\n\n\t\tthis._level = level;\n\n\t\treturn level;\n\t}\n\n\t_onUpdateLevel() {}\n\n\t_onRemoveLevel() {}\n\n\t_onCreateLevel() {}\n\n\t_pruneTiles() {\n\t\tif (!this._map) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst zoom = this._map.getZoom();\n\t\tif (zoom > this.options.maxZoom ||\n\t\t\tzoom < this.options.minZoom) {\n\t\t\tthis._removeAllTiles();\n\t\t\treturn;\n\t\t}\n\n\t\tfor (const tile of Object.values(this._tiles)) {\n\t\t\ttile.retain = tile.current;\n\t\t}\n\n\t\tfor (const tile of Object.values(this._tiles)) {\n\t\t\tif (tile.current && !tile.active) {\n\t\t\t\tconst coords = tile.coords;\n\t\t\t\tif (!this._retainParent(coords.x, coords.y, coords.z, coords.z - 5)) {\n\t\t\t\t\tthis._retainChildren(coords.x, coords.y, coords.z, coords.z + 2);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (const [key, tile] of Object.entries(this._tiles)) {\n\t\t\tif (!tile.retain) {\n\t\t\t\tthis._removeTile(key);\n\t\t\t}\n\t\t}\n\t}\n\n\t_removeTilesAtZoom(zoom) {\n\t\tfor (const [key, tile] of Object.entries(this._tiles)) {\n\t\t\tif (tile.coords.z === zoom) {\n\t\t\t\tthis._removeTile(key);\n\t\t\t}\n\t\t}\n\t}\n\n\t_removeAllTiles() {\n\t\tfor (const key of Object.keys(this._tiles)) {\n\t\t\tthis._removeTile(key);\n\t\t}\n\t}\n\n\t_invalidateAll() {\n\t\tfor (const z of Object.keys(this._levels)) {\n\t\t\tthis._levels[z].el.remove();\n\t\t\tthis._onRemoveLevel(Number(z));\n\t\t\tdelete this._levels[z];\n\t\t}\n\t\tthis._removeAllTiles();\n\n\t\tthis._tileZoom = undefined;\n\t}\n\n\t_retainParent(x, y, z, minZoom) {\n\t\tconst x2 = Math.floor(x / 2),\n\t\ty2 = Math.floor(y / 2),\n\t\tz2 = z - 1,\n\t\tcoords2 = new Point(+x2, +y2);\n\t\tcoords2.z = +z2;\n\n\t\tconst key = this._tileCoordsToKey(coords2),\n\t\ttile = this._tiles[key];\n\n\t\tif (tile?.active) {\n\t\t\ttile.retain = true;\n\t\t\treturn true;\n\n\t\t} else if (tile?.loaded) {\n\t\t\ttile.retain = true;\n\t\t}\n\n\t\tif (z2 > minZoom) {\n\t\t\treturn this._retainParent(x2, y2, z2, minZoom);\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t_retainChildren(x, y, z, maxZoom) {\n\n\t\tfor (let i = 2 * x; i < 2 * x + 2; i++) {\n\t\t\tfor (let j = 2 * y; j < 2 * y + 2; j++) {\n\n\t\t\t\tconst coords = new Point(i, j);\n\t\t\t\tcoords.z = z + 1;\n\n\t\t\t\tconst key = this._tileCoordsToKey(coords),\n\t\t\t\ttile = this._tiles[key];\n\n\t\t\t\tif (tile?.active) {\n\t\t\t\t\ttile.retain = true;\n\t\t\t\t\tcontinue;\n\n\t\t\t\t} else if (tile?.loaded) {\n\t\t\t\t\ttile.retain = true;\n\t\t\t\t}\n\n\t\t\t\tif (z + 1 < maxZoom) {\n\t\t\t\t\tthis._retainChildren(i, j, z + 1, maxZoom);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t_resetView(e) {\n\t\tconst animating = e && (e.pinch || e.flyTo);\n\t\tthis._setView(this._map.getCenter(), this._map.getZoom(), animating, animating);\n\t}\n\n\t_animateZoom(e) {\n\t\tthis._setView(e.center, e.zoom, true, e.noUpdate);\n\t}\n\n\t_clampZoom(zoom) {\n\t\tconst options = this.options;\n\n\t\tif (undefined !== options.minNativeZoom && zoom < options.minNativeZoom) {\n\t\t\treturn options.minNativeZoom;\n\t\t}\n\n\t\tif (undefined !== options.maxNativeZoom && options.maxNativeZoom < zoom) {\n\t\t\treturn options.maxNativeZoom;\n\t\t}\n\n\t\treturn zoom;\n\t}\n\n\t_setView(center, zoom, noPrune, noUpdate) {\n\t\tlet tileZoom = Math.round(zoom);\n\t\tif ((this.options.maxZoom !== undefined && tileZoom > this.options.maxZoom) ||\n\t\t (this.options.minZoom !== undefined && tileZoom < this.options.minZoom)) {\n\t\t\ttileZoom = undefined;\n\t\t} else {\n\t\t\ttileZoom = this._clampZoom(tileZoom);\n\t\t}\n\n\t\tconst tileZoomChanged = this.options.updateWhenZooming && (tileZoom !== this._tileZoom);\n\n\t\tif (!noUpdate || tileZoomChanged) {\n\n\t\t\tthis._tileZoom = tileZoom;\n\n\t\t\tif (this._abortLoading) {\n\t\t\t\tthis._abortLoading();\n\t\t\t}\n\n\t\t\tthis._updateLevels();\n\t\t\tthis._resetGrid();\n\n\t\t\tif (tileZoom !== undefined) {\n\t\t\t\tthis._update(center);\n\t\t\t}\n\n\t\t\tif (!noPrune) {\n\t\t\t\tthis._pruneTiles();\n\t\t\t}\n\n\t\t\t// Flag to prevent _updateOpacity from pruning tiles during\n\t\t\t// a zoom anim or a pinch gesture\n\t\t\tthis._noPrune = !!noPrune;\n\t\t}\n\n\t\tthis._setZoomTransforms(center, zoom);\n\t}\n\n\t_setZoomTransforms(center, zoom) {\n\t\tfor (const level of Object.values(this._levels)) {\n\t\t\tthis._setZoomTransform(level, center, zoom);\n\t\t}\n\t}\n\n\t_setZoomTransform(level, center, zoom) {\n\t\tconst scale = this._map.getZoomScale(zoom, level.zoom),\n\t\ttranslate = level.origin.multiplyBy(scale)\n\t\t\t.subtract(this._map._getNewPixelOrigin(center, zoom)).round();\n\n\t\tsetTransform(level.el, translate, scale);\n\t}\n\n\t_resetGrid() {\n\t\tconst map = this._map,\n\t\tcrs = map.options.crs,\n\t\ttileSize = this._tileSize = this.getTileSize(),\n\t\ttileZoom = this._tileZoom;\n\n\t\tconst bounds = this._map.getPixelWorldBounds(this._tileZoom);\n\t\tif (bounds) {\n\t\t\tthis._globalTileRange = this._pxBoundsToTileRange(bounds);\n\t\t}\n\n\t\tthis._wrapX = crs.wrapLng && !this.options.noWrap && [\n\t\t\tMath.floor(map.project([0, crs.wrapLng[0]], tileZoom).x / tileSize.x),\n\t\t\tMath.ceil(map.project([0, crs.wrapLng[1]], tileZoom).x / tileSize.y)\n\t\t];\n\t\tthis._wrapY = crs.wrapLat && !this.options.noWrap && [\n\t\t\tMath.floor(map.project([crs.wrapLat[0], 0], tileZoom).y / tileSize.x),\n\t\t\tMath.ceil(map.project([crs.wrapLat[1], 0], tileZoom).y / tileSize.y)\n\t\t];\n\t}\n\n\t_onMoveEnd() {\n\t\tif (!this._map || this._map._animatingZoom) { return; }\n\n\t\tthis._update();\n\t}\n\n\t_getTiledPixelBounds(center) {\n\t\tconst map = this._map,\n\t\tmapZoom = map._animatingZoom ? Math.max(map._animateToZoom, map.getZoom()) : map.getZoom(),\n\t\tscale = map.getZoomScale(mapZoom, this._tileZoom),\n\t\tpixelCenter = map.project(center, this._tileZoom).floor(),\n\t\thalfSize = map.getSize().divideBy(scale * 2);\n\n\t\treturn new Bounds(pixelCenter.subtract(halfSize), pixelCenter.add(halfSize));\n\t}\n\n\t// Private method to load tiles in the grid's active zoom level according to map bounds\n\t_update(center) {\n\t\tconst map = this._map;\n\t\tif (!map) { return; }\n\t\tconst zoom = this._clampZoom(map.getZoom());\n\n\t\tif (center === undefined) { center = map.getCenter(); }\n\t\tif (this._tileZoom === undefined) { return; }\t// if out of minzoom/maxzoom\n\n\t\tconst pixelBounds = this._getTiledPixelBounds(center),\n\t\ttileRange = this._pxBoundsToTileRange(pixelBounds),\n\t\ttileCenter = tileRange.getCenter(),\n\t\tqueue = [],\n\t\tmargin = this.options.keepBuffer,\n\t\tnoPruneRange = new Bounds(tileRange.getBottomLeft().subtract([margin, -margin]),\n\t\t\ttileRange.getTopRight().add([margin, -margin]));\n\n\t\t// Sanity check: panic if the tile range contains Infinity somewhere.\n\t\tif (!(isFinite(tileRange.min.x) &&\n\t\t isFinite(tileRange.min.y) &&\n\t\t isFinite(tileRange.max.x) &&\n\t\t isFinite(tileRange.max.y))) { throw new Error('Attempted to load an infinite number of tiles'); }\n\n\t\tfor (const tile of Object.values(this._tiles)) {\n\t\t\tconst c = tile.coords;\n\t\t\tif (c.z !== this._tileZoom || !noPruneRange.contains(new Point(c.x, c.y))) {\n\t\t\t\ttile.current = false;\n\t\t\t}\n\t\t}\n\n\t\t// _update just loads more tiles. If the tile zoom level differs too much\n\t\t// from the map's, let _setView reset levels and prune old tiles.\n\t\tif (Math.abs(zoom - this._tileZoom) > 1) { this._setView(center, zoom); return; }\n\n\t\t// create a queue of coordinates to load tiles from\n\t\tfor (let j = tileRange.min.y; j <= tileRange.max.y; j++) {\n\t\t\tfor (let i = tileRange.min.x; i <= tileRange.max.x; i++) {\n\t\t\t\tconst coords = new Point(i, j);\n\t\t\t\tcoords.z = this._tileZoom;\n\n\t\t\t\tif (!this._isValidTile(coords)) { continue; }\n\n\t\t\t\tconst tile = this._tiles[this._tileCoordsToKey(coords)];\n\t\t\t\tif (tile) {\n\t\t\t\t\ttile.current = true;\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push(coords);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort tile queue to load tiles in order of their distance to center\n\t\tqueue.sort((a, b) => a.distanceTo(tileCenter) - b.distanceTo(tileCenter));\n\n\t\tif (queue.length !== 0) {\n\t\t\t// if it's the first batch of tiles to load\n\t\t\tif (!this._loading) {\n\t\t\t\tthis._loading = true;\n\t\t\t\t// @event loading: Event\n\t\t\t\t// Fired when the grid layer starts loading tiles.\n\t\t\t\tthis.fire('loading');\n\t\t\t}\n\n\t\t\t// create DOM fragment to append tiles in one batch\n\t\t\tconst fragment = document.createDocumentFragment();\n\n\t\t\tfor (const q of queue) {\n\t\t\t\tthis._addTile(q, fragment);\n\t\t\t}\n\n\t\t\tthis._level.el.appendChild(fragment);\n\t\t}\n\t}\n\n\t_isValidTile(coords) {\n\t\tconst crs = this._map.options.crs;\n\n\t\tif (!crs.infinite) {\n\t\t\t// don't load tile if it's out of bounds and not wrapped\n\t\t\tconst bounds = this._globalTileRange;\n\t\t\tif ((!crs.wrapLng && (coords.x < bounds.min.x || coords.x > bounds.max.x)) ||\n\t\t\t (!crs.wrapLat && (coords.y < bounds.min.y || coords.y > bounds.max.y))) { return false; }\n\t\t}\n\n\t\tif (!this.options.bounds) { return true; }\n\n\t\t// don't load tile if it doesn't intersect the bounds in options\n\t\tconst tileBounds = this._tileCoordsToBounds(coords);\n\t\treturn new LatLngBounds(this.options.bounds).overlaps(tileBounds);\n\t}\n\n\t_keyToBounds(key) {\n\t\treturn this._tileCoordsToBounds(this._keyToTileCoords(key));\n\t}\n\n\t_tileCoordsToNwSe(coords) {\n\t\tconst map = this._map,\n\t\ttileSize = this.getTileSize(),\n\t\tnwPoint = coords.scaleBy(tileSize),\n\t\tsePoint = nwPoint.add(tileSize),\n\t\tnw = map.unproject(nwPoint, coords.z),\n\t\tse = map.unproject(sePoint, coords.z);\n\t\treturn [nw, se];\n\t}\n\n\t// converts tile coordinates to its geographical bounds\n\t_tileCoordsToBounds(coords) {\n\t\tconst bp = this._tileCoordsToNwSe(coords);\n\t\tlet bounds = new LatLngBounds(bp[0], bp[1]);\n\n\t\tif (!this.options.noWrap) {\n\t\t\tbounds = this._map.wrapLatLngBounds(bounds);\n\t\t}\n\t\treturn bounds;\n\t}\n\t// converts tile coordinates to key for the tile cache\n\t_tileCoordsToKey(coords) {\n\t\treturn `${coords.x}:${coords.y}:${coords.z}`;\n\t}\n\n\t// converts tile cache key to coordinates\n\t_keyToTileCoords(key) {\n\t\tconst k = key.split(':'),\n\t\tcoords = new Point(+k[0], +k[1]);\n\t\tcoords.z = +k[2];\n\t\treturn coords;\n\t}\n\n\t_removeTile(key) {\n\t\tconst tile = this._tiles[key];\n\t\tif (!tile) { return; }\n\n\t\ttile.el.remove();\n\n\t\tdelete this._tiles[key];\n\n\t\t// @event tileunload: TileEvent\n\t\t// Fired when a tile is removed (e.g. when a tile goes off the screen).\n\t\tthis.fire('tileunload', {\n\t\t\ttile: tile.el,\n\t\t\tcoords: this._keyToTileCoords(key)\n\t\t});\n\t}\n\n\t_initTile(tile) {\n\t\ttile.classList.add('leaflet-tile');\n\n\t\tconst tileSize = this.getTileSize();\n\t\ttile.style.width = `${tileSize.x}px`;\n\t\ttile.style.height = `${tileSize.y}px`;\n\n\t\ttile.onselectstart = falseFn;\n\t\ttile.onpointermove = falseFn;\n\t}\n\n\t_addTile(coords, container) {\n\t\tconst tilePos = this._getTilePos(coords),\n\t\tkey = this._tileCoordsToKey(coords);\n\n\t\tconst tile = this.createTile(this._wrapCoords(coords), this._tileReady.bind(this, coords));\n\n\t\tthis._initTile(tile);\n\n\t\t// if createTile is defined with a second argument (\"done\" callback),\n\t\t// we know that tile is async and will be ready later; otherwise\n\t\tif (this.createTile.length < 2) {\n\t\t\t// mark tile as ready, but delay one frame for opacity animation to happen\n\t\t\trequestAnimationFrame(this._tileReady.bind(this, coords, null, tile));\n\t\t}\n\n\t\tsetPosition(tile, tilePos);\n\n\t\t// save tile in cache\n\t\tthis._tiles[key] = {\n\t\t\tel: tile,\n\t\t\tcoords,\n\t\t\tcurrent: true\n\t\t};\n\n\t\tcontainer.appendChild(tile);\n\t\t// @event tileloadstart: TileEvent\n\t\t// Fired when a tile is requested and starts loading.\n\t\tthis.fire('tileloadstart', {\n\t\t\ttile,\n\t\t\tcoords\n\t\t});\n\t}\n\n\t_tileReady(coords, err, tile) {\n\t\tif (err) {\n\t\t\t// @event tileerror: TileErrorEvent\n\t\t\t// Fired when there is an error loading a tile.\n\t\t\tthis.fire('tileerror', {\n\t\t\t\terror: err,\n\t\t\t\ttile,\n\t\t\t\tcoords\n\t\t\t});\n\t\t}\n\n\t\tconst key = this._tileCoordsToKey(coords);\n\n\t\ttile = this._tiles[key];\n\t\tif (!tile) { return; }\n\n\t\ttile.loaded = +new Date();\n\t\tif (this._map._fadeAnimated) {\n\t\t\ttile.el.style.opacity = 0;\n\t\t\tcancelAnimationFrame(this._fadeFrame);\n\t\t\tthis._fadeFrame = requestAnimationFrame(this._updateOpacity.bind(this));\n\t\t} else {\n\t\t\ttile.active = true;\n\t\t\tthis._pruneTiles();\n\t\t}\n\n\t\tif (!err) {\n\t\t\ttile.el.classList.add('leaflet-tile-loaded');\n\n\t\t\t// @event tileload: TileEvent\n\t\t\t// Fired when a tile loads.\n\t\t\tthis.fire('tileload', {\n\t\t\t\ttile: tile.el,\n\t\t\t\tcoords\n\t\t\t});\n\t\t}\n\n\t\tif (this._noTilesToLoad()) {\n\t\t\tthis._loading = false;\n\t\t\t// @event load: Event\n\t\t\t// Fired when the grid layer loaded all visible tiles.\n\t\t\tthis.fire('load');\n\n\t\t\tif (!this._map._fadeAnimated) {\n\t\t\t\trequestAnimationFrame(this._pruneTiles.bind(this));\n\t\t\t} else {\n\t\t\t\t// Wait a bit more than 0.2 secs (the duration of the tile fade-in)\n\t\t\t\t// to trigger a pruning.\n\t\t\t\tthis._pruneTimeout = setTimeout(this._pruneTiles.bind(this), 250);\n\t\t\t}\n\t\t}\n\t}\n\n\t_getTilePos(coords) {\n\t\treturn coords.scaleBy(this.getTileSize()).subtract(this._level.origin);\n\t}\n\n\t_wrapCoords(coords) {\n\t\tconst newCoords = new Point(\n\t\t\tthis._wrapX ? wrapNum(coords.x, this._wrapX) : coords.x,\n\t\t\tthis._wrapY ? wrapNum(coords.y, this._wrapY) : coords.y);\n\t\tnewCoords.z = coords.z;\n\t\treturn newCoords;\n\t}\n\n\t_pxBoundsToTileRange(bounds) {\n\t\tconst tileSize = this.getTileSize();\n\t\treturn new Bounds(\n\t\t\tbounds.min.unscaleBy(tileSize).floor(),\n\t\t\tbounds.max.unscaleBy(tileSize).ceil().subtract([1, 1]));\n\t}\n\n\t_noTilesToLoad() {\n\t\treturn Object.values(this._tiles).every(t => t.loaded);\n\t}\n}\n\n/*\r\n * @class TileLayer\r\n * @inherits GridLayer\r\n * Used to load and display tile layers on the map. Note that most tile servers require attribution, which you can set under `Layer`. Extends `GridLayer`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * new TileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png?{foo}', {foo: 'bar', attribution: '&copy; <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors'}).addTo(map);\r\n * ```\r\n *\r\n * @section URL template\r\n * @example\r\n *\r\n * A string of the following form:\r\n *\r\n * ```\r\n * 'https://{s}.somedomain.com/blabla/{z}/{x}/{y}{r}.png'\r\n * ```\r\n *\r\n * `{s}` means one of the available subdomains (used sequentially to help with browser parallel requests per domain limitation; subdomain values are specified in options; `a`, `b` or `c` by default, can be omitted), `{z}` — zoom level, `{x}` and `{y}` — tile coordinates. `{r}` can be used to add \"&commat;2x\" to the URL to load retina tiles.\r\n *\r\n * You can use custom keys in the template, which will be [evaluated](#util-template) from TileLayer options, like this:\r\n *\r\n * ```\r\n * new TileLayer('https://{s}.somedomain.com/{foo}/{z}/{x}/{y}.png', {foo: 'bar'});\r\n * ```\r\n */\r\n\r\n// @constructor TileLayer(urlTemplate: String, options?: TileLayer options)\r\n// Instantiates a tile layer object given a `URL template` and optionally an options object.\r\nclass TileLayer extends GridLayer {\r\n\r\n\tstatic {\r\n\t\t// @section\r\n\t\t// @aka TileLayer options\r\n\t\tthis.setDefaultOptions({\r\n\t\t\t// @option minZoom: Number = 0\r\n\t\t\t// The minimum zoom level down to which this layer will be displayed (inclusive).\r\n\t\t\tminZoom: 0,\r\n\r\n\t\t\t// @option maxZoom: Number = 18\r\n\t\t\t// The maximum zoom level up to which this layer will be displayed (inclusive).\r\n\t\t\tmaxZoom: 18,\r\n\r\n\t\t\t// @option subdomains: String|String[] = 'abc'\r\n\t\t\t// Subdomains of the tile service. Can be passed in the form of one string (where each letter is a subdomain name) or an array of strings.\r\n\t\t\tsubdomains: 'abc',\r\n\r\n\t\t\t// @option errorTileUrl: String = ''\r\n\t\t\t// URL to the tile image to show in place of the tile that failed to load.\r\n\t\t\terrorTileUrl: '',\r\n\r\n\t\t\t// @option zoomOffset: Number = 0\r\n\t\t\t// The zoom number used in tile URLs will be offset with this value.\r\n\t\t\tzoomOffset: 0,\r\n\r\n\t\t\t// @option tms: Boolean = false\r\n\t\t\t// If `true`, inverses Y axis numbering for tiles (turn this on for [TMS](https://en.wikipedia.org/wiki/Tile_Map_Service) services).\r\n\t\t\ttms: false,\r\n\r\n\t\t\t// @option zoomReverse: Boolean = false\r\n\t\t\t// If set to true, the zoom number used in tile URLs will be reversed (`maxZoom - zoom` instead of `zoom`)\r\n\t\t\tzoomReverse: false,\r\n\r\n\t\t\t// @option detectRetina: Boolean = false\r\n\t\t\t// If `true` and user is on a retina display, it will request four tiles of half the specified size and a bigger zoom level in place of one to utilize the high resolution.\r\n\t\t\tdetectRetina: false,\r\n\r\n\t\t\t// @option crossOrigin: Boolean|String = false\r\n\t\t\t// Whether the crossOrigin attribute will be added to the tiles.\r\n\t\t\t// If a String is provided, all tiles will have their crossOrigin attribute set to the String provided. This is needed if you want to access tile pixel data.\r\n\t\t\t// Refer to [CORS Settings](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for valid String values.\r\n\t\t\tcrossOrigin: false,\r\n\r\n\t\t\t// @option referrerPolicy: Boolean|String = false\r\n\t\t\t// Whether the referrerPolicy attribute will be added to the tiles.\r\n\t\t\t// If a String is provided, all tiles will have their referrerPolicy attribute set to the String provided.\r\n\t\t\t// This may be needed if your map's rendering context has a strict default but your tile provider expects a valid referrer\r\n\t\t\t// (e.g. to validate an API token).\r\n\t\t\t// Refer to [HTMLImageElement.referrerPolicy](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/referrerPolicy) for valid String values.\r\n\t\t\treferrerPolicy: false\r\n\t\t});\r\n\t}\r\n\r\n\tinitialize(url, options) {\r\n\r\n\t\tthis._url = url;\r\n\r\n\t\toptions = setOptions(this, options);\r\n\r\n\t\t// in case the attribution hasn't been specified, check for known hosts that require attribution\r\n\t\tif (options.attribution === null && URL.canParse(url)) {\r\n\t\t\tconst urlHostname = new URL(url).hostname;\r\n\r\n\t\t\t// check for Open Street Map hosts\r\n\t\t\tconst osmHosts = ['tile.openstreetmap.org', 'tile.osm.org'];\r\n\t\t\tif (osmHosts.some(host => urlHostname.endsWith(host))) {\r\n\t\t\t\toptions.attribution = '&copy; <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// detecting retina displays, adjusting tileSize and zoom levels\r\n\t\tif (options.detectRetina && Browser.retina && options.maxZoom > 0) {\r\n\r\n\t\t\toptions.tileSize = Math.floor(options.tileSize / 2);\r\n\r\n\t\t\tif (!options.zoomReverse) {\r\n\t\t\t\toptions.zoomOffset++;\r\n\t\t\t\toptions.maxZoom = Math.max(options.minZoom, options.maxZoom - 1);\r\n\t\t\t} else {\r\n\t\t\t\toptions.zoomOffset--;\r\n\t\t\t\toptions.minZoom = Math.min(options.maxZoom, options.minZoom + 1);\r\n\t\t\t}\r\n\r\n\t\t\toptions.minZoom = Math.max(0, options.minZoom);\r\n\t\t} else if (!options.zoomReverse) {\r\n\t\t\t// make sure maxZoom is gte minZoom\r\n\t\t\toptions.maxZoom = Math.max(options.minZoom, options.maxZoom);\r\n\t\t} else {\r\n\t\t\t// make sure minZoom is lte maxZoom\r\n\t\t\toptions.minZoom = Math.min(options.maxZoom, options.minZoom);\r\n\t\t}\r\n\r\n\t\tif (typeof options.subdomains === 'string') {\r\n\t\t\toptions.subdomains = options.subdomains.split('');\r\n\t\t}\r\n\r\n\t\tthis.on('tileunload', this._onTileRemove);\r\n\t}\r\n\r\n\t// @method setUrl(url: String, noRedraw?: Boolean): this\r\n\t// Updates the layer's URL template and redraws it (unless `noRedraw` is set to `true`).\r\n\t// If the URL does not change, the layer will not be redrawn unless\r\n\t// the noRedraw parameter is set to false.\r\n\tsetUrl(url, noRedraw) {\r\n\t\tif (this._url === url && noRedraw === undefined) {\r\n\t\t\tnoRedraw = true;\r\n\t\t}\r\n\r\n\t\tthis._url = url;\r\n\r\n\t\tif (!noRedraw) {\r\n\t\t\tthis.redraw();\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// @method createTile(coords: Object, done?: Function): HTMLElement\r\n\t// Called only internally, overrides GridLayer's [`createTile()`](#gridlayer-createtile)\r\n\t// to return an `<img>` HTML element with the appropriate image URL given `coords`. The `done`\r\n\t// callback is called when the tile has been loaded.\r\n\tcreateTile(coords, done) {\r\n\t\tconst tile = document.createElement('img');\r\n\r\n\t\ton(tile, 'load', this._tileOnLoad.bind(this, done, tile));\r\n\t\ton(tile, 'error', this._tileOnError.bind(this, done, tile));\r\n\r\n\t\tif (this.options.crossOrigin || this.options.crossOrigin === '') {\r\n\t\t\ttile.crossOrigin = this.options.crossOrigin === true ? '' : this.options.crossOrigin;\r\n\t\t}\r\n\r\n\t\t// for this new option we follow the documented behavior\r\n\t\t// more closely by only setting the property when string\r\n\t\tif (typeof this.options.referrerPolicy === 'string') {\r\n\t\t\ttile.referrerPolicy = this.options.referrerPolicy;\r\n\t\t}\r\n\r\n\t\t// The alt attribute is set to the empty string,\r\n\t\t// allowing screen readers to ignore the decorative image tiles.\r\n\t\t// https://www.w3.org/WAI/tutorials/images/decorative/\r\n\t\t// https://www.w3.org/TR/html-aria/#el-img-empty-alt\r\n\t\ttile.alt = '';\r\n\r\n\t\ttile.src = this.getTileUrl(coords);\r\n\r\n\t\treturn tile;\r\n\t}\r\n\r\n\t// @section Extension methods\r\n\t// @uninheritable\r\n\t// Layers extending `TileLayer` might reimplement the following method.\r\n\t// @method getTileUrl(coords: Object): String\r\n\t// Called only internally, returns the URL for a tile given its coordinates.\r\n\t// Classes extending `TileLayer` can override this function to provide custom tile URL naming schemes.\r\n\tgetTileUrl(coords) {\r\n\t\tconst data = Object.create(this.options);\r\n\t\tObject.assign(data, {\r\n\t\t\tr: Browser.retina ? '@2x' : '',\r\n\t\t\ts: this._getSubdomain(coords),\r\n\t\t\tx: coords.x,\r\n\t\t\ty: coords.y,\r\n\t\t\tz: this._getZoomForUrl()\r\n\t\t});\r\n\t\tif (this._map && !this._map.options.crs.infinite) {\r\n\t\t\tconst invertedY = this._globalTileRange.max.y - coords.y;\r\n\t\t\tif (this.options.tms) {\r\n\t\t\t\tdata['y'] = invertedY;\r\n\t\t\t}\r\n\t\t\tdata['-y'] = invertedY;\r\n\t\t}\r\n\r\n\t\treturn template(this._url, data);\r\n\t}\r\n\r\n\t_tileOnLoad(done, tile) {\r\n\t\tdone(null, tile);\r\n\t}\r\n\r\n\t_tileOnError(done, tile, e) {\r\n\t\tconst errorUrl = this.options.errorTileUrl;\r\n\t\tif (errorUrl && tile.getAttribute('src') !== errorUrl) {\r\n\t\t\ttile.src = errorUrl;\r\n\t\t}\r\n\t\tdone(e, tile);\r\n\t}\r\n\r\n\t_onTileRemove(e) {\r\n\t\te.tile.onload = null;\r\n\t}\r\n\r\n\t_getZoomForUrl() {\r\n\t\tlet zoom = this._tileZoom;\r\n\t\tconst maxZoom = this.options.maxZoom,\r\n\t\tzoomReverse = this.options.zoomReverse,\r\n\t\tzoomOffset = this.options.zoomOffset;\r\n\r\n\t\tif (zoomReverse) {\r\n\t\t\tzoom = maxZoom - zoom;\r\n\t\t}\r\n\r\n\t\treturn zoom + zoomOffset;\r\n\t}\r\n\r\n\t_getSubdomain(tilePoint) {\r\n\t\tconst index = Math.abs(tilePoint.x + tilePoint.y) % this.options.subdomains.length;\r\n\t\treturn this.options.subdomains[index];\r\n\t}\r\n\r\n\t// stops loading all tiles in the background layer\r\n\t_abortLoading() {\r\n\t\tlet i, tile;\r\n\t\tfor (i of Object.keys(this._tiles)) {\r\n\t\t\tif (this._tiles[i].coords.z !== this._tileZoom) {\r\n\t\t\t\ttile = this._tiles[i].el;\r\n\r\n\t\t\t\ttile.onload = falseFn;\r\n\t\t\t\ttile.onerror = falseFn;\r\n\r\n\t\t\t\tif (!tile.complete) {\r\n\t\t\t\t\ttile.src = emptyImageUrl;\r\n\t\t\t\t\tconst coords = this._tiles[i].coords;\r\n\t\t\t\t\ttile.remove();\r\n\t\t\t\t\tdelete this._tiles[i];\r\n\t\t\t\t\t// @event tileabort: TileEvent\r\n\t\t\t\t\t// Fired when a tile was loading but is now not wanted.\r\n\t\t\t\t\tthis.fire('tileabort', {\r\n\t\t\t\t\t\ttile,\r\n\t\t\t\t\t\tcoords\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t_removeTile(key) {\r\n\t\tconst tile = this._tiles[key];\r\n\t\tif (!tile) { return; }\r\n\r\n\t\t// Cancels any pending http requests associated with the tile\r\n\t\ttile.el.setAttribute('src', emptyImageUrl);\r\n\r\n\t\treturn GridLayer.prototype._removeTile.call(this, key);\r\n\t}\r\n\r\n\t_tileReady(coords, err, tile) {\r\n\t\tif (!this._map || (tile && tile.getAttribute('src') === emptyImageUrl)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\treturn GridLayer.prototype._tileReady.call(this, coords, err, tile);\r\n\t}\r\n\r\n\t_clampZoom(zoom) {\r\n\t\treturn Math.round(GridLayer.prototype._clampZoom.call(this, zoom));\r\n\t}\r\n}\n\n/*\r\n * @class TileLayer.WMS\r\n * @inherits TileLayer\r\n * Used to display [WMS](https://en.wikipedia.org/wiki/Web_Map_Service) services as tile layers on the map. Extends `TileLayer`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * const nexrad = new TileLayer.wms(\"http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi\", {\r\n * \tlayers: 'nexrad-n0r-900913',\r\n * \tformat: 'image/png',\r\n * \ttransparent: true,\r\n * \tattribution: \"Weather data © 2012 IEM Nexrad\"\r\n * });\r\n * ```\r\n */\r\n\r\n// @constructor TileLayer.WMS(baseUrl: String, options: TileLayer.WMS options)\r\n// Instantiates a WMS tile layer object given a base URL of the WMS service and a WMS parameters/options object.\r\nclass TileLayerWMS extends TileLayer {\r\n\r\n\tstatic {\r\n\t\t// @section\r\n\t\t// @aka TileLayer.WMS options\r\n\t\t// If any custom options not documented here are used, they will be sent to the\r\n\t\t// WMS server as extra parameters in each request URL. This can be useful for\r\n\t\t// [non-standard vendor WMS parameters](https://docs.geoserver.org/stable/en/user/services/wms/vendor.html).\r\n\t\tthis.prototype.defaultWmsParams = {\r\n\t\t\tservice: 'WMS',\r\n\t\t\trequest: 'GetMap',\r\n\r\n\t\t\t// @option layers: String = ''\r\n\t\t\t// **(required)** Comma-separated list of WMS layers to show.\r\n\t\t\tlayers: '',\r\n\r\n\t\t\t// @option styles: String = ''\r\n\t\t\t// Comma-separated list of WMS styles.\r\n\t\t\tstyles: '',\r\n\r\n\t\t\t// @option format: String = 'image/jpeg'\r\n\t\t\t// WMS image format (use `'image/png'` for layers with transparency).\r\n\t\t\tformat: 'image/jpeg',\r\n\r\n\t\t\t// @option transparent: Boolean = false\r\n\t\t\t// If `true`, the WMS service will return images with transparency.\r\n\t\t\ttransparent: false,\r\n\r\n\t\t\t// @option version: String = '1.1.1'\r\n\t\t\t// Version of the WMS service to use\r\n\t\t\tversion: '1.1.1'\r\n\t\t};\r\n\r\n\t\tthis.setDefaultOptions({\r\n\t\t\t// @option crs: CRS = null\r\n\t\t\t// Coordinate Reference System to use for the WMS requests, defaults to\r\n\t\t\t// map CRS. Don't change this if you're not sure what it means.\r\n\t\t\tcrs: null,\r\n\r\n\t\t\t// @option uppercase: Boolean = false\r\n\t\t\t// If `true`, WMS request parameter keys will be uppercase.\r\n\t\t\tuppercase: false\r\n\t\t});\r\n\t}\r\n\r\n\tinitialize(url, options) {\r\n\r\n\t\tthis._url = url;\r\n\r\n\t\tconst wmsParams = {...this.defaultWmsParams};\r\n\r\n\t\t// all keys that are not TileLayer options go to WMS params\r\n\t\tfor (const i of Object.keys(options)) {\r\n\t\t\tif (!(i in this.options)) { // do not use Object.keys here, as it excludes options inherited from TileLayer\r\n\t\t\t\twmsParams[i] = options[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\toptions = setOptions(this, options);\r\n\r\n\t\tconst realRetina = options.detectRetina && Browser.retina ? 2 : 1;\r\n\t\tconst tileSize = this.getTileSize();\r\n\t\twmsParams.width = tileSize.x * realRetina;\r\n\t\twmsParams.height = tileSize.y * realRetina;\r\n\r\n\t\tthis.wmsParams = wmsParams;\r\n\t}\r\n\r\n\tonAdd(map) {\r\n\r\n\t\tthis._crs = this.options.crs ?? map.options.crs;\r\n\t\tthis._wmsVersion = parseFloat(this.wmsParams.version);\r\n\r\n\t\tconst projectionKey = this._wmsVersion >= 1.3 ? 'crs' : 'srs';\r\n\t\tthis.wmsParams[projectionKey] = this._crs.code;\r\n\r\n\t\tTileLayer.prototype.onAdd.call(this, map);\r\n\t}\r\n\r\n\tgetTileUrl(coords) {\r\n\r\n\t\tconst tileBounds = this._tileCoordsToNwSe(coords),\r\n\t\tcrs = this._crs,\r\n\t\tbounds = new Bounds(crs.project(tileBounds[0]), crs.project(tileBounds[1])),\r\n\t\tmin = bounds.min,\r\n\t\tmax = bounds.max,\r\n\t\tbbox = (this._wmsVersion >= 1.3 && this._crs === EPSG4326 ?\r\n\t\t\t[min.y, min.x, max.y, max.x] :\r\n\t\t\t[min.x, min.y, max.x, max.y]).join(',');\r\n\t\tconst url = new URL(TileLayer.prototype.getTileUrl.call(this, coords));\r\n\t\tfor (const [k, v] of Object.entries({...this.wmsParams, bbox})) {\r\n\t\t\turl.searchParams.append(this.options.uppercase ? k.toUpperCase() : k, v);\r\n\t\t}\r\n\t\treturn url.toString();\r\n\t}\r\n\r\n\t// @method setParams(params: Object, noRedraw?: Boolean): this\r\n\t// Merges an object with the new parameters and re-requests tiles on the current screen (unless `noRedraw` was set to true).\r\n\tsetParams(params, noRedraw) {\r\n\r\n\t\tObject.assign(this.wmsParams, params);\r\n\r\n\t\tif (!noRedraw) {\r\n\t\t\tthis.redraw();\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t}\r\n}\n\nTileLayer.WMS = TileLayerWMS;\n\n/*\n * @class Renderer\n * @inherits BlanketOverlay\n *\n * Base class for vector renderer implementations (`SVG`, `Canvas`). Handles the\n * DOM container of the renderer, its bounds, and its zoom animation.\n *\n * A `Renderer` works as an implicit layer group for all `Path`s - the renderer\n * itself can be added or removed to the map. All paths use a renderer, which can\n * be implicit (the map will decide the type of renderer and use it automatically)\n * or explicit (using the [`renderer`](#path-renderer) option of the path).\n *\n * Do not use this class directly, use `SVG` and `Canvas` instead.\n *\n * The `continuous` option inherited from `BlanketOverlay` cannot be set to `true`\n * (otherwise, renderers get out of place during a pinch-zoom operation).\n *\n * @event update: Event\n * Fired when the renderer updates its bounds, center and zoom, for example when\n * its map has moved\n */\n\nclass Renderer extends BlanketOverlay {\n\n\tinitialize(options) {\n\t\tsetOptions(this, {...options, continuous: false});\n\t\tstamp(this);\n\t\tthis._layers ??= {};\n\t}\n\n\tonAdd(map) {\n\t\tsuper.onAdd(map);\n\t\tthis.on('update', this._updatePaths, this);\n\t}\n\n\tonRemove() {\n\t\tsuper.onRemove();\n\t\tthis.off('update', this._updatePaths, this);\n\t}\n\n\t_onZoomEnd() {\n\t\t// When a zoom ends, the \"origin pixel\" changes. Internal coordinates\n\t\t// of paths are relative to the origin pixel and therefore need to\n\t\t// be recalculated.\n\t\tfor (const layer of Object.values(this._layers)) {\n\t\t\tlayer._project();\n\t\t}\n\t}\n\n\t_updatePaths() {\n\t\tfor (const layer of Object.values(this._layers)) {\n\t\t\tlayer._update();\n\t\t}\n\t}\n\n\t_onViewReset() {\n\t\tfor (const layer of Object.values(this._layers)) {\n\t\t\tlayer._reset();\n\t\t}\n\t}\n\n\t_onSettled() {\n\t\tthis._update();\n\t}\n\n\t// Subclasses are responsible of implementing `_update()`. It should fire\n\t// the 'update' event whenever appropriate (before/after rendering).\n\t_update() {}\n\n}\n\n/*\n * @class Canvas\n * @inherits Renderer\n *\n * Allows vector layers to be displayed with [`<canvas>`](https://developer.mozilla.org/docs/Web/API/Canvas_API).\n * Inherits `Renderer`.\n *\n * @example\n *\n * Use Canvas by default for all paths in the map:\n *\n * ```js\n * const map = new Map('map', {\n * \trenderer: new Canvas()\n * });\n * ```\n *\n * Use a Canvas renderer with extra padding for specific vector geometries:\n *\n * ```js\n * const map = new Map('map');\n * const myRenderer = new Canvas({ padding: 0.5 });\n * const line = new Polyline( coordinates, { renderer: myRenderer } );\n * const circle = new Circle( center, { renderer: myRenderer, radius: 100 } );\n * ```\n */\n\n// @constructor Canvas(options?: Renderer options)\n// Creates a Canvas renderer with the given options.\nclass Canvas extends Renderer {\n\n\tstatic {\n\t\t// @section\n\t\t// @aka Canvas options\n\t\tthis.setDefaultOptions({\n\t\t\t// @option tolerance: Number = 0\n\t\t\t// How much to extend the click tolerance around a path/object on the map.\n\t\t\ttolerance: 0\n\t\t});\n\t}\n\n\tgetEvents() {\n\t\tconst events = Renderer.prototype.getEvents.call(this);\n\t\tevents.viewprereset = this._onViewPreReset;\n\t\treturn events;\n\t}\n\n\t_onViewPreReset() {\n\t\t// Set a flag so that a viewprereset+moveend+viewreset only updates&redraws once\n\t\tthis._postponeUpdatePaths = true;\n\t}\n\n\tonAdd(map) {\n\t\tRenderer.prototype.onAdd.call(this, map);\n\n\t\t// Redraw vectors since canvas is cleared upon removal,\n\t\t// in case of removing the renderer itself from the map.\n\t\tthis._draw();\n\t}\n\n\tonRemove() {\n\t\tRenderer.prototype.onRemove.call(this);\n\n\t\tclearTimeout(this._pointerHoverThrottleTimeout);\n\t}\n\n\t_initContainer() {\n\t\tconst container = this._container = document.createElement('canvas');\n\n\t\ton(container, 'pointermove', this._onPointerMove, this);\n\t\ton(container, 'click dblclick pointerdown pointerup contextmenu', this._onClick, this);\n\t\ton(container, 'pointerout', this._handlePointerOut, this);\n\t\tcontainer['_leaflet_disable_events'] = true;\n\n\t\tthis._ctx = container.getContext('2d');\n\t}\n\n\t_destroyContainer() {\n\t\tcancelAnimationFrame(this._redrawRequest);\n\t\tthis._redrawRequest = null;\n\t\tdelete this._ctx;\n\t\tRenderer.prototype._destroyContainer.call(this);\n\t}\n\n\t_resizeContainer() {\n\t\tconst size = Renderer.prototype._resizeContainer.call(this);\n\t\tconst m = this._ctxScale = window.devicePixelRatio;\n\n\t\t// set canvas size (also clearing it); use double size on retina\n\t\tthis._container.width = m * size.x;\n\t\tthis._container.height = m * size.y;\n\t}\n\n\t_updatePaths() {\n\t\tif (this._postponeUpdatePaths) { return; }\n\n\t\tthis._redrawBounds = null;\n\t\tfor (const layer of Object.values(this._layers)) {\n\t\t\tlayer._update();\n\t\t}\n\t\tthis._redraw();\n\t}\n\n\t_update() {\n\t\tif (this._map._animatingZoom && this._bounds) { return; }\n\n\t\tconst b = this._bounds,\n\t\ts = this._ctxScale;\n\n\t\t// translate so we use the same path coordinates after canvas element moves\n\t\tthis._ctx.setTransform(\n\t\t\ts, 0, 0, s,\n\t\t\t-b.min.x * s,\n\t\t\t-b.min.y * s);\n\n\t\t// Tell paths to redraw themselves\n\t\tthis.fire('update');\n\t}\n\n\t_reset() {\n\t\tRenderer.prototype._reset.call(this);\n\n\t\tif (this._postponeUpdatePaths) {\n\t\t\tthis._postponeUpdatePaths = false;\n\t\t\tthis._updatePaths();\n\t\t}\n\t}\n\n\t_initPath(layer) {\n\t\tthis._updateDashArray(layer);\n\t\tthis._layers[stamp(layer)] = layer;\n\n\t\tconst order = layer._order = {\n\t\t\tlayer,\n\t\t\tprev: this._drawLast,\n\t\t\tnext: null\n\t\t};\n\t\tif (this._drawLast) { this._drawLast.next = order; }\n\t\tthis._drawLast = order;\n\t\tthis._drawFirst ??= this._drawLast;\n\t}\n\n\t_addPath(layer) {\n\t\tthis._requestRedraw(layer);\n\t}\n\n\t_removePath(layer) {\n\t\tconst order = layer._order;\n\t\tconst next = order.next;\n\t\tconst prev = order.prev;\n\n\t\tif (next) {\n\t\t\tnext.prev = prev;\n\t\t} else {\n\t\t\tthis._drawLast = prev;\n\t\t}\n\t\tif (prev) {\n\t\t\tprev.next = next;\n\t\t} else {\n\t\t\tthis._drawFirst = next;\n\t\t}\n\n\t\tdelete layer._order;\n\n\t\tdelete this._layers[stamp(layer)];\n\n\t\tthis._requestRedraw(layer);\n\t}\n\n\t_updatePath(layer) {\n\t\t// Redraw the union of the layer's old pixel\n\t\t// bounds and the new pixel bounds.\n\t\tthis._extendRedrawBounds(layer);\n\t\tlayer._project();\n\t\tlayer._update();\n\t\t// The redraw will extend the redraw bounds\n\t\t// with the new pixel bounds.\n\t\tthis._requestRedraw(layer);\n\t}\n\n\t_updateStyle(layer) {\n\t\tthis._updateDashArray(layer);\n\t\tthis._requestRedraw(layer);\n\t}\n\n\t_updateDashArray(layer) {\n\t\tif (typeof layer.options.dashArray === 'string') {\n\t\t\tconst parts = layer.options.dashArray.split(/[, ]+/);\n\t\t\t// Ignore dash array containing invalid lengths\n\t\t\tlayer.options._dashArray = parts.map(n => Number(n)).filter(n => !isNaN(n));\n\t\t} else {\n\t\t\tlayer.options._dashArray = layer.options.dashArray;\n\t\t}\n\t}\n\n\t_requestRedraw(layer) {\n\t\tif (!this._map) { return; }\n\n\t\tthis._extendRedrawBounds(layer);\n\t\tthis._redrawRequest ??= requestAnimationFrame(this._redraw.bind(this));\n\t}\n\n\t_extendRedrawBounds(layer) {\n\t\tif (layer._pxBounds) {\n\t\t\tconst padding = (layer.options.weight ?? 0) + 1;\n\t\t\tthis._redrawBounds ??= new Bounds();\n\t\t\tthis._redrawBounds.extend(layer._pxBounds.min.subtract([padding, padding]));\n\t\t\tthis._redrawBounds.extend(layer._pxBounds.max.add([padding, padding]));\n\t\t}\n\t}\n\n\t_redraw() {\n\t\tthis._redrawRequest = null;\n\n\t\tif (this._redrawBounds) {\n\t\t\tthis._redrawBounds.min._floor();\n\t\t\tthis._redrawBounds.max._ceil();\n\t\t}\n\n\t\tthis._clear(); // clear layers in redraw bounds\n\t\tthis._draw(); // draw layers\n\n\t\tthis._redrawBounds = null;\n\t}\n\n\t_clear() {\n\t\tconst bounds = this._redrawBounds;\n\t\tif (bounds) {\n\t\t\tconst size = bounds.getSize();\n\t\t\tthis._ctx.clearRect(bounds.min.x, bounds.min.y, size.x, size.y);\n\t\t} else {\n\t\t\tthis._ctx.save();\n\t\t\tthis._ctx.setTransform(1, 0, 0, 1, 0, 0);\n\t\t\tthis._ctx.clearRect(0, 0, this._container.width, this._container.height);\n\t\t\tthis._ctx.restore();\n\t\t}\n\t}\n\n\t_draw() {\n\t\tlet layer;\n\t\tconst bounds = this._redrawBounds;\n\t\tthis._ctx.save();\n\t\tif (bounds) {\n\t\t\tconst size = bounds.getSize();\n\t\t\tthis._ctx.beginPath();\n\t\t\tthis._ctx.rect(bounds.min.x, bounds.min.y, size.x, size.y);\n\t\t\tthis._ctx.clip();\n\t\t}\n\n\t\tthis._drawing = true;\n\n\t\tfor (let order = this._drawFirst; order; order = order.next) {\n\t\t\tlayer = order.layer;\n\t\t\tif (!bounds || (layer._pxBounds && layer._pxBounds.intersects(bounds))) {\n\t\t\t\tlayer._updatePath();\n\t\t\t}\n\t\t}\n\n\t\tthis._drawing = false;\n\n\t\tthis._ctx.restore(); // Restore state before clipping.\n\t}\n\n\t_updatePoly(layer, closed) {\n\t\tif (!this._drawing) { return; }\n\n\t\tconst parts = layer._parts,\n\t\tctx = this._ctx;\n\n\t\tif (!parts.length) { return; }\n\n\t\tctx.beginPath();\n\n\t\tparts.forEach((p0) => {\n\t\t\tp0.forEach((p, j) => {\n\t\t\t\tctx[j ? 'lineTo' : 'moveTo'](p.x, p.y);\n\t\t\t});\n\t\t\tif (closed) {\n\t\t\t\tctx.closePath();\n\t\t\t}\n\t\t});\n\n\t\tthis._fillStroke(ctx, layer);\n\n\t\t// TODO optimization: 1 fill/stroke for all features with equal style instead of 1 for each feature\n\t}\n\n\t_updateCircle(layer) {\n\n\t\tif (!this._drawing || layer._empty()) { return; }\n\n\t\tconst p = layer._point,\n\t\tctx = this._ctx,\n\t\tr = Math.max(Math.round(layer._radius), 1),\n\t\ts = (Math.max(Math.round(layer._radiusY), 1) || r) / r;\n\n\t\tif (s !== 1) {\n\t\t\tctx.save();\n\t\t\tctx.scale(1, s);\n\t\t}\n\n\t\tctx.beginPath();\n\t\tctx.arc(p.x, p.y / s, r, 0, Math.PI * 2, false);\n\n\t\tif (s !== 1) {\n\t\t\tctx.restore();\n\t\t}\n\n\t\tthis._fillStroke(ctx, layer);\n\t}\n\n\t_fillStroke(ctx, layer) {\n\t\tconst options = layer.options;\n\n\t\tif (options.fill) {\n\t\t\tctx.globalAlpha = options.fillOpacity;\n\t\t\tctx.fillStyle = options.fillColor ?? options.color;\n\t\t\tctx.fill(options.fillRule || 'evenodd');\n\t\t}\n\n\t\tif (options.stroke && options.weight !== 0) {\n\t\t\tif (ctx.setLineDash) {\n\t\t\t\tctx.lineDashOffset = Number(options.dashOffset ?? 0);\n\t\t\t\tctx.setLineDash(options._dashArray ?? []);\n\t\t\t}\n\t\t\tctx.globalAlpha = options.opacity;\n\t\t\tctx.lineWidth = options.weight;\n\t\t\tctx.strokeStyle = options.color;\n\t\t\tctx.lineCap = options.lineCap;\n\t\t\tctx.lineJoin = options.lineJoin;\n\t\t\tctx.stroke();\n\t\t}\n\t}\n\n\t// Canvas obviously doesn't have pointer events for individual drawn objects,\n\t// so we emulate that by calculating what's under the pointer on pointermove/click manually\n\n\t_onClick(e) {\n\t\tconst point = this._map.pointerEventToLayerPoint(e);\n\t\tlet layer, clickedLayer;\n\n\t\tfor (let order = this._drawFirst; order; order = order.next) {\n\t\t\tlayer = order.layer;\n\t\t\tif (layer.options.interactive && layer._containsPoint(point)) {\n\t\t\t\tif (!(e.type === 'click' || e.type === 'preclick') || !this._map._draggableMoved(layer)) {\n\t\t\t\t\tclickedLayer = layer;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis._fireEvent(clickedLayer ? [clickedLayer] : false, e);\n\t}\n\n\t_onPointerMove(e) {\n\t\tif (!this._map || this._map.dragging.moving() || this._map._animatingZoom) { return; }\n\n\t\tconst point = this._map.pointerEventToLayerPoint(e);\n\t\tthis._handlePointerHover(e, point);\n\t}\n\n\n\t_handlePointerOut(e) {\n\t\tconst layer = this._hoveredLayer;\n\t\tif (layer) {\n\t\t\t// if we're leaving the layer, fire pointerout\n\t\t\tthis._container.classList.remove('leaflet-interactive');\n\t\t\tthis._fireEvent([layer], e, 'pointerout');\n\t\t\tthis._hoveredLayer = null;\n\t\t\tthis._pointerHoverThrottled = false;\n\t\t}\n\t}\n\n\t_handlePointerHover(e, point) {\n\t\tif (this._pointerHoverThrottled) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet layer, candidateHoveredLayer;\n\n\t\tfor (let order = this._drawFirst; order; order = order.next) {\n\t\t\tlayer = order.layer;\n\t\t\tif (layer.options.interactive && layer._containsPoint(point)) {\n\t\t\t\tcandidateHoveredLayer = layer;\n\t\t\t}\n\t\t}\n\n\t\tif (candidateHoveredLayer !== this._hoveredLayer) {\n\t\t\tthis._handlePointerOut(e);\n\n\t\t\tif (candidateHoveredLayer) {\n\t\t\t\tthis._container.classList.add('leaflet-interactive'); // change cursor\n\t\t\t\tthis._fireEvent([candidateHoveredLayer], e, 'pointerover');\n\t\t\t\tthis._hoveredLayer = candidateHoveredLayer;\n\t\t\t}\n\t\t}\n\n\t\tthis._fireEvent(this._hoveredLayer ? [this._hoveredLayer] : false, e);\n\n\t\tthis._pointerHoverThrottled = true;\n\t\tthis._pointerHoverThrottleTimeout = setTimeout((() => {\n\t\t\tthis._pointerHoverThrottled = false;\n\t\t}), 32);\n\t}\n\n\t_fireEvent(layers, e, type) {\n\t\tthis._map._fireDOMEvent(e, type || e.type, layers);\n\t}\n\n\t_bringToFront(layer) {\n\t\tconst order = layer._order;\n\n\t\tif (!order) { return; }\n\n\t\tconst next = order.next;\n\t\tconst prev = order.prev;\n\n\t\tif (next) {\n\t\t\tnext.prev = prev;\n\t\t} else {\n\t\t\t// Already last\n\t\t\treturn;\n\t\t}\n\t\tif (prev) {\n\t\t\tprev.next = next;\n\t\t} else if (next) {\n\t\t\t// Update first entry unless this is the\n\t\t\t// single entry\n\t\t\tthis._drawFirst = next;\n\t\t}\n\n\t\torder.prev = this._drawLast;\n\t\tthis._drawLast.next = order;\n\n\t\torder.next = null;\n\t\tthis._drawLast = order;\n\n\t\tthis._requestRedraw(layer);\n\t}\n\n\t_bringToBack(layer) {\n\t\tconst order = layer._order;\n\n\t\tif (!order) { return; }\n\n\t\tconst next = order.next;\n\t\tconst prev = order.prev;\n\n\t\tif (prev) {\n\t\t\tprev.next = next;\n\t\t} else {\n\t\t\t// Already first\n\t\t\treturn;\n\t\t}\n\t\tif (next) {\n\t\t\tnext.prev = prev;\n\t\t} else if (prev) {\n\t\t\t// Update last entry unless this is the\n\t\t\t// single entry\n\t\t\tthis._drawLast = prev;\n\t\t}\n\n\t\torder.prev = null;\n\n\t\torder.next = this._drawFirst;\n\t\tthis._drawFirst.prev = order;\n\t\tthis._drawFirst = order;\n\n\t\tthis._requestRedraw(layer);\n\t}\n}\n\n// @namespace SVG; @section\n// There are several static functions which can be called without instantiating SVG:\n\n// @function create(name: String): SVGElement\n// Returns a instance of [SVGElement](https://developer.mozilla.org/docs/Web/API/SVGElement),\n// corresponding to the class name passed. For example, using 'line' will return\n// an instance of [SVGLineElement](https://developer.mozilla.org/docs/Web/API/SVGLineElement).\nfunction svgCreate(name) {\n\treturn document.createElementNS('http://www.w3.org/2000/svg', name);\n}\n\n// @function pointsToPath(rings: Point[], closed: Boolean): String\n// Generates a SVG path string for multiple rings, with each ring turning\n// into \"M..L..L..\" instructions\nfunction pointsToPath(rings, closed) {\n\tconst str = rings.flatMap(points => [\n\t\t...points.map((p, j) => `${(j ? 'L' : 'M') + p.x} ${p.y}`),\n\t\t// closes the ring for polygons\n\t\tclosed ? 'z' : ''\n\t]).join('');\n\n\t// SVG complains about empty path strings\n\treturn str || 'M0 0';\n}\n\nconst create = svgCreate;\n\n/*\n * @class SVG\n * @inherits Renderer\n *\n * Allows vector layers to be displayed with [SVG](https://developer.mozilla.org/docs/Web/SVG).\n * Inherits `Renderer`.\n *\n * @example\n *\n * Use SVG by default for all paths in the map:\n *\n * ```js\n * const map = new Map('map', {\n * \trenderer: new SVG()\n * });\n * ```\n *\n * Use a SVG renderer with extra padding for specific vector geometries:\n *\n * ```js\n * const map = new Map('map');\n * const myRenderer = new SVG({ padding: 0.5 });\n * const line = new Polyline( coordinates, { renderer: myRenderer } );\n * const circle = new Circle( center, { renderer: myRenderer, radius: 100 } );\n * ```\n */\n\n// @namespace SVG\n// @constructor SVG(options?: Renderer options)\n// Creates a SVG renderer with the given options.\nclass SVG extends Renderer {\n\n\t_initContainer() {\n\t\tthis._container = create('svg');\n\n\t\t// makes it possible to click through svg root; we'll reset it back in individual paths\n\t\tthis._container.setAttribute('pointer-events', 'none');\n\n\t\tthis._rootGroup = create('g');\n\t\tthis._container.appendChild(this._rootGroup);\n\t}\n\n\t_destroyContainer() {\n\t\tRenderer.prototype._destroyContainer.call(this);\n\t\tdelete this._rootGroup;\n\t\tdelete this._svgSize;\n\t}\n\n\t_resizeContainer() {\n\t\tconst size = Renderer.prototype._resizeContainer.call(this);\n\n\t\t// set size of svg-container if changed\n\t\tif (!this._svgSize || !this._svgSize.equals(size)) {\n\t\t\tthis._svgSize = size;\n\t\t\tthis._container.setAttribute('width', size.x);\n\t\t\tthis._container.setAttribute('height', size.y);\n\t\t}\n\t}\n\n\t_update() {\n\t\tif (this._map._animatingZoom && this._bounds) { return; }\n\n\t\tconst b = this._bounds,\n\t\tsize = b.getSize(),\n\t\tcontainer = this._container;\n\n\t\t// movement: update container viewBox so that we don't have to change coordinates of individual layers\n\t\tcontainer.setAttribute('viewBox', [b.min.x, b.min.y, size.x, size.y].join(' '));\n\n\t\tthis.fire('update');\n\t}\n\n\t// methods below are called by vector layers implementations\n\n\t_initPath(layer) {\n\t\tconst path = layer._path = create('path');\n\n\t\t// @namespace Path\n\t\t// @option className: String = null\n\t\t// Custom class name set on an element. Only for SVG renderer.\n\t\tif (layer.options.className) {\n\t\t\tpath.classList.add(...splitWords(layer.options.className));\n\t\t}\n\n\t\tif (layer.options.interactive) {\n\t\t\tpath.classList.add('leaflet-interactive');\n\t\t}\n\n\t\tthis._updateStyle(layer);\n\t\tthis._layers[stamp(layer)] = layer;\n\t}\n\n\t_addPath(layer) {\n\t\tif (!this._rootGroup) { this._initContainer(); }\n\t\tthis._rootGroup.appendChild(layer._path);\n\t\tlayer.addInteractiveTarget(layer._path);\n\t}\n\n\t_removePath(layer) {\n\t\tlayer._path.remove();\n\t\tlayer.removeInteractiveTarget(layer._path);\n\t\tdelete this._layers[stamp(layer)];\n\t}\n\n\t_updatePath(layer) {\n\t\tlayer._project();\n\t\tlayer._update();\n\t}\n\n\t_updateStyle(layer) {\n\t\tconst path = layer._path,\n\t\toptions = layer.options;\n\n\t\tif (!path) { return; }\n\n\t\tif (options.stroke) {\n\t\t\tpath.setAttribute('stroke', options.color);\n\t\t\tpath.setAttribute('stroke-opacity', options.opacity);\n\t\t\tpath.setAttribute('stroke-width', options.weight);\n\t\t\tpath.setAttribute('stroke-linecap', options.lineCap);\n\t\t\tpath.setAttribute('stroke-linejoin', options.lineJoin);\n\n\t\t\tif (options.dashArray) {\n\t\t\t\tpath.setAttribute('stroke-dasharray', options.dashArray);\n\t\t\t} else {\n\t\t\t\tpath.removeAttribute('stroke-dasharray');\n\t\t\t}\n\n\t\t\tif (options.dashOffset) {\n\t\t\t\tpath.setAttribute('stroke-dashoffset', options.dashOffset);\n\t\t\t} else {\n\t\t\t\tpath.removeAttribute('stroke-dashoffset');\n\t\t\t}\n\t\t} else {\n\t\t\tpath.setAttribute('stroke', 'none');\n\t\t}\n\n\t\tif (options.fill) {\n\t\t\tpath.setAttribute('fill', options.fillColor || options.color);\n\t\t\tpath.setAttribute('fill-opacity', options.fillOpacity);\n\t\t\tpath.setAttribute('fill-rule', options.fillRule || 'evenodd');\n\t\t} else {\n\t\t\tpath.setAttribute('fill', 'none');\n\t\t}\n\t}\n\n\t_updatePoly(layer, closed) {\n\t\tthis._setPath(layer, pointsToPath(layer._parts, closed));\n\t}\n\n\t_updateCircle(layer) {\n\t\tconst p = layer._point,\n\t\tr = Math.max(Math.round(layer._radius), 1),\n\t\tr2 = Math.max(Math.round(layer._radiusY), 1) || r,\n\t\tarc = `a${r},${r2} 0 1,0 `;\n\n\t\t// drawing a circle with two half-arcs\n\t\tconst d = layer._empty() ? 'M0 0' :\n\t\t\t`M${p.x - r},${p.y\n\t\t\t}${arc}${r * 2},0 ${\n\t\t\t\tarc}${-r * 2},0 `;\n\n\t\tthis._setPath(layer, d);\n\t}\n\n\t_setPath(layer, path) {\n\t\tlayer._path.setAttribute('d', path);\n\t}\n\n\t// SVG does not have the concept of zIndex so we resort to changing the DOM order of elements\n\t_bringToFront(layer) {\n\t\ttoFront(layer._path);\n\t}\n\n\t_bringToBack(layer) {\n\t\ttoBack(layer._path);\n\t}\n}\n\nMap$1.include({\n\t// @namespace Map; @method getRenderer(layer: Path): Renderer\n\t// Returns the instance of `Renderer` that should be used to render the given\n\t// `Path`. It will ensure that the `renderer` options of the map and paths\n\t// are respected, and that the renderers do exist on the map.\n\tgetRenderer(layer) {\n\t\t// @namespace Path; @option renderer: Renderer\n\t\t// Use this specific instance of `Renderer` for this path. Takes\n\t\t// precedence over the map's [default renderer](#map-renderer).\n\t\t// If set, it will override the `pane` option of the path.\n\t\tlet renderer = layer.options.renderer ?? this._getPaneRenderer(layer.options.pane) ?? this.options.renderer ?? this._renderer;\n\n\t\tif (!renderer) {\n\t\t\trenderer = this._renderer = this._createRenderer();\n\t\t}\n\n\t\tif (!this.hasLayer(renderer)) {\n\t\t\tthis.addLayer(renderer);\n\t\t}\n\t\treturn renderer;\n\t},\n\n\t_getPaneRenderer(name) {\n\t\tif (name === 'overlayPane' || name === undefined) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet renderer = this._paneRenderers[name];\n\t\tif (renderer === undefined) {\n\t\t\trenderer = this._createRenderer({pane: name});\n\t\t\tthis._paneRenderers[name] = renderer;\n\t\t}\n\t\treturn renderer;\n\t},\n\n\t_createRenderer(options) {\n\t\t// @namespace Map; @option preferCanvas: Boolean = false\n\t\t// Whether `Path`s should be rendered on a `Canvas` renderer.\n\t\t// By default, all `Path`s are rendered in a `SVG` renderer.\n\t\treturn (this.options.preferCanvas && new Canvas(options)) || new SVG(options);\n\t}\n});\n\n/*\n * Rectangle extends Polygon and creates a rectangle when passed a LatLngBounds object.\n */\n\n/*\n * @class Rectangle\n * @inherits Polygon\n *\n * A class for drawing rectangle overlays on a map. Extends `Polygon`.\n *\n * @example\n *\n * ```js\n * // define rectangle geographical bounds\n * const bounds = [[54.559322, -5.767822], [56.1210604, -3.021240]];\n *\n * // create an orange rectangle\n * new Rectangle(bounds, {color: \"#ff7800\", weight: 1}).addTo(map);\n *\n * // zoom the map to the rectangle bounds\n * map.fitBounds(bounds);\n * ```\n *\n */\n\n// @constructor Rectangle(latLngBounds: LatLngBounds, options?: Polyline options)\nclass Rectangle extends Polygon {\n\tinitialize(latLngBounds, options) {\n\t\tPolygon.prototype.initialize.call(this, this._boundsToLatLngs(latLngBounds), options);\n\t}\n\n\t// @method setBounds(latLngBounds: LatLngBounds): this\n\t// Redraws the rectangle with the passed bounds.\n\tsetBounds(latLngBounds) {\n\t\treturn this.setLatLngs(this._boundsToLatLngs(latLngBounds));\n\t}\n\n\t_boundsToLatLngs(latLngBounds) {\n\t\tlatLngBounds = new LatLngBounds(latLngBounds);\n\t\treturn [\n\t\t\tlatLngBounds.getSouthWest(),\n\t\t\tlatLngBounds.getNorthWest(),\n\t\t\tlatLngBounds.getNorthEast(),\n\t\t\tlatLngBounds.getSouthEast()\n\t\t];\n\t}\n}\n\nSVG.create = create;\nSVG.pointsToPath = pointsToPath;\n\n// TODO: can they be static functions in the GeoJSON Class?\nGeoJSON.geometryToLayer = geometryToLayer;\nGeoJSON.coordsToLatLng = coordsToLatLng;\nGeoJSON.coordsToLatLngs = coordsToLatLngs;\nGeoJSON.latLngToCoords = latLngToCoords;\nGeoJSON.latLngsToCoords = latLngsToCoords;\nGeoJSON.getFeature = getFeature;\nGeoJSON.asFeature = asFeature;\n\n/*\n * Handler.BoxZoom is used to add shift-drag zoom interaction to the map\n * (zoom to a selected bounding box), enabled by default.\n */\n\n// @namespace Map\n// @section Interaction Options\nMap$1.mergeOptions({\n\t// @option boxZoom: Boolean = true\n\t// Whether the map can be zoomed to a rectangular area specified by\n\t// dragging the pointer while pressing the shift key.\n\tboxZoom: true\n});\n\nclass BoxZoom extends Handler {\n\tinitialize(map) {\n\t\tthis._map = map;\n\t\tthis._container = map._container;\n\t\tthis._pane = map._panes.overlayPane;\n\t\tthis._resetStateTimeout = 0;\n\t\tmap.on('unload', this._destroy, this);\n\t}\n\n\taddHooks() {\n\t\ton(this._container, 'pointerdown', this._onPointerDown, this);\n\t}\n\n\tremoveHooks() {\n\t\toff(this._container, 'pointerdown', this._onPointerDown, this);\n\t}\n\n\tmoved() {\n\t\treturn this._moved;\n\t}\n\n\t_destroy() {\n\t\tthis._pane.remove();\n\t\tdelete this._pane;\n\t}\n\n\t_resetState() {\n\t\tthis._resetStateTimeout = 0;\n\t\tthis._moved = false;\n\t}\n\n\t_clearDeferredResetState() {\n\t\tif (this._resetStateTimeout !== 0) {\n\t\t\tclearTimeout(this._resetStateTimeout);\n\t\t\tthis._resetStateTimeout = 0;\n\t\t}\n\t}\n\n\t_onPointerDown(e) {\n\t\tif (!e.shiftKey || (e.button !== 0)) { return false; }\n\n\t\t// Clear the deferred resetState if it hasn't executed yet, otherwise it\n\t\t// will interrupt the interaction and orphan a box element in the container.\n\t\tthis._clearDeferredResetState();\n\t\tthis._resetState();\n\n\t\tdisableTextSelection();\n\t\tdisableImageDrag();\n\n\t\tthis._startPoint = this._map.pointerEventToContainerPoint(e);\n\n\t\ton(document, {\n\t\t\tcontextmenu: stop,\n\t\t\tpointermove: this._onPointerMove,\n\t\t\tpointerup: this._onPointerUp,\n\t\t\tkeydown: this._onKeyDown\n\t\t}, this);\n\t}\n\n\t_onPointerMove(e) {\n\t\tif (!this._moved) {\n\t\t\tthis._moved = true;\n\n\t\t\tthis._box = create$1('div', 'leaflet-zoom-box', this._container);\n\t\t\tthis._container.classList.add('leaflet-crosshair');\n\n\t\t\tthis._map.fire('boxzoomstart');\n\t\t}\n\n\t\tthis._point = this._map.pointerEventToContainerPoint(e);\n\n\t\tconst bounds = new Bounds(this._point, this._startPoint),\n\t\tsize = bounds.getSize();\n\n\t\tsetPosition(this._box, bounds.min);\n\n\t\tthis._box.style.width = `${size.x}px`;\n\t\tthis._box.style.height = `${size.y}px`;\n\t}\n\n\t_finish() {\n\t\tif (this._moved) {\n\t\t\tthis._box.remove();\n\t\t\tthis._container.classList.remove('leaflet-crosshair');\n\t\t}\n\n\t\tenableTextSelection();\n\t\tenableImageDrag();\n\n\t\toff(document, {\n\t\t\tcontextmenu: stop,\n\t\t\tpointermove: this._onPointerMove,\n\t\t\tpointerup: this._onPointerUp,\n\t\t\tkeydown: this._onKeyDown\n\t\t}, this);\n\t}\n\n\t_onPointerUp(e) {\n\t\tif (e.button !== 0) { return; }\n\n\t\tthis._finish();\n\n\t\tif (!this._moved) { return; }\n\t\t// Postpone to next JS tick so internal click event handling\n\t\t// still see it as \"moved\".\n\t\tthis._clearDeferredResetState();\n\t\tthis._resetStateTimeout = setTimeout(this._resetState.bind(this), 0);\n\n\t\tconst bounds = new LatLngBounds(\n\t\t\tthis._map.containerPointToLatLng(this._startPoint),\n\t\t\tthis._map.containerPointToLatLng(this._point));\n\n\t\tthis._map\n\t\t\t.fitBounds(bounds)\n\t\t\t.fire('boxzoomend', {boxZoomBounds: bounds});\n\t}\n\n\t_onKeyDown(e) {\n\t\tif (e.code === 'Escape') {\n\t\t\tthis._finish();\n\t\t\tthis._clearDeferredResetState();\n\t\t\tthis._resetState();\n\t\t}\n\t}\n}\n\n// @section Handlers\n// @property boxZoom: Handler\n// Box (shift-drag with pointer) zoom handler.\nMap$1.addInitHook('addHandler', 'boxZoom', BoxZoom);\n\n/*\n * Handler.DoubleClickZoom is used to handle double-click zoom on the map, enabled by default.\n */\n\n// @namespace Map\n// @section Interaction Options\n\nMap$1.mergeOptions({\n\t// @option doubleClickZoom: Boolean|String = true\n\t// Whether the map can be zoomed in by double clicking on it and\n\t// zoomed out by double clicking while holding shift. If passed\n\t// `'center'`, double-click zoom will zoom to the center of the\n\t// view regardless of where the pointer was.\n\tdoubleClickZoom: true\n});\n\nclass DoubleClickZoom extends Handler {\n\taddHooks() {\n\t\tthis._map.on('dblclick', this._onDoubleClick, this);\n\t}\n\n\tremoveHooks() {\n\t\tthis._map.off('dblclick', this._onDoubleClick, this);\n\t}\n\n\t_onDoubleClick(e) {\n\t\tconst map = this._map,\n\t\toldZoom = map.getZoom(),\n\t\tdelta = map.options.zoomDelta,\n\t\tzoom = e.originalEvent.shiftKey ? oldZoom - delta : oldZoom + delta;\n\n\t\tif (map.options.doubleClickZoom === 'center') {\n\t\t\tmap.setZoom(zoom);\n\t\t} else {\n\t\t\tmap.setZoomAround(e.containerPoint, zoom);\n\t\t}\n\t}\n}\n\n// @section Handlers\n//\n// Map properties include interaction handlers that allow you to control\n// interaction behavior in runtime, enabling or disabling certain features such\n// as dragging or touch zoom (see `Handler` methods). For example:\n//\n// ```js\n// map.doubleClickZoom.disable();\n// ```\n//\n// @property doubleClickZoom: Handler\n// Double click zoom handler.\nMap$1.addInitHook('addHandler', 'doubleClickZoom', DoubleClickZoom);\n\n/*\n * Handler.MapDrag is used to make the map draggable (with panning inertia), enabled by default.\n */\n\n// @namespace Map\n// @section Interaction Options\nMap$1.mergeOptions({\n\t// @option dragging: Boolean = true\n\t// Whether the map is draggable with pointer or not.\n\tdragging: true,\n\n\t// @section Panning Inertia Options\n\t// @option inertia: Boolean = *\n\t// If enabled, panning of the map will have an inertia effect where\n\t// the map builds momentum while dragging and continues moving in\n\t// the same direction for some time. Feels especially nice on touch\n\t// devices. Enabled by default.\n\tinertia: true,\n\n\t// @option inertiaDeceleration: Number = 3000\n\t// The rate with which the inertial movement slows down, in pixels/second².\n\tinertiaDeceleration: 3400, // px/s^2\n\n\t// @option inertiaMaxSpeed: Number = Infinity\n\t// Max speed of the inertial movement, in pixels/second.\n\tinertiaMaxSpeed: Infinity, // px/s\n\n\t// @option easeLinearity: Number = 0.2\n\teaseLinearity: 0.2,\n\n\t// TODO refactor, move to CRS\n\t// @option worldCopyJump: Boolean = false\n\t// With this option enabled, the map tracks when you pan to another \"copy\"\n\t// of the world and seamlessly jumps to the original one so that all overlays\n\t// like markers and vector layers are still visible.\n\tworldCopyJump: false,\n\n\t// @option maxBoundsViscosity: Number = 0.0\n\t// If `maxBounds` is set, this option will control how solid the bounds\n\t// are when dragging the map around. The default value of `0.0` allows the\n\t// user to drag outside the bounds at normal speed, higher values will\n\t// slow down map dragging outside bounds, and `1.0` makes the bounds fully\n\t// solid, preventing the user from dragging outside the bounds.\n\tmaxBoundsViscosity: 0.0\n});\n\nclass Drag extends Handler {\n\taddHooks() {\n\t\tif (!this._draggable) {\n\t\t\tconst map = this._map;\n\n\t\t\tthis._draggable = new Draggable(map._mapPane, map._container);\n\n\t\t\tthis._draggable.on({\n\t\t\t\tdragstart: this._onDragStart,\n\t\t\t\tdrag: this._onDrag,\n\t\t\t\tdragend: this._onDragEnd\n\t\t\t}, this);\n\n\t\t\tthis._draggable.on('predrag', this._onPreDragLimit, this);\n\t\t\tif (map.options.worldCopyJump) {\n\t\t\t\tthis._draggable.on('predrag', this._onPreDragWrap, this);\n\t\t\t\tmap.on('zoomend', this._onZoomEnd, this);\n\n\t\t\t\tmap.whenReady(this._onZoomEnd, this);\n\t\t\t}\n\t\t}\n\t\tthis._map._container.classList.add('leaflet-grab', 'leaflet-touch-drag');\n\t\tthis._draggable.enable();\n\t\tthis._positions = [];\n\t\tthis._times = [];\n\t}\n\n\tremoveHooks() {\n\t\tthis._map._container.classList.remove('leaflet-grab', 'leaflet-touch-drag');\n\t\tthis._draggable.disable();\n\t}\n\n\tmoved() {\n\t\treturn this._draggable?._moved;\n\t}\n\n\tmoving() {\n\t\treturn this._draggable?._moving;\n\t}\n\n\t_onDragStart() {\n\t\tconst map = this._map;\n\n\t\tmap._stop();\n\t\tif (this._map.options.maxBounds && this._map.options.maxBoundsViscosity) {\n\t\t\tconst bounds = new LatLngBounds(this._map.options.maxBounds);\n\n\t\t\tthis._offsetLimit = new Bounds(\n\t\t\t\tthis._map.latLngToContainerPoint(bounds.getNorthWest()).multiplyBy(-1),\n\t\t\t\tthis._map.latLngToContainerPoint(bounds.getSouthEast()).multiplyBy(-1)\n\t\t\t\t\t.add(this._map.getSize()));\n\n\t\t\tthis._viscosity = Math.min(1.0, Math.max(0.0, this._map.options.maxBoundsViscosity));\n\t\t} else {\n\t\t\tthis._offsetLimit = null;\n\t\t}\n\n\t\tmap\n\t\t\t.fire('movestart')\n\t\t\t.fire('dragstart');\n\n\t\tif (map.options.inertia) {\n\t\t\tthis._positions = [];\n\t\t\tthis._times = [];\n\t\t}\n\t}\n\n\t_onDrag(e) {\n\t\tif (this._map.options.inertia) {\n\t\t\tconst time = this._lastTime = +new Date(),\n\t\t\tpos = this._lastPos = this._draggable._absPos || this._draggable._newPos;\n\n\t\t\tthis._positions.push(pos);\n\t\t\tthis._times.push(time);\n\n\t\t\tthis._prunePositions(time);\n\t\t}\n\n\t\tthis._map\n\t\t\t.fire('move', e)\n\t\t\t.fire('drag', e);\n\t}\n\n\t_prunePositions(time) {\n\t\twhile (this._positions.length > 1 && time - this._times[0] > 50) {\n\t\t\tthis._positions.shift();\n\t\t\tthis._times.shift();\n\t\t}\n\t}\n\n\t_onZoomEnd() {\n\t\tconst pxCenter = this._map.getSize().divideBy(2),\n\t\tpxWorldCenter = this._map.latLngToLayerPoint([0, 0]);\n\n\t\tthis._initialWorldOffset = pxWorldCenter.subtract(pxCenter).x;\n\t\tthis._worldWidth = this._map.getPixelWorldBounds().getSize().x;\n\t}\n\n\t_viscousLimit(value, threshold) {\n\t\treturn value - (value - threshold) * this._viscosity;\n\t}\n\n\t_onPreDragLimit() {\n\t\tif (!this._viscosity || !this._offsetLimit) { return; }\n\n\t\tconst offset = this._draggable._newPos.subtract(this._draggable._startPos);\n\n\t\tconst limit = this._offsetLimit;\n\t\tif (offset.x < limit.min.x) { offset.x = this._viscousLimit(offset.x, limit.min.x); }\n\t\tif (offset.y < limit.min.y) { offset.y = this._viscousLimit(offset.y, limit.min.y); }\n\t\tif (offset.x > limit.max.x) { offset.x = this._viscousLimit(offset.x, limit.max.x); }\n\t\tif (offset.y > limit.max.y) { offset.y = this._viscousLimit(offset.y, limit.max.y); }\n\n\t\tthis._draggable._newPos = this._draggable._startPos.add(offset);\n\t}\n\n\t_onPreDragWrap() {\n\t\t// TODO refactor to be able to adjust map pane position after zoom\n\t\tconst worldWidth = this._worldWidth,\n\t\thalfWidth = Math.round(worldWidth / 2),\n\t\tdx = this._initialWorldOffset,\n\t\tx = this._draggable._newPos.x,\n\t\tnewX1 = (x - halfWidth + dx) % worldWidth + halfWidth - dx,\n\t\tnewX2 = (x + halfWidth + dx) % worldWidth - halfWidth - dx,\n\t\tnewX = Math.abs(newX1 + dx) < Math.abs(newX2 + dx) ? newX1 : newX2;\n\n\t\tthis._draggable._absPos = this._draggable._newPos.clone();\n\t\tthis._draggable._newPos.x = newX;\n\t}\n\n\t_onDragEnd(e) {\n\t\tconst map = this._map,\n\t\toptions = map.options,\n\n\t\tnoInertia = !options.inertia || e.noInertia || this._times.length < 2;\n\n\t\tmap.fire('dragend', e);\n\n\t\tif (noInertia) {\n\t\t\tmap.fire('moveend');\n\n\t\t} else {\n\t\t\tthis._prunePositions(+new Date());\n\n\t\t\tconst direction = this._lastPos.subtract(this._positions[0]),\n\t\t\tduration = (this._lastTime - this._times[0]) / 1000,\n\t\t\tease = options.easeLinearity,\n\n\t\t\tspeedVector = direction.multiplyBy(ease / duration),\n\t\t\tspeed = speedVector.distanceTo([0, 0]),\n\n\t\t\tlimitedSpeed = Math.min(options.inertiaMaxSpeed, speed),\n\t\t\tlimitedSpeedVector = speedVector.multiplyBy(limitedSpeed / speed),\n\n\t\t\tdecelerationDuration = limitedSpeed / (options.inertiaDeceleration * ease);\n\t\t\tlet offset = limitedSpeedVector.multiplyBy(-decelerationDuration / 2).round();\n\n\t\t\tif (!offset.x && !offset.y) {\n\t\t\t\tmap.fire('moveend');\n\n\t\t\t} else {\n\t\t\t\toffset = map._limitOffset(offset, map.options.maxBounds);\n\n\t\t\t\trequestAnimationFrame(() => {\n\t\t\t\t\tmap.panBy(offset, {\n\t\t\t\t\t\tduration: decelerationDuration,\n\t\t\t\t\t\teaseLinearity: ease,\n\t\t\t\t\t\tnoMoveStart: true,\n\t\t\t\t\t\tanimate: true\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n}\n\n// @section Handlers\n// @property dragging: Handler\n// Map dragging handler.\nMap$1.addInitHook('addHandler', 'dragging', Drag);\n\n/*\n * Map.Keyboard is handling keyboard interaction with the map, enabled by default.\n */\n\n// @namespace Map\n// @section Keyboard Navigation Options\nMap$1.mergeOptions({\n\t// @option keyboard: Boolean = true\n\t// Makes the map focusable and allows users to navigate the map with keyboard\n\t// arrows and `+`/`-` keys.\n\tkeyboard: true,\n\n\t// @option keyboardPanDelta: Number = 80\n\t// Amount of pixels to pan when pressing an arrow key.\n\tkeyboardPanDelta: 80\n});\n\nclass Keyboard extends Handler {\n\n\tstatic keyCodes = {\n\t\tleft: ['ArrowLeft'],\n\t\tright: ['ArrowRight'],\n\t\tdown: ['ArrowDown'],\n\t\tup: ['ArrowUp'],\n\t\tzoomIn: ['Equal', 'NumpadAdd', 'BracketRight'],\n\t\tzoomOut: ['Minus', 'NumpadSubtract', 'Digit6', 'Slash']\n\t};\n\n\tinitialize(map) {\n\t\tthis._map = map;\n\n\t\tthis._setPanDelta(map.options.keyboardPanDelta);\n\t\tthis._setZoomDelta(map.options.zoomDelta);\n\t}\n\n\taddHooks() {\n\t\tconst container = this._map._container;\n\n\t\t// make the container focusable by tabbing\n\t\tif (container.tabIndex <= 0) {\n\t\t\tcontainer.tabIndex = '0';\n\t\t}\n\n\t\t// add aria-attribute for keyboard shortcuts to the container\n\t\tcontainer.ariaKeyShortcuts = Object.values(Keyboard.keyCodes).flat().join(' ');\n\n\t\ton(container, {\n\t\t\tfocus: this._onFocus,\n\t\t\tblur: this._onBlur,\n\t\t\tpointerdown: this._onPointerDown\n\t\t}, this);\n\n\t\tthis._map.on({\n\t\t\tfocus: this._addHooks,\n\t\t\tblur: this._removeHooks\n\t\t}, this);\n\t}\n\n\tremoveHooks() {\n\t\tthis._removeHooks();\n\n\t\toff(this._map._container, {\n\t\t\tfocus: this._onFocus,\n\t\t\tblur: this._onBlur,\n\t\t\tpointerdown: this._onPointerDown\n\t\t}, this);\n\n\t\tthis._map.off({\n\t\t\tfocus: this._addHooks,\n\t\t\tblur: this._removeHooks\n\t\t}, this);\n\t}\n\n\t// acquire/lose focus #594, #1228, #1540\n\t_onPointerDown() {\n\t\tif (this._focused) { return; }\n\n\t\tconst body = document.body,\n\t\tdocEl = document.documentElement,\n\t\ttop = body.scrollTop || docEl.scrollTop,\n\t\tleft = body.scrollLeft || docEl.scrollLeft;\n\n\t\tthis._map._container.focus();\n\n\t\twindow.scrollTo(left, top);\n\t}\n\n\t_onFocus() {\n\t\tthis._focused = true;\n\t\tthis._map.fire('focus');\n\t}\n\n\t_onBlur() {\n\t\tthis._focused = false;\n\t\tthis._map.fire('blur');\n\t}\n\n\t_setPanDelta(panDelta) {\n\t\tconst keys = this._panKeys = {},\n\t\tcodes = Keyboard.keyCodes;\n\n\t\tfor (const code of codes.left) {\n\t\t\tkeys[code] = [-1 * panDelta, 0];\n\t\t}\n\t\tfor (const code of codes.right) {\n\t\t\tkeys[code] = [panDelta, 0];\n\t\t}\n\t\tfor (const code of codes.down) {\n\t\t\tkeys[code] = [0, panDelta];\n\t\t}\n\t\tfor (const code of codes.up) {\n\t\t\tkeys[code] = [0, -1 * panDelta];\n\t\t}\n\t}\n\n\t_setZoomDelta(zoomDelta) {\n\t\tconst keys = this._zoomKeys = {},\n\t\tcodes = Keyboard.keyCodes;\n\n\t\tfor (const code of codes.zoomIn) {\n\t\t\tkeys[code] = zoomDelta;\n\t\t}\n\t\tfor (const code of codes.zoomOut) {\n\t\t\tkeys[code] = -zoomDelta;\n\t\t}\n\t}\n\n\t_addHooks() {\n\t\ton(document, 'keydown', this._onKeyDown, this);\n\t}\n\n\t_removeHooks() {\n\t\toff(document, 'keydown', this._onKeyDown, this);\n\t}\n\n\t_onKeyDown(e) {\n\t\tif (e.altKey || e.ctrlKey || e.metaKey) { return; }\n\n\t\tconst key = e.code,\n\t\tmap = this._map;\n\t\tlet offset;\n\n\t\tif (key in this._panKeys) {\n\t\t\tif (!map._panAnim || !map._panAnim._inProgress) {\n\t\t\t\toffset = this._panKeys[key];\n\t\t\t\tif (e.shiftKey) {\n\t\t\t\t\toffset = new Point(offset).multiplyBy(3);\n\t\t\t\t}\n\n\t\t\t\tif (map.options.maxBounds) {\n\t\t\t\t\toffset = map._limitOffset(new Point(offset), map.options.maxBounds);\n\t\t\t\t}\n\n\t\t\t\tif (map.options.worldCopyJump) {\n\t\t\t\t\tconst newLatLng = map.wrapLatLng(map.unproject(map.project(map.getCenter()).add(offset)));\n\t\t\t\t\tmap.panTo(newLatLng);\n\t\t\t\t} else {\n\t\t\t\t\tmap.panBy(offset);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (key in this._zoomKeys) {\n\t\t\tmap.setZoom(map.getZoom() + (e.shiftKey ? 3 : 1) * this._zoomKeys[key]);\n\n\t\t} else if (key === 'Escape' && map._popup && map._popup.options.closeOnEscapeKey) {\n\t\t\tmap.closePopup();\n\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\n\t\tstop(e);\n\t}\n}\n\n// @section Handlers\n// @section Handlers\n// @property keyboard: Handler\n// Keyboard navigation handler.\nMap$1.addInitHook('addHandler', 'keyboard', Keyboard);\n\n/*\n * Handler.ScrollWheelZoom is used by Map to enable mouse scroll wheel zoom on the map.\n */\n\n// @namespace Map\n// @section Interaction Options\nMap$1.mergeOptions({\n\t// @section Mouse wheel options\n\t// @option scrollWheelZoom: Boolean|String = true\n\t// Whether the map can be zoomed by using the mouse wheel. If passed `'center'`,\n\t// it will zoom to the center of the view regardless of where the pointer was.\n\tscrollWheelZoom: true,\n\n\t// @option wheelDebounceTime: Number = 40\n\t// Limits the rate at which a wheel can fire (in milliseconds). By default, the\n\t// user can't zoom via wheel more often than once per 40 ms.\n\twheelDebounceTime: 40,\n\n\t// @option wheelPxPerZoomLevel: Number = 60\n\t// How many scroll pixels (as reported by [DomEvent.getWheelDelta](#domevent-getwheeldelta))\n\t// mean a change of one full zoom level. Smaller values will make wheel-zooming\n\t// faster (and vice versa).\n\twheelPxPerZoomLevel: 60\n});\n\nclass ScrollWheelZoom extends Handler {\n\taddHooks() {\n\t\ton(this._map._container, 'wheel', this._onWheelScroll, this);\n\n\t\tthis._delta = 0;\n\t}\n\n\tremoveHooks() {\n\t\toff(this._map._container, 'wheel', this._onWheelScroll, this);\n\t\tclearTimeout(this._timer);\n\t}\n\n\t_onWheelScroll(e) {\n\t\tconst delta = getWheelDelta(e);\n\n\t\tconst debounce = this._map.options.wheelDebounceTime;\n\n\t\tthis._delta += delta;\n\t\tthis._lastMousePos = this._map.pointerEventToContainerPoint(e);\n\n\t\tif (!this._startTime) {\n\t\t\tthis._startTime = +new Date();\n\t\t}\n\n\t\tconst left = Math.max(debounce - (+new Date() - this._startTime), 0);\n\n\t\tclearTimeout(this._timer);\n\t\tthis._timer = setTimeout(this._performZoom.bind(this), left);\n\n\t\tstop(e);\n\t}\n\n\t_performZoom() {\n\t\tconst map = this._map,\n\t\tzoom = map.getZoom(),\n\t\tsnap = this._map.options.zoomSnap ?? 0;\n\n\t\tmap._stop(); // stop panning and fly animations if any\n\n\t\t// map the delta with a sigmoid function to -4..4 range leaning on -1..1\n\t\tconst d2 = this._delta / (this._map.options.wheelPxPerZoomLevel * 4),\n\t\td3 = 4 * Math.log(2 / (1 + Math.exp(-Math.abs(d2)))) / Math.LN2,\n\t\td4 = snap ? Math.ceil(d3 / snap) * snap : d3,\n\t\tdelta = map._limitZoom(zoom + (this._delta > 0 ? d4 : -d4)) - zoom;\n\n\t\tthis._delta = 0;\n\t\tthis._startTime = null;\n\n\t\tif (!delta) { return; }\n\n\t\tif (map.options.scrollWheelZoom === 'center') {\n\t\t\tmap.setZoom(zoom + delta);\n\t\t} else {\n\t\t\tmap.setZoomAround(this._lastMousePos, zoom + delta);\n\t\t}\n\t}\n}\n\n// @section Handlers\n// @property scrollWheelZoom: Handler\n// Scroll wheel zoom handler.\nMap$1.addInitHook('addHandler', 'scrollWheelZoom', ScrollWheelZoom);\n\n/*\n * Map.TapHold is used to simulate `contextmenu` event on long hold,\n * which otherwise is not fired by mobile Safari.\n */\n\nconst tapHoldDelay = 600;\n\n// @namespace Map\n// @section Interaction Options\nMap$1.mergeOptions({\n\t// @section Touch interaction options\n\t// @option tapHold: Boolean\n\t// Enables simulation of `contextmenu` event, default is `true` for mobile Safari.\n\ttapHold: Browser.safari && Browser.mobile,\n\n\t// @option tapTolerance: Number = 15\n\t// The max number of pixels a user can shift his finger during touch\n\t// for it to be considered a valid tap.\n\ttapTolerance: 15\n});\n\nclass TapHold extends Handler {\n\taddHooks() {\n\t\ton(this._map._container, 'pointerdown', this._onDown, this);\n\t}\n\n\tremoveHooks() {\n\t\toff(this._map._container, 'pointerdown', this._onDown, this);\n\t\tclearTimeout(this._holdTimeout);\n\t}\n\n\t_onDown(e) {\n\t\tclearTimeout(this._holdTimeout);\n\t\tif (getPointers().length !== 1 || e.pointerType === 'mouse') { return; }\n\n\t\tthis._startPos = this._newPos = new Point(e.clientX, e.clientY);\n\n\t\tthis._holdTimeout = setTimeout((() => {\n\t\t\tthis._cancel();\n\t\t\tif (!this._isTapValid()) { return; }\n\n\t\t\t// prevent simulated mouse events https://w3c.github.io/touch-events/#mouse-events\n\t\t\ton(document, 'pointerup', preventDefault);\n\t\t\ton(document, 'pointerup pointercancel', this._cancelClickPrevent);\n\t\t\tthis._simulateEvent('contextmenu', e);\n\t\t}), tapHoldDelay);\n\n\t\ton(document, 'pointerup pointercancel contextmenu', this._cancel, this);\n\t\ton(document, 'pointermove', this._onMove, this);\n\t}\n\n\t_cancelClickPrevent = function _cancelClickPrevent() {\n\t\toff(document, 'pointerup', preventDefault);\n\t\toff(document, 'pointerup pointercancel', _cancelClickPrevent);\n\t};\n\n\t_cancel() {\n\t\tclearTimeout(this._holdTimeout);\n\t\toff(document, 'pointerup pointercancel contextmenu', this._cancel, this);\n\t\toff(document, 'pointermove', this._onMove, this);\n\t}\n\n\t_onMove(e) {\n\t\tthis._newPos = new Point(e.clientX, e.clientY);\n\t}\n\n\t_isTapValid() {\n\t\treturn this._newPos.distanceTo(this._startPos) <= this._map.options.tapTolerance;\n\t}\n\n\t_simulateEvent(type, e) {\n\t\tconst simulatedEvent = new MouseEvent(type, {\n\t\t\tbubbles: true,\n\t\t\tcancelable: true,\n\t\t\tview: window,\n\t\t\t// detail: 1,\n\t\t\tscreenX: e.screenX,\n\t\t\tscreenY: e.screenY,\n\t\t\tclientX: e.clientX,\n\t\t\tclientY: e.clientY,\n\t\t\t// button: 2,\n\t\t\t// buttons: 2\n\t\t});\n\n\t\tsimulatedEvent._simulated = true;\n\n\t\te.target.dispatchEvent(simulatedEvent);\n\t}\n}\n\n// @section Handlers\n// @property tapHold: Handler\n// Long tap handler to simulate `contextmenu` event (useful in mobile Safari).\nMap$1.addInitHook('addHandler', 'tapHold', TapHold);\n\n/*\n * Handler.PinchZoom is used by Map to add pinch zoom on supported mobile browsers.\n */\n\n// @namespace Map\n// @section Interaction Options\nMap$1.mergeOptions({\n\t// @section Touch interaction options\n\t// @option pinchZoom: Boolean|String = *\n\t// Whether the map can be zoomed by touch-dragging with two fingers. If\n\t// passed `'center'`, it will zoom to the center of the view regardless of\n\t// where the touch events (fingers) were. Enabled for touch-capable web\n\t// browsers.\n\tpinchZoom: true,\n\n\t// @option bounceAtZoomLimits: Boolean = true\n\t// Set it to false if you don't want the map to zoom beyond min/max zoom\n\t// and then bounce back when pinch-zooming.\n\tbounceAtZoomLimits: true\n});\n\nclass PinchZoom extends Handler {\n\taddHooks() {\n\t\tthis._map._container.classList.add('leaflet-touch-zoom');\n\t\ton(this._map._container, 'pointerdown', this._onPointerStart, this);\n\t}\n\n\tremoveHooks() {\n\t\tthis._map._container.classList.remove('leaflet-touch-zoom');\n\t\toff(this._map._container, 'pointerdown', this._onPointerStart, this);\n\t}\n\n\t_onPointerStart(e) {\n\t\tconst map = this._map;\n\n\t\tconst pointers = getPointers();\n\t\tif (pointers.length !== 2 || map._animatingZoom || this._zooming) { return; }\n\n\t\tconst p1 = map.pointerEventToContainerPoint(pointers[0]),\n\t\tp2 = map.pointerEventToContainerPoint(pointers[1]);\n\n\t\tthis._centerPoint = map.getSize()._divideBy(2);\n\t\tthis._startLatLng = map.containerPointToLatLng(this._centerPoint);\n\t\tif (map.options.pinchZoom !== 'center') {\n\t\t\tthis._pinchStartLatLng = map.containerPointToLatLng(p1.add(p2)._divideBy(2));\n\t\t}\n\n\t\tthis._startDist = p1.distanceTo(p2);\n\t\tthis._startZoom = map.getZoom();\n\n\t\tthis._moved = false;\n\t\tthis._zooming = true;\n\n\t\tmap._stop();\n\n\t\ton(document, 'pointermove', this._onPointerMove, this);\n\t\ton(document, 'pointerup pointercancel', this._onPointerEnd, this);\n\n\t\tpreventDefault(e);\n\t}\n\n\t_onPointerMove(e) {\n\t\tconst pointers = getPointers();\n\t\tif (pointers.length !== 2 || !this._zooming) { return; }\n\n\t\tconst map = this._map,\n\t\tp1 = map.pointerEventToContainerPoint(pointers[0]),\n\t\tp2 = map.pointerEventToContainerPoint(pointers[1]),\n\t\tscale = p1.distanceTo(p2) / this._startDist;\n\n\t\tthis._zoom = map.getScaleZoom(scale, this._startZoom);\n\n\t\tif (!map.options.bounceAtZoomLimits && (\n\t\t\t(this._zoom < map.getMinZoom() && scale < 1) ||\n\t\t\t(this._zoom > map.getMaxZoom() && scale > 1))) {\n\t\t\tthis._zoom = map._limitZoom(this._zoom);\n\t\t}\n\n\t\tif (map.options.pinchZoom === 'center') {\n\t\t\tthis._center = this._startLatLng;\n\t\t\tif (scale === 1) { return; }\n\t\t} else {\n\t\t\t// Get delta from pinch to center, so centerLatLng is delta applied to initial pinchLatLng\n\t\t\tconst delta = p1._add(p2)._divideBy(2)._subtract(this._centerPoint);\n\t\t\tif (scale === 1 && delta.x === 0 && delta.y === 0) { return; }\n\t\t\tthis._center = map.unproject(map.project(this._pinchStartLatLng, this._zoom).subtract(delta), this._zoom);\n\t\t}\n\n\t\tif (!this._moved) {\n\t\t\tmap._moveStart(true, false);\n\t\t\tthis._moved = true;\n\t\t}\n\n\t\tcancelAnimationFrame(this._animRequest);\n\n\t\tconst moveFn = map._move.bind(map, this._center, this._zoom, {pinch: true, round: false}, undefined);\n\t\tthis._animRequest = requestAnimationFrame(moveFn.bind(this));\n\n\t\tpreventDefault(e);\n\t}\n\n\t_onPointerEnd() {\n\t\tif (!this._moved || !this._zooming) {\n\t\t\tthis._zooming = false;\n\t\t\treturn;\n\t\t}\n\n\t\tthis._zooming = false;\n\t\tcancelAnimationFrame(this._animRequest);\n\n\t\toff(document, 'pointermove', this._onPointerMove, this);\n\t\toff(document, 'pointerup pointercancel', this._onPointerEnd, this);\n\n\t\t// Pinch updates GridLayers' levels only when zoomSnap is off, so zoomSnap becomes noUpdate.\n\t\tif (this._map.options.zoomAnimation) {\n\t\t\tthis._map._animateZoom(this._center, this._map._limitZoom(this._zoom), true, this._map.options.zoomSnap);\n\t\t} else {\n\t\t\tthis._map._resetView(this._center, this._map._limitZoom(this._zoom));\n\t\t}\n\t}\n}\n\n// @section Handlers\n// @property pinchZoom: Handler\n// Pinch zoom handler.\nMap$1.addInitHook('addHandler', 'pinchZoom', PinchZoom);\n\n// Deprecated - Backward compatibility touchZoom\nMap$1.addInitHook(function () {\n\tthis.touchZoom = this.pinchZoom;\n\n\tif (this.options.touchZoom !== undefined) {\n\t\tconsole.warn('Map: touchZoom option is deprecated and will be removed in future versions. Use pinchZoom instead.');\n\t\tthis.options.pinchZoom = this.options.touchZoom;\n\t\tdelete this.options.touchZoom;\n\t}\n\tif (this.options.pinchZoom) {\n\t\tthis.pinchZoom.enable();\n\t} else {\n\t\tthis.pinchZoom.disable();\n\t}\n});\n\nMap$1.BoxZoom = BoxZoom;\nMap$1.DoubleClickZoom = DoubleClickZoom;\nMap$1.Drag = Drag;\nMap$1.Keyboard = Keyboard;\nMap$1.ScrollWheelZoom = ScrollWheelZoom;\nMap$1.TapHold = TapHold;\nMap$1.PinchZoom = PinchZoom;\nMap$1.TouchZoom = PinchZoom; // backward compatibility\n\n// !!! NEXT LINE IS AUTO-GENERATED VIA `NPM VERSION` !!!\r\nconst version = '2.0.0-alpha.1';\n\nvar L = {\n\t__proto__: null,\n\tBlanketOverlay: BlanketOverlay,\n\tBounds: Bounds,\n\tBrowser: Browser,\n\tCRS: CRS,\n\tCanvas: Canvas,\n\tCircle: Circle,\n\tCircleMarker: CircleMarker,\n\tClass: Class,\n\tControl: Control,\n\tDivIcon: DivIcon,\n\tDivOverlay: DivOverlay,\n\tDomEvent: DomEvent,\n\tDomUtil: DomUtil,\n\tDraggable: Draggable,\n\tEvented: Evented,\n\tFeatureGroup: FeatureGroup,\n\tGeoJSON: GeoJSON,\n\tGridLayer: GridLayer,\n\tHandler: Handler,\n\tIcon: Icon,\n\tImageOverlay: ImageOverlay,\n\tLatLng: LatLng,\n\tLatLngBounds: LatLngBounds,\n\tLayer: Layer,\n\tLayerGroup: LayerGroup,\n\tLeafletMap: LeafletMap,\n\tLineUtil: LineUtil,\n\tMap: Map$1,\n\tMarker: Marker,\n\tPath: Path,\n\tPoint: Point,\n\tPolyUtil: PolyUtil,\n\tPolygon: Polygon,\n\tPolyline: Polyline,\n\tPopup: Popup,\n\tPosAnimation: PosAnimation,\n\tProjection: index,\n\tRectangle: Rectangle,\n\tRenderer: Renderer,\n\tSVG: SVG,\n\tSVGOverlay: SVGOverlay,\n\tTileLayer: TileLayer,\n\tTooltip: Tooltip,\n\tTransformation: Transformation,\n\tUtil: Util,\n\tVideoOverlay: VideoOverlay,\n\tversion: version\n};\n\nconst oldL = getGlobalObject().L;\ngetGlobalObject().L = L;\ngetGlobalObject().L.noConflict = function () {\n\tgetGlobalObject().L = oldL;\n\treturn this;\n};\n\nfunction getGlobalObject() {\n\tif (typeof globalThis !== 'undefined') { return globalThis; }\n\tif (typeof self !== 'undefined') { return self; }\n\tif (typeof window !== 'undefined') { return window; }\n\tif (typeof global !== 'undefined') { return global; }\n\n\tthrow new Error('Unable to locate global object.');\n}\n\nexport { BlanketOverlay, Bounds, Browser, CRS, Canvas, Circle, CircleMarker, Class, Control, DivIcon, DivOverlay, DomEvent, DomUtil, Draggable, Evented, FeatureGroup, GeoJSON, GridLayer, Handler, Icon, ImageOverlay, LatLng, LatLngBounds, Layer, LayerGroup, LeafletMap, LineUtil, Map$1 as Map, Marker, Path, Point, PolyUtil, Polygon, Polyline, Popup, PosAnimation, index as Projection, Rectangle, Renderer, SVG, SVGOverlay, TileLayer, Tooltip, Transformation, Util, VideoOverlay, L as default, version };\n//# sourceMappingURL=leaflet-src.js.map\n"],"names":["lastId","stamp","obj","throttle","fn","time","context","lock","queuedArgs","later","wrapperFn","args","wrapNum","x","range","includeMax","max","min","d","falseFn","formatNum","num","precision","pow","splitWords","str","setOptions","options","i","templateRe","template","data","key","value","emptyImageUrl","Util","Class","statics","includes","props","NewClass","parentProto","proto","include","parentOptions","init","prototypes","current","hook","Evented","types","type","f","removeAll","_once","newListener","listeners","listener","index","propagate","event","l","_fn","p","e","Point","y","round","_x","_y","point","Bounds","a","b","points","min2","max2","bounds","xIntersects","yIntersects","xOverlaps","yOverlaps","bufferRatio","heightBuffer","widthBuffer","LatLngBounds","corner1","corner2","latlngs","latlng","sw","ne","sw2","ne2","LatLng","latIntersects","lngIntersects","latOverlaps","lngOverlaps","maxMargin","lat","lng","alt","_lat","_lng","_alt","other","Earth","sizeInMeters","latAccuracy","lngAccuracy","CRS","zoom","projectedPoint","scale","untransformedPoint","s","center","newCenter","latShift","lngShift","newSw","newNe","latlng1","latlng2","rad","lat1","lat2","sinDLat","sinDLon","c","earthRadius$1","SphericalMercator","sin","Transformation","EPSG3857","EPSG900913","chrome","userAgentContains","safari","mobile","pointer","touchNative","touch","retina","mac","linux","Browser","makeDblclick","ev","newEvent","delay","addDoubleTapListener","handler","last","detail","simDblclick","path","getPropagationPath","el","now","removeDoubleTapListener","handlers","get","id","create$1","tagName","className","container","toFront","parent","toBack","setTransform","offset","pos","positions","setPosition","getPosition","documentStyle","userSelectProp","prop","prevUserSelect","disableTextSelection","enableTextSelection","disableImageDrag","on","preventDefault","enableImageDrag","off","_outlineElement","_outlineStyle","preventOutline","element","restoreOutline","getSizedParentNode","getScale","rect","DomUtil","activePointers","initialized","enablePointerDetection","_onSet","_onUpdate","_onDelete","disablePointerDetection","getPointers","cleanupPointers","DomEvent_PointerEvents","addOne","eventsKey","batchRemove","removeOne","filterFn","pointerSubst","originalHandler","isExternalTarget","stopPropagation","disableScrollPropagation","disableClickPropagation","stop","getPointerPosition","getWheelPxFactor","ratio","getWheelDelta","related","DomEvent","PosAnimation","newPos","duration","easeLinearity","elapsed","progress","_a","Map$1","delta","viewHalf","containerPoint","centerOffset","paddingTL","paddingBR","paddingOffset","swPoint","nePoint","target","targetCenter","targetZoom","from","to","size","startZoom","w0","w1","u1","rho","rho2","r","s1","s2","t1","b1","sq","sinh","n","cosh","tanh","r0","w","u","easeOut","t","start","S","frame","oldZoom","pixelCenter","pixelPoint","pixelBounds","paddedBounds","paddedSize","oldSize","newSize","oldCenter","onResponse","onError","error","message","name","HandlerClass","layer","pane","inside","padding","nw","se","boundsSize","snap","scalex","scaley","topLeftPoint","toZoom","fromZoom","crs","layerPoint","classes","position","panes","noMoveStart","loading","zoomChanged","supressEvent","remove","targets","src","dragging","isHover","canvasTargets","isMarker","callback","topLeft","latLngBounds","centerPoint","viewBounds","newBounds","pxBounds","maxBounds","projectedMaxBounds","minOffset","maxOffset","dx","dy","left","right","transform","z","startAnim","noUpdate","__publicField","LeafletMap","_Control","map","corner","Control","control","corners","createCorner","vSide","hSide","_Layers","baseLayers","overlays","acceptableHeight","collapsed","section","link","overlay","baseLayersPresent","overlaysPresent","baseLayersCount","label","checked","input","holder","inputs","addedLayers","removedLayers","layerA","layerB","nameA","nameB","Layers","_Zoom","zoomName","html","title","Zoom","_Scale","maxMeters","meters","maxFeet","maxMiles","miles","feet","text","pow10","Scale","ukrainianFlag","_Attribution","prefix","attribs","prefixAndAttribs","Attribution","Handler","_Draggable","dragStartTarget","sizedParent","noInertia","fireDragend","Draggable","clipPolygon","clippedPoints","j","k","len","edge","edges","_getBitCode","_getEdgeIntersection","polygonCenter","p1","p2","area","isFlat","centroidLatLng","centroid","latlngCenter","coords","latSum","lngSum","coord","PolyUtil","simplify","tolerance","sqTolerance","_reducePoints","_simplifyDP","pointToSegmentDistance","_sqClosestPointOnSegment","closestPointOnSegment","markers","_simplifyDPStep","newPoints","first","maxSqDist","sqDist","reducedPoints","prev","_sqDist","_lastCode","clipSegment","useLastCode","codeA","codeB","codeOut","newCode","code","dot","polylineCenter","halfDist","segDist","dist","LineUtil","LonLat","earthRadius","Mercator","tmp","con","ts","phi","dphi","EPSG3395","EPSG4326","Simple","_Layer","targetEl","events","Layer","method","layers","minZoom","maxZoom","oldZoomSpan","LayerGroup","methodName","zIndex","FeatureGroup","style","_Icon","oldIcon","img","sizeOption","anchorPosition","anchor","Icon","_IconDefault","url","strip","re","idx","match","IconDefault","MarkerDrag","marker","icon","speed","iconPos","origin","panBounds","movement","shadow","_Marker","oldLatLng","classToAdd","addIcon","newShadow","addShadow","opt","draggable","opacity","iconOpts","Marker","_Path","Path","_CircleMarker","radius","r2","CircleMarker","Circle","half","latR","top","bottom","lngR","_Polyline","minDistance","minPoint","closest","result","flat","projectedBounds","ring","parts","len2","segment","closed","part","Polyline","_Polygon","clipped","Polygon","GeoJSON","geojson","features","feature","geometryToLayer","asFeature","geometry","pointToLayer","_coordsToLatLng","coordsToLatLng","_pointToLayer","coordsToLatLngs","g","geoLayer","featureLayer","pointToLayerFn","levelsDeep","latLngToCoords","latLngsToCoords","close","getFeature","newGeometry","PointToGeoJSON","multi","holes","isGeometryCollection","jsons","json","_BlanketOverlay","currentCenterPoint","topLeftOffset","BlanketOverlay","_ImageOverlay","styleOpts","wasElementSupplied","image","errorUrl","ImageOverlay","_VideoOverlay","vid","sourceElements","sources","source","VideoOverlay","SVGOverlay","_DivOverlay","content","node","DivOverlay","OverlayClass","old","_Popup","wrapper","closeButton","entries","height","maxHeight","scrolledClass","marginBottom","containerHeight","containerWidth","layerPos","containerPos","Popup","popup","_Tooltip","subX","subY","direction","tooltipPoint","tooltipWidth","tooltipHeight","Tooltip","tooltip","onOff","_DivIcon","div","bgPos","DivIcon","_GridLayer","tileZoom","compare","edgeZIndex","nextFrame","willPrune","tile","fade","level","x2","y2","z2","coords2","animating","noPrune","tileZoomChanged","translate","tileSize","mapZoom","halfSize","tileRange","tileCenter","queue","margin","noPruneRange","fragment","q","tileBounds","nwPoint","sePoint","bp","tilePos","err","newCoords","GridLayer","_TileLayer","urlHostname","host","noRedraw","done","invertedY","zoomReverse","zoomOffset","tilePoint","TileLayer","_TileLayerWMS","wmsParams","realRetina","projectionKey","bbox","v","params","TileLayerWMS","Renderer","_Canvas","m","order","next","ctx","p0","clickedLayer","candidateHoveredLayer","Canvas","svgCreate","pointsToPath","rings","create","SVG","arc","renderer","Rectangle","BoxZoom","DoubleClickZoom","Drag","pxCenter","pxWorldCenter","threshold","limit","worldWidth","halfWidth","newX1","newX2","newX","ease","speedVector","limitedSpeed","limitedSpeedVector","decelerationDuration","Keyboard","body","docEl","panDelta","keys","codes","zoomDelta","newLatLng","ScrollWheelZoom","debounce","d2","d3","d4","tapHoldDelay","TapHold","_cancelClickPrevent","simulatedEvent","PinchZoom","pointers","moveFn","version","L","oldL","getGlobalObject"],"mappings":";;;AAaA,IAAIA,KAAS;AAIb,SAASC,EAAMC,GAAK;AACnB,SAAM,iBAAiBA,MACtBA,EAAI,cAAiB,EAAEF,KAEjBE,EAAI;AACZ;AAQA,SAASC,GAASC,GAAIC,GAAMC,GAAS;AACpC,MAAIC,GAAMC;AAEV,WAASC,IAAQ;AAEhB,IAAAF,IAAO,IACHC,MACHE,EAAU,MAAMJ,GAASE,CAAU,GACnCA,IAAa;AAAA,EAEf;AAEA,WAASE,KAAaC,GAAM;AAC3B,IAAIJ,IAEHC,IAAaG,KAIbP,EAAG,MAAME,GAASK,CAAI,GACtB,WAAWF,GAAOJ,CAAI,GACtBE,IAAO;AAAA,EAET;AAEA,SAAOG;AACR;AAMA,SAASE,GAAQC,GAAGC,GAAOC,GAAY;AACtC,QAAMC,IAAMF,EAAM,CAAC,GACnBG,IAAMH,EAAM,CAAC,GACbI,IAAIF,IAAMC;AACV,SAAOJ,MAAMG,KAAOD,IAAaF,MAAMA,IAAII,KAAOC,IAAIA,KAAKA,IAAID;AAChE;AAIA,SAASE,IAAU;AAAE,SAAO;AAAO;AAMnC,SAASC,EAAUC,GAAKC,GAAW;AAClC,MAAIA,MAAc;AA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