-{"version":3,"file":"bundle.js","sources":["../../.yarn/cache/svelte-npm-3.46.4-01ad7797d1-a702b4216e.zip/node_modules/svelte/internal/index.mjs","../../.yarn/$$virtual/bootstrap-virtual-92acbd27a6/0/cache/bootstrap-npm-5.1.3-691fdc19a6-7d5d67897c.zip/node_modules/bootstrap/dist/js/bootstrap.bundle.js","../../.yarn/cache/svelte-npm-3.46.4-01ad7797d1-a702b4216e.zip/node_modules/svelte/store/index.mjs","../../src/lib/stores.js","../../src/components/Footer.svelte","../../src/lib/api_utils.js","../../src/components/PageLink.svelte","../../src/components/ReverseLink.svelte","../../.yarn/cache/timeago.js-npm-4.0.2-e87d64f9a3-7c5bb9d45f.zip/node_modules/timeago.js/esm/lang/en_US.js","../../.yarn/cache/timeago.js-npm-4.0.2-e87d64f9a3-7c5bb9d45f.zip/node_modules/timeago.js/esm/lang/zh_CN.js","../../.yarn/cache/timeago.js-npm-4.0.2-e87d64f9a3-7c5bb9d45f.zip/node_modules/timeago.js/esm/register.js","../../.yarn/cache/timeago.js-npm-4.0.2-e87d64f9a3-7c5bb9d45f.zip/node_modules/timeago.js/esm/utils/date.js","../../.yarn/cache/timeago.js-npm-4.0.2-e87d64f9a3-7c5bb9d45f.zip/node_modules/timeago.js/esm/format.js","../../src/components/LastUpdated.svelte","../../.yarn/cache/timeago.js-npm-4.0.2-e87d64f9a3-7c5bb9d45f.zip/node_modules/timeago.js/esm/index.js","../../src/components/Error.svelte","../../src/components/Header.svelte","../../src/components/UrlSubmitForm.svelte","../../src/components/SearchSection.svelte","../../.yarn/cache/escape-html-npm-1.0.3-376c22ee74-900a7f2b80.zip/node_modules/escape-html/index.js","../../src/lib/helpers.js","../../src/components/DetailsLink.svelte","../../src/components/Welcome.svelte","../../src/components/MapIcon.svelte","../../src/components/ResultsList.svelte","../../.yarn/cache/leaflet-npm-1.7.1-dc40ced5a1-7a841174dc.zip/node_modules/leaflet/dist/leaflet-src.js","../../src/components/MapPosition.svelte","../../.yarn/cache/leaflet-minimap-npm-3.6.1-945fa818a3-ac48b72b86.zip/node_modules/leaflet-minimap/dist/Control.MiniMap.min.js","../../src/components/Map.svelte","../../src/pages/SearchPage.svelte","../../src/components/SearchSectionReverse.svelte","../../src/pages/ReversePage.svelte","../../src/components/SearchSectionDetails.svelte","../../src/components/DetailsOneRow.svelte","../../src/components/DetailsPostcodeHint.svelte","../../src/components/DetailsInfoRow.svelte","../../src/components/DetailsInfoRowList.svelte","../../src/pages/DetailsPage.svelte","../../src/pages/PolygonsPage.svelte","../../src/pages/DeletablePage.svelte","../../src/pages/StatusPage.svelte","../../src/pages/AboutPage.svelte","../../src/App.svelte","../../src/main.js"],"sourcesContent":["function noop() { }\nconst identity = x => x;\nfunction assign(tar, src) {\n // @ts-ignore\n for (const k in src)\n tar[k] = src[k];\n return tar;\n}\nfunction is_promise(value) {\n return value && typeof value === 'object' && typeof value.then === 'function';\n}\nfunction add_location(element, file, line, column, char) {\n element.__svelte_meta = {\n loc: { file, line, column, char }\n };\n}\nfunction run(fn) {\n return fn();\n}\nfunction blank_object() {\n return Object.create(null);\n}\nfunction run_all(fns) {\n fns.forEach(run);\n}\nfunction is_function(thing) {\n return typeof thing === 'function';\n}\nfunction safe_not_equal(a, b) {\n return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');\n}\nlet src_url_equal_anchor;\nfunction src_url_equal(element_src, url) {\n if (!src_url_equal_anchor) {\n src_url_equal_anchor = document.createElement('a');\n }\n src_url_equal_anchor.href = url;\n return element_src === src_url_equal_anchor.href;\n}\nfunction not_equal(a, b) {\n return a != a ? b == b : a !== b;\n}\nfunction is_empty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction validate_store(store, name) {\n if (store != null && typeof store.subscribe !== 'function') {\n throw new Error(`'${name}' is not a store with a 'subscribe' method`);\n }\n}\nfunction subscribe(store, ...callbacks) {\n if (store == null) {\n return noop;\n }\n const unsub = store.subscribe(...callbacks);\n return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\nfunction get_store_value(store) {\n let value;\n subscribe(store, _ => value = _)();\n return value;\n}\nfunction component_subscribe(component, store, callback) {\n component.$$.on_destroy.push(subscribe(store, callback));\n}\nfunction create_slot(definition, ctx, $$scope, fn) {\n if (definition) {\n const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n return definition[0](slot_ctx);\n }\n}\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n return definition[1] && fn\n ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))\n : $$scope.ctx;\n}\nfunction get_slot_changes(definition, $$scope, dirty, fn) {\n if (definition[2] && fn) {\n const lets = definition[2](fn(dirty));\n if ($$scope.dirty === undefined) {\n return lets;\n }\n if (typeof lets === 'object') {\n const merged = [];\n const len = Math.max($$scope.dirty.length, lets.length);\n for (let i = 0; i < len; i += 1) {\n merged[i] = $$scope.dirty[i] | lets[i];\n }\n return merged;\n }\n return $$scope.dirty | lets;\n }\n return $$scope.dirty;\n}\nfunction update_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn) {\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\n}\nfunction update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n update_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn);\n}\nfunction get_all_dirty_from_scope($$scope) {\n if ($$scope.ctx.length > 32) {\n const dirty = [];\n const length = $$scope.ctx.length / 32;\n for (let i = 0; i < length; i++) {\n dirty[i] = -1;\n }\n return dirty;\n }\n return -1;\n}\nfunction exclude_internal_props(props) {\n const result = {};\n for (const k in props)\n if (k[0] !== '$')\n result[k] = props[k];\n return result;\n}\nfunction compute_rest_props(props, keys) {\n const rest = {};\n keys = new Set(keys);\n for (const k in props)\n if (!keys.has(k) && k[0] !== '$')\n rest[k] = props[k];\n return rest;\n}\nfunction compute_slots(slots) {\n const result = {};\n for (const key in slots) {\n result[key] = true;\n }\n return result;\n}\nfunction once(fn) {\n let ran = false;\n return function (...args) {\n if (ran)\n return;\n ran = true;\n fn.call(this, ...args);\n };\n}\nfunction null_to_empty(value) {\n return value == null ? '' : value;\n}\nfunction set_store_value(store, ret, value) {\n store.set(value);\n return ret;\n}\nconst has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\nfunction action_destroyer(action_result) {\n return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\n\nconst is_client = typeof window !== 'undefined';\nlet now = is_client\n ? () => window.performance.now()\n : () => Date.now();\nlet raf = is_client ? cb => requestAnimationFrame(cb) : noop;\n// used internally for testing\nfunction set_now(fn) {\n now = fn;\n}\nfunction set_raf(fn) {\n raf = fn;\n}\n\nconst tasks = new Set();\nfunction run_tasks(now) {\n tasks.forEach(task => {\n if (!task.c(now)) {\n tasks.delete(task);\n task.f();\n }\n });\n if (tasks.size !== 0)\n raf(run_tasks);\n}\n/**\n * For testing purposes only!\n */\nfunction clear_loops() {\n tasks.clear();\n}\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n */\nfunction loop(callback) {\n let task;\n if (tasks.size === 0)\n raf(run_tasks);\n return {\n promise: new Promise(fulfill => {\n tasks.add(task = { c: callback, f: fulfill });\n }),\n abort() {\n tasks.delete(task);\n }\n };\n}\n\n// Track which nodes are claimed during hydration. Unclaimed nodes can then be removed from the DOM\n// at the end of hydration without touching the remaining nodes.\nlet is_hydrating = false;\nfunction start_hydrating() {\n is_hydrating = true;\n}\nfunction end_hydrating() {\n is_hydrating = false;\n}\nfunction upper_bound(low, high, key, value) {\n // Return first index of value larger than input value in the range [low, high)\n while (low < high) {\n const mid = low + ((high - low) >> 1);\n if (key(mid) <= value) {\n low = mid + 1;\n }\n else {\n high = mid;\n }\n }\n return low;\n}\nfunction init_hydrate(target) {\n if (target.hydrate_init)\n return;\n target.hydrate_init = true;\n // We know that all children have claim_order values since the unclaimed have been detached if target is not <head>\n let children = target.childNodes;\n // If target is <head>, there may be children without claim_order\n if (target.nodeName === 'HEAD') {\n const myChildren = [];\n for (let i = 0; i < children.length; i++) {\n const node = children[i];\n if (node.claim_order !== undefined) {\n myChildren.push(node);\n }\n }\n children = myChildren;\n }\n /*\n * Reorder claimed children optimally.\n * We can reorder claimed children optimally by finding the longest subsequence of\n * nodes that are already claimed in order and only moving the rest. The longest\n * subsequence subsequence of nodes that are claimed in order can be found by\n * computing the longest increasing subsequence of .claim_order values.\n *\n * This algorithm is optimal in generating the least amount of reorder operations\n * possible.\n *\n * Proof:\n * We know that, given a set of reordering operations, the nodes that do not move\n * always form an increasing subsequence, since they do not move among each other\n * meaning that they must be already ordered among each other. Thus, the maximal\n * set of nodes that do not move form a longest increasing subsequence.\n */\n // Compute longest increasing subsequence\n // m: subsequence length j => index k of smallest value that ends an increasing subsequence of length j\n const m = new Int32Array(children.length + 1);\n // Predecessor indices + 1\n const p = new Int32Array(children.length);\n m[0] = -1;\n let longest = 0;\n for (let i = 0; i < children.length; i++) {\n const current = children[i].claim_order;\n // Find the largest subsequence length such that it ends in a value less than our current value\n // upper_bound returns first greater value, so we subtract one\n // with fast path for when we are on the current longest subsequence\n const seqLen = ((longest > 0 && children[m[longest]].claim_order <= current) ? longest + 1 : upper_bound(1, longest, idx => children[m[idx]].claim_order, current)) - 1;\n p[i] = m[seqLen] + 1;\n const newLen = seqLen + 1;\n // We can guarantee that current is the smallest value. Otherwise, we would have generated a longer sequence.\n m[newLen] = i;\n longest = Math.max(newLen, longest);\n }\n // The longest increasing subsequence of nodes (initially reversed)\n const lis = [];\n // The rest of the nodes, nodes that will be moved\n const toMove = [];\n let last = children.length - 1;\n for (let cur = m[longest] + 1; cur != 0; cur = p[cur - 1]) {\n lis.push(children[cur - 1]);\n for (; last >= cur; last--) {\n toMove.push(children[last]);\n }\n last--;\n }\n for (; last >= 0; last--) {\n toMove.push(children[last]);\n }\n lis.reverse();\n // We sort the nodes being moved to guarantee that their insertion order matches the claim order\n toMove.sort((a, b) => a.claim_order - b.claim_order);\n // Finally, we move the nodes\n for (let i = 0, j = 0; i < toMove.length; i++) {\n while (j < lis.length && toMove[i].claim_order >= lis[j].claim_order) {\n j++;\n }\n const anchor = j < lis.length ? lis[j] : null;\n target.insertBefore(toMove[i], anchor);\n }\n}\nfunction append(target, node) {\n target.appendChild(node);\n}\nfunction append_styles(target, style_sheet_id, styles) {\n const append_styles_to = get_root_for_style(target);\n if (!append_styles_to.getElementById(style_sheet_id)) {\n const style = element('style');\n style.id = style_sheet_id;\n style.textContent = styles;\n append_stylesheet(append_styles_to, style);\n }\n}\nfunction get_root_for_style(node) {\n if (!node)\n return document;\n const root = node.getRootNode ? node.getRootNode() : node.ownerDocument;\n if (root && root.host) {\n return root;\n }\n return node.ownerDocument;\n}\nfunction append_empty_stylesheet(node) {\n const style_element = element('style');\n append_stylesheet(get_root_for_style(node), style_element);\n return style_element.sheet;\n}\nfunction append_stylesheet(node, style) {\n append(node.head || node, style);\n}\nfunction append_hydration(target, node) {\n if (is_hydrating) {\n init_hydrate(target);\n if ((target.actual_end_child === undefined) || ((target.actual_end_child !== null) && (target.actual_end_child.parentElement !== target))) {\n target.actual_end_child = target.firstChild;\n }\n // Skip nodes of undefined ordering\n while ((target.actual_end_child !== null) && (target.actual_end_child.claim_order === undefined)) {\n target.actual_end_child = target.actual_end_child.nextSibling;\n }\n if (node !== target.actual_end_child) {\n // We only insert if the ordering of this node should be modified or the parent node is not target\n if (node.claim_order !== undefined || node.parentNode !== target) {\n target.insertBefore(node, target.actual_end_child);\n }\n }\n else {\n target.actual_end_child = node.nextSibling;\n }\n }\n else if (node.parentNode !== target || node.nextSibling !== null) {\n target.appendChild(node);\n }\n}\nfunction insert(target, node, anchor) {\n target.insertBefore(node, anchor || null);\n}\nfunction insert_hydration(target, node, anchor) {\n if (is_hydrating && !anchor) {\n append_hydration(target, node);\n }\n else if (node.parentNode !== target || node.nextSibling != anchor) {\n target.insertBefore(node, anchor || null);\n }\n}\nfunction detach(node) {\n node.parentNode.removeChild(node);\n}\nfunction destroy_each(iterations, detaching) {\n for (let i = 0; i < iterations.length; i += 1) {\n if (iterations[i])\n iterations[i].d(detaching);\n }\n}\nfunction element(name) {\n return document.createElement(name);\n}\nfunction element_is(name, is) {\n return document.createElement(name, { is });\n}\nfunction object_without_properties(obj, exclude) {\n const target = {};\n for (const k in obj) {\n if (has_prop(obj, k)\n // @ts-ignore\n && exclude.indexOf(k) === -1) {\n // @ts-ignore\n target[k] = obj[k];\n }\n }\n return target;\n}\nfunction svg_element(name) {\n return document.createElementNS('http://www.w3.org/2000/svg', name);\n}\nfunction text(data) {\n return document.createTextNode(data);\n}\nfunction space() {\n return text(' ');\n}\nfunction empty() {\n return text('');\n}\nfunction listen(node, event, handler, options) {\n node.addEventListener(event, handler, options);\n return () => node.removeEventListener(event, handler, options);\n}\nfunction prevent_default(fn) {\n return function (event) {\n event.preventDefault();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction stop_propagation(fn) {\n return function (event) {\n event.stopPropagation();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction self(fn) {\n return function (event) {\n // @ts-ignore\n if (event.target === this)\n fn.call(this, event);\n };\n}\nfunction trusted(fn) {\n return function (event) {\n // @ts-ignore\n if (event.isTrusted)\n fn.call(this, event);\n };\n}\nfunction attr(node, attribute, value) {\n if (value == null)\n node.removeAttribute(attribute);\n else if (node.getAttribute(attribute) !== value)\n node.setAttribute(attribute, value);\n}\nfunction set_attributes(node, attributes) {\n // @ts-ignore\n const descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n for (const key in attributes) {\n if (attributes[key] == null) {\n node.removeAttribute(key);\n }\n else if (key === 'style') {\n node.style.cssText = attributes[key];\n }\n else if (key === '__value') {\n node.value = node[key] = attributes[key];\n }\n else if (descriptors[key] && descriptors[key].set) {\n node[key] = attributes[key];\n }\n else {\n attr(node, key, attributes[key]);\n }\n }\n}\nfunction set_svg_attributes(node, attributes) {\n for (const key in attributes) {\n attr(node, key, attributes[key]);\n }\n}\nfunction set_custom_element_data(node, prop, value) {\n if (prop in node) {\n node[prop] = typeof node[prop] === 'boolean' && value === '' ? true : value;\n }\n else {\n attr(node, prop, value);\n }\n}\nfunction xlink_attr(node, attribute, value) {\n node.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\nfunction get_binding_group_value(group, __value, checked) {\n const value = new Set();\n for (let i = 0; i < group.length; i += 1) {\n if (group[i].checked)\n value.add(group[i].__value);\n }\n if (!checked) {\n value.delete(__value);\n }\n return Array.from(value);\n}\nfunction to_number(value) {\n return value === '' ? null : +value;\n}\nfunction time_ranges_to_array(ranges) {\n const array = [];\n for (let i = 0; i < ranges.length; i += 1) {\n array.push({ start: ranges.start(i), end: ranges.end(i) });\n }\n return array;\n}\nfunction children(element) {\n return Array.from(element.childNodes);\n}\nfunction init_claim_info(nodes) {\n if (nodes.claim_info === undefined) {\n nodes.claim_info = { last_index: 0, total_claimed: 0 };\n }\n}\nfunction claim_node(nodes, predicate, processNode, createNode, dontUpdateLastIndex = false) {\n // Try to find nodes in an order such that we lengthen the longest increasing subsequence\n init_claim_info(nodes);\n const resultNode = (() => {\n // We first try to find an element after the previous one\n for (let i = nodes.claim_info.last_index; i < nodes.length; i++) {\n const node = nodes[i];\n if (predicate(node)) {\n const replacement = processNode(node);\n if (replacement === undefined) {\n nodes.splice(i, 1);\n }\n else {\n nodes[i] = replacement;\n }\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n return node;\n }\n }\n // Otherwise, we try to find one before\n // We iterate in reverse so that we don't go too far back\n for (let i = nodes.claim_info.last_index - 1; i >= 0; i--) {\n const node = nodes[i];\n if (predicate(node)) {\n const replacement = processNode(node);\n if (replacement === undefined) {\n nodes.splice(i, 1);\n }\n else {\n nodes[i] = replacement;\n }\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n else if (replacement === undefined) {\n // Since we spliced before the last_index, we decrease it\n nodes.claim_info.last_index--;\n }\n return node;\n }\n }\n // If we can't find any matching node, we create a new one\n return createNode();\n })();\n resultNode.claim_order = nodes.claim_info.total_claimed;\n nodes.claim_info.total_claimed += 1;\n return resultNode;\n}\nfunction claim_element_base(nodes, name, attributes, create_element) {\n return claim_node(nodes, (node) => node.nodeName === name, (node) => {\n const remove = [];\n for (let j = 0; j < node.attributes.length; j++) {\n const attribute = node.attributes[j];\n if (!attributes[attribute.name]) {\n remove.push(attribute.name);\n }\n }\n remove.forEach(v => node.removeAttribute(v));\n return undefined;\n }, () => create_element(name));\n}\nfunction claim_element(nodes, name, attributes) {\n return claim_element_base(nodes, name, attributes, element);\n}\nfunction claim_svg_element(nodes, name, attributes) {\n return claim_element_base(nodes, name, attributes, svg_element);\n}\nfunction claim_text(nodes, data) {\n return claim_node(nodes, (node) => node.nodeType === 3, (node) => {\n const dataStr = '' + data;\n if (node.data.startsWith(dataStr)) {\n if (node.data.length !== dataStr.length) {\n return node.splitText(dataStr.length);\n }\n }\n else {\n node.data = dataStr;\n }\n }, () => text(data), true // Text nodes should not update last index since it is likely not worth it to eliminate an increasing subsequence of actual elements\n );\n}\nfunction claim_space(nodes) {\n return claim_text(nodes, ' ');\n}\nfunction find_comment(nodes, text, start) {\n for (let i = start; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeType === 8 /* comment node */ && node.textContent.trim() === text) {\n return i;\n }\n }\n return nodes.length;\n}\nfunction claim_html_tag(nodes) {\n // find html opening tag\n const start_index = find_comment(nodes, 'HTML_TAG_START', 0);\n const end_index = find_comment(nodes, 'HTML_TAG_END', start_index);\n if (start_index === end_index) {\n return new HtmlTagHydration();\n }\n init_claim_info(nodes);\n const html_tag_nodes = nodes.splice(start_index, end_index - start_index + 1);\n detach(html_tag_nodes[0]);\n detach(html_tag_nodes[html_tag_nodes.length - 1]);\n const claimed_nodes = html_tag_nodes.slice(1, html_tag_nodes.length - 1);\n for (const n of claimed_nodes) {\n n.claim_order = nodes.claim_info.total_claimed;\n nodes.claim_info.total_claimed += 1;\n }\n return new HtmlTagHydration(claimed_nodes);\n}\nfunction set_data(text, data) {\n data = '' + data;\n if (text.wholeText !== data)\n text.data = data;\n}\nfunction set_input_value(input, value) {\n input.value = value == null ? '' : value;\n}\nfunction set_input_type(input, type) {\n try {\n input.type = type;\n }\n catch (e) {\n // do nothing\n }\n}\nfunction set_style(node, key, value, important) {\n if (value === null) {\n node.style.removeProperty(key);\n }\n else {\n node.style.setProperty(key, value, important ? 'important' : '');\n }\n}\nfunction select_option(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n if (option.__value === value) {\n option.selected = true;\n return;\n }\n }\n select.selectedIndex = -1; // no option should be selected\n}\nfunction select_options(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n option.selected = ~value.indexOf(option.__value);\n }\n}\nfunction select_value(select) {\n const selected_option = select.querySelector(':checked') || select.options[0];\n return selected_option && selected_option.__value;\n}\nfunction select_multiple_value(select) {\n return [].map.call(select.querySelectorAll(':checked'), option => option.__value);\n}\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\nlet crossorigin;\nfunction is_crossorigin() {\n if (crossorigin === undefined) {\n crossorigin = false;\n try {\n if (typeof window !== 'undefined' && window.parent) {\n void window.parent.document;\n }\n }\n catch (error) {\n crossorigin = true;\n }\n }\n return crossorigin;\n}\nfunction add_resize_listener(node, fn) {\n const computed_style = getComputedStyle(node);\n if (computed_style.position === 'static') {\n node.style.position = 'relative';\n }\n const iframe = element('iframe');\n iframe.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' +\n 'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;');\n iframe.setAttribute('aria-hidden', 'true');\n iframe.tabIndex = -1;\n const crossorigin = is_crossorigin();\n let unsubscribe;\n if (crossorigin) {\n iframe.src = \"data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}</script>\";\n unsubscribe = listen(window, 'message', (event) => {\n if (event.source === iframe.contentWindow)\n fn();\n });\n }\n else {\n iframe.src = 'about:blank';\n iframe.onload = () => {\n unsubscribe = listen(iframe.contentWindow, 'resize', fn);\n };\n }\n append(node, iframe);\n return () => {\n if (crossorigin) {\n unsubscribe();\n }\n else if (unsubscribe && iframe.contentWindow) {\n unsubscribe();\n }\n detach(iframe);\n };\n}\nfunction toggle_class(element, name, toggle) {\n element.classList[toggle ? 'add' : 'remove'](name);\n}\nfunction custom_event(type, detail, bubbles = false) {\n const e = document.createEvent('CustomEvent');\n e.initCustomEvent(type, bubbles, false, detail);\n return e;\n}\nfunction query_selector_all(selector, parent = document.body) {\n return Array.from(parent.querySelectorAll(selector));\n}\nclass HtmlTag {\n constructor() {\n this.e = this.n = null;\n }\n c(html) {\n this.h(html);\n }\n m(html, target, anchor = null) {\n if (!this.e) {\n this.e = element(target.nodeName);\n this.t = target;\n this.c(html);\n }\n this.i(anchor);\n }\n h(html) {\n this.e.innerHTML = html;\n this.n = Array.from(this.e.childNodes);\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert(this.t, this.n[i], anchor);\n }\n }\n p(html) {\n this.d();\n this.h(html);\n this.i(this.a);\n }\n d() {\n this.n.forEach(detach);\n }\n}\nclass HtmlTagHydration extends HtmlTag {\n constructor(claimed_nodes) {\n super();\n this.e = this.n = null;\n this.l = claimed_nodes;\n }\n c(html) {\n if (this.l) {\n this.n = this.l;\n }\n else {\n super.c(html);\n }\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert_hydration(this.t, this.n[i], anchor);\n }\n }\n}\nfunction attribute_to_object(attributes) {\n const result = {};\n for (const attribute of attributes) {\n result[attribute.name] = attribute.value;\n }\n return result;\n}\nfunction get_custom_elements_slots(element) {\n const result = {};\n element.childNodes.forEach((node) => {\n result[node.slot || 'default'] = true;\n });\n return result;\n}\n\n// we need to store the information for multiple documents because a Svelte application could also contain iframes\n// https://github.com/sveltejs/svelte/issues/3624\nconst managed_styles = new Map();\nlet active = 0;\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\nfunction hash(str) {\n let hash = 5381;\n let i = str.length;\n while (i--)\n hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n return hash >>> 0;\n}\nfunction create_style_information(doc, node) {\n const info = { stylesheet: append_empty_stylesheet(node), rules: {} };\n managed_styles.set(doc, info);\n return info;\n}\nfunction create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {\n const step = 16.666 / duration;\n let keyframes = '{\\n';\n for (let p = 0; p <= 1; p += step) {\n const t = a + (b - a) * ease(p);\n keyframes += p * 100 + `%{${fn(t, 1 - t)}}\\n`;\n }\n const rule = keyframes + `100% {${fn(b, 1 - b)}}\\n}`;\n const name = `__svelte_${hash(rule)}_${uid}`;\n const doc = get_root_for_style(node);\n const { stylesheet, rules } = managed_styles.get(doc) || create_style_information(doc, node);\n if (!rules[name]) {\n rules[name] = true;\n stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);\n }\n const animation = node.style.animation || '';\n node.style.animation = `${animation ? `${animation}, ` : ''}${name} ${duration}ms linear ${delay}ms 1 both`;\n active += 1;\n return name;\n}\nfunction delete_rule(node, name) {\n const previous = (node.style.animation || '').split(', ');\n const next = previous.filter(name\n ? anim => anim.indexOf(name) < 0 // remove specific animation\n : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n );\n const deleted = previous.length - next.length;\n if (deleted) {\n node.style.animation = next.join(', ');\n active -= deleted;\n if (!active)\n clear_rules();\n }\n}\nfunction clear_rules() {\n raf(() => {\n if (active)\n return;\n managed_styles.forEach(info => {\n const { stylesheet } = info;\n let i = stylesheet.cssRules.length;\n while (i--)\n stylesheet.deleteRule(i);\n info.rules = {};\n });\n managed_styles.clear();\n });\n}\n\nfunction create_animation(node, from, fn, params) {\n if (!from)\n return noop;\n const to = node.getBoundingClientRect();\n if (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom)\n return noop;\n const { delay = 0, duration = 300, easing = identity, \n // @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation?\n start: start_time = now() + delay, \n // @ts-ignore todo:\n end = start_time + duration, tick = noop, css } = fn(node, { from, to }, params);\n let running = true;\n let started = false;\n let name;\n function start() {\n if (css) {\n name = create_rule(node, 0, 1, duration, delay, easing, css);\n }\n if (!delay) {\n started = true;\n }\n }\n function stop() {\n if (css)\n delete_rule(node, name);\n running = false;\n }\n loop(now => {\n if (!started && now >= start_time) {\n started = true;\n }\n if (started && now >= end) {\n tick(1, 0);\n stop();\n }\n if (!running) {\n return false;\n }\n if (started) {\n const p = now - start_time;\n const t = 0 + 1 * easing(p / duration);\n tick(t, 1 - t);\n }\n return true;\n });\n start();\n tick(0, 1);\n return stop;\n}\nfunction fix_position(node) {\n const style = getComputedStyle(node);\n if (style.position !== 'absolute' && style.position !== 'fixed') {\n const { width, height } = style;\n const a = node.getBoundingClientRect();\n node.style.position = 'absolute';\n node.style.width = width;\n node.style.height = height;\n add_transform(node, a);\n }\n}\nfunction add_transform(node, a) {\n const b = node.getBoundingClientRect();\n if (a.left !== b.left || a.top !== b.top) {\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n node.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;\n }\n}\n\nlet current_component;\nfunction set_current_component(component) {\n current_component = component;\n}\nfunction get_current_component() {\n if (!current_component)\n throw new Error('Function called outside component initialization');\n return current_component;\n}\nfunction beforeUpdate(fn) {\n get_current_component().$$.before_update.push(fn);\n}\nfunction onMount(fn) {\n get_current_component().$$.on_mount.push(fn);\n}\nfunction afterUpdate(fn) {\n get_current_component().$$.after_update.push(fn);\n}\nfunction onDestroy(fn) {\n get_current_component().$$.on_destroy.push(fn);\n}\nfunction createEventDispatcher() {\n const component = get_current_component();\n return (type, detail) => {\n const callbacks = component.$$.callbacks[type];\n if (callbacks) {\n // TODO are there situations where events could be dispatched\n // in a server (non-DOM) environment?\n const event = custom_event(type, detail);\n callbacks.slice().forEach(fn => {\n fn.call(component, event);\n });\n }\n };\n}\nfunction setContext(key, context) {\n get_current_component().$$.context.set(key, context);\n}\nfunction getContext(key) {\n return get_current_component().$$.context.get(key);\n}\nfunction getAllContexts() {\n return get_current_component().$$.context;\n}\nfunction hasContext(key) {\n return get_current_component().$$.context.has(key);\n}\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\nfunction bubble(component, event) {\n const callbacks = component.$$.callbacks[event.type];\n if (callbacks) {\n // @ts-ignore\n callbacks.slice().forEach(fn => fn.call(this, event));\n }\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\nconst binding_callbacks = [];\nconst render_callbacks = [];\nconst flush_callbacks = [];\nconst resolved_promise = Promise.resolve();\nlet update_scheduled = false;\nfunction schedule_update() {\n if (!update_scheduled) {\n update_scheduled = true;\n resolved_promise.then(flush);\n }\n}\nfunction tick() {\n schedule_update();\n return resolved_promise;\n}\nfunction add_render_callback(fn) {\n render_callbacks.push(fn);\n}\nfunction add_flush_callback(fn) {\n flush_callbacks.push(fn);\n}\n// flush() calls callbacks in this order:\n// 1. All beforeUpdate callbacks, in order: parents before children\n// 2. All bind:this callbacks, in reverse order: children before parents.\n// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT\n// for afterUpdates called during the initial onMount, which are called in\n// reverse order: children before parents.\n// Since callbacks might update component values, which could trigger another\n// call to flush(), the following steps guard against this:\n// 1. During beforeUpdate, any updated components will be added to the\n// dirty_components array and will cause a reentrant call to flush(). Because\n// the flush index is kept outside the function, the reentrant call will pick\n// up where the earlier call left off and go through all dirty components. The\n// current_component value is saved and restored so that the reentrant call will\n// not interfere with the \"parent\" flush() call.\n// 2. bind:this callbacks cannot trigger new flush() calls.\n// 3. During afterUpdate, any updated components will NOT have their afterUpdate\n// callback called a second time; the seen_callbacks set, outside the flush()\n// function, guarantees this behavior.\nconst seen_callbacks = new Set();\nlet flushidx = 0; // Do *not* move this inside the flush() function\nfunction flush() {\n const saved_component = current_component;\n do {\n // first, call beforeUpdate functions\n // and update components\n while (flushidx < dirty_components.length) {\n const component = dirty_components[flushidx];\n flushidx++;\n set_current_component(component);\n update(component.$$);\n }\n set_current_component(null);\n dirty_components.length = 0;\n flushidx = 0;\n while (binding_callbacks.length)\n binding_callbacks.pop()();\n // then, once components are updated, call\n // afterUpdate functions. This may cause\n // subsequent updates...\n for (let i = 0; i < render_callbacks.length; i += 1) {\n const callback = render_callbacks[i];\n if (!seen_callbacks.has(callback)) {\n // ...so guard against infinite loops\n seen_callbacks.add(callback);\n callback();\n }\n }\n render_callbacks.length = 0;\n } while (dirty_components.length);\n while (flush_callbacks.length) {\n flush_callbacks.pop()();\n }\n update_scheduled = false;\n seen_callbacks.clear();\n set_current_component(saved_component);\n}\nfunction update($$) {\n if ($$.fragment !== null) {\n $$.update();\n run_all($$.before_update);\n const dirty = $$.dirty;\n $$.dirty = [-1];\n $$.fragment && $$.fragment.p($$.ctx, dirty);\n $$.after_update.forEach(add_render_callback);\n }\n}\n\nlet promise;\nfunction wait() {\n if (!promise) {\n promise = Promise.resolve();\n promise.then(() => {\n promise = null;\n });\n }\n return promise;\n}\nfunction dispatch(node, direction, kind) {\n node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\nconst outroing = new Set();\nlet outros;\nfunction group_outros() {\n outros = {\n r: 0,\n c: [],\n p: outros // parent group\n };\n}\nfunction check_outros() {\n if (!outros.r) {\n run_all(outros.c);\n }\n outros = outros.p;\n}\nfunction transition_in(block, local) {\n if (block && block.i) {\n outroing.delete(block);\n block.i(local);\n }\n}\nfunction transition_out(block, local, detach, callback) {\n if (block && block.o) {\n if (outroing.has(block))\n return;\n outroing.add(block);\n outros.c.push(() => {\n outroing.delete(block);\n if (callback) {\n if (detach)\n block.d(1);\n callback();\n }\n });\n block.o(local);\n }\n}\nconst null_transition = { duration: 0 };\nfunction create_in_transition(node, fn, params) {\n let config = fn(node, params);\n let running = false;\n let animation_name;\n let task;\n let uid = 0;\n function cleanup() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n tick(0, 1);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n if (task)\n task.abort();\n running = true;\n add_render_callback(() => dispatch(node, true, 'start'));\n task = loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(1, 0);\n dispatch(node, true, 'end');\n cleanup();\n return running = false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(t, 1 - t);\n }\n }\n return running;\n });\n }\n let started = false;\n return {\n start() {\n if (started)\n return;\n started = true;\n delete_rule(node);\n if (is_function(config)) {\n config = config();\n wait().then(go);\n }\n else {\n go();\n }\n },\n invalidate() {\n started = false;\n },\n end() {\n if (running) {\n cleanup();\n running = false;\n }\n }\n };\n}\nfunction create_out_transition(node, fn, params) {\n let config = fn(node, params);\n let running = true;\n let animation_name;\n const group = outros;\n group.r += 1;\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n add_render_callback(() => dispatch(node, false, 'start'));\n loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(0, 1);\n dispatch(node, false, 'end');\n if (!--group.r) {\n // this will result in `end()` being called,\n // so we don't need to clean up here\n run_all(group.c);\n }\n return false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(1 - t, t);\n }\n }\n return running;\n });\n }\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go();\n });\n }\n else {\n go();\n }\n return {\n end(reset) {\n if (reset && config.tick) {\n config.tick(1, 0);\n }\n if (running) {\n if (animation_name)\n delete_rule(node, animation_name);\n running = false;\n }\n }\n };\n}\nfunction create_bidirectional_transition(node, fn, params, intro) {\n let config = fn(node, params);\n let t = intro ? 0 : 1;\n let running_program = null;\n let pending_program = null;\n let animation_name = null;\n function clear_animation() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function init(program, duration) {\n const d = (program.b - t);\n duration *= Math.abs(d);\n return {\n a: t,\n b: program.b,\n d,\n duration,\n start: program.start,\n end: program.start + duration,\n group: program.group\n };\n }\n function go(b) {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n const program = {\n start: now() + delay,\n b\n };\n if (!b) {\n // @ts-ignore todo: improve typings\n program.group = outros;\n outros.r += 1;\n }\n if (running_program || pending_program) {\n pending_program = program;\n }\n else {\n // if this is an intro, and there's a delay, we need to do\n // an initial tick and/or apply CSS animation immediately\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, b, duration, delay, easing, css);\n }\n if (b)\n tick(0, 1);\n running_program = init(program, duration);\n add_render_callback(() => dispatch(node, b, 'start'));\n loop(now => {\n if (pending_program && now > pending_program.start) {\n running_program = init(pending_program, duration);\n pending_program = null;\n dispatch(node, running_program.b, 'start');\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);\n }\n }\n if (running_program) {\n if (now >= running_program.end) {\n tick(t = running_program.b, 1 - t);\n dispatch(node, running_program.b, 'end');\n if (!pending_program) {\n // we're done\n if (running_program.b) {\n // intro — we can tidy up immediately\n clear_animation();\n }\n else {\n // outro — needs to be coordinated\n if (!--running_program.group.r)\n run_all(running_program.group.c);\n }\n }\n running_program = null;\n }\n else if (now >= running_program.start) {\n const p = now - running_program.start;\n t = running_program.a + running_program.d * easing(p / running_program.duration);\n tick(t, 1 - t);\n }\n }\n return !!(running_program || pending_program);\n });\n }\n }\n return {\n run(b) {\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go(b);\n });\n }\n else {\n go(b);\n }\n },\n end() {\n clear_animation();\n running_program = pending_program = null;\n }\n };\n}\n\nfunction handle_promise(promise, info) {\n const token = info.token = {};\n function update(type, index, key, value) {\n if (info.token !== token)\n return;\n info.resolved = value;\n let child_ctx = info.ctx;\n if (key !== undefined) {\n child_ctx = child_ctx.slice();\n child_ctx[key] = value;\n }\n const block = type && (info.current = type)(child_ctx);\n let needs_flush = false;\n if (info.block) {\n if (info.blocks) {\n info.blocks.forEach((block, i) => {\n if (i !== index && block) {\n group_outros();\n transition_out(block, 1, 1, () => {\n if (info.blocks[i] === block) {\n info.blocks[i] = null;\n }\n });\n check_outros();\n }\n });\n }\n else {\n info.block.d(1);\n }\n block.c();\n transition_in(block, 1);\n block.m(info.mount(), info.anchor);\n needs_flush = true;\n }\n info.block = block;\n if (info.blocks)\n info.blocks[index] = block;\n if (needs_flush) {\n flush();\n }\n }\n if (is_promise(promise)) {\n const current_component = get_current_component();\n promise.then(value => {\n set_current_component(current_component);\n update(info.then, 1, info.value, value);\n set_current_component(null);\n }, error => {\n set_current_component(current_component);\n update(info.catch, 2, info.error, error);\n set_current_component(null);\n if (!info.hasCatch) {\n throw error;\n }\n });\n // if we previously had a then/catch block, destroy it\n if (info.current !== info.pending) {\n update(info.pending, 0);\n return true;\n }\n }\n else {\n if (info.current !== info.then) {\n update(info.then, 1, info.value, promise);\n return true;\n }\n info.resolved = promise;\n }\n}\nfunction update_await_block_branch(info, ctx, dirty) {\n const child_ctx = ctx.slice();\n const { resolved } = info;\n if (info.current === info.then) {\n child_ctx[info.value] = resolved;\n }\n if (info.current === info.catch) {\n child_ctx[info.error] = resolved;\n }\n info.block.p(child_ctx, dirty);\n}\n\nconst globals = (typeof window !== 'undefined'\n ? window\n : typeof globalThis !== 'undefined'\n ? globalThis\n : global);\n\nfunction destroy_block(block, lookup) {\n block.d(1);\n lookup.delete(block.key);\n}\nfunction outro_and_destroy_block(block, lookup) {\n transition_out(block, 1, 1, () => {\n lookup.delete(block.key);\n });\n}\nfunction fix_and_destroy_block(block, lookup) {\n block.f();\n destroy_block(block, lookup);\n}\nfunction fix_and_outro_and_destroy_block(block, lookup) {\n block.f();\n outro_and_destroy_block(block, lookup);\n}\nfunction update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {\n let o = old_blocks.length;\n let n = list.length;\n let i = o;\n const old_indexes = {};\n while (i--)\n old_indexes[old_blocks[i].key] = i;\n const new_blocks = [];\n const new_lookup = new Map();\n const deltas = new Map();\n i = n;\n while (i--) {\n const child_ctx = get_context(ctx, list, i);\n const key = get_key(child_ctx);\n let block = lookup.get(key);\n if (!block) {\n block = create_each_block(key, child_ctx);\n block.c();\n }\n else if (dynamic) {\n block.p(child_ctx, dirty);\n }\n new_lookup.set(key, new_blocks[i] = block);\n if (key in old_indexes)\n deltas.set(key, Math.abs(i - old_indexes[key]));\n }\n const will_move = new Set();\n const did_move = new Set();\n function insert(block) {\n transition_in(block, 1);\n block.m(node, next);\n lookup.set(block.key, block);\n next = block.first;\n n--;\n }\n while (o && n) {\n const new_block = new_blocks[n - 1];\n const old_block = old_blocks[o - 1];\n const new_key = new_block.key;\n const old_key = old_block.key;\n if (new_block === old_block) {\n // do nothing\n next = new_block.first;\n o--;\n n--;\n }\n else if (!new_lookup.has(old_key)) {\n // remove old block\n destroy(old_block, lookup);\n o--;\n }\n else if (!lookup.has(new_key) || will_move.has(new_key)) {\n insert(new_block);\n }\n else if (did_move.has(old_key)) {\n o--;\n }\n else if (deltas.get(new_key) > deltas.get(old_key)) {\n did_move.add(new_key);\n insert(new_block);\n }\n else {\n will_move.add(old_key);\n o--;\n }\n }\n while (o--) {\n const old_block = old_blocks[o];\n if (!new_lookup.has(old_block.key))\n destroy(old_block, lookup);\n }\n while (n)\n insert(new_blocks[n - 1]);\n return new_blocks;\n}\nfunction validate_each_keys(ctx, list, get_context, get_key) {\n const keys = new Set();\n for (let i = 0; i < list.length; i++) {\n const key = get_key(get_context(ctx, list, i));\n if (keys.has(key)) {\n throw new Error('Cannot have duplicate keys in a keyed each');\n }\n keys.add(key);\n }\n}\n\nfunction get_spread_update(levels, updates) {\n const update = {};\n const to_null_out = {};\n const accounted_for = { $$scope: 1 };\n let i = levels.length;\n while (i--) {\n const o = levels[i];\n const n = updates[i];\n if (n) {\n for (const key in o) {\n if (!(key in n))\n to_null_out[key] = 1;\n }\n for (const key in n) {\n if (!accounted_for[key]) {\n update[key] = n[key];\n accounted_for[key] = 1;\n }\n }\n levels[i] = n;\n }\n else {\n for (const key in o) {\n accounted_for[key] = 1;\n }\n }\n }\n for (const key in to_null_out) {\n if (!(key in update))\n update[key] = undefined;\n }\n return update;\n}\nfunction get_spread_object(spread_props) {\n return typeof spread_props === 'object' && spread_props !== null ? spread_props : {};\n}\n\n// source: https://html.spec.whatwg.org/multipage/indices.html\nconst boolean_attributes = new Set([\n 'allowfullscreen',\n 'allowpaymentrequest',\n 'async',\n 'autofocus',\n 'autoplay',\n 'checked',\n 'controls',\n 'default',\n 'defer',\n 'disabled',\n 'formnovalidate',\n 'hidden',\n 'ismap',\n 'loop',\n 'multiple',\n 'muted',\n 'nomodule',\n 'novalidate',\n 'open',\n 'playsinline',\n 'readonly',\n 'required',\n 'reversed',\n 'selected'\n]);\n\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\nfunction spread(args, attrs_to_add) {\n const attributes = Object.assign({}, ...args);\n if (attrs_to_add) {\n const classes_to_add = attrs_to_add.classes;\n const styles_to_add = attrs_to_add.styles;\n if (classes_to_add) {\n if (attributes.class == null) {\n attributes.class = classes_to_add;\n }\n else {\n attributes.class += ' ' + classes_to_add;\n }\n }\n if (styles_to_add) {\n if (attributes.style == null) {\n attributes.style = style_object_to_string(styles_to_add);\n }\n else {\n attributes.style = style_object_to_string(merge_ssr_styles(attributes.style, styles_to_add));\n }\n }\n }\n let str = '';\n Object.keys(attributes).forEach(name => {\n if (invalid_attribute_name_character.test(name))\n return;\n const value = attributes[name];\n if (value === true)\n str += ' ' + name;\n else if (boolean_attributes.has(name.toLowerCase())) {\n if (value)\n str += ' ' + name;\n }\n else if (value != null) {\n str += ` ${name}=\"${value}\"`;\n }\n });\n return str;\n}\nfunction merge_ssr_styles(style_attribute, style_directive) {\n const style_object = {};\n for (const individual_style of style_attribute.split(';')) {\n const colon_index = individual_style.indexOf(':');\n const name = individual_style.slice(0, colon_index).trim();\n const value = individual_style.slice(colon_index + 1).trim();\n if (!name)\n continue;\n style_object[name] = value;\n }\n for (const name in style_directive) {\n const value = style_directive[name];\n if (value) {\n style_object[name] = value;\n }\n else {\n delete style_object[name];\n }\n }\n return style_object;\n}\nconst escaped = {\n '\"': '"',\n \"'\": ''',\n '&': '&',\n '<': '<',\n '>': '>'\n};\nfunction escape(html) {\n return String(html).replace(/[\"'&<>]/g, match => escaped[match]);\n}\nfunction escape_attribute_value(value) {\n return typeof value === 'string' ? escape(value) : value;\n}\nfunction escape_object(obj) {\n const result = {};\n for (const key in obj) {\n result[key] = escape_attribute_value(obj[key]);\n }\n return result;\n}\nfunction each(items, fn) {\n let str = '';\n for (let i = 0; i < items.length; i += 1) {\n str += fn(items[i], i);\n }\n return str;\n}\nconst missing_component = {\n $$render: () => ''\n};\nfunction validate_component(component, name) {\n if (!component || !component.$$render) {\n if (name === 'svelte:component')\n name += ' this={...}';\n throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules`);\n }\n return component;\n}\nfunction debug(file, line, column, values) {\n console.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n console.log(values); // eslint-disable-line no-console\n return '';\n}\nlet on_destroy;\nfunction create_ssr_component(fn) {\n function $$render(result, props, bindings, slots, context) {\n const parent_component = current_component;\n const $$ = {\n on_destroy,\n context: new Map(context || (parent_component ? parent_component.$$.context : [])),\n // these will be immediately discarded\n on_mount: [],\n before_update: [],\n after_update: [],\n callbacks: blank_object()\n };\n set_current_component({ $$ });\n const html = fn(result, props, bindings, slots);\n set_current_component(parent_component);\n return html;\n }\n return {\n render: (props = {}, { $$slots = {}, context = new Map() } = {}) => {\n on_destroy = [];\n const result = { title: '', head: '', css: new Set() };\n const html = $$render(result, props, {}, $$slots, context);\n run_all(on_destroy);\n return {\n html,\n css: {\n code: Array.from(result.css).map(css => css.code).join('\\n'),\n map: null // TODO\n },\n head: result.title + result.head\n };\n },\n $$render\n };\n}\nfunction add_attribute(name, value, boolean) {\n if (value == null || (boolean && !value))\n return '';\n return ` ${name}${value === true && boolean_attributes.has(name) ? '' : `=${typeof value === 'string' ? JSON.stringify(escape(value)) : `\"${value}\"`}`}`;\n}\nfunction add_classes(classes) {\n return classes ? ` class=\"${classes}\"` : '';\n}\nfunction style_object_to_string(style_object) {\n return Object.keys(style_object)\n .filter(key => style_object[key])\n .map(key => `${key}: ${style_object[key]};`)\n .join(' ');\n}\nfunction add_styles(style_object) {\n const styles = style_object_to_string(style_object);\n return styles ? ` style=\"${styles}\"` : '';\n}\n\nfunction bind(component, name, callback) {\n const index = component.$$.props[name];\n if (index !== undefined) {\n component.$$.bound[index] = callback;\n callback(component.$$.ctx[index]);\n }\n}\nfunction create_component(block) {\n block && block.c();\n}\nfunction claim_component(block, parent_nodes) {\n block && block.l(parent_nodes);\n}\nfunction mount_component(component, target, anchor, customElement) {\n const { fragment, on_mount, on_destroy, after_update } = component.$$;\n fragment && fragment.m(target, anchor);\n if (!customElement) {\n // onMount happens before the initial afterUpdate\n add_render_callback(() => {\n const new_on_destroy = on_mount.map(run).filter(is_function);\n if (on_destroy) {\n on_destroy.push(...new_on_destroy);\n }\n else {\n // Edge case - component was destroyed immediately,\n // most likely as a result of a binding initialising\n run_all(new_on_destroy);\n }\n component.$$.on_mount = [];\n });\n }\n after_update.forEach(add_render_callback);\n}\nfunction destroy_component(component, detaching) {\n const $$ = component.$$;\n if ($$.fragment !== null) {\n run_all($$.on_destroy);\n $$.fragment && $$.fragment.d(detaching);\n // TODO null out other refs, including component.$$ (but need to\n // preserve final state?)\n $$.on_destroy = $$.fragment = null;\n $$.ctx = [];\n }\n}\nfunction make_dirty(component, i) {\n if (component.$$.dirty[0] === -1) {\n dirty_components.push(component);\n schedule_update();\n component.$$.dirty.fill(0);\n }\n component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));\n}\nfunction init(component, options, instance, create_fragment, not_equal, props, append_styles, dirty = [-1]) {\n const parent_component = current_component;\n set_current_component(component);\n const $$ = component.$$ = {\n fragment: null,\n ctx: null,\n // state\n props,\n update: noop,\n not_equal,\n bound: blank_object(),\n // lifecycle\n on_mount: [],\n on_destroy: [],\n on_disconnect: [],\n before_update: [],\n after_update: [],\n context: new Map(options.context || (parent_component ? parent_component.$$.context : [])),\n // everything else\n callbacks: blank_object(),\n dirty,\n skip_bound: false,\n root: options.target || parent_component.$$.root\n };\n append_styles && append_styles($$.root);\n let ready = false;\n $$.ctx = instance\n ? instance(component, options.props || {}, (i, ret, ...rest) => {\n const value = rest.length ? rest[0] : ret;\n if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n if (!$$.skip_bound && $$.bound[i])\n $$.bound[i](value);\n if (ready)\n make_dirty(component, i);\n }\n return ret;\n })\n : [];\n $$.update();\n ready = true;\n run_all($$.before_update);\n // `false` as a special case of no DOM component\n $$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n if (options.target) {\n if (options.hydrate) {\n start_hydrating();\n const nodes = children(options.target);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.l(nodes);\n nodes.forEach(detach);\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.c();\n }\n if (options.intro)\n transition_in(component.$$.fragment);\n mount_component(component, options.target, options.anchor, options.customElement);\n end_hydrating();\n flush();\n }\n set_current_component(parent_component);\n}\nlet SvelteElement;\nif (typeof HTMLElement === 'function') {\n SvelteElement = class extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n }\n connectedCallback() {\n const { on_mount } = this.$$;\n this.$$.on_disconnect = on_mount.map(run).filter(is_function);\n // @ts-ignore todo: improve typings\n for (const key in this.$$.slotted) {\n // @ts-ignore todo: improve typings\n this.appendChild(this.$$.slotted[key]);\n }\n }\n attributeChangedCallback(attr, _oldValue, newValue) {\n this[attr] = newValue;\n }\n disconnectedCallback() {\n run_all(this.$$.on_disconnect);\n }\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n // TODO should this delegate to addEventListener?\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n };\n}\n/**\n * Base class for Svelte components. Used when dev=false.\n */\nclass SvelteComponent {\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n}\n\nfunction dispatch_dev(type, detail) {\n document.dispatchEvent(custom_event(type, Object.assign({ version: '3.46.4' }, detail), true));\n}\nfunction append_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append(target, node);\n}\nfunction append_hydration_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append_hydration(target, node);\n}\nfunction insert_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert(target, node, anchor);\n}\nfunction insert_hydration_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert_hydration(target, node, anchor);\n}\nfunction detach_dev(node) {\n dispatch_dev('SvelteDOMRemove', { node });\n detach(node);\n}\nfunction detach_between_dev(before, after) {\n while (before.nextSibling && before.nextSibling !== after) {\n detach_dev(before.nextSibling);\n }\n}\nfunction detach_before_dev(after) {\n while (after.previousSibling) {\n detach_dev(after.previousSibling);\n }\n}\nfunction detach_after_dev(before) {\n while (before.nextSibling) {\n detach_dev(before.nextSibling);\n }\n}\nfunction listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {\n const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : [];\n if (has_prevent_default)\n modifiers.push('preventDefault');\n if (has_stop_propagation)\n modifiers.push('stopPropagation');\n dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });\n const dispose = listen(node, event, handler, options);\n return () => {\n dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });\n dispose();\n };\n}\nfunction attr_dev(node, attribute, value) {\n attr(node, attribute, value);\n if (value == null)\n dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });\n else\n dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });\n}\nfunction prop_dev(node, property, value) {\n node[property] = value;\n dispatch_dev('SvelteDOMSetProperty', { node, property, value });\n}\nfunction dataset_dev(node, property, value) {\n node.dataset[property] = value;\n dispatch_dev('SvelteDOMSetDataset', { node, property, value });\n}\nfunction set_data_dev(text, data) {\n data = '' + data;\n if (text.wholeText === data)\n return;\n dispatch_dev('SvelteDOMSetData', { node: text, data });\n text.data = data;\n}\nfunction validate_each_argument(arg) {\n if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {\n let msg = '{#each} only iterates over array-like objects.';\n if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {\n msg += ' You can use a spread to convert this iterable into an array.';\n }\n throw new Error(msg);\n }\n}\nfunction validate_slots(name, slot, keys) {\n for (const slot_key of Object.keys(slot)) {\n if (!~keys.indexOf(slot_key)) {\n console.warn(`<${name}> received an unexpected slot \"${slot_key}\".`);\n }\n }\n}\n/**\n * Base class for Svelte components with some minor dev-enhancements. Used when dev=true.\n */\nclass SvelteComponentDev extends SvelteComponent {\n constructor(options) {\n if (!options || (!options.target && !options.$$inline)) {\n throw new Error(\"'target' is a required option\");\n }\n super();\n }\n $destroy() {\n super.$destroy();\n this.$destroy = () => {\n console.warn('Component was already destroyed'); // eslint-disable-line no-console\n };\n }\n $capture_state() { }\n $inject_state() { }\n}\n/**\n * Base class to create strongly typed Svelte components.\n * This only exists for typing purposes and should be used in `.d.ts` files.\n *\n * ### Example:\n *\n * You have component library on npm called `component-library`, from which\n * you export a component called `MyComponent`. For Svelte+TypeScript users,\n * you want to provide typings. Therefore you create a `index.d.ts`:\n * ```ts\n * import { SvelteComponentTyped } from \"svelte\";\n * export class MyComponent extends SvelteComponentTyped<{foo: string}> {}\n * ```\n * Typing this makes it possible for IDEs like VS Code with the Svelte extension\n * to provide intellisense and to use the component like this in a Svelte file\n * with TypeScript:\n * ```svelte\n * <script lang=\"ts\">\n * \timport { MyComponent } from \"component-library\";\n * </script>\n * <MyComponent foo={'bar'} />\n * ```\n *\n * #### Why not make this part of `SvelteComponent(Dev)`?\n * Because\n * ```ts\n * class ASubclassOfSvelteComponent extends SvelteComponent<{foo: string}> {}\n * const component: typeof SvelteComponent = ASubclassOfSvelteComponent;\n * ```\n * will throw a type error, so we need to separate the more strictly typed class.\n */\nclass SvelteComponentTyped extends SvelteComponentDev {\n constructor(options) {\n super(options);\n }\n}\nfunction loop_guard(timeout) {\n const start = Date.now();\n return () => {\n if (Date.now() - start > timeout) {\n throw new Error('Infinite loop detected');\n }\n };\n}\n\nexport { HtmlTag, HtmlTagHydration, SvelteComponent, SvelteComponentDev, SvelteComponentTyped, SvelteElement, action_destroyer, add_attribute, add_classes, add_flush_callback, add_location, add_render_callback, add_resize_listener, add_styles, add_transform, afterUpdate, append, append_dev, append_empty_stylesheet, append_hydration, append_hydration_dev, append_styles, assign, attr, attr_dev, attribute_to_object, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_html_tag, claim_space, claim_svg_element, claim_text, clear_loops, component_subscribe, compute_rest_props, compute_slots, createEventDispatcher, create_animation, create_bidirectional_transition, create_component, create_in_transition, create_out_transition, create_slot, create_ssr_component, current_component, custom_event, dataset_dev, debug, destroy_block, destroy_component, destroy_each, detach, detach_after_dev, detach_before_dev, detach_between_dev, detach_dev, dirty_components, dispatch_dev, each, element, element_is, empty, end_hydrating, escape, escape_attribute_value, escape_object, escaped, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, getAllContexts, getContext, get_all_dirty_from_scope, get_binding_group_value, get_current_component, get_custom_elements_slots, get_root_for_style, get_slot_changes, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, hasContext, has_prop, identity, init, insert, insert_dev, insert_hydration, insert_hydration_dev, intros, invalid_attribute_name_character, is_client, is_crossorigin, is_empty, is_function, is_promise, listen, listen_dev, loop, loop_guard, merge_ssr_styles, missing_component, mount_component, noop, not_equal, now, null_to_empty, object_without_properties, onDestroy, onMount, once, outro_and_destroy_block, prevent_default, prop_dev, query_selector_all, raf, run, run_all, safe_not_equal, schedule_update, select_multiple_value, select_option, select_options, select_value, self, setContext, set_attributes, set_current_component, set_custom_element_data, set_data, set_data_dev, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, spread, src_url_equal, start_hydrating, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, trusted, update_await_block_branch, update_keyed_each, update_slot, update_slot_base, validate_component, validate_each_argument, validate_each_keys, validate_slots, validate_store, xlink_attr };\n","/*!\n * Bootstrap v5.1.3 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.bootstrap = factory());\n})(this, (function () { 'use strict';\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n const MAX_UID = 1000000;\n const MILLISECONDS_MULTIPLIER = 1000;\n const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)\n\n const toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`;\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase();\n };\n /**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\n\n const getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID);\n } while (document.getElementById(prefix));\n\n return prefix;\n };\n\n const getSelector = element => {\n let selector = element.getAttribute('data-bs-target');\n\n if (!selector || selector === '#') {\n let hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n\n if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) {\n return null;\n } // Just in case some CMS puts out a full URL with the anchor appended\n\n\n if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {\n hrefAttr = `#${hrefAttr.split('#')[1]}`;\n }\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;\n }\n\n return selector;\n };\n\n const getSelectorFromElement = element => {\n const selector = getSelector(element);\n\n if (selector) {\n return document.querySelector(selector) ? selector : null;\n }\n\n return null;\n };\n\n const getElementFromSelector = element => {\n const selector = getSelector(element);\n return selector ? document.querySelector(selector) : null;\n };\n\n const getTransitionDurationFromElement = element => {\n if (!element) {\n return 0;\n } // Get transition-duration of the element\n\n\n let {\n transitionDuration,\n transitionDelay\n } = window.getComputedStyle(element);\n const floatTransitionDuration = Number.parseFloat(transitionDuration);\n const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found\n\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0;\n } // If multiple durations are defined, take the first\n\n\n transitionDuration = transitionDuration.split(',')[0];\n transitionDelay = transitionDelay.split(',')[0];\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;\n };\n\n const triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END));\n };\n\n const isElement$1 = obj => {\n if (!obj || typeof obj !== 'object') {\n return false;\n }\n\n if (typeof obj.jquery !== 'undefined') {\n obj = obj[0];\n }\n\n return typeof obj.nodeType !== 'undefined';\n };\n\n const getElement = obj => {\n if (isElement$1(obj)) {\n // it's a jQuery object or a node element\n return obj.jquery ? obj[0] : obj;\n }\n\n if (typeof obj === 'string' && obj.length > 0) {\n return document.querySelector(obj);\n }\n\n return null;\n };\n\n const typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property];\n const value = config[property];\n const valueType = value && isElement$1(value) ? 'element' : toType(value);\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(`${componentName.toUpperCase()}: Option \"${property}\" provided type \"${valueType}\" but expected type \"${expectedTypes}\".`);\n }\n });\n };\n\n const isVisible = element => {\n if (!isElement$1(element) || element.getClientRects().length === 0) {\n return false;\n }\n\n return getComputedStyle(element).getPropertyValue('visibility') === 'visible';\n };\n\n const isDisabled = element => {\n if (!element || element.nodeType !== Node.ELEMENT_NODE) {\n return true;\n }\n\n if (element.classList.contains('disabled')) {\n return true;\n }\n\n if (typeof element.disabled !== 'undefined') {\n return element.disabled;\n }\n\n return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false';\n };\n\n const findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null;\n } // Can find the shadow root otherwise it'll return the document\n\n\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode();\n return root instanceof ShadowRoot ? root : null;\n }\n\n if (element instanceof ShadowRoot) {\n return element;\n } // when we don't find a shadow root\n\n\n if (!element.parentNode) {\n return null;\n }\n\n return findShadowRoot(element.parentNode);\n };\n\n const noop = () => {};\n /**\n * Trick to restart an element's animation\n *\n * @param {HTMLElement} element\n * @return void\n *\n * @see https://www.charistheo.io/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation\n */\n\n\n const reflow = element => {\n // eslint-disable-next-line no-unused-expressions\n element.offsetHeight;\n };\n\n const getjQuery = () => {\n const {\n jQuery\n } = window;\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery;\n }\n\n return null;\n };\n\n const DOMContentLoadedCallbacks = [];\n\n const onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n // add listener on the first call when the document is in loading state\n if (!DOMContentLoadedCallbacks.length) {\n document.addEventListener('DOMContentLoaded', () => {\n DOMContentLoadedCallbacks.forEach(callback => callback());\n });\n }\n\n DOMContentLoadedCallbacks.push(callback);\n } else {\n callback();\n }\n };\n\n const isRTL = () => document.documentElement.dir === 'rtl';\n\n const defineJQueryPlugin = plugin => {\n onDOMContentLoaded(() => {\n const $ = getjQuery();\n /* istanbul ignore if */\n\n if ($) {\n const name = plugin.NAME;\n const JQUERY_NO_CONFLICT = $.fn[name];\n $.fn[name] = plugin.jQueryInterface;\n $.fn[name].Constructor = plugin;\n\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT;\n return plugin.jQueryInterface;\n };\n }\n });\n };\n\n const execute = callback => {\n if (typeof callback === 'function') {\n callback();\n }\n };\n\n const executeAfterTransition = (callback, transitionElement, waitForTransition = true) => {\n if (!waitForTransition) {\n execute(callback);\n return;\n }\n\n const durationPadding = 5;\n const emulatedDuration = getTransitionDurationFromElement(transitionElement) + durationPadding;\n let called = false;\n\n const handler = ({\n target\n }) => {\n if (target !== transitionElement) {\n return;\n }\n\n called = true;\n transitionElement.removeEventListener(TRANSITION_END, handler);\n execute(callback);\n };\n\n transitionElement.addEventListener(TRANSITION_END, handler);\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(transitionElement);\n }\n }, emulatedDuration);\n };\n /**\n * Return the previous/next element of a list.\n *\n * @param {array} list The list of elements\n * @param activeElement The active element\n * @param shouldGetNext Choose to get next or previous element\n * @param isCycleAllowed\n * @return {Element|elem} The proper element\n */\n\n\n const getNextActiveElement = (list, activeElement, shouldGetNext, isCycleAllowed) => {\n let index = list.indexOf(activeElement); // if the element does not exist in the list return an element depending on the direction and if cycle is allowed\n\n if (index === -1) {\n return list[!shouldGetNext && isCycleAllowed ? list.length - 1 : 0];\n }\n\n const listLength = list.length;\n index += shouldGetNext ? 1 : -1;\n\n if (isCycleAllowed) {\n index = (index + listLength) % listLength;\n }\n\n return list[Math.max(0, Math.min(index, listLength - 1))];\n };\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): dom/event-handler.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const namespaceRegex = /[^.]*(?=\\..*)\\.|.*/;\n const stripNameRegex = /\\..*/;\n const stripUidRegex = /::\\d+$/;\n const eventRegistry = {}; // Events storage\n\n let uidEvent = 1;\n const customEvents = {\n mouseenter: 'mouseover',\n mouseleave: 'mouseout'\n };\n const customEventsRegex = /^(mouseenter|mouseleave)/i;\n const nativeEvents = new Set(['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll']);\n /**\n * ------------------------------------------------------------------------\n * Private methods\n * ------------------------------------------------------------------------\n */\n\n function getUidEvent(element, uid) {\n return uid && `${uid}::${uidEvent++}` || element.uidEvent || uidEvent++;\n }\n\n function getEvent(element) {\n const uid = getUidEvent(element);\n element.uidEvent = uid;\n eventRegistry[uid] = eventRegistry[uid] || {};\n return eventRegistry[uid];\n }\n\n function bootstrapHandler(element, fn) {\n return function handler(event) {\n event.delegateTarget = element;\n\n if (handler.oneOff) {\n EventHandler.off(element, event.type, fn);\n }\n\n return fn.apply(element, [event]);\n };\n }\n\n function bootstrapDelegationHandler(element, selector, fn) {\n return function handler(event) {\n const domElements = element.querySelectorAll(selector);\n\n for (let {\n target\n } = event; target && target !== this; target = target.parentNode) {\n for (let i = domElements.length; i--;) {\n if (domElements[i] === target) {\n event.delegateTarget = target;\n\n if (handler.oneOff) {\n EventHandler.off(element, event.type, selector, fn);\n }\n\n return fn.apply(target, [event]);\n }\n }\n } // To please ESLint\n\n\n return null;\n };\n }\n\n function findHandler(events, handler, delegationSelector = null) {\n const uidEventList = Object.keys(events);\n\n for (let i = 0, len = uidEventList.length; i < len; i++) {\n const event = events[uidEventList[i]];\n\n if (event.originalHandler === handler && event.delegationSelector === delegationSelector) {\n return event;\n }\n }\n\n return null;\n }\n\n function normalizeParams(originalTypeEvent, handler, delegationFn) {\n const delegation = typeof handler === 'string';\n const originalHandler = delegation ? delegationFn : handler;\n let typeEvent = getTypeEvent(originalTypeEvent);\n const isNative = nativeEvents.has(typeEvent);\n\n if (!isNative) {\n typeEvent = originalTypeEvent;\n }\n\n return [delegation, originalHandler, typeEvent];\n }\n\n function addHandler(element, originalTypeEvent, handler, delegationFn, oneOff) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return;\n }\n\n if (!handler) {\n handler = delegationFn;\n delegationFn = null;\n } // in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position\n // this prevents the handler from being dispatched the same way as mouseover or mouseout does\n\n\n if (customEventsRegex.test(originalTypeEvent)) {\n const wrapFn = fn => {\n return function (event) {\n if (!event.relatedTarget || event.relatedTarget !== event.delegateTarget && !event.delegateTarget.contains(event.relatedTarget)) {\n return fn.call(this, event);\n }\n };\n };\n\n if (delegationFn) {\n delegationFn = wrapFn(delegationFn);\n } else {\n handler = wrapFn(handler);\n }\n }\n\n const [delegation, originalHandler, typeEvent] = normalizeParams(originalTypeEvent, handler, delegationFn);\n const events = getEvent(element);\n const handlers = events[typeEvent] || (events[typeEvent] = {});\n const previousFn = findHandler(handlers, originalHandler, delegation ? handler : null);\n\n if (previousFn) {\n previousFn.oneOff = previousFn.oneOff && oneOff;\n return;\n }\n\n const uid = getUidEvent(originalHandler, originalTypeEvent.replace(namespaceRegex, ''));\n const fn = delegation ? bootstrapDelegationHandler(element, handler, delegationFn) : bootstrapHandler(element, handler);\n fn.delegationSelector = delegation ? handler : null;\n fn.originalHandler = originalHandler;\n fn.oneOff = oneOff;\n fn.uidEvent = uid;\n handlers[uid] = fn;\n element.addEventListener(typeEvent, fn, delegation);\n }\n\n function removeHandler(element, events, typeEvent, handler, delegationSelector) {\n const fn = findHandler(events[typeEvent], handler, delegationSelector);\n\n if (!fn) {\n return;\n }\n\n element.removeEventListener(typeEvent, fn, Boolean(delegationSelector));\n delete events[typeEvent][fn.uidEvent];\n }\n\n function removeNamespacedHandlers(element, events, typeEvent, namespace) {\n const storeElementEvent = events[typeEvent] || {};\n Object.keys(storeElementEvent).forEach(handlerKey => {\n if (handlerKey.includes(namespace)) {\n const event = storeElementEvent[handlerKey];\n removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);\n }\n });\n }\n\n function getTypeEvent(event) {\n // allow to get the native events from namespaced events ('click.bs.button' --> 'click')\n event = event.replace(stripNameRegex, '');\n return customEvents[event] || event;\n }\n\n const EventHandler = {\n on(element, event, handler, delegationFn) {\n addHandler(element, event, handler, delegationFn, false);\n },\n\n one(element, event, handler, delegationFn) {\n addHandler(element, event, handler, delegationFn, true);\n },\n\n off(element, originalTypeEvent, handler, delegationFn) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return;\n }\n\n const [delegation, originalHandler, typeEvent] = normalizeParams(originalTypeEvent, handler, delegationFn);\n const inNamespace = typeEvent !== originalTypeEvent;\n const events = getEvent(element);\n const isNamespace = originalTypeEvent.startsWith('.');\n\n if (typeof originalHandler !== 'undefined') {\n // Simplest case: handler is passed, remove that listener ONLY.\n if (!events || !events[typeEvent]) {\n return;\n }\n\n removeHandler(element, events, typeEvent, originalHandler, delegation ? handler : null);\n return;\n }\n\n if (isNamespace) {\n Object.keys(events).forEach(elementEvent => {\n removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1));\n });\n }\n\n const storeElementEvent = events[typeEvent] || {};\n Object.keys(storeElementEvent).forEach(keyHandlers => {\n const handlerKey = keyHandlers.replace(stripUidRegex, '');\n\n if (!inNamespace || originalTypeEvent.includes(handlerKey)) {\n const event = storeElementEvent[keyHandlers];\n removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);\n }\n });\n },\n\n trigger(element, event, args) {\n if (typeof event !== 'string' || !element) {\n return null;\n }\n\n const $ = getjQuery();\n const typeEvent = getTypeEvent(event);\n const inNamespace = event !== typeEvent;\n const isNative = nativeEvents.has(typeEvent);\n let jQueryEvent;\n let bubbles = true;\n let nativeDispatch = true;\n let defaultPrevented = false;\n let evt = null;\n\n if (inNamespace && $) {\n jQueryEvent = $.Event(event, args);\n $(element).trigger(jQueryEvent);\n bubbles = !jQueryEvent.isPropagationStopped();\n nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();\n defaultPrevented = jQueryEvent.isDefaultPrevented();\n }\n\n if (isNative) {\n evt = document.createEvent('HTMLEvents');\n evt.initEvent(typeEvent, bubbles, true);\n } else {\n evt = new CustomEvent(event, {\n bubbles,\n cancelable: true\n });\n } // merge custom information in our event\n\n\n if (typeof args !== 'undefined') {\n Object.keys(args).forEach(key => {\n Object.defineProperty(evt, key, {\n get() {\n return args[key];\n }\n\n });\n });\n }\n\n if (defaultPrevented) {\n evt.preventDefault();\n }\n\n if (nativeDispatch) {\n element.dispatchEvent(evt);\n }\n\n if (evt.defaultPrevented && typeof jQueryEvent !== 'undefined') {\n jQueryEvent.preventDefault();\n }\n\n return evt;\n }\n\n };\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): dom/data.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n const elementMap = new Map();\n const Data = {\n set(element, key, instance) {\n if (!elementMap.has(element)) {\n elementMap.set(element, new Map());\n }\n\n const instanceMap = elementMap.get(element); // make it clear we only want one instance per element\n // can be removed later when multiple key/instances are fine to be used\n\n if (!instanceMap.has(key) && instanceMap.size !== 0) {\n // eslint-disable-next-line no-console\n console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`);\n return;\n }\n\n instanceMap.set(key, instance);\n },\n\n get(element, key) {\n if (elementMap.has(element)) {\n return elementMap.get(element).get(key) || null;\n }\n\n return null;\n },\n\n remove(element, key) {\n if (!elementMap.has(element)) {\n return;\n }\n\n const instanceMap = elementMap.get(element);\n instanceMap.delete(key); // free up element references if there are no instances left for an element\n\n if (instanceMap.size === 0) {\n elementMap.delete(element);\n }\n }\n\n };\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): base-component.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const VERSION = '5.1.3';\n\n class BaseComponent {\n constructor(element) {\n element = getElement(element);\n\n if (!element) {\n return;\n }\n\n this._element = element;\n Data.set(this._element, this.constructor.DATA_KEY, this);\n }\n\n dispose() {\n Data.remove(this._element, this.constructor.DATA_KEY);\n EventHandler.off(this._element, this.constructor.EVENT_KEY);\n Object.getOwnPropertyNames(this).forEach(propertyName => {\n this[propertyName] = null;\n });\n }\n\n _queueCallback(callback, element, isAnimated = true) {\n executeAfterTransition(callback, element, isAnimated);\n }\n /** Static */\n\n\n static getInstance(element) {\n return Data.get(getElement(element), this.DATA_KEY);\n }\n\n static getOrCreateInstance(element, config = {}) {\n return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null);\n }\n\n static get VERSION() {\n return VERSION;\n }\n\n static get NAME() {\n throw new Error('You have to implement the static method \"NAME\", for each component!');\n }\n\n static get DATA_KEY() {\n return `bs.${this.NAME}`;\n }\n\n static get EVENT_KEY() {\n return `.${this.DATA_KEY}`;\n }\n\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): util/component-functions.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n const enableDismissTrigger = (component, method = 'hide') => {\n const clickEvent = `click.dismiss${component.EVENT_KEY}`;\n const name = component.NAME;\n EventHandler.on(document, clickEvent, `[data-bs-dismiss=\"${name}\"]`, function (event) {\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault();\n }\n\n if (isDisabled(this)) {\n return;\n }\n\n const target = getElementFromSelector(this) || this.closest(`.${name}`);\n const instance = component.getOrCreateInstance(target); // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method\n\n instance[method]();\n });\n };\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): alert.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME$d = 'alert';\n const DATA_KEY$c = 'bs.alert';\n const EVENT_KEY$c = `.${DATA_KEY$c}`;\n const EVENT_CLOSE = `close${EVENT_KEY$c}`;\n const EVENT_CLOSED = `closed${EVENT_KEY$c}`;\n const CLASS_NAME_FADE$5 = 'fade';\n const CLASS_NAME_SHOW$8 = 'show';\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Alert extends BaseComponent {\n // Getters\n static get NAME() {\n return NAME$d;\n } // Public\n\n\n close() {\n const closeEvent = EventHandler.trigger(this._element, EVENT_CLOSE);\n\n if (closeEvent.defaultPrevented) {\n return;\n }\n\n this._element.classList.remove(CLASS_NAME_SHOW$8);\n\n const isAnimated = this._element.classList.contains(CLASS_NAME_FADE$5);\n\n this._queueCallback(() => this._destroyElement(), this._element, isAnimated);\n } // Private\n\n\n _destroyElement() {\n this._element.remove();\n\n EventHandler.trigger(this._element, EVENT_CLOSED);\n this.dispose();\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Alert.getOrCreateInstance(this);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config](this);\n });\n }\n\n }\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n\n enableDismissTrigger(Alert, 'close');\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Alert to jQuery only if jQuery is present\n */\n\n defineJQueryPlugin(Alert);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): button.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME$c = 'button';\n const DATA_KEY$b = 'bs.button';\n const EVENT_KEY$b = `.${DATA_KEY$b}`;\n const DATA_API_KEY$7 = '.data-api';\n const CLASS_NAME_ACTIVE$3 = 'active';\n const SELECTOR_DATA_TOGGLE$5 = '[data-bs-toggle=\"button\"]';\n const EVENT_CLICK_DATA_API$6 = `click${EVENT_KEY$b}${DATA_API_KEY$7}`;\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Button extends BaseComponent {\n // Getters\n static get NAME() {\n return NAME$c;\n } // Public\n\n\n toggle() {\n // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method\n this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE$3));\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Button.getOrCreateInstance(this);\n\n if (config === 'toggle') {\n data[config]();\n }\n });\n }\n\n }\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n\n EventHandler.on(document, EVENT_CLICK_DATA_API$6, SELECTOR_DATA_TOGGLE$5, event => {\n event.preventDefault();\n const button = event.target.closest(SELECTOR_DATA_TOGGLE$5);\n const data = Button.getOrCreateInstance(button);\n data.toggle();\n });\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Button to jQuery only if jQuery is present\n */\n\n defineJQueryPlugin(Button);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n function normalizeData(val) {\n if (val === 'true') {\n return true;\n }\n\n if (val === 'false') {\n return false;\n }\n\n if (val === Number(val).toString()) {\n return Number(val);\n }\n\n if (val === '' || val === 'null') {\n return null;\n }\n\n return val;\n }\n\n function normalizeDataKey(key) {\n return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`);\n }\n\n const Manipulator = {\n setDataAttribute(element, key, value) {\n element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value);\n },\n\n removeDataAttribute(element, key) {\n element.removeAttribute(`data-bs-${normalizeDataKey(key)}`);\n },\n\n getDataAttributes(element) {\n if (!element) {\n return {};\n }\n\n const attributes = {};\n Object.keys(element.dataset).filter(key => key.startsWith('bs')).forEach(key => {\n let pureKey = key.replace(/^bs/, '');\n pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length);\n attributes[pureKey] = normalizeData(element.dataset[key]);\n });\n return attributes;\n },\n\n getDataAttribute(element, key) {\n return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`));\n },\n\n offset(element) {\n const rect = element.getBoundingClientRect();\n return {\n top: rect.top + window.pageYOffset,\n left: rect.left + window.pageXOffset\n };\n },\n\n position(element) {\n return {\n top: element.offsetTop,\n left: element.offsetLeft\n };\n }\n\n };\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): dom/selector-engine.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n const NODE_TEXT = 3;\n const SelectorEngine = {\n find(selector, element = document.documentElement) {\n return [].concat(...Element.prototype.querySelectorAll.call(element, selector));\n },\n\n findOne(selector, element = document.documentElement) {\n return Element.prototype.querySelector.call(element, selector);\n },\n\n children(element, selector) {\n return [].concat(...element.children).filter(child => child.matches(selector));\n },\n\n parents(element, selector) {\n const parents = [];\n let ancestor = element.parentNode;\n\n while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {\n if (ancestor.matches(selector)) {\n parents.push(ancestor);\n }\n\n ancestor = ancestor.parentNode;\n }\n\n return parents;\n },\n\n prev(element, selector) {\n let previous = element.previousElementSibling;\n\n while (previous) {\n if (previous.matches(selector)) {\n return [previous];\n }\n\n previous = previous.previousElementSibling;\n }\n\n return [];\n },\n\n next(element, selector) {\n let next = element.nextElementSibling;\n\n while (next) {\n if (next.matches(selector)) {\n return [next];\n }\n\n next = next.nextElementSibling;\n }\n\n return [];\n },\n\n focusableChildren(element) {\n const focusables = ['a', 'button', 'input', 'textarea', 'select', 'details', '[tabindex]', '[contenteditable=\"true\"]'].map(selector => `${selector}:not([tabindex^=\"-\"])`).join(', ');\n return this.find(focusables, element).filter(el => !isDisabled(el) && isVisible(el));\n }\n\n };\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): carousel.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME$b = 'carousel';\n const DATA_KEY$a = 'bs.carousel';\n const EVENT_KEY$a = `.${DATA_KEY$a}`;\n const DATA_API_KEY$6 = '.data-api';\n const ARROW_LEFT_KEY = 'ArrowLeft';\n const ARROW_RIGHT_KEY = 'ArrowRight';\n const TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch\n\n const SWIPE_THRESHOLD = 40;\n const Default$a = {\n interval: 5000,\n keyboard: true,\n slide: false,\n pause: 'hover',\n wrap: true,\n touch: true\n };\n const DefaultType$a = {\n interval: '(number|boolean)',\n keyboard: 'boolean',\n slide: '(boolean|string)',\n pause: '(string|boolean)',\n wrap: 'boolean',\n touch: 'boolean'\n };\n const ORDER_NEXT = 'next';\n const ORDER_PREV = 'prev';\n const DIRECTION_LEFT = 'left';\n const DIRECTION_RIGHT = 'right';\n const KEY_TO_DIRECTION = {\n [ARROW_LEFT_KEY]: DIRECTION_RIGHT,\n [ARROW_RIGHT_KEY]: DIRECTION_LEFT\n };\n const EVENT_SLIDE = `slide${EVENT_KEY$a}`;\n const EVENT_SLID = `slid${EVENT_KEY$a}`;\n const EVENT_KEYDOWN = `keydown${EVENT_KEY$a}`;\n const EVENT_MOUSEENTER = `mouseenter${EVENT_KEY$a}`;\n const EVENT_MOUSELEAVE = `mouseleave${EVENT_KEY$a}`;\n const EVENT_TOUCHSTART = `touchstart${EVENT_KEY$a}`;\n const EVENT_TOUCHMOVE = `touchmove${EVENT_KEY$a}`;\n const EVENT_TOUCHEND = `touchend${EVENT_KEY$a}`;\n const EVENT_POINTERDOWN = `pointerdown${EVENT_KEY$a}`;\n const EVENT_POINTERUP = `pointerup${EVENT_KEY$a}`;\n const EVENT_DRAG_START = `dragstart${EVENT_KEY$a}`;\n const EVENT_LOAD_DATA_API$2 = `load${EVENT_KEY$a}${DATA_API_KEY$6}`;\n const EVENT_CLICK_DATA_API$5 = `click${EVENT_KEY$a}${DATA_API_KEY$6}`;\n const CLASS_NAME_CAROUSEL = 'carousel';\n const CLASS_NAME_ACTIVE$2 = 'active';\n const CLASS_NAME_SLIDE = 'slide';\n const CLASS_NAME_END = 'carousel-item-end';\n const CLASS_NAME_START = 'carousel-item-start';\n const CLASS_NAME_NEXT = 'carousel-item-next';\n const CLASS_NAME_PREV = 'carousel-item-prev';\n const CLASS_NAME_POINTER_EVENT = 'pointer-event';\n const SELECTOR_ACTIVE$1 = '.active';\n const SELECTOR_ACTIVE_ITEM = '.active.carousel-item';\n const SELECTOR_ITEM = '.carousel-item';\n const SELECTOR_ITEM_IMG = '.carousel-item img';\n const SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev';\n const SELECTOR_INDICATORS = '.carousel-indicators';\n const SELECTOR_INDICATOR = '[data-bs-target]';\n const SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]';\n const SELECTOR_DATA_RIDE = '[data-bs-ride=\"carousel\"]';\n const POINTER_TYPE_TOUCH = 'touch';\n const POINTER_TYPE_PEN = 'pen';\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Carousel extends BaseComponent {\n constructor(element, config) {\n super(element);\n this._items = null;\n this._interval = null;\n this._activeElement = null;\n this._isPaused = false;\n this._isSliding = false;\n this.touchTimeout = null;\n this.touchStartX = 0;\n this.touchDeltaX = 0;\n this._config = this._getConfig(config);\n this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, this._element);\n this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;\n this._pointerEvent = Boolean(window.PointerEvent);\n\n this._addEventListeners();\n } // Getters\n\n\n static get Default() {\n return Default$a;\n }\n\n static get NAME() {\n return NAME$b;\n } // Public\n\n\n next() {\n this._slide(ORDER_NEXT);\n }\n\n nextWhenVisible() {\n // Don't call next when the page isn't visible\n // or the carousel or its parent isn't visible\n if (!document.hidden && isVisible(this._element)) {\n this.next();\n }\n }\n\n prev() {\n this._slide(ORDER_PREV);\n }\n\n pause(event) {\n if (!event) {\n this._isPaused = true;\n }\n\n if (SelectorEngine.findOne(SELECTOR_NEXT_PREV, this._element)) {\n triggerTransitionEnd(this._element);\n this.cycle(true);\n }\n\n clearInterval(this._interval);\n this._interval = null;\n }\n\n cycle(event) {\n if (!event) {\n this._isPaused = false;\n }\n\n if (this._interval) {\n clearInterval(this._interval);\n this._interval = null;\n }\n\n if (this._config && this._config.interval && !this._isPaused) {\n this._updateInterval();\n\n this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);\n }\n }\n\n to(index) {\n this._activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);\n\n const activeIndex = this._getItemIndex(this._activeElement);\n\n if (index > this._items.length - 1 || index < 0) {\n return;\n }\n\n if (this._isSliding) {\n EventHandler.one(this._element, EVENT_SLID, () => this.to(index));\n return;\n }\n\n if (activeIndex === index) {\n this.pause();\n this.cycle();\n return;\n }\n\n const order = index > activeIndex ? ORDER_NEXT : ORDER_PREV;\n\n this._slide(order, this._items[index]);\n } // Private\n\n\n _getConfig(config) {\n config = { ...Default$a,\n ...Manipulator.getDataAttributes(this._element),\n ...(typeof config === 'object' ? config : {})\n };\n typeCheckConfig(NAME$b, config, DefaultType$a);\n return config;\n }\n\n _handleSwipe() {\n const absDeltax = Math.abs(this.touchDeltaX);\n\n if (absDeltax <= SWIPE_THRESHOLD) {\n return;\n }\n\n const direction = absDeltax / this.touchDeltaX;\n this.touchDeltaX = 0;\n\n if (!direction) {\n return;\n }\n\n this._slide(direction > 0 ? DIRECTION_RIGHT : DIRECTION_LEFT);\n }\n\n _addEventListeners() {\n if (this._config.keyboard) {\n EventHandler.on(this._element, EVENT_KEYDOWN, event => this._keydown(event));\n }\n\n if (this._config.pause === 'hover') {\n EventHandler.on(this._element, EVENT_MOUSEENTER, event => this.pause(event));\n EventHandler.on(this._element, EVENT_MOUSELEAVE, event => this.cycle(event));\n }\n\n if (this._config.touch && this._touchSupported) {\n this._addTouchEventListeners();\n }\n }\n\n _addTouchEventListeners() {\n const hasPointerPenTouch = event => {\n return this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH);\n };\n\n const start = event => {\n if (hasPointerPenTouch(event)) {\n this.touchStartX = event.clientX;\n } else if (!this._pointerEvent) {\n this.touchStartX = event.touches[0].clientX;\n }\n };\n\n const move = event => {\n // ensure swiping with one touch and not pinching\n this.touchDeltaX = event.touches && event.touches.length > 1 ? 0 : event.touches[0].clientX - this.touchStartX;\n };\n\n const end = event => {\n if (hasPointerPenTouch(event)) {\n this.touchDeltaX = event.clientX - this.touchStartX;\n }\n\n this._handleSwipe();\n\n if (this._config.pause === 'hover') {\n // If it's a touch-enabled device, mouseenter/leave are fired as\n // part of the mouse compatibility events on first tap - the carousel\n // would stop cycling until user tapped out of it;\n // here, we listen for touchend, explicitly pause the carousel\n // (as if it's the second time we tap on it, mouseenter compat event\n // is NOT fired) and after a timeout (to allow for mouse compatibility\n // events to fire) we explicitly restart cycling\n this.pause();\n\n if (this.touchTimeout) {\n clearTimeout(this.touchTimeout);\n }\n\n this.touchTimeout = setTimeout(event => this.cycle(event), TOUCHEVENT_COMPAT_WAIT + this._config.interval);\n }\n };\n\n SelectorEngine.find(SELECTOR_ITEM_IMG, this._element).forEach(itemImg => {\n EventHandler.on(itemImg, EVENT_DRAG_START, event => event.preventDefault());\n });\n\n if (this._pointerEvent) {\n EventHandler.on(this._element, EVENT_POINTERDOWN, event => start(event));\n EventHandler.on(this._element, EVENT_POINTERUP, event => end(event));\n\n this._element.classList.add(CLASS_NAME_POINTER_EVENT);\n } else {\n EventHandler.on(this._element, EVENT_TOUCHSTART, event => start(event));\n EventHandler.on(this._element, EVENT_TOUCHMOVE, event => move(event));\n EventHandler.on(this._element, EVENT_TOUCHEND, event => end(event));\n }\n }\n\n _keydown(event) {\n if (/input|textarea/i.test(event.target.tagName)) {\n return;\n }\n\n const direction = KEY_TO_DIRECTION[event.key];\n\n if (direction) {\n event.preventDefault();\n\n this._slide(direction);\n }\n }\n\n _getItemIndex(element) {\n this._items = element && element.parentNode ? SelectorEngine.find(SELECTOR_ITEM, element.parentNode) : [];\n return this._items.indexOf(element);\n }\n\n _getItemByOrder(order, activeElement) {\n const isNext = order === ORDER_NEXT;\n return getNextActiveElement(this._items, activeElement, isNext, this._config.wrap);\n }\n\n _triggerSlideEvent(relatedTarget, eventDirectionName) {\n const targetIndex = this._getItemIndex(relatedTarget);\n\n const fromIndex = this._getItemIndex(SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element));\n\n return EventHandler.trigger(this._element, EVENT_SLIDE, {\n relatedTarget,\n direction: eventDirectionName,\n from: fromIndex,\n to: targetIndex\n });\n }\n\n _setActiveIndicatorElement(element) {\n if (this._indicatorsElement) {\n const activeIndicator = SelectorEngine.findOne(SELECTOR_ACTIVE$1, this._indicatorsElement);\n activeIndicator.classList.remove(CLASS_NAME_ACTIVE$2);\n activeIndicator.removeAttribute('aria-current');\n const indicators = SelectorEngine.find(SELECTOR_INDICATOR, this._indicatorsElement);\n\n for (let i = 0; i < indicators.length; i++) {\n if (Number.parseInt(indicators[i].getAttribute('data-bs-slide-to'), 10) === this._getItemIndex(element)) {\n indicators[i].classList.add(CLASS_NAME_ACTIVE$2);\n indicators[i].setAttribute('aria-current', 'true');\n break;\n }\n }\n }\n }\n\n _updateInterval() {\n const element = this._activeElement || SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);\n\n if (!element) {\n return;\n }\n\n const elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10);\n\n if (elementInterval) {\n this._config.defaultInterval = this._config.defaultInterval || this._config.interval;\n this._config.interval = elementInterval;\n } else {\n this._config.interval = this._config.defaultInterval || this._config.interval;\n }\n }\n\n _slide(directionOrOrder, element) {\n const order = this._directionToOrder(directionOrOrder);\n\n const activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);\n\n const activeElementIndex = this._getItemIndex(activeElement);\n\n const nextElement = element || this._getItemByOrder(order, activeElement);\n\n const nextElementIndex = this._getItemIndex(nextElement);\n\n const isCycling = Boolean(this._interval);\n const isNext = order === ORDER_NEXT;\n const directionalClassName = isNext ? CLASS_NAME_START : CLASS_NAME_END;\n const orderClassName = isNext ? CLASS_NAME_NEXT : CLASS_NAME_PREV;\n\n const eventDirectionName = this._orderToDirection(order);\n\n if (nextElement && nextElement.classList.contains(CLASS_NAME_ACTIVE$2)) {\n this._isSliding = false;\n return;\n }\n\n if (this._isSliding) {\n return;\n }\n\n const slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);\n\n if (slideEvent.defaultPrevented) {\n return;\n }\n\n if (!activeElement || !nextElement) {\n // Some weirdness is happening, so we bail\n return;\n }\n\n this._isSliding = true;\n\n if (isCycling) {\n this.pause();\n }\n\n this._setActiveIndicatorElement(nextElement);\n\n this._activeElement = nextElement;\n\n const triggerSlidEvent = () => {\n EventHandler.trigger(this._element, EVENT_SLID, {\n relatedTarget: nextElement,\n direction: eventDirectionName,\n from: activeElementIndex,\n to: nextElementIndex\n });\n };\n\n if (this._element.classList.contains(CLASS_NAME_SLIDE)) {\n nextElement.classList.add(orderClassName);\n reflow(nextElement);\n activeElement.classList.add(directionalClassName);\n nextElement.classList.add(directionalClassName);\n\n const completeCallBack = () => {\n nextElement.classList.remove(directionalClassName, orderClassName);\n nextElement.classList.add(CLASS_NAME_ACTIVE$2);\n activeElement.classList.remove(CLASS_NAME_ACTIVE$2, orderClassName, directionalClassName);\n this._isSliding = false;\n setTimeout(triggerSlidEvent, 0);\n };\n\n this._queueCallback(completeCallBack, activeElement, true);\n } else {\n activeElement.classList.remove(CLASS_NAME_ACTIVE$2);\n nextElement.classList.add(CLASS_NAME_ACTIVE$2);\n this._isSliding = false;\n triggerSlidEvent();\n }\n\n if (isCycling) {\n this.cycle();\n }\n }\n\n _directionToOrder(direction) {\n if (![DIRECTION_RIGHT, DIRECTION_LEFT].includes(direction)) {\n return direction;\n }\n\n if (isRTL()) {\n return direction === DIRECTION_LEFT ? ORDER_PREV : ORDER_NEXT;\n }\n\n return direction === DIRECTION_LEFT ? ORDER_NEXT : ORDER_PREV;\n }\n\n _orderToDirection(order) {\n if (![ORDER_NEXT, ORDER_PREV].includes(order)) {\n return order;\n }\n\n if (isRTL()) {\n return order === ORDER_PREV ? DIRECTION_LEFT : DIRECTION_RIGHT;\n }\n\n return order === ORDER_PREV ? DIRECTION_RIGHT : DIRECTION_LEFT;\n } // Static\n\n\n static carouselInterface(element, config) {\n const data = Carousel.getOrCreateInstance(element, config);\n let {\n _config\n } = data;\n\n if (typeof config === 'object') {\n _config = { ..._config,\n ...config\n };\n }\n\n const action = typeof config === 'string' ? config : _config.slide;\n\n if (typeof config === 'number') {\n data.to(config);\n } else if (typeof action === 'string') {\n if (typeof data[action] === 'undefined') {\n throw new TypeError(`No method named \"${action}\"`);\n }\n\n data[action]();\n } else if (_config.interval && _config.ride) {\n data.pause();\n data.cycle();\n }\n }\n\n static jQueryInterface(config) {\n return this.each(function () {\n Carousel.carouselInterface(this, config);\n });\n }\n\n static dataApiClickHandler(event) {\n const target = getElementFromSelector(this);\n\n if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {\n return;\n }\n\n const config = { ...Manipulator.getDataAttributes(target),\n ...Manipulator.getDataAttributes(this)\n };\n const slideIndex = this.getAttribute('data-bs-slide-to');\n\n if (slideIndex) {\n config.interval = false;\n }\n\n Carousel.carouselInterface(target, config);\n\n if (slideIndex) {\n Carousel.getInstance(target).to(slideIndex);\n }\n\n event.preventDefault();\n }\n\n }\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n\n EventHandler.on(document, EVENT_CLICK_DATA_API$5, SELECTOR_DATA_SLIDE, Carousel.dataApiClickHandler);\n EventHandler.on(window, EVENT_LOAD_DATA_API$2, () => {\n const carousels = SelectorEngine.find(SELECTOR_DATA_RIDE);\n\n for (let i = 0, len = carousels.length; i < len; i++) {\n Carousel.carouselInterface(carousels[i], Carousel.getInstance(carousels[i]));\n }\n });\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Carousel to jQuery only if jQuery is present\n */\n\n defineJQueryPlugin(Carousel);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): collapse.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME$a = 'collapse';\n const DATA_KEY$9 = 'bs.collapse';\n const EVENT_KEY$9 = `.${DATA_KEY$9}`;\n const DATA_API_KEY$5 = '.data-api';\n const Default$9 = {\n toggle: true,\n parent: null\n };\n const DefaultType$9 = {\n toggle: 'boolean',\n parent: '(null|element)'\n };\n const EVENT_SHOW$5 = `show${EVENT_KEY$9}`;\n const EVENT_SHOWN$5 = `shown${EVENT_KEY$9}`;\n const EVENT_HIDE$5 = `hide${EVENT_KEY$9}`;\n const EVENT_HIDDEN$5 = `hidden${EVENT_KEY$9}`;\n const EVENT_CLICK_DATA_API$4 = `click${EVENT_KEY$9}${DATA_API_KEY$5}`;\n const CLASS_NAME_SHOW$7 = 'show';\n const CLASS_NAME_COLLAPSE = 'collapse';\n const CLASS_NAME_COLLAPSING = 'collapsing';\n const CLASS_NAME_COLLAPSED = 'collapsed';\n const CLASS_NAME_DEEPER_CHILDREN = `:scope .${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`;\n const CLASS_NAME_HORIZONTAL = 'collapse-horizontal';\n const WIDTH = 'width';\n const HEIGHT = 'height';\n const SELECTOR_ACTIVES = '.collapse.show, .collapse.collapsing';\n const SELECTOR_DATA_TOGGLE$4 = '[data-bs-toggle=\"collapse\"]';\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Collapse extends BaseComponent {\n constructor(element, config) {\n super(element);\n this._isTransitioning = false;\n this._config = this._getConfig(config);\n this._triggerArray = [];\n const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE$4);\n\n for (let i = 0, len = toggleList.length; i < len; i++) {\n const elem = toggleList[i];\n const selector = getSelectorFromElement(elem);\n const filterElement = SelectorEngine.find(selector).filter(foundElem => foundElem === this._element);\n\n if (selector !== null && filterElement.length) {\n this._selector = selector;\n\n this._triggerArray.push(elem);\n }\n }\n\n this._initializeChildren();\n\n if (!this._config.parent) {\n this._addAriaAndCollapsedClass(this._triggerArray, this._isShown());\n }\n\n if (this._config.toggle) {\n this.toggle();\n }\n } // Getters\n\n\n static get Default() {\n return Default$9;\n }\n\n static get NAME() {\n return NAME$a;\n } // Public\n\n\n toggle() {\n if (this._isShown()) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n show() {\n if (this._isTransitioning || this._isShown()) {\n return;\n }\n\n let actives = [];\n let activesData;\n\n if (this._config.parent) {\n const children = SelectorEngine.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent);\n actives = SelectorEngine.find(SELECTOR_ACTIVES, this._config.parent).filter(elem => !children.includes(elem)); // remove children if greater depth\n }\n\n const container = SelectorEngine.findOne(this._selector);\n\n if (actives.length) {\n const tempActiveData = actives.find(elem => container !== elem);\n activesData = tempActiveData ? Collapse.getInstance(tempActiveData) : null;\n\n if (activesData && activesData._isTransitioning) {\n return;\n }\n }\n\n const startEvent = EventHandler.trigger(this._element, EVENT_SHOW$5);\n\n if (startEvent.defaultPrevented) {\n return;\n }\n\n actives.forEach(elemActive => {\n if (container !== elemActive) {\n Collapse.getOrCreateInstance(elemActive, {\n toggle: false\n }).hide();\n }\n\n if (!activesData) {\n Data.set(elemActive, DATA_KEY$9, null);\n }\n });\n\n const dimension = this._getDimension();\n\n this._element.classList.remove(CLASS_NAME_COLLAPSE);\n\n this._element.classList.add(CLASS_NAME_COLLAPSING);\n\n this._element.style[dimension] = 0;\n\n this._addAriaAndCollapsedClass(this._triggerArray, true);\n\n this._isTransitioning = true;\n\n const complete = () => {\n this._isTransitioning = false;\n\n this._element.classList.remove(CLASS_NAME_COLLAPSING);\n\n this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);\n\n this._element.style[dimension] = '';\n EventHandler.trigger(this._element, EVENT_SHOWN$5);\n };\n\n const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);\n const scrollSize = `scroll${capitalizedDimension}`;\n\n this._queueCallback(complete, this._element, true);\n\n this._element.style[dimension] = `${this._element[scrollSize]}px`;\n }\n\n hide() {\n if (this._isTransitioning || !this._isShown()) {\n return;\n }\n\n const startEvent = EventHandler.trigger(this._element, EVENT_HIDE$5);\n\n if (startEvent.defaultPrevented) {\n return;\n }\n\n const dimension = this._getDimension();\n\n this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`;\n reflow(this._element);\n\n this._element.classList.add(CLASS_NAME_COLLAPSING);\n\n this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);\n\n const triggerArrayLength = this._triggerArray.length;\n\n for (let i = 0; i < triggerArrayLength; i++) {\n const trigger = this._triggerArray[i];\n const elem = getElementFromSelector(trigger);\n\n if (elem && !this._isShown(elem)) {\n this._addAriaAndCollapsedClass([trigger], false);\n }\n }\n\n this._isTransitioning = true;\n\n const complete = () => {\n this._isTransitioning = false;\n\n this._element.classList.remove(CLASS_NAME_COLLAPSING);\n\n this._element.classList.add(CLASS_NAME_COLLAPSE);\n\n EventHandler.trigger(this._element, EVENT_HIDDEN$5);\n };\n\n this._element.style[dimension] = '';\n\n this._queueCallback(complete, this._element, true);\n }\n\n _isShown(element = this._element) {\n return element.classList.contains(CLASS_NAME_SHOW$7);\n } // Private\n\n\n _getConfig(config) {\n config = { ...Default$9,\n ...Manipulator.getDataAttributes(this._element),\n ...config\n };\n config.toggle = Boolean(config.toggle); // Coerce string values\n\n config.parent = getElement(config.parent);\n typeCheckConfig(NAME$a, config, DefaultType$9);\n return config;\n }\n\n _getDimension() {\n return this._element.classList.contains(CLASS_NAME_HORIZONTAL) ? WIDTH : HEIGHT;\n }\n\n _initializeChildren() {\n if (!this._config.parent) {\n return;\n }\n\n const children = SelectorEngine.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent);\n SelectorEngine.find(SELECTOR_DATA_TOGGLE$4, this._config.parent).filter(elem => !children.includes(elem)).forEach(element => {\n const selected = getElementFromSelector(element);\n\n if (selected) {\n this._addAriaAndCollapsedClass([element], this._isShown(selected));\n }\n });\n }\n\n _addAriaAndCollapsedClass(triggerArray, isOpen) {\n if (!triggerArray.length) {\n return;\n }\n\n triggerArray.forEach(elem => {\n if (isOpen) {\n elem.classList.remove(CLASS_NAME_COLLAPSED);\n } else {\n elem.classList.add(CLASS_NAME_COLLAPSED);\n }\n\n elem.setAttribute('aria-expanded', isOpen);\n });\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const _config = {};\n\n if (typeof config === 'string' && /show|hide/.test(config)) {\n _config.toggle = false;\n }\n\n const data = Collapse.getOrCreateInstance(this, _config);\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n }\n });\n }\n\n }\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n\n EventHandler.on(document, EVENT_CLICK_DATA_API$4, SELECTOR_DATA_TOGGLE$4, function (event) {\n // preventDefault only for <a> elements (which change the URL) not inside the collapsible element\n if (event.target.tagName === 'A' || event.delegateTarget && event.delegateTarget.tagName === 'A') {\n event.preventDefault();\n }\n\n const selector = getSelectorFromElement(this);\n const selectorElements = SelectorEngine.find(selector);\n selectorElements.forEach(element => {\n Collapse.getOrCreateInstance(element, {\n toggle: false\n }).toggle();\n });\n });\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Collapse to jQuery only if jQuery is present\n */\n\n defineJQueryPlugin(Collapse);\n\n var top = 'top';\n var bottom = 'bottom';\n var right = 'right';\n var left = 'left';\n var auto = 'auto';\n var basePlacements = [top, bottom, right, left];\n var start = 'start';\n var end = 'end';\n var clippingParents = 'clippingParents';\n var viewport = 'viewport';\n var popper = 'popper';\n var reference = 'reference';\n var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n }, []);\n var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n }, []); // modifiers that need to read the DOM\n\n var beforeRead = 'beforeRead';\n var read = 'read';\n var afterRead = 'afterRead'; // pure-logic modifiers\n\n var beforeMain = 'beforeMain';\n var main = 'main';\n var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\n var beforeWrite = 'beforeWrite';\n var write = 'write';\n var afterWrite = 'afterWrite';\n var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];\n\n function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n }\n\n function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n }\n\n function isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n }\n\n function isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n }\n\n function isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n }\n\n // and applies them to the HTMLElements such as popper and arrow\n\n function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n }\n\n function effect$2(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const applyStyles$1 = {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect$2,\n requires: ['computeStyles']\n };\n\n function getBasePlacement(placement) {\n return placement.split('-')[0];\n }\n\n // import { isHTMLElement } from './instanceOf';\n function getBoundingClientRect(element, // eslint-disable-next-line unused-imports/no-unused-vars\n includeScale) {\n\n var rect = element.getBoundingClientRect();\n var scaleX = 1;\n var scaleY = 1; // FIXME:\n // `offsetWidth` returns an integer while `getBoundingClientRect`\n // returns a float. This results in `scaleX` or `scaleY` being\n // non-1 when it should be for elements that aren't a full pixel in\n // width or height.\n // if (isHTMLElement(element) && includeScale) {\n // const offsetHeight = element.offsetHeight;\n // const offsetWidth = element.offsetWidth;\n // // Do not attempt to divide by 0, otherwise we get `Infinity` as scale\n // // Fallback to 1 in case both values are `0`\n // if (offsetWidth > 0) {\n // scaleX = rect.width / offsetWidth || 1;\n // }\n // if (offsetHeight > 0) {\n // scaleY = rect.height / offsetHeight || 1;\n // }\n // }\n\n return {\n width: rect.width / scaleX,\n height: rect.height / scaleY,\n top: rect.top / scaleY,\n right: rect.right / scaleX,\n bottom: rect.bottom / scaleY,\n left: rect.left / scaleX,\n x: rect.left / scaleX,\n y: rect.top / scaleY\n };\n }\n\n // means it doesn't take into account transforms.\n\n function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n }\n\n function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n }\n\n function getComputedStyle$1(element) {\n return getWindow(element).getComputedStyle(element);\n }\n\n function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n }\n\n function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n }\n\n function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n }\n\n function getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle$1(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n } // `.offsetParent` reports `null` for fixed elements, while absolute elements\n // return the containing block\n\n\n function getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n var isIE = navigator.userAgent.indexOf('Trident') !== -1;\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle$1(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle$1(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n } // Gets the closest ancestor positioned element. Handles some edge cases,\n // such as table ancestors and cross browser bugs.\n\n\n function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle$1(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n }\n\n function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n }\n\n var max = Math.max;\n var min = Math.min;\n var round = Math.round;\n\n function within(min$1, value, max$1) {\n return max(min$1, min(value, max$1));\n }\n\n function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n }\n\n function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n }\n\n function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n }\n\n var toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n };\n\n function arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n }\n\n function effect$1(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n\n return;\n }\n\n state.elements.arrow = arrowElement;\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const arrow$1 = {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect$1,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n };\n\n function getVariation(placement) {\n return placement.split('-')[1];\n }\n\n var unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n }; // Round the offsets to the nearest suitable subpixel based on the DPR.\n // Zooming can change the DPR, but it seems to report a value that will\n // cleanly divide the values into the appropriate subpixels.\n\n function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(round(x * dpr) / dpr) || 0,\n y: round(round(y * dpr) / dpr) || 0\n };\n }\n\n function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets;\n\n var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets,\n _ref3$x = _ref3.x,\n x = _ref3$x === void 0 ? 0 : _ref3$x,\n _ref3$y = _ref3.y,\n y = _ref3$y === void 0 ? 0 : _ref3$y;\n\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle$1(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom; // $FlowFixMe[prop-missing]\n\n y -= offsetParent[heightProp] - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right; // $FlowFixMe[prop-missing]\n\n x -= offsetParent[widthProp] - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n }\n\n function computeStyles(_ref4) {\n var state = _ref4.state,\n options = _ref4.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const computeStyles$1 = {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n };\n\n var passive = {\n passive: true\n };\n\n function effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const eventListeners = {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n };\n\n var hash$1 = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n };\n function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash$1[matched];\n });\n }\n\n var hash = {\n start: 'end',\n end: 'start'\n };\n function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n }\n\n function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n }\n\n function getWindowScrollBarX(element) {\n // If <html> has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on <html>\n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n }\n\n function getViewportRect(element) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0; // NB: This isn't supported on iOS <= 12. If the keyboard is open, the popper\n // can be obscured underneath it.\n // Also, `html.clientHeight` adds the bottom bar height in Safari iOS, even\n // if it isn't open, so if this isn't available, the popper will be detected\n // to overflow the bottom of the screen too early.\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height; // Uses Layout Viewport (like Chrome; Safari does not currently)\n // In Chrome, it returns a value very close to 0 (+/-) but contains rounding\n // errors due to floating point numbers, so we need to check precision.\n // Safari returns a number <= 0, usually < -1 when pinch-zoomed\n // Feature detection fails in mobile emulation mode in Chrome.\n // Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) <\n // 0.001\n // Fallback here: \"Not Safari\" userAgent\n\n if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n }\n\n // of the `<html>` and `<body>` rect bounds if horizontally scrollable\n\n function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle$1(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n }\n\n function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle$1(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n }\n\n function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n }\n\n /*\n given a DOM element, return the list of all scroll parents, up the list of ancesors\n until we get to the top window object. This list is what we attach scroll listeners\n to, because if any of these parent elements scroll, we'll need to re-calculate the\n reference element's position.\n */\n\n function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n }\n\n function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n }\n\n function getInnerBoundingClientRect(element) {\n var rect = getBoundingClientRect(element);\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n }\n\n function getClientRectFromMixedType(element, clippingParent) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isHTMLElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n } // A \"clipping parent\" is an overflowable container with the characteristic of\n // clipping (or hiding) overflowing elements with a position different from\n // `initial`\n\n\n function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle$1(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n } // Gets the maximum area that the element is visible in due to any number of\n // clipping parents\n\n\n function getClippingRect(element, boundary, rootBoundary) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n }\n\n function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n }\n }\n\n return offsets;\n }\n\n function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n }\n\n function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements$1 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements$1.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements$1;\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n }\n\n function getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n }\n\n function flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const flip$1 = {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n };\n\n function getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n }\n\n function isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n }\n\n function hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const hide$1 = {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n };\n\n function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n }\n\n function offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const offset$1 = {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n };\n\n function popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const popperOffsets$1 = {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n };\n\n function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n }\n\n function preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis || checkAltAxis) {\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min$1 = popperOffsets[mainAxis] + overflow[mainSide];\n var max$1 = popperOffsets[mainAxis] - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - tetherOffsetValue : minLen - arrowLen - arrowPaddingMin - tetherOffsetValue;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + tetherOffsetValue : maxLen + arrowLen + arrowPaddingMax + tetherOffsetValue;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = state.modifiersData.offset ? state.modifiersData.offset[state.placement][mainAxis] : 0;\n var tetherMin = popperOffsets[mainAxis] + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = popperOffsets[mainAxis] + maxOffset - offsetModifierValue;\n\n if (checkMainAxis) {\n var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var _preventedOffset = within(tether ? min(_min, tetherMin) : _min, _offset, tether ? max(_max, tetherMax) : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n }\n\n state.modifiersData[name] = data;\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const preventOverflow$1 = {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n };\n\n function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n\n function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n }\n\n function isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = rect.width / element.offsetWidth || 1;\n var scaleY = rect.height / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n } // Returns the composite rect of an element relative to its offsetParent.\n // Composite means it takes into account transforms as well as layout.\n\n\n function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n }\n\n function order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n }\n\n function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n }\n\n function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n }\n\n function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n }\n\n var DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n };\n\n function areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n }\n\n function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n }); // Validate the provided modifiers so that the consumer will get warned\n\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n }\n var createPopper$2 = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\n var defaultModifiers$1 = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1];\n var createPopper$1 = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers$1\n }); // eslint-disable-next-line import/no-unused-modules\n\n var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$1, flip$1, preventOverflow$1, arrow$1, hide$1];\n var createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n }); // eslint-disable-next-line import/no-unused-modules\n\n const Popper = /*#__PURE__*/Object.freeze({\n __proto__: null,\n popperGenerator,\n detectOverflow,\n createPopperBase: createPopper$2,\n createPopper,\n createPopperLite: createPopper$1,\n top,\n bottom,\n right,\n left,\n auto,\n basePlacements,\n start,\n end,\n clippingParents,\n viewport,\n popper,\n reference,\n variationPlacements,\n placements,\n beforeRead,\n read,\n afterRead,\n beforeMain,\n main,\n afterMain,\n beforeWrite,\n write,\n afterWrite,\n modifierPhases,\n applyStyles: applyStyles$1,\n arrow: arrow$1,\n computeStyles: computeStyles$1,\n eventListeners,\n flip: flip$1,\n hide: hide$1,\n offset: offset$1,\n popperOffsets: popperOffsets$1,\n preventOverflow: preventOverflow$1\n });\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): dropdown.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME$9 = 'dropdown';\n const DATA_KEY$8 = 'bs.dropdown';\n const EVENT_KEY$8 = `.${DATA_KEY$8}`;\n const DATA_API_KEY$4 = '.data-api';\n const ESCAPE_KEY$2 = 'Escape';\n const SPACE_KEY = 'Space';\n const TAB_KEY$1 = 'Tab';\n const ARROW_UP_KEY = 'ArrowUp';\n const ARROW_DOWN_KEY = 'ArrowDown';\n const RIGHT_MOUSE_BUTTON = 2; // MouseEvent.button value for the secondary button, usually the right button\n\n const REGEXP_KEYDOWN = new RegExp(`${ARROW_UP_KEY}|${ARROW_DOWN_KEY}|${ESCAPE_KEY$2}`);\n const EVENT_HIDE$4 = `hide${EVENT_KEY$8}`;\n const EVENT_HIDDEN$4 = `hidden${EVENT_KEY$8}`;\n const EVENT_SHOW$4 = `show${EVENT_KEY$8}`;\n const EVENT_SHOWN$4 = `shown${EVENT_KEY$8}`;\n const EVENT_CLICK_DATA_API$3 = `click${EVENT_KEY$8}${DATA_API_KEY$4}`;\n const EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY$8}${DATA_API_KEY$4}`;\n const EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY$8}${DATA_API_KEY$4}`;\n const CLASS_NAME_SHOW$6 = 'show';\n const CLASS_NAME_DROPUP = 'dropup';\n const CLASS_NAME_DROPEND = 'dropend';\n const CLASS_NAME_DROPSTART = 'dropstart';\n const CLASS_NAME_NAVBAR = 'navbar';\n const SELECTOR_DATA_TOGGLE$3 = '[data-bs-toggle=\"dropdown\"]';\n const SELECTOR_MENU = '.dropdown-menu';\n const SELECTOR_NAVBAR_NAV = '.navbar-nav';\n const SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';\n const PLACEMENT_TOP = isRTL() ? 'top-end' : 'top-start';\n const PLACEMENT_TOPEND = isRTL() ? 'top-start' : 'top-end';\n const PLACEMENT_BOTTOM = isRTL() ? 'bottom-end' : 'bottom-start';\n const PLACEMENT_BOTTOMEND = isRTL() ? 'bottom-start' : 'bottom-end';\n const PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start';\n const PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start';\n const Default$8 = {\n offset: [0, 2],\n boundary: 'clippingParents',\n reference: 'toggle',\n display: 'dynamic',\n popperConfig: null,\n autoClose: true\n };\n const DefaultType$8 = {\n offset: '(array|string|function)',\n boundary: '(string|element)',\n reference: '(string|element|object)',\n display: 'string',\n popperConfig: '(null|object|function)',\n autoClose: '(boolean|string)'\n };\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Dropdown extends BaseComponent {\n constructor(element, config) {\n super(element);\n this._popper = null;\n this._config = this._getConfig(config);\n this._menu = this._getMenuElement();\n this._inNavbar = this._detectNavbar();\n } // Getters\n\n\n static get Default() {\n return Default$8;\n }\n\n static get DefaultType() {\n return DefaultType$8;\n }\n\n static get NAME() {\n return NAME$9;\n } // Public\n\n\n toggle() {\n return this._isShown() ? this.hide() : this.show();\n }\n\n show() {\n if (isDisabled(this._element) || this._isShown(this._menu)) {\n return;\n }\n\n const relatedTarget = {\n relatedTarget: this._element\n };\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$4, relatedTarget);\n\n if (showEvent.defaultPrevented) {\n return;\n }\n\n const parent = Dropdown.getParentFromElement(this._element); // Totally disable Popper for Dropdowns in Navbar\n\n if (this._inNavbar) {\n Manipulator.setDataAttribute(this._menu, 'popper', 'none');\n } else {\n this._createPopper(parent);\n } // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n\n\n if ('ontouchstart' in document.documentElement && !parent.closest(SELECTOR_NAVBAR_NAV)) {\n [].concat(...document.body.children).forEach(elem => EventHandler.on(elem, 'mouseover', noop));\n }\n\n this._element.focus();\n\n this._element.setAttribute('aria-expanded', true);\n\n this._menu.classList.add(CLASS_NAME_SHOW$6);\n\n this._element.classList.add(CLASS_NAME_SHOW$6);\n\n EventHandler.trigger(this._element, EVENT_SHOWN$4, relatedTarget);\n }\n\n hide() {\n if (isDisabled(this._element) || !this._isShown(this._menu)) {\n return;\n }\n\n const relatedTarget = {\n relatedTarget: this._element\n };\n\n this._completeHide(relatedTarget);\n }\n\n dispose() {\n if (this._popper) {\n this._popper.destroy();\n }\n\n super.dispose();\n }\n\n update() {\n this._inNavbar = this._detectNavbar();\n\n if (this._popper) {\n this._popper.update();\n }\n } // Private\n\n\n _completeHide(relatedTarget) {\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$4, relatedTarget);\n\n if (hideEvent.defaultPrevented) {\n return;\n } // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n\n\n if ('ontouchstart' in document.documentElement) {\n [].concat(...document.body.children).forEach(elem => EventHandler.off(elem, 'mouseover', noop));\n }\n\n if (this._popper) {\n this._popper.destroy();\n }\n\n this._menu.classList.remove(CLASS_NAME_SHOW$6);\n\n this._element.classList.remove(CLASS_NAME_SHOW$6);\n\n this._element.setAttribute('aria-expanded', 'false');\n\n Manipulator.removeDataAttribute(this._menu, 'popper');\n EventHandler.trigger(this._element, EVENT_HIDDEN$4, relatedTarget);\n }\n\n _getConfig(config) {\n config = { ...this.constructor.Default,\n ...Manipulator.getDataAttributes(this._element),\n ...config\n };\n typeCheckConfig(NAME$9, config, this.constructor.DefaultType);\n\n if (typeof config.reference === 'object' && !isElement$1(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') {\n // Popper virtual elements require a getBoundingClientRect method\n throw new TypeError(`${NAME$9.toUpperCase()}: Option \"reference\" provided type \"object\" without a required \"getBoundingClientRect\" method.`);\n }\n\n return config;\n }\n\n _createPopper(parent) {\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap\\'s dropdowns require Popper (https://popper.js.org)');\n }\n\n let referenceElement = this._element;\n\n if (this._config.reference === 'parent') {\n referenceElement = parent;\n } else if (isElement$1(this._config.reference)) {\n referenceElement = getElement(this._config.reference);\n } else if (typeof this._config.reference === 'object') {\n referenceElement = this._config.reference;\n }\n\n const popperConfig = this._getPopperConfig();\n\n const isDisplayStatic = popperConfig.modifiers.find(modifier => modifier.name === 'applyStyles' && modifier.enabled === false);\n this._popper = createPopper(referenceElement, this._menu, popperConfig);\n\n if (isDisplayStatic) {\n Manipulator.setDataAttribute(this._menu, 'popper', 'static');\n }\n }\n\n _isShown(element = this._element) {\n return element.classList.contains(CLASS_NAME_SHOW$6);\n }\n\n _getMenuElement() {\n return SelectorEngine.next(this._element, SELECTOR_MENU)[0];\n }\n\n _getPlacement() {\n const parentDropdown = this._element.parentNode;\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) {\n return PLACEMENT_RIGHT;\n }\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) {\n return PLACEMENT_LEFT;\n } // We need to trim the value because custom properties can also include spaces\n\n\n const isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end';\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {\n return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP;\n }\n\n return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM;\n }\n\n _detectNavbar() {\n return this._element.closest(`.${CLASS_NAME_NAVBAR}`) !== null;\n }\n\n _getOffset() {\n const {\n offset\n } = this._config;\n\n if (typeof offset === 'string') {\n return offset.split(',').map(val => Number.parseInt(val, 10));\n }\n\n if (typeof offset === 'function') {\n return popperData => offset(popperData, this._element);\n }\n\n return offset;\n }\n\n _getPopperConfig() {\n const defaultBsPopperConfig = {\n placement: this._getPlacement(),\n modifiers: [{\n name: 'preventOverflow',\n options: {\n boundary: this._config.boundary\n }\n }, {\n name: 'offset',\n options: {\n offset: this._getOffset()\n }\n }]\n }; // Disable Popper if we have a static display\n\n if (this._config.display === 'static') {\n defaultBsPopperConfig.modifiers = [{\n name: 'applyStyles',\n enabled: false\n }];\n }\n\n return { ...defaultBsPopperConfig,\n ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)\n };\n }\n\n _selectMenuItem({\n key,\n target\n }) {\n const items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, this._menu).filter(isVisible);\n\n if (!items.length) {\n return;\n } // if target isn't included in items (e.g. when expanding the dropdown)\n // allow cycling to get the last item in case key equals ARROW_UP_KEY\n\n\n getNextActiveElement(items, target, key === ARROW_DOWN_KEY, !items.includes(target)).focus();\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Dropdown.getOrCreateInstance(this, config);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n });\n }\n\n static clearMenus(event) {\n if (event && (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY$1)) {\n return;\n }\n\n const toggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE$3);\n\n for (let i = 0, len = toggles.length; i < len; i++) {\n const context = Dropdown.getInstance(toggles[i]);\n\n if (!context || context._config.autoClose === false) {\n continue;\n }\n\n if (!context._isShown()) {\n continue;\n }\n\n const relatedTarget = {\n relatedTarget: context._element\n };\n\n if (event) {\n const composedPath = event.composedPath();\n const isMenuTarget = composedPath.includes(context._menu);\n\n if (composedPath.includes(context._element) || context._config.autoClose === 'inside' && !isMenuTarget || context._config.autoClose === 'outside' && isMenuTarget) {\n continue;\n } // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu\n\n\n if (context._menu.contains(event.target) && (event.type === 'keyup' && event.key === TAB_KEY$1 || /input|select|option|textarea|form/i.test(event.target.tagName))) {\n continue;\n }\n\n if (event.type === 'click') {\n relatedTarget.clickEvent = event;\n }\n }\n\n context._completeHide(relatedTarget);\n }\n }\n\n static getParentFromElement(element) {\n return getElementFromSelector(element) || element.parentNode;\n }\n\n static dataApiKeydownHandler(event) {\n // If not input/textarea:\n // - And not a key in REGEXP_KEYDOWN => not a dropdown command\n // If input/textarea:\n // - If space key => not a dropdown command\n // - If key is other than escape\n // - If key is not up or down => not a dropdown command\n // - If trigger inside the menu => not a dropdown command\n if (/input|textarea/i.test(event.target.tagName) ? event.key === SPACE_KEY || event.key !== ESCAPE_KEY$2 && (event.key !== ARROW_DOWN_KEY && event.key !== ARROW_UP_KEY || event.target.closest(SELECTOR_MENU)) : !REGEXP_KEYDOWN.test(event.key)) {\n return;\n }\n\n const isActive = this.classList.contains(CLASS_NAME_SHOW$6);\n\n if (!isActive && event.key === ESCAPE_KEY$2) {\n return;\n }\n\n event.preventDefault();\n event.stopPropagation();\n\n if (isDisabled(this)) {\n return;\n }\n\n const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0];\n const instance = Dropdown.getOrCreateInstance(getToggleButton);\n\n if (event.key === ESCAPE_KEY$2) {\n instance.hide();\n return;\n }\n\n if (event.key === ARROW_UP_KEY || event.key === ARROW_DOWN_KEY) {\n if (!isActive) {\n instance.show();\n }\n\n instance._selectMenuItem(event);\n\n return;\n }\n\n if (!isActive || event.key === SPACE_KEY) {\n Dropdown.clearMenus();\n }\n }\n\n }\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n\n EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE$3, Dropdown.dataApiKeydownHandler);\n EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler);\n EventHandler.on(document, EVENT_CLICK_DATA_API$3, Dropdown.clearMenus);\n EventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus);\n EventHandler.on(document, EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$3, function (event) {\n event.preventDefault();\n Dropdown.getOrCreateInstance(this).toggle();\n });\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Dropdown to jQuery only if jQuery is present\n */\n\n defineJQueryPlugin(Dropdown);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): util/scrollBar.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';\n const SELECTOR_STICKY_CONTENT = '.sticky-top';\n\n class ScrollBarHelper {\n constructor() {\n this._element = document.body;\n }\n\n getWidth() {\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes\n const documentWidth = document.documentElement.clientWidth;\n return Math.abs(window.innerWidth - documentWidth);\n }\n\n hide() {\n const width = this.getWidth();\n\n this._disableOverFlow(); // give padding to element to balance the hidden scrollbar width\n\n\n this._setElementAttributes(this._element, 'paddingRight', calculatedValue => calculatedValue + width); // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements to keep showing fullwidth\n\n\n this._setElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight', calculatedValue => calculatedValue + width);\n\n this._setElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight', calculatedValue => calculatedValue - width);\n }\n\n _disableOverFlow() {\n this._saveInitialAttribute(this._element, 'overflow');\n\n this._element.style.overflow = 'hidden';\n }\n\n _setElementAttributes(selector, styleProp, callback) {\n const scrollbarWidth = this.getWidth();\n\n const manipulationCallBack = element => {\n if (element !== this._element && window.innerWidth > element.clientWidth + scrollbarWidth) {\n return;\n }\n\n this._saveInitialAttribute(element, styleProp);\n\n const calculatedValue = window.getComputedStyle(element)[styleProp];\n element.style[styleProp] = `${callback(Number.parseFloat(calculatedValue))}px`;\n };\n\n this._applyManipulationCallback(selector, manipulationCallBack);\n }\n\n reset() {\n this._resetElementAttributes(this._element, 'overflow');\n\n this._resetElementAttributes(this._element, 'paddingRight');\n\n this._resetElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight');\n\n this._resetElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight');\n }\n\n _saveInitialAttribute(element, styleProp) {\n const actualValue = element.style[styleProp];\n\n if (actualValue) {\n Manipulator.setDataAttribute(element, styleProp, actualValue);\n }\n }\n\n _resetElementAttributes(selector, styleProp) {\n const manipulationCallBack = element => {\n const value = Manipulator.getDataAttribute(element, styleProp);\n\n if (typeof value === 'undefined') {\n element.style.removeProperty(styleProp);\n } else {\n Manipulator.removeDataAttribute(element, styleProp);\n element.style[styleProp] = value;\n }\n };\n\n this._applyManipulationCallback(selector, manipulationCallBack);\n }\n\n _applyManipulationCallback(selector, callBack) {\n if (isElement$1(selector)) {\n callBack(selector);\n } else {\n SelectorEngine.find(selector, this._element).forEach(callBack);\n }\n }\n\n isOverflowing() {\n return this.getWidth() > 0;\n }\n\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): util/backdrop.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n const Default$7 = {\n className: 'modal-backdrop',\n isVisible: true,\n // if false, we use the backdrop helper without adding any element to the dom\n isAnimated: false,\n rootElement: 'body',\n // give the choice to place backdrop under different elements\n clickCallback: null\n };\n const DefaultType$7 = {\n className: 'string',\n isVisible: 'boolean',\n isAnimated: 'boolean',\n rootElement: '(element|string)',\n clickCallback: '(function|null)'\n };\n const NAME$8 = 'backdrop';\n const CLASS_NAME_FADE$4 = 'fade';\n const CLASS_NAME_SHOW$5 = 'show';\n const EVENT_MOUSEDOWN = `mousedown.bs.${NAME$8}`;\n\n class Backdrop {\n constructor(config) {\n this._config = this._getConfig(config);\n this._isAppended = false;\n this._element = null;\n }\n\n show(callback) {\n if (!this._config.isVisible) {\n execute(callback);\n return;\n }\n\n this._append();\n\n if (this._config.isAnimated) {\n reflow(this._getElement());\n }\n\n this._getElement().classList.add(CLASS_NAME_SHOW$5);\n\n this._emulateAnimation(() => {\n execute(callback);\n });\n }\n\n hide(callback) {\n if (!this._config.isVisible) {\n execute(callback);\n return;\n }\n\n this._getElement().classList.remove(CLASS_NAME_SHOW$5);\n\n this._emulateAnimation(() => {\n this.dispose();\n execute(callback);\n });\n } // Private\n\n\n _getElement() {\n if (!this._element) {\n const backdrop = document.createElement('div');\n backdrop.className = this._config.className;\n\n if (this._config.isAnimated) {\n backdrop.classList.add(CLASS_NAME_FADE$4);\n }\n\n this._element = backdrop;\n }\n\n return this._element;\n }\n\n _getConfig(config) {\n config = { ...Default$7,\n ...(typeof config === 'object' ? config : {})\n }; // use getElement() with the default \"body\" to get a fresh Element on each instantiation\n\n config.rootElement = getElement(config.rootElement);\n typeCheckConfig(NAME$8, config, DefaultType$7);\n return config;\n }\n\n _append() {\n if (this._isAppended) {\n return;\n }\n\n this._config.rootElement.append(this._getElement());\n\n EventHandler.on(this._getElement(), EVENT_MOUSEDOWN, () => {\n execute(this._config.clickCallback);\n });\n this._isAppended = true;\n }\n\n dispose() {\n if (!this._isAppended) {\n return;\n }\n\n EventHandler.off(this._element, EVENT_MOUSEDOWN);\n\n this._element.remove();\n\n this._isAppended = false;\n }\n\n _emulateAnimation(callback) {\n executeAfterTransition(callback, this._getElement(), this._config.isAnimated);\n }\n\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): util/focustrap.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n const Default$6 = {\n trapElement: null,\n // The element to trap focus inside of\n autofocus: true\n };\n const DefaultType$6 = {\n trapElement: 'element',\n autofocus: 'boolean'\n };\n const NAME$7 = 'focustrap';\n const DATA_KEY$7 = 'bs.focustrap';\n const EVENT_KEY$7 = `.${DATA_KEY$7}`;\n const EVENT_FOCUSIN$1 = `focusin${EVENT_KEY$7}`;\n const EVENT_KEYDOWN_TAB = `keydown.tab${EVENT_KEY$7}`;\n const TAB_KEY = 'Tab';\n const TAB_NAV_FORWARD = 'forward';\n const TAB_NAV_BACKWARD = 'backward';\n\n class FocusTrap {\n constructor(config) {\n this._config = this._getConfig(config);\n this._isActive = false;\n this._lastTabNavDirection = null;\n }\n\n activate() {\n const {\n trapElement,\n autofocus\n } = this._config;\n\n if (this._isActive) {\n return;\n }\n\n if (autofocus) {\n trapElement.focus();\n }\n\n EventHandler.off(document, EVENT_KEY$7); // guard against infinite focus loop\n\n EventHandler.on(document, EVENT_FOCUSIN$1, event => this._handleFocusin(event));\n EventHandler.on(document, EVENT_KEYDOWN_TAB, event => this._handleKeydown(event));\n this._isActive = true;\n }\n\n deactivate() {\n if (!this._isActive) {\n return;\n }\n\n this._isActive = false;\n EventHandler.off(document, EVENT_KEY$7);\n } // Private\n\n\n _handleFocusin(event) {\n const {\n target\n } = event;\n const {\n trapElement\n } = this._config;\n\n if (target === document || target === trapElement || trapElement.contains(target)) {\n return;\n }\n\n const elements = SelectorEngine.focusableChildren(trapElement);\n\n if (elements.length === 0) {\n trapElement.focus();\n } else if (this._lastTabNavDirection === TAB_NAV_BACKWARD) {\n elements[elements.length - 1].focus();\n } else {\n elements[0].focus();\n }\n }\n\n _handleKeydown(event) {\n if (event.key !== TAB_KEY) {\n return;\n }\n\n this._lastTabNavDirection = event.shiftKey ? TAB_NAV_BACKWARD : TAB_NAV_FORWARD;\n }\n\n _getConfig(config) {\n config = { ...Default$6,\n ...(typeof config === 'object' ? config : {})\n };\n typeCheckConfig(NAME$7, config, DefaultType$6);\n return config;\n }\n\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): modal.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME$6 = 'modal';\n const DATA_KEY$6 = 'bs.modal';\n const EVENT_KEY$6 = `.${DATA_KEY$6}`;\n const DATA_API_KEY$3 = '.data-api';\n const ESCAPE_KEY$1 = 'Escape';\n const Default$5 = {\n backdrop: true,\n keyboard: true,\n focus: true\n };\n const DefaultType$5 = {\n backdrop: '(boolean|string)',\n keyboard: 'boolean',\n focus: 'boolean'\n };\n const EVENT_HIDE$3 = `hide${EVENT_KEY$6}`;\n const EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY$6}`;\n const EVENT_HIDDEN$3 = `hidden${EVENT_KEY$6}`;\n const EVENT_SHOW$3 = `show${EVENT_KEY$6}`;\n const EVENT_SHOWN$3 = `shown${EVENT_KEY$6}`;\n const EVENT_RESIZE = `resize${EVENT_KEY$6}`;\n const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY$6}`;\n const EVENT_KEYDOWN_DISMISS$1 = `keydown.dismiss${EVENT_KEY$6}`;\n const EVENT_MOUSEUP_DISMISS = `mouseup.dismiss${EVENT_KEY$6}`;\n const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY$6}`;\n const EVENT_CLICK_DATA_API$2 = `click${EVENT_KEY$6}${DATA_API_KEY$3}`;\n const CLASS_NAME_OPEN = 'modal-open';\n const CLASS_NAME_FADE$3 = 'fade';\n const CLASS_NAME_SHOW$4 = 'show';\n const CLASS_NAME_STATIC = 'modal-static';\n const OPEN_SELECTOR$1 = '.modal.show';\n const SELECTOR_DIALOG = '.modal-dialog';\n const SELECTOR_MODAL_BODY = '.modal-body';\n const SELECTOR_DATA_TOGGLE$2 = '[data-bs-toggle=\"modal\"]';\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Modal extends BaseComponent {\n constructor(element, config) {\n super(element);\n this._config = this._getConfig(config);\n this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, this._element);\n this._backdrop = this._initializeBackDrop();\n this._focustrap = this._initializeFocusTrap();\n this._isShown = false;\n this._ignoreBackdropClick = false;\n this._isTransitioning = false;\n this._scrollBar = new ScrollBarHelper();\n } // Getters\n\n\n static get Default() {\n return Default$5;\n }\n\n static get NAME() {\n return NAME$6;\n } // Public\n\n\n toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget);\n }\n\n show(relatedTarget) {\n if (this._isShown || this._isTransitioning) {\n return;\n }\n\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$3, {\n relatedTarget\n });\n\n if (showEvent.defaultPrevented) {\n return;\n }\n\n this._isShown = true;\n\n if (this._isAnimated()) {\n this._isTransitioning = true;\n }\n\n this._scrollBar.hide();\n\n document.body.classList.add(CLASS_NAME_OPEN);\n\n this._adjustDialog();\n\n this._setEscapeEvent();\n\n this._setResizeEvent();\n\n EventHandler.on(this._dialog, EVENT_MOUSEDOWN_DISMISS, () => {\n EventHandler.one(this._element, EVENT_MOUSEUP_DISMISS, event => {\n if (event.target === this._element) {\n this._ignoreBackdropClick = true;\n }\n });\n });\n\n this._showBackdrop(() => this._showElement(relatedTarget));\n }\n\n hide() {\n if (!this._isShown || this._isTransitioning) {\n return;\n }\n\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$3);\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n this._isShown = false;\n\n const isAnimated = this._isAnimated();\n\n if (isAnimated) {\n this._isTransitioning = true;\n }\n\n this._setEscapeEvent();\n\n this._setResizeEvent();\n\n this._focustrap.deactivate();\n\n this._element.classList.remove(CLASS_NAME_SHOW$4);\n\n EventHandler.off(this._element, EVENT_CLICK_DISMISS);\n EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS);\n\n this._queueCallback(() => this._hideModal(), this._element, isAnimated);\n }\n\n dispose() {\n [window, this._dialog].forEach(htmlElement => EventHandler.off(htmlElement, EVENT_KEY$6));\n\n this._backdrop.dispose();\n\n this._focustrap.deactivate();\n\n super.dispose();\n }\n\n handleUpdate() {\n this._adjustDialog();\n } // Private\n\n\n _initializeBackDrop() {\n return new Backdrop({\n isVisible: Boolean(this._config.backdrop),\n // 'static' option will be translated to true, and booleans will keep their value\n isAnimated: this._isAnimated()\n });\n }\n\n _initializeFocusTrap() {\n return new FocusTrap({\n trapElement: this._element\n });\n }\n\n _getConfig(config) {\n config = { ...Default$5,\n ...Manipulator.getDataAttributes(this._element),\n ...(typeof config === 'object' ? config : {})\n };\n typeCheckConfig(NAME$6, config, DefaultType$5);\n return config;\n }\n\n _showElement(relatedTarget) {\n const isAnimated = this._isAnimated();\n\n const modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog);\n\n if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {\n // Don't move modal's DOM position\n document.body.append(this._element);\n }\n\n this._element.style.display = 'block';\n\n this._element.removeAttribute('aria-hidden');\n\n this._element.setAttribute('aria-modal', true);\n\n this._element.setAttribute('role', 'dialog');\n\n this._element.scrollTop = 0;\n\n if (modalBody) {\n modalBody.scrollTop = 0;\n }\n\n if (isAnimated) {\n reflow(this._element);\n }\n\n this._element.classList.add(CLASS_NAME_SHOW$4);\n\n const transitionComplete = () => {\n if (this._config.focus) {\n this._focustrap.activate();\n }\n\n this._isTransitioning = false;\n EventHandler.trigger(this._element, EVENT_SHOWN$3, {\n relatedTarget\n });\n };\n\n this._queueCallback(transitionComplete, this._dialog, isAnimated);\n }\n\n _setEscapeEvent() {\n if (this._isShown) {\n EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS$1, event => {\n if (this._config.keyboard && event.key === ESCAPE_KEY$1) {\n event.preventDefault();\n this.hide();\n } else if (!this._config.keyboard && event.key === ESCAPE_KEY$1) {\n this._triggerBackdropTransition();\n }\n });\n } else {\n EventHandler.off(this._element, EVENT_KEYDOWN_DISMISS$1);\n }\n }\n\n _setResizeEvent() {\n if (this._isShown) {\n EventHandler.on(window, EVENT_RESIZE, () => this._adjustDialog());\n } else {\n EventHandler.off(window, EVENT_RESIZE);\n }\n }\n\n _hideModal() {\n this._element.style.display = 'none';\n\n this._element.setAttribute('aria-hidden', true);\n\n this._element.removeAttribute('aria-modal');\n\n this._element.removeAttribute('role');\n\n this._isTransitioning = false;\n\n this._backdrop.hide(() => {\n document.body.classList.remove(CLASS_NAME_OPEN);\n\n this._resetAdjustments();\n\n this._scrollBar.reset();\n\n EventHandler.trigger(this._element, EVENT_HIDDEN$3);\n });\n }\n\n _showBackdrop(callback) {\n EventHandler.on(this._element, EVENT_CLICK_DISMISS, event => {\n if (this._ignoreBackdropClick) {\n this._ignoreBackdropClick = false;\n return;\n }\n\n if (event.target !== event.currentTarget) {\n return;\n }\n\n if (this._config.backdrop === true) {\n this.hide();\n } else if (this._config.backdrop === 'static') {\n this._triggerBackdropTransition();\n }\n });\n\n this._backdrop.show(callback);\n }\n\n _isAnimated() {\n return this._element.classList.contains(CLASS_NAME_FADE$3);\n }\n\n _triggerBackdropTransition() {\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n const {\n classList,\n scrollHeight,\n style\n } = this._element;\n const isModalOverflowing = scrollHeight > document.documentElement.clientHeight; // return if the following background transition hasn't yet completed\n\n if (!isModalOverflowing && style.overflowY === 'hidden' || classList.contains(CLASS_NAME_STATIC)) {\n return;\n }\n\n if (!isModalOverflowing) {\n style.overflowY = 'hidden';\n }\n\n classList.add(CLASS_NAME_STATIC);\n\n this._queueCallback(() => {\n classList.remove(CLASS_NAME_STATIC);\n\n if (!isModalOverflowing) {\n this._queueCallback(() => {\n style.overflowY = '';\n }, this._dialog);\n }\n }, this._dialog);\n\n this._element.focus();\n } // ----------------------------------------------------------------------\n // the following methods are used to handle overflowing modals\n // ----------------------------------------------------------------------\n\n\n _adjustDialog() {\n const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;\n\n const scrollbarWidth = this._scrollBar.getWidth();\n\n const isBodyOverflowing = scrollbarWidth > 0;\n\n if (!isBodyOverflowing && isModalOverflowing && !isRTL() || isBodyOverflowing && !isModalOverflowing && isRTL()) {\n this._element.style.paddingLeft = `${scrollbarWidth}px`;\n }\n\n if (isBodyOverflowing && !isModalOverflowing && !isRTL() || !isBodyOverflowing && isModalOverflowing && isRTL()) {\n this._element.style.paddingRight = `${scrollbarWidth}px`;\n }\n }\n\n _resetAdjustments() {\n this._element.style.paddingLeft = '';\n this._element.style.paddingRight = '';\n } // Static\n\n\n static jQueryInterface(config, relatedTarget) {\n return this.each(function () {\n const data = Modal.getOrCreateInstance(this, config);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config](relatedTarget);\n });\n }\n\n }\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n\n EventHandler.on(document, EVENT_CLICK_DATA_API$2, SELECTOR_DATA_TOGGLE$2, function (event) {\n const target = getElementFromSelector(this);\n\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault();\n }\n\n EventHandler.one(target, EVENT_SHOW$3, showEvent => {\n if (showEvent.defaultPrevented) {\n // only register focus restorer if modal will actually get shown\n return;\n }\n\n EventHandler.one(target, EVENT_HIDDEN$3, () => {\n if (isVisible(this)) {\n this.focus();\n }\n });\n }); // avoid conflict when clicking moddal toggler while another one is open\n\n const allReadyOpen = SelectorEngine.findOne(OPEN_SELECTOR$1);\n\n if (allReadyOpen) {\n Modal.getInstance(allReadyOpen).hide();\n }\n\n const data = Modal.getOrCreateInstance(target);\n data.toggle(this);\n });\n enableDismissTrigger(Modal);\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Modal to jQuery only if jQuery is present\n */\n\n defineJQueryPlugin(Modal);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): offcanvas.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME$5 = 'offcanvas';\n const DATA_KEY$5 = 'bs.offcanvas';\n const EVENT_KEY$5 = `.${DATA_KEY$5}`;\n const DATA_API_KEY$2 = '.data-api';\n const EVENT_LOAD_DATA_API$1 = `load${EVENT_KEY$5}${DATA_API_KEY$2}`;\n const ESCAPE_KEY = 'Escape';\n const Default$4 = {\n backdrop: true,\n keyboard: true,\n scroll: false\n };\n const DefaultType$4 = {\n backdrop: 'boolean',\n keyboard: 'boolean',\n scroll: 'boolean'\n };\n const CLASS_NAME_SHOW$3 = 'show';\n const CLASS_NAME_BACKDROP = 'offcanvas-backdrop';\n const OPEN_SELECTOR = '.offcanvas.show';\n const EVENT_SHOW$2 = `show${EVENT_KEY$5}`;\n const EVENT_SHOWN$2 = `shown${EVENT_KEY$5}`;\n const EVENT_HIDE$2 = `hide${EVENT_KEY$5}`;\n const EVENT_HIDDEN$2 = `hidden${EVENT_KEY$5}`;\n const EVENT_CLICK_DATA_API$1 = `click${EVENT_KEY$5}${DATA_API_KEY$2}`;\n const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY$5}`;\n const SELECTOR_DATA_TOGGLE$1 = '[data-bs-toggle=\"offcanvas\"]';\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Offcanvas extends BaseComponent {\n constructor(element, config) {\n super(element);\n this._config = this._getConfig(config);\n this._isShown = false;\n this._backdrop = this._initializeBackDrop();\n this._focustrap = this._initializeFocusTrap();\n\n this._addEventListeners();\n } // Getters\n\n\n static get NAME() {\n return NAME$5;\n }\n\n static get Default() {\n return Default$4;\n } // Public\n\n\n toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget);\n }\n\n show(relatedTarget) {\n if (this._isShown) {\n return;\n }\n\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$2, {\n relatedTarget\n });\n\n if (showEvent.defaultPrevented) {\n return;\n }\n\n this._isShown = true;\n this._element.style.visibility = 'visible';\n\n this._backdrop.show();\n\n if (!this._config.scroll) {\n new ScrollBarHelper().hide();\n }\n\n this._element.removeAttribute('aria-hidden');\n\n this._element.setAttribute('aria-modal', true);\n\n this._element.setAttribute('role', 'dialog');\n\n this._element.classList.add(CLASS_NAME_SHOW$3);\n\n const completeCallBack = () => {\n if (!this._config.scroll) {\n this._focustrap.activate();\n }\n\n EventHandler.trigger(this._element, EVENT_SHOWN$2, {\n relatedTarget\n });\n };\n\n this._queueCallback(completeCallBack, this._element, true);\n }\n\n hide() {\n if (!this._isShown) {\n return;\n }\n\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$2);\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n this._focustrap.deactivate();\n\n this._element.blur();\n\n this._isShown = false;\n\n this._element.classList.remove(CLASS_NAME_SHOW$3);\n\n this._backdrop.hide();\n\n const completeCallback = () => {\n this._element.setAttribute('aria-hidden', true);\n\n this._element.removeAttribute('aria-modal');\n\n this._element.removeAttribute('role');\n\n this._element.style.visibility = 'hidden';\n\n if (!this._config.scroll) {\n new ScrollBarHelper().reset();\n }\n\n EventHandler.trigger(this._element, EVENT_HIDDEN$2);\n };\n\n this._queueCallback(completeCallback, this._element, true);\n }\n\n dispose() {\n this._backdrop.dispose();\n\n this._focustrap.deactivate();\n\n super.dispose();\n } // Private\n\n\n _getConfig(config) {\n config = { ...Default$4,\n ...Manipulator.getDataAttributes(this._element),\n ...(typeof config === 'object' ? config : {})\n };\n typeCheckConfig(NAME$5, config, DefaultType$4);\n return config;\n }\n\n _initializeBackDrop() {\n return new Backdrop({\n className: CLASS_NAME_BACKDROP,\n isVisible: this._config.backdrop,\n isAnimated: true,\n rootElement: this._element.parentNode,\n clickCallback: () => this.hide()\n });\n }\n\n _initializeFocusTrap() {\n return new FocusTrap({\n trapElement: this._element\n });\n }\n\n _addEventListeners() {\n EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => {\n if (this._config.keyboard && event.key === ESCAPE_KEY) {\n this.hide();\n }\n });\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Offcanvas.getOrCreateInstance(this, config);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config](this);\n });\n }\n\n }\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n\n EventHandler.on(document, EVENT_CLICK_DATA_API$1, SELECTOR_DATA_TOGGLE$1, function (event) {\n const target = getElementFromSelector(this);\n\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault();\n }\n\n if (isDisabled(this)) {\n return;\n }\n\n EventHandler.one(target, EVENT_HIDDEN$2, () => {\n // focus on trigger when it is closed\n if (isVisible(this)) {\n this.focus();\n }\n }); // avoid conflict when clicking a toggler of an offcanvas, while another is open\n\n const allReadyOpen = SelectorEngine.findOne(OPEN_SELECTOR);\n\n if (allReadyOpen && allReadyOpen !== target) {\n Offcanvas.getInstance(allReadyOpen).hide();\n }\n\n const data = Offcanvas.getOrCreateInstance(target);\n data.toggle(this);\n });\n EventHandler.on(window, EVENT_LOAD_DATA_API$1, () => SelectorEngine.find(OPEN_SELECTOR).forEach(el => Offcanvas.getOrCreateInstance(el).show()));\n enableDismissTrigger(Offcanvas);\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n defineJQueryPlugin(Offcanvas);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): util/sanitizer.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n const uriAttributes = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);\n const ARIA_ATTRIBUTE_PATTERN = /^aria-[\\w-]*$/i;\n /**\n * A pattern that recognizes a commonly useful subset of URLs that are safe.\n *\n * Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts\n */\n\n const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i;\n /**\n * A pattern that matches safe data URLs. Only matches image, video and audio types.\n *\n * Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts\n */\n\n const DATA_URL_PATTERN = /^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[\\d+/a-z]+=*$/i;\n\n const allowedAttribute = (attribute, allowedAttributeList) => {\n const attributeName = attribute.nodeName.toLowerCase();\n\n if (allowedAttributeList.includes(attributeName)) {\n if (uriAttributes.has(attributeName)) {\n return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue) || DATA_URL_PATTERN.test(attribute.nodeValue));\n }\n\n return true;\n }\n\n const regExp = allowedAttributeList.filter(attributeRegex => attributeRegex instanceof RegExp); // Check if a regular expression validates the attribute.\n\n for (let i = 0, len = regExp.length; i < len; i++) {\n if (regExp[i].test(attributeName)) {\n return true;\n }\n }\n\n return false;\n };\n\n const DefaultAllowlist = {\n // Global attributes allowed on any supplied element below.\n '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],\n a: ['target', 'href', 'title', 'rel'],\n area: [],\n b: [],\n br: [],\n col: [],\n code: [],\n div: [],\n em: [],\n hr: [],\n h1: [],\n h2: [],\n h3: [],\n h4: [],\n h5: [],\n h6: [],\n i: [],\n img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],\n li: [],\n ol: [],\n p: [],\n pre: [],\n s: [],\n small: [],\n span: [],\n sub: [],\n sup: [],\n strong: [],\n u: [],\n ul: []\n };\n function sanitizeHtml(unsafeHtml, allowList, sanitizeFn) {\n if (!unsafeHtml.length) {\n return unsafeHtml;\n }\n\n if (sanitizeFn && typeof sanitizeFn === 'function') {\n return sanitizeFn(unsafeHtml);\n }\n\n const domParser = new window.DOMParser();\n const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');\n const elements = [].concat(...createdDocument.body.querySelectorAll('*'));\n\n for (let i = 0, len = elements.length; i < len; i++) {\n const element = elements[i];\n const elementName = element.nodeName.toLowerCase();\n\n if (!Object.keys(allowList).includes(elementName)) {\n element.remove();\n continue;\n }\n\n const attributeList = [].concat(...element.attributes);\n const allowedAttributes = [].concat(allowList['*'] || [], allowList[elementName] || []);\n attributeList.forEach(attribute => {\n if (!allowedAttribute(attribute, allowedAttributes)) {\n element.removeAttribute(attribute.nodeName);\n }\n });\n }\n\n return createdDocument.body.innerHTML;\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): tooltip.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME$4 = 'tooltip';\n const DATA_KEY$4 = 'bs.tooltip';\n const EVENT_KEY$4 = `.${DATA_KEY$4}`;\n const CLASS_PREFIX$1 = 'bs-tooltip';\n const DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn']);\n const DefaultType$3 = {\n animation: 'boolean',\n template: 'string',\n title: '(string|element|function)',\n trigger: 'string',\n delay: '(number|object)',\n html: 'boolean',\n selector: '(string|boolean)',\n placement: '(string|function)',\n offset: '(array|string|function)',\n container: '(string|element|boolean)',\n fallbackPlacements: 'array',\n boundary: '(string|element)',\n customClass: '(string|function)',\n sanitize: 'boolean',\n sanitizeFn: '(null|function)',\n allowList: 'object',\n popperConfig: '(null|object|function)'\n };\n const AttachmentMap = {\n AUTO: 'auto',\n TOP: 'top',\n RIGHT: isRTL() ? 'left' : 'right',\n BOTTOM: 'bottom',\n LEFT: isRTL() ? 'right' : 'left'\n };\n const Default$3 = {\n animation: true,\n template: '<div class=\"tooltip\" role=\"tooltip\">' + '<div class=\"tooltip-arrow\"></div>' + '<div class=\"tooltip-inner\"></div>' + '</div>',\n trigger: 'hover focus',\n title: '',\n delay: 0,\n html: false,\n selector: false,\n placement: 'top',\n offset: [0, 0],\n container: false,\n fallbackPlacements: ['top', 'right', 'bottom', 'left'],\n boundary: 'clippingParents',\n customClass: '',\n sanitize: true,\n sanitizeFn: null,\n allowList: DefaultAllowlist,\n popperConfig: null\n };\n const Event$2 = {\n HIDE: `hide${EVENT_KEY$4}`,\n HIDDEN: `hidden${EVENT_KEY$4}`,\n SHOW: `show${EVENT_KEY$4}`,\n SHOWN: `shown${EVENT_KEY$4}`,\n INSERTED: `inserted${EVENT_KEY$4}`,\n CLICK: `click${EVENT_KEY$4}`,\n FOCUSIN: `focusin${EVENT_KEY$4}`,\n FOCUSOUT: `focusout${EVENT_KEY$4}`,\n MOUSEENTER: `mouseenter${EVENT_KEY$4}`,\n MOUSELEAVE: `mouseleave${EVENT_KEY$4}`\n };\n const CLASS_NAME_FADE$2 = 'fade';\n const CLASS_NAME_MODAL = 'modal';\n const CLASS_NAME_SHOW$2 = 'show';\n const HOVER_STATE_SHOW = 'show';\n const HOVER_STATE_OUT = 'out';\n const SELECTOR_TOOLTIP_INNER = '.tooltip-inner';\n const SELECTOR_MODAL = `.${CLASS_NAME_MODAL}`;\n const EVENT_MODAL_HIDE = 'hide.bs.modal';\n const TRIGGER_HOVER = 'hover';\n const TRIGGER_FOCUS = 'focus';\n const TRIGGER_CLICK = 'click';\n const TRIGGER_MANUAL = 'manual';\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Tooltip extends BaseComponent {\n constructor(element, config) {\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap\\'s tooltips require Popper (https://popper.js.org)');\n }\n\n super(element); // private\n\n this._isEnabled = true;\n this._timeout = 0;\n this._hoverState = '';\n this._activeTrigger = {};\n this._popper = null; // Protected\n\n this._config = this._getConfig(config);\n this.tip = null;\n\n this._setListeners();\n } // Getters\n\n\n static get Default() {\n return Default$3;\n }\n\n static get NAME() {\n return NAME$4;\n }\n\n static get Event() {\n return Event$2;\n }\n\n static get DefaultType() {\n return DefaultType$3;\n } // Public\n\n\n enable() {\n this._isEnabled = true;\n }\n\n disable() {\n this._isEnabled = false;\n }\n\n toggleEnabled() {\n this._isEnabled = !this._isEnabled;\n }\n\n toggle(event) {\n if (!this._isEnabled) {\n return;\n }\n\n if (event) {\n const context = this._initializeOnDelegatedTarget(event);\n\n context._activeTrigger.click = !context._activeTrigger.click;\n\n if (context._isWithActiveTrigger()) {\n context._enter(null, context);\n } else {\n context._leave(null, context);\n }\n } else {\n if (this.getTipElement().classList.contains(CLASS_NAME_SHOW$2)) {\n this._leave(null, this);\n\n return;\n }\n\n this._enter(null, this);\n }\n }\n\n dispose() {\n clearTimeout(this._timeout);\n EventHandler.off(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);\n\n if (this.tip) {\n this.tip.remove();\n }\n\n this._disposePopper();\n\n super.dispose();\n }\n\n show() {\n if (this._element.style.display === 'none') {\n throw new Error('Please use show on visible elements');\n }\n\n if (!(this.isWithContent() && this._isEnabled)) {\n return;\n }\n\n const showEvent = EventHandler.trigger(this._element, this.constructor.Event.SHOW);\n const shadowRoot = findShadowRoot(this._element);\n const isInTheDom = shadowRoot === null ? this._element.ownerDocument.documentElement.contains(this._element) : shadowRoot.contains(this._element);\n\n if (showEvent.defaultPrevented || !isInTheDom) {\n return;\n } // A trick to recreate a tooltip in case a new title is given by using the NOT documented `data-bs-original-title`\n // This will be removed later in favor of a `setContent` method\n\n\n if (this.constructor.NAME === 'tooltip' && this.tip && this.getTitle() !== this.tip.querySelector(SELECTOR_TOOLTIP_INNER).innerHTML) {\n this._disposePopper();\n\n this.tip.remove();\n this.tip = null;\n }\n\n const tip = this.getTipElement();\n const tipId = getUID(this.constructor.NAME);\n tip.setAttribute('id', tipId);\n\n this._element.setAttribute('aria-describedby', tipId);\n\n if (this._config.animation) {\n tip.classList.add(CLASS_NAME_FADE$2);\n }\n\n const placement = typeof this._config.placement === 'function' ? this._config.placement.call(this, tip, this._element) : this._config.placement;\n\n const attachment = this._getAttachment(placement);\n\n this._addAttachmentClass(attachment);\n\n const {\n container\n } = this._config;\n Data.set(tip, this.constructor.DATA_KEY, this);\n\n if (!this._element.ownerDocument.documentElement.contains(this.tip)) {\n container.append(tip);\n EventHandler.trigger(this._element, this.constructor.Event.INSERTED);\n }\n\n if (this._popper) {\n this._popper.update();\n } else {\n this._popper = createPopper(this._element, tip, this._getPopperConfig(attachment));\n }\n\n tip.classList.add(CLASS_NAME_SHOW$2);\n\n const customClass = this._resolvePossibleFunction(this._config.customClass);\n\n if (customClass) {\n tip.classList.add(...customClass.split(' '));\n } // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n\n\n if ('ontouchstart' in document.documentElement) {\n [].concat(...document.body.children).forEach(element => {\n EventHandler.on(element, 'mouseover', noop);\n });\n }\n\n const complete = () => {\n const prevHoverState = this._hoverState;\n this._hoverState = null;\n EventHandler.trigger(this._element, this.constructor.Event.SHOWN);\n\n if (prevHoverState === HOVER_STATE_OUT) {\n this._leave(null, this);\n }\n };\n\n const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$2);\n\n this._queueCallback(complete, this.tip, isAnimated);\n }\n\n hide() {\n if (!this._popper) {\n return;\n }\n\n const tip = this.getTipElement();\n\n const complete = () => {\n if (this._isWithActiveTrigger()) {\n return;\n }\n\n if (this._hoverState !== HOVER_STATE_SHOW) {\n tip.remove();\n }\n\n this._cleanTipClass();\n\n this._element.removeAttribute('aria-describedby');\n\n EventHandler.trigger(this._element, this.constructor.Event.HIDDEN);\n\n this._disposePopper();\n };\n\n const hideEvent = EventHandler.trigger(this._element, this.constructor.Event.HIDE);\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n tip.classList.remove(CLASS_NAME_SHOW$2); // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n\n if ('ontouchstart' in document.documentElement) {\n [].concat(...document.body.children).forEach(element => EventHandler.off(element, 'mouseover', noop));\n }\n\n this._activeTrigger[TRIGGER_CLICK] = false;\n this._activeTrigger[TRIGGER_FOCUS] = false;\n this._activeTrigger[TRIGGER_HOVER] = false;\n const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$2);\n\n this._queueCallback(complete, this.tip, isAnimated);\n\n this._hoverState = '';\n }\n\n update() {\n if (this._popper !== null) {\n this._popper.update();\n }\n } // Protected\n\n\n isWithContent() {\n return Boolean(this.getTitle());\n }\n\n getTipElement() {\n if (this.tip) {\n return this.tip;\n }\n\n const element = document.createElement('div');\n element.innerHTML = this._config.template;\n const tip = element.children[0];\n this.setContent(tip);\n tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$2);\n this.tip = tip;\n return this.tip;\n }\n\n setContent(tip) {\n this._sanitizeAndSetContent(tip, this.getTitle(), SELECTOR_TOOLTIP_INNER);\n }\n\n _sanitizeAndSetContent(template, content, selector) {\n const templateElement = SelectorEngine.findOne(selector, template);\n\n if (!content && templateElement) {\n templateElement.remove();\n return;\n } // we use append for html objects to maintain js events\n\n\n this.setElementContent(templateElement, content);\n }\n\n setElementContent(element, content) {\n if (element === null) {\n return;\n }\n\n if (isElement$1(content)) {\n content = getElement(content); // content is a DOM node or a jQuery\n\n if (this._config.html) {\n if (content.parentNode !== element) {\n element.innerHTML = '';\n element.append(content);\n }\n } else {\n element.textContent = content.textContent;\n }\n\n return;\n }\n\n if (this._config.html) {\n if (this._config.sanitize) {\n content = sanitizeHtml(content, this._config.allowList, this._config.sanitizeFn);\n }\n\n element.innerHTML = content;\n } else {\n element.textContent = content;\n }\n }\n\n getTitle() {\n const title = this._element.getAttribute('data-bs-original-title') || this._config.title;\n\n return this._resolvePossibleFunction(title);\n }\n\n updateAttachment(attachment) {\n if (attachment === 'right') {\n return 'end';\n }\n\n if (attachment === 'left') {\n return 'start';\n }\n\n return attachment;\n } // Private\n\n\n _initializeOnDelegatedTarget(event, context) {\n return context || this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig());\n }\n\n _getOffset() {\n const {\n offset\n } = this._config;\n\n if (typeof offset === 'string') {\n return offset.split(',').map(val => Number.parseInt(val, 10));\n }\n\n if (typeof offset === 'function') {\n return popperData => offset(popperData, this._element);\n }\n\n return offset;\n }\n\n _resolvePossibleFunction(content) {\n return typeof content === 'function' ? content.call(this._element) : content;\n }\n\n _getPopperConfig(attachment) {\n const defaultBsPopperConfig = {\n placement: attachment,\n modifiers: [{\n name: 'flip',\n options: {\n fallbackPlacements: this._config.fallbackPlacements\n }\n }, {\n name: 'offset',\n options: {\n offset: this._getOffset()\n }\n }, {\n name: 'preventOverflow',\n options: {\n boundary: this._config.boundary\n }\n }, {\n name: 'arrow',\n options: {\n element: `.${this.constructor.NAME}-arrow`\n }\n }, {\n name: 'onChange',\n enabled: true,\n phase: 'afterWrite',\n fn: data => this._handlePopperPlacementChange(data)\n }],\n onFirstUpdate: data => {\n if (data.options.placement !== data.placement) {\n this._handlePopperPlacementChange(data);\n }\n }\n };\n return { ...defaultBsPopperConfig,\n ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)\n };\n }\n\n _addAttachmentClass(attachment) {\n this.getTipElement().classList.add(`${this._getBasicClassPrefix()}-${this.updateAttachment(attachment)}`);\n }\n\n _getAttachment(placement) {\n return AttachmentMap[placement.toUpperCase()];\n }\n\n _setListeners() {\n const triggers = this._config.trigger.split(' ');\n\n triggers.forEach(trigger => {\n if (trigger === 'click') {\n EventHandler.on(this._element, this.constructor.Event.CLICK, this._config.selector, event => this.toggle(event));\n } else if (trigger !== TRIGGER_MANUAL) {\n const eventIn = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSEENTER : this.constructor.Event.FOCUSIN;\n const eventOut = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSELEAVE : this.constructor.Event.FOCUSOUT;\n EventHandler.on(this._element, eventIn, this._config.selector, event => this._enter(event));\n EventHandler.on(this._element, eventOut, this._config.selector, event => this._leave(event));\n }\n });\n\n this._hideModalHandler = () => {\n if (this._element) {\n this.hide();\n }\n };\n\n EventHandler.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);\n\n if (this._config.selector) {\n this._config = { ...this._config,\n trigger: 'manual',\n selector: ''\n };\n } else {\n this._fixTitle();\n }\n }\n\n _fixTitle() {\n const title = this._element.getAttribute('title');\n\n const originalTitleType = typeof this._element.getAttribute('data-bs-original-title');\n\n if (title || originalTitleType !== 'string') {\n this._element.setAttribute('data-bs-original-title', title || '');\n\n if (title && !this._element.getAttribute('aria-label') && !this._element.textContent) {\n this._element.setAttribute('aria-label', title);\n }\n\n this._element.setAttribute('title', '');\n }\n }\n\n _enter(event, context) {\n context = this._initializeOnDelegatedTarget(event, context);\n\n if (event) {\n context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;\n }\n\n if (context.getTipElement().classList.contains(CLASS_NAME_SHOW$2) || context._hoverState === HOVER_STATE_SHOW) {\n context._hoverState = HOVER_STATE_SHOW;\n return;\n }\n\n clearTimeout(context._timeout);\n context._hoverState = HOVER_STATE_SHOW;\n\n if (!context._config.delay || !context._config.delay.show) {\n context.show();\n return;\n }\n\n context._timeout = setTimeout(() => {\n if (context._hoverState === HOVER_STATE_SHOW) {\n context.show();\n }\n }, context._config.delay.show);\n }\n\n _leave(event, context) {\n context = this._initializeOnDelegatedTarget(event, context);\n\n if (event) {\n context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = context._element.contains(event.relatedTarget);\n }\n\n if (context._isWithActiveTrigger()) {\n return;\n }\n\n clearTimeout(context._timeout);\n context._hoverState = HOVER_STATE_OUT;\n\n if (!context._config.delay || !context._config.delay.hide) {\n context.hide();\n return;\n }\n\n context._timeout = setTimeout(() => {\n if (context._hoverState === HOVER_STATE_OUT) {\n context.hide();\n }\n }, context._config.delay.hide);\n }\n\n _isWithActiveTrigger() {\n for (const trigger in this._activeTrigger) {\n if (this._activeTrigger[trigger]) {\n return true;\n }\n }\n\n return false;\n }\n\n _getConfig(config) {\n const dataAttributes = Manipulator.getDataAttributes(this._element);\n Object.keys(dataAttributes).forEach(dataAttr => {\n if (DISALLOWED_ATTRIBUTES.has(dataAttr)) {\n delete dataAttributes[dataAttr];\n }\n });\n config = { ...this.constructor.Default,\n ...dataAttributes,\n ...(typeof config === 'object' && config ? config : {})\n };\n config.container = config.container === false ? document.body : getElement(config.container);\n\n if (typeof config.delay === 'number') {\n config.delay = {\n show: config.delay,\n hide: config.delay\n };\n }\n\n if (typeof config.title === 'number') {\n config.title = config.title.toString();\n }\n\n if (typeof config.content === 'number') {\n config.content = config.content.toString();\n }\n\n typeCheckConfig(NAME$4, config, this.constructor.DefaultType);\n\n if (config.sanitize) {\n config.template = sanitizeHtml(config.template, config.allowList, config.sanitizeFn);\n }\n\n return config;\n }\n\n _getDelegateConfig() {\n const config = {};\n\n for (const key in this._config) {\n if (this.constructor.Default[key] !== this._config[key]) {\n config[key] = this._config[key];\n }\n } // In the future can be replaced with:\n // const keysWithDifferentValues = Object.entries(this._config).filter(entry => this.constructor.Default[entry[0]] !== this._config[entry[0]])\n // `Object.fromEntries(keysWithDifferentValues)`\n\n\n return config;\n }\n\n _cleanTipClass() {\n const tip = this.getTipElement();\n const basicClassPrefixRegex = new RegExp(`(^|\\\\s)${this._getBasicClassPrefix()}\\\\S+`, 'g');\n const tabClass = tip.getAttribute('class').match(basicClassPrefixRegex);\n\n if (tabClass !== null && tabClass.length > 0) {\n tabClass.map(token => token.trim()).forEach(tClass => tip.classList.remove(tClass));\n }\n }\n\n _getBasicClassPrefix() {\n return CLASS_PREFIX$1;\n }\n\n _handlePopperPlacementChange(popperData) {\n const {\n state\n } = popperData;\n\n if (!state) {\n return;\n }\n\n this.tip = state.elements.popper;\n\n this._cleanTipClass();\n\n this._addAttachmentClass(this._getAttachment(state.placement));\n }\n\n _disposePopper() {\n if (this._popper) {\n this._popper.destroy();\n\n this._popper = null;\n }\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Tooltip.getOrCreateInstance(this, config);\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n }\n });\n }\n\n }\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Tooltip to jQuery only if jQuery is present\n */\n\n\n defineJQueryPlugin(Tooltip);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): popover.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME$3 = 'popover';\n const DATA_KEY$3 = 'bs.popover';\n const EVENT_KEY$3 = `.${DATA_KEY$3}`;\n const CLASS_PREFIX = 'bs-popover';\n const Default$2 = { ...Tooltip.Default,\n placement: 'right',\n offset: [0, 8],\n trigger: 'click',\n content: '',\n template: '<div class=\"popover\" role=\"tooltip\">' + '<div class=\"popover-arrow\"></div>' + '<h3 class=\"popover-header\"></h3>' + '<div class=\"popover-body\"></div>' + '</div>'\n };\n const DefaultType$2 = { ...Tooltip.DefaultType,\n content: '(string|element|function)'\n };\n const Event$1 = {\n HIDE: `hide${EVENT_KEY$3}`,\n HIDDEN: `hidden${EVENT_KEY$3}`,\n SHOW: `show${EVENT_KEY$3}`,\n SHOWN: `shown${EVENT_KEY$3}`,\n INSERTED: `inserted${EVENT_KEY$3}`,\n CLICK: `click${EVENT_KEY$3}`,\n FOCUSIN: `focusin${EVENT_KEY$3}`,\n FOCUSOUT: `focusout${EVENT_KEY$3}`,\n MOUSEENTER: `mouseenter${EVENT_KEY$3}`,\n MOUSELEAVE: `mouseleave${EVENT_KEY$3}`\n };\n const SELECTOR_TITLE = '.popover-header';\n const SELECTOR_CONTENT = '.popover-body';\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Popover extends Tooltip {\n // Getters\n static get Default() {\n return Default$2;\n }\n\n static get NAME() {\n return NAME$3;\n }\n\n static get Event() {\n return Event$1;\n }\n\n static get DefaultType() {\n return DefaultType$2;\n } // Overrides\n\n\n isWithContent() {\n return this.getTitle() || this._getContent();\n }\n\n setContent(tip) {\n this._sanitizeAndSetContent(tip, this.getTitle(), SELECTOR_TITLE);\n\n this._sanitizeAndSetContent(tip, this._getContent(), SELECTOR_CONTENT);\n } // Private\n\n\n _getContent() {\n return this._resolvePossibleFunction(this._config.content);\n }\n\n _getBasicClassPrefix() {\n return CLASS_PREFIX;\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Popover.getOrCreateInstance(this, config);\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n }\n });\n }\n\n }\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Popover to jQuery only if jQuery is present\n */\n\n\n defineJQueryPlugin(Popover);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): scrollspy.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME$2 = 'scrollspy';\n const DATA_KEY$2 = 'bs.scrollspy';\n const EVENT_KEY$2 = `.${DATA_KEY$2}`;\n const DATA_API_KEY$1 = '.data-api';\n const Default$1 = {\n offset: 10,\n method: 'auto',\n target: ''\n };\n const DefaultType$1 = {\n offset: 'number',\n method: 'string',\n target: '(string|element)'\n };\n const EVENT_ACTIVATE = `activate${EVENT_KEY$2}`;\n const EVENT_SCROLL = `scroll${EVENT_KEY$2}`;\n const EVENT_LOAD_DATA_API = `load${EVENT_KEY$2}${DATA_API_KEY$1}`;\n const CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';\n const CLASS_NAME_ACTIVE$1 = 'active';\n const SELECTOR_DATA_SPY = '[data-bs-spy=\"scroll\"]';\n const SELECTOR_NAV_LIST_GROUP$1 = '.nav, .list-group';\n const SELECTOR_NAV_LINKS = '.nav-link';\n const SELECTOR_NAV_ITEMS = '.nav-item';\n const SELECTOR_LIST_ITEMS = '.list-group-item';\n const SELECTOR_LINK_ITEMS = `${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}, .${CLASS_NAME_DROPDOWN_ITEM}`;\n const SELECTOR_DROPDOWN$1 = '.dropdown';\n const SELECTOR_DROPDOWN_TOGGLE$1 = '.dropdown-toggle';\n const METHOD_OFFSET = 'offset';\n const METHOD_POSITION = 'position';\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class ScrollSpy extends BaseComponent {\n constructor(element, config) {\n super(element);\n this._scrollElement = this._element.tagName === 'BODY' ? window : this._element;\n this._config = this._getConfig(config);\n this._offsets = [];\n this._targets = [];\n this._activeTarget = null;\n this._scrollHeight = 0;\n EventHandler.on(this._scrollElement, EVENT_SCROLL, () => this._process());\n this.refresh();\n\n this._process();\n } // Getters\n\n\n static get Default() {\n return Default$1;\n }\n\n static get NAME() {\n return NAME$2;\n } // Public\n\n\n refresh() {\n const autoMethod = this._scrollElement === this._scrollElement.window ? METHOD_OFFSET : METHOD_POSITION;\n const offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;\n const offsetBase = offsetMethod === METHOD_POSITION ? this._getScrollTop() : 0;\n this._offsets = [];\n this._targets = [];\n this._scrollHeight = this._getScrollHeight();\n const targets = SelectorEngine.find(SELECTOR_LINK_ITEMS, this._config.target);\n targets.map(element => {\n const targetSelector = getSelectorFromElement(element);\n const target = targetSelector ? SelectorEngine.findOne(targetSelector) : null;\n\n if (target) {\n const targetBCR = target.getBoundingClientRect();\n\n if (targetBCR.width || targetBCR.height) {\n return [Manipulator[offsetMethod](target).top + offsetBase, targetSelector];\n }\n }\n\n return null;\n }).filter(item => item).sort((a, b) => a[0] - b[0]).forEach(item => {\n this._offsets.push(item[0]);\n\n this._targets.push(item[1]);\n });\n }\n\n dispose() {\n EventHandler.off(this._scrollElement, EVENT_KEY$2);\n super.dispose();\n } // Private\n\n\n _getConfig(config) {\n config = { ...Default$1,\n ...Manipulator.getDataAttributes(this._element),\n ...(typeof config === 'object' && config ? config : {})\n };\n config.target = getElement(config.target) || document.documentElement;\n typeCheckConfig(NAME$2, config, DefaultType$1);\n return config;\n }\n\n _getScrollTop() {\n return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop;\n }\n\n _getScrollHeight() {\n return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);\n }\n\n _getOffsetHeight() {\n return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height;\n }\n\n _process() {\n const scrollTop = this._getScrollTop() + this._config.offset;\n\n const scrollHeight = this._getScrollHeight();\n\n const maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight();\n\n if (this._scrollHeight !== scrollHeight) {\n this.refresh();\n }\n\n if (scrollTop >= maxScroll) {\n const target = this._targets[this._targets.length - 1];\n\n if (this._activeTarget !== target) {\n this._activate(target);\n }\n\n return;\n }\n\n if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {\n this._activeTarget = null;\n\n this._clear();\n\n return;\n }\n\n for (let i = this._offsets.length; i--;) {\n const isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]);\n\n if (isActiveTarget) {\n this._activate(this._targets[i]);\n }\n }\n }\n\n _activate(target) {\n this._activeTarget = target;\n\n this._clear();\n\n const queries = SELECTOR_LINK_ITEMS.split(',').map(selector => `${selector}[data-bs-target=\"${target}\"],${selector}[href=\"${target}\"]`);\n const link = SelectorEngine.findOne(queries.join(','), this._config.target);\n link.classList.add(CLASS_NAME_ACTIVE$1);\n\n if (link.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {\n SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE$1, link.closest(SELECTOR_DROPDOWN$1)).classList.add(CLASS_NAME_ACTIVE$1);\n } else {\n SelectorEngine.parents(link, SELECTOR_NAV_LIST_GROUP$1).forEach(listGroup => {\n // Set triggered links parents as active\n // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor\n SelectorEngine.prev(listGroup, `${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}`).forEach(item => item.classList.add(CLASS_NAME_ACTIVE$1)); // Handle special case when .nav-link is inside .nav-item\n\n SelectorEngine.prev(listGroup, SELECTOR_NAV_ITEMS).forEach(navItem => {\n SelectorEngine.children(navItem, SELECTOR_NAV_LINKS).forEach(item => item.classList.add(CLASS_NAME_ACTIVE$1));\n });\n });\n }\n\n EventHandler.trigger(this._scrollElement, EVENT_ACTIVATE, {\n relatedTarget: target\n });\n }\n\n _clear() {\n SelectorEngine.find(SELECTOR_LINK_ITEMS, this._config.target).filter(node => node.classList.contains(CLASS_NAME_ACTIVE$1)).forEach(node => node.classList.remove(CLASS_NAME_ACTIVE$1));\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = ScrollSpy.getOrCreateInstance(this, config);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n });\n }\n\n }\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n\n EventHandler.on(window, EVENT_LOAD_DATA_API, () => {\n SelectorEngine.find(SELECTOR_DATA_SPY).forEach(spy => new ScrollSpy(spy));\n });\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .ScrollSpy to jQuery only if jQuery is present\n */\n\n defineJQueryPlugin(ScrollSpy);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): tab.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME$1 = 'tab';\n const DATA_KEY$1 = 'bs.tab';\n const EVENT_KEY$1 = `.${DATA_KEY$1}`;\n const DATA_API_KEY = '.data-api';\n const EVENT_HIDE$1 = `hide${EVENT_KEY$1}`;\n const EVENT_HIDDEN$1 = `hidden${EVENT_KEY$1}`;\n const EVENT_SHOW$1 = `show${EVENT_KEY$1}`;\n const EVENT_SHOWN$1 = `shown${EVENT_KEY$1}`;\n const EVENT_CLICK_DATA_API = `click${EVENT_KEY$1}${DATA_API_KEY}`;\n const CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu';\n const CLASS_NAME_ACTIVE = 'active';\n const CLASS_NAME_FADE$1 = 'fade';\n const CLASS_NAME_SHOW$1 = 'show';\n const SELECTOR_DROPDOWN = '.dropdown';\n const SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';\n const SELECTOR_ACTIVE = '.active';\n const SELECTOR_ACTIVE_UL = ':scope > li > .active';\n const SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"tab\"], [data-bs-toggle=\"pill\"], [data-bs-toggle=\"list\"]';\n const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';\n const SELECTOR_DROPDOWN_ACTIVE_CHILD = ':scope > .dropdown-menu .active';\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Tab extends BaseComponent {\n // Getters\n static get NAME() {\n return NAME$1;\n } // Public\n\n\n show() {\n if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && this._element.classList.contains(CLASS_NAME_ACTIVE)) {\n return;\n }\n\n let previous;\n const target = getElementFromSelector(this._element);\n\n const listElement = this._element.closest(SELECTOR_NAV_LIST_GROUP);\n\n if (listElement) {\n const itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? SELECTOR_ACTIVE_UL : SELECTOR_ACTIVE;\n previous = SelectorEngine.find(itemSelector, listElement);\n previous = previous[previous.length - 1];\n }\n\n const hideEvent = previous ? EventHandler.trigger(previous, EVENT_HIDE$1, {\n relatedTarget: this._element\n }) : null;\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$1, {\n relatedTarget: previous\n });\n\n if (showEvent.defaultPrevented || hideEvent !== null && hideEvent.defaultPrevented) {\n return;\n }\n\n this._activate(this._element, listElement);\n\n const complete = () => {\n EventHandler.trigger(previous, EVENT_HIDDEN$1, {\n relatedTarget: this._element\n });\n EventHandler.trigger(this._element, EVENT_SHOWN$1, {\n relatedTarget: previous\n });\n };\n\n if (target) {\n this._activate(target, target.parentNode, complete);\n } else {\n complete();\n }\n } // Private\n\n\n _activate(element, container, callback) {\n const activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? SelectorEngine.find(SELECTOR_ACTIVE_UL, container) : SelectorEngine.children(container, SELECTOR_ACTIVE);\n const active = activeElements[0];\n const isTransitioning = callback && active && active.classList.contains(CLASS_NAME_FADE$1);\n\n const complete = () => this._transitionComplete(element, active, callback);\n\n if (active && isTransitioning) {\n active.classList.remove(CLASS_NAME_SHOW$1);\n\n this._queueCallback(complete, element, true);\n } else {\n complete();\n }\n }\n\n _transitionComplete(element, active, callback) {\n if (active) {\n active.classList.remove(CLASS_NAME_ACTIVE);\n const dropdownChild = SelectorEngine.findOne(SELECTOR_DROPDOWN_ACTIVE_CHILD, active.parentNode);\n\n if (dropdownChild) {\n dropdownChild.classList.remove(CLASS_NAME_ACTIVE);\n }\n\n if (active.getAttribute('role') === 'tab') {\n active.setAttribute('aria-selected', false);\n }\n }\n\n element.classList.add(CLASS_NAME_ACTIVE);\n\n if (element.getAttribute('role') === 'tab') {\n element.setAttribute('aria-selected', true);\n }\n\n reflow(element);\n\n if (element.classList.contains(CLASS_NAME_FADE$1)) {\n element.classList.add(CLASS_NAME_SHOW$1);\n }\n\n let parent = element.parentNode;\n\n if (parent && parent.nodeName === 'LI') {\n parent = parent.parentNode;\n }\n\n if (parent && parent.classList.contains(CLASS_NAME_DROPDOWN_MENU)) {\n const dropdownElement = element.closest(SELECTOR_DROPDOWN);\n\n if (dropdownElement) {\n SelectorEngine.find(SELECTOR_DROPDOWN_TOGGLE, dropdownElement).forEach(dropdown => dropdown.classList.add(CLASS_NAME_ACTIVE));\n }\n\n element.setAttribute('aria-expanded', true);\n }\n\n if (callback) {\n callback();\n }\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Tab.getOrCreateInstance(this);\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n }\n });\n }\n\n }\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n\n EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault();\n }\n\n if (isDisabled(this)) {\n return;\n }\n\n const data = Tab.getOrCreateInstance(this);\n data.show();\n });\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Tab to jQuery only if jQuery is present\n */\n\n defineJQueryPlugin(Tab);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): toast.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'toast';\n const DATA_KEY = 'bs.toast';\n const EVENT_KEY = `.${DATA_KEY}`;\n const EVENT_MOUSEOVER = `mouseover${EVENT_KEY}`;\n const EVENT_MOUSEOUT = `mouseout${EVENT_KEY}`;\n const EVENT_FOCUSIN = `focusin${EVENT_KEY}`;\n const EVENT_FOCUSOUT = `focusout${EVENT_KEY}`;\n const EVENT_HIDE = `hide${EVENT_KEY}`;\n const EVENT_HIDDEN = `hidden${EVENT_KEY}`;\n const EVENT_SHOW = `show${EVENT_KEY}`;\n const EVENT_SHOWN = `shown${EVENT_KEY}`;\n const CLASS_NAME_FADE = 'fade';\n const CLASS_NAME_HIDE = 'hide'; // @deprecated - kept here only for backwards compatibility\n\n const CLASS_NAME_SHOW = 'show';\n const CLASS_NAME_SHOWING = 'showing';\n const DefaultType = {\n animation: 'boolean',\n autohide: 'boolean',\n delay: 'number'\n };\n const Default = {\n animation: true,\n autohide: true,\n delay: 5000\n };\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Toast extends BaseComponent {\n constructor(element, config) {\n super(element);\n this._config = this._getConfig(config);\n this._timeout = null;\n this._hasMouseInteraction = false;\n this._hasKeyboardInteraction = false;\n\n this._setListeners();\n } // Getters\n\n\n static get DefaultType() {\n return DefaultType;\n }\n\n static get Default() {\n return Default;\n }\n\n static get NAME() {\n return NAME;\n } // Public\n\n\n show() {\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW);\n\n if (showEvent.defaultPrevented) {\n return;\n }\n\n this._clearTimeout();\n\n if (this._config.animation) {\n this._element.classList.add(CLASS_NAME_FADE);\n }\n\n const complete = () => {\n this._element.classList.remove(CLASS_NAME_SHOWING);\n\n EventHandler.trigger(this._element, EVENT_SHOWN);\n\n this._maybeScheduleHide();\n };\n\n this._element.classList.remove(CLASS_NAME_HIDE); // @deprecated\n\n\n reflow(this._element);\n\n this._element.classList.add(CLASS_NAME_SHOW);\n\n this._element.classList.add(CLASS_NAME_SHOWING);\n\n this._queueCallback(complete, this._element, this._config.animation);\n }\n\n hide() {\n if (!this._element.classList.contains(CLASS_NAME_SHOW)) {\n return;\n }\n\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE);\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n const complete = () => {\n this._element.classList.add(CLASS_NAME_HIDE); // @deprecated\n\n\n this._element.classList.remove(CLASS_NAME_SHOWING);\n\n this._element.classList.remove(CLASS_NAME_SHOW);\n\n EventHandler.trigger(this._element, EVENT_HIDDEN);\n };\n\n this._element.classList.add(CLASS_NAME_SHOWING);\n\n this._queueCallback(complete, this._element, this._config.animation);\n }\n\n dispose() {\n this._clearTimeout();\n\n if (this._element.classList.contains(CLASS_NAME_SHOW)) {\n this._element.classList.remove(CLASS_NAME_SHOW);\n }\n\n super.dispose();\n } // Private\n\n\n _getConfig(config) {\n config = { ...Default,\n ...Manipulator.getDataAttributes(this._element),\n ...(typeof config === 'object' && config ? config : {})\n };\n typeCheckConfig(NAME, config, this.constructor.DefaultType);\n return config;\n }\n\n _maybeScheduleHide() {\n if (!this._config.autohide) {\n return;\n }\n\n if (this._hasMouseInteraction || this._hasKeyboardInteraction) {\n return;\n }\n\n this._timeout = setTimeout(() => {\n this.hide();\n }, this._config.delay);\n }\n\n _onInteraction(event, isInteracting) {\n switch (event.type) {\n case 'mouseover':\n case 'mouseout':\n this._hasMouseInteraction = isInteracting;\n break;\n\n case 'focusin':\n case 'focusout':\n this._hasKeyboardInteraction = isInteracting;\n break;\n }\n\n if (isInteracting) {\n this._clearTimeout();\n\n return;\n }\n\n const nextElement = event.relatedTarget;\n\n if (this._element === nextElement || this._element.contains(nextElement)) {\n return;\n }\n\n this._maybeScheduleHide();\n }\n\n _setListeners() {\n EventHandler.on(this._element, EVENT_MOUSEOVER, event => this._onInteraction(event, true));\n EventHandler.on(this._element, EVENT_MOUSEOUT, event => this._onInteraction(event, false));\n EventHandler.on(this._element, EVENT_FOCUSIN, event => this._onInteraction(event, true));\n EventHandler.on(this._element, EVENT_FOCUSOUT, event => this._onInteraction(event, false));\n }\n\n _clearTimeout() {\n clearTimeout(this._timeout);\n this._timeout = null;\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Toast.getOrCreateInstance(this, config);\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config](this);\n }\n });\n }\n\n }\n\n enableDismissTrigger(Toast);\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Toast to jQuery only if jQuery is present\n */\n\n defineJQueryPlugin(Toast);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.1.3): index.umd.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n const index_umd = {\n Alert,\n Button,\n Carousel,\n Collapse,\n Dropdown,\n Modal,\n Offcanvas,\n Popover,\n ScrollSpy,\n Tab,\n Toast,\n Tooltip\n };\n\n return index_umd;\n\n}));\n//# sourceMappingURL=bootstrap.bundle.js.map\n","import { noop, safe_not_equal, subscribe, run_all, is_function } from '../internal/index.mjs';\nexport { get_store_value as get } from '../internal/index.mjs';\n\nconst subscriber_queue = [];\n/**\n * Creates a `Readable` store that allows reading by subscription.\n * @param value initial value\n * @param {StartStopNotifier}start start and stop notifications for subscriptions\n */\nfunction readable(value, start) {\n return {\n subscribe: writable(value, start).subscribe\n };\n}\n/**\n * Create a `Writable` store that allows both updating and reading by subscription.\n * @param {*=}value initial value\n * @param {StartStopNotifier=}start start and stop notifications for subscriptions\n */\nfunction writable(value, start = noop) {\n let stop;\n const subscribers = new Set();\n function set(new_value) {\n if (safe_not_equal(value, new_value)) {\n value = new_value;\n if (stop) { // store is ready\n const run_queue = !subscriber_queue.length;\n for (const subscriber of subscribers) {\n subscriber[1]();\n subscriber_queue.push(subscriber, value);\n }\n if (run_queue) {\n for (let i = 0; i < subscriber_queue.length; i += 2) {\n subscriber_queue[i][0](subscriber_queue[i + 1]);\n }\n subscriber_queue.length = 0;\n }\n }\n }\n }\n function update(fn) {\n set(fn(value));\n }\n function subscribe(run, invalidate = noop) {\n const subscriber = [run, invalidate];\n subscribers.add(subscriber);\n if (subscribers.size === 1) {\n stop = start(set) || noop;\n }\n run(value);\n return () => {\n subscribers.delete(subscriber);\n if (subscribers.size === 0) {\n stop();\n stop = null;\n }\n };\n }\n return { set, update, subscribe };\n}\nfunction derived(stores, fn, initial_value) {\n const single = !Array.isArray(stores);\n const stores_array = single\n ? [stores]\n : stores;\n const auto = fn.length < 2;\n return readable(initial_value, (set) => {\n let inited = false;\n const values = [];\n let pending = 0;\n let cleanup = noop;\n const sync = () => {\n if (pending) {\n return;\n }\n cleanup();\n const result = fn(single ? values[0] : values, set);\n if (auto) {\n set(result);\n }\n else {\n cleanup = is_function(result) ? result : noop;\n }\n };\n const unsubscribers = stores_array.map((store, i) => subscribe(store, (value) => {\n values[i] = value;\n pending &= ~(1 << i);\n if (inited) {\n sync();\n }\n }, () => {\n pending |= (1 << i);\n }));\n inited = true;\n sync();\n return function stop() {\n run_all(unsubscribers);\n cleanup();\n };\n });\n}\n\nexport { derived, readable, writable };\n","import { writable } from 'svelte/store';\n\nexport const map_store = writable();\nexport const results_store = writable();\nexport const last_api_request_url_store = writable();\nexport const error_store = writable();\nexport const page = writable();\n\n/**\n * Update the global page state.\n *\n * When called without a parameter, then the current window.location is\n * parsed and the page state is set accordingly. Otherwise the page state\n * is set from the parameters. 'pagename' is the overall subpage (without\n * .html extension). 'params' must be an URLSearchParams object and contain\n * the requested query parameters. It may also be omitted completely for a\n * link without query parameters.\n */\nconst default_pagename = Nominatim_Config.Reverse_Only ? 'reverse' : 'search';\nconst pagenames = [\n default_pagename,\n 'reverse',\n 'details',\n 'deletable',\n 'polygons',\n 'status',\n 'about'\n];\n\nexport function refresh_page(pagename, params) {\n if (typeof pagename === 'undefined') {\n pagename = window.location.pathname.replace('.html', '').replace(/^.*\\//, '');\n\n if (!pagenames.includes(pagename)) pagename = default_pagename;\n\n params = new URLSearchParams(window.location.search);\n } else {\n if (!pagenames.includes(pagename)) pagename = default_pagename;\n\n if (typeof params === 'undefined') {\n params = new URLSearchParams();\n }\n\n let param_str = params.toString();\n if (param_str) {\n param_str = '?' + param_str;\n }\n let new_url = pagename + '.html' + param_str;\n\n if (window.location.protocol.match(/^http/)) {\n window.history.pushState([], '', new_url);\n } else {\n window.location.href = new_url;\n }\n }\n\n page.set({ tab: pagename, params: params });\n last_api_request_url_store.set(null);\n error_store.set(null);\n}\n","<style>\n footer {\n clear: both;\n font-size: 0.8em;\n text-align: center;\n }\n footer p {\n margin: 1em;\n }\n</style>\n\n<footer>\n <p class=\"disclaimer\">\n Addresses and postcodes are approximate\n </p>\n <p class=\"copyright\">\n © <a href=\"https://osm.org/copyright\">OpenStreetMap</a> contributors\n </p>\n</footer>\n","import { last_api_request_url_store, error_store } from './stores.js';\n\nfunction api_request_progress(status) {\n var loading_el = document.getElementById('loading');\n if (!loading_el) return; // might not be on page yet\n\n loading_el.style.display = (status === 'start') ? 'block' : null;\n}\n\nexport async function fetch_from_api(endpoint_name, params, callback) {\n var api_url = generate_nominatim_api_url(endpoint_name, params);\n\n // For the test suite:\n // If httpbin_status URL parameter is set we call https://httpbin.org/#/Status_codes\n var tmp_params = new URLSearchParams(window.location.search);\n if (tmp_params && tmp_params.get('httpbin_status')) {\n api_url = 'https://httpbin.org/status/' + parseInt(tmp_params.get('httpbin_status'), 10);\n }\n\n api_request_progress('start');\n if (endpoint_name !== 'status') last_api_request_url_store.set(null);\n\n try {\n await fetch(api_url, { headers: Nominatim_Config.Nominatim_API_Endpoint_Headers || {} })\n .then(async (response) => {\n if (!((response.status >= 200 && response.status < 300) || response.status === 404)) {\n error_store.set(`Error fetching data from ${api_url} (${response.statusText})`);\n return undefined;\n }\n\n // Parse JSON here instead of returning a promise so we can catch possible\n // errors.\n var data;\n try {\n data = await response.json();\n } catch (err) {\n // e.g. 'JSON.parse: unexpected non-whitespace character after JSON data at line 1'\n error_store.set(`Error parsing JSON data from ${api_url} (${err})`);\n return undefined;\n }\n return data;\n })\n .then((data) => {\n if (data) {\n if (data.error) {\n error_store.set(data.error.message);\n }\n callback(data);\n }\n api_request_progress('finish');\n });\n } catch (error) {\n error_store.set(`Error fetching data from ${api_url} (${error})`);\n api_request_progress('finish');\n }\n\n if (endpoint_name !== 'status') last_api_request_url_store.set(api_url);\n}\n\nvar fetch_content_cache = {};\nexport async function fetch_content_into_element(url, dom_element) {\n if (!window.location.protocol.match(/^http/)) {\n dom_element.innerHTML = `Cannot display data from ${url} here. `\n + 'Browser security prevents loading content from file:// URLs.';\n return;\n }\n\n if (fetch_content_cache[url]) {\n dom_element.innerHTML = fetch_content_cache[url];\n return;\n }\n try {\n await fetch(url)\n .then(response => response.text())\n .then(html => {\n html = html.replace('Nominatim_API_Endpoint', Nominatim_Config.Nominatim_API_Endpoint);\n dom_element.innerHTML = html;\n fetch_content_cache[url] = html;\n });\n } catch (error) {\n dom_element.innerHTML = `Error fetching content from ${url} (${error})`;\n }\n}\n\nfunction generate_nominatim_api_url(endpoint_name, params) {\n // default value for /search\n if (params.dedupe === 1) delete params.dedupe;\n\n extend_parameters(params, Nominatim_Config.Nominatim_API_Endpoint_Params);\n return Nominatim_Config.Nominatim_API_Endpoint + endpoint_name + '.php?'\n + Object.keys(clean_up_parameters(params)).map((k) => {\n return encodeURIComponent(k) + '=' + encodeURIComponent(params[k]);\n }).join('&');\n}\n\nfunction extend_parameters(params, params2) {\n var param_names = Object.keys(params2);\n for (var i = 0; i < param_names.length; i += 1) {\n params[param_names[i]] = params2[param_names[i]];\n }\n}\n\nfunction clean_up_parameters(params) {\n // `&a=&b=&c=1` => '&c=1'\n var param_names = Object.keys(params);\n for (var i = 0; i < param_names.length; i += 1) {\n var val = params[param_names[i]];\n if (typeof (val) === 'undefined' || val === '' || val === null) {\n delete params[param_names[i]];\n }\n }\n return params;\n}\n\nexport function update_html_title(title) {\n document.title = [title, Nominatim_Config.Page_Title]\n .filter((val) => val && val.length > 1)\n .join(' | ');\n}\n\n","<script>\n import { refresh_page } from '../lib/stores.js';\n\n export let page;\n export let params_hash = {};\n export let extra_classes = '';\n let href = page + '.html';\n\n function handleClick() {\n refresh_page(page, new URLSearchParams(params_hash));\n }\n\n $: {\n let param_str = new URLSearchParams(params_hash).toString();\n href = page + '.html' + (param_str ? '?' : '') + param_str;\n }\n</script>\n\n<a on:click|preventDefault|stopPropagation={handleClick} href={href} class={extra_classes}><slot></slot></a>\n","<script>\nimport { refresh_page } from '../lib/stores.js';\n\nexport let lat = null;\nexport let lon = null;\nexport let zoom = null;\nexport let extra_classes = '';\n\nlet params = new URLSearchParams();\nlet href = 'reverse.html';\n\n$: {\n let new_params = new URLSearchParams();\n\n if (lat && lon) {\n new_params.set('lat', lat);\n new_params.set('lon', lon);\n\n if (zoom) {\n new_params.set('zoom', zoom);\n }\n }\n\n params = new_params;\n}\n\n$: {\n let param_str = params.toString();\n href = 'reverse.html' + (param_str ? '?' : '') + param_str;\n}\n</script>\n\n<a on:click|preventDefault|stopPropagation={() => refresh_page('reverse', params)} href={href} class={extra_classes}><slot></slot></a>\n","var EN_US = ['second', 'minute', 'hour', 'day', 'week', 'month', 'year'];\nexport default function (diff, idx) {\n if (idx === 0)\n return ['just now', 'right now'];\n var unit = EN_US[Math.floor(idx / 2)];\n if (diff > 1)\n unit += 's';\n return [diff + \" \" + unit + \" ago\", \"in \" + diff + \" \" + unit];\n}\n//# sourceMappingURL=en_US.js.map","var ZH_CN = ['秒', '分钟', '小时', '天', '周', '个月', '年'];\nexport default function (diff, idx) {\n if (idx === 0)\n return ['刚刚', '片刻后'];\n var unit = ZH_CN[~~(idx / 2)];\n return [diff + \" \" + unit + \"\\u524D\", diff + \" \" + unit + \"\\u540E\"];\n}\n//# sourceMappingURL=zh_CN.js.map","/**\n * Created by hustcc on 18/5/20.\n * Contract: i@hust.cc\n */\n/**\n * All supported locales\n */\nvar Locales = {};\n/**\n * register a locale\n * @param locale\n * @param func\n */\nexport var register = function (locale, func) {\n Locales[locale] = func;\n};\n/**\n * get a locale, default is en_US\n * @param locale\n * @returns {*}\n */\nexport var getLocale = function (locale) {\n return Locales[locale] || Locales['en_US'];\n};\n//# sourceMappingURL=register.js.map","/**\n * Created by hustcc on 18/5/20.\n * Contract: i@hust.cc\n */\nvar SEC_ARRAY = [\n 60,\n 60,\n 24,\n 7,\n 365 / 7 / 12,\n 12,\n];\n/**\n * format Date / string / timestamp to timestamp\n * @param input\n * @returns {*}\n */\nexport function toDate(input) {\n if (input instanceof Date)\n return input;\n // @ts-ignore\n if (!isNaN(input) || /^\\d+$/.test(input))\n return new Date(parseInt(input));\n input = (input || '')\n // @ts-ignore\n .trim()\n .replace(/\\.\\d+/, '') // remove milliseconds\n .replace(/-/, '/')\n .replace(/-/, '/')\n .replace(/(\\d)T(\\d)/, '$1 $2')\n .replace(/Z/, ' UTC') // 2017-2-5T3:57:52Z -> 2017-2-5 3:57:52UTC\n .replace(/([+-]\\d\\d):?(\\d\\d)/, ' $1$2'); // -04:00 -> -0400\n return new Date(input);\n}\n/**\n * format the diff second to *** time ago, with setting locale\n * @param diff\n * @param localeFunc\n * @returns\n */\nexport function formatDiff(diff, localeFunc) {\n /**\n * if locale is not exist, use defaultLocale.\n * if defaultLocale is not exist, use build-in `en`.\n * be sure of no error when locale is not exist.\n *\n * If `time in`, then 1\n * If `time ago`, then 0\n */\n var agoIn = diff < 0 ? 1 : 0;\n /**\n * Get absolute value of number (|diff| is non-negative) value of x\n * |diff| = diff if diff is positive\n * |diff| = -diff if diff is negative\n * |0| = 0\n */\n diff = Math.abs(diff);\n /**\n * Time in seconds\n */\n var totalSec = diff;\n /**\n * Unit of time\n */\n var idx = 0;\n for (; diff >= SEC_ARRAY[idx] && idx < SEC_ARRAY.length; idx++) {\n diff /= SEC_ARRAY[idx];\n }\n /**\n * Math.floor() is alternative of ~~\n *\n * The differences and bugs:\n * Math.floor(3.7) -> 4 but ~~3.7 -> 3\n * Math.floor(1559125440000.6) -> 1559125440000 but ~~1559125440000.6 -> 52311552\n *\n * More information about the performance of algebraic:\n * https://www.youtube.com/watch?v=65-RbBwZQdU\n */\n diff = Math.floor(diff);\n idx *= 2;\n if (diff > (idx === 0 ? 9 : 1))\n idx += 1;\n return localeFunc(diff, idx, totalSec)[agoIn].replace('%s', diff.toString());\n}\n/**\n * calculate the diff second between date to be formatted an now date.\n * @param date\n * @param relativeDate\n * @returns {number}\n */\nexport function diffSec(date, relativeDate) {\n var relDate = relativeDate ? toDate(relativeDate) : new Date();\n return (+relDate - +toDate(date)) / 1000;\n}\n/**\n * nextInterval: calculate the next interval time.\n * - diff: the diff sec between now and date to be formatted.\n *\n * What's the meaning?\n * diff = 61 then return 59\n * diff = 3601 (an hour + 1 second), then return 3599\n * make the interval with high performance.\n **/\nexport function nextInterval(diff) {\n var rst = 1, i = 0, d = Math.abs(diff);\n for (; diff >= SEC_ARRAY[i] && i < SEC_ARRAY.length; i++) {\n diff /= SEC_ARRAY[i];\n rst *= SEC_ARRAY[i];\n }\n d = d % rst;\n d = d ? rst - d : rst;\n return Math.ceil(d);\n}\n//# sourceMappingURL=date.js.map","import { formatDiff, diffSec } from './utils/date';\nimport { getLocale } from './register';\n/**\n * format a TDate into string\n * @param date\n * @param locale\n * @param opts\n */\nexport var format = function (date, locale, opts) {\n // diff seconds\n var sec = diffSec(date, opts && opts.relativeDate);\n // format it with locale\n return formatDiff(sec, getLocale(locale));\n};\n//# sourceMappingURL=format.js.map","<script>\n import PageLink from './PageLink.svelte';\n import * as timeago from 'timeago.js';\n import { last_api_request_url_store } from '../lib/stores.js';\n import { fetch_from_api } from '../lib/api_utils.js';\n\n let last_updated_date;\n let last_api_request_url;\n let fetch_running = false; // prevent multiple parallel fetch runs\n\n last_api_request_url_store.subscribe(url => {\n last_api_request_url = url;\n\n if (last_api_request_url) {\n last_api_request_url = new URL(last_api_request_url, window.location.origin);\n last_api_request_url.searchParams.delete('polygon_geojson');\n last_api_request_url = last_api_request_url.toString();\n }\n\n if (fetch_running || last_updated_date) return;\n\n fetch_running = true;\n\n fetch_from_api('status', { format: 'json' }, function (data) {\n last_updated_date = data.data_updated;\n fetch_running = false;\n });\n });\n</script>\n\n<style>\n #last-updated {\n position: relative;\n font-size: 0.8rem;\n font-style: italic;\n }\n #loading {\n display: none;\n position: absolute;\n padding: 0.5em 1em;\n top: 0;\n left: 0;\n width: 100%;\n background-color: #eee;\n z-index: 100;\n }\n</style>\n\n<div id=\"last-updated\" class=\"container-fluid py-2 px-4 mb-3\">\n <div id=\"loading\" class=\"py-2 px-4\">\n <div class=\"spinner-border spinner-border-sm text-primary me-1\" role=\"status\"></div>\n Loading data from API ...\n </div>\n <div class=\"row\">\n <div class=\"col-sm-6\">\n {#if last_api_request_url}\n <div id=\"api-request\">\n Data from <a href=\"{last_api_request_url}\">API request</a>\n <span id=\"api-request-debug\">\n (<a href=\"{last_api_request_url}&debug=1\">debug output</a>)\n </span>\n </div>\n {/if}\n </div>\n <div class=\"col-sm-6 text-end\">\n {#if last_updated_date}\n Data last updated:\n <abbr id=\"data-date\" title=\"{last_updated_date} (UTC timezone)\">{timeago.format(new Date(last_updated_date))}</abbr>\n {/if}\n (<PageLink page=\"status\">Details</PageLink>)\n </div>\n </div>\n</div>\n","/**\n * Created by hustcc on 18/5/20.\n * Contract: i@hust.cc\n */\nimport en_US from './lang/en_US';\nimport zh_CN from './lang/zh_CN';\nimport { register } from './register';\nregister('en_US', en_US);\nregister('zh_CN', zh_CN);\nexport { format } from './format';\nexport { render, cancel } from './realtime';\nexport { register };\n//# sourceMappingURL=index.js.map","<script>\n import { error_store } from '../lib/stores.js';\n\n let error_message;\n\n error_store.subscribe(text => { error_message = text; });\n\n function dismiss_message() {\n error_store.set(null);\n }\n</script>\n\n{#if error_message}\n <div id=\"error\" class=\"container-fluid alert-danger py-3 px-4\">\n {error_message}\n\n <button type=\"button\" class=\"btn-close float-end\" aria-label=\"dismiss\" on:click={dismiss_message}></button>\n </div>\n{/if}\n","<script>\n import PageLink from './PageLink.svelte';\n import ReverseLink from './ReverseLink.svelte';\n import LastUpdated from './LastUpdated.svelte';\n import Error from './Error.svelte';\n\n import { map_store, page } from '../lib/stores.js';\n\n $: view = $page.tab;\n $: page_title = Nominatim_Config.Page_Title;\n $: reverse_only = Nominatim_Config.Reverse_Only;\n\n let map_lat;\n let map_lon;\n\n map_store.subscribe(map => {\n if (!map) return;\n\n map.on('move', function () {\n map_lat = map.getCenter().lat;\n map_lon = map.getCenter().lng;\n });\n });\n</script>\n\n<style>\n .navbar-brand :global(a:hover) {\n text-decoration: none;\n }\n\n .navbar-brand h1 {\n display: inline;\n font-size: 1.2em;\n color: #333;\n }\n\n .navbar-brand img {\n display: inline-block;\n margin-right: 5px;\n margin-top: -5px;\n }\n\n .nav-item {\n white-space: nowrap;\n }\n\n .page-title-section {\n display: none;\n text-align: center;\n padding: 1em;\n }\n @media (max-width: 600px) {\n .page-title-section {\n display: block;\n }\n }\n\n .search-section {\n padding: 1em 30px;\n background-color: #f5f5f5;\n border-top: 2px solid #ddd;\n border-bottom: 2px solid #ddd;\n }\n</style>\n\n<header class=\"container-fluid\">\n <nav class=\"navbar navbar-expand-sm navbar-light\">\n <div class=\"container-fluid\">\n <!-- Brand -->\n <div class=\"navbar-brand\">\n <PageLink page={reverse_only ? 'reverse' : 'search'}>\n <img alt=\"logo\" id=\"theme-logo\" src=\"theme/logo.png\" />\n <h1>{page_title}</h1>\n </PageLink>\n </div>\n <!-- Toggler (hamburger button) -->\n <button class=\"navbar-toggler\" type=\"button\" data-bs-toggle=\"collapse\" data-bs-target=\"#navbarSupportedContent\" aria-controls=\"navbarSupportedContent\" aria-expanded=\"false\" aria-label=\"Toggle navigation\">\n <span class=\"navbar-toggler-icon\"></span>\n </button>\n <div class=\"collapse navbar-collapse\" id=\"navbarSupportedContent\">\n <!-- Left-aligned links -->\n <ul class=\"navbar-nav me-auto\">\n {#if !reverse_only}\n <li class=\"nav-item\">\n <PageLink page=\"search\" extra_classes=\"nav-link {view === 'search' ? 'active' : ''}\">Search</PageLink>\n </li>\n {/if}\n <li class=\"nav-item\">\n <ReverseLink lat={map_lat} lon={map_lon} extra_classes=\"nav-link {view === 'reverse' ? 'active' : ''}\">Reverse</ReverseLink>\n </li>\n <li class=\"nav-item\">\n <PageLink page=\"details\" extra_classes=\"nav-link {view === 'details' ? 'active' : ''}\">Search By ID</PageLink>\n </li>\n </ul>\n </div>\n <!-- Right aligned links -->\n <ul class=\"navbar-nav\">\n <li class=\"nav-item\">\n <PageLink page=\"about\" extra_classes=\"nav-link {view === 'about' ? 'active' : ''}\">About & Help</PageLink>\n </li>\n </ul>\n </div>\n </nav>\n</header>\n<section class=\"page-title-section\">\n <h2>{view}</h2>\n</section>\n<section class=\"search-section\">\n <slot/>\n</section>\n<Error/>\n<LastUpdated/>\n","<script>\n import { refresh_page } from '../lib/stores.js';\n\n export let page;\n\n function serialize_form(form) {\n var params = new URLSearchParams();\n\n Array.prototype.slice.call(form.elements).forEach(function (field) {\n if (!field.name || field.disabled || ['submit', 'button'].indexOf(field.type) > -1) return;\n\n if (['checkbox', 'radio'].indexOf(field.type) > -1 && !field.checked) return;\n if (typeof field.value === 'undefined' || field.value === '') return;\n\n // Default value for /search endpoint\n if (field.name === 'dedupe' && (field.value === 1 || field.value === '1')) return;\n\n params.set(field.name, field.value);\n });\n\n return params;\n }\n\n // https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation\n // doesn't support hidden fields, so we check those in an extra step\n function validate_field(field) {\n if (field.type === 'hidden') {\n if (field.value.length) {\n if (field.pattern && !field.value.match(field.pattern)) return false;\n }\n }\n return field.checkValidity(); // for hidden field always true\n }\n\n function handle_submit(event) {\n let form = event.target;\n\n let allow_submit = true;\n\n Array.prototype.slice.call(form.elements).forEach(function (field) {\n if (!validate_field(field)) {\n alert('Invalid input in ' + field.name);\n allow_submit = false;\n }\n });\n\n if (allow_submit) refresh_page(page, serialize_form(form));\n }\n</script>\n\n<form on:submit|preventDefault={handle_submit} class=\"form-inline\" role=\"search\" accept-charset=\"UTF-8\" action=\"\">\n <div class=\"row g-2\">\n <slot></slot>\n </div>\n</form>\n","<script>\n import UrlSubmitForm from '../components/UrlSubmitForm.svelte';\n\n import { map_store } from '../lib/stores.js';\n import { get } from 'svelte/store';\n\n export let bStructuredSearch = false;\n export let api_request_params = {};\n let sViewBox;\n let lat;\n let lon;\n\n function map_viewbox_as_string(map) {\n var bounds = map.getBounds();\n var west = bounds.getWest();\n var east = bounds.getEast();\n\n if ((east - west) >= 360) { // covers more than whole planet\n west = map.getCenter().lng - 179.999;\n east = map.getCenter().lng + 179.999;\n }\n east = L.latLng(77, east).wrap().lng;\n west = L.latLng(77, west).wrap().lng;\n\n return [\n west.toFixed(5), // left\n bounds.getNorth().toFixed(5), // top\n east.toFixed(5), // right\n bounds.getSouth().toFixed(5) // bottom\n ].join(',');\n }\n\n function set_viewbox(map) {\n let use_viewbox = document.getElementById('use_viewbox');\n if (use_viewbox && use_viewbox.checked) {\n sViewBox = map_viewbox_as_string(map);\n } else {\n sViewBox = '';\n }\n }\n\n function update_reverse_link(map) {\n let center_lat_lng = map.wrapLatLng(map.getCenter());\n lat = center_lat_lng.lat.toFixed(5);\n lon = center_lat_lng.lng.toFixed(5);\n }\n\n map_store.subscribe(map => {\n if (!map) { return; }\n\n map.on('move', function () {\n set_viewbox(map);\n update_reverse_link(map);\n });\n\n map.on('load', function () {\n set_viewbox(map);\n update_reverse_link(map);\n });\n });\n\n function reset_viewbox() {\n let map = get(map_store);\n if (map) { set_viewbox(map); }\n }\n\n function set_bounded(e) {\n document.querySelector('input[name=bounded]').value = e.target.checked ? 1 : '';\n }\n\n function set_dedupe(e) {\n document.querySelector('input[name=dedupe]').value = e.target.checked ? 1 : 0;\n }\n\n function set_api_param(e) {\n document.querySelector('input[name=' + e.target.dataset.apiParam + ']').value = e.target.value;\n }\n</script>\n\n<ul class=\"nav nav-tabs\">\n <li class=\"nav-item\">\n <a class=\"nav-link\" class:active={!bStructuredSearch} data-bs-toggle=\"tab\" href=\"#simple\">Simple</a>\n </li>\n <li class=\"nav-item\">\n <a class=\"nav-link\" class:active={bStructuredSearch} data-bs-toggle=\"tab\" href=\"#structured\">Structured</a>\n </li>\n</ul>\n\n<div class=\"tab-content py-2\">\n <div class=\"tab-pane\" class:active={!bStructuredSearch} id=\"simple\" role=\"tabpanel\">\n <UrlSubmitForm page=\"search\">\n <div class=\"col-auto\">\n <input id=\"q\"\n name=\"q\"\n type=\"text\"\n class=\"form-control form-control-sm\"\n placeholder=\"Search\"\n value=\"{api_request_params.q || ''}\" />\n </div>\n <div class=\"col-auto\">\n <button type=\"submit\" class=\"btn btn-primary btn-sm mx-1\">Search</button>\n <input type=\"hidden\" name=\"viewbox\" value=\"{sViewBox || ''}\" />\n <input type=\"hidden\" name=\"dedupe\" value=\"{api_request_params.dedupe === 0 ? 0 : 1}\" />\n <input type=\"hidden\" name=\"bounded\" value=\"{api_request_params.bounded ? 1 : ''}\" />\n <input type=\"hidden\" name=\"accept-language\" value=\"{api_request_params['accept-language'] || ''}\" />\n <input type=\"hidden\" name=\"countrycodes\" value=\"{api_request_params.countrycodes || ''}\"\n pattern=\"^[a-zA-Z]{'{2}'}(,[a-zA-Z]{'{2}'})*$\" />\n <input type=\"hidden\" name=\"limit\" value=\"{api_request_params.limit || ''}\" />\n <input type=\"hidden\" name=\"polygon_threshold\" value=\"{api_request_params.polygon_threshold || ''}\" />\n </div>\n </UrlSubmitForm>\n </div>\n <div class=\"tab-pane\" class:active={bStructuredSearch} id=\"structured\" role=\"tabpanel\">\n <UrlSubmitForm page=\"search\">\n <div class=\"col-auto\">\n <input name=\"street\" type=\"text\" class=\"form-control form-control-sm me-1\"\n placeholder=\"House number/Street\"\n value=\"{api_request_params.street || ''}\" />\n </div>\n <div class=\"col-auto\">\n <input name=\"city\" type=\"text\" class=\"form-control form-control-sm me-1\"\n placeholder=\"City\"\n value=\"{api_request_params.city || ''}\" />\n </div>\n <div class=\"col-auto\">\n <input id=\"county\" name=\"county\" type=\"text\" class=\"form-control form-control-sm me-1\"\n placeholder=\"County\"\n value=\"{api_request_params.county || ''}\" />\n </div>\n <div class=\"col-auto\">\n <input name=\"state\" type=\"text\" class=\"form-control form-control-sm me-1\"\n placeholder=\"State\"\n value=\"{api_request_params.state || ''}\" />\n </div>\n <div class=\"col-auto\">\n <input name=\"country\" type=\"text\" class=\"form-control form-control-sm me-1\"\n placeholder=\"Country\"\n value=\"{api_request_params.country || ''}\" />\n </div>\n <div class=\"col-auto\">\n <input name=\"postalcode\" type=\"text\" class=\"form-control form-control-sm me-1\"\n placeholder=\"Postal Code\"\n value=\"{api_request_params.postalcode || ''}\" />\n </div>\n <div class=\"col-auto\">\n <button type=\"submit\" class=\"btn btn-primary btn-sm\">Search</button>\n <input type=\"hidden\" name=\"viewbox\" value=\"{sViewBox || ''}\" />\n <input type=\"hidden\" name=\"dedupe\" value=\"{api_request_params.dedupe === 0 ? 0 : 1}\" />\n <input type=\"hidden\" name=\"bounded\" value=\"{api_request_params.bounded ? 1 : ''}\" />\n <input type=\"hidden\" name=\"accept-language\" value=\"{api_request_params['accept-language'] || ''}\" />\n <input type=\"hidden\" name=\"countrycodes\" value=\"{api_request_params.countrycodes || ''}\"\n pattern=\"^[a-zA-Z]{'{2}'}(,[a-zA-Z]{'{2}'})*$\" />\n <input type=\"hidden\" name=\"limit\" value=\"{api_request_params.limit || ''}\" />\n <input type=\"hidden\" name=\"polygon_threshold\" value=\"{api_request_params.polygon_threshold || ''}\" />\n </div>\n </UrlSubmitForm>\n </div>\n</div> <!-- /tab-content -->\n\n<!-- Additional options -->\n<details id=\"searchAdvancedOptions\">\n <summary><small>Advanced options</small></summary>\n <ul>\n <li>\n <div class=\"form-check form-check-inline\">\n <label class=\"form-check-label\" for=\"use_viewbox\">apply viewbox</label>\n <input type=\"checkbox\" class=\"form-check-input api-param-setting\"\n id=\"use_viewbox\" checked={api_request_params.viewbox} on:change={reset_viewbox}>\n </div>\n </li>\n\n <li>\n <div class=\"form-check form-check-inline\">\n <label class=\"form-check-label\" for=\"option_bounded\">bounded to viewbox</label>\n <input type=\"checkbox\" class=\"form-check-input api-param-setting\"\n id=\"option_bounded\" checked={!!api_request_params.bounded} on:change={set_bounded}>\n </div>\n </li>\n\n <li>\n <div class=\"form-check form-check-inline\">\n <label class=\"form-check-label\" for=\"option_dedupe\">deduplicate results</label>\n <input type=\"checkbox\" class=\"form-check-input api-param-setting\"\n id=\"option_dedupe\" checked={api_request_params.dedupe === 0 ? 0 : 1} on:change={set_dedupe}>\n </div>\n </li>\n\n <li>\n <label for=\"option_limit\">Maximum number of results</label>\n <input type=\"number\" class=\"form-control form-control-sm d-inline w-auto api-param-setting\"\n data-api-param=\"limit\" id=\"option_limit\" min=\"1\" max=\"50\"\n value=\"{api_request_params.limit || ''}\"\n on:change={set_api_param}>\n </li>\n\n <li>\n <label for=\"option_polygon_threshold\">Polygon simplification</label>\n <input type=\"number\" class=\"form-control form-control-sm d-inline w-auto api-param-setting\"\n data-api-param=\"polygon_threshold\" id=\"option_polygon_threshold\" min=\"0.0\" max=\"1.0\" step=\"0.001\"\n value=\"{api_request_params.polygon_threshold || ''}\"\n on:change={set_api_param}>\n </li>\n\n <li>\n <label for=\"accept_lang\">Languages</label>\n <input type=\"text\" placeholder=\"e.g. en,zh-Hant\" class=\"form-control form-control-sm d-inline w-auto api-param-setting\"\n data-api-param=\"accept-language\" id=\"accept_lang\" size=\"15\"\n value=\"{api_request_params['accept-language'] || ''}\"\n on:change={set_api_param}>\n </li>\n\n <li>\n <label for=\"option_ccode\">Country Codes</label>\n <input type=\"text\" placeholder=\"e.g. de,gb\" class=\"form-control form-control-sm d-inline w-auto api-param-setting\"\n data-api-param=\"countrycodes\" id=\"option_ccode\" size=\"15\"\n value=\"{api_request_params.countrycodes || ''}\"\n pattern=\"^[a-zA-Z]{'{2}'}(,[a-zA-Z]{'{2}'})*$\"\n on:change={set_api_param}>\n </li>\n </ul>\n</details>\n\n<style>\n .nav-tabs {\n font-size: 0.8em;\n margin-top: -1em;\n }\n\n .nav-link {\n padding: 0.1rem 1rem;\n }\n\n #q {\n width: 500px;\n max-width: 100%;\n }\n\n #searchAdvancedOptions ul {\n list-style-type: none;\n padding: 0;\n font-size: 0.85rem;\n }\n\n #searchAdvancedOptions li {\n display: inline-block;\n padding: 4px 10px;\n border-radius: 5px;\n border: 1px dotted #ccc;\n margin-right: 1em;\n }\n\n #searchAdvancedOptions label {\n margin-right: 0.5em;\n }\n\n</style>\n","/*!\n * escape-html\n * Copyright(c) 2012-2013 TJ Holowaychuk\n * Copyright(c) 2015 Andreas Lubbe\n * Copyright(c) 2015 Tiancheng \"Timothy\" Gu\n * MIT Licensed\n */\n\n'use strict';\n\n/**\n * Module variables.\n * @private\n */\n\nvar matchHtmlRegExp = /[\"'&<>]/;\n\n/**\n * Module exports.\n * @public\n */\n\nmodule.exports = escapeHtml;\n\n/**\n * Escape special characters in the given string of html.\n *\n * @param {string} string The string to escape for inserting into HTML\n * @return {string}\n * @public\n */\n\nfunction escapeHtml(string) {\n var str = '' + string;\n var match = matchHtmlRegExp.exec(str);\n\n if (!match) {\n return str;\n }\n\n var escape;\n var html = '';\n var index = 0;\n var lastIndex = 0;\n\n for (index = match.index; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34: // \"\n escape = '"';\n break;\n case 38: // &\n escape = '&';\n break;\n case 39: // '\n escape = ''';\n break;\n case 60: // <\n escape = '<';\n break;\n case 62: // >\n escape = '>';\n break;\n default:\n continue;\n }\n\n if (lastIndex !== index) {\n html += str.substring(lastIndex, index);\n }\n\n lastIndex = index + 1;\n html += escape;\n }\n\n return lastIndex !== index\n ? html + str.substring(lastIndex, index)\n : html;\n}\n","module.exports.formatOSMType = formatOSMType;\nmodule.exports.osmLink = osmLink;\nmodule.exports.formatLabel = formatLabel;\nmodule.exports.wikipediaLink = wikipediaLink;\nmodule.exports.coverageType = coverageType;\nmodule.exports.isAdminBoundary = isAdminBoundary;\nmodule.exports.formatAddressRank = formatAddressRank;\nmodule.exports.formatPlaceType = formatPlaceType;\nmodule.exports.formatAdminLevel = formatAdminLevel;\nmodule.exports.formatDistance = formatDistance;\nmodule.exports.formatKeywordToken = formatKeywordToken;\nmodule.exports.zoomLevels = zoomLevels;\n\nconst escapeHtml = require('escape-html');\n\nfunction formatOSMType(sType, bExcludeExternal) {\n if (sType === 'N') return 'node';\n if (sType === 'W') return 'way';\n if (sType === 'R') return 'relation';\n\n if (!bExcludeExternal) return '';\n\n if (sType === 'T') return 'way';\n if (sType === 'I') return 'way';\n\n return '';\n}\n\nfunction osmLink(aPlace) {\n if (!aPlace.osm_type) return '';\n var sOSMType = formatOSMType(aPlace.osm_type, false);\n if (!sOSMType) return '';\n\n return '<a href=\"https://www.openstreetmap.org/' + sOSMType + '/' + aPlace.osm_id + '\">' + sOSMType + ' ' + aPlace.osm_id + '</a>';\n}\n\nfunction formatLabel(aPlace) {\n if (aPlace.label) return aPlace.label;\n\n function capitalize(s) {\n return s && s[0].toUpperCase() + s.slice(1);\n }\n\n if (aPlace.type && aPlace.type === 'yes' && aPlace.class) {\n return capitalize(aPlace.class.replace(/_/g, ' '));\n }\n if (aPlace.type) {\n return capitalize(aPlace.type.replace(/_/g, ' '));\n }\n return '';\n}\n\n/* en:London_Borough_of_Redbridge => https://en.wikipedia.org/wiki/London_Borough_of_Redbridge */\nfunction wikipediaLink(aPlace) {\n if (!aPlace.calculated_wikipedia) return '';\n\n var parts = aPlace.calculated_wikipedia.split(':', 2);\n\n var sTitle = escapeHtml(aPlace.calculated_wikipedia);\n var sLanguage = escapeHtml(parts[0]);\n var sArticle = escapeHtml(parts[1]);\n\n return '<a href=\"https://' + sLanguage + '.wikipedia.org/wiki/' + sArticle + '\" target=\"_blank\">' + sTitle + '</a>';\n}\n\nfunction coverageType(aPlace) {\n return (aPlace.isarea ? 'Polygon' : 'Point');\n}\n\nfunction isAdminBoundary(aPlace) {\n return aPlace.category === 'boundary' && aPlace.type === 'administrative';\n}\n\nfunction formatAddressRank(iRank) {\n if (iRank < 4) return 'other';\n if (iRank < 6) return 'country';\n if (iRank < 8) return 'region';\n if (iRank < 10) return 'state';\n if (iRank < 12) return 'state district';\n if (iRank < 14) return 'county';\n if (iRank < 16) return 'municipality';\n if (iRank < 18) return 'city / town / village';\n if (iRank < 20) return 'city / village district';\n if (iRank < 22) return 'suburb / hamlet';\n if (iRank < 24) return 'neighbourhood';\n if (iRank < 26) return 'city block / square';\n if (iRank === 26) return 'major street';\n if (iRank === 27) return 'minory street / path';\n if (iRank <= 30) return 'house / building';\n return 'other';\n}\n\nfunction formatPlaceType(aPlace) {\n var sOut = aPlace.class + ':' + aPlace.type;\n if (aPlace.type && aPlace.type === 'administrative' && aPlace.place_type) {\n sOut = sOut + ' (' + aPlace.place_type + ')';\n }\n return escapeHtml(sOut);\n}\n\n// Any over 15 are invalid data in OSM anyway\nfunction formatAdminLevel(iLevel) {\n return (iLevel && iLevel < 15 ? iLevel : '');\n}\n\nfunction formatDistance(fDistance, bInMeters) {\n if (bInMeters) {\n if (fDistance < 1) return '0';\n var sFormatted = (fDistance >= 1000)\n ? Math.round(fDistance / 1000, 1) + ' km'\n : Math.round(fDistance, 0) + ' m';\n\n return '<abbr class=\"distance\" title=\"' + fDistance + ' meters\">~' + sFormatted + '</abbr>';\n }\n\n // spheric distance, http://postgis.net/docs/ST_Distance_Spheroid.html\n if (fDistance === 0) return '0';\n\n return '<abbr class=\"distance\" title=\"spheric distance ' + fDistance + '\">~'\n + (Math.round(fDistance * 1000, 4) / 1000)\n + '</abbr>';\n}\n\n// mark partial tokens (those starting with a space) with a star for readability\nfunction formatKeywordToken(sToken) {\n return (sToken[0] === ' ' ? '*' : '') + escapeHtml(sToken);\n}\n\nfunction zoomLevels() {\n const aZoomLevels = [\n /* 0 */ 'Continent / Sea',\n /* 1 */ '',\n /* 2 */ '',\n /* 3 */ 'Country',\n /* 4 */ '',\n /* 5 */ 'State',\n /* 6 */ 'Region',\n /* 7 */ '',\n /* 8 */ 'County',\n /* 9 */ '',\n /* 10 */ 'City',\n /* 11 */ '',\n /* 12 */ 'Town / Village',\n /* 13 */ '',\n /* 14 */ 'Suburb',\n /* 15 */ '',\n /* 16 */ 'Street',\n /* 17 */ '',\n /* 18 */ 'Building',\n /* 19 */ '',\n /* 20 */ '',\n /* 21 */ ''\n ];\n return aZoomLevels;\n}\n","<script>\n import { refresh_page } from '../lib/stores.js';\n\n export let extra_classes = '';\n export let feature = null;\n\n let url_params = new URLSearchParams();\n let href = 'details.html';\n\n function formatShortOSMType(sType) {\n if (sType === 'node') return 'N';\n if (sType === 'way') return 'W';\n if (sType === 'relation') return 'R';\n return '';\n }\n\n function handleClick() {\n refresh_page('details', url_params);\n }\n\n $: {\n let new_params = new URLSearchParams();\n\n if (feature !== null) {\n if (feature.osm_type) {\n if (feature.osm_type.length === 1) {\n new_params.set('osmtype', feature.osm_type);\n } else {\n new_params.set('osmtype', formatShortOSMType(feature.osm_type));\n }\n\n new_params.set('osmid', feature.osm_id);\n\n if (feature.class) {\n new_params.set('class', feature.class);\n } else if (feature.category) {\n new_params.set('class', feature.category);\n }\n } else if (feature.place_id) {\n new_params.set('place_id', feature.place_id);\n }\n }\n url_params = new_params;\n }\n\n $: {\n let param_str = url_params.toString();\n href = 'details.html' + (param_str ? '?' : '') + param_str;\n }\n</script>\n\n<a on:click|preventDefault|stopPropagation={handleClick} href={href} class={extra_classes}><slot></slot></a>\n","<script>\n import { onMount } from 'svelte';\n import { fetch_content_into_element } from '../lib/api_utils.js';\n\n onMount(() => {\n fetch_content_into_element('theme/welcome.html', document.getElementById('welcome'));\n });\n</script>\n\n<div id=\"welcome\"></div>\n","<script>\n\n export let aPlace;\n\n $: sIcon = getIcon(aPlace.category, aPlace.type);\n $: title = 'icon for ' + aPlace.category + ' ' + aPlace.type;\n $: url = Nominatim_Config.Images_Base_Url + sIcon + '.p.20.png';\n\n function getIcon(category, type) {\n // equivalent to PHP Nominatim::ClassTypes::getIcon\n // covers 83 of 214 available icon filenames, e.g. transport_roundabout_anticlockwise\n // transport_rental_bicycle or place_of_worship_christian would need more data from\n // the place.\n var aIcons = {\n 'boundary:administrative': 'poi_boundary_administrative',\n 'place:city': 'poi_place_city',\n 'place:town': 'poi_place_town',\n 'place:village': 'poi_place_village',\n 'place:hamlet': 'poi_place_village',\n 'place:suburb': 'poi_place_village',\n 'place:locality': 'poi_place_village',\n 'place:airport': 'transport_airport2',\n 'aeroway:aerodrome': 'transport_airport2',\n 'railway:station': 'transport_train_station2',\n 'amenity:place_of_worship': 'place_of_worship_unknown3',\n 'amenity:pub': 'food_pub',\n 'amenity:bar': 'food_bar',\n 'amenity:university': 'education_university',\n 'tourism:museum': 'tourist_museum',\n 'amenity:arts_centre': 'tourist_art_gallery2',\n 'tourism:zoo': 'tourist_zoo',\n 'tourism:theme_park': 'poi_point_of_interest',\n 'tourism:attraction': 'poi_point_of_interest',\n 'leisure:golf_course': 'sport_golf',\n 'historic:castle': 'tourist_castle',\n 'amenity:hospital': 'health_hospital',\n 'amenity:school': 'education_school',\n 'amenity:theatre': 'tourist_theatre',\n 'amenity:library': 'amenity_library',\n 'amenity:fire_station': 'amenity_firestation3',\n 'amenity:police': 'amenity_police2',\n 'amenity:bank': 'money_bank2',\n 'amenity:post_office': 'amenity_post_office',\n 'tourism:hotel': 'accommodation_hotel2',\n 'amenity:cinema': 'tourist_cinema',\n 'tourism:artwork': 'tourist_art_gallery2',\n 'historic:archaeological_site': 'tourist_archaeological2',\n 'amenity:doctors': 'health_doctors',\n 'leisure:sports_centre': 'sport_leisure_centre',\n 'leisure:swimming_pool': 'sport_swimming_outdoor',\n 'shop:supermarket': 'shopping_supermarket',\n 'shop:convenience': 'shopping_convenience',\n 'amenity:restaurant': 'food_restaurant',\n 'amenity:fast_food': 'food_fastfood',\n 'amenity:cafe': 'food_cafe',\n 'tourism:guest_house': 'accommodation_bed_and_breakfast',\n 'amenity:pharmacy': 'health_pharmacy_dispensing',\n 'amenity:fuel': 'transport_fuel',\n 'natural:peak': 'poi_peak',\n 'natural:wood': 'landuse_coniferous_and_deciduous',\n 'shop:bicycle': 'shopping_bicycle',\n 'shop:clothes': 'shopping_clothes',\n 'shop:hairdresser': 'shopping_hairdresser',\n 'shop:doityourself': 'shopping_diy',\n 'shop:estate_agent': 'shopping_estateagent2',\n 'shop:car': 'shopping_car',\n 'shop:garden_centre': 'shopping_garden_centre',\n 'shop:car_repair': 'shopping_car_repair',\n 'shop:bakery': 'shopping_bakery',\n 'shop:butcher': 'shopping_butcher',\n 'shop:apparel': 'shopping_clothes',\n 'shop:laundry': 'shopping_laundrette',\n 'shop:beverages': 'shopping_alcohol',\n 'shop:alcohol': 'shopping_alcohol',\n 'shop:optician': 'health_opticians',\n 'shop:chemist': 'health_pharmacy',\n 'shop:gallery': 'tourist_art_gallery2',\n 'shop:jewelry': 'shopping_jewelry',\n 'tourism:information': 'amenity_information',\n 'historic:ruins': 'tourist_ruin',\n 'amenity:college': 'education_school',\n 'historic:monument': 'tourist_monument',\n 'historic:memorial': 'tourist_monument',\n 'historic:mine': 'poi_mine',\n 'tourism:caravan_site': 'accommodation_caravan_park',\n 'amenity:bus_station': 'transport_bus_station',\n 'amenity:atm': 'money_atm2',\n 'tourism:viewpoint': 'tourist_view_point',\n 'tourism:guesthouse': 'accommodation_bed_and_breakfast',\n 'railway:tram': 'transport_tram_stop',\n 'amenity:courthouse': 'amenity_court',\n 'amenity:recycling': 'amenity_recycling',\n 'amenity:dentist': 'health_dentist',\n 'natural:beach': 'tourist_beach',\n 'railway:tram_stop': 'transport_tram_stop',\n 'amenity:prison': 'amenity_prison',\n 'highway:bus_stop': 'transport_bus_stop2'\n };\n\n return aIcons[category + ':' + type];\n }\n\n</script>\n\n{#if sIcon}\n <img class=\"mapicon\" src={url} alt={title} />\n{/if}\n\n<style>\n .mapicon {\n margin: 10px 0;\n }\n</style>\n","<script>\n import { results_store } from '../lib/stores.js';\n import { formatLabel } from '../lib/helpers.js';\n\n import DetailsLink from './DetailsLink.svelte';\n import Welcome from './Welcome.svelte';\n import MapIcon from './MapIcon.svelte';\n\n export let reverse_search = false;\n export let current_result = null;\n\n let aSearchResults;\n let iHighlightNum;\n let sMoreURL;\n\n results_store.subscribe(data => {\n if (!data) { return; }\n aSearchResults = data;\n iHighlightNum = 0;\n current_result = aSearchResults[0];\n\n\n let search_params = new URLSearchParams(window.location.search);\n\n let aResults = data;\n // lonvia wrote: https://github.com/osm-search/nominatim-ui/issues/24\n // I would suggest to remove the guessing and always show the link. Nominatim only returns\n // one or two results when it believes the result to be a good enough match.\n // if (aResults.length >= 10) {\n var aExcludePlaceIds = [];\n if (search_params.has('exclude_place_ids')) {\n aExcludePlaceIds = search_params.get('exclude_place_ids').split(',');\n }\n for (var i = 0; i < aResults.length; i += 1) {\n aExcludePlaceIds.push(aResults[i].place_id);\n }\n var parsed_url = new URLSearchParams(window.location.search);\n parsed_url.set('exclude_place_ids', aExcludePlaceIds.join(','));\n sMoreURL = '?' + parsed_url.toString();\n });\n\n function handleClick(e) {\n let result_el = e.target;\n if (!result_el.className.match('result')) {\n result_el = result_el.parentElement;\n }\n let pos = Number(result_el.dataset.position);\n\n current_result = aSearchResults[pos];\n iHighlightNum = pos;\n }\n\n</script>\n\n{#if aSearchResults && aSearchResults.length > 0}\n <div id=\"searchresults\">\n\n {#each aSearchResults as aResult, iResNum}\n <div class=\"result\" class:highlight={iResNum === iHighlightNum} data-position=\"{iResNum}\" on:click|stopPropagation={handleClick}>\n <div style=\"float:right\">\n <MapIcon aPlace={aResult} />\n </div>\n <span class=\"name\">{aResult.display_name}</span>\n <span class=\"type\">{formatLabel(aResult)}</span>\n <p class=\"coords\">{aResult.lat},{aResult.lon}</p>\n\n <DetailsLink extra_classes=\"btn btn-outline-secondary btn-sm\" feature={aResult}>details</DetailsLink>\n </div>\n {/each}\n\n {#if sMoreURL && !reverse_search}\n <div class=\"more\">\n <a class=\"btn btn-primary\" href=\"{sMoreURL}\">\n Search for more results\n </a>\n </div>\n {/if}\n </div>\n{:else if aSearchResults}\n {#if reverse_search}\n <div id=\"intro\" class=\"sidebar\">Search for coordinates or click anywhere on the map.</div>\n {:else}\n <div class=\"noresults\">No search results found</div>\n {/if}\n{:else}\n <Welcome/>\n{/if}\n\n<style>\n .result {\n font-size: 0.8em;\n margin: 5px;\n margin-top:0px;\n padding: 4px 8px;\n border-radius: 2px;\n background:#F0F7FF;\n border: 2px solid #D7E7FF;\n cursor:pointer;\n min-height: 5em;\n }\n\n .result.highlight {\n background-color: #D9E7F7;\n border-color: #9DB9E4;\n }\n .result.highlight :global(a) {\n margin: 10px auto;\n display: block;\n max-width: 10em;\n padding: 1px;\n background-color: white;\n }\n .result .type{\n color: gray;\n font-size: 0.8em;\n }\n .result :global(a) {\n display: none;\n }\n\n .result .coords {\n display: none; \n }\n\n .noresults{\n text-align: center;\n padding: 1em;\n }\n\n .more{\n text-align:center;\n margin-top: 1em;\n }\n\n .result.highlight :global(a):hover {\n color: #111;\n }\n</style>\n","/* @preserve\n * Leaflet 1.7.1, a JS library for interactive maps. http://leafletjs.com\n * (c) 2010-2019 Vladimir Agafonkin, (c) 2010-2011 CloudMade\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define(['exports'], factory) :\n (factory((global.L = {})));\n}(this, (function (exports) { 'use strict';\n\n var version = \"1.7.1\";\n\n /*\r\n * @namespace Util\r\n *\r\n * Various utility functions, used by Leaflet internally.\r\n */\r\n\r\n // @function extend(dest: Object, src?: Object): Object\r\n // Merges the properties of the `src` object (or multiple objects) into `dest` object and returns the latter. Has an `L.extend` shortcut.\r\n function extend(dest) {\r\n \tvar i, j, len, src;\r\n\r\n \tfor (j = 1, len = arguments.length; j < len; j++) {\r\n \t\tsrc = arguments[j];\r\n \t\tfor (i in src) {\r\n \t\t\tdest[i] = src[i];\r\n \t\t}\r\n \t}\r\n \treturn dest;\r\n }\r\n\r\n // @function create(proto: Object, properties?: Object): Object\r\n // Compatibility polyfill for [Object.create](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/create)\r\n var create = Object.create || (function () {\r\n \tfunction F() {}\r\n \treturn function (proto) {\r\n \t\tF.prototype = proto;\r\n \t\treturn new F();\r\n \t};\r\n })();\r\n\r\n // @function bind(fn: Function, …): Function\r\n // Returns a new function bound to the arguments passed, like [Function.prototype.bind](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/bind).\r\n // Has a `L.bind()` shortcut.\r\n function bind(fn, obj) {\r\n \tvar slice = Array.prototype.slice;\r\n\r\n \tif (fn.bind) {\r\n \t\treturn fn.bind.apply(fn, slice.call(arguments, 1));\r\n \t}\r\n\r\n \tvar args = slice.call(arguments, 2);\r\n\r\n \treturn function () {\r\n \t\treturn fn.apply(obj, args.length ? args.concat(slice.call(arguments)) : arguments);\r\n \t};\r\n }\r\n\r\n // @property lastId: Number\r\n // Last unique ID used by [`stamp()`](#util-stamp)\r\n var 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\n function stamp(obj) {\r\n \t/*eslint-disable */\r\n \tobj._leaflet_id = obj._leaflet_id || ++lastId;\r\n \treturn obj._leaflet_id;\r\n \t/* eslint-enable */\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\n // Has an `L.throttle` shortcut.\r\n function throttle(fn, time, context) {\r\n \tvar lock, args, wrapperFn, later;\r\n\r\n \tlater = function () {\r\n \t\t// reset lock and call if queued\r\n \t\tlock = false;\r\n \t\tif (args) {\r\n \t\t\twrapperFn.apply(context, args);\r\n \t\t\targs = false;\r\n \t\t}\r\n \t};\r\n\r\n \twrapperFn = function () {\r\n \t\tif (lock) {\r\n \t\t\t// called too soon, queue to call later\r\n \t\t\targs = arguments;\r\n\r\n \t\t} else {\r\n \t\t\t// call and lock until later\r\n \t\t\tfn.apply(context, arguments);\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\n function wrapNum(x, range, includeMax) {\r\n \tvar max = range[1],\r\n \t min = range[0],\r\n \t d = 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\n function falseFn() { return false; }\r\n\r\n // @function formatNum(num: Number, digits?: Number): Number\r\n // Returns the number `num` rounded to `digits` decimals, or to 6 decimals by default.\r\n function formatNum(num, digits) {\r\n \tvar pow = Math.pow(10, (digits === undefined ? 6 : digits));\r\n \treturn Math.round(num * pow) / pow;\r\n }\r\n\r\n // @function trim(str: String): String\r\n // Compatibility polyfill for [String.prototype.trim](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim)\r\n function trim(str) {\r\n \treturn str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g, '');\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\n function splitWords(str) {\r\n \treturn trim(str).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`. Has an `L.setOptions` shortcut.\r\n function setOptions(obj, options) {\r\n \tif (!Object.prototype.hasOwnProperty.call(obj, 'options')) {\r\n \t\tobj.options = obj.options ? create(obj.options) : {};\r\n \t}\r\n \tfor (var i in options) {\r\n \t\tobj.options[i] = options[i];\r\n \t}\r\n \treturn obj.options;\r\n }\r\n\r\n // @function getParamString(obj: Object, existingUrl?: String, uppercase?: Boolean): String\r\n // Converts an object into a parameter URL string, e.g. `{a: \"foo\", b: \"bar\"}`\r\n // translates to `'?a=foo&b=bar'`. If `existingUrl` is set, the parameters will\r\n // be appended at the end. If `uppercase` is `true`, the parameter names will\r\n // be uppercased (e.g. `'?A=foo&B=bar'`)\r\n function getParamString(obj, existingUrl, uppercase) {\r\n \tvar params = [];\r\n \tfor (var i in obj) {\r\n \t\tparams.push(encodeURIComponent(uppercase ? i.toUpperCase() : i) + '=' + encodeURIComponent(obj[i]));\r\n \t}\r\n \treturn ((!existingUrl || existingUrl.indexOf('?') === -1) ? '?' : '&') + params.join('&');\r\n }\r\n\r\n var 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\n function template(str, data) {\r\n \treturn str.replace(templateRe, function (str, key) {\r\n \t\tvar 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 // @function isArray(obj): Boolean\r\n // Compatibility polyfill for [Array.isArray](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray)\r\n var isArray = Array.isArray || function (obj) {\r\n \treturn (Object.prototype.toString.call(obj) === '[object Array]');\r\n };\r\n\r\n // @function indexOf(array: Array, el: Object): Number\r\n // Compatibility polyfill for [Array.prototype.indexOf](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf)\r\n function indexOf(array, el) {\r\n \tfor (var i = 0; i < array.length; i++) {\r\n \t\tif (array[i] === el) { return i; }\r\n \t}\r\n \treturn -1;\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\n var emptyImageUrl = 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=';\r\n\r\n // inspired by http://paulirish.com/2011/requestanimationframe-for-smart-animating/\r\n\r\n function getPrefixed(name) {\r\n \treturn window['webkit' + name] || window['moz' + name] || window['ms' + name];\r\n }\r\n\r\n var lastTime = 0;\r\n\r\n // fallback for IE 7-8\r\n function timeoutDefer(fn) {\r\n \tvar time = +new Date(),\r\n \t timeToCall = Math.max(0, 16 - (time - lastTime));\r\n\r\n \tlastTime = time + timeToCall;\r\n \treturn window.setTimeout(fn, timeToCall);\r\n }\r\n\r\n var requestFn = window.requestAnimationFrame || getPrefixed('RequestAnimationFrame') || timeoutDefer;\r\n var cancelFn = window.cancelAnimationFrame || getPrefixed('CancelAnimationFrame') ||\r\n \t\tgetPrefixed('CancelRequestAnimationFrame') || function (id) { window.clearTimeout(id); };\r\n\r\n // @function requestAnimFrame(fn: Function, context?: Object, immediate?: Boolean): Number\r\n // Schedules `fn` to be executed when the browser repaints. `fn` is bound to\r\n // `context` if given. When `immediate` is set, `fn` is called immediately if\r\n // the browser doesn't have native support for\r\n // [`window.requestAnimationFrame`](https://developer.mozilla.org/docs/Web/API/window/requestAnimationFrame),\r\n // otherwise it's delayed. Returns a request ID that can be used to cancel the request.\r\n function requestAnimFrame(fn, context, immediate) {\r\n \tif (immediate && requestFn === timeoutDefer) {\r\n \t\tfn.call(context);\r\n \t} else {\r\n \t\treturn requestFn.call(window, bind(fn, context));\r\n \t}\r\n }\r\n\r\n // @function cancelAnimFrame(id: Number): undefined\r\n // Cancels a previous `requestAnimFrame`. See also [window.cancelAnimationFrame](https://developer.mozilla.org/docs/Web/API/window/cancelAnimationFrame).\r\n function cancelAnimFrame(id) {\r\n \tif (id) {\r\n \t\tcancelFn.call(window, id);\r\n \t}\r\n }\n\n var Util = ({\n extend: extend,\n create: create,\n bind: bind,\n lastId: lastId,\n stamp: stamp,\n throttle: throttle,\n wrapNum: wrapNum,\n falseFn: falseFn,\n formatNum: formatNum,\n trim: trim,\n splitWords: splitWords,\n setOptions: setOptions,\n getParamString: getParamString,\n template: template,\n isArray: isArray,\n indexOf: indexOf,\n emptyImageUrl: emptyImageUrl,\n requestFn: requestFn,\n cancelFn: cancelFn,\n requestAnimFrame: requestAnimFrame,\n cancelAnimFrame: cancelAnimFrame\n });\n\n // @class Class\r\n // @aka L.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\n function Class() {}\r\n\r\n Class.extend = function (props) {\r\n\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// Returns a Javascript function that is a class constructor (to be called with `new`).\r\n \tvar NewClass = function () {\r\n\r\n \t\t// call the constructor\r\n \t\tif (this.initialize) {\r\n \t\t\tthis.initialize.apply(this, arguments);\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 \tvar parentProto = NewClass.__super__ = this.prototype;\r\n\r\n \tvar proto = create(parentProto);\r\n \tproto.constructor = NewClass;\r\n\r\n \tNewClass.prototype = proto;\r\n\r\n \t// inherit parent's statics\r\n \tfor (var i in this) {\r\n \t\tif (Object.prototype.hasOwnProperty.call(this, i) && i !== 'prototype' && i !== '__super__') {\r\n \t\t\tNewClass[i] = this[i];\r\n \t\t}\r\n \t}\r\n\r\n \t// mix static properties into the class\r\n \tif (props.statics) {\r\n \t\textend(NewClass, props.statics);\r\n \t\tdelete props.statics;\r\n \t}\r\n\r\n \t// mix includes into the prototype\r\n \tif (props.includes) {\r\n \t\tcheckDeprecatedMixinEvents(props.includes);\r\n \t\textend.apply(null, [proto].concat(props.includes));\r\n \t\tdelete props.includes;\r\n \t}\r\n\r\n \t// merge options\r\n \tif (proto.options) {\r\n \t\tprops.options = extend(create(proto.options), props.options);\r\n \t}\r\n\r\n \t// mix given properties into the prototype\r\n \textend(proto, props);\r\n\r\n \tproto._initHooks = [];\r\n\r\n \t// add method for calling all hooks\r\n \tproto.callInitHooks = function () {\r\n\r\n \t\tif (this._initHooksCalled) { return; }\r\n\r\n \t\tif (parentProto.callInitHooks) {\r\n \t\t\tparentProto.callInitHooks.call(this);\r\n \t\t}\r\n\r\n \t\tthis._initHooksCalled = true;\r\n\r\n \t\tfor (var i = 0, len = proto._initHooks.length; i < len; i++) {\r\n \t\t\tproto._initHooks[i].call(this);\r\n \t\t}\r\n \t};\r\n\r\n \treturn NewClass;\r\n };\r\n\r\n\r\n // @function include(properties: Object): this\r\n // [Includes a mixin](#class-includes) into the current class.\r\n Class.include = function (props) {\r\n \textend(this.prototype, props);\r\n \treturn this;\r\n };\r\n\r\n // @function mergeOptions(options: Object): this\r\n // [Merges `options`](#class-options) into the defaults of the class.\r\n Class.mergeOptions = function (options) {\r\n \textend(this.prototype.options, options);\r\n \treturn this;\r\n };\r\n\r\n // @function addInitHook(fn: Function): this\r\n // Adds a [constructor hook](#class-constructor-hooks) to the class.\r\n Class.addInitHook = function (fn) { // (Function) || (String, args...)\r\n \tvar args = Array.prototype.slice.call(arguments, 1);\r\n\r\n \tvar init = typeof fn === 'function' ? fn : function () {\r\n \t\tthis[fn].apply(this, args);\r\n \t};\r\n\r\n \tthis.prototype._initHooks = this.prototype._initHooks || [];\r\n \tthis.prototype._initHooks.push(init);\r\n \treturn this;\r\n };\r\n\r\n function checkDeprecatedMixinEvents(includes) {\r\n \tif (typeof L === 'undefined' || !L || !L.Mixin) { return; }\r\n\r\n \tincludes = isArray(includes) ? includes : [includes];\r\n\r\n \tfor (var i = 0; i < includes.length; i++) {\r\n \t\tif (includes[i] === L.Mixin.Events) {\r\n \t\t\tconsole.warn('Deprecated include of L.Mixin.Events: ' +\r\n \t\t\t\t'this property will be removed in future releases, ' +\r\n \t\t\t\t'please inherit from L.Evented instead.', new Error().stack);\r\n \t\t}\r\n \t}\r\n }\n\n /*\r\n * @class Evented\r\n * @aka L.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\n var Events = {\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, mousemove: onMouseMove}`\r\n \t */\r\n \ton: function (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 (var type in 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, types[type], 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\ttypes = splitWords(types);\r\n\r\n \t\t\tfor (var i = 0, len = types.length; i < len; i++) {\r\n \t\t\t\tthis._on(types[i], 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: function (types, fn, context) {\r\n\r\n \t\tif (!types) {\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 (var type in types) {\r\n \t\t\t\tthis._off(type, types[type], fn);\r\n \t\t\t}\r\n\r\n \t\t} else {\r\n \t\t\ttypes = splitWords(types);\r\n\r\n \t\t\tfor (var i = 0, len = types.length; i < len; i++) {\r\n \t\t\t\tthis._off(types[i], 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// attach listener (without syntactic sugar now)\r\n \t_on: function (type, fn, context) {\r\n \t\tthis._events = this._events || {};\r\n\r\n \t\t/* get/init listeners for type */\r\n \t\tvar typeListeners = this._events[type];\r\n \t\tif (!typeListeners) {\r\n \t\t\ttypeListeners = [];\r\n \t\t\tthis._events[type] = typeListeners;\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 \t\tvar newListener = {fn: fn, ctx: context},\r\n \t\t listeners = typeListeners;\r\n\r\n \t\t// check if fn already there\r\n \t\tfor (var i = 0, len = listeners.length; i < len; i++) {\r\n \t\t\tif (listeners[i].fn === fn && listeners[i].ctx === context) {\r\n \t\t\t\treturn;\r\n \t\t\t}\r\n \t\t}\r\n\r\n \t\tlisteners.push(newListener);\r\n \t},\r\n\r\n \t_off: function (type, fn, context) {\r\n \t\tvar listeners,\r\n \t\t i,\r\n \t\t len;\r\n\r\n \t\tif (!this._events) { return; }\r\n\r\n \t\tlisteners = this._events[type];\r\n\r\n \t\tif (!listeners) {\r\n \t\t\treturn;\r\n \t\t}\r\n\r\n \t\tif (!fn) {\r\n \t\t\t// Set all removed listeners to noop so they are not called if remove happens in fire\r\n \t\t\tfor (i = 0, len = listeners.length; i < len; i++) {\r\n \t\t\t\tlisteners[i].fn = falseFn;\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 (context === this) {\r\n \t\t\tcontext = undefined;\r\n \t\t}\r\n\r\n \t\tif (listeners) {\r\n\r\n \t\t\t// find fn and remove it\r\n \t\t\tfor (i = 0, len = listeners.length; i < len; i++) {\r\n \t\t\t\tvar l = listeners[i];\r\n \t\t\t\tif (l.ctx !== context) { continue; }\r\n \t\t\t\tif (l.fn === fn) {\r\n\r\n \t\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\t\tl.fn = falseFn;\r\n\r\n \t\t\t\t\tif (this._firingCount) {\r\n \t\t\t\t\t\t/* copy array in case events are being fired */\r\n \t\t\t\t\t\tthis._events[type] = listeners = listeners.slice();\r\n \t\t\t\t\t}\r\n \t\t\t\t\tlisteners.splice(i, 1);\r\n\r\n \t\t\t\t\treturn;\r\n \t\t\t\t}\r\n \t\t\t}\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 an 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: function (type, data, propagate) {\r\n \t\tif (!this.listens(type, propagate)) { return this; }\r\n\r\n \t\tvar event = extend({}, data, {\r\n \t\t\ttype: type,\r\n \t\t\ttarget: this,\r\n \t\t\tsourceTarget: data && data.sourceTarget || this\r\n \t\t});\r\n\r\n \t\tif (this._events) {\r\n \t\t\tvar listeners = this._events[type];\r\n\r\n \t\t\tif (listeners) {\r\n \t\t\t\tthis._firingCount = (this._firingCount + 1) || 1;\r\n \t\t\t\tfor (var i = 0, len = listeners.length; i < len; i++) {\r\n \t\t\t\t\tvar l = listeners[i];\r\n \t\t\t\t\tl.fn.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): Boolean\r\n \t// Returns `true` if a particular event type has any listeners attached to it.\r\n \tlistens: function (type, propagate) {\r\n \t\tvar listeners = this._events && this._events[type];\r\n \t\tif (listeners && listeners.length) { return true; }\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 (var id in this._eventParents) {\r\n \t\t\t\tif (this._eventParents[id].listens(type, propagate)) { return true; }\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn false;\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: function (types, fn, context) {\r\n\r\n \t\tif (typeof types === 'object') {\r\n \t\t\tfor (var type in types) {\r\n \t\t\t\tthis.once(type, types[type], fn);\r\n \t\t\t}\r\n \t\t\treturn this;\r\n \t\t}\r\n\r\n \t\tvar handler = bind(function () {\r\n \t\t\tthis\r\n \t\t\t .off(types, fn, context)\r\n \t\t\t .off(types, handler, context);\r\n \t\t}, this);\r\n\r\n \t\t// add a listener that's executed once and removed after that\r\n \t\treturn this\r\n \t\t .on(types, fn, context)\r\n \t\t .on(types, handler, context);\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: function (obj) {\r\n \t\tthis._eventParents = this._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: function (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: function (e) {\r\n \t\tfor (var id in this._eventParents) {\r\n \t\t\tthis._eventParents[id].fire(e.type, extend({\r\n \t\t\t\tlayer: e.target,\r\n \t\t\t\tpropagatedFrom: e.target\r\n \t\t\t}, e), true);\r\n \t\t}\r\n \t}\r\n };\r\n\r\n // aliases; we should ditch those eventually\r\n\r\n // @method addEventListener(…): this\r\n // Alias to [`on(…)`](#evented-on)\r\n Events.addEventListener = Events.on;\r\n\r\n // @method removeEventListener(…): this\r\n // Alias to [`off(…)`](#evented-off)\r\n\r\n // @method clearAllEventListeners(…): this\r\n // Alias to [`off()`](#evented-off)\r\n Events.removeEventListener = Events.clearAllEventListeners = Events.off;\r\n\r\n // @method addOneTimeEventListener(…): this\r\n // Alias to [`once(…)`](#evented-once)\r\n Events.addOneTimeEventListener = Events.once;\r\n\r\n // @method fireEvent(…): this\r\n // Alias to [`fire(…)`](#evented-fire)\r\n Events.fireEvent = Events.fire;\r\n\r\n // @method hasEventListeners(…): Boolean\r\n // Alias to [`listens(…)`](#evented-listens)\r\n Events.hasEventListeners = Events.listens;\r\n\r\n var Evented = Class.extend(Events);\n\n /*\r\n * @class Point\r\n * @aka L.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 * var point = L.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(L.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 function Point(x, y, round) {\r\n \t// @property x: Number; The `x` coordinate of the point\r\n \tthis.x = (round ? Math.round(x) : x);\r\n \t// @property y: Number; The `y` coordinate of the point\r\n \tthis.y = (round ? Math.round(y) : y);\r\n }\r\n\r\n var trunc = Math.trunc || function (v) {\r\n \treturn v > 0 ? Math.floor(v) : Math.ceil(v);\r\n };\r\n\r\n Point.prototype = {\r\n\r\n \t// @method clone(): Point\r\n \t// Returns a copy of the current point.\r\n \tclone: function () {\r\n \t\treturn new Point(this.x, this.y);\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: function (point) {\r\n \t\t// non-destructive, returns a new point\r\n \t\treturn this.clone()._add(toPoint(point));\r\n \t},\r\n\r\n \t_add: function (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: function (point) {\r\n \t\treturn this.clone()._subtract(toPoint(point));\r\n \t},\r\n\r\n \t_subtract: function (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: function (num) {\r\n \t\treturn this.clone()._divideBy(num);\r\n \t},\r\n\r\n \t_divideBy: function (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: function (num) {\r\n \t\treturn this.clone()._multiplyBy(num);\r\n \t},\r\n\r\n \t_multiplyBy: function (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: function (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: function (point) {\r\n \t\treturn new Point(this.x / point.x, this.y / point.y);\r\n \t},\r\n\r\n \t// @method round(): Point\r\n \t// Returns a copy of the current point with rounded coordinates.\r\n \tround: function () {\r\n \t\treturn this.clone()._round();\r\n \t},\r\n\r\n \t_round: function () {\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: function () {\r\n \t\treturn this.clone()._floor();\r\n \t},\r\n\r\n \t_floor: function () {\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: function () {\r\n \t\treturn this.clone()._ceil();\r\n \t},\r\n\r\n \t_ceil: function () {\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// @method trunc(): Point\r\n \t// Returns a copy of the current point with truncated coordinates (rounded towards zero).\r\n \ttrunc: function () {\r\n \t\treturn this.clone()._trunc();\r\n \t},\r\n\r\n \t_trunc: function () {\r\n \t\tthis.x = trunc(this.x);\r\n \t\tthis.y = 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: function (point) {\r\n \t\tpoint = toPoint(point);\r\n\r\n \t\tvar x = point.x - this.x,\r\n \t\t y = 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: function (point) {\r\n \t\tpoint = toPoint(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: function (point) {\r\n \t\tpoint = toPoint(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: function () {\r\n \t\treturn 'Point(' +\r\n \t\t formatNum(this.x) + ', ' +\r\n \t\t formatNum(this.y) + ')';\r\n \t}\r\n };\r\n\r\n // @factory L.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 // @factory L.point(coords: Number[])\r\n // Expects an array of the form `[x, y]` instead.\r\n\r\n // @alternative\r\n // @factory L.point(coords: Object)\r\n // Expects a plain object of the form `{x: Number, y: Number}` instead.\r\n function toPoint(x, y, round) {\r\n \tif (x instanceof Point) {\r\n \t\treturn x;\r\n \t}\r\n \tif (isArray(x)) {\r\n \t\treturn new Point(x[0], x[1]);\r\n \t}\r\n \tif (x === undefined || x === null) {\r\n \t\treturn x;\r\n \t}\r\n \tif (typeof x === 'object' && 'x' in x && 'y' in x) {\r\n \t\treturn new Point(x.x, x.y);\r\n \t}\r\n \treturn new Point(x, y, round);\r\n }\n\n /*\r\n * @class Bounds\r\n * @aka L.Bounds\r\n *\r\n * Represents a rectangular area in pixel coordinates.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var p1 = L.point(10, 10),\r\n * p2 = L.point(40, 60),\r\n * bounds = L.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 function Bounds(a, b) {\r\n \tif (!a) { return; }\r\n\r\n \tvar points = b ? [a, b] : a;\r\n\r\n \tfor (var i = 0, len = points.length; i < len; i++) {\r\n \t\tthis.extend(points[i]);\r\n \t}\r\n }\r\n\r\n Bounds.prototype = {\r\n \t// @method extend(point: Point): this\r\n \t// Extends the bounds to contain the given point.\r\n \textend: function (point) { // (Point)\r\n \t\tpoint = toPoint(point);\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 = point.clone();\r\n \t\t\tthis.max = point.clone();\r\n \t\t} else {\r\n \t\t\tthis.min.x = Math.min(point.x, this.min.x);\r\n \t\t\tthis.max.x = Math.max(point.x, this.max.x);\r\n \t\t\tthis.min.y = Math.min(point.y, this.min.y);\r\n \t\t\tthis.max.y = Math.max(point.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: function (round) {\r\n \t\treturn new Point(\r\n \t\t (this.min.x + this.max.x) / 2,\r\n \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: function () {\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: function () { // -> 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: function () {\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: function () {\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: function () {\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: function (obj) {\r\n \t\tvar min, max;\r\n\r\n \t\tif (typeof obj[0] === 'number' || obj instanceof Point) {\r\n \t\t\tobj = toPoint(obj);\r\n \t\t} else {\r\n \t\t\tobj = toBounds(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: function (bounds) { // (Bounds) -> Boolean\r\n \t\tbounds = toBounds(bounds);\r\n\r\n \t\tvar min = this.min,\r\n \t\t max = this.max,\r\n \t\t min2 = bounds.min,\r\n \t\t max2 = bounds.max,\r\n \t\t xIntersects = (max2.x >= min.x) && (min2.x <= max.x),\r\n \t\t yIntersects = (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: function (bounds) { // (Bounds) -> Boolean\r\n \t\tbounds = toBounds(bounds);\r\n\r\n \t\tvar min = this.min,\r\n \t\t max = this.max,\r\n \t\t min2 = bounds.min,\r\n \t\t max2 = bounds.max,\r\n \t\t xOverlaps = (max2.x > min.x) && (min2.x < max.x),\r\n \t\t yOverlaps = (max2.y > min.y) && (min2.y < max.y);\r\n\r\n \t\treturn xOverlaps && yOverlaps;\r\n \t},\r\n\r\n \tisValid: function () {\r\n \t\treturn !!(this.min && this.max);\r\n \t}\r\n };\r\n\r\n\r\n // @factory L.bounds(corner1: Point, corner2: Point)\r\n // Creates a Bounds object from two corners coordinate pairs.\r\n // @alternative\r\n // @factory L.bounds(points: Point[])\r\n // Creates a Bounds object from the given array of points.\r\n function toBounds(a, b) {\r\n \tif (!a || a instanceof Bounds) {\r\n \t\treturn a;\r\n \t}\r\n \treturn new Bounds(a, b);\r\n }\n\n /*\r\n * @class LatLngBounds\r\n * @aka L.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 * var corner1 = L.latLng(40.712, -74.227),\r\n * corner2 = L.latLng(40.774, -74.125),\r\n * bounds = L.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 function LatLngBounds(corner1, corner2) { // (LatLng, LatLng) or (LatLng[])\r\n \tif (!corner1) { return; }\r\n\r\n \tvar latlngs = corner2 ? [corner1, corner2] : corner1;\r\n\r\n \tfor (var i = 0, len = latlngs.length; i < len; i++) {\r\n \t\tthis.extend(latlngs[i]);\r\n \t}\r\n }\r\n\r\n LatLngBounds.prototype = {\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: function (obj) {\r\n \t\tvar sw = this._southWest,\r\n \t\t ne = this._northEast,\r\n \t\t 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\treturn obj ? this.extend(toLatLng(obj) || toLatLngBounds(obj)) : this;\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: function (bufferRatio) {\r\n \t\tvar sw = this._southWest,\r\n \t\t ne = this._northEast,\r\n \t\t heightBuffer = Math.abs(sw.lat - ne.lat) * bufferRatio,\r\n \t\t widthBuffer = Math.abs(sw.lng - ne.lng) * bufferRatio;\r\n\r\n \t\treturn new LatLngBounds(\r\n \t\t new LatLng(sw.lat - heightBuffer, sw.lng - widthBuffer),\r\n \t\t new 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: function () {\r\n \t\treturn new LatLng(\r\n \t\t (this._southWest.lat + this._northEast.lat) / 2,\r\n \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: function () {\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: function () {\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: function () {\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: function () {\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: function () {\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: function () {\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: function () {\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: function () {\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: function (obj) { // (LatLngBounds) or (LatLng) -> Boolean\r\n \t\tif (typeof obj[0] === 'number' || obj instanceof LatLng || 'lat' in obj) {\r\n \t\t\tobj = toLatLng(obj);\r\n \t\t} else {\r\n \t\t\tobj = toLatLngBounds(obj);\r\n \t\t}\r\n\r\n \t\tvar sw = this._southWest,\r\n \t\t ne = this._northEast,\r\n \t\t 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: function (bounds) {\r\n \t\tbounds = toLatLngBounds(bounds);\r\n\r\n \t\tvar sw = this._southWest,\r\n \t\t ne = this._northEast,\r\n \t\t sw2 = bounds.getSouthWest(),\r\n \t\t ne2 = bounds.getNorthEast(),\r\n\r\n \t\t latIntersects = (ne2.lat >= sw.lat) && (sw2.lat <= ne.lat),\r\n \t\t lngIntersects = (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: function (bounds) {\r\n \t\tbounds = toLatLngBounds(bounds);\r\n\r\n \t\tvar sw = this._southWest,\r\n \t\t ne = this._northEast,\r\n \t\t sw2 = bounds.getSouthWest(),\r\n \t\t ne2 = bounds.getNorthEast(),\r\n\r\n \t\t latOverlaps = (ne2.lat > sw.lat) && (sw2.lat < ne.lat),\r\n \t\t lngOverlaps = (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: function () {\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: function (bounds, maxMargin) {\r\n \t\tif (!bounds) { return false; }\r\n\r\n \t\tbounds = toLatLngBounds(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: function () {\r\n \t\treturn !!(this._southWest && this._northEast);\r\n \t}\r\n };\r\n\r\n // TODO International date line?\r\n\r\n // @factory L.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 // @factory L.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\n function toLatLngBounds(a, b) {\r\n \tif (a instanceof LatLngBounds) {\r\n \t\treturn a;\r\n \t}\r\n \treturn new LatLngBounds(a, b);\r\n }\n\n /* @class LatLng\r\n * @aka L.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 * var latlng = L.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({lon: 30, lat: 50});\r\n * map.panTo({lat: 50, lng: 30});\r\n * map.panTo(L.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 function LatLng(lat, lng, alt) {\r\n \tif (isNaN(lat) || isNaN(lng)) {\r\n \t\tthrow new Error('Invalid LatLng object: (' + lat + ', ' + lng + ')');\r\n \t}\r\n\r\n \t// @property lat: Number\r\n \t// Latitude in degrees\r\n \tthis.lat = +lat;\r\n\r\n \t// @property lng: Number\r\n \t// Longitude in degrees\r\n \tthis.lng = +lng;\r\n\r\n \t// @property alt: Number\r\n \t// Altitude in meters (optional)\r\n \tif (alt !== undefined) {\r\n \t\tthis.alt = +alt;\r\n \t}\r\n }\r\n\r\n LatLng.prototype = {\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: function (obj, maxMargin) {\r\n \t\tif (!obj) { return false; }\r\n\r\n \t\tobj = toLatLng(obj);\r\n\r\n \t\tvar margin = Math.max(\r\n \t\t Math.abs(this.lat - obj.lat),\r\n \t\t Math.abs(this.lng - obj.lng));\r\n\r\n \t\treturn margin <= (maxMargin === undefined ? 1.0E-9 : maxMargin);\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: function (precision) {\r\n \t\treturn 'LatLng(' +\r\n \t\t formatNum(this.lat, precision) + ', ' +\r\n \t\t 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 [Spherical Law of Cosines](https://en.wikipedia.org/wiki/Spherical_law_of_cosines).\r\n \tdistanceTo: function (other) {\r\n \t\treturn Earth.distance(this, toLatLng(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: function () {\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: function (sizeInMeters) {\r\n \t\tvar latAccuracy = 180 * sizeInMeters / 40075017,\r\n \t\t lngAccuracy = latAccuracy / Math.cos((Math.PI / 180) * this.lat);\r\n\r\n \t\treturn toLatLngBounds(\r\n \t\t [this.lat - latAccuracy, this.lng - lngAccuracy],\r\n \t\t [this.lat + latAccuracy, this.lng + lngAccuracy]);\r\n \t},\r\n\r\n \tclone: function () {\r\n \t\treturn new LatLng(this.lat, this.lng, this.alt);\r\n \t}\r\n };\r\n\r\n\r\n\r\n // @factory L.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 // @factory L.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 // @factory L.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\r\n function toLatLng(a, b, c) {\r\n \tif (a instanceof LatLng) {\r\n \t\treturn a;\r\n \t}\r\n \tif (isArray(a) && typeof a[0] !== 'object') {\r\n \t\tif (a.length === 3) {\r\n \t\t\treturn new LatLng(a[0], a[1], a[2]);\r\n \t\t}\r\n \t\tif (a.length === 2) {\r\n \t\t\treturn new LatLng(a[0], a[1]);\r\n \t\t}\r\n \t\treturn null;\r\n \t}\r\n \tif (a === undefined || a === null) {\r\n \t\treturn a;\r\n \t}\r\n \tif (typeof a === 'object' && 'lat' in a) {\r\n \t\treturn new LatLng(a.lat, 'lng' in a ? a.lng : a.lon, a.alt);\r\n \t}\r\n \tif (b === undefined) {\r\n \t\treturn null;\r\n \t}\r\n \treturn new LatLng(a, b, c);\r\n }\n\n /*\r\n * @namespace CRS\r\n * @crs L.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](http://en.wikipedia.org/wiki/Coordinate_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\n var CRS = {\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 \tlatLngToPoint: function (latlng, zoom) {\r\n \t\tvar projectedPoint = this.projection.project(latlng),\r\n \t\t scale = 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 \tpointToLatLng: function (point, zoom) {\r\n \t\tvar scale = this.scale(zoom),\r\n \t\t untransformedPoint = 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 \tproject: function (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 \tunproject: function (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 \tscale: function (zoom) {\r\n \t\treturn 256 * Math.pow(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 \tzoom: function (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 \tgetProjectedBounds: function (zoom) {\r\n \t\tif (this.infinite) { return null; }\r\n\r\n \t\tvar b = this.projection.bounds,\r\n \t\t s = this.scale(zoom),\r\n \t\t min = this.transformation.transform(b.min, s),\r\n \t\t max = 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 \tinfinite: 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 \twrapLatLng: function (latlng) {\r\n \t\tvar lng = this.wrapLng ? wrapNum(latlng.lng, this.wrapLng, true) : latlng.lng,\r\n \t\t lat = this.wrapLat ? wrapNum(latlng.lat, this.wrapLat, true) : latlng.lat,\r\n \t\t alt = 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 \t// Only accepts actual `L.LatLngBounds` instances, not arrays.\r\n \twrapLatLngBounds: function (bounds) {\r\n \t\tvar center = bounds.getCenter(),\r\n \t\t newCenter = this.wrapLatLng(center),\r\n \t\t latShift = center.lat - newCenter.lat,\r\n \t\t lngShift = 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\tvar sw = bounds.getSouthWest(),\r\n \t\t ne = bounds.getNorthEast(),\r\n \t\t newSw = new LatLng(sw.lat - latShift, sw.lng - lngShift),\r\n \t\t newNe = 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 L.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\n var Earth = extend({}, CRS, {\n \twrapLng: [-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 http://rosettacode.org/wiki/Haversine_formula\n \tR: 6371000,\n\n \t// distance between two geographical points using spherical law of cosines approximation\n \tdistance: function (latlng1, latlng2) {\n \t\tvar rad = Math.PI / 180,\n \t\t lat1 = latlng1.lat * rad,\n \t\t lat2 = latlng2.lat * rad,\n \t\t sinDLat = Math.sin((latlng2.lat - latlng1.lat) * rad / 2),\n \t\t sinDLon = Math.sin((latlng2.lng - latlng1.lng) * rad / 2),\n \t\t a = sinDLat * sinDLat + Math.cos(lat1) * Math.cos(lat2) * sinDLon * sinDLon,\n \t\t c = 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 L.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\n var earthRadius = 6378137;\r\n\r\n var SphericalMercator = {\r\n\r\n \tR: earthRadius,\r\n \tMAX_LATITUDE: 85.0511287798,\r\n\r\n \tproject: function (latlng) {\r\n \t\tvar d = Math.PI / 180,\r\n \t\t max = this.MAX_LATITUDE,\r\n \t\t lat = Math.max(Math.min(max, latlng.lat), -max),\r\n \t\t sin = 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: function (point) {\r\n \t\tvar 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: (function () {\r\n \t\tvar d = earthRadius * 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 * @aka L.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 * var transformation = L.transformation(2, 5, -1, 10),\r\n * \tp = L.point(1, 2),\r\n * \tp2 = transformation.transform(p), // L.point(7, 8)\r\n * \tp3 = transformation.untransform(p2); // L.point(1, 2)\r\n * ```\r\n */\r\n\r\n\r\n // factory new L.Transformation(a: Number, b: Number, c: Number, d: Number)\r\n // Creates a `Transformation` object with the given coefficients.\r\n function Transformation(a, b, c, d) {\r\n \tif (isArray(a)) {\r\n \t\t// use array properties\r\n \t\tthis._a = a[0];\r\n \t\tthis._b = a[1];\r\n \t\tthis._c = a[2];\r\n \t\tthis._d = a[3];\r\n \t\treturn;\r\n \t}\r\n \tthis._a = a;\r\n \tthis._b = b;\r\n \tthis._c = c;\r\n \tthis._d = d;\r\n }\r\n\r\n Transformation.prototype = {\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 `L.Point` instances, not arrays.\r\n \ttransform: function (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: function (point, scale) {\r\n \t\tscale = scale || 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 `L.Point` instances, not arrays.\r\n \tuntransform: function (point, scale) {\r\n \t\tscale = scale || 1;\r\n \t\treturn new Point(\r\n \t\t (point.x / scale - this._b) / this._a,\r\n \t\t (point.y / scale - this._d) / this._c);\r\n \t}\r\n };\r\n\r\n // factory L.transformation(a: Number, b: Number, c: Number, d: Number)\r\n\r\n // @factory L.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 // @factory L.transformation(coefficients: Array): Transformation\r\n // Expects an coefficients array of the form\r\n // `[a: Number, b: Number, c: Number, d: Number]`.\r\n\r\n function toTransformation(a, b, c, d) {\r\n \treturn new Transformation(a, b, c, d);\r\n }\n\n /*\r\n * @namespace CRS\r\n * @crs L.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\n var EPSG3857 = extend({}, Earth, {\r\n \tcode: 'EPSG:3857',\r\n \tprojection: SphericalMercator,\r\n\r\n \ttransformation: (function () {\r\n \t\tvar scale = 0.5 / (Math.PI * SphericalMercator.R);\r\n \t\treturn toTransformation(scale, 0.5, -scale, 0.5);\r\n \t}())\r\n });\r\n\r\n var EPSG900913 = extend({}, EPSG3857, {\r\n \tcode: 'EPSG:900913'\r\n });\n\n // @namespace SVG; @section\n // There are several static functions which can be called without instantiating L.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).\n function 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\n function pointsToPath(rings, closed) {\n \tvar str = '',\n \ti, j, len, len2, points, p;\n\n \tfor (i = 0, len = rings.length; i < len; i++) {\n \t\tpoints = rings[i];\n\n \t\tfor (j = 0, len2 = points.length; j < len2; j++) {\n \t\t\tp = points[j];\n \t\t\tstr += (j ? 'L' : 'M') + p.x + ' ' + p.y;\n \t\t}\n\n \t\t// closes the ring for polygons; \"x\" is VML syntax\n \t\tstr += closed ? (svg ? 'z' : 'x') : '';\n \t}\n\n \t// SVG complains about empty path strings\n \treturn str || 'M0 0';\n }\n\n /*\r\n * @namespace Browser\r\n * @aka L.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 (L.Browser.ielt9) {\r\n * alert('Upgrade your browser, dude!');\r\n * }\r\n * ```\r\n */\r\n\r\n var style$1 = document.documentElement.style;\r\n\r\n // @property ie: Boolean; `true` for all Internet Explorer versions (not Edge).\r\n var ie = 'ActiveXObject' in window;\r\n\r\n // @property ielt9: Boolean; `true` for Internet Explorer versions less than 9.\r\n var ielt9 = ie && !document.addEventListener;\r\n\r\n // @property edge: Boolean; `true` for the Edge web browser.\r\n var edge = 'msLaunchUri' in navigator && !('documentMode' in document);\r\n\r\n // @property webkit: Boolean;\r\n // `true` for webkit-based browsers like Chrome and Safari (including mobile versions).\r\n var webkit = userAgentContains('webkit');\r\n\r\n // @property android: Boolean\r\n // `true` for any browser running on an Android platform.\r\n var android = userAgentContains('android');\r\n\r\n // @property android23: Boolean; `true` for browsers running on Android 2 or Android 3.\r\n var android23 = userAgentContains('android 2') || userAgentContains('android 3');\r\n\r\n /* See https://stackoverflow.com/a/17961266 for details on detecting stock Android */\r\n var webkitVer = parseInt(/WebKit\\/([0-9]+)|$/.exec(navigator.userAgent)[1], 10); // also matches AppleWebKit\r\n // @property androidStock: Boolean; `true` for the Android stock browser (i.e. not Chrome)\r\n var androidStock = android && userAgentContains('Google') && webkitVer < 537 && !('AudioNode' in window);\r\n\r\n // @property opera: Boolean; `true` for the Opera browser\r\n var opera = !!window.opera;\r\n\r\n // @property chrome: Boolean; `true` for the Chrome browser.\r\n var chrome = !edge && userAgentContains('chrome');\r\n\r\n // @property gecko: Boolean; `true` for gecko-based browsers like Firefox.\r\n var gecko = userAgentContains('gecko') && !webkit && !opera && !ie;\r\n\r\n // @property safari: Boolean; `true` for the Safari browser.\r\n var safari = !chrome && userAgentContains('safari');\r\n\r\n var phantom = userAgentContains('phantom');\r\n\r\n // @property opera12: Boolean\r\n // `true` for the Opera browser supporting CSS transforms (version 12 or later).\r\n var opera12 = 'OTransition' in style$1;\r\n\r\n // @property win: Boolean; `true` when the browser is running in a Windows platform\r\n var win = navigator.platform.indexOf('Win') === 0;\r\n\r\n // @property ie3d: Boolean; `true` for all Internet Explorer versions supporting CSS transforms.\r\n var ie3d = ie && ('transition' in style$1);\r\n\r\n // @property webkit3d: Boolean; `true` for webkit-based browsers supporting CSS transforms.\r\n var webkit3d = ('WebKitCSSMatrix' in window) && ('m11' in new window.WebKitCSSMatrix()) && !android23;\r\n\r\n // @property gecko3d: Boolean; `true` for gecko-based browsers supporting CSS transforms.\r\n var gecko3d = 'MozPerspective' in style$1;\r\n\r\n // @property any3d: Boolean\r\n // `true` for all browsers supporting CSS transforms.\r\n var any3d = !window.L_DISABLE_3D && (ie3d || webkit3d || gecko3d) && !opera12 && !phantom;\r\n\r\n // @property mobile: Boolean; `true` for all browsers running in a mobile device.\r\n var mobile = typeof orientation !== 'undefined' || userAgentContains('mobile');\r\n\r\n // @property mobileWebkit: Boolean; `true` for all webkit-based browsers in a mobile device.\r\n var mobileWebkit = mobile && webkit;\r\n\r\n // @property mobileWebkit3d: Boolean\r\n // `true` for all webkit-based browsers in a mobile device supporting CSS transforms.\r\n var mobileWebkit3d = mobile && webkit3d;\r\n\r\n // @property msPointer: Boolean\r\n // `true` for browsers implementing the Microsoft touch events model (notably IE10).\r\n var msPointer = !window.PointerEvent && window.MSPointerEvent;\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\n var pointer = !!(window.PointerEvent || msPointer);\r\n\r\n // @property touch: 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\n var touch = !window.L_NO_TOUCH && (pointer || 'ontouchstart' in window ||\r\n \t\t(window.DocumentTouch && document instanceof window.DocumentTouch));\r\n\r\n // @property mobileOpera: Boolean; `true` for the Opera browser in a mobile device.\r\n var mobileOpera = mobile && opera;\r\n\r\n // @property mobileGecko: Boolean\r\n // `true` for gecko-based browsers running in a mobile device.\r\n var mobileGecko = mobile && gecko;\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\n var retina = (window.devicePixelRatio || (window.screen.deviceXDPI / window.screen.logicalXDPI)) > 1;\r\n\r\n // @property passiveEvents: Boolean\r\n // `true` for browsers that support passive events.\r\n var passiveEvents = (function () {\r\n \tvar supportsPassiveOption = false;\r\n \ttry {\r\n \t\tvar opts = Object.defineProperty({}, 'passive', {\r\n \t\t\tget: function () { // eslint-disable-line getter-return\r\n \t\t\t\tsupportsPassiveOption = true;\r\n \t\t\t}\r\n \t\t});\r\n \t\twindow.addEventListener('testPassiveEventSupport', falseFn, opts);\r\n \t\twindow.removeEventListener('testPassiveEventSupport', falseFn, opts);\r\n \t} catch (e) {\r\n \t\t// Errors can safely be ignored since this is only a browser support test.\r\n \t}\r\n \treturn supportsPassiveOption;\r\n }());\r\n\r\n // @property canvas: Boolean\r\n // `true` when the browser supports [`<canvas>`](https://developer.mozilla.org/docs/Web/API/Canvas_API).\r\n var canvas = (function () {\r\n \treturn !!document.createElement('canvas').getContext;\r\n }());\r\n\r\n // @property svg: Boolean\r\n // `true` when the browser supports [SVG](https://developer.mozilla.org/docs/Web/SVG).\r\n var svg = !!(document.createElementNS && svgCreate('svg').createSVGRect);\r\n\r\n // @property vml: Boolean\r\n // `true` if the browser supports [VML](https://en.wikipedia.org/wiki/Vector_Markup_Language).\r\n var vml = !svg && (function () {\r\n \ttry {\r\n \t\tvar div = document.createElement('div');\r\n \t\tdiv.innerHTML = '<v:shape adj=\"1\"/>';\r\n\r\n \t\tvar shape = div.firstChild;\r\n \t\tshape.style.behavior = 'url(#default#VML)';\r\n\r\n \t\treturn shape && (typeof shape.adj === 'object');\r\n\r\n \t} catch (e) {\r\n \t\treturn false;\r\n \t}\r\n }());\r\n\r\n\r\n function userAgentContains(str) {\r\n \treturn navigator.userAgent.toLowerCase().indexOf(str) >= 0;\r\n }\n\n var Browser = ({\n ie: ie,\n ielt9: ielt9,\n edge: edge,\n webkit: webkit,\n android: android,\n android23: android23,\n androidStock: androidStock,\n opera: opera,\n chrome: chrome,\n gecko: gecko,\n safari: safari,\n phantom: phantom,\n opera12: opera12,\n win: win,\n ie3d: ie3d,\n webkit3d: webkit3d,\n gecko3d: gecko3d,\n any3d: any3d,\n mobile: mobile,\n mobileWebkit: mobileWebkit,\n mobileWebkit3d: mobileWebkit3d,\n msPointer: msPointer,\n pointer: pointer,\n touch: touch,\n mobileOpera: mobileOpera,\n mobileGecko: mobileGecko,\n retina: retina,\n passiveEvents: passiveEvents,\n canvas: canvas,\n svg: svg,\n vml: vml\n });\n\n /*\n * Extends L.DomEvent to provide touch support for Internet Explorer and Windows-based devices.\n */\n\n\n var POINTER_DOWN = msPointer ? 'MSPointerDown' : 'pointerdown';\n var POINTER_MOVE = msPointer ? 'MSPointerMove' : 'pointermove';\n var POINTER_UP = msPointer ? 'MSPointerUp' : 'pointerup';\n var POINTER_CANCEL = msPointer ? 'MSPointerCancel' : 'pointercancel';\n\n var _pointers = {};\n var _pointerDocListener = false;\n\n // Provides a touch events wrapper for (ms)pointer events.\n // ref http://www.w3.org/TR/pointerevents/ https://www.w3.org/Bugs/Public/show_bug.cgi?id=22890\n\n function addPointerListener(obj, type, handler, id) {\n \tif (type === 'touchstart') {\n \t\t_addPointerStart(obj, handler, id);\n\n \t} else if (type === 'touchmove') {\n \t\t_addPointerMove(obj, handler, id);\n\n \t} else if (type === 'touchend') {\n \t\t_addPointerEnd(obj, handler, id);\n \t}\n\n \treturn this;\n }\n\n function removePointerListener(obj, type, id) {\n \tvar handler = obj['_leaflet_' + type + id];\n\n \tif (type === 'touchstart') {\n \t\tobj.removeEventListener(POINTER_DOWN, handler, false);\n\n \t} else if (type === 'touchmove') {\n \t\tobj.removeEventListener(POINTER_MOVE, handler, false);\n\n \t} else if (type === 'touchend') {\n \t\tobj.removeEventListener(POINTER_UP, handler, false);\n \t\tobj.removeEventListener(POINTER_CANCEL, handler, false);\n \t}\n\n \treturn this;\n }\n\n function _addPointerStart(obj, handler, id) {\n \tvar onDown = bind(function (e) {\n \t\t// IE10 specific: MsTouch needs preventDefault. See #2000\n \t\tif (e.MSPOINTER_TYPE_TOUCH && e.pointerType === e.MSPOINTER_TYPE_TOUCH) {\n \t\t\tpreventDefault(e);\n \t\t}\n\n \t\t_handlePointer(e, handler);\n \t});\n\n \tobj['_leaflet_touchstart' + id] = onDown;\n \tobj.addEventListener(POINTER_DOWN, onDown, false);\n\n \t// need to keep track of what pointers and how many are active to provide e.touches emulation\n \tif (!_pointerDocListener) {\n \t\t// we listen document as any drags that end by moving the touch off the screen get fired there\n \t\tdocument.addEventListener(POINTER_DOWN, _globalPointerDown, true);\n \t\tdocument.addEventListener(POINTER_MOVE, _globalPointerMove, true);\n \t\tdocument.addEventListener(POINTER_UP, _globalPointerUp, true);\n \t\tdocument.addEventListener(POINTER_CANCEL, _globalPointerUp, true);\n\n \t\t_pointerDocListener = true;\n \t}\n }\n\n function _globalPointerDown(e) {\n \t_pointers[e.pointerId] = e;\n }\n\n function _globalPointerMove(e) {\n \tif (_pointers[e.pointerId]) {\n \t\t_pointers[e.pointerId] = e;\n \t}\n }\n\n function _globalPointerUp(e) {\n \tdelete _pointers[e.pointerId];\n }\n\n function _handlePointer(e, handler) {\n \te.touches = [];\n \tfor (var i in _pointers) {\n \t\te.touches.push(_pointers[i]);\n \t}\n \te.changedTouches = [e];\n\n \thandler(e);\n }\n\n function _addPointerMove(obj, handler, id) {\n \tvar onMove = function (e) {\n \t\t// don't fire touch moves when mouse isn't down\n \t\tif ((e.pointerType === (e.MSPOINTER_TYPE_MOUSE || 'mouse')) && e.buttons === 0) {\n \t\t\treturn;\n \t\t}\n\n \t\t_handlePointer(e, handler);\n \t};\n\n \tobj['_leaflet_touchmove' + id] = onMove;\n \tobj.addEventListener(POINTER_MOVE, onMove, false);\n }\n\n function _addPointerEnd(obj, handler, id) {\n \tvar onUp = function (e) {\n \t\t_handlePointer(e, handler);\n \t};\n\n \tobj['_leaflet_touchend' + id] = onUp;\n \tobj.addEventListener(POINTER_UP, onUp, false);\n \tobj.addEventListener(POINTER_CANCEL, onUp, false);\n }\n\n /*\r\n * Extends the event handling code with double tap support for mobile browsers.\r\n */\r\n\r\n var _touchstart = msPointer ? 'MSPointerDown' : pointer ? 'pointerdown' : 'touchstart';\r\n var _touchend = msPointer ? 'MSPointerUp' : pointer ? 'pointerup' : 'touchend';\r\n var _pre = '_leaflet_';\r\n\r\n // inspired by Zepto touch code by Thomas Fuchs\r\n function addDoubleTapListener(obj, handler, id) {\r\n \tvar last, touch$$1,\r\n \t doubleTap = false,\r\n \t delay = 250;\r\n\r\n \tfunction onTouchStart(e) {\r\n\r\n \t\tif (pointer) {\r\n \t\t\tif (!e.isPrimary) { return; }\r\n \t\t\tif (e.pointerType === 'mouse') { return; } // mouse fires native dblclick\r\n \t\t} else if (e.touches.length > 1) {\r\n \t\t\treturn;\r\n \t\t}\r\n\r\n \t\tvar now = Date.now(),\r\n \t\t delta = now - (last || now);\r\n\r\n \t\ttouch$$1 = e.touches ? e.touches[0] : e;\r\n \t\tdoubleTap = (delta > 0 && delta <= delay);\r\n \t\tlast = now;\r\n \t}\r\n\r\n \tfunction onTouchEnd(e) {\r\n \t\tif (doubleTap && !touch$$1.cancelBubble) {\r\n \t\t\tif (pointer) {\r\n \t\t\t\tif (e.pointerType === 'mouse') { return; }\r\n \t\t\t\t// work around .type being readonly with MSPointer* events\r\n \t\t\t\tvar newTouch = {},\r\n \t\t\t\t prop, i;\r\n\r\n \t\t\t\tfor (i in touch$$1) {\r\n \t\t\t\t\tprop = touch$$1[i];\r\n \t\t\t\t\tnewTouch[i] = prop && prop.bind ? prop.bind(touch$$1) : prop;\r\n \t\t\t\t}\r\n \t\t\t\ttouch$$1 = newTouch;\r\n \t\t\t}\r\n \t\t\ttouch$$1.type = 'dblclick';\r\n \t\t\ttouch$$1.button = 0;\r\n \t\t\thandler(touch$$1);\r\n \t\t\tlast = null;\r\n \t\t}\r\n \t}\r\n\r\n \tobj[_pre + _touchstart + id] = onTouchStart;\r\n \tobj[_pre + _touchend + id] = onTouchEnd;\r\n \tobj[_pre + 'dblclick' + id] = handler;\r\n\r\n \tobj.addEventListener(_touchstart, onTouchStart, passiveEvents ? {passive: false} : false);\r\n \tobj.addEventListener(_touchend, onTouchEnd, passiveEvents ? {passive: false} : false);\r\n\r\n \t// On some platforms (notably, chrome<55 on win10 + touchscreen + mouse),\r\n \t// the browser doesn't fire touchend/pointerup events but does fire\r\n \t// native dblclicks. See #4127.\r\n \t// Edge 14 also fires native dblclicks, but only for pointerType mouse, see #5180.\r\n \tobj.addEventListener('dblclick', handler, false);\r\n\r\n \treturn this;\r\n }\r\n\r\n function removeDoubleTapListener(obj, id) {\r\n \tvar touchstart = obj[_pre + _touchstart + id],\r\n \t touchend = obj[_pre + _touchend + id],\r\n \t dblclick = obj[_pre + 'dblclick' + id];\r\n\r\n \tobj.removeEventListener(_touchstart, touchstart, passiveEvents ? {passive: false} : false);\r\n \tobj.removeEventListener(_touchend, touchend, passiveEvents ? {passive: false} : false);\r\n \tobj.removeEventListener('dblclick', dblclick, false);\r\n\r\n \treturn this;\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\r\n // @property TRANSFORM: String\r\n // Vendor-prefixed transform style name (e.g. `'webkitTransform'` for WebKit).\r\n var TRANSFORM = testProp(\r\n \t['transform', 'webkitTransform', 'OTransform', 'MozTransform', 'msTransform']);\r\n\r\n // webkitTransition comes first because some browser versions that drop vendor prefix don't do\r\n // the same for the transitionend event, in particular the Android 4.1 stock browser\r\n\r\n // @property TRANSITION: String\r\n // Vendor-prefixed transition style name.\r\n var TRANSITION = testProp(\r\n \t['webkitTransition', 'transition', 'OTransition', 'MozTransition', 'msTransition']);\r\n\r\n // @property TRANSITION_END: String\r\n // Vendor-prefixed transitionend event name.\r\n var TRANSITION_END =\r\n \tTRANSITION === 'webkitTransition' || TRANSITION === 'OTransition' ? TRANSITION + 'End' : 'transitionend';\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\n function get(id) {\r\n \treturn typeof id === 'string' ? document.getElementById(id) : id;\r\n }\r\n\r\n // @function getStyle(el: HTMLElement, styleAttrib: String): String\r\n // Returns the value for a certain style attribute on an element,\r\n // including computed values or values set through CSS.\r\n function getStyle(el, style) {\r\n \tvar value = el.style[style] || (el.currentStyle && el.currentStyle[style]);\r\n\r\n \tif ((!value || value === 'auto') && document.defaultView) {\r\n \t\tvar css = document.defaultView.getComputedStyle(el, null);\r\n \t\tvalue = css ? css[style] : null;\r\n \t}\r\n \treturn value === 'auto' ? null : value;\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\n function create$1(tagName, className, container) {\r\n \tvar el = document.createElement(tagName);\r\n \tel.className = className || '';\r\n\r\n \tif (container) {\r\n \t\tcontainer.appendChild(el);\r\n \t}\r\n \treturn el;\r\n }\r\n\r\n // @function remove(el: HTMLElement)\r\n // Removes `el` from its parent element\r\n function remove(el) {\r\n \tvar parent = el.parentNode;\r\n \tif (parent) {\r\n \t\tparent.removeChild(el);\r\n \t}\r\n }\r\n\r\n // @function empty(el: HTMLElement)\r\n // Removes all of `el`'s children elements from `el`\r\n function empty(el) {\r\n \twhile (el.firstChild) {\r\n \t\tel.removeChild(el.firstChild);\r\n \t}\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\n function toFront(el) {\r\n \tvar 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\n function toBack(el) {\r\n \tvar 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 hasClass(el: HTMLElement, name: String): Boolean\r\n // Returns `true` if the element's class attribute contains `name`.\r\n function hasClass(el, name) {\r\n \tif (el.classList !== undefined) {\r\n \t\treturn el.classList.contains(name);\r\n \t}\r\n \tvar className = getClass(el);\r\n \treturn className.length > 0 && new RegExp('(^|\\\\s)' + name + '(\\\\s|$)').test(className);\r\n }\r\n\r\n // @function addClass(el: HTMLElement, name: String)\r\n // Adds `name` to the element's class attribute.\r\n function addClass(el, name) {\r\n \tif (el.classList !== undefined) {\r\n \t\tvar classes = splitWords(name);\r\n \t\tfor (var i = 0, len = classes.length; i < len; i++) {\r\n \t\t\tel.classList.add(classes[i]);\r\n \t\t}\r\n \t} else if (!hasClass(el, name)) {\r\n \t\tvar className = getClass(el);\r\n \t\tsetClass(el, (className ? className + ' ' : '') + name);\r\n \t}\r\n }\r\n\r\n // @function removeClass(el: HTMLElement, name: String)\r\n // Removes `name` from the element's class attribute.\r\n function removeClass(el, name) {\r\n \tif (el.classList !== undefined) {\r\n \t\tel.classList.remove(name);\r\n \t} else {\r\n \t\tsetClass(el, trim((' ' + getClass(el) + ' ').replace(' ' + name + ' ', ' ')));\r\n \t}\r\n }\r\n\r\n // @function setClass(el: HTMLElement, name: String)\r\n // Sets the element's class.\r\n function setClass(el, name) {\r\n \tif (el.className.baseVal === undefined) {\r\n \t\tel.className = name;\r\n \t} else {\r\n \t\t// in case of SVG element\r\n \t\tel.className.baseVal = name;\r\n \t}\r\n }\r\n\r\n // @function getClass(el: HTMLElement): String\r\n // Returns the element's class.\r\n function getClass(el) {\r\n \t// Check if the element is an SVGElementInstance and use the correspondingElement instead\r\n \t// (Required for linked SVG elements in IE11.)\r\n \tif (el.correspondingElement) {\r\n \t\tel = el.correspondingElement;\r\n \t}\r\n \treturn el.className.baseVal === undefined ? el.className : el.className.baseVal;\r\n }\r\n\r\n // @function setOpacity(el: HTMLElement, opacity: Number)\r\n // Set the opacity of an element (including old IE support).\r\n // `opacity` must be a number from `0` to `1`.\r\n function setOpacity(el, value) {\r\n \tif ('opacity' in el.style) {\r\n \t\tel.style.opacity = value;\r\n \t} else if ('filter' in el.style) {\r\n \t\t_setOpacityIE(el, value);\r\n \t}\r\n }\r\n\r\n function _setOpacityIE(el, value) {\r\n \tvar filter = false,\r\n \t filterName = 'DXImageTransform.Microsoft.Alpha';\r\n\r\n \t// filters collection throws an error if we try to retrieve a filter that doesn't exist\r\n \ttry {\r\n \t\tfilter = el.filters.item(filterName);\r\n \t} catch (e) {\r\n \t\t// don't set opacity to 1 if we haven't already set an opacity,\r\n \t\t// it isn't needed and breaks transparent pngs.\r\n \t\tif (value === 1) { return; }\r\n \t}\r\n\r\n \tvalue = Math.round(value * 100);\r\n\r\n \tif (filter) {\r\n \t\tfilter.Enabled = (value !== 100);\r\n \t\tfilter.Opacity = value;\r\n \t} else {\r\n \t\tel.style.filter += ' progid:' + filterName + '(opacity=' + value + ')';\r\n \t}\r\n }\r\n\r\n // @function testProp(props: String[]): String|false\r\n // Goes through the array of style names and returns the first name\r\n // that is a valid style name for an element. If no such name is found,\r\n // it returns false. Useful for vendor-prefixed styles like `transform`.\r\n function testProp(props) {\r\n \tvar style = document.documentElement.style;\r\n\r\n \tfor (var i = 0; i < props.length; i++) {\r\n \t\tif (props[i] in style) {\r\n \t\t\treturn props[i];\r\n \t\t}\r\n \t}\r\n \treturn false;\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\n function setTransform(el, offset, scale) {\r\n \tvar pos = offset || new Point(0, 0);\r\n\r\n \tel.style[TRANSFORM] =\r\n \t\t(ie3d ?\r\n \t\t\t'translate(' + pos.x + 'px,' + pos.y + 'px)' :\r\n \t\t\t'translate3d(' + pos.x + 'px,' + pos.y + 'px,0)') +\r\n \t\t(scale ? ' scale(' + scale + ')' : '');\r\n }\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\n function setPosition(el, point) {\r\n\r\n \t/*eslint-disable */\r\n \tel._leaflet_pos = point;\r\n \t/* eslint-enable */\r\n\r\n \tif (any3d) {\r\n \t\tsetTransform(el, point);\r\n \t} else {\r\n \t\tel.style.left = point.x + 'px';\r\n \t\tel.style.top = point.y + 'px';\r\n \t}\r\n }\r\n\r\n // @function getPosition(el: HTMLElement): Point\r\n // Returns the coordinates of an element previously positioned with setPosition.\r\n function 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\r\n \treturn el._leaflet_pos || new Point(0, 0);\r\n }\r\n\r\n // @function disableTextSelection()\r\n // Prevents the user from generating `selectstart` DOM events, usually generated\r\n // when the user drags the mouse through a page with text. 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\n\r\n // @function enableTextSelection()\r\n // Cancels the effects of a previous [`L.DomUtil.disableTextSelection`](#domutil-disabletextselection).\r\n var disableTextSelection;\r\n var enableTextSelection;\r\n var _userSelect;\r\n if ('onselectstart' in document) {\r\n \tdisableTextSelection = function () {\r\n \t\ton(window, 'selectstart', preventDefault);\r\n \t};\r\n \tenableTextSelection = function () {\r\n \t\toff(window, 'selectstart', preventDefault);\r\n \t};\r\n } else {\r\n \tvar userSelectProperty = testProp(\r\n \t\t['userSelect', 'WebkitUserSelect', 'OUserSelect', 'MozUserSelect', 'msUserSelect']);\r\n\r\n \tdisableTextSelection = function () {\r\n \t\tif (userSelectProperty) {\r\n \t\t\tvar style = document.documentElement.style;\r\n \t\t\t_userSelect = style[userSelectProperty];\r\n \t\t\tstyle[userSelectProperty] = 'none';\r\n \t\t}\r\n \t};\r\n \tenableTextSelection = function () {\r\n \t\tif (userSelectProperty) {\r\n \t\t\tdocument.documentElement.style[userSelectProperty] = _userSelect;\r\n \t\t\t_userSelect = undefined;\r\n \t\t}\r\n \t};\r\n }\r\n\r\n // @function disableImageDrag()\r\n // As [`L.DomUtil.disableTextSelection`](#domutil-disabletextselection), but\r\n // for `dragstart` DOM events, usually generated when the user drags an image.\r\n function disableImageDrag() {\r\n \ton(window, 'dragstart', preventDefault);\r\n }\r\n\r\n // @function enableImageDrag()\r\n // Cancels the effects of a previous [`L.DomUtil.disableImageDrag`](#domutil-disabletextselection).\r\n function enableImageDrag() {\r\n \toff(window, 'dragstart', preventDefault);\r\n }\r\n\r\n var _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\n function 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.outline;\r\n \telement.style.outline = 'none';\r\n \ton(window, 'keydown', restoreOutline);\r\n }\r\n\r\n // @function restoreOutline()\r\n // Cancels the effects of a previous [`L.DomUtil.preventOutline`]().\r\n function restoreOutline() {\r\n \tif (!_outlineElement) { return; }\r\n \t_outlineElement.style.outline = _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\n function 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\n function getScale(element) {\r\n \tvar 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\n var DomUtil = ({\n TRANSFORM: TRANSFORM,\n TRANSITION: TRANSITION,\n TRANSITION_END: TRANSITION_END,\n get: get,\n getStyle: getStyle,\n create: create$1,\n remove: remove,\n empty: empty,\n toFront: toFront,\n toBack: toBack,\n hasClass: hasClass,\n addClass: addClass,\n removeClass: removeClass,\n setClass: setClass,\n getClass: getClass,\n setOpacity: setOpacity,\n testProp: testProp,\n setTransform: setTransform,\n setPosition: setPosition,\n getPosition: getPosition,\n disableTextSelection: disableTextSelection,\n enableTextSelection: enableTextSelection,\n disableImageDrag: disableImageDrag,\n enableImageDrag: enableImageDrag,\n preventOutline: preventOutline,\n restoreOutline: restoreOutline,\n getSizedParentNode: getSizedParentNode,\n getScale: getScale\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, mousemove: onMouseMove}`\r\n function on(obj, types, fn, context) {\r\n\r\n \tif (typeof types === 'object') {\r\n \t\tfor (var type in types) {\r\n \t\t\taddOne(obj, type, types[type], fn);\r\n \t\t}\r\n \t} else {\r\n \t\ttypes = splitWords(types);\r\n\r\n \t\tfor (var i = 0, len = types.length; i < len; i++) {\r\n \t\t\taddOne(obj, types[i], fn, context);\r\n \t\t}\r\n \t}\r\n\r\n \treturn this;\r\n }\r\n\r\n var 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, mousemove: onMouseMove}`\r\n function off(obj, types, fn, context) {\r\n\r\n \tif (typeof types === 'object') {\r\n \t\tfor (var type in types) {\r\n \t\t\tremoveOne(obj, type, types[type], fn);\r\n \t\t}\r\n \t} else if (types) {\r\n \t\ttypes = splitWords(types);\r\n\r\n \t\tfor (var i = 0, len = types.length; i < len; i++) {\r\n \t\t\tremoveOne(obj, types[i], fn, context);\r\n \t\t}\r\n \t} else {\r\n \t\tfor (var j in obj[eventsKey]) {\r\n \t\t\tremoveOne(obj, j, obj[eventsKey][j]);\r\n \t\t}\r\n \t\tdelete obj[eventsKey];\r\n \t}\r\n\r\n \treturn this;\r\n }\r\n\r\n function browserFiresNativeDblClick() {\r\n \t// See https://github.com/w3c/pointerevents/issues/171\r\n \tif (pointer) {\r\n \t\treturn !(edge || safari);\r\n \t}\r\n }\r\n\r\n var mouseSubst = {\r\n \tmouseenter: 'mouseover',\r\n \tmouseleave: 'mouseout',\r\n \twheel: !('onwheel' in window) && 'mousewheel'\r\n };\r\n\r\n function addOne(obj, type, fn, context) {\r\n \tvar id = type + stamp(fn) + (context ? '_' + stamp(context) : '');\r\n\r\n \tif (obj[eventsKey] && obj[eventsKey][id]) { return this; }\r\n\r\n \tvar handler = function (e) {\r\n \t\treturn fn.call(context || obj, e || window.event);\r\n \t};\r\n\r\n \tvar originalHandler = handler;\r\n\r\n \tif (pointer && type.indexOf('touch') === 0) {\r\n \t\t// Needs DomEvent.Pointer.js\r\n \t\taddPointerListener(obj, type, handler, id);\r\n\r\n \t} else if (touch && (type === 'dblclick') && !browserFiresNativeDblClick()) {\r\n \t\taddDoubleTapListener(obj, handler, id);\r\n\r\n \t} else if ('addEventListener' in obj) {\r\n\r\n \t\tif (type === 'touchstart' || type === 'touchmove' || type === 'wheel' || type === 'mousewheel') {\r\n \t\t\tobj.addEventListener(mouseSubst[type] || type, handler, passiveEvents ? {passive: false} : false);\r\n\r\n \t\t} else if (type === 'mouseenter' || type === 'mouseleave') {\r\n \t\t\thandler = function (e) {\r\n \t\t\t\te = e || 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(mouseSubst[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 if ('attachEvent' in obj) {\r\n \t\tobj.attachEvent('on' + type, handler);\r\n \t}\r\n\r\n \tobj[eventsKey] = obj[eventsKey] || {};\r\n \tobj[eventsKey][id] = handler;\r\n }\r\n\r\n function removeOne(obj, type, fn, context) {\r\n\r\n \tvar id = type + stamp(fn) + (context ? '_' + stamp(context) : ''),\r\n \t handler = obj[eventsKey] && obj[eventsKey][id];\r\n\r\n \tif (!handler) { return this; }\r\n\r\n \tif (pointer && type.indexOf('touch') === 0) {\r\n \t\tremovePointerListener(obj, type, id);\r\n\r\n \t} else if (touch && (type === 'dblclick') && !browserFiresNativeDblClick()) {\r\n \t\tremoveDoubleTapListener(obj, id);\r\n\r\n \t} else if ('removeEventListener' in obj) {\r\n\r\n \t\tobj.removeEventListener(mouseSubst[type] || type, handler, false);\r\n\r\n \t} else if ('detachEvent' in obj) {\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 // L.DomEvent.on(div, 'click', function (ev) {\r\n // \tL.DomEvent.stopPropagation(ev);\r\n // });\r\n // ```\r\n function 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 \tskipped(e);\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\n function 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'`, `'doubleclick'`,\r\n // `'mousedown'` and `'touchstart'` events (plus browser variants).\r\n function disableClickPropagation(el) {\r\n \ton(el, 'mousedown touchstart dblclick', stopPropagation);\r\n \taddOne(el, 'click', fakeStop);\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\n function 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\n function stop(e) {\r\n \tpreventDefault(e);\r\n \tstopPropagation(e);\r\n \treturn this;\r\n }\r\n\r\n // @function getMousePosition(ev: DOMEvent, container?: HTMLElement): Point\r\n // Gets normalized mouse position from a DOM event relative to the\r\n // `container` (border excluded) or to the whole page if not specified.\r\n function getMousePosition(e, container) {\r\n \tif (!container) {\r\n \t\treturn new Point(e.clientX, e.clientY);\r\n \t}\r\n\r\n \tvar scale = getScale(container),\r\n \t offset = 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 // Chrome on Win scrolls double the pixels as in other platforms (see #4538),\r\n // and Firefox scrolls device pixels, not CSS pixels\r\n var wheelPxFactor =\r\n \t(win && chrome) ? 2 * window.devicePixelRatio :\r\n \tgecko ? window.devicePixelRatio : 1;\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\n function getWheelDelta(e) {\r\n \treturn (edge) ? e.wheelDeltaY / 2 : // Don't trust window-geometry-based delta\r\n \t (e.deltaY && e.deltaMode === 0) ? -e.deltaY / wheelPxFactor : // Pixels\r\n \t (e.deltaY && e.deltaMode === 1) ? -e.deltaY * 20 : // Lines\r\n \t (e.deltaY && e.deltaMode === 2) ? -e.deltaY * 60 : // Pages\r\n \t (e.deltaX || e.deltaZ) ? 0 :\t// Skip horizontal/depth wheel events\r\n \t e.wheelDelta ? (e.wheelDeltaY || e.wheelDelta) / 2 : // Legacy IE pixels\r\n \t (e.detail && Math.abs(e.detail) < 32765) ? -e.detail * 20 : // Legacy Moz lines\r\n \t e.detail ? e.detail / -32765 * 60 : // Legacy Moz pages\r\n \t 0;\r\n }\r\n\r\n var skipEvents = {};\r\n\r\n function fakeStop(e) {\r\n \t// fakes stopPropagation by setting a special event flag, checked/reset with skipped(e)\r\n \tskipEvents[e.type] = true;\r\n }\r\n\r\n function skipped(e) {\r\n \tvar events = skipEvents[e.type];\r\n \t// reset when checking, as it's only used in map container and propagates outside of the map\r\n \tskipEvents[e.type] = false;\r\n \treturn events;\r\n }\r\n\r\n // check if element really left/entered the event target (for mouseenter/mouseleave)\r\n function isExternalTarget(el, e) {\r\n\r\n \tvar 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\n var DomEvent = ({\n on: on,\n off: off,\n stopPropagation: stopPropagation,\n disableScrollPropagation: disableScrollPropagation,\n disableClickPropagation: disableClickPropagation,\n preventDefault: preventDefault,\n stop: stop,\n getMousePosition: getMousePosition,\n getWheelDelta: getWheelDelta,\n fakeStop: fakeStop,\n skipped: skipped,\n isExternalTarget: isExternalTarget,\n addListener: on,\n removeListener: off\n });\n\n /*\n * @class PosAnimation\n * @aka L.PosAnimation\n * @inherits Evented\n * Used internally for panning animations, utilizing CSS3 Transitions for modern browsers and a timer fallback for IE6-9.\n *\n * @example\n * ```js\n * var fx = new L.PosAnimation();\n * fx.run(el, [300, 500], 0.5);\n * ```\n *\n * @constructor L.PosAnimation()\n * Creates a `PosAnimation` object.\n *\n */\n\n var PosAnimation = Evented.extend({\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](http://cubic-bezier.com/#0,0,.5,1),\n \t// `0.5` by default).\n \trun: function (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: function () {\n \t\tif (!this._inProgress) { return; }\n\n \t\tthis._step(true);\n \t\tthis._complete();\n \t},\n\n \t_animate: function () {\n \t\t// animation loop\n \t\tthis._animId = requestAnimFrame(this._animate, this);\n \t\tthis._step();\n \t},\n\n \t_step: function (round) {\n \t\tvar elapsed = (+new Date()) - this._startTime,\n \t\t duration = 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: function (progress, round) {\n \t\tvar 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: function () {\n \t\tcancelAnimFrame(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: function (t) {\n \t\treturn 1 - Math.pow(1 - t, this._easeOutPower);\n \t}\n });\n\n /*\r\n * @class Map\r\n * @aka L.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 * var map = L.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 var Map = Evented.extend({\r\n\r\n \toptions: {\r\n \t\t// @section Map State Options\r\n \t\t// @option crs: CRS = L.CRS.EPSG3857\r\n \t\t// The [Coordinate Reference System](#crs) to use. Don't change this if you're not\r\n \t\t// sure what it means.\r\n \t\tcrs: EPSG3857,\r\n\r\n \t\t// @option center: LatLng = undefined\r\n \t\t// Initial geographic center of the map\r\n \t\tcenter: undefined,\r\n\r\n \t\t// @option zoom: Number = undefined\r\n \t\t// Initial map zoom level\r\n \t\tzoom: undefined,\r\n\r\n \t\t// @option minZoom: Number = *\r\n \t\t// Minimum zoom level of the map.\r\n \t\t// If not specified and at least one `GridLayer` or `TileLayer` is in the map,\r\n \t\t// the lowest of their `minZoom` options will be used instead.\r\n \t\tminZoom: undefined,\r\n\r\n \t\t// @option maxZoom: Number = *\r\n \t\t// Maximum zoom level of the map.\r\n \t\t// If not specified and at least one `GridLayer` or `TileLayer` is in the map,\r\n \t\t// the highest of their `maxZoom` options will be used instead.\r\n \t\tmaxZoom: undefined,\r\n\r\n \t\t// @option layers: Layer[] = []\r\n \t\t// Array of layers that will be added to the map initially\r\n \t\tlayers: [],\r\n\r\n \t\t// @option maxBounds: LatLngBounds = null\r\n \t\t// When this option is set, the map restricts the view to the given\r\n \t\t// geographical bounds, bouncing the user back if the user tries to pan\r\n \t\t// outside the view. To set the restriction dynamically, use\r\n \t\t// [`setMaxBounds`](#map-setmaxbounds) method.\r\n \t\tmaxBounds: undefined,\r\n\r\n \t\t// @option renderer: Renderer = *\r\n \t\t// The default method for drawing vector layers on the map. `L.SVG`\r\n \t\t// or `L.Canvas` by default depending on browser support.\r\n \t\trenderer: undefined,\r\n\r\n\r\n \t\t// @section Animation Options\r\n \t\t// @option zoomAnimation: Boolean = true\r\n \t\t// Whether the map zoom animation is enabled. By default it's enabled\r\n \t\t// in all browsers that support CSS3 Transitions except Android.\r\n \t\tzoomAnimation: true,\r\n\r\n \t\t// @option zoomAnimationThreshold: Number = 4\r\n \t\t// Won't animate zoom if the zoom difference exceeds this value.\r\n \t\tzoomAnimationThreshold: 4,\r\n\r\n \t\t// @option fadeAnimation: Boolean = true\r\n \t\t// Whether the tile fade animation is enabled. By default it's enabled\r\n \t\t// in all browsers that support CSS3 Transitions except Android.\r\n \t\tfadeAnimation: true,\r\n\r\n \t\t// @option markerZoomAnimation: Boolean = true\r\n \t\t// Whether markers animate their zoom with the zoom animation, if disabled\r\n \t\t// they will disappear for the length of the animation. By default it's\r\n \t\t// enabled in all browsers that support CSS3 Transitions except Android.\r\n \t\tmarkerZoomAnimation: true,\r\n\r\n \t\t// @option transform3DLimit: Number = 2^23\r\n \t\t// Defines the maximum size of a CSS translation transform. The default\r\n \t\t// value should not be changed unless a web browser positions layers in\r\n \t\t// the wrong place after doing a large `panBy`.\r\n \t\ttransform3DLimit: 8388608, // Precision limit of a 32-bit float\r\n\r\n \t\t// @section Interaction Options\r\n \t\t// @option zoomSnap: Number = 1\r\n \t\t// Forces the map's zoom level to always be a multiple of this, particularly\r\n \t\t// right after a [`fitBounds()`](#map-fitbounds) or a pinch-zoom.\r\n \t\t// By default, the zoom level snaps to the nearest integer; lower values\r\n \t\t// (e.g. `0.5` or `0.1`) allow for greater granularity. A value of `0`\r\n \t\t// means the zoom level will not be snapped after `fitBounds` or a pinch-zoom.\r\n \t\tzoomSnap: 1,\r\n\r\n \t\t// @option zoomDelta: Number = 1\r\n \t\t// Controls how much the map's zoom level will change after a\r\n \t\t// [`zoomIn()`](#map-zoomin), [`zoomOut()`](#map-zoomout), pressing `+`\r\n \t\t// or `-` on the keyboard, or using the [zoom controls](#control-zoom).\r\n \t\t// Values smaller than `1` (e.g. `0.5`) allow for greater granularity.\r\n \t\tzoomDelta: 1,\r\n\r\n \t\t// @option trackResize: Boolean = true\r\n \t\t// Whether the map automatically handles browser window resize to update itself.\r\n \t\ttrackResize: true\r\n \t},\r\n\r\n \tinitialize: function (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\t// hack for https://github.com/Leaflet/Leaflet/issues/1980\r\n \t\tthis._onResize = bind(this._onResize, this);\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(toLatLng(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/Opera\r\n \t\tthis._zoomAnimated = TRANSITION && any3d && !mobileOpera &&\r\n \t\t\t\tthis.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\ton(this._proxy, TRANSITION_END, this._catchTransitionEnd, this);\r\n \t\t}\r\n\r\n \t\tthis._addLayers(this.options.layers);\r\n \t},\r\n\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: function (center, zoom, options) {\r\n\r\n \t\tzoom = zoom === undefined ? this._zoom : this._limitZoom(zoom);\r\n \t\tcenter = this._limitCenter(toLatLng(center), zoom, this.options.maxBounds);\r\n \t\toptions = options || {};\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 = extend({animate: options.animate}, options.zoom);\r\n \t\t\t\toptions.pan = extend({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\tvar 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);\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: function (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: function (delta, options) {\r\n \t\tdelta = delta || (any3d ? this.options.zoomDelta : 1);\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: function (delta, options) {\r\n \t\tdelta = delta || (any3d ? this.options.zoomDelta : 1);\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: function (latlng, zoom, options) {\r\n \t\tvar scale = this.getZoomScale(zoom),\r\n \t\t viewHalf = this.getSize().divideBy(2),\r\n \t\t containerPoint = latlng instanceof Point ? latlng : this.latLngToContainerPoint(latlng),\r\n\r\n \t\t centerOffset = containerPoint.subtract(viewHalf).multiplyBy(1 - 1 / scale),\r\n \t\t newCenter = 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: function (bounds, options) {\r\n\r\n \t\toptions = options || {};\r\n \t\tbounds = bounds.getBounds ? bounds.getBounds() : toLatLngBounds(bounds);\r\n\r\n \t\tvar paddingTL = toPoint(options.paddingTopLeft || options.padding || [0, 0]),\r\n \t\t paddingBR = toPoint(options.paddingBottomRight || options.padding || [0, 0]),\r\n\r\n \t\t 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: zoom\r\n \t\t\t};\r\n \t\t}\r\n\r\n \t\tvar paddingOffset = paddingBR.subtract(paddingTL).divideBy(2),\r\n\r\n \t\t swPoint = this.project(bounds.getSouthWest(), zoom),\r\n \t\t nePoint = this.project(bounds.getNorthEast(), zoom),\r\n \t\t center = this.unproject(swPoint.add(nePoint).divideBy(2).add(paddingOffset), zoom);\r\n\r\n \t\treturn {\r\n \t\t\tcenter: center,\r\n \t\t\tzoom: zoom\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: function (bounds, options) {\r\n\r\n \t\tbounds = toLatLngBounds(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\tvar 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: function (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: function (center, options) { // (LatLng)\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: function (offset, options) {\r\n \t\toffset = toPoint(offset).round();\r\n \t\toptions = options || {};\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\taddClass(this._mapPane, 'leaflet-pan-anim');\r\n\r\n \t\t\tvar 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: function (targetCenter, targetZoom, options) {\r\n\r\n \t\toptions = options || {};\r\n \t\tif (options.animate === false || !any3d) {\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\tvar from = this.project(this.getCenter()),\r\n \t\t to = this.project(targetCenter),\r\n \t\t size = this.getSize(),\r\n \t\t startZoom = this._zoom;\r\n\r\n \t\ttargetCenter = toLatLng(targetCenter);\r\n \t\ttargetZoom = targetZoom === undefined ? startZoom : targetZoom;\r\n\r\n \t\tvar w0 = Math.max(size.x, size.y),\r\n \t\t w1 = w0 * this.getZoomScale(startZoom, targetZoom),\r\n \t\t u1 = (to.distanceTo(from)) || 1,\r\n \t\t rho = 1.42,\r\n \t\t rho2 = rho * rho;\r\n\r\n \t\tfunction r(i) {\r\n \t\t\tvar s1 = i ? -1 : 1,\r\n \t\t\t s2 = i ? w1 : w0,\r\n \t\t\t t1 = w1 * w1 - w0 * w0 + s1 * rho2 * rho2 * u1 * u1,\r\n \t\t\t b1 = 2 * s2 * rho2 * u1,\r\n \t\t\t b = t1 / b1,\r\n \t\t\t sq = 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\t var 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\tvar 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 - Math.pow(1 - t, 1.5); }\r\n\r\n \t\tvar start = Date.now(),\r\n \t\t S = (r(1) - r0) / rho,\r\n \t\t duration = options.duration ? 1000 * options.duration : 1000 * S * 0.8;\r\n\r\n \t\tfunction frame() {\r\n \t\t\tvar t = (Date.now() - start) / duration,\r\n \t\t\t s = easeOut(t) * S;\r\n\r\n \t\t\tif (t <= 1) {\r\n \t\t\t\tthis._flyToFrame = requestAnimFrame(frame, this);\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.call(this);\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: function (bounds, options) {\r\n \t\tvar 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: function (bounds) {\r\n \t\tbounds = toLatLngBounds(bounds);\r\n\r\n \t\tif (!bounds.isValid()) {\r\n \t\t\tthis.options.maxBounds = null;\r\n \t\t\treturn this.off('moveend', this._panInsideMaxBounds);\r\n \t\t} else if (this.options.maxBounds) {\r\n \t\t\tthis.off('moveend', this._panInsideMaxBounds);\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: function (zoom) {\r\n \t\tvar 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: function (zoom) {\r\n \t\tvar 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: function (bounds, options) {\r\n \t\tthis._enforcingBounds = true;\r\n \t\tvar center = this.getCenter(),\r\n \t\t newCenter = this._limitCenter(center, this._zoom, toLatLngBounds(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?: options): this\r\n \t// Pans the map the minimum amount to make the `latlng` visible. Use\r\n \t// `padding`, `paddingTopLeft` and `paddingTopRight` options to fit\r\n \t// the display to more restricted bounds, like [`fitBounds`](#map-fitbounds).\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: function (latlng, options) {\r\n \t\toptions = options || {};\r\n\r\n \t\tvar paddingTL = toPoint(options.paddingTopLeft || options.padding || [0, 0]),\r\n \t\t paddingBR = toPoint(options.paddingBottomRight || options.padding || [0, 0]),\r\n \t\t center = this.getCenter(),\r\n \t\t pixelCenter = this.project(center),\r\n \t\t pixelPoint = this.project(latlng),\r\n \t\t pixelBounds = this.getPixelBounds(),\r\n \t\t halfPixelBounds = pixelBounds.getSize().divideBy(2),\r\n \t\t paddedBounds = toBounds([pixelBounds.min.add(paddingTL), pixelBounds.max.subtract(paddingBR)]);\r\n\r\n \t\tif (!paddedBounds.contains(pixelPoint)) {\r\n \t\t\tthis._enforcingBounds = true;\r\n \t\t\tvar diff = pixelCenter.subtract(pixelPoint),\r\n \t\t\t newCenter = toPoint(pixelPoint.x + diff.x, pixelPoint.y + diff.y);\r\n\r\n \t\t\tif (pixelPoint.x < paddedBounds.min.x || pixelPoint.x > paddedBounds.max.x) {\r\n \t\t\t\tnewCenter.x = pixelCenter.x - diff.x;\r\n \t\t\t\tif (diff.x > 0) {\r\n \t\t\t\t\tnewCenter.x += halfPixelBounds.x - paddingTL.x;\r\n \t\t\t\t} else {\r\n \t\t\t\t\tnewCenter.x -= halfPixelBounds.x - paddingBR.x;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tif (pixelPoint.y < paddedBounds.min.y || pixelPoint.y > paddedBounds.max.y) {\r\n \t\t\t\tnewCenter.y = pixelCenter.y - diff.y;\r\n \t\t\t\tif (diff.y > 0) {\r\n \t\t\t\t\tnewCenter.y += halfPixelBounds.y - paddingTL.y;\r\n \t\t\t\t} else {\r\n \t\t\t\t\tnewCenter.y -= halfPixelBounds.y - paddingBR.y;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tthis.panTo(this.unproject(newCenter), 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: Zoom/pan 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: function (options) {\r\n \t\tif (!this._loaded) { return this; }\r\n\r\n \t\toptions = extend({\r\n \t\t\tanimate: false,\r\n \t\t\tpan: true\r\n \t\t}, options === true ? {animate: true} : options);\r\n\r\n \t\tvar oldSize = this.getSize();\r\n \t\tthis._sizeChanged = true;\r\n \t\tthis._lastCenter = null;\r\n\r\n \t\tvar newSize = this.getSize(),\r\n \t\t oldCenter = oldSize.divideBy(2).round(),\r\n \t\t newCenter = newSize.divideBy(2).round(),\r\n \t\t offset = 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(bind(this.fire, 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: oldSize,\r\n \t\t\tnewSize: newSize\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: function () {\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: function (options) {\r\n\r\n \t\toptions = this._locateOptions = extend({\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}, options);\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\tvar onResponse = bind(this._handleGeolocationResponse, this),\r\n \t\t onError = bind(this._handleGeolocationError, this);\r\n\r\n \t\tif (options.watch) {\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: function () {\r\n \t\tif (navigator.geolocation && navigator.geolocation.clearWatch) {\r\n \t\t\tnavigator.geolocation.clearWatch(this._locationWatchId);\r\n \t\t}\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: function (error) {\r\n \t\tvar c = error.code,\r\n \t\t message = 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: function (pos) {\r\n \t\tvar lat = pos.coords.latitude,\r\n \t\t lng = pos.coords.longitude,\r\n \t\t latlng = new LatLng(lat, lng),\r\n \t\t bounds = latlng.toBounds(pos.coords.accuracy * 2),\r\n \t\t options = this._locateOptions;\r\n\r\n \t\tif (options.setView) {\r\n \t\t\tvar 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\tvar data = {\r\n \t\t\tlatlng: latlng,\r\n \t\t\tbounds: bounds,\r\n \t\t\ttimestamp: pos.timestamp\r\n \t\t};\r\n\r\n \t\tfor (var i in pos.coords) {\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: function (name, HandlerClass) {\r\n \t\tif (!HandlerClass) { return this; }\r\n\r\n \t\tvar 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: function () {\r\n\r\n \t\tthis._initEvents(true);\r\n \t\tthis.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\ttry {\r\n \t\t\t// throws error in IE6-8\r\n \t\t\tdelete this._container._leaflet_id;\r\n \t\t\tdelete this._containerId;\r\n \t\t} catch (e) {\r\n \t\t\t/*eslint-disable */\r\n \t\t\tthis._container._leaflet_id = undefined;\r\n \t\t\t/* eslint-enable */\r\n \t\t\tthis._containerId = undefined;\r\n \t\t}\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\tremove(this._mapPane);\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\tcancelAnimFrame(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\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\tvar i;\r\n \t\tfor (i in this._layers) {\r\n \t\t\tthis._layers[i].remove();\r\n \t\t}\r\n \t\tfor (i in this._panes) {\r\n \t\t\tremove(this._panes[i]);\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: function (name, container) {\r\n \t\tvar className = 'leaflet-pane' + (name ? ' leaflet-' + name.replace('Pane', '') + '-pane' : ''),\r\n \t\t pane = 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: function () {\r\n \t\tthis._checkIfLoaded();\r\n\r\n \t\tif (this._lastCenter && !this._moved()) {\r\n \t\t\treturn this._lastCenter;\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: function () {\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: function () {\r\n \t\tvar bounds = this.getPixelBounds(),\r\n \t\t sw = this.unproject(bounds.getBottomLeft()),\r\n \t\t ne = 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: function () {\r\n \t\treturn this.options.minZoom === undefined ? this._layersMinZoom || 0 : this.options.minZoom;\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: function () {\r\n \t\treturn this.options.maxZoom === undefined ?\r\n \t\t\t(this._layersMaxZoom === undefined ? Infinity : this._layersMaxZoom) :\r\n \t\t\tthis.options.maxZoom;\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: function (bounds, inside, padding) { // (LatLngBounds[, Boolean, Point]) -> Number\r\n \t\tbounds = toLatLngBounds(bounds);\r\n \t\tpadding = toPoint(padding || [0, 0]);\r\n\r\n \t\tvar zoom = this.getZoom() || 0,\r\n \t\t min = this.getMinZoom(),\r\n \t\t max = this.getMaxZoom(),\r\n \t\t nw = bounds.getNorthWest(),\r\n \t\t se = bounds.getSouthEast(),\r\n \t\t size = this.getSize().subtract(padding),\r\n \t\t boundsSize = toBounds(this.project(se, zoom), this.project(nw, zoom)).getSize(),\r\n \t\t snap = any3d ? this.options.zoomSnap : 1,\r\n \t\t scalex = size.x / boundsSize.x,\r\n \t\t scaley = size.y / boundsSize.y,\r\n \t\t scale = 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: function () {\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(): 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 \tgetPixelBounds: function (center, zoom) {\r\n \t\tvar 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: function () {\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: function (zoom) {\r\n \t\treturn this.options.crs.getProjectedBounds(zoom === undefined ? this.getZoom() : zoom);\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: function (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: function () {\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: function () {\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: function (toZoom, fromZoom) {\r\n \t\t// TODO replace with universal implementation after refactoring projections\r\n \t\tvar crs = this.options.crs;\r\n \t\tfromZoom = fromZoom === undefined ? this._zoom : fromZoom;\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: function (scale, fromZoom) {\r\n \t\tvar crs = this.options.crs;\r\n \t\tfromZoom = fromZoom === undefined ? this._zoom : fromZoom;\r\n \t\tvar 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: function (latlng, zoom) {\r\n \t\tzoom = zoom === undefined ? this._zoom : zoom;\r\n \t\treturn this.options.crs.latLngToPoint(toLatLng(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: function (point, zoom) {\r\n \t\tzoom = zoom === undefined ? this._zoom : zoom;\r\n \t\treturn this.options.crs.pointToLatLng(toPoint(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: function (point) {\r\n \t\tvar projectedPoint = toPoint(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: function (latlng) {\r\n \t\tvar projectedPoint = this.project(toLatLng(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: function (latlng) {\r\n \t\treturn this.options.crs.wrapLatLng(toLatLng(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: function (latlng) {\r\n \t\treturn this.options.crs.wrapLatLngBounds(toLatLngBounds(latlng));\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: function (latlng1, latlng2) {\r\n \t\treturn this.options.crs.distance(toLatLng(latlng1), toLatLng(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: function (point) { // (Point)\r\n \t\treturn toPoint(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: function (point) { // (Point)\r\n \t\treturn toPoint(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: function (point) {\r\n \t\tvar layerPoint = this.containerPointToLayerPoint(toPoint(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: function (latlng) {\r\n \t\treturn this.layerPointToContainerPoint(this.latLngToLayerPoint(toLatLng(latlng)));\r\n \t},\r\n\r\n \t// @method mouseEventToContainerPoint(ev: MouseEvent): Point\r\n \t// Given a MouseEvent object, returns the pixel coordinate relative to the\r\n \t// map container where the event took place.\r\n \tmouseEventToContainerPoint: function (e) {\r\n \t\treturn getMousePosition(e, this._container);\r\n \t},\r\n\r\n \t// @method mouseEventToLayerPoint(ev: MouseEvent): Point\r\n \t// Given a MouseEvent object, returns the pixel coordinate relative to\r\n \t// the [origin pixel](#map-getpixelorigin) where the event took place.\r\n \tmouseEventToLayerPoint: function (e) {\r\n \t\treturn this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e));\r\n \t},\r\n\r\n \t// @method mouseEventToLatLng(ev: MouseEvent): LatLng\r\n \t// Given a MouseEvent object, returns geographical coordinate where the\r\n \t// event took place.\r\n \tmouseEventToLatLng: function (e) { // (MouseEvent)\r\n \t\treturn this.layerPointToLatLng(this.mouseEventToLayerPoint(e));\r\n \t},\r\n\r\n\r\n \t// map initialization methods\r\n\r\n \t_initContainer: function (id) {\r\n \t\tvar 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 \t},\r\n\r\n \t_initLayout: function () {\r\n \t\tvar container = this._container;\r\n\r\n \t\tthis._fadeAnimated = this.options.fadeAnimation && any3d;\r\n\r\n \t\taddClass(container, 'leaflet-container' +\r\n \t\t\t(touch ? ' leaflet-touch' : '') +\r\n \t\t\t(retina ? ' leaflet-retina' : '') +\r\n \t\t\t(ielt9 ? ' leaflet-oldie' : '') +\r\n \t\t\t(safari ? ' leaflet-safari' : '') +\r\n \t\t\t(this._fadeAnimated ? ' leaflet-fade-anim' : ''));\r\n\r\n \t\tvar position = getStyle(container, 'position');\r\n\r\n \t\tif (position !== 'absolute' && position !== 'relative' && position !== 'fixed') {\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: function () {\r\n \t\tvar 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 overlay shadows (e.g. `Marker` shadows)\r\n \t\tthis.createPane('shadowPane');\r\n \t\t// @pane shadowPane: HTMLElement = 500\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 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\taddClass(panes.markerPane, 'leaflet-zoom-hide');\r\n \t\t\taddClass(panes.shadowPane, '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: function (center, zoom) {\r\n \t\tsetPosition(this._mapPane, new Point(0, 0));\r\n\r\n \t\tvar 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\tvar zoomChanged = this._zoom !== zoom;\r\n \t\tthis\r\n \t\t\t._moveStart(zoomChanged, false)\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: function (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: function (center, zoom, data) {\r\n \t\tif (zoom === undefined) {\r\n \t\t\tzoom = this._zoom;\r\n \t\t}\r\n \t\tvar 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\t// @event zoom: Event\r\n \t\t// Fired repeatedly during any change in zoom level, including zoom\r\n \t\t// and fly animations.\r\n \t\tif (zoomChanged || (data && data.pinch)) {\t// Always fire 'zoom' if pinching because #3530\r\n \t\t\tthis.fire('zoom', data);\r\n \t\t}\r\n\r\n \t\t// @event move: Event\r\n \t\t// Fired repeatedly during any movement of the map, including pan and\r\n \t\t// fly animations.\r\n \t\treturn this.fire('move', data);\r\n \t},\r\n\r\n \t_moveEnd: function (zoomChanged) {\r\n \t\t// @event zoomend: Event\r\n \t\t// Fired when the map has 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 (e.g. user stopped\r\n \t\t// dragging the map).\r\n \t\treturn this.fire('moveend');\r\n \t},\r\n\r\n \t_stop: function () {\r\n \t\tcancelAnimFrame(this._flyToFrame);\r\n \t\tif (this._panAnim) {\r\n \t\t\tthis._panAnim.stop();\r\n \t\t}\r\n \t\treturn this;\r\n \t},\r\n\r\n \t_rawPanBy: function (offset) {\r\n \t\tsetPosition(this._mapPane, this._getMapPanePos().subtract(offset));\r\n \t},\r\n\r\n \t_getZoomSpan: function () {\r\n \t\treturn this.getMaxZoom() - this.getMinZoom();\r\n \t},\r\n\r\n \t_panInsideMaxBounds: function () {\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: function () {\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: function (remove$$1) {\r\n \t\tthis._targets = {};\r\n \t\tthis._targets[stamp(this._container)] = this;\r\n\r\n \t\tvar onOff = remove$$1 ? off : on;\r\n\r\n \t\t// @event click: MouseEvent\r\n \t\t// Fired when the user clicks (or taps) the map.\r\n \t\t// @event dblclick: MouseEvent\r\n \t\t// Fired when the user double-clicks (or double-taps) the map.\r\n \t\t// @event mousedown: MouseEvent\r\n \t\t// Fired when the user pushes the mouse button on the map.\r\n \t\t// @event mouseup: MouseEvent\r\n \t\t// Fired when the user releases the mouse button on the map.\r\n \t\t// @event mouseover: MouseEvent\r\n \t\t// Fired when the mouse enters the map.\r\n \t\t// @event mouseout: MouseEvent\r\n \t\t// Fired when the mouse leaves the map.\r\n \t\t// @event mousemove: MouseEvent\r\n \t\t// Fired while the mouse moves over the map.\r\n \t\t// @event contextmenu: MouseEvent\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 mousedown mouseup ' +\r\n \t\t\t'mouseover mouseout mousemove contextmenu keypress keydown keyup', this._handleDOMEvent, this);\r\n\r\n \t\tif (this.options.trackResize) {\r\n \t\t\tonOff(window, 'resize', this._onResize, this);\r\n \t\t}\r\n\r\n \t\tif (any3d && this.options.transform3DLimit) {\r\n \t\t\t(remove$$1 ? this.off : this.on).call(this, 'moveend', this._onMoveEnd);\r\n \t\t}\r\n \t},\r\n\r\n \t_onResize: function () {\r\n \t\tcancelAnimFrame(this._resizeRequest);\r\n \t\tthis._resizeRequest = requestAnimFrame(\r\n \t\t function () { this.invalidateSize({debounceMoveend: true}); }, this);\r\n \t},\r\n\r\n \t_onScroll: function () {\r\n \t\tthis._container.scrollTop = 0;\r\n \t\tthis._container.scrollLeft = 0;\r\n \t},\r\n\r\n \t_onMoveEnd: function () {\r\n \t\tvar 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: http://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: function (e, type) {\r\n \t\tvar targets = [],\r\n \t\t target,\r\n \t\t isHover = type === 'mouseout' || type === 'mouseover',\r\n \t\t src = e.target || e.srcElement,\r\n \t\t dragging = false;\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') && !e._simulated && 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 && isExternalTarget(src, e)) {\r\n \t\t\ttargets = [this];\r\n \t\t}\r\n \t\treturn targets;\r\n \t},\r\n\r\n \t_handleDOMEvent: function (e) {\r\n \t\tif (!this._loaded || skipped(e)) { return; }\r\n\r\n \t\tvar type = e.type;\r\n\r\n \t\tif (type === 'mousedown' || type === 'keypress' || type === 'keyup' || type === 'keydown') {\r\n \t\t\t// prevents outline when clicking on keyboard-focusable element\r\n \t\t\tpreventOutline(e.target || e.srcElement);\r\n \t\t}\r\n\r\n \t\tthis._fireDOMEvent(e, type);\r\n \t},\r\n\r\n \t_mouseEvents: ['click', 'dblclick', 'mouseover', 'mouseout', 'contextmenu'],\r\n\r\n \t_fireDOMEvent: function (e, type, targets) {\r\n\r\n \t\tif (e.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: MouseEvent\r\n \t\t\t// Fired before mouse 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\tvar synth = extend({}, e);\r\n \t\t\tsynth.type = 'preclick';\r\n \t\t\tthis._fireDOMEvent(synth, synth.type, targets);\r\n \t\t}\r\n\r\n \t\tif (e._stopped) { return; }\r\n\r\n \t\t// Find the layer the event is propagating from and its parents.\r\n \t\ttargets = (targets || []).concat(this._findEventTargets(e, type));\r\n\r\n \t\tif (!targets.length) { return; }\r\n\r\n \t\tvar target = targets[0];\r\n \t\tif (type === 'contextmenu' && target.listens(type, true)) {\r\n \t\t\tpreventDefault(e);\r\n \t\t}\r\n\r\n \t\tvar 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\tvar 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.mouseEventToContainerPoint(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 (var i = 0; i < targets.length; i++) {\r\n \t\t\ttargets[i].fire(type, data, true);\r\n \t\t\tif (data.originalEvent._stopped ||\r\n \t\t\t\t(targets[i].options.bubblingMouseEvents === false && indexOf(this._mouseEvents, type) !== -1)) { return; }\r\n \t\t}\r\n \t},\r\n\r\n \t_draggableMoved: function (obj) {\r\n \t\tobj = obj.dragging && obj.dragging.enabled() ? obj : this;\r\n \t\treturn (obj.dragging && obj.dragging.moved()) || (this.boxZoom && this.boxZoom.moved());\r\n \t},\r\n\r\n \t_clearHandlers: function () {\r\n \t\tfor (var i = 0, len = this._handlers.length; i < len; i++) {\r\n \t\t\tthis._handlers[i].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: function (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: function () {\r\n \t\treturn getPosition(this._mapPane) || new Point(0, 0);\r\n \t},\r\n\r\n \t_moved: function () {\r\n \t\tvar pos = this._getMapPanePos();\r\n \t\treturn pos && !pos.equals([0, 0]);\r\n \t},\r\n\r\n \t_getTopLeftPoint: function (center, zoom) {\r\n \t\tvar 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: function (center, zoom) {\r\n \t\tvar 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: function (latlng, zoom, center) {\r\n \t\tvar topLeft = this._getNewPixelOrigin(center, zoom);\r\n \t\treturn this.project(latlng, zoom)._subtract(topLeft);\r\n \t},\r\n\r\n \t_latLngBoundsToNewLayerBounds: function (latLngBounds, zoom, center) {\r\n \t\tvar topLeft = this._getNewPixelOrigin(center, zoom);\r\n \t\treturn toBounds([\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: function () {\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: function (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: function (center, zoom, bounds) {\r\n\r\n \t\tif (!bounds) { return center; }\r\n\r\n \t\tvar centerPoint = this.project(center, zoom),\r\n \t\t viewHalf = this.getSize().divideBy(2),\r\n \t\t viewBounds = new Bounds(centerPoint.subtract(viewHalf), centerPoint.add(viewHalf)),\r\n \t\t offset = 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 (offset.round().equals([0, 0])) {\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: function (offset, bounds) {\r\n \t\tif (!bounds) { return offset; }\r\n\r\n \t\tvar viewBounds = this.getPixelBounds(),\r\n \t\t newBounds = 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: function (pxBounds, maxBounds, zoom) {\r\n \t\tvar projectedMaxBounds = toBounds(\r\n \t\t this.project(maxBounds.getNorthEast(), zoom),\r\n \t\t this.project(maxBounds.getSouthWest(), zoom)\r\n \t\t ),\r\n \t\t minOffset = projectedMaxBounds.min.subtract(pxBounds.min),\r\n \t\t maxOffset = projectedMaxBounds.max.subtract(pxBounds.max),\r\n\r\n \t\t dx = this._rebound(minOffset.x, -maxOffset.x),\r\n \t\t dy = 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: function (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: function (zoom) {\r\n \t\tvar min = this.getMinZoom(),\r\n \t\t max = this.getMaxZoom(),\r\n \t\t snap = any3d ? this.options.zoomSnap : 1;\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: function () {\r\n \t\tthis.fire('move');\r\n \t},\r\n\r\n \t_onPanTransitionEnd: function () {\r\n \t\tremoveClass(this._mapPane, 'leaflet-pan-anim');\r\n \t\tthis.fire('moveend');\r\n \t},\r\n\r\n \t_tryAnimatedPan: function (center, options) {\r\n \t\t// difference between the new and current centers in pixels\r\n \t\tvar 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 && 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: function () {\r\n\r\n \t\tvar proxy = this._proxy = create$1('div', 'leaflet-proxy leaflet-zoom-animated');\r\n \t\tthis._panes.mapPane.appendChild(proxy);\r\n\r\n \t\tthis.on('zoomanim', function (e) {\r\n \t\t\tvar prop = TRANSFORM,\r\n \t\t\t transform = this._proxy.style[prop];\r\n\r\n \t\t\tsetTransform(this._proxy, this.project(e.center, e.zoom), this.getZoomScale(e.zoom, 1));\r\n\r\n \t\t\t// workaround for case when transform is the same and so transitionend event is not fired\r\n \t\t\tif (transform === this._proxy.style[prop] && this._animatingZoom) {\r\n \t\t\t\tthis._onZoomTransitionEnd();\r\n \t\t\t}\r\n \t\t}, this);\r\n\r\n \t\tthis.on('load moveend', this._animMoveEnd, this);\r\n\r\n \t\tthis._on('unload', this._destroyAnimProxy, this);\r\n \t},\r\n\r\n \t_destroyAnimProxy: function () {\r\n \t\tremove(this._proxy);\r\n \t\tthis.off('load moveend', this._animMoveEnd, this);\r\n \t\tdelete this._proxy;\r\n \t},\r\n\r\n \t_animMoveEnd: function () {\r\n \t\tvar c = this.getCenter(),\r\n \t\t z = this.getZoom();\r\n \t\tsetTransform(this._proxy, this.project(c, z), this.getZoomScale(z, 1));\r\n \t},\r\n\r\n \t_catchTransitionEnd: function (e) {\r\n \t\tif (this._animatingZoom && e.propertyName.indexOf('transform') >= 0) {\r\n \t\t\tthis._onZoomTransitionEnd();\r\n \t\t}\r\n \t},\r\n\r\n \t_nothingToAnimate: function () {\r\n \t\treturn !this._container.getElementsByClassName('leaflet-zoom-animated').length;\r\n \t},\r\n\r\n \t_tryAnimatedZoom: function (center, zoom, options) {\r\n\r\n \t\tif (this._animatingZoom) { return true; }\r\n\r\n \t\toptions = options || {};\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\tvar scale = this.getZoomScale(zoom),\r\n \t\t offset = 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\trequestAnimFrame(function () {\r\n \t\t\tthis\r\n \t\t\t ._moveStart(true, false)\r\n \t\t\t ._animateZoom(center, zoom, true);\r\n \t\t}, this);\r\n\r\n \t\treturn true;\r\n \t},\r\n\r\n \t_animateZoom: function (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\taddClass(this._mapPane, '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: center,\r\n \t\t\tzoom: zoom,\r\n \t\t\tnoUpdate: noUpdate\r\n \t\t});\r\n\r\n \t\t// Work around webkit not firing 'transitionend', see https://github.com/Leaflet/Leaflet/issues/3689, 2693\r\n \t\tsetTimeout(bind(this._onZoomTransitionEnd, this), 250);\r\n \t},\r\n\r\n \t_onZoomTransitionEnd: function () {\r\n \t\tif (!this._animatingZoom) { return; }\r\n\r\n \t\tif (this._mapPane) {\r\n \t\t\tremoveClass(this._mapPane, 'leaflet-zoom-anim');\r\n \t\t}\r\n\r\n \t\tthis._animatingZoom = false;\r\n\r\n \t\tthis._move(this._animateToCenter, this._animateToZoom);\r\n\r\n \t\t// This anim frame should prevent an obscure iOS webkit tile loading race condition.\r\n \t\trequestAnimFrame(function () {\r\n \t\t\tthis._moveEnd(true);\r\n \t\t}, this);\r\n \t}\r\n });\r\n\r\n // @section\r\n\r\n // @factory L.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 // @factory L.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 function createMap(id, options) {\r\n \treturn new Map(id, options);\r\n }\n\n /*\r\n * @class Control\r\n * @aka L.Control\r\n * @inherits Class\r\n *\r\n * L.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\n var Control = Class.extend({\r\n \t// @section\r\n \t// @aka Control options\r\n \toptions: {\r\n \t\t// @option position: String = 'topright'\r\n \t\t// The position of the control (one of the map corners). Possible values are `'topleft'`,\r\n \t\t// `'topright'`, `'bottomleft'` or `'bottomright'`\r\n \t\tposition: 'topright'\r\n \t},\r\n\r\n \tinitialize: function (options) {\r\n \t\tsetOptions(this, options);\r\n \t},\r\n\r\n \t/* @section\r\n \t * Classes extending L.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: function () {\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: function (position) {\r\n \t\tvar map = this._map;\r\n\r\n \t\tif (map) {\r\n \t\t\tmap.removeControl(this);\r\n \t\t}\r\n\r\n \t\tthis.options.position = position;\r\n\r\n \t\tif (map) {\r\n \t\t\tmap.addControl(this);\r\n \t\t}\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: function () {\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: function (map) {\r\n \t\tthis.remove();\r\n \t\tthis._map = map;\r\n\r\n \t\tvar container = this._container = this.onAdd(map),\r\n \t\t pos = this.getPosition(),\r\n \t\t corner = map._controlCorners[pos];\r\n\r\n \t\taddClass(container, 'leaflet-control');\r\n\r\n \t\tif (pos.indexOf('bottom') !== -1) {\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: function () {\r\n \t\tif (!this._map) {\r\n \t\t\treturn this;\r\n \t\t}\r\n\r\n \t\tremove(this._container);\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: function (e) {\r\n \t\t// if map exists and event is not a keyboard event\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 var control = function (options) {\r\n \treturn new Control(options);\r\n };\r\n\r\n /* @section Extension methods\r\n * @uninheritable\r\n *\r\n * Every control should extend from `L.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\n Map.include({\r\n \t// @method addControl(control: Control): this\r\n \t// Adds the given control to the map\r\n \taddControl: function (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: function (control) {\r\n \t\tcontrol.remove();\r\n \t\treturn this;\r\n \t},\r\n\r\n \t_initControlPos: function () {\r\n \t\tvar corners = this._controlCorners = {},\r\n \t\t l = 'leaflet-',\r\n \t\t container = 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\tvar 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: function () {\r\n \t\tfor (var i in this._controlCorners) {\r\n \t\t\tremove(this._controlCorners[i]);\r\n \t\t}\r\n \t\tremove(this._controlContainer);\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 * @aka L.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](http://leafletjs.com/examples/layers-control/)). Extends `Control`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var baseLayers = {\r\n * \t\"Mapbox\": mapbox,\r\n * \t\"OpenStreetMap\": osm\r\n * };\r\n *\r\n * var overlays = {\r\n * \t\"Marker\": marker,\r\n * \t\"Roads\": roadsLayer\r\n * };\r\n *\r\n * L.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 var Layers = Control.extend({\r\n \t// @section\r\n \t// @aka Control.Layers options\r\n \toptions: {\r\n \t\t// @option collapsed: Boolean = true\r\n \t\t// If `true`, the control will be collapsed into an icon and expanded on mouse hover or touch.\r\n \t\tcollapsed: true,\r\n \t\tposition: 'topright',\r\n\r\n \t\t// @option autoZIndex: Boolean = true\r\n \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\tautoZIndex: true,\r\n\r\n \t\t// @option hideSingleBase: Boolean = false\r\n \t\t// If `true`, the base layers in the control will be hidden when there is only one.\r\n \t\thideSingleBase: false,\r\n\r\n \t\t// @option sortLayers: Boolean = false\r\n \t\t// Whether to sort the layers. When `false`, layers will keep the order\r\n \t\t// in which they were added to the control.\r\n \t\tsortLayers: false,\r\n\r\n \t\t// @option sortFunction: Function = *\r\n \t\t// A [compare function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/sort)\r\n \t\t// that will be used for sorting the layers, when `sortLayers` is `true`.\r\n \t\t// The function receives both the `L.Layer` instances and their names, as in\r\n \t\t// `sortFunction(layerA, layerB, nameA, nameB)`.\r\n \t\t// By default, it sorts layers alphabetically by their name.\r\n \t\tsortFunction: function (layerA, layerB, nameA, nameB) {\r\n \t\t\treturn nameA < nameB ? -1 : (nameB < nameA ? 1 : 0);\r\n \t\t}\r\n \t},\r\n\r\n \tinitialize: function (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\r\n \t\tfor (var i in baseLayers) {\r\n \t\t\tthis._addLayer(baseLayers[i], i);\r\n \t\t}\r\n\r\n \t\tfor (i in overlays) {\r\n \t\t\tthis._addLayer(overlays[i], i, true);\r\n \t\t}\r\n \t},\r\n\r\n \tonAdd: function (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 (var i = 0; i < this._layers.length; i++) {\r\n \t\t\tthis._layers[i].layer.on('add remove', this._onLayerChange, this);\r\n \t\t}\r\n\r\n \t\treturn this._container;\r\n \t},\r\n\r\n \taddTo: function (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: function () {\r\n \t\tthis._map.off('zoomend', this._checkDisabledLayers, this);\r\n\r\n \t\tfor (var i = 0; i < this._layers.length; i++) {\r\n \t\t\tthis._layers[i].layer.off('add remove', this._onLayerChange, this);\r\n \t\t}\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: function (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: function (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: function (layer) {\r\n \t\tlayer.off('add remove', this._onLayerChange, this);\r\n\r\n \t\tvar 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: function () {\r\n \t\taddClass(this._container, 'leaflet-control-layers-expanded');\r\n \t\tthis._section.style.height = null;\r\n \t\tvar acceptableHeight = this._map.getSize().y - (this._container.offsetTop + 50);\r\n \t\tif (acceptableHeight < this._section.clientHeight) {\r\n \t\t\taddClass(this._section, 'leaflet-control-layers-scrollbar');\r\n \t\t\tthis._section.style.height = acceptableHeight + 'px';\r\n \t\t} else {\r\n \t\t\tremoveClass(this._section, '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: function () {\r\n \t\tremoveClass(this._container, 'leaflet-control-layers-expanded');\r\n \t\treturn this;\r\n \t},\r\n\r\n \t_initLayout: function () {\r\n \t\tvar className = 'leaflet-control-layers',\r\n \t\t container = this._container = create$1('div', className),\r\n \t\t collapsed = this.options.collapsed;\r\n\r\n \t\t// makes this work on IE touch devices by stopping it from firing a mouseout event when the touch is released\r\n \t\tcontainer.setAttribute('aria-haspopup', true);\r\n\r\n \t\tdisableClickPropagation(container);\r\n \t\tdisableScrollPropagation(container);\r\n\r\n \t\tvar section = this._section = create$1('section', 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\tif (!android) {\r\n \t\t\t\ton(container, {\r\n \t\t\t\t\tmouseenter: this.expand,\r\n \t\t\t\t\tmouseleave: this.collapse\r\n \t\t\t\t}, this);\r\n \t\t\t}\r\n \t\t}\r\n\r\n \t\tvar link = this._layersLink = create$1('a', className + '-toggle', container);\r\n \t\tlink.href = '#';\r\n \t\tlink.title = 'Layers';\r\n\r\n \t\tif (touch) {\r\n \t\t\ton(link, 'click', stop);\r\n \t\t\ton(link, 'click', this.expand, this);\r\n \t\t} else {\r\n \t\t\ton(link, 'focus', this.expand, this);\r\n \t\t}\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: function (id) {\r\n \t\tfor (var i = 0; i < this._layers.length; i++) {\r\n\r\n \t\t\tif (this._layers[i] && stamp(this._layers[i].layer) === id) {\r\n \t\t\t\treturn this._layers[i];\r\n \t\t\t}\r\n \t\t}\r\n \t},\r\n\r\n \t_addLayer: function (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: layer,\r\n \t\t\tname: name,\r\n \t\t\toverlay: overlay\r\n \t\t});\r\n\r\n \t\tif (this.options.sortLayers) {\r\n \t\t\tthis._layers.sort(bind(function (a, b) {\r\n \t\t\t\treturn this.options.sortFunction(a.layer, b.layer, a.name, b.name);\r\n \t\t\t}, this));\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: function () {\r\n \t\tif (!this._container) { return this; }\r\n\r\n \t\tempty(this._baseLayersList);\r\n \t\tempty(this._overlaysList);\r\n\r\n \t\tthis._layerControlInputs = [];\r\n \t\tvar baseLayersPresent, overlaysPresent, i, obj, baseLayersCount = 0;\r\n\r\n \t\tfor (i = 0; i < this._layers.length; i++) {\r\n \t\t\tobj = this._layers[i];\r\n \t\t\tthis._addItem(obj);\r\n \t\t\toverlaysPresent = overlaysPresent || obj.overlay;\r\n \t\t\tbaseLayersPresent = baseLayersPresent || !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: function (e) {\r\n \t\tif (!this._handlingClick) {\r\n \t\t\tthis._update();\r\n \t\t}\r\n\r\n \t\tvar 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\tvar 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// IE7 bugs out if you create a radio dynamically, so you have to do it this hacky way (see http://bit.ly/PqYLBe)\r\n \t_createRadioElement: function (name, checked) {\r\n\r\n \t\tvar radioHtml = '<input type=\"radio\" class=\"leaflet-control-layers-selector\" name=\"' +\r\n \t\t\t\tname + '\"' + (checked ? ' checked=\"checked\"' : '') + '/>';\r\n\r\n \t\tvar radioFragment = document.createElement('div');\r\n \t\tradioFragment.innerHTML = radioHtml;\r\n\r\n \t\treturn radioFragment.firstChild;\r\n \t},\r\n\r\n \t_addItem: function (obj) {\r\n \t\tvar label = document.createElement('label'),\r\n \t\t checked = this._map.hasLayer(obj.layer),\r\n \t\t input;\r\n\r\n \t\tif (obj.overlay) {\r\n \t\t\tinput = document.createElement('input');\r\n \t\t\tinput.type = 'checkbox';\r\n \t\t\tinput.className = 'leaflet-control-layers-selector';\r\n \t\t\tinput.defaultChecked = checked;\r\n \t\t} else {\r\n \t\t\tinput = this._createRadioElement('leaflet-base-layers_' + stamp(this), checked);\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\tvar 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\tvar holder = document.createElement('div');\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\tvar 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: function () {\r\n \t\tvar inputs = this._layerControlInputs,\r\n \t\t input, layer;\r\n \t\tvar addedLayers = [],\r\n \t\t removedLayers = [];\r\n\r\n \t\tthis._handlingClick = true;\r\n\r\n \t\tfor (var i = inputs.length - 1; i >= 0; i--) {\r\n \t\t\tinput = inputs[i];\r\n \t\t\tlayer = 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 (i = 0; i < removedLayers.length; i++) {\r\n \t\t\tif (this._map.hasLayer(removedLayers[i])) {\r\n \t\t\t\tthis._map.removeLayer(removedLayers[i]);\r\n \t\t\t}\r\n \t\t}\r\n \t\tfor (i = 0; i < addedLayers.length; i++) {\r\n \t\t\tif (!this._map.hasLayer(addedLayers[i])) {\r\n \t\t\t\tthis._map.addLayer(addedLayers[i]);\r\n \t\t\t}\r\n \t\t}\r\n\r\n \t\tthis._handlingClick = false;\r\n\r\n \t\tthis._refocusOnMap();\r\n \t},\r\n\r\n \t_checkDisabledLayers: function () {\r\n \t\tvar inputs = this._layerControlInputs,\r\n \t\t input,\r\n \t\t layer,\r\n \t\t zoom = this._map.getZoom();\r\n\r\n \t\tfor (var i = inputs.length - 1; i >= 0; i--) {\r\n \t\t\tinput = inputs[i];\r\n \t\t\tlayer = 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: function () {\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_expand: function () {\r\n \t\t// Backward compatibility, remove me in 1.1.\r\n \t\treturn this.expand();\r\n \t},\r\n\r\n \t_collapse: function () {\r\n \t\t// Backward compatibility, remove me in 1.1.\r\n \t\treturn this.collapse();\r\n \t}\r\n\r\n });\r\n\r\n\r\n // @factory L.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\n var layers = function (baseLayers, overlays, options) {\r\n \treturn new Layers(baseLayers, overlays, options);\r\n };\n\n /*\r\n * @class Control.Zoom\r\n * @aka L.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 var Zoom = Control.extend({\r\n \t// @section\r\n \t// @aka Control.Zoom options\r\n \toptions: {\r\n \t\tposition: 'topleft',\r\n\r\n \t\t// @option zoomInText: String = '+'\r\n \t\t// The text set on the 'zoom in' button.\r\n \t\tzoomInText: '+',\r\n\r\n \t\t// @option zoomInTitle: String = 'Zoom in'\r\n \t\t// The title set on the 'zoom in' button.\r\n \t\tzoomInTitle: 'Zoom in',\r\n\r\n \t\t// @option zoomOutText: String = '−'\r\n \t\t// The text set on the 'zoom out' button.\r\n \t\tzoomOutText: '−',\r\n\r\n \t\t// @option zoomOutTitle: String = 'Zoom out'\r\n \t\t// The title set on the 'zoom out' button.\r\n \t\tzoomOutTitle: 'Zoom out'\r\n \t},\r\n\r\n \tonAdd: function (map) {\r\n \t\tvar zoomName = 'leaflet-control-zoom',\r\n \t\t container = create$1('div', zoomName + ' leaflet-bar'),\r\n \t\t options = this.options;\r\n\r\n \t\tthis._zoomInButton = this._createButton(options.zoomInText, options.zoomInTitle,\r\n \t\t zoomName + '-in', container, this._zoomIn);\r\n \t\tthis._zoomOutButton = this._createButton(options.zoomOutText, options.zoomOutTitle,\r\n \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: function (map) {\r\n \t\tmap.off('zoomend zoomlevelschange', this._updateDisabled, this);\r\n \t},\r\n\r\n \tdisable: function () {\r\n \t\tthis._disabled = true;\r\n \t\tthis._updateDisabled();\r\n \t\treturn this;\r\n \t},\r\n\r\n \tenable: function () {\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: function (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: function (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: function (html, title, className, container, fn) {\r\n \t\tvar 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: function () {\r\n \t\tvar map = this._map,\r\n \t\t className = 'leaflet-disabled';\r\n\r\n \t\tremoveClass(this._zoomInButton, className);\r\n \t\tremoveClass(this._zoomOutButton, className);\r\n\r\n \t\tif (this._disabled || map._zoom === map.getMinZoom()) {\r\n \t\t\taddClass(this._zoomOutButton, className);\r\n \t\t}\r\n \t\tif (this._disabled || map._zoom === map.getMaxZoom()) {\r\n \t\t\taddClass(this._zoomInButton, className);\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\n Map.mergeOptions({\r\n \tzoomControl: true\r\n });\r\n\r\n Map.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 });\r\n\r\n // @namespace Control.Zoom\r\n // @factory L.control.zoom(options: Control.Zoom options)\r\n // Creates a zoom control\r\n var zoom = function (options) {\r\n \treturn new Zoom(options);\r\n };\n\n /*\n * @class Control.Scale\n * @aka L.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 * L.control.scale().addTo(map);\n * ```\n */\n\n var Scale = Control.extend({\n \t// @section\n \t// @aka Control.Scale options\n \toptions: {\n \t\tposition: 'bottomleft',\n\n \t\t// @option maxWidth: Number = 100\n \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\tmaxWidth: 100,\n\n \t\t// @option metric: Boolean = True\n \t\t// Whether to show the metric scale line (m/km).\n \t\tmetric: true,\n\n \t\t// @option imperial: Boolean = True\n \t\t// Whether to show the imperial scale line (mi/ft).\n \t\timperial: true\n\n \t\t// @option updateWhenIdle: Boolean = false\n \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},\n\n \tonAdd: function (map) {\n \t\tvar className = 'leaflet-control-scale',\n \t\t container = create$1('div', className),\n \t\t options = 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: function (map) {\n \t\tmap.off(this.options.updateWhenIdle ? 'moveend' : 'move', this._update, this);\n \t},\n\n \t_addScales: function (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: function () {\n \t\tvar map = this._map,\n \t\t y = map.getSize().y / 2;\n\n \t\tvar 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: function (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: function (maxMeters) {\n \t\tvar meters = this._getRoundNum(maxMeters),\n \t\t label = meters < 1000 ? meters + ' m' : (meters / 1000) + ' km';\n\n \t\tthis._updateScale(this._mScale, label, meters / maxMeters);\n \t},\n\n \t_updateImperial: function (maxMeters) {\n \t\tvar maxFeet = maxMeters * 3.2808399,\n \t\t 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: function (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: function (num) {\n \t\tvar pow10 = Math.pow(10, (Math.floor(num) + '').length - 1),\n \t\t d = num / pow10;\n\n \t\td = d >= 10 ? 10 :\n \t\t d >= 5 ? 5 :\n \t\t d >= 3 ? 3 :\n \t\t d >= 2 ? 2 : 1;\n\n \t\treturn pow10 * d;\n \t}\n });\n\n\n // @factory L.control.scale(options?: Control.Scale options)\n // Creates an scale control with the given options.\n var scale = function (options) {\n \treturn new Scale(options);\n };\n\n /*\r\n * @class Control.Attribution\r\n * @aka L.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 var Attribution = Control.extend({\r\n \t// @section\r\n \t// @aka Control.Attribution options\r\n \toptions: {\r\n \t\tposition: 'bottomright',\r\n\r\n \t\t// @option prefix: String = 'Leaflet'\r\n \t\t// The HTML text shown before the attributions. Pass `false` to disable.\r\n \t\tprefix: '<a href=\"https://leafletjs.com\" title=\"A JS library for interactive maps\">Leaflet</a>'\r\n \t},\r\n\r\n \tinitialize: function (options) {\r\n \t\tsetOptions(this, options);\r\n\r\n \t\tthis._attributions = {};\r\n \t},\r\n\r\n \tonAdd: function (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 (var i in map._layers) {\r\n \t\t\tif (map._layers[i].getAttribution) {\r\n \t\t\t\tthis.addAttribution(map._layers[i].getAttribution());\r\n \t\t\t}\r\n \t\t}\r\n\r\n \t\tthis._update();\r\n\r\n \t\treturn this._container;\r\n \t},\r\n\r\n \t// @method setPrefix(prefix: String): this\r\n \t// Sets the text before the attributions.\r\n \tsetPrefix: function (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. `'Vector data © Mapbox'`).\r\n \taddAttribution: function (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: function (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: function () {\r\n \t\tif (!this._map) { return; }\r\n\r\n \t\tvar attribs = [];\r\n\r\n \t\tfor (var i in this._attributions) {\r\n \t\t\tif (this._attributions[i]) {\r\n \t\t\t\tattribs.push(i);\r\n \t\t\t}\r\n \t\t}\r\n\r\n \t\tvar 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(' | ');\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\n Map.mergeOptions({\r\n \tattributionControl: true\r\n });\r\n\r\n Map.addInitHook(function () {\r\n \tif (this.options.attributionControl) {\r\n \t\tnew Attribution().addTo(this);\r\n \t}\r\n });\r\n\r\n // @namespace Control.Attribution\r\n // @factory L.control.attribution(options: Control.Attribution options)\r\n // Creates an attribution control.\r\n var attribution = function (options) {\r\n \treturn new Attribution(options);\r\n };\n\n Control.Layers = Layers;\n Control.Zoom = Zoom;\n Control.Scale = Scale;\n Control.Attribution = Attribution;\n\n control.layers = layers;\n control.zoom = zoom;\n control.scale = scale;\n control.attribution = attribution;\n\n /*\n \tL.Handler 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 // @aka L.Handler\n // Abstract class for map interaction handlers\n\n var Handler = Class.extend({\n \tinitialize: function (map) {\n \t\tthis._map = map;\n \t},\n\n \t// @method enable(): this\n \t// Enables the handler\n \tenable: function () {\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: function () {\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: function () {\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 L.Handler:\n // @function addTo(map: Map, name: String): this\n // Adds a new Handler to the given map with the given name.\n Handler.addTo = function (map, name) {\n \tmap.addHandler(name, this);\n \treturn this;\n };\n\n var Mixin = {Events: Events};\n\n /*\r\n * @class Draggable\r\n * @aka L.Draggable\r\n * @inherits Evented\r\n *\r\n * A class for making DOM elements draggable (including touch support).\r\n * Used internally for map and marker dragging. Only works for elements\r\n * that were positioned with [`L.DomUtil.setPosition`](#domutil-setposition).\r\n *\r\n * @example\r\n * ```js\r\n * var draggable = new L.Draggable(elementToDrag);\r\n * draggable.enable();\r\n * ```\r\n */\r\n\r\n var START = touch ? 'touchstart mousedown' : 'mousedown';\r\n var END = {\r\n \tmousedown: 'mouseup',\r\n \ttouchstart: 'touchend',\r\n \tpointerdown: 'touchend',\r\n \tMSPointerDown: 'touchend'\r\n };\r\n var MOVE = {\r\n \tmousedown: 'mousemove',\r\n \ttouchstart: 'touchmove',\r\n \tpointerdown: 'touchmove',\r\n \tMSPointerDown: 'touchmove'\r\n };\r\n\r\n\r\n var Draggable = Evented.extend({\r\n\r\n \toptions: {\r\n \t\t// @section\r\n \t\t// @aka Draggable options\r\n \t\t// @option clickTolerance: Number = 3\r\n \t\t// The max number of pixels a user can shift the mouse pointer during a click\r\n \t\t// for it to be considered a valid click (as opposed to a mouse drag).\r\n \t\tclickTolerance: 3\r\n \t},\r\n\r\n \t// @constructor L.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: function (element, dragStartTarget, preventOutline$$1, 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$$1;\r\n \t},\r\n\r\n \t// @method enable()\r\n \t// Enables the dragging ability\r\n \tenable: function () {\r\n \t\tif (this._enabled) { return; }\r\n\r\n \t\ton(this._dragStartTarget, START, 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: function () {\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();\r\n \t\t}\r\n\r\n \t\toff(this._dragStartTarget, START, 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: function (e) {\r\n \t\t// Ignore simulated events, since we handle both touch and\r\n \t\t// mouse explicitly; otherwise we risk getting duplicates of\r\n \t\t// touch events, see #4315.\r\n \t\t// Also ignore the event if disabled; this happens in IE11\r\n \t\t// under some circumstances, see #3666.\r\n \t\tif (e._simulated || !this._enabled) { return; }\r\n\r\n \t\tthis._moved = false;\r\n\r\n \t\tif (hasClass(this._element, 'leaflet-zoom-anim')) { return; }\r\n\r\n \t\tif (Draggable._dragging || e.shiftKey || ((e.which !== 1) && (e.button !== 1) && !e.touches)) { 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\tvar first = e.touches ? e.touches[0] : e,\r\n \t\t sizedParent = getSizedParentNode(this._element);\r\n\r\n \t\tthis._startPoint = new Point(first.clientX, first.clientY);\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, MOVE[e.type], this._onMove, this);\r\n \t\ton(document, END[e.type], this._onUp, this);\r\n \t},\r\n\r\n \t_onMove: function (e) {\r\n \t\t// Ignore simulated events, since we handle both touch and\r\n \t\t// mouse explicitly; otherwise we risk getting duplicates of\r\n \t\t// touch events, see #4315.\r\n \t\t// Also ignore the event if disabled; this happens in IE11\r\n \t\t// under some circumstances, see #3666.\r\n \t\tif (e._simulated || !this._enabled) { return; }\r\n\r\n \t\tif (e.touches && e.touches.length > 1) {\r\n \t\t\tthis._moved = true;\r\n \t\t\treturn;\r\n \t\t}\r\n\r\n \t\tvar first = (e.touches && e.touches.length === 1 ? e.touches[0] : e),\r\n \t\t offset = new Point(first.clientX, first.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\tpreventDefault(e);\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 \t\t\tthis._startPos = getPosition(this._element).subtract(offset);\r\n\r\n \t\t\taddClass(document.body, 'leaflet-dragging');\r\n\r\n \t\t\tthis._lastTarget = e.target || e.srcElement;\r\n \t\t\t// IE and Edge do not give the <use> element, so fetch it\r\n \t\t\t// if necessary\r\n \t\t\tif (window.SVGElementInstance && this._lastTarget instanceof window.SVGElementInstance) {\r\n \t\t\t\tthis._lastTarget = this._lastTarget.correspondingUseElement;\r\n \t\t\t}\r\n \t\t\taddClass(this._lastTarget, '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\tcancelAnimFrame(this._animRequest);\r\n \t\tthis._lastEvent = e;\r\n \t\tthis._animRequest = requestAnimFrame(this._updatePosition, this, true);\r\n \t},\r\n\r\n \t_updatePosition: function () {\r\n \t\tvar 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: function (e) {\r\n \t\t// Ignore simulated events, since we handle both touch and\r\n \t\t// mouse explicitly; otherwise we risk getting duplicates of\r\n \t\t// touch events, see #4315.\r\n \t\t// Also ignore the event if disabled; this happens in IE11\r\n \t\t// under some circumstances, see #3666.\r\n \t\tif (e._simulated || !this._enabled) { return; }\r\n \t\tthis.finishDrag();\r\n \t},\r\n\r\n \tfinishDrag: function () {\r\n \t\tremoveClass(document.body, 'leaflet-dragging');\r\n\r\n \t\tif (this._lastTarget) {\r\n \t\t\tremoveClass(this._lastTarget, 'leaflet-drag-target');\r\n \t\t\tthis._lastTarget = null;\r\n \t\t}\r\n\r\n \t\tfor (var i in MOVE) {\r\n \t\t\toff(document, MOVE[i], this._onMove, this);\r\n \t\t\toff(document, END[i], this._onUp, this);\r\n \t\t}\r\n\r\n \t\tenableImageDrag();\r\n \t\tenableTextSelection();\r\n\r\n \t\tif (this._moved && this._moving) {\r\n \t\t\t// ensure drag is not fired after dragend\r\n \t\t\tcancelAnimFrame(this._animRequest);\r\n\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\tdistance: this._newPos.distanceTo(this._startPos)\r\n \t\t\t});\r\n \t\t}\r\n\r\n \t\tthis._moving = false;\r\n \t\tDraggable._dragging = false;\r\n \t}\r\n\r\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 // [Douglas-Peucker algorithm](http://en.wikipedia.org/wiki/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](http://mourner.github.com/simplify-js/).\r\n function simplify(points, tolerance) {\r\n \tif (!tolerance || !points.length) {\r\n \t\treturn points.slice();\r\n \t}\r\n\r\n \tvar sqTolerance = tolerance * tolerance;\r\n\r\n \t // stage 1: vertex reduction\r\n \t points = _reducePoints(points, sqTolerance);\r\n\r\n \t // stage 2: Douglas-Peucker simplification\r\n \t points = _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\n function 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\n function closestPointOnSegment(p, p1, p2) {\r\n \treturn _sqClosestPointOnSegment(p, p1, p2);\r\n }\r\n\r\n // Douglas-Peucker simplification, see http://en.wikipedia.org/wiki/Douglas-Peucker_algorithm\r\n function _simplifyDP(points, sqTolerance) {\r\n\r\n \tvar len = points.length,\r\n \t ArrayConstructor = typeof Uint8Array !== undefined + '' ? Uint8Array : Array,\r\n \t markers = new ArrayConstructor(len);\r\n\r\n \t markers[0] = markers[len - 1] = 1;\r\n\r\n \t_simplifyDPStep(points, markers, sqTolerance, 0, len - 1);\r\n\r\n \tvar i,\r\n \t 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\n function _simplifyDPStep(points, markers, sqTolerance, first, last) {\r\n\r\n \tvar 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\n function _reducePoints(points, sqTolerance) {\r\n \tvar reducedPoints = [points[0]];\r\n\r\n \tfor (var i = 1, prev = 0, len = points.length; i < len; 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 < len - 1) {\r\n \t\treducedPoints.push(points[len - 1]);\r\n \t}\r\n \treturn reducedPoints;\r\n }\r\n\r\n var _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\n function clipSegment(a, b, bounds, useLastCode, round) {\r\n \tvar codeA = useLastCode ? _lastCode : _getBitCode(a, bounds),\r\n \t codeB = _getBitCode(b, bounds),\r\n\r\n \t codeOut, 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\n function _getEdgeIntersection(a, b, code, bounds, round) {\r\n \tvar dx = b.x - a.x,\r\n \t dy = b.y - a.y,\r\n \t min = bounds.min,\r\n \t max = bounds.max,\r\n \t 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\n function _getBitCode(p, bounds) {\r\n \tvar 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\n function _sqDist(p1, p2) {\r\n \tvar dx = p2.x - p1.x,\r\n \t dy = 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\n function _sqClosestPointOnSegment(p, p1, p2, sqDist) {\r\n \tvar x = p1.x,\r\n \t y = p1.y,\r\n \t dx = p2.x - x,\r\n \t dy = p2.y - y,\r\n \t dot = dx * dx + dy * dy,\r\n \t t;\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\n function isFlat(latlngs) {\r\n \treturn !isArray(latlngs[0]) || (typeof latlngs[0][0] !== 'object' && typeof latlngs[0][0] !== 'undefined');\r\n }\r\n\r\n function _flat(latlngs) {\r\n \tconsole.warn('Deprecated use of _flat, please use L.LineUtil.isFlat instead.');\r\n \treturn isFlat(latlngs);\r\n }\n\n var LineUtil = ({\n simplify: simplify,\n pointToSegmentDistance: pointToSegmentDistance,\n closestPointOnSegment: closestPointOnSegment,\n clipSegment: clipSegment,\n _getEdgeIntersection: _getEdgeIntersection,\n _getBitCode: _getBitCode,\n _sqClosestPointOnSegment: _sqClosestPointOnSegment,\n isFlat: isFlat,\n _flat: _flat\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\n function clipPolygon(points, bounds, round) {\r\n \tvar clippedPoints,\r\n \t edges = [1, 4, 2, 8],\r\n \t i, j, k,\r\n \t a, b,\r\n \t len, edge, p;\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 }\n\n var PolyUtil = ({\n clipPolygon: clipPolygon\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 L.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\n var LonLat = {\r\n \tproject: function (latlng) {\r\n \t\treturn new Point(latlng.lng, latlng.lat);\r\n \t},\r\n\r\n \tunproject: function (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 L.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\n var Mercator = {\r\n \tR: 6378137,\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: function (latlng) {\r\n \t\tvar d = Math.PI / 180,\r\n \t\t r = this.R,\r\n \t\t y = latlng.lat * d,\r\n \t\t tmp = this.R_MINOR / r,\r\n \t\t e = Math.sqrt(1 - tmp * tmp),\r\n \t\t con = e * Math.sin(y);\r\n\r\n \t\tvar ts = Math.tan(Math.PI / 4 - y / 2) / Math.pow((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: function (point) {\r\n \t\tvar d = 180 / Math.PI,\r\n \t\t r = this.R,\r\n \t\t tmp = this.R_MINOR / r,\r\n \t\t e = Math.sqrt(1 - tmp * tmp),\r\n \t\t ts = Math.exp(-point.y / r),\r\n \t\t phi = Math.PI / 2 - 2 * Math.atan(ts);\r\n\r\n \t\tfor (var 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 = Math.pow((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](http://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 `L.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 `L.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\n var index = ({\n LonLat: LonLat,\n Mercator: Mercator,\n SphericalMercator: SphericalMercator\n });\n\n /*\r\n * @namespace CRS\r\n * @crs L.CRS.EPSG3395\r\n *\r\n * Rarely used by some commercial tile providers. Uses Elliptical Mercator projection.\r\n */\r\n var EPSG3395 = extend({}, Earth, {\r\n \tcode: 'EPSG:3395',\r\n \tprojection: Mercator,\r\n\r\n \ttransformation: (function () {\r\n \t\tvar scale = 0.5 / (Math.PI * Mercator.R);\r\n \t\treturn toTransformation(scale, 0.5, -scale, 0.5);\r\n \t}())\r\n });\n\n /*\r\n * @namespace CRS\r\n * @crs L.CRS.EPSG4326\r\n *\r\n * A common CRS among GIS enthusiasts. Uses simple Equirectangular projection.\r\n *\r\n * Leaflet 1.0.x complies with the [TMS coordinate scheme for EPSG:4326](https://wiki.osgeo.org/wiki/Tile_Map_Service_Specification#global-geodetic),\r\n * which is a breaking change from 0.7.x behaviour. If you are using a `TileLayer`\r\n * 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\n var EPSG4326 = extend({}, Earth, {\r\n \tcode: 'EPSG:4326',\r\n \tprojection: LonLat,\r\n \ttransformation: toTransformation(1 / 180, 1, -1 / 180, 0.5)\r\n });\n\n /*\n * @namespace CRS\n * @crs L.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\n var Simple = extend({}, CRS, {\n \tprojection: LonLat,\n \ttransformation: toTransformation(1, 0, -1, 0),\n\n \tscale: function (zoom) {\n \t\treturn Math.pow(2, zoom);\n \t},\n\n \tzoom: function (scale) {\n \t\treturn Math.log(scale) / Math.LN2;\n \t},\n\n \tdistance: function (latlng1, latlng2) {\n \t\tvar dx = latlng2.lng - latlng1.lng,\n \t\t dy = latlng2.lat - latlng1.lat;\n\n \t\treturn Math.sqrt(dx * dx + dy * dy);\n \t},\n\n \tinfinite: true\n });\n\n CRS.Earth = Earth;\n CRS.EPSG3395 = EPSG3395;\n CRS.EPSG3857 = EPSG3857;\n CRS.EPSG900913 = EPSG900913;\n CRS.EPSG4326 = EPSG4326;\n CRS.Simple = Simple;\n\n /*\n * @class Layer\n * @inherits Evented\n * @aka L.Layer\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 `L.Evented`.\n *\n * @example\n *\n * ```js\n * var layer = L.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\n var Layer = Evented.extend({\n\n \t// Classes extending `L.Layer` will inherit the following options:\n \toptions: {\n \t\t// @option pane: String = 'overlayPane'\n \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\tpane: 'overlayPane',\n\n \t\t// @option attribution: String = null\n \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\tattribution: null,\n\n \t\tbubblingMouseEvents: true\n \t},\n\n \t/* @section\n \t * Classes extending `L.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: function (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: function () {\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: function (obj) {\n \t\tif (obj) {\n \t\t\tobj.removeLayer(this);\n \t\t}\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: function (name) {\n \t\treturn this._map.getPane(name ? (this.options[name] || name) : this.options.pane);\n \t},\n\n \taddInteractiveTarget: function (targetEl) {\n \t\tthis._map._targets[stamp(targetEl)] = this;\n \t\treturn this;\n \t},\n\n \tremoveInteractiveTarget: function (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: function () {\n \t\treturn this.options.attribution;\n \t},\n\n \t_layerAdd: function (e) {\n \t\tvar 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\tvar events = this.getEvents();\n \t\t\tmap.on(events, this);\n \t\t\tthis.once('remove', function () {\n \t\t\t\tmap.off(events, this);\n \t\t\t}, this);\n \t\t}\n\n \t\tthis.onAdd(map);\n\n \t\tif (this.getAttribution && map.attributionControl) {\n \t\t\tmap.attributionControl.addAttribution(this.getAttribution());\n \t\t}\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 `L.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 [`addEventListener`](#evented-addeventlistener). 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 */\n Map.include({\n \t// @method addLayer(layer: Layer): this\n \t// Adds the given layer to the map\n \taddLayer: function (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\tvar 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: function (layer) {\n \t\tvar 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\tif (layer.getAttribution && this.attributionControl) {\n \t\t\tthis.attributionControl.removeAttribution(layer.getAttribution());\n \t\t}\n\n \t\tdelete this._layers[id];\n\n \t\tif (this._loaded) {\n \t\t\tthis.fire('layerremove', {layer: 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: function (layer) {\n \t\treturn !!layer && (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: function (method, context) {\n \t\tfor (var i in this._layers) {\n \t\t\tmethod.call(context, this._layers[i]);\n \t\t}\n \t\treturn this;\n \t},\n\n \t_addLayers: function (layers) {\n \t\tlayers = layers ? (isArray(layers) ? layers : [layers]) : [];\n\n \t\tfor (var i = 0, len = layers.length; i < len; i++) {\n \t\t\tthis.addLayer(layers[i]);\n \t\t}\n \t},\n\n \t_addZoomLimit: function (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: function (layer) {\n \t\tvar 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: function () {\n \t\tvar minZoom = Infinity,\n \t\t maxZoom = -Infinity,\n \t\t oldZoomSpan = this._getZoomSpan();\n\n \t\tfor (var i in this._zoomBoundLayers) {\n \t\t\tvar options = this._zoomBoundLayers[i].options;\n\n \t\t\tminZoom = options.minZoom === undefined ? minZoom : Math.min(minZoom, options.minZoom);\n \t\t\tmaxZoom = options.maxZoom === undefined ? maxZoom : Math.max(maxZoom, options.maxZoom);\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 * @aka L.LayerGroup\r\n * @inherits 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 * L.layerGroup([marker1, marker2])\r\n * \t.addLayer(polyline)\r\n * \t.addTo(map);\r\n * ```\r\n */\r\n\r\n var LayerGroup = Layer.extend({\r\n\r\n \tinitialize: function (layers, options) {\r\n \t\tsetOptions(this, options);\r\n\r\n \t\tthis._layers = {};\r\n\r\n \t\tvar i, len;\r\n\r\n \t\tif (layers) {\r\n \t\t\tfor (i = 0, len = layers.length; i < len; i++) {\r\n \t\t\t\tthis.addLayer(layers[i]);\r\n \t\t\t}\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: function (layer) {\r\n \t\tvar id = this.getLayerId(layer);\r\n\r\n \t\tthis._layers[id] = layer;\r\n\r\n \t\tif (this._map) {\r\n \t\t\tthis._map.addLayer(layer);\r\n \t\t}\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: function (layer) {\r\n \t\tvar 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: function (layer) {\r\n \t\tif (!layer) { return false; }\r\n \t\tvar 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: function () {\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: function (methodName) {\r\n \t\tvar args = Array.prototype.slice.call(arguments, 1),\r\n \t\t i, layer;\r\n\r\n \t\tfor (i in this._layers) {\r\n \t\t\tlayer = this._layers[i];\r\n\r\n \t\t\tif (layer[methodName]) {\r\n \t\t\t\tlayer[methodName].apply(layer, args);\r\n \t\t\t}\r\n \t\t}\r\n\r\n \t\treturn this;\r\n \t},\r\n\r\n \tonAdd: function (map) {\r\n \t\tthis.eachLayer(map.addLayer, map);\r\n \t},\r\n\r\n \tonRemove: function (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(function (layer) {\r\n \t// \tlayer.bindPopup('Hello');\r\n \t// });\r\n \t// ```\r\n \teachLayer: function (method, context) {\r\n \t\tfor (var i in this._layers) {\r\n \t\t\tmethod.call(context, this._layers[i]);\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: function (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: function () {\r\n \t\tvar 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: function (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: function (layer) {\r\n \t\treturn stamp(layer);\r\n \t}\r\n });\r\n\r\n\r\n // @factory L.layerGroup(layers?: Layer[], options?: Object)\r\n // Create a layer group, optionally given an initial set of layers and an `options` object.\r\n var layerGroup = function (layers, options) {\r\n \treturn new LayerGroup(layers, options);\r\n };\n\n /*\r\n * @class FeatureGroup\r\n * @aka L.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 mouse 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 * L.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 var FeatureGroup = LayerGroup.extend({\r\n\r\n \taddLayer: function (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: layer});\r\n \t},\r\n\r\n \tremoveLayer: function (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: 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: function (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: function () {\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: function () {\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: function () {\r\n \t\tvar bounds = new LatLngBounds();\r\n\r\n \t\tfor (var id in this._layers) {\r\n \t\t\tvar layer = this._layers[id];\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 });\r\n\r\n // @factory L.featureGroup(layers?: Layer[], options?: Object)\r\n // Create a feature group, optionally given an initial set of layers and an `options` object.\r\n var featureGroup = function (layers, options) {\r\n \treturn new FeatureGroup(layers, options);\r\n };\n\n /*\r\n * @class Icon\r\n * @aka L.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 * var myIcon = L.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 * L.marker([50.505, 30.57], {icon: myIcon}).addTo(map);\r\n * ```\r\n *\r\n * `L.Icon.Default` extends `L.Icon` and is the blue icon Leaflet uses for markers by default.\r\n *\r\n */\r\n\r\n var Icon = Class.extend({\r\n\r\n \t/* @section\r\n \t * @aka Icon options\r\n \t *\r\n \t * @option iconUrl: String = null\r\n \t * **(required)** The URL to the icon image (absolute or relative to your script path).\r\n \t *\r\n \t * @option iconRetinaUrl: String = null\r\n \t * The URL to a retina sized version of the icon image (absolute or relative to your\r\n \t * script path). Used for Retina screen devices.\r\n \t *\r\n \t * @option iconSize: Point = null\r\n \t * Size of the icon image in pixels.\r\n \t *\r\n \t * @option iconAnchor: Point = null\r\n \t * The coordinates of the \"tip\" of the icon (relative to its top left corner). The icon\r\n \t * will be aligned so that this point is at the marker's geographical location. Centered\r\n \t * by default if size is specified, also can be set in CSS with negative margins.\r\n \t *\r\n \t * @option popupAnchor: Point = [0, 0]\r\n \t * The coordinates of the point from which popups will \"open\", relative to the icon anchor.\r\n \t *\r\n \t * @option tooltipAnchor: Point = [0, 0]\r\n \t * The coordinates of the point from which tooltips will \"open\", relative to the icon anchor.\r\n \t *\r\n \t * @option shadowUrl: String = null\r\n \t * The URL to the icon shadow image. If not specified, no shadow image will be created.\r\n \t *\r\n \t * @option shadowRetinaUrl: String = null\r\n \t *\r\n \t * @option shadowSize: Point = null\r\n \t * Size of the shadow image in pixels.\r\n \t *\r\n \t * @option shadowAnchor: Point = null\r\n \t * The coordinates of the \"tip\" of the shadow (relative to its top left corner) (the same\r\n \t * as iconAnchor if not specified).\r\n \t *\r\n \t * @option className: String = ''\r\n \t * A custom class name to assign to both icon and shadow images. Empty by default.\r\n \t */\r\n\r\n \toptions: {\r\n \t\tpopupAnchor: [0, 0],\r\n \t\ttooltipAnchor: [0, 0]\r\n \t},\r\n\r\n \tinitialize: function (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: function (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: function (oldIcon) {\r\n \t\treturn this._createIcon('shadow', oldIcon);\r\n \t},\r\n\r\n \t_createIcon: function (name, oldIcon) {\r\n \t\tvar 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\tvar img = this._createImg(src, oldIcon && oldIcon.tagName === 'IMG' ? oldIcon : null);\r\n \t\tthis._setIconStyles(img, name);\r\n\r\n \t\treturn img;\r\n \t},\r\n\r\n \t_setIconStyles: function (img, name) {\r\n \t\tvar options = this.options;\r\n \t\tvar 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\tvar size = toPoint(sizeOption),\r\n \t\t anchor = toPoint(name === 'shadow' && options.shadowAnchor || options.iconAnchor ||\r\n \t\t size && size.divideBy(2, true));\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: function (src, el) {\r\n \t\tel = el || document.createElement('img');\r\n \t\tel.src = src;\r\n \t\treturn el;\r\n \t},\r\n\r\n \t_getIconUrl: function (name) {\r\n \t\treturn retina && this.options[name + 'RetinaUrl'] || this.options[name + 'Url'];\r\n \t}\r\n });\r\n\r\n\r\n // @factory L.icon(options: Icon options)\r\n // Creates an icon instance with the given options.\r\n function icon(options) {\r\n \treturn new Icon(options);\r\n }\n\n /*\n * @miniclass Icon.Default (Icon)\n * @aka L.Icon.Default\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 `L.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 * `L.Marker.prototype.options.icon` with your own icon instead.\n */\n\n var IconDefault = Icon.extend({\n\n \toptions: {\n \t\ticonUrl: 'marker-icon.png',\n \t\ticonRetinaUrl: 'marker-icon-2x.png',\n \t\tshadowUrl: 'marker-shadow.png',\n \t\ticonSize: [25, 41],\n \t\ticonAnchor: [12, 41],\n \t\tpopupAnchor: [1, -34],\n \t\ttooltipAnchor: [16, -28],\n \t\tshadowSize: [41, 41]\n \t},\n\n \t_getIconUrl: function (name) {\n \t\tif (!IconDefault.imagePath) {\t// Deprecated, backwards-compatibility only\n \t\t\tIconDefault.imagePath = this._detectIconPath();\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) + Icon.prototype._getIconUrl.call(this, name);\n \t},\n\n \t_detectIconPath: function () {\n \t\tvar el = create$1('div', 'leaflet-default-icon-path', document.body);\n \t\tvar path = getStyle(el, 'background-image') ||\n \t\t getStyle(el, 'backgroundImage');\t// IE8\n\n \t\tdocument.body.removeChild(el);\n\n \t\tif (path === null || path.indexOf('url') !== 0) {\n \t\t\tpath = '';\n \t\t} else {\n \t\t\tpath = path.replace(/^url\\([\"']?/, '').replace(/marker-icon\\.png[\"']?\\)$/, '');\n \t\t}\n\n \t\treturn path;\n \t}\n });\n\n /*\n * L.Handler.MarkerDrag is used internally by L.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 (by both mouse and touch). Only valid when the marker is on the map (Otherwise set [`marker.options.draggable`](#marker-draggable)).\n */\n\n var MarkerDrag = Handler.extend({\n \tinitialize: function (marker) {\n \t\tthis._marker = marker;\n \t},\n\n \taddHooks: function () {\n \t\tvar 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\taddClass(icon, 'leaflet-marker-draggable');\n \t},\n\n \tremoveHooks: function () {\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\tif (this._marker._icon) {\n \t\t\tremoveClass(this._marker._icon, 'leaflet-marker-draggable');\n \t\t}\n \t},\n\n \tmoved: function () {\n \t\treturn this._draggable && this._draggable._moved;\n \t},\n\n \t_adjustPan: function (e) {\n \t\tvar marker = this._marker,\n \t\t map = marker._map,\n \t\t speed = this._marker.options.autoPanSpeed,\n \t\t padding = this._marker.options.autoPanPadding,\n \t\t iconPos = getPosition(marker._icon),\n \t\t bounds = map.getPixelBounds(),\n \t\t origin = map.getPixelOrigin();\n\n \t\tvar panBounds = toBounds(\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\tvar movement = toPoint(\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 = requestAnimFrame(this._adjustPan.bind(this, e));\n \t\t}\n \t},\n\n \t_onDragStart: function () {\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 && this._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: function (e) {\n \t\tif (this._marker.options.autoPan) {\n \t\t\tcancelAnimFrame(this._panRequest);\n \t\t\tthis._panRequest = requestAnimFrame(this._adjustPan.bind(this, e));\n \t\t}\n \t},\n\n \t_onDrag: function (e) {\n \t\tvar marker = this._marker,\n \t\t shadow = marker._shadow,\n \t\t iconPos = getPosition(marker._icon),\n \t\t latlng = 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 .fire('move', e)\n \t\t .fire('drag', e);\n \t},\n\n \t_onDragEnd: function (e) {\n \t\t// @event dragend: DragEndEvent\n \t\t// Fired when the user stops dragging the marker.\n\n \t\t cancelAnimFrame(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 .fire('moveend')\n \t\t .fire('dragend', e);\n \t}\n });\n\n /*\r\n * @class Marker\r\n * @inherits Interactive layer\r\n * @aka L.Marker\r\n * L.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 * L.marker([50.5, 30.5]).addTo(map);\r\n * ```\r\n */\r\n\r\n var Marker = Layer.extend({\r\n\r\n \t// @section\r\n \t// @aka Marker options\r\n \toptions: {\r\n \t\t// @option icon: Icon = *\r\n \t\t// Icon instance to use for rendering the marker.\r\n \t\t// See [Icon documentation](#L.Icon) for details on how to customize the marker icon.\r\n \t\t// If not specified, a common instance of `L.Icon.Default` is used.\r\n \t\ticon: new IconDefault(),\r\n\r\n \t\t// Option inherited from \"Interactive layer\" abstract class\r\n \t\tinteractive: true,\r\n\r\n \t\t// @option keyboard: Boolean = true\r\n \t\t// Whether the marker can be tabbed to with a keyboard and clicked by pressing enter.\r\n \t\tkeyboard: true,\r\n\r\n \t\t// @option title: String = ''\r\n \t\t// Text for the browser tooltip that appear on marker hover (no tooltip by default).\r\n \t\ttitle: '',\r\n\r\n \t\t// @option alt: String = ''\r\n \t\t// Text for the `alt` attribute of the icon image (useful for accessibility).\r\n \t\talt: '',\r\n\r\n \t\t// @option zIndexOffset: Number = 0\r\n \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\tzIndexOffset: 0,\r\n\r\n \t\t// @option opacity: Number = 1.0\r\n \t\t// The opacity of the marker.\r\n \t\topacity: 1,\r\n\r\n \t\t// @option riseOnHover: Boolean = false\r\n \t\t// If `true`, the marker will get on top of others when you hover the mouse over it.\r\n \t\triseOnHover: false,\r\n\r\n \t\t// @option riseOffset: Number = 250\r\n \t\t// The z-index offset used for the `riseOnHover` feature.\r\n \t\triseOffset: 250,\r\n\r\n \t\t// @option pane: String = 'markerPane'\r\n \t\t// `Map pane` where the markers icon will be added.\r\n \t\tpane: 'markerPane',\r\n\r\n \t\t// @option shadowPane: String = 'shadowPane'\r\n \t\t// `Map pane` where the markers shadow will be added.\r\n \t\tshadowPane: 'shadowPane',\r\n\r\n \t\t// @option bubblingMouseEvents: Boolean = false\r\n \t\t// When `true`, a mouse event on this marker will trigger the same event on the map\r\n \t\t// (unless [`L.DomEvent.stopPropagation`](#domevent-stoppropagation) is used).\r\n \t\tbubblingMouseEvents: false,\r\n\r\n \t\t// @section Draggable marker options\r\n \t\t// @option draggable: Boolean = false\r\n \t\t// Whether the marker is draggable with mouse/touch or not.\r\n \t\tdraggable: false,\r\n\r\n \t\t// @option autoPan: Boolean = false\r\n \t\t// Whether to pan the map when dragging this marker near its edge or not.\r\n \t\tautoPan: false,\r\n\r\n \t\t// @option autoPanPadding: Point = Point(50, 50)\r\n \t\t// Distance (in pixels to the left/right and to the top/bottom) of the\r\n \t\t// map edge to start panning the map.\r\n \t\tautoPanPadding: [50, 50],\r\n\r\n \t\t// @option autoPanSpeed: Number = 10\r\n \t\t// Number of pixels the map should pan by.\r\n \t\tautoPanSpeed: 10\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: function (latlng, options) {\r\n \t\tsetOptions(this, options);\r\n \t\tthis._latlng = toLatLng(latlng);\r\n \t},\r\n\r\n \tonAdd: function (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: function (map) {\r\n \t\tif (this.dragging && 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: function () {\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: function () {\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: function (latlng) {\r\n \t\tvar oldLatLng = this._latlng;\r\n \t\tthis._latlng = toLatLng(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: 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: function (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: function () {\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: function (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 \tgetElement: function () {\r\n \t\treturn this._icon;\r\n \t},\r\n\r\n \tupdate: function () {\r\n\r\n \t\tif (this._icon && this._map) {\r\n \t\t\tvar 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: function () {\r\n \t\tvar options = this.options,\r\n \t\t classToAdd = 'leaflet-zoom-' + (this._zoomAnimated ? 'animated' : 'hide');\r\n\r\n \t\tvar icon = options.icon.createIcon(this._icon),\r\n \t\t 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\taddClass(icon, classToAdd);\r\n\r\n \t\tif (options.keyboard) {\r\n \t\t\ticon.tabIndex = '0';\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\tmouseover: this._bringToFront,\r\n \t\t\t\tmouseout: this._resetZIndex\r\n \t\t\t});\r\n \t\t}\r\n\r\n \t\tvar newShadow = options.icon.createShadow(this._shadow),\r\n \t\t 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\taddClass(newShadow, 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: function () {\r\n \t\tif (this.options.riseOnHover) {\r\n \t\t\tthis.off({\r\n \t\t\t\tmouseover: this._bringToFront,\r\n \t\t\t\tmouseout: this._resetZIndex\r\n \t\t\t});\r\n \t\t}\r\n\r\n \t\tremove(this._icon);\r\n \t\tthis.removeInteractiveTarget(this._icon);\r\n\r\n \t\tthis._icon = null;\r\n \t},\r\n\r\n \t_removeShadow: function () {\r\n \t\tif (this._shadow) {\r\n \t\t\tremove(this._shadow);\r\n \t\t}\r\n \t\tthis._shadow = null;\r\n \t},\r\n\r\n \t_setPos: function (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: function (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: function (opt) {\r\n \t\tvar 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: function () {\r\n\r\n \t\tif (!this.options.interactive) { return; }\r\n\r\n \t\taddClass(this._icon, 'leaflet-interactive');\r\n\r\n \t\tthis.addInteractiveTarget(this._icon);\r\n\r\n \t\tif (MarkerDrag) {\r\n \t\t\tvar 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: function (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: function () {\r\n \t\tvar opacity = this.options.opacity;\r\n\r\n \t\tif (this._icon) {\r\n \t\t\tsetOpacity(this._icon, opacity);\r\n \t\t}\r\n\r\n \t\tif (this._shadow) {\r\n \t\t\tsetOpacity(this._shadow, opacity);\r\n \t\t}\r\n \t},\r\n\r\n \t_bringToFront: function () {\r\n \t\tthis._updateZIndex(this.options.riseOffset);\r\n \t},\r\n\r\n \t_resetZIndex: function () {\r\n \t\tthis._updateZIndex(0);\r\n \t},\r\n\r\n \t_getPopupAnchor: function () {\r\n \t\treturn this.options.icon.options.popupAnchor;\r\n \t},\r\n\r\n \t_getTooltipAnchor: function () {\r\n \t\treturn this.options.icon.options.tooltipAnchor;\r\n \t}\r\n });\r\n\r\n\r\n // factory L.marker(latlng: LatLng, options? : Marker options)\r\n\r\n // @factory L.marker(latlng: LatLng, options? : Marker options)\r\n // Instantiates a Marker object given a geographical point and optionally an options object.\r\n function marker(latlng, options) {\r\n \treturn new Marker(latlng, options);\r\n }\n\n /*\n * @class Path\n * @aka L.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\n var Path = Layer.extend({\n\n \t// @section\n \t// @aka Path options\n \toptions: {\n \t\t// @option stroke: Boolean = true\n \t\t// Whether to draw stroke along the path. Set it to `false` to disable borders on polygons or circles.\n \t\tstroke: true,\n\n \t\t// @option color: String = '#3388ff'\n \t\t// Stroke color\n \t\tcolor: '#3388ff',\n\n \t\t// @option weight: Number = 3\n \t\t// Stroke width in pixels\n \t\tweight: 3,\n\n \t\t// @option opacity: Number = 1.0\n \t\t// Stroke opacity\n \t\topacity: 1,\n\n \t\t// @option lineCap: String= 'round'\n \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\tlineCap: 'round',\n\n \t\t// @option lineJoin: String = 'round'\n \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\tlineJoin: 'round',\n\n \t\t// @option dashArray: String = null\n \t\t// A string that defines the stroke [dash pattern](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-dasharray). Doesn't work on `Canvas`-powered layers in [some old browsers](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setLineDash#Browser_compatibility).\n \t\tdashArray: null,\n\n \t\t// @option dashOffset: String = null\n \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). Doesn't work on `Canvas`-powered layers in [some old browsers](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setLineDash#Browser_compatibility).\n \t\tdashOffset: null,\n\n \t\t// @option fill: Boolean = depends\n \t\t// Whether to fill the path with color. Set it to `false` to disable filling on polygons or circles.\n \t\tfill: false,\n\n \t\t// @option fillColor: String = *\n \t\t// Fill color. Defaults to the value of the [`color`](#path-color) option\n \t\tfillColor: null,\n\n \t\t// @option fillOpacity: Number = 0.2\n \t\t// Fill opacity.\n \t\tfillOpacity: 0.2,\n\n \t\t// @option fillRule: String = 'evenodd'\n \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\tfillRule: 'evenodd',\n\n \t\t// className: '',\n\n \t\t// Option inherited from \"Interactive layer\" abstract class\n \t\tinteractive: true,\n\n \t\t// @option bubblingMouseEvents: Boolean = true\n \t\t// When `true`, a mouse event on this path will trigger the same event on the map\n \t\t// (unless [`L.DomEvent.stopPropagation`](#domevent-stoppropagation) is used).\n \t\tbubblingMouseEvents: true\n \t},\n\n \tbeforeAdd: function (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: function () {\n \t\tthis._renderer._initPath(this);\n \t\tthis._reset();\n \t\tthis._renderer._addPath(this);\n \t},\n\n \tonRemove: function () {\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: function () {\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: function (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.prototype.hasOwnProperty.call(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: function () {\n \t\tif (this._renderer) {\n \t\t\tthis._renderer._bringToFront(this);\n \t\t}\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: function () {\n \t\tif (this._renderer) {\n \t\t\tthis._renderer._bringToBack(this);\n \t\t}\n \t\treturn this;\n \t},\n\n \tgetElement: function () {\n \t\treturn this._path;\n \t},\n\n \t_reset: function () {\n \t\t// defined in child classes\n \t\tthis._project();\n \t\tthis._update();\n \t},\n\n \t_clickTolerance: function () {\n \t\t// used when doing hit detection for Canvas layers\n \t\treturn (this.options.stroke ? this.options.weight / 2 : 0) + this._renderer.options.tolerance;\n \t}\n });\n\n /*\n * @class CircleMarker\n * @aka L.CircleMarker\n * @inherits Path\n *\n * A circle of a fixed size with radius specified in pixels. Extends `Path`.\n */\n\n var CircleMarker = Path.extend({\n\n \t// @section\n \t// @aka CircleMarker options\n \toptions: {\n \t\tfill: true,\n\n \t\t// @option radius: Number = 10\n \t\t// Radius of the circle marker, in pixels\n \t\tradius: 10\n \t},\n\n \tinitialize: function (latlng, options) {\n \t\tsetOptions(this, options);\n \t\tthis._latlng = toLatLng(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: function (latlng) {\n \t\tvar oldLatLng = this._latlng;\n \t\tthis._latlng = toLatLng(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: 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: function () {\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: function (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: function () {\n \t\treturn this._radius;\n \t},\n\n \tsetStyle : function (options) {\n \t\tvar radius = options && 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: function () {\n \t\tthis._point = this._map.latLngToLayerPoint(this._latlng);\n \t\tthis._updateBounds();\n \t},\n\n \t_updateBounds: function () {\n \t\tvar r = this._radius,\n \t\t r2 = this._radiusY || r,\n \t\t w = this._clickTolerance(),\n \t\t p = [r + w, r2 + w];\n \t\tthis._pxBounds = new Bounds(this._point.subtract(p), this._point.add(p));\n \t},\n\n \t_update: function () {\n \t\tif (this._map) {\n \t\t\tthis._updatePath();\n \t\t}\n \t},\n\n \t_updatePath: function () {\n \t\tthis._renderer._updateCircle(this);\n \t},\n\n \t_empty: function () {\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: function (p) {\n \t\treturn p.distanceTo(this._point) <= this._radius + this._clickTolerance();\n \t}\n });\n\n\n // @factory L.circleMarker(latlng: LatLng, options?: CircleMarker options)\n // Instantiates a circle marker object given a geographical point, and an optional options object.\n function circleMarker(latlng, options) {\n \treturn new CircleMarker(latlng, options);\n }\n\n /*\n * @class Circle\n * @aka L.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 * L.circle([50.5, 30.5], {radius: 200}).addTo(map);\n * ```\n */\n\n var Circle = CircleMarker.extend({\n\n \tinitialize: function (latlng, options, legacyOptions) {\n \t\tif (typeof options === 'number') {\n \t\t\t// Backwards compatibility with 0.7.x factory (latlng, radius, options?)\n \t\t\toptions = extend({}, legacyOptions, {radius: options});\n \t\t}\n \t\tsetOptions(this, options);\n \t\tthis._latlng = toLatLng(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: function (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: function () {\n \t\treturn this._mRadius;\n \t},\n\n \t// @method getBounds(): LatLngBounds\n \t// Returns the `LatLngBounds` of the path.\n \tgetBounds: function () {\n \t\tvar 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: function () {\n\n \t\tvar lng = this._latlng.lng,\n \t\t lat = this._latlng.lat,\n \t\t map = this._map,\n \t\t crs = map.options.crs;\n\n \t\tif (crs.distance === Earth.distance) {\n \t\t\tvar d = Math.PI / 180,\n \t\t\t latR = (this._mRadius / Earth.R) / d,\n \t\t\t top = map.project([lat + latR, lng]),\n \t\t\t bottom = map.project([lat - latR, lng]),\n \t\t\t p = top.add(bottom).divideBy(2),\n \t\t\t lat2 = map.unproject(p).lat,\n \t\t\t 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\tvar 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 = this._point.x - map.latLngToLayerPoint(latlng2).x;\n \t\t}\n\n \t\tthis._updateBounds();\n \t}\n });\n\n // @factory L.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.\n // @alternative\n // @factory L.circle(latlng: LatLng, radius: Number, options?: Circle options)\n // Obsolete way of instantiating a circle, for compatibility with 0.7.x code.\n // Do not use in new applications or plugins.\n function circle(latlng, options, legacyOptions) {\n \treturn new Circle(latlng, options, legacyOptions);\n }\n\n /*\n * @class Polyline\n * @aka L.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 * var latlngs = [\n * \t[45.51, -122.68],\n * \t[37.77, -122.43],\n * \t[34.04, -118.2]\n * ];\n *\n * var polyline = L.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 * var 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\n var Polyline = Path.extend({\n\n \t// @section\n \t// @aka Polyline options\n \toptions: {\n \t\t// @option smoothFactor: Number = 1.0\n \t\t// How much to simplify the polyline on each zoom level. More means\n \t\t// better performance and smoother look, and less means more accurate representation.\n \t\tsmoothFactor: 1.0,\n\n \t\t// @option noClip: Boolean = false\n \t\t// Disable polyline clipping.\n \t\tnoClip: false\n \t},\n\n \tinitialize: function (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: function () {\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: function (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: function () {\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: function (p) {\n \t\tvar minDistance = Infinity,\n \t\t minPoint = null,\n \t\t closest = _sqClosestPointOnSegment,\n \t\t p1, p2;\n\n \t\tfor (var j = 0, jLen = this._parts.length; j < jLen; j++) {\n \t\t\tvar points = this._parts[j];\n\n \t\t\tfor (var 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\tvar 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](http://en.wikipedia.org/wiki/Centroid)) of the polyline.\n \tgetCenter: function () {\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\n \t\tvar i, halfDist, segDist, dist, p1, p2, ratio,\n \t\t points = this._rings[0],\n \t\t len = points.length;\n\n \t\tif (!len) { return null; }\n\n \t\t// polyline centroid algorithm; only uses the first ring if there are multiple\n\n \t\tfor (i = 0, halfDist = 0; i < len - 1; i++) {\n \t\t\thalfDist += points[i].distanceTo(points[i + 1]) / 2;\n \t\t}\n\n \t\t// The line is so small in the current view that all points are on the same pixel.\n \t\tif (halfDist === 0) {\n \t\t\treturn this._map.layerPointToLatLng(points[0]);\n \t\t}\n\n \t\tfor (i = 0, dist = 0; i < len - 1; i++) {\n \t\t\tp1 = points[i];\n \t\t\tp2 = points[i + 1];\n \t\t\tsegDist = p1.distanceTo(p2);\n \t\t\tdist += segDist;\n\n \t\t\tif (dist > halfDist) {\n \t\t\t\tratio = (dist - halfDist) / segDist;\n \t\t\t\treturn this._map.layerPointToLatLng([\n \t\t\t\t\tp2.x - ratio * (p2.x - p1.x),\n \t\t\t\t\tp2.y - ratio * (p2.y - p1.y)\n \t\t\t\t]);\n \t\t\t}\n \t\t}\n \t},\n\n \t// @method getBounds(): LatLngBounds\n \t// Returns the `LatLngBounds` of the path.\n \tgetBounds: function () {\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: function (latlng, latlngs) {\n \t\tlatlngs = latlngs || this._defaultShape();\n \t\tlatlng = toLatLng(latlng);\n \t\tlatlngs.push(latlng);\n \t\tthis._bounds.extend(latlng);\n \t\treturn this.redraw();\n \t},\n\n \t_setLatLngs: function (latlngs) {\n \t\tthis._bounds = new LatLngBounds();\n \t\tthis._latlngs = this._convertLatLngs(latlngs);\n \t},\n\n \t_defaultShape: function () {\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: function (latlngs) {\n \t\tvar result = [],\n \t\t flat = isFlat(latlngs);\n\n \t\tfor (var i = 0, len = latlngs.length; i < len; i++) {\n \t\t\tif (flat) {\n \t\t\t\tresult[i] = toLatLng(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: function () {\n \t\tvar 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: function () {\n \t\tvar w = this._clickTolerance(),\n \t\t p = new Point(w, w);\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: function (latlngs, result, projectedBounds) {\n \t\tvar flat = latlngs[0] instanceof LatLng,\n \t\t len = latlngs.length,\n \t\t i, ring;\n\n \t\tif (flat) {\n \t\t\tring = [];\n \t\t\tfor (i = 0; i < len; i++) {\n \t\t\t\tring[i] = this._map.latLngToLayerPoint(latlngs[i]);\n \t\t\t\tprojectedBounds.extend(ring[i]);\n \t\t\t}\n \t\t\tresult.push(ring);\n \t\t} else {\n \t\t\tfor (i = 0; i < len; i++) {\n \t\t\t\tthis._projectLatlngs(latlngs[i], result, projectedBounds);\n \t\t\t}\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: function () {\n \t\tvar 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\tvar parts = this._parts,\n \t\t 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] = parts[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: function () {\n \t\tvar parts = this._parts,\n \t\t tolerance = this.options.smoothFactor;\n\n \t\tfor (var 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: function () {\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: function () {\n \t\tthis._renderer._updatePoly(this);\n \t},\n\n \t// Needed by the `Canvas` renderer for interactivity\n \t_containsPoint: function (p, closed) {\n \t\tvar i, j, k, len, len2, part,\n \t\t 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 // @factory L.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.\n function polyline(latlngs, options) {\n \treturn new Polyline(latlngs, options);\n }\n\n // Retrocompat. Allow plugins to support Leaflet versions before and after 1.1.\n Polyline._flat = _flat;\n\n /*\n * @class Polygon\n * @aka L.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 * var latlngs = [[37, -109.05],[41, -109.03],[41, -102.05],[37, -102.04]];\n *\n * var polygon = L.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 * var 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 * var 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 var Polygon = Polyline.extend({\n\n \toptions: {\n \t\tfill: true\n \t},\n\n \tisEmpty: function () {\n \t\treturn !this._latlngs.length || !this._latlngs[0].length;\n \t},\n\n \tgetCenter: function () {\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\n \t\tvar i, j, p1, p2, f, area, x, y, center,\n \t\t points = this._rings[0],\n \t\t len = points.length;\n\n \t\tif (!len) { return null; }\n\n \t\t// polygon centroid algorithm; only uses the first ring if there are multiple\n\n \t\tarea = x = y = 0;\n\n \t\tfor (i = 0, j = len - 1; i < len; j = i++) {\n \t\t\tp1 = points[i];\n \t\t\tp2 = points[j];\n\n \t\t\tf = p1.y * p2.x - p2.y * p1.x;\n \t\t\tx += (p1.x + p2.x) * f;\n \t\t\ty += (p1.y + p2.y) * f;\n \t\t\tarea += f * 3;\n \t\t}\n\n \t\tif (area === 0) {\n \t\t\t// Polygon is so small that all points are on same pixel.\n \t\t\tcenter = points[0];\n \t\t} else {\n \t\t\tcenter = [x / area, y / area];\n \t\t}\n \t\treturn this._map.layerPointToLatLng(center);\n \t},\n\n \t_convertLatLngs: function (latlngs) {\n \t\tvar result = Polyline.prototype._convertLatLngs.call(this, latlngs),\n \t\t len = 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: function (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: function () {\n \t\treturn isFlat(this._latlngs[0]) ? this._latlngs[0] : this._latlngs[0][0];\n \t},\n\n \t_clipPoints: function () {\n \t\t// polygons need a different clipping algorithm so we redefine that\n\n \t\tvar bounds = this._renderer._bounds,\n \t\t w = this.options.weight,\n \t\t p = 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 (var i = 0, len = this._rings.length, clipped; i < len; i++) {\n \t\t\tclipped = clipPolygon(this._rings[i], 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: function () {\n \t\tthis._renderer._updatePoly(this, true);\n \t},\n\n \t// Needed by the `Canvas` renderer for interactivity\n \t_containsPoint: function (p) {\n \t\tvar inside = false,\n \t\t part, 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\n // @factory L.polygon(latlngs: LatLng[], options?: Polyline options)\n function polygon(latlngs, options) {\n \treturn new Polygon(latlngs, options);\n }\n\n /*\r\n * @class GeoJSON\r\n * @aka L.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 * L.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 var GeoJSON = FeatureGroup.extend({\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 L.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: function (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: function (geojson) {\r\n \t\tvar features = isArray(geojson) ? geojson : geojson.features,\r\n \t\t i, len, feature;\r\n\r\n \t\tif (features) {\r\n \t\t\tfor (i = 0, len = features.length; i < len; i++) {\r\n \t\t\t\t// only add this if geometry or geometries are set and not null\r\n \t\t\t\tfeature = features[i];\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\tvar options = this.options;\r\n\r\n \t\tif (options.filter && !options.filter(geojson)) { return this; }\r\n\r\n \t\tvar 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: function (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 = extend({}, 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: function (style) {\r\n \t\treturn this.eachLayer(function (layer) {\r\n \t\t\tthis._setLayerStyle(layer, style);\r\n \t\t}, this);\r\n \t},\r\n\r\n \t_setLayerStyle: function (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 L.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\n function geometryToLayer(geojson, options) {\r\n\r\n \tvar geometry = geojson.type === 'Feature' ? geojson.geometry : geojson,\r\n \t coords = geometry ? geometry.coordinates : null,\r\n \t layers = [],\r\n \t pointToLayer = options && options.pointToLayer,\r\n \t _coordsToLatLng = options && options.coordsToLatLng || coordsToLatLng,\r\n \t latlng, latlngs, i, len;\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 (i = 0, len = coords.length; i < len; i++) {\r\n \t\t\tlatlng = _coordsToLatLng(coords[i]);\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 (i = 0, len = geometry.geometries.length; i < len; i++) {\r\n \t\t\tvar layer = geometryToLayer({\r\n \t\t\t\tgeometry: geometry.geometries[i],\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 (layer) {\r\n \t\t\t\tlayers.push(layer);\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\n function _pointToLayer(pointToLayerFn, geojson, latlng, options) {\r\n \treturn pointToLayerFn ?\r\n \t\tpointToLayerFn(geojson, latlng) :\r\n \t\tnew Marker(latlng, options && 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\n function 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\n function coordsToLatLngs(coords, levelsDeep, _coordsToLatLng) {\r\n \tvar latlngs = [];\r\n\r\n \tfor (var i = 0, len = coords.length, latlng; i < len; i++) {\r\n \t\tlatlng = levelsDeep ?\r\n \t\t\tcoordsToLatLngs(coords[i], levelsDeep - 1, _coordsToLatLng) :\r\n \t\t\t(_coordsToLatLng || coordsToLatLng)(coords[i]);\r\n\r\n \t\tlatlngs.push(latlng);\r\n \t}\r\n\r\n \treturn latlngs;\r\n }\r\n\r\n // @function latLngToCoords(latlng: LatLng, precision?: Number): Array\r\n // Reverse of [`coordsToLatLng`](#geojson-coordstolatlng)\r\n function latLngToCoords(latlng, precision) {\r\n \tprecision = typeof precision === 'number' ? precision : 6;\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, closed?: Boolean): Array\r\n // Reverse of [`coordsToLatLngs`](#geojson-coordstolatlngs)\r\n // `closed` 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 function latLngsToCoords(latlngs, levelsDeep, closed, precision) {\r\n \tvar coords = [];\r\n\r\n \tfor (var i = 0, len = latlngs.length; i < len; i++) {\r\n \t\tcoords.push(levelsDeep ?\r\n \t\t\tlatLngsToCoords(latlngs[i], levelsDeep - 1, closed, precision) :\r\n \t\t\tlatLngToCoords(latlngs[i], precision));\r\n \t}\r\n\r\n \tif (!levelsDeep && closed) {\r\n \t\tcoords.push(coords[0]);\r\n \t}\r\n\r\n \treturn coords;\r\n }\r\n\r\n function getFeature(layer, newGeometry) {\r\n \treturn layer.feature ?\r\n \t\textend({}, 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\n function 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\n var PointToGeoJSON = {\r\n \ttoGeoJSON: function (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): Object\r\n // `precision` is the number of decimal places for coordinates.\r\n // The default value is 6 places.\r\n // Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the marker (as a GeoJSON `Point` Feature).\r\n Marker.include(PointToGeoJSON);\r\n\r\n // @namespace CircleMarker\r\n // @method toGeoJSON(precision?: Number): Object\r\n // `precision` is the number of decimal places for coordinates.\r\n // The default value is 6 places.\r\n // Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the circle marker (as a GeoJSON `Point` Feature).\r\n Circle.include(PointToGeoJSON);\r\n CircleMarker.include(PointToGeoJSON);\r\n\r\n\r\n // @namespace Polyline\r\n // @method toGeoJSON(precision?: Number): Object\r\n // `precision` is the number of decimal places for coordinates.\r\n // The default value is 6 places.\r\n // Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the polyline (as a GeoJSON `LineString` or `MultiLineString` Feature).\r\n Polyline.include({\r\n \ttoGeoJSON: function (precision) {\r\n \t\tvar multi = !isFlat(this._latlngs);\r\n\r\n \t\tvar 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): Object\r\n // `precision` is the number of decimal places for coordinates.\r\n // The default value is 6 places.\r\n // Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the polygon (as a GeoJSON `Polygon` or `MultiPolygon` Feature).\r\n Polygon.include({\r\n \ttoGeoJSON: function (precision) {\r\n \t\tvar holes = !isFlat(this._latlngs),\r\n \t\t multi = holes && !isFlat(this._latlngs[0]);\r\n\r\n \t\tvar 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\n LayerGroup.include({\r\n \ttoMultiPoint: function (precision) {\r\n \t\tvar coords = [];\r\n\r\n \t\tthis.eachLayer(function (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): Object\r\n \t// `precision` is the number of decimal places for coordinates.\r\n \t// The default value is 6 places.\r\n \t// Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the layer group (as a GeoJSON `FeatureCollection`, `GeometryCollection`, or `MultiPoint`).\r\n \ttoGeoJSON: function (precision) {\r\n\r\n \t\tvar type = this.feature && this.feature.geometry && 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\tvar isGeometryCollection = type === 'GeometryCollection',\r\n \t\t jsons = [];\r\n\r\n \t\tthis.eachLayer(function (layer) {\r\n \t\t\tif (layer.toGeoJSON) {\r\n \t\t\t\tvar 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\tvar 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 });\r\n\r\n // @namespace GeoJSON\r\n // @factory L.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\n function geoJSON(geojson, options) {\r\n \treturn new GeoJSON(geojson, options);\r\n }\r\n\r\n // Backward compatibility.\r\n var geoJson = geoJSON;\n\n /*\r\n * @class ImageOverlay\r\n * @aka L.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 * var imageUrl = 'http://www.lib.utexas.edu/maps/historical/newark_nj_1922.jpg',\r\n * \timageBounds = [[40.712216, -74.22655], [40.773941, -74.12544]];\r\n * L.imageOverlay(imageUrl, imageBounds).addTo(map);\r\n * ```\r\n */\r\n\r\n var ImageOverlay = Layer.extend({\r\n\r\n \t// @section\r\n \t// @aka ImageOverlay options\r\n \toptions: {\r\n \t\t// @option opacity: Number = 1.0\r\n \t\t// The opacity of the image overlay.\r\n \t\topacity: 1,\r\n\r\n \t\t// @option alt: String = ''\r\n \t\t// Text for the `alt` attribute of the image (useful for accessibility).\r\n \t\talt: '',\r\n\r\n \t\t// @option interactive: Boolean = false\r\n \t\t// If `true`, the image overlay will emit [mouse events](#interactive-layer) when clicked or hovered.\r\n \t\tinteractive: false,\r\n\r\n \t\t// @option crossOrigin: Boolean|String = false\r\n \t\t// Whether the crossOrigin attribute will be added to the image.\r\n \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// Refer to [CORS Settings](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for valid String values.\r\n \t\tcrossOrigin: false,\r\n\r\n \t\t// @option errorOverlayUrl: String = ''\r\n \t\t// URL to the overlay image to show in place of the overlay that failed to load.\r\n \t\terrorOverlayUrl: '',\r\n\r\n \t\t// @option zIndex: Number = 1\r\n \t\t// The explicit [zIndex](https://developer.mozilla.org/docs/Web/CSS/CSS_Positioning/Understanding_z_index) of the overlay layer.\r\n \t\tzIndex: 1,\r\n\r\n \t\t// @option className: String = ''\r\n \t\t// A custom class name to assign to the image. Empty by default.\r\n \t\tclassName: ''\r\n \t},\r\n\r\n \tinitialize: function (url, bounds, options) { // (String, LatLngBounds, Object)\r\n \t\tthis._url = url;\r\n \t\tthis._bounds = toLatLngBounds(bounds);\r\n\r\n \t\tsetOptions(this, options);\r\n \t},\r\n\r\n \tonAdd: function () {\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\taddClass(this._image, '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: function () {\r\n \t\tremove(this._image);\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: function (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: function (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: function () {\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: function () {\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: function (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: function (bounds) {\r\n \t\tthis._bounds = toLatLngBounds(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: function () {\r\n \t\tvar 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: function (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: function () {\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: function () {\r\n \t\treturn this._image;\r\n \t},\r\n\r\n \t_initImage: function () {\r\n \t\tvar wasElementSupplied = this._url.tagName === 'IMG';\r\n \t\tvar img = this._image = wasElementSupplied ? this._url : create$1('img');\r\n\r\n \t\taddClass(img, 'leaflet-image-layer');\r\n \t\tif (this._zoomAnimated) { addClass(img, 'leaflet-zoom-animated'); }\r\n \t\tif (this.options.className) { addClass(img, this.options.className); }\r\n\r\n \t\timg.onselectstart = falseFn;\r\n \t\timg.onmousemove = 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 = bind(this.fire, this, 'load');\r\n \t\timg.onerror = bind(this._overlayOnError, this, 'error');\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\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: function (e) {\r\n \t\tvar scale = this._map.getZoomScale(e.zoom),\r\n \t\t offset = 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: function () {\r\n \t\tvar image = this._image,\r\n \t\t bounds = new Bounds(\r\n \t\t this._map.latLngToLayerPoint(this._bounds.getNorthWest()),\r\n \t\t this._map.latLngToLayerPoint(this._bounds.getSouthEast())),\r\n \t\t size = 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: function () {\r\n \t\tsetOpacity(this._image, this.options.opacity);\r\n \t},\r\n\r\n \t_updateZIndex: function () {\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: function () {\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\tvar 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\r\n // @factory L.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\n var imageOverlay = function (url, bounds, options) {\r\n \treturn new ImageOverlay(url, bounds, options);\r\n };\n\n /*\r\n * @class VideoOverlay\r\n * @aka L.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 * HTML5 element.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var videoUrl = 'https://www.mapbox.com/bites/00188/patricia_nasa.webm',\r\n * \tvideoBounds = [[ 32, -130], [ 13, -100]];\r\n * L.videoOverlay(videoUrl, videoBounds ).addTo(map);\r\n * ```\r\n */\r\n\r\n var VideoOverlay = ImageOverlay.extend({\r\n\r\n \t// @section\r\n \t// @aka VideoOverlay options\r\n \toptions: {\r\n \t\t// @option autoplay: Boolean = true\r\n \t\t// Whether the video starts playing automatically when loaded.\r\n \t\tautoplay: true,\r\n\r\n \t\t// @option loop: Boolean = true\r\n \t\t// Whether the video will loop back to the beginning when played.\r\n \t\tloop: true,\r\n\r\n \t\t// @option keepAspectRatio: Boolean = true\r\n \t\t// Whether the video will save aspect ratio after the projection.\r\n \t\t// Relevant for supported browsers. Browser compatibility- https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit\r\n \t\tkeepAspectRatio: true,\r\n\r\n \t\t// @option muted: Boolean = false\r\n \t\t// Whether the video starts on mute when loaded.\r\n \t\tmuted: false\r\n \t},\r\n\r\n \t_initImage: function () {\r\n \t\tvar wasElementSupplied = this._url.tagName === 'VIDEO';\r\n \t\tvar vid = this._image = wasElementSupplied ? this._url : create$1('video');\r\n\r\n \t\taddClass(vid, 'leaflet-image-layer');\r\n \t\tif (this._zoomAnimated) { addClass(vid, 'leaflet-zoom-animated'); }\r\n \t\tif (this.options.className) { addClass(vid, this.options.className); }\r\n\r\n \t\tvid.onselectstart = falseFn;\r\n \t\tvid.onmousemove = falseFn;\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 = bind(this.fire, this, 'load');\r\n\r\n \t\tif (wasElementSupplied) {\r\n \t\t\tvar sourceElements = vid.getElementsByTagName('source');\r\n \t\t\tvar sources = [];\r\n \t\t\tfor (var j = 0; j < sourceElements.length; j++) {\r\n \t\t\t\tsources.push(sourceElements[j].src);\r\n \t\t\t}\r\n\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 (!isArray(this._url)) { this._url = [this._url]; }\r\n\r\n \t\tif (!this.options.keepAspectRatio && Object.prototype.hasOwnProperty.call(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.loop = !!this.options.loop;\r\n \t\tvid.muted = !!this.options.muted;\r\n \t\tfor (var i = 0; i < this._url.length; i++) {\r\n \t\t\tvar source = create$1('source');\r\n \t\t\tsource.src = this._url[i];\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 });\r\n\r\n\r\n // @factory L.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\n\r\n function videoOverlay(video, bounds, options) {\r\n \treturn new VideoOverlay(video, bounds, options);\r\n }\n\n /*\n * @class SVGOverlay\n * @aka L.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 * var 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 * var svgElementBounds = [ [ 32, -130 ], [ 13, -100 ] ];\n * L.svgOverlay(svgElement, svgElementBounds).addTo(map);\n * ```\n */\n\n var SVGOverlay = ImageOverlay.extend({\n \t_initImage: function () {\n \t\tvar el = this._image = this._url;\n\n \t\taddClass(el, 'leaflet-image-layer');\n \t\tif (this._zoomAnimated) { addClass(el, 'leaflet-zoom-animated'); }\n \t\tif (this.options.className) { addClass(el, this.options.className); }\n\n \t\tel.onselectstart = falseFn;\n \t\tel.onmousemove = 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\n // @factory L.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.\n\n function svgOverlay(el, bounds, options) {\n \treturn new SVGOverlay(el, bounds, options);\n }\n\n /*\r\n * @class DivOverlay\r\n * @inherits Layer\r\n * @aka L.DivOverlay\r\n * Base model for L.Popup and L.Tooltip. Inherit from it for custom popup like plugins.\r\n */\r\n\r\n // @namespace DivOverlay\r\n var DivOverlay = Layer.extend({\r\n\r\n \t// @section\r\n \t// @aka DivOverlay options\r\n \toptions: {\r\n \t\t// @option offset: Point = Point(0, 7)\r\n \t\t// The offset of the popup position. Useful to control the anchor\r\n \t\t// of the popup when opening it on some overlays.\r\n \t\toffset: [0, 7],\r\n\r\n \t\t// @option className: String = ''\r\n \t\t// A custom CSS class name to assign to the popup.\r\n \t\tclassName: '',\r\n\r\n \t\t// @option pane: String = 'popupPane'\r\n \t\t// `Map pane` where the popup will be added.\r\n \t\tpane: 'popupPane'\r\n \t},\r\n\r\n \tinitialize: function (options, source) {\r\n \t\tsetOptions(this, options);\r\n\r\n \t\tthis._source = source;\r\n \t},\r\n\r\n \tonAdd: function (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\tsetOpacity(this._container, 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\tsetOpacity(this._container, 1);\r\n \t\t}\r\n\r\n \t\tthis.bringToFront();\r\n \t},\r\n\r\n \tonRemove: function (map) {\r\n \t\tif (map._fadeAnimated) {\r\n \t\t\tsetOpacity(this._container, 0);\r\n \t\t\tthis._removeTimeout = setTimeout(bind(remove, undefined, this._container), 200);\r\n \t\t} else {\r\n \t\t\tremove(this._container);\r\n \t\t}\r\n \t},\r\n\r\n \t// @namespace Popup\r\n \t// @method getLatLng: LatLng\r\n \t// Returns the geographical point of popup.\r\n \tgetLatLng: function () {\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 popup will open.\r\n \tsetLatLng: function (latlng) {\r\n \t\tthis._latlng = toLatLng(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\r\n \t// Returns the content of the popup.\r\n \tgetContent: function () {\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 popup. If a function is passed the source layer will be passed to the function. The function should return a `String` or `HTMLElement` to be used in the popup.\r\n \tsetContent: function (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: String|HTMLElement\r\n \t// Returns the HTML container of the popup.\r\n \tgetElement: function () {\r\n \t\treturn this._container;\r\n \t},\r\n\r\n \t// @method update: null\r\n \t// Updates the popup content, layout and position. Useful for updating the popup after something inside changed, e.g. image loaded.\r\n \tupdate: function () {\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: function () {\r\n \t\tvar 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 popup is visible on the map.\r\n \tisOpen: function () {\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 popup in front of other popups (in the same map pane).\r\n \tbringToFront: function () {\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 popup to the back of other popups (in the same map pane).\r\n \tbringToBack: function () {\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_prepareOpen: function (parent, layer, latlng) {\r\n \t\tif (!(layer instanceof Layer)) {\r\n \t\t\tlatlng = layer;\r\n \t\t\tlayer = parent;\r\n \t\t}\r\n\r\n \t\tif (layer instanceof FeatureGroup) {\r\n \t\t\tfor (var id in parent._layers) {\r\n \t\t\t\tlayer = parent._layers[id];\r\n \t\t\t\tbreak;\r\n \t\t\t}\r\n \t\t}\r\n\r\n \t\tif (!latlng) {\r\n \t\t\tif (layer.getCenter) {\r\n \t\t\t\tlatlng = layer.getCenter();\r\n \t\t\t} else if (layer.getLatLng) {\r\n \t\t\t\tlatlng = layer.getLatLng();\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\r\n \t\t// set overlay source to this layer\r\n \t\tthis._source = layer;\r\n\r\n \t\t// update the overlay (content, layout, ect...)\r\n \t\tthis.update();\r\n\r\n \t\treturn latlng;\r\n \t},\r\n\r\n \t_updateContent: function () {\r\n \t\tif (!this._content) { return; }\r\n\r\n \t\tvar node = this._contentNode;\r\n \t\tvar 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 \t\tthis.fire('contentupdate');\r\n \t},\r\n\r\n \t_updatePosition: function () {\r\n \t\tif (!this._map) { return; }\r\n\r\n \t\tvar pos = this._map.latLngToLayerPoint(this._latlng),\r\n \t\t offset = toPoint(this.options.offset),\r\n \t\t anchor = this._getAnchor();\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\tvar bottom = this._containerBottom = -offset.y,\r\n \t\t left = this._containerLeft = -Math.round(this._containerWidth / 2) + offset.x;\r\n\r\n \t\t// bottom position the popup in case the height of the popup 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: function () {\r\n \t\treturn [0, 0];\r\n \t}\r\n\r\n });\n\n /*\r\n * @class Popup\r\n * @inherits DivOverlay\r\n * @aka L.Popup\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 * Here's a more complicated way to open a popup on a map:\r\n *\r\n * ```js\r\n * var popup = L.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 */\r\n\r\n\r\n // @namespace Popup\r\n var Popup = DivOverlay.extend({\r\n\r\n \t// @section\r\n \t// @aka Popup options\r\n \toptions: {\r\n \t\t// @option maxWidth: Number = 300\r\n \t\t// Max width of the popup, in pixels.\r\n \t\tmaxWidth: 300,\r\n\r\n \t\t// @option minWidth: Number = 50\r\n \t\t// Min width of the popup, in pixels.\r\n \t\tminWidth: 50,\r\n\r\n \t\t// @option maxHeight: Number = null\r\n \t\t// If set, creates a scrollable container of the given height\r\n \t\t// inside a popup if its content exceeds it.\r\n \t\tmaxHeight: null,\r\n\r\n \t\t// @option autoPan: Boolean = true\r\n \t\t// Set it to `false` if you don't want the map to do panning animation\r\n \t\t// to fit the opened popup.\r\n \t\tautoPan: true,\r\n\r\n \t\t// @option autoPanPaddingTopLeft: Point = null\r\n \t\t// The margin between the popup and the top left corner of the map\r\n \t\t// view after autopanning was performed.\r\n \t\tautoPanPaddingTopLeft: null,\r\n\r\n \t\t// @option autoPanPaddingBottomRight: Point = null\r\n \t\t// The margin between the popup and the bottom right corner of the map\r\n \t\t// view after autopanning was performed.\r\n \t\tautoPanPaddingBottomRight: null,\r\n\r\n \t\t// @option autoPanPadding: Point = Point(5, 5)\r\n \t\t// Equivalent of setting both top left and bottom right autopan padding to the same value.\r\n \t\tautoPanPadding: [5, 5],\r\n\r\n \t\t// @option keepInView: Boolean = false\r\n \t\t// Set it to `true` if you want to prevent users from panning the popup\r\n \t\t// off of the screen while it is open.\r\n \t\tkeepInView: false,\r\n\r\n \t\t// @option closeButton: Boolean = true\r\n \t\t// Controls the presence of a close button in the popup.\r\n \t\tcloseButton: true,\r\n\r\n \t\t// @option autoClose: Boolean = true\r\n \t\t// Set it to `false` if you want to override the default behavior of\r\n \t\t// the popup closing when another popup is opened.\r\n \t\tautoClose: true,\r\n\r\n \t\t// @option closeOnEscapeKey: Boolean = true\r\n \t\t// Set it to `false` if you want to override the default behavior of\r\n \t\t// the ESC key for closing of the popup.\r\n \t\tcloseOnEscapeKey: true,\r\n\r\n \t\t// @option closeOnClick: Boolean = *\r\n \t\t// Set it if you want to override the default behavior of the popup closing when user clicks\r\n \t\t// on the map. Defaults to the map's [`closePopupOnClick`](#map-closepopuponclick) option.\r\n\r\n \t\t// @option className: String = ''\r\n \t\t// A custom CSS class name to assign to the popup.\r\n \t\tclassName: ''\r\n \t},\r\n\r\n \t// @namespace Popup\r\n \t// @method openOn(map: Map): this\r\n \t// Adds the popup to the map and closes the previous one. The same as `map.openPopup(popup)`.\r\n \topenOn: function (map) {\r\n \t\tmap.openPopup(this);\r\n \t\treturn this;\r\n \t},\r\n\r\n \tonAdd: function (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: function (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: function () {\r\n \t\tvar events = DivOverlay.prototype.getEvents.call(this);\r\n\r\n \t\tif (this.options.closeOnClick !== undefined ? 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_close: function () {\r\n \t\tif (this._map) {\r\n \t\t\tthis._map.closePopup(this);\r\n \t\t}\r\n \t},\r\n\r\n \t_initLayout: function () {\r\n \t\tvar prefix = 'leaflet-popup',\r\n \t\t container = this._container = create$1('div',\r\n \t\t\tprefix + ' ' + (this.options.className || '') +\r\n \t\t\t' leaflet-zoom-animated');\r\n\r\n \t\tvar 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\tvar closeButton = this._closeButton = create$1('a', prefix + '-close-button', container);\r\n \t\t\tcloseButton.href = '#close';\r\n \t\t\tcloseButton.innerHTML = '×';\r\n\r\n \t\t\ton(closeButton, 'click', this._onCloseButtonClick, this);\r\n \t\t}\r\n \t},\r\n\r\n \t_updateLayout: function () {\r\n \t\tvar container = this._contentNode,\r\n \t\t style = container.style;\r\n\r\n \t\tstyle.width = '';\r\n \t\tstyle.whiteSpace = 'nowrap';\r\n\r\n \t\tvar width = container.offsetWidth;\r\n \t\twidth = Math.min(width, this.options.maxWidth);\r\n \t\twidth = Math.max(width, this.options.minWidth);\r\n\r\n \t\tstyle.width = (width + 1) + 'px';\r\n \t\tstyle.whiteSpace = '';\r\n\r\n \t\tstyle.height = '';\r\n\r\n \t\tvar height = container.offsetHeight,\r\n \t\t maxHeight = this.options.maxHeight,\r\n \t\t scrolledClass = 'leaflet-popup-scrolled';\r\n\r\n \t\tif (maxHeight && height > maxHeight) {\r\n \t\t\tstyle.height = maxHeight + 'px';\r\n \t\t\taddClass(container, scrolledClass);\r\n \t\t} else {\r\n \t\t\tremoveClass(container, scrolledClass);\r\n \t\t}\r\n\r\n \t\tthis._containerWidth = this._container.offsetWidth;\r\n \t},\r\n\r\n \t_animateZoom: function (e) {\r\n \t\tvar pos = this._map._latLngToNewLayerPoint(this._latlng, e.zoom, e.center),\r\n \t\t anchor = this._getAnchor();\r\n \t\tsetPosition(this._container, pos.add(anchor));\r\n \t},\r\n\r\n \t_adjustPan: function () {\r\n \t\tif (!this.options.autoPan) { return; }\r\n \t\tif (this._map._panAnim) { this._map._panAnim.stop(); }\r\n\r\n \t\tvar map = this._map,\r\n \t\t marginBottom = parseInt(getStyle(this._container, 'marginBottom'), 10) || 0,\r\n \t\t containerHeight = this._container.offsetHeight + marginBottom,\r\n \t\t containerWidth = this._containerWidth,\r\n \t\t layerPos = new Point(this._containerLeft, -containerHeight - this._containerBottom);\r\n\r\n \t\tlayerPos._add(getPosition(this._container));\r\n\r\n \t\tvar containerPos = map.layerPointToContainerPoint(layerPos),\r\n \t\t padding = toPoint(this.options.autoPanPadding),\r\n \t\t paddingTL = toPoint(this.options.autoPanPaddingTopLeft || padding),\r\n \t\t paddingBR = toPoint(this.options.autoPanPaddingBottomRight || padding),\r\n \t\t size = map.getSize(),\r\n \t\t dx = 0,\r\n \t\t dy = 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\tmap\r\n \t\t\t .fire('autopanstart')\r\n \t\t\t .panBy([dx, dy]);\r\n \t\t}\r\n \t},\r\n\r\n \t_onCloseButtonClick: function (e) {\r\n \t\tthis._close();\r\n \t\tstop(e);\r\n \t},\r\n\r\n \t_getAnchor: function () {\r\n \t\t// Where should we anchor the popup on the source layer?\r\n \t\treturn toPoint(this._source && this._source._getPopupAnchor ? this._source._getPopupAnchor() : [0, 0]);\r\n \t}\r\n\r\n });\r\n\r\n // @namespace Popup\r\n // @factory L.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 var popup = function (options, source) {\r\n \treturn new Popup(options, source);\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\n Map.mergeOptions({\r\n \tclosePopupOnClick: true\r\n });\r\n\r\n\r\n // @namespace Map\r\n // @section Methods for Layers and Controls\r\n Map.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: function (popup, latlng, options) {\r\n \t\tif (!(popup instanceof Popup)) {\r\n \t\t\tpopup = new Popup(options).setContent(popup);\r\n \t\t}\r\n\r\n \t\tif (latlng) {\r\n \t\t\tpopup.setLatLng(latlng);\r\n \t\t}\r\n\r\n \t\tif (this.hasLayer(popup)) {\r\n \t\t\treturn this;\r\n \t\t}\r\n\r\n \t\tif (this._popup && this._popup.options.autoClose) {\r\n \t\t\tthis.closePopup();\r\n \t\t}\r\n\r\n \t\tthis._popup = popup;\r\n \t\treturn this.addLayer(popup);\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: function (popup) {\r\n \t\tif (!popup || popup === this._popup) {\r\n \t\t\tpopup = this._popup;\r\n \t\t\tthis._popup = null;\r\n \t\t}\r\n \t\tif (popup) {\r\n \t\t\tthis.removeLayer(popup);\r\n \t\t}\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 * var layer = L.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\n Layer.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: function (content, options) {\r\n\r\n \t\tif (content instanceof Popup) {\r\n \t\t\tsetOptions(content, options);\r\n \t\t\tthis._popup = content;\r\n \t\t\tcontent._source = this;\r\n \t\t} else {\r\n \t\t\tif (!this._popup || options) {\r\n \t\t\t\tthis._popup = new Popup(options, this);\r\n \t\t\t}\r\n \t\t\tthis._popup.setContent(content);\r\n \t\t}\r\n\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: function () {\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: function (layer, latlng) {\r\n \t\tif (this._popup && this._map) {\r\n \t\t\tlatlng = this._popup._prepareOpen(this, layer, latlng);\r\n\r\n \t\t\t// open the popup on the map\r\n \t\t\tthis._map.openPopup(this._popup, latlng);\r\n \t\t}\r\n\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: function () {\r\n \t\tif (this._popup) {\r\n \t\t\tthis._popup._close();\r\n \t\t}\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: function (target) {\r\n \t\tif (this._popup) {\r\n \t\t\tif (this._popup._map) {\r\n \t\t\t\tthis.closePopup();\r\n \t\t\t} else {\r\n \t\t\t\tthis.openPopup(target);\r\n \t\t\t}\r\n \t\t}\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: function () {\r\n \t\treturn (this._popup ? 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: function (content) {\r\n \t\tif (this._popup) {\r\n \t\t\tthis._popup.setContent(content);\r\n \t\t}\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: function () {\r\n \t\treturn this._popup;\r\n \t},\r\n\r\n \t_openPopup: function (e) {\r\n \t\tvar layer = e.layer || e.target;\r\n\r\n \t\tif (!this._popup) {\r\n \t\t\treturn;\r\n \t\t}\r\n\r\n \t\tif (!this._map) {\r\n \t\t\treturn;\r\n \t\t}\r\n\r\n \t\t// prevent map click\r\n \t\tstop(e);\r\n\r\n \t\t// if this inherits from Path its a vector and we can just\r\n \t\t// open the popup at the new location\r\n \t\tif (layer instanceof Path) {\r\n \t\t\tthis.openPopup(e.layer || e.target, e.latlng);\r\n \t\t\treturn;\r\n \t\t}\r\n\r\n \t\t// otherwise treat it like a marker and figure out\r\n \t\t// if we should toggle it open/closed\r\n \t\tif (this._map.hasLayer(this._popup) && this._popup._source === layer) {\r\n \t\t\tthis.closePopup();\r\n \t\t} else {\r\n \t\t\tthis.openPopup(layer, e.latlng);\r\n \t\t}\r\n \t},\r\n\r\n \t_movePopup: function (e) {\r\n \t\tthis._popup.setLatLng(e.latlng);\r\n \t},\r\n\r\n \t_onKeyPress: function (e) {\r\n \t\tif (e.originalEvent.keyCode === 13) {\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 * @aka L.Tooltip\n * Used to display small texts on top of map layers.\n *\n * @example\n *\n * ```js\n * marker.bindTooltip(\"my tooltip text\").openTooltip();\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 var Tooltip = DivOverlay.extend({\n\n \t// @section\n \t// @aka Tooltip options\n \toptions: {\n \t\t// @option pane: String = 'tooltipPane'\n \t\t// `Map pane` where the tooltip will be added.\n \t\tpane: 'tooltipPane',\n\n \t\t// @option offset: Point = Point(0, 0)\n \t\t// Optional offset of the tooltip position.\n \t\toffset: [0, 0],\n\n \t\t// @option direction: String = 'auto'\n \t\t// Direction where to open the tooltip. Possible values are: `right`, `left`,\n \t\t// `top`, `bottom`, `center`, `auto`.\n \t\t// `auto` will dynamically switch between `right` and `left` according to the tooltip\n \t\t// position on the map.\n \t\tdirection: 'auto',\n\n \t\t// @option permanent: Boolean = false\n \t\t// Whether to open the tooltip permanently or only on mouseover.\n \t\tpermanent: false,\n\n \t\t// @option sticky: Boolean = false\n \t\t// If true, the tooltip will follow the mouse instead of being fixed at the feature center.\n \t\tsticky: false,\n\n \t\t// @option interactive: Boolean = false\n \t\t// If true, the tooltip will listen to the feature events.\n \t\tinteractive: false,\n\n \t\t// @option opacity: Number = 0.9\n \t\t// Tooltip container opacity.\n \t\topacity: 0.9\n \t},\n\n \tonAdd: function (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\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: function (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\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: function () {\n \t\tvar events = DivOverlay.prototype.getEvents.call(this);\n\n \t\tif (touch && !this.options.permanent) {\n \t\t\tevents.preclick = this._close;\n \t\t}\n\n \t\treturn events;\n \t},\n\n \t_close: function () {\n \t\tif (this._map) {\n \t\t\tthis._map.closeTooltip(this);\n \t\t}\n \t},\n\n \t_initLayout: function () {\n \t\tvar prefix = 'leaflet-tooltip',\n \t\t className = prefix + ' ' + (this.options.className || '') + ' leaflet-zoom-' + (this._zoomAnimated ? 'animated' : 'hide');\n\n \t\tthis._contentNode = this._container = create$1('div', className);\n \t},\n\n \t_updateLayout: function () {},\n\n \t_adjustPan: function () {},\n\n \t_setPosition: function (pos) {\n \t\tvar subX, subY,\n \t\t map = this._map,\n \t\t container = this._container,\n \t\t centerPoint = map.latLngToContainerPoint(map.getCenter()),\n \t\t tooltipPoint = map.layerPointToContainerPoint(pos),\n \t\t direction = this.options.direction,\n \t\t tooltipWidth = container.offsetWidth,\n \t\t tooltipHeight = container.offsetHeight,\n \t\t offset = toPoint(this.options.offset),\n \t\t anchor = 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(toPoint(subX, subY, true)).add(offset).add(anchor);\n\n \t\tremoveClass(container, 'leaflet-tooltip-right');\n \t\tremoveClass(container, 'leaflet-tooltip-left');\n \t\tremoveClass(container, 'leaflet-tooltip-top');\n \t\tremoveClass(container, 'leaflet-tooltip-bottom');\n \t\taddClass(container, 'leaflet-tooltip-' + direction);\n \t\tsetPosition(container, pos);\n \t},\n\n \t_updatePosition: function () {\n \t\tvar pos = this._map.latLngToLayerPoint(this._latlng);\n \t\tthis._setPosition(pos);\n \t},\n\n \tsetOpacity: function (opacity) {\n \t\tthis.options.opacity = opacity;\n\n \t\tif (this._container) {\n \t\t\tsetOpacity(this._container, opacity);\n \t\t}\n \t},\n\n \t_animateZoom: function (e) {\n \t\tvar pos = this._map._latLngToNewLayerPoint(this._latlng, e.zoom, e.center);\n \t\tthis._setPosition(pos);\n \t},\n\n \t_getAnchor: function () {\n \t\t// Where should we anchor the tooltip on the source layer?\n \t\treturn toPoint(this._source && this._source._getTooltipAnchor && !this.options.sticky ? this._source._getTooltipAnchor() : [0, 0]);\n \t}\n\n });\n\n // @namespace Tooltip\n // @factory L.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 var tooltip = function (options, source) {\n \treturn new Tooltip(options, source);\n };\n\n // @namespace Map\n // @section Methods for Layers and Controls\n Map.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: function (tooltip, latlng, options) {\n \t\tif (!(tooltip instanceof Tooltip)) {\n \t\t\ttooltip = new Tooltip(options).setContent(tooltip);\n \t\t}\n\n \t\tif (latlng) {\n \t\t\ttooltip.setLatLng(latlng);\n \t\t}\n\n \t\tif (this.hasLayer(tooltip)) {\n \t\t\treturn this;\n \t\t}\n\n \t\treturn this.addLayer(tooltip);\n \t},\n\n \t// @method closeTooltip(tooltip?: Tooltip): this\n \t// Closes the tooltip given as parameter.\n \tcloseTooltip: function (tooltip) {\n \t\tif (tooltip) {\n \t\t\tthis.removeLayer(tooltip);\n \t\t}\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 * var layer = L.Polygon(latlngs).bindTooltip('Hi There!').addTo(map);\n * layer.openTooltip();\n * layer.closeTooltip();\n * ```\n */\n\n // @section Tooltip methods\n Layer.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: function (content, options) {\n\n \t\tif (content instanceof Tooltip) {\n \t\t\tsetOptions(content, options);\n \t\t\tthis._tooltip = content;\n \t\t\tcontent._source = this;\n \t\t} else {\n \t\t\tif (!this._tooltip || options) {\n \t\t\t\tthis._tooltip = new Tooltip(options, this);\n \t\t\t}\n \t\t\tthis._tooltip.setContent(content);\n\n \t\t}\n\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: function () {\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: function (remove$$1) {\n \t\tif (!remove$$1 && this._tooltipHandlersAdded) { return; }\n \t\tvar onOff = remove$$1 ? 'off' : 'on',\n \t\t events = {\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.mouseover = this._openTooltip;\n \t\t\tevents.mouseout = this.closeTooltip;\n \t\t\tif (this._tooltip.options.sticky) {\n \t\t\t\tevents.mousemove = this._moveTooltip;\n \t\t\t}\n \t\t\tif (touch) {\n \t\t\t\tevents.click = this._openTooltip;\n \t\t\t}\n \t\t} else {\n \t\t\tevents.add = this._openTooltip;\n \t\t}\n \t\tthis[onOff](events);\n \t\tthis._tooltipHandlersAdded = !remove$$1;\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: function (layer, latlng) {\n \t\tif (this._tooltip && this._map) {\n \t\t\tlatlng = this._tooltip._prepareOpen(this, layer, latlng);\n\n \t\t\t// open the tooltip on the map\n \t\t\tthis._map.openTooltip(this._tooltip, latlng);\n\n \t\t\t// Tooltip container may not be defined if not permanent and never\n \t\t\t// opened.\n \t\t\tif (this._tooltip.options.interactive && this._tooltip._container) {\n \t\t\t\taddClass(this._tooltip._container, 'leaflet-clickable');\n \t\t\t\tthis.addInteractiveTarget(this._tooltip._container);\n \t\t\t}\n \t\t}\n\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: function () {\n \t\tif (this._tooltip) {\n \t\t\tthis._tooltip._close();\n \t\t\tif (this._tooltip.options.interactive && this._tooltip._container) {\n \t\t\t\tremoveClass(this._tooltip._container, 'leaflet-clickable');\n \t\t\t\tthis.removeInteractiveTarget(this._tooltip._container);\n \t\t\t}\n \t\t}\n \t\treturn this;\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: function (target) {\n \t\tif (this._tooltip) {\n \t\t\tif (this._tooltip._map) {\n \t\t\t\tthis.closeTooltip();\n \t\t\t} else {\n \t\t\t\tthis.openTooltip(target);\n \t\t\t}\n \t\t}\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: function () {\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: function (content) {\n \t\tif (this._tooltip) {\n \t\t\tthis._tooltip.setContent(content);\n \t\t}\n \t\treturn this;\n \t},\n\n \t// @method getTooltip(): Tooltip\n \t// Returns the tooltip bound to this layer.\n \tgetTooltip: function () {\n \t\treturn this._tooltip;\n \t},\n\n \t_openTooltip: function (e) {\n \t\tvar layer = e.layer || e.target;\n\n \t\tif (!this._tooltip || !this._map) {\n \t\t\treturn;\n \t\t}\n \t\tthis.openTooltip(layer, this._tooltip.options.sticky ? e.latlng : undefined);\n \t},\n\n \t_moveTooltip: function (e) {\n \t\tvar latlng = e.latlng, containerPoint, layerPoint;\n \t\tif (this._tooltip.options.sticky && e.originalEvent) {\n \t\t\tcontainerPoint = this._map.mouseEventToContainerPoint(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 * @aka L.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 * var myIcon = L.divIcon({className: 'my-div-icon'});\n * // you can set .my-div-icon styles in CSS\n *\n * L.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 var DivIcon = Icon.extend({\n \toptions: {\n \t\t// @section\n \t\t// @aka DivIcon options\n \t\ticonSize: [12, 12], // also can be set through CSS\n\n \t\t// iconAnchor: (Point),\n \t\t// popupAnchor: (Point),\n\n \t\t// @option html: String|HTMLElement = ''\n \t\t// Custom HTML code to put inside the div element, empty by default. Alternatively,\n \t\t// an instance of `HTMLElement`.\n \t\thtml: false,\n\n \t\t// @option bgPos: Point = [0, 0]\n \t\t// Optional relative position of the background, in pixels\n \t\tbgPos: null,\n\n \t\tclassName: 'leaflet-div-icon'\n \t},\n\n \tcreateIcon: function (oldIcon) {\n \t\tvar div = (oldIcon && oldIcon.tagName === 'DIV') ? oldIcon : document.createElement('div'),\n \t\t options = this.options;\n\n \t\tif (options.html instanceof Element) {\n \t\t\tempty(div);\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\tvar bgPos = toPoint(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: function () {\n \t\treturn null;\n \t}\n });\n\n // @factory L.divIcon(options: DivIcon options)\n // Creates a `DivIcon` instance with the given options.\n function divIcon(options) {\n \treturn new DivIcon(options);\n }\n\n Icon.Default = IconDefault;\n\n /*\n * @class GridLayer\n * @inherits Layer\n * @aka L.GridLayer\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 * var CanvasLayer = L.GridLayer.extend({\n * createTile: function(coords){\n * // create a <canvas> element for drawing\n * var tile = L.DomUtil.create('canvas', 'leaflet-tile');\n *\n * // setup tile width and height according to the options\n * var 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 * var 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 * var CanvasLayer = L.GridLayer.extend({\n * createTile: function(coords, done){\n * var error;\n *\n * // create a <canvas> element for drawing\n * var tile = L.DomUtil.create('canvas', 'leaflet-tile');\n *\n * // setup tile width and height according to the options\n * var 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 var GridLayer = Layer.extend({\n\n \t// @section\n \t// @aka GridLayer options\n \toptions: {\n \t\t// @option tileSize: Number|Point = 256\n \t\t// Width and height of tiles in the grid. Use a number if width and height are equal, or `L.point(width, height)` otherwise.\n \t\ttileSize: 256,\n\n \t\t// @option opacity: Number = 1.0\n \t\t// Opacity of the tiles. Can be used in the `createTile()` function.\n \t\topacity: 1,\n\n \t\t// @option updateWhenIdle: Boolean = (depends)\n \t\t// Load new tiles only when panning ends.\n \t\t// `true` by default on mobile browsers, in order to avoid too many requests and keep smooth navigation.\n \t\t// `false` otherwise in order to display new tiles _during_ panning, since it is easy to pan outside the\n \t\t// [`keepBuffer`](#gridlayer-keepbuffer) option in desktop browsers.\n \t\tupdateWhenIdle: mobile,\n\n \t\t// @option updateWhenZooming: Boolean = true\n \t\t// By default, a smooth zoom animation (during a [touch zoom](#map-touchzoom) 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\tupdateWhenZooming: true,\n\n \t\t// @option updateInterval: Number = 200\n \t\t// Tiles will not update more than once every `updateInterval` milliseconds when panning.\n \t\tupdateInterval: 200,\n\n \t\t// @option zIndex: Number = 1\n \t\t// The explicit zIndex of the tile layer.\n \t\tzIndex: 1,\n\n \t\t// @option bounds: LatLngBounds = undefined\n \t\t// If set, tiles will only be loaded inside the set `LatLngBounds`.\n \t\tbounds: null,\n\n \t\t// @option minZoom: Number = 0\n \t\t// The minimum zoom level down to which this layer will be displayed (inclusive).\n \t\tminZoom: 0,\n\n \t\t// @option maxZoom: Number = undefined\n \t\t// The maximum zoom level up to which this layer will be displayed (inclusive).\n \t\tmaxZoom: undefined,\n\n \t\t// @option maxNativeZoom: Number = undefined\n \t\t// Maximum zoom number the tile source has available. If it is specified,\n \t\t// the tiles on all zoom levels higher than `maxNativeZoom` will be loaded\n \t\t// from `maxNativeZoom` level and auto-scaled.\n \t\tmaxNativeZoom: undefined,\n\n \t\t// @option minNativeZoom: Number = undefined\n \t\t// Minimum zoom number the tile source has available. If it is specified,\n \t\t// the tiles on all zoom levels lower than `minNativeZoom` will be loaded\n \t\t// from `minNativeZoom` level and auto-scaled.\n \t\tminNativeZoom: undefined,\n\n \t\t// @option noWrap: Boolean = false\n \t\t// Whether the layer is wrapped around the antimeridian. If `true`, the\n \t\t// GridLayer will only be displayed once at low zoom levels. Has no\n \t\t// effect when the [map CRS](#map-crs) doesn't wrap around. Can be used\n \t\t// in combination with [`bounds`](#gridlayer-bounds) to prevent requesting\n \t\t// tiles outside the CRS limits.\n \t\tnoWrap: false,\n\n \t\t// @option pane: String = 'tilePane'\n \t\t// `Map pane` where the grid layer will be added.\n \t\tpane: 'tilePane',\n\n \t\t// @option className: String = ''\n \t\t// A custom class name to assign to the tile layer. Empty by default.\n \t\tclassName: '',\n\n \t\t// @option keepBuffer: Number = 2\n \t\t// When panning the map, keep this many rows and columns of tiles before unloading them.\n \t\tkeepBuffer: 2\n \t},\n\n \tinitialize: function (options) {\n \t\tsetOptions(this, options);\n \t},\n\n \tonAdd: function () {\n \t\tthis._initContainer();\n\n \t\tthis._levels = {};\n \t\tthis._tiles = {};\n\n \t\tthis._resetView();\n \t\tthis._update();\n \t},\n\n \tbeforeAdd: function (map) {\n \t\tmap._addZoomLimit(this);\n \t},\n\n \tonRemove: function (map) {\n \t\tthis._removeAllTiles();\n \t\tremove(this._container);\n \t\tmap._removeZoomLimit(this);\n \t\tthis._container = null;\n \t\tthis._tileZoom = undefined;\n \t},\n\n \t// @method bringToFront: this\n \t// Brings the tile layer to the top of all tile layers.\n \tbringToFront: function () {\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: function () {\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: function () {\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: function (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: function (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: function () {\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: function () {\n \t\tif (this._map) {\n \t\t\tthis._removeAllTiles();\n \t\t\tthis._update();\n \t\t}\n \t\treturn this;\n \t},\n\n \tgetEvents: function () {\n \t\tvar 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: function () {\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: function () {\n \t\tvar s = this.options.tileSize;\n \t\treturn s instanceof Point ? s : new Point(s, s);\n \t},\n\n \t_updateZIndex: function () {\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: function (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\tvar layers = this.getPane().children,\n \t\t edgeZIndex = -compare(-Infinity, Infinity); // -Infinity for max, Infinity for min\n\n \t\tfor (var i = 0, len = layers.length, zIndex; i < len; i++) {\n\n \t\t\tzIndex = layers[i].style.zIndex;\n\n \t\t\tif (layers[i] !== 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: function () {\n \t\tif (!this._map) { return; }\n\n \t\t// IE doesn't inherit filter opacity properly, so we're forced to set it on tiles\n \t\tif (ielt9) { return; }\n\n \t\tsetOpacity(this._container, this.options.opacity);\n\n \t\tvar now = +new Date(),\n \t\t nextFrame = false,\n \t\t willPrune = false;\n\n \t\tfor (var key in this._tiles) {\n \t\t\tvar tile = this._tiles[key];\n \t\t\tif (!tile.current || !tile.loaded) { continue; }\n\n \t\t\tvar fade = Math.min(1, (now - tile.loaded) / 200);\n\n \t\t\tsetOpacity(tile.el, 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\tcancelAnimFrame(this._fadeFrame);\n \t\t\tthis._fadeFrame = requestAnimFrame(this._updateOpacity, this);\n \t\t}\n \t},\n\n \t_onOpaqueTile: falseFn,\n\n \t_initContainer: function () {\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: function () {\n\n \t\tvar zoom = this._tileZoom,\n \t\t maxZoom = this.options.maxZoom;\n\n \t\tif (zoom === undefined) { return undefined; }\n\n \t\tfor (var z in 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\tremove(this._levels[z].el);\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\tvar level = this._levels[zoom],\n \t\t 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 the browser to consider 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: falseFn,\n\n \t_onRemoveLevel: falseFn,\n\n \t_onCreateLevel: falseFn,\n\n \t_pruneTiles: function () {\n \t\tif (!this._map) {\n \t\t\treturn;\n \t\t}\n\n \t\tvar key, tile;\n\n \t\tvar 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 (key in this._tiles) {\n \t\t\ttile = this._tiles[key];\n \t\t\ttile.retain = tile.current;\n \t\t}\n\n \t\tfor (key in this._tiles) {\n \t\t\ttile = this._tiles[key];\n \t\t\tif (tile.current && !tile.active) {\n \t\t\t\tvar 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 (key in this._tiles) {\n \t\t\tif (!this._tiles[key].retain) {\n \t\t\t\tthis._removeTile(key);\n \t\t\t}\n \t\t}\n \t},\n\n \t_removeTilesAtZoom: function (zoom) {\n \t\tfor (var key in this._tiles) {\n \t\t\tif (this._tiles[key].coords.z !== zoom) {\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\tthis._removeTile(key);\n \t\t}\n \t},\n\n \t_removeAllTiles: function () {\n \t\tfor (var key in this._tiles) {\n \t\t\tthis._removeTile(key);\n \t\t}\n \t},\n\n \t_invalidateAll: function () {\n \t\tfor (var z in this._levels) {\n \t\t\tremove(this._levels[z].el);\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: function (x, y, z, minZoom) {\n \t\tvar x2 = Math.floor(x / 2),\n \t\t y2 = Math.floor(y / 2),\n \t\t z2 = z - 1,\n \t\t coords2 = new Point(+x2, +y2);\n \t\tcoords2.z = +z2;\n\n \t\tvar key = this._tileCoordsToKey(coords2),\n \t\t tile = this._tiles[key];\n\n \t\tif (tile && tile.active) {\n \t\t\ttile.retain = true;\n \t\t\treturn true;\n\n \t\t} else if (tile && 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: function (x, y, z, maxZoom) {\n\n \t\tfor (var i = 2 * x; i < 2 * x + 2; i++) {\n \t\t\tfor (var j = 2 * y; j < 2 * y + 2; j++) {\n\n \t\t\t\tvar coords = new Point(i, j);\n \t\t\t\tcoords.z = z + 1;\n\n \t\t\t\tvar key = this._tileCoordsToKey(coords),\n \t\t\t\t tile = this._tiles[key];\n\n \t\t\t\tif (tile && 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 && 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: function (e) {\n \t\tvar animating = e && (e.pinch || e.flyTo);\n \t\tthis._setView(this._map.getCenter(), this._map.getZoom(), animating, animating);\n \t},\n\n \t_animateZoom: function (e) {\n \t\tthis._setView(e.center, e.zoom, true, e.noUpdate);\n \t},\n\n \t_clampZoom: function (zoom) {\n \t\tvar 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: function (center, zoom, noPrune, noUpdate) {\n \t\tvar 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\tvar 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: function (center, zoom) {\n \t\tfor (var i in this._levels) {\n \t\t\tthis._setZoomTransform(this._levels[i], center, zoom);\n \t\t}\n \t},\n\n \t_setZoomTransform: function (level, center, zoom) {\n \t\tvar scale = this._map.getZoomScale(zoom, level.zoom),\n \t\t translate = level.origin.multiplyBy(scale)\n \t\t .subtract(this._map._getNewPixelOrigin(center, zoom)).round();\n\n \t\tif (any3d) {\n \t\t\tsetTransform(level.el, translate, scale);\n \t\t} else {\n \t\t\tsetPosition(level.el, translate);\n \t\t}\n \t},\n\n \t_resetGrid: function () {\n \t\tvar map = this._map,\n \t\t crs = map.options.crs,\n \t\t tileSize = this._tileSize = this.getTileSize(),\n \t\t tileZoom = this._tileZoom;\n\n \t\tvar 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: function () {\n \t\tif (!this._map || this._map._animatingZoom) { return; }\n\n \t\tthis._update();\n \t},\n\n \t_getTiledPixelBounds: function (center) {\n \t\tvar map = this._map,\n \t\t mapZoom = map._animatingZoom ? Math.max(map._animateToZoom, map.getZoom()) : map.getZoom(),\n \t\t scale = map.getZoomScale(mapZoom, this._tileZoom),\n \t\t pixelCenter = map.project(center, this._tileZoom).floor(),\n \t\t halfSize = 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: function (center) {\n \t\tvar map = this._map;\n \t\tif (!map) { return; }\n \t\tvar 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\tvar pixelBounds = this._getTiledPixelBounds(center),\n \t\t tileRange = this._pxBoundsToTileRange(pixelBounds),\n \t\t tileCenter = tileRange.getCenter(),\n \t\t queue = [],\n \t\t margin = this.options.keepBuffer,\n \t\t noPruneRange = new Bounds(tileRange.getBottomLeft().subtract([margin, -margin]),\n \t\t tileRange.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 (var key in this._tiles) {\n \t\t\tvar c = this._tiles[key].coords;\n \t\t\tif (c.z !== this._tileZoom || !noPruneRange.contains(new Point(c.x, c.y))) {\n \t\t\t\tthis._tiles[key].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 (var j = tileRange.min.y; j <= tileRange.max.y; j++) {\n \t\t\tfor (var i = tileRange.min.x; i <= tileRange.max.x; i++) {\n \t\t\t\tvar 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\tvar 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(function (a, b) {\n \t\t\treturn a.distanceTo(tileCenter) - b.distanceTo(tileCenter);\n \t\t});\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\tvar fragment = document.createDocumentFragment();\n\n \t\t\tfor (i = 0; i < queue.length; i++) {\n \t\t\t\tthis._addTile(queue[i], fragment);\n \t\t\t}\n\n \t\t\tthis._level.el.appendChild(fragment);\n \t\t}\n \t},\n\n \t_isValidTile: function (coords) {\n \t\tvar 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\tvar 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\tvar tileBounds = this._tileCoordsToBounds(coords);\n \t\treturn toLatLngBounds(this.options.bounds).overlaps(tileBounds);\n \t},\n\n \t_keyToBounds: function (key) {\n \t\treturn this._tileCoordsToBounds(this._keyToTileCoords(key));\n \t},\n\n \t_tileCoordsToNwSe: function (coords) {\n \t\tvar map = this._map,\n \t\t tileSize = this.getTileSize(),\n \t\t nwPoint = coords.scaleBy(tileSize),\n \t\t sePoint = nwPoint.add(tileSize),\n \t\t nw = map.unproject(nwPoint, coords.z),\n \t\t se = 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: function (coords) {\n \t\tvar bp = this._tileCoordsToNwSe(coords),\n \t\t 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: function (coords) {\n \t\treturn coords.x + ':' + coords.y + ':' + coords.z;\n \t},\n\n \t// converts tile cache key to coordinates\n \t_keyToTileCoords: function (key) {\n \t\tvar k = key.split(':'),\n \t\t coords = new Point(+k[0], +k[1]);\n \t\tcoords.z = +k[2];\n \t\treturn coords;\n \t},\n\n \t_removeTile: function (key) {\n \t\tvar tile = this._tiles[key];\n \t\tif (!tile) { return; }\n\n \t\tremove(tile.el);\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: function (tile) {\n \t\taddClass(tile, 'leaflet-tile');\n\n \t\tvar 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.onmousemove = falseFn;\n\n \t\t// update opacity on tiles in IE7-8 because of filter inheritance problems\n \t\tif (ielt9 && this.options.opacity < 1) {\n \t\t\tsetOpacity(tile, this.options.opacity);\n \t\t}\n\n \t\t// without this hack, tiles disappear after zoom on Chrome for Android\n \t\t// https://github.com/Leaflet/Leaflet/issues/2078\n \t\tif (android && !android23) {\n \t\t\ttile.style.WebkitBackfaceVisibility = 'hidden';\n \t\t}\n \t},\n\n \t_addTile: function (coords, container) {\n \t\tvar tilePos = this._getTilePos(coords),\n \t\t key = this._tileCoordsToKey(coords);\n\n \t\tvar tile = this.createTile(this._wrapCoords(coords), bind(this._tileReady, 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\trequestAnimFrame(bind(this._tileReady, 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: coords,\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: tile,\n \t\t\tcoords: coords\n \t\t});\n \t},\n\n \t_tileReady: function (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: tile,\n \t\t\t\tcoords: coords\n \t\t\t});\n \t\t}\n\n \t\tvar 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\tsetOpacity(tile.el, 0);\n \t\t\tcancelAnimFrame(this._fadeFrame);\n \t\t\tthis._fadeFrame = requestAnimFrame(this._updateOpacity, 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\taddClass(tile.el, '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: coords\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 (ielt9 || !this._map._fadeAnimated) {\n \t\t\t\trequestAnimFrame(this._pruneTiles, 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\tsetTimeout(bind(this._pruneTiles, this), 250);\n \t\t\t}\n \t\t}\n \t},\n\n \t_getTilePos: function (coords) {\n \t\treturn coords.scaleBy(this.getTileSize()).subtract(this._level.origin);\n \t},\n\n \t_wrapCoords: function (coords) {\n \t\tvar 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: function (bounds) {\n \t\tvar 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: function () {\n \t\tfor (var key in this._tiles) {\n \t\t\tif (!this._tiles[key].loaded) { return false; }\n \t\t}\n \t\treturn true;\n \t}\n });\n\n // @factory L.gridLayer(options?: GridLayer options)\n // Creates a new instance of GridLayer with the supplied options.\n function gridLayer(options) {\n \treturn new GridLayer(options);\n }\n\n /*\r\n * @class TileLayer\r\n * @inherits GridLayer\r\n * @aka L.TileLayer\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 * L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png?{foo}', {foo: 'bar', attribution: 'Map data © <a href=\"https://www.openstreetmap.org/\">OpenStreetMap</a> contributors, <a href=\"https://creativecommons.org/licenses/by-sa/2.0/\">CC-BY-SA</a>'}).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 * 'http://{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 \"@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 * L.tileLayer('http://{s}.somedomain.com/{foo}/{z}/{x}/{y}.png', {foo: 'bar'});\r\n * ```\r\n */\r\n\r\n\r\n var TileLayer = GridLayer.extend({\r\n\r\n \t// @section\r\n \t// @aka TileLayer options\r\n \toptions: {\r\n \t\t// @option minZoom: Number = 0\r\n \t\t// The minimum zoom level down to which this layer will be displayed (inclusive).\r\n \t\tminZoom: 0,\r\n\r\n \t\t// @option maxZoom: Number = 18\r\n \t\t// The maximum zoom level up to which this layer will be displayed (inclusive).\r\n \t\tmaxZoom: 18,\r\n\r\n \t\t// @option subdomains: String|String[] = 'abc'\r\n \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\tsubdomains: 'abc',\r\n\r\n \t\t// @option errorTileUrl: String = ''\r\n \t\t// URL to the tile image to show in place of the tile that failed to load.\r\n \t\terrorTileUrl: '',\r\n\r\n \t\t// @option zoomOffset: Number = 0\r\n \t\t// The zoom number used in tile URLs will be offset with this value.\r\n \t\tzoomOffset: 0,\r\n\r\n \t\t// @option tms: Boolean = false\r\n \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\ttms: false,\r\n\r\n \t\t// @option zoomReverse: Boolean = false\r\n \t\t// If set to true, the zoom number used in tile URLs will be reversed (`maxZoom - zoom` instead of `zoom`)\r\n \t\tzoomReverse: false,\r\n\r\n \t\t// @option detectRetina: Boolean = false\r\n \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\tdetectRetina: false,\r\n\r\n \t\t// @option crossOrigin: Boolean|String = false\r\n \t\t// Whether the crossOrigin attribute will be added to the tiles.\r\n \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// Refer to [CORS Settings](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for valid String values.\r\n \t\tcrossOrigin: false\r\n \t},\r\n\r\n \tinitialize: function (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// detecting retina displays, adjusting tileSize and zoom levels\r\n \t\tif (options.detectRetina && 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--;\r\n \t\t\t} else {\r\n \t\t\t\toptions.zoomOffset--;\r\n \t\t\t\toptions.minZoom++;\r\n \t\t\t}\r\n\r\n \t\t\toptions.minZoom = Math.max(0, 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\t// for https://github.com/Leaflet/Leaflet/issues/137\r\n \t\tif (!android) {\r\n \t\t\tthis.on('tileunload', this._onTileRemove);\r\n \t\t}\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: function (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: function (coords, done) {\r\n \t\tvar tile = document.createElement('img');\r\n\r\n \t\ton(tile, 'load', bind(this._tileOnLoad, this, done, tile));\r\n \t\ton(tile, 'error', bind(this._tileOnError, 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/*\r\n \t\t Alt tag is set to empty string to keep screen readers from reading URL and for compliance reasons\r\n \t\t http://www.w3.org/TR/WCAG20-TECHS/H67\r\n \t\t*/\r\n \t\ttile.alt = '';\r\n\r\n \t\t/*\r\n \t\t Set role=\"presentation\" to force screen readers to ignore this\r\n \t\t https://www.w3.org/TR/wai-aria/roles#textalternativecomputation\r\n \t\t*/\r\n \t\ttile.setAttribute('role', 'presentation');\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: function (coords) {\r\n \t\tvar data = {\r\n \t\t\tr: 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\tvar 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, extend(data, this.options));\r\n \t},\r\n\r\n \t_tileOnLoad: function (done, tile) {\r\n \t\t// For https://github.com/Leaflet/Leaflet/issues/3332\r\n \t\tif (ielt9) {\r\n \t\t\tsetTimeout(bind(done, this, null, tile), 0);\r\n \t\t} else {\r\n \t\t\tdone(null, tile);\r\n \t\t}\r\n \t},\r\n\r\n \t_tileOnError: function (done, tile, e) {\r\n \t\tvar 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: function (e) {\r\n \t\te.tile.onload = null;\r\n \t},\r\n\r\n \t_getZoomForUrl: function () {\r\n \t\tvar zoom = this._tileZoom,\r\n \t\tmaxZoom = 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: function (tilePoint) {\r\n \t\tvar 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: function () {\r\n \t\tvar i, tile;\r\n \t\tfor (i in 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\tremove(tile);\r\n \t\t\t\t\tdelete this._tiles[i];\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t},\r\n\r\n \t_removeTile: function (key) {\r\n \t\tvar 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\t// unless we're on Android's stock browser,\r\n \t\t// see https://github.com/Leaflet/Leaflet/issues/137\r\n \t\tif (!androidStock) {\r\n \t\t\ttile.el.setAttribute('src', emptyImageUrl);\r\n \t\t}\r\n\r\n \t\treturn GridLayer.prototype._removeTile.call(this, key);\r\n \t},\r\n\r\n \t_tileReady: function (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\r\n\r\n // @factory L.tilelayer(urlTemplate: String, options?: TileLayer options)\r\n // Instantiates a tile layer object given a `URL template` and optionally an options object.\r\n\r\n function tileLayer(url, options) {\r\n \treturn new TileLayer(url, options);\r\n }\n\n /*\r\n * @class TileLayer.WMS\r\n * @inherits TileLayer\r\n * @aka L.TileLayer.WMS\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 * var nexrad = L.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 var TileLayerWMS = TileLayer.extend({\r\n\r\n \t// @section\r\n \t// @aka TileLayer.WMS options\r\n \t// If any custom options not documented here are used, they will be sent to the\r\n \t// WMS server as extra parameters in each request URL. This can be useful for\r\n \t// [non-standard vendor WMS parameters](http://docs.geoserver.org/stable/en/user/services/wms/vendor.html).\r\n \tdefaultWmsParams: {\r\n \t\tservice: 'WMS',\r\n \t\trequest: 'GetMap',\r\n\r\n \t\t// @option layers: String = ''\r\n \t\t// **(required)** Comma-separated list of WMS layers to show.\r\n \t\tlayers: '',\r\n\r\n \t\t// @option styles: String = ''\r\n \t\t// Comma-separated list of WMS styles.\r\n \t\tstyles: '',\r\n\r\n \t\t// @option format: String = 'image/jpeg'\r\n \t\t// WMS image format (use `'image/png'` for layers with transparency).\r\n \t\tformat: 'image/jpeg',\r\n\r\n \t\t// @option transparent: Boolean = false\r\n \t\t// If `true`, the WMS service will return images with transparency.\r\n \t\ttransparent: false,\r\n\r\n \t\t// @option version: String = '1.1.1'\r\n \t\t// Version of the WMS service to use\r\n \t\tversion: '1.1.1'\r\n \t},\r\n\r\n \toptions: {\r\n \t\t// @option crs: CRS = null\r\n \t\t// Coordinate Reference System to use for the WMS requests, defaults to\r\n \t\t// map CRS. Don't change this if you're not sure what it means.\r\n \t\tcrs: null,\r\n\r\n \t\t// @option uppercase: Boolean = false\r\n \t\t// If `true`, WMS request parameter keys will be uppercase.\r\n \t\tuppercase: false\r\n \t},\r\n\r\n \tinitialize: function (url, options) {\r\n\r\n \t\tthis._url = url;\r\n\r\n \t\tvar wmsParams = extend({}, this.defaultWmsParams);\r\n\r\n \t\t// all keys that are not TileLayer options go to WMS params\r\n \t\tfor (var i in options) {\r\n \t\t\tif (!(i in this.options)) {\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\tvar realRetina = options.detectRetina && retina ? 2 : 1;\r\n \t\tvar 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: function (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\tvar 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: function (coords) {\r\n\r\n \t\tvar tileBounds = this._tileCoordsToNwSe(coords),\r\n \t\t crs = this._crs,\r\n \t\t bounds = toBounds(crs.project(tileBounds[0]), crs.project(tileBounds[1])),\r\n \t\t min = bounds.min,\r\n \t\t max = bounds.max,\r\n \t\t bbox = (this._wmsVersion >= 1.3 && this._crs === EPSG4326 ?\r\n \t\t [min.y, min.x, max.y, max.x] :\r\n \t\t [min.x, min.y, max.x, max.y]).join(','),\r\n \t\t url = TileLayer.prototype.getTileUrl.call(this, coords);\r\n \t\treturn url +\r\n \t\t\tgetParamString(this.wmsParams, url, this.options.uppercase) +\r\n \t\t\t(this.options.uppercase ? '&BBOX=' : '&bbox=') + bbox;\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: function (params, noRedraw) {\r\n\r\n \t\textend(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 });\r\n\r\n\r\n // @factory L.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\n function tileLayerWMS(url, options) {\r\n \treturn new TileLayerWMS(url, options);\r\n }\n\n TileLayer.WMS = TileLayerWMS;\n tileLayer.wms = tileLayerWMS;\n\n /*\n * @class Renderer\n * @inherits Layer\n * @aka L.Renderer\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 * @event update: Event\n * Fired when the renderer updates its bounds, center and zoom, for example when\n * its map has moved\n */\n\n var Renderer = Layer.extend({\n\n \t// @section\n \t// @aka Renderer options\n \toptions: {\n \t\t// @option padding: Number = 0.1\n \t\t// How much to extend the clip area around the map view (relative to its size)\n \t\t// e.g. 0.1 would be 10% of map view in each direction\n \t\tpadding: 0.1,\n\n \t\t// @option tolerance: Number = 0\n \t\t// How much to extend click tolerance round a path/object on the map\n \t\ttolerance : 0\n \t},\n\n \tinitialize: function (options) {\n \t\tsetOptions(this, options);\n \t\tstamp(this);\n \t\tthis._layers = this._layers || {};\n \t},\n\n \tonAdd: function () {\n \t\tif (!this._container) {\n \t\t\tthis._initContainer(); // defined by renderer implementations\n\n \t\t\tif (this._zoomAnimated) {\n \t\t\t\taddClass(this._container, 'leaflet-zoom-animated');\n \t\t\t}\n \t\t}\n\n \t\tthis.getPane().appendChild(this._container);\n \t\tthis._update();\n \t\tthis.on('update', this._updatePaths, this);\n \t},\n\n \tonRemove: function () {\n \t\tthis.off('update', this._updatePaths, this);\n \t\tthis._destroyContainer();\n \t},\n\n \tgetEvents: function () {\n \t\tvar events = {\n \t\t\tviewreset: this._reset,\n \t\t\tzoom: this._onZoom,\n \t\t\tmoveend: this._update,\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\treturn events;\n \t},\n\n \t_onAnimZoom: function (ev) {\n \t\tthis._updateTransform(ev.center, ev.zoom);\n \t},\n\n \t_onZoom: function () {\n \t\tthis._updateTransform(this._map.getCenter(), this._map.getZoom());\n \t},\n\n \t_updateTransform: function (center, zoom) {\n \t\tvar scale = this._map.getZoomScale(zoom, this._zoom),\n \t\t position = getPosition(this._container),\n \t\t viewHalf = this._map.getSize().multiplyBy(0.5 + this.options.padding),\n \t\t currentCenterPoint = this._map.project(this._center, zoom),\n \t\t destCenterPoint = this._map.project(center, zoom),\n \t\t centerOffset = destCenterPoint.subtract(currentCenterPoint),\n\n \t\t topLeftOffset = viewHalf.multiplyBy(-scale).add(position).add(viewHalf).subtract(centerOffset);\n\n \t\tif (any3d) {\n \t\t\tsetTransform(this._container, topLeftOffset, scale);\n \t\t} else {\n \t\t\tsetPosition(this._container, topLeftOffset);\n \t\t}\n \t},\n\n \t_reset: function () {\n \t\tthis._update();\n \t\tthis._updateTransform(this._center, this._zoom);\n\n \t\tfor (var id in this._layers) {\n \t\t\tthis._layers[id]._reset();\n \t\t}\n \t},\n\n \t_onZoomEnd: function () {\n \t\tfor (var id in this._layers) {\n \t\t\tthis._layers[id]._project();\n \t\t}\n \t},\n\n \t_updatePaths: function () {\n \t\tfor (var id in this._layers) {\n \t\t\tthis._layers[id]._update();\n \t\t}\n \t},\n\n \t_update: function () {\n \t\t// Update pixel bounds of renderer container (for positioning/sizing/clipping later)\n \t\t// Subclasses are responsible of firing the 'update' event.\n \t\tvar p = this.options.padding,\n \t\t size = this._map.getSize(),\n \t\t min = 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}\n });\n\n /*\n * @class Canvas\n * @inherits Renderer\n * @aka L.Canvas\n *\n * Allows vector layers to be displayed with [`<canvas>`](https://developer.mozilla.org/docs/Web/API/Canvas_API).\n * Inherits `Renderer`.\n *\n * Due to [technical limitations](http://caniuse.com/#search=canvas), Canvas is not\n * available in all web browsers, notably IE8, and overlapping geometries might\n * not display properly in some edge cases.\n *\n * @example\n *\n * Use Canvas by default for all paths in the map:\n *\n * ```js\n * var map = L.map('map', {\n * \trenderer: L.canvas()\n * });\n * ```\n *\n * Use a Canvas renderer with extra padding for specific vector geometries:\n *\n * ```js\n * var map = L.map('map');\n * var myRenderer = L.canvas({ padding: 0.5 });\n * var line = L.polyline( coordinates, { renderer: myRenderer } );\n * var circle = L.circle( center, { renderer: myRenderer } );\n * ```\n */\n\n var Canvas = Renderer.extend({\n \tgetEvents: function () {\n \t\tvar events = Renderer.prototype.getEvents.call(this);\n \t\tevents.viewprereset = this._onViewPreReset;\n \t\treturn events;\n \t},\n\n \t_onViewPreReset: function () {\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: function () {\n \t\tRenderer.prototype.onAdd.call(this);\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 \t_initContainer: function () {\n \t\tvar container = this._container = document.createElement('canvas');\n\n \t\ton(container, 'mousemove', this._onMouseMove, this);\n \t\ton(container, 'click dblclick mousedown mouseup contextmenu', this._onClick, this);\n \t\ton(container, 'mouseout', this._handleMouseOut, this);\n\n \t\tthis._ctx = container.getContext('2d');\n \t},\n\n \t_destroyContainer: function () {\n \t\tcancelAnimFrame(this._redrawRequest);\n \t\tdelete this._ctx;\n \t\tremove(this._container);\n \t\toff(this._container);\n \t\tdelete this._container;\n \t},\n\n \t_updatePaths: function () {\n \t\tif (this._postponeUpdatePaths) { return; }\n\n \t\tvar layer;\n \t\tthis._redrawBounds = null;\n \t\tfor (var id in this._layers) {\n \t\t\tlayer = this._layers[id];\n \t\t\tlayer._update();\n \t\t}\n \t\tthis._redraw();\n \t},\n\n \t_update: function () {\n \t\tif (this._map._animatingZoom && this._bounds) { return; }\n\n \t\tRenderer.prototype._update.call(this);\n\n \t\tvar b = this._bounds,\n \t\t container = this._container,\n \t\t size = b.getSize(),\n \t\t m = retina ? 2 : 1;\n\n \t\tsetPosition(container, b.min);\n\n \t\t// set canvas size (also clearing it); use double size on retina\n \t\tcontainer.width = m * size.x;\n \t\tcontainer.height = m * size.y;\n \t\tcontainer.style.width = size.x + 'px';\n \t\tcontainer.style.height = size.y + 'px';\n\n \t\tif (retina) {\n \t\t\tthis._ctx.scale(2, 2);\n \t\t}\n\n \t\t// translate so we use the same path coordinates after canvas element moves\n \t\tthis._ctx.translate(-b.min.x, -b.min.y);\n\n \t\t// Tell paths to redraw themselves\n \t\tthis.fire('update');\n \t},\n\n \t_reset: function () {\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: function (layer) {\n \t\tthis._updateDashArray(layer);\n \t\tthis._layers[stamp(layer)] = layer;\n\n \t\tvar order = layer._order = {\n \t\t\tlayer: layer,\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._drawFirst || this._drawLast;\n \t},\n\n \t_addPath: function (layer) {\n \t\tthis._requestRedraw(layer);\n \t},\n\n \t_removePath: function (layer) {\n \t\tvar order = layer._order;\n \t\tvar next = order.next;\n \t\tvar 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: function (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: function (layer) {\n \t\tthis._updateDashArray(layer);\n \t\tthis._requestRedraw(layer);\n \t},\n\n \t_updateDashArray: function (layer) {\n \t\tif (typeof layer.options.dashArray === 'string') {\n \t\t\tvar parts = layer.options.dashArray.split(/[, ]+/),\n \t\t\t dashArray = [],\n \t\t\t dashValue,\n \t\t\t i;\n \t\t\tfor (i = 0; i < parts.length; i++) {\n \t\t\t\tdashValue = Number(parts[i]);\n \t\t\t\t// Ignore dash array containing invalid lengths\n \t\t\t\tif (isNaN(dashValue)) { return; }\n \t\t\t\tdashArray.push(dashValue);\n \t\t\t}\n \t\t\tlayer.options._dashArray = dashArray;\n \t\t} else {\n \t\t\tlayer.options._dashArray = layer.options.dashArray;\n \t\t}\n \t},\n\n \t_requestRedraw: function (layer) {\n \t\tif (!this._map) { return; }\n\n \t\tthis._extendRedrawBounds(layer);\n \t\tthis._redrawRequest = this._redrawRequest || requestAnimFrame(this._redraw, this);\n \t},\n\n \t_extendRedrawBounds: function (layer) {\n \t\tif (layer._pxBounds) {\n \t\t\tvar padding = (layer.options.weight || 0) + 1;\n \t\t\tthis._redrawBounds = this._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: function () {\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: function () {\n \t\tvar bounds = this._redrawBounds;\n \t\tif (bounds) {\n \t\t\tvar 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: function () {\n \t\tvar layer, bounds = this._redrawBounds;\n \t\tthis._ctx.save();\n \t\tif (bounds) {\n \t\t\tvar 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 (var 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: function (layer, closed) {\n \t\tif (!this._drawing) { return; }\n\n \t\tvar i, j, len2, p,\n \t\t parts = layer._parts,\n \t\t len = parts.length,\n \t\t ctx = this._ctx;\n\n \t\tif (!len) { return; }\n\n \t\tctx.beginPath();\n\n \t\tfor (i = 0; i < len; i++) {\n \t\t\tfor (j = 0, len2 = parts[i].length; j < len2; j++) {\n \t\t\t\tp = parts[i][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: function (layer) {\n\n \t\tif (!this._drawing || layer._empty()) { return; }\n\n \t\tvar p = layer._point,\n \t\t ctx = this._ctx,\n \t\t r = Math.max(Math.round(layer._radius), 1),\n \t\t s = (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: function (ctx, layer) {\n \t\tvar 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.setLineDash(layer.options && layer.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 mouse events for individual drawn objects,\n \t// so we emulate that by calculating what's under the mouse on mousemove/click manually\n\n \t_onClick: function (e) {\n \t\tvar point = this._map.mouseEventToLayerPoint(e), layer, clickedLayer;\n\n \t\tfor (var 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\tif (clickedLayer) {\n \t\t\tfakeStop(e);\n \t\t\tthis._fireEvent([clickedLayer], e);\n \t\t}\n \t},\n\n \t_onMouseMove: function (e) {\n \t\tif (!this._map || this._map.dragging.moving() || this._map._animatingZoom) { return; }\n\n \t\tvar point = this._map.mouseEventToLayerPoint(e);\n \t\tthis._handleMouseHover(e, point);\n \t},\n\n\n \t_handleMouseOut: function (e) {\n \t\tvar layer = this._hoveredLayer;\n \t\tif (layer) {\n \t\t\t// if we're leaving the layer, fire mouseout\n \t\t\tremoveClass(this._container, 'leaflet-interactive');\n \t\t\tthis._fireEvent([layer], e, 'mouseout');\n \t\t\tthis._hoveredLayer = null;\n \t\t\tthis._mouseHoverThrottled = false;\n \t\t}\n \t},\n\n \t_handleMouseHover: function (e, point) {\n \t\tif (this._mouseHoverThrottled) {\n \t\t\treturn;\n \t\t}\n\n \t\tvar layer, candidateHoveredLayer;\n\n \t\tfor (var 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._handleMouseOut(e);\n\n \t\t\tif (candidateHoveredLayer) {\n \t\t\t\taddClass(this._container, 'leaflet-interactive'); // change cursor\n \t\t\t\tthis._fireEvent([candidateHoveredLayer], e, 'mouseover');\n \t\t\t\tthis._hoveredLayer = candidateHoveredLayer;\n \t\t\t}\n \t\t}\n\n \t\tif (this._hoveredLayer) {\n \t\t\tthis._fireEvent([this._hoveredLayer], e);\n \t\t}\n\n \t\tthis._mouseHoverThrottled = true;\n \t\tsetTimeout(bind(function () {\n \t\t\tthis._mouseHoverThrottled = false;\n \t\t}, this), 32);\n \t},\n\n \t_fireEvent: function (layers, e, type) {\n \t\tthis._map._fireDOMEvent(e, type || e.type, layers);\n \t},\n\n \t_bringToFront: function (layer) {\n \t\tvar order = layer._order;\n\n \t\tif (!order) { return; }\n\n \t\tvar next = order.next;\n \t\tvar 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: function (layer) {\n \t\tvar order = layer._order;\n\n \t\tif (!order) { return; }\n\n \t\tvar next = order.next;\n \t\tvar 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 // @factory L.canvas(options?: Renderer options)\n // Creates a Canvas renderer with the given options.\n function canvas$1(options) {\n \treturn canvas ? new Canvas(options) : null;\n }\n\n /*\n * Thanks to Dmitry Baranovsky and his Raphael library for inspiration!\n */\n\n\n var vmlCreate = (function () {\n \ttry {\n \t\tdocument.namespaces.add('lvml', 'urn:schemas-microsoft-com:vml');\n \t\treturn function (name) {\n \t\t\treturn document.createElement('<lvml:' + name + ' class=\"lvml\">');\n \t\t};\n \t} catch (e) {\n \t\treturn function (name) {\n \t\t\treturn document.createElement('<' + name + ' xmlns=\"urn:schemas-microsoft.com:vml\" class=\"lvml\">');\n \t\t};\n \t}\n })();\n\n\n /*\n * @class SVG\n *\n *\n * VML was deprecated in 2012, which means VML functionality exists only for backwards compatibility\n * with old versions of Internet Explorer.\n */\n\n // mixin to redefine some SVG methods to handle VML syntax which is similar but with some differences\n var vmlMixin = {\n\n \t_initContainer: function () {\n \t\tthis._container = create$1('div', 'leaflet-vml-container');\n \t},\n\n \t_update: function () {\n \t\tif (this._map._animatingZoom) { return; }\n \t\tRenderer.prototype._update.call(this);\n \t\tthis.fire('update');\n \t},\n\n \t_initPath: function (layer) {\n \t\tvar container = layer._container = vmlCreate('shape');\n\n \t\taddClass(container, 'leaflet-vml-shape ' + (this.options.className || ''));\n\n \t\tcontainer.coordsize = '1 1';\n\n \t\tlayer._path = vmlCreate('path');\n \t\tcontainer.appendChild(layer._path);\n\n \t\tthis._updateStyle(layer);\n \t\tthis._layers[stamp(layer)] = layer;\n \t},\n\n \t_addPath: function (layer) {\n \t\tvar container = layer._container;\n \t\tthis._container.appendChild(container);\n\n \t\tif (layer.options.interactive) {\n \t\t\tlayer.addInteractiveTarget(container);\n \t\t}\n \t},\n\n \t_removePath: function (layer) {\n \t\tvar container = layer._container;\n \t\tremove(container);\n \t\tlayer.removeInteractiveTarget(container);\n \t\tdelete this._layers[stamp(layer)];\n \t},\n\n \t_updateStyle: function (layer) {\n \t\tvar stroke = layer._stroke,\n \t\t fill = layer._fill,\n \t\t options = layer.options,\n \t\t container = layer._container;\n\n \t\tcontainer.stroked = !!options.stroke;\n \t\tcontainer.filled = !!options.fill;\n\n \t\tif (options.stroke) {\n \t\t\tif (!stroke) {\n \t\t\t\tstroke = layer._stroke = vmlCreate('stroke');\n \t\t\t}\n \t\t\tcontainer.appendChild(stroke);\n \t\t\tstroke.weight = options.weight + 'px';\n \t\t\tstroke.color = options.color;\n \t\t\tstroke.opacity = options.opacity;\n\n \t\t\tif (options.dashArray) {\n \t\t\t\tstroke.dashStyle = isArray(options.dashArray) ?\n \t\t\t\t options.dashArray.join(' ') :\n \t\t\t\t options.dashArray.replace(/( *, *)/g, ' ');\n \t\t\t} else {\n \t\t\t\tstroke.dashStyle = '';\n \t\t\t}\n \t\t\tstroke.endcap = options.lineCap.replace('butt', 'flat');\n \t\t\tstroke.joinstyle = options.lineJoin;\n\n \t\t} else if (stroke) {\n \t\t\tcontainer.removeChild(stroke);\n \t\t\tlayer._stroke = null;\n \t\t}\n\n \t\tif (options.fill) {\n \t\t\tif (!fill) {\n \t\t\t\tfill = layer._fill = vmlCreate('fill');\n \t\t\t}\n \t\t\tcontainer.appendChild(fill);\n \t\t\tfill.color = options.fillColor || options.color;\n \t\t\tfill.opacity = options.fillOpacity;\n\n \t\t} else if (fill) {\n \t\t\tcontainer.removeChild(fill);\n \t\t\tlayer._fill = null;\n \t\t}\n \t},\n\n \t_updateCircle: function (layer) {\n \t\tvar p = layer._point.round(),\n \t\t r = Math.round(layer._radius),\n \t\t r2 = Math.round(layer._radiusY || r);\n\n \t\tthis._setPath(layer, layer._empty() ? 'M0 0' :\n \t\t\t'AL ' + p.x + ',' + p.y + ' ' + r + ',' + r2 + ' 0,' + (65535 * 360));\n \t},\n\n \t_setPath: function (layer, path) {\n \t\tlayer._path.v = path;\n \t},\n\n \t_bringToFront: function (layer) {\n \t\ttoFront(layer._container);\n \t},\n\n \t_bringToBack: function (layer) {\n \t\ttoBack(layer._container);\n \t}\n };\n\n var create$2 = vml ? vmlCreate : svgCreate;\n\n /*\n * @class SVG\n * @inherits Renderer\n * @aka L.SVG\n *\n * Allows vector layers to be displayed with [SVG](https://developer.mozilla.org/docs/Web/SVG).\n * Inherits `Renderer`.\n *\n * Due to [technical limitations](http://caniuse.com/#search=svg), SVG is not\n * available in all web browsers, notably Android 2.x and 3.x.\n *\n * Although SVG is not available on IE7 and IE8, these browsers support\n * [VML](https://en.wikipedia.org/wiki/Vector_Markup_Language)\n * (a now deprecated technology), and the SVG renderer will fall back to VML in\n * this case.\n *\n * @example\n *\n * Use SVG by default for all paths in the map:\n *\n * ```js\n * var map = L.map('map', {\n * \trenderer: L.svg()\n * });\n * ```\n *\n * Use a SVG renderer with extra padding for specific vector geometries:\n *\n * ```js\n * var map = L.map('map');\n * var myRenderer = L.svg({ padding: 0.5 });\n * var line = L.polyline( coordinates, { renderer: myRenderer } );\n * var circle = L.circle( center, { renderer: myRenderer } );\n * ```\n */\n\n var SVG = Renderer.extend({\n\n \tgetEvents: function () {\n \t\tvar events = Renderer.prototype.getEvents.call(this);\n \t\tevents.zoomstart = this._onZoomStart;\n \t\treturn events;\n \t},\n\n \t_initContainer: function () {\n \t\tthis._container = create$2('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$2('g');\n \t\tthis._container.appendChild(this._rootGroup);\n \t},\n\n \t_destroyContainer: function () {\n \t\tremove(this._container);\n \t\toff(this._container);\n \t\tdelete this._container;\n \t\tdelete this._rootGroup;\n \t\tdelete this._svgSize;\n \t},\n\n \t_onZoomStart: function () {\n \t\t// Drag-then-pinch interactions might mess up the center and zoom.\n \t\t// In this case, the easiest way to prevent this is re-do the renderer\n \t\t// bounds and padding when the zooming starts.\n \t\tthis._update();\n \t},\n\n \t_update: function () {\n \t\tif (this._map._animatingZoom && this._bounds) { return; }\n\n \t\tRenderer.prototype._update.call(this);\n\n \t\tvar b = this._bounds,\n \t\t size = b.getSize(),\n \t\t container = this._container;\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\tcontainer.setAttribute('width', size.x);\n \t\t\tcontainer.setAttribute('height', size.y);\n \t\t}\n\n \t\t// movement: update container viewBox so that we don't have to change coordinates of individual layers\n \t\tsetPosition(container, b.min);\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: function (layer) {\n \t\tvar path = layer._path = create$2('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\taddClass(path, layer.options.className);\n \t\t}\n\n \t\tif (layer.options.interactive) {\n \t\t\taddClass(path, 'leaflet-interactive');\n \t\t}\n\n \t\tthis._updateStyle(layer);\n \t\tthis._layers[stamp(layer)] = layer;\n \t},\n\n \t_addPath: function (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: function (layer) {\n \t\tremove(layer._path);\n \t\tlayer.removeInteractiveTarget(layer._path);\n \t\tdelete this._layers[stamp(layer)];\n \t},\n\n \t_updatePath: function (layer) {\n \t\tlayer._project();\n \t\tlayer._update();\n \t},\n\n \t_updateStyle: function (layer) {\n \t\tvar path = layer._path,\n \t\t options = 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: function (layer, closed) {\n \t\tthis._setPath(layer, pointsToPath(layer._parts, closed));\n \t},\n\n \t_updateCircle: function (layer) {\n \t\tvar p = layer._point,\n \t\t r = Math.max(Math.round(layer._radius), 1),\n \t\t r2 = Math.max(Math.round(layer._radiusY), 1) || r,\n \t\t arc = 'a' + r + ',' + r2 + ' 0 1,0 ';\n\n \t\t// drawing a circle with two half-arcs\n \t\tvar d = layer._empty() ? 'M0 0' :\n \t\t\t'M' + (p.x - r) + ',' + p.y +\n \t\t\tarc + (r * 2) + ',0 ' +\n \t\t\tarc + (-r * 2) + ',0 ';\n\n \t\tthis._setPath(layer, d);\n \t},\n\n \t_setPath: function (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: function (layer) {\n \t\ttoFront(layer._path);\n \t},\n\n \t_bringToBack: function (layer) {\n \t\ttoBack(layer._path);\n \t}\n });\n\n if (vml) {\n \tSVG.include(vmlMixin);\n }\n\n // @namespace SVG\n // @factory L.svg(options?: Renderer options)\n // Creates a SVG renderer with the given options.\n function svg$1(options) {\n \treturn svg || vml ? new SVG(options) : null;\n }\n\n Map.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: function (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\tvar 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: function (name) {\n \t\tif (name === 'overlayPane' || name === undefined) {\n \t\t\treturn false;\n \t\t}\n\n \t\tvar 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: function (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 && canvas$1(options)) || svg$1(options);\n \t}\n });\n\n /*\n * L.Rectangle extends Polygon and creates a rectangle when passed a LatLngBounds object.\n */\n\n /*\n * @class Rectangle\n * @aka L.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 * var bounds = [[54.559322, -5.767822], [56.1210604, -3.021240]];\n *\n * // create an orange rectangle\n * L.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\n var Rectangle = Polygon.extend({\n \tinitialize: function (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: function (latLngBounds) {\n \t\treturn this.setLatLngs(this._boundsToLatLngs(latLngBounds));\n \t},\n\n \t_boundsToLatLngs: function (latLngBounds) {\n \t\tlatLngBounds = toLatLngBounds(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\n\n // @factory L.rectangle(latLngBounds: LatLngBounds, options?: Polyline options)\n function rectangle(latLngBounds, options) {\n \treturn new Rectangle(latLngBounds, options);\n }\n\n SVG.create = create$2;\n SVG.pointsToPath = pointsToPath;\n\n GeoJSON.geometryToLayer = geometryToLayer;\n GeoJSON.coordsToLatLng = coordsToLatLng;\n GeoJSON.coordsToLatLngs = coordsToLatLngs;\n GeoJSON.latLngToCoords = latLngToCoords;\n GeoJSON.latLngsToCoords = latLngsToCoords;\n GeoJSON.getFeature = getFeature;\n GeoJSON.asFeature = asFeature;\n\n /*\n * L.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\n Map.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 mouse while pressing the shift key.\n \tboxZoom: true\n });\n\n var BoxZoom = Handler.extend({\n \tinitialize: function (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: function () {\n \t\ton(this._container, 'mousedown', this._onMouseDown, this);\n \t},\n\n \tremoveHooks: function () {\n \t\toff(this._container, 'mousedown', this._onMouseDown, this);\n \t},\n\n \tmoved: function () {\n \t\treturn this._moved;\n \t},\n\n \t_destroy: function () {\n \t\tremove(this._pane);\n \t\tdelete this._pane;\n \t},\n\n \t_resetState: function () {\n \t\tthis._resetStateTimeout = 0;\n \t\tthis._moved = false;\n \t},\n\n \t_clearDeferredResetState: function () {\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_onMouseDown: function (e) {\n \t\tif (!e.shiftKey || ((e.which !== 1) && (e.button !== 1))) { 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.mouseEventToContainerPoint(e);\n\n \t\ton(document, {\n \t\t\tcontextmenu: stop,\n \t\t\tmousemove: this._onMouseMove,\n \t\t\tmouseup: this._onMouseUp,\n \t\t\tkeydown: this._onKeyDown\n \t\t}, this);\n \t},\n\n \t_onMouseMove: function (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\taddClass(this._container, 'leaflet-crosshair');\n\n \t\t\tthis._map.fire('boxzoomstart');\n \t\t}\n\n \t\tthis._point = this._map.mouseEventToContainerPoint(e);\n\n \t\tvar bounds = new Bounds(this._point, this._startPoint),\n \t\t size = 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: function () {\n \t\tif (this._moved) {\n \t\t\tremove(this._box);\n \t\t\tremoveClass(this._container, '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\tmousemove: this._onMouseMove,\n \t\t\tmouseup: this._onMouseUp,\n \t\t\tkeydown: this._onKeyDown\n \t\t}, this);\n \t},\n\n \t_onMouseUp: function (e) {\n \t\tif ((e.which !== 1) && (e.button !== 1)) { 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(bind(this._resetState, this), 0);\n\n \t\tvar bounds = new LatLngBounds(\n \t\t this._map.containerPointToLatLng(this._startPoint),\n \t\t this._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: function (e) {\n \t\tif (e.keyCode === 27) {\n \t\t\tthis._finish();\n \t\t}\n \t}\n });\n\n // @section Handlers\n // @property boxZoom: Handler\n // Box (shift-drag with mouse) zoom handler.\n Map.addInitHook('addHandler', 'boxZoom', BoxZoom);\n\n /*\n * L.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\n Map.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 mouse was.\n \tdoubleClickZoom: true\n });\n\n var DoubleClickZoom = Handler.extend({\n \taddHooks: function () {\n \t\tthis._map.on('dblclick', this._onDoubleClick, this);\n \t},\n\n \tremoveHooks: function () {\n \t\tthis._map.off('dblclick', this._onDoubleClick, this);\n \t},\n\n \t_onDoubleClick: function (e) {\n \t\tvar map = this._map,\n \t\t oldZoom = map.getZoom(),\n \t\t delta = map.options.zoomDelta,\n \t\t zoom = 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.\n Map.addInitHook('addHandler', 'doubleClickZoom', DoubleClickZoom);\n\n /*\n * L.Handler.MapDrag is used to make the map draggable (with panning inertia), enabled by default.\n */\n\n // @namespace Map\n // @section Interaction Options\n Map.mergeOptions({\n \t// @option dragging: Boolean = true\n \t// Whether the map be draggable with mouse/touch 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 unless running on old Android devices.\n \tinertia: !android23,\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\n var Drag = Handler.extend({\n \taddHooks: function () {\n \t\tif (!this._draggable) {\n \t\t\tvar 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\taddClass(this._map._container, 'leaflet-grab leaflet-touch-drag');\n \t\tthis._draggable.enable();\n \t\tthis._positions = [];\n \t\tthis._times = [];\n \t},\n\n \tremoveHooks: function () {\n \t\tremoveClass(this._map._container, 'leaflet-grab');\n \t\tremoveClass(this._map._container, 'leaflet-touch-drag');\n \t\tthis._draggable.disable();\n \t},\n\n \tmoved: function () {\n \t\treturn this._draggable && this._draggable._moved;\n \t},\n\n \tmoving: function () {\n \t\treturn this._draggable && this._draggable._moving;\n \t},\n\n \t_onDragStart: function () {\n \t\tvar map = this._map;\n\n \t\tmap._stop();\n \t\tif (this._map.options.maxBounds && this._map.options.maxBoundsViscosity) {\n \t\t\tvar bounds = toLatLngBounds(this._map.options.maxBounds);\n\n \t\t\tthis._offsetLimit = toBounds(\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 .fire('movestart')\n \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: function (e) {\n \t\tif (this._map.options.inertia) {\n \t\t\tvar time = this._lastTime = +new Date(),\n \t\t\t pos = 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 .fire('move', e)\n \t\t .fire('drag', e);\n \t},\n\n \t_prunePositions: function (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: function () {\n \t\tvar pxCenter = this._map.getSize().divideBy(2),\n \t\t pxWorldCenter = 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: function (value, threshold) {\n \t\treturn value - (value - threshold) * this._viscosity;\n \t},\n\n \t_onPreDragLimit: function () {\n \t\tif (!this._viscosity || !this._offsetLimit) { return; }\n\n \t\tvar offset = this._draggable._newPos.subtract(this._draggable._startPos);\n\n \t\tvar 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: function () {\n \t\t// TODO refactor to be able to adjust map pane position after zoom\n \t\tvar worldWidth = this._worldWidth,\n \t\t halfWidth = Math.round(worldWidth / 2),\n \t\t dx = this._initialWorldOffset,\n \t\t x = this._draggable._newPos.x,\n \t\t newX1 = (x - halfWidth + dx) % worldWidth + halfWidth - dx,\n \t\t newX2 = (x + halfWidth + dx) % worldWidth - halfWidth - dx,\n \t\t newX = 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: function (e) {\n \t\tvar map = this._map,\n \t\t options = map.options,\n\n \t\t noInertia = !options.inertia || 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\tvar direction = this._lastPos.subtract(this._positions[0]),\n \t\t\t duration = (this._lastTime - this._times[0]) / 1000,\n \t\t\t ease = options.easeLinearity,\n\n \t\t\t speedVector = direction.multiplyBy(ease / duration),\n \t\t\t speed = speedVector.distanceTo([0, 0]),\n\n \t\t\t limitedSpeed = Math.min(options.inertiaMaxSpeed, speed),\n \t\t\t limitedSpeedVector = speedVector.multiplyBy(limitedSpeed / speed),\n\n \t\t\t decelerationDuration = limitedSpeed / (options.inertiaDeceleration * ease),\n \t\t\t 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\trequestAnimFrame(function () {\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 (by both mouse and touch).\n Map.addInitHook('addHandler', 'dragging', Drag);\n\n /*\n * L.Map.Keyboard is handling keyboard interaction with the map, enabled by default.\n */\n\n // @namespace Map\n // @section Keyboard Navigation Options\n Map.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\n var Keyboard = Handler.extend({\n\n \tkeyCodes: {\n \t\tleft: [37],\n \t\tright: [39],\n \t\tdown: [40],\n \t\tup: [38],\n \t\tzoomIn: [187, 107, 61, 171],\n \t\tzoomOut: [189, 109, 54, 173]\n \t},\n\n \tinitialize: function (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: function () {\n \t\tvar 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\ton(container, {\n \t\t\tfocus: this._onFocus,\n \t\t\tblur: this._onBlur,\n \t\t\tmousedown: this._onMouseDown\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: function () {\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\tmousedown: this._onMouseDown\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_onMouseDown: function () {\n \t\tif (this._focused) { return; }\n\n \t\tvar body = document.body,\n \t\t docEl = document.documentElement,\n \t\t top = body.scrollTop || docEl.scrollTop,\n \t\t left = body.scrollLeft || docEl.scrollLeft;\n\n \t\tthis._map._container.focus();\n\n \t\twindow.scrollTo(left, top);\n \t},\n\n \t_onFocus: function () {\n \t\tthis._focused = true;\n \t\tthis._map.fire('focus');\n \t},\n\n \t_onBlur: function () {\n \t\tthis._focused = false;\n \t\tthis._map.fire('blur');\n \t},\n\n \t_setPanDelta: function (panDelta) {\n \t\tvar keys = this._panKeys = {},\n \t\t codes = this.keyCodes,\n \t\t i, len;\n\n \t\tfor (i = 0, len = codes.left.length; i < len; i++) {\n \t\t\tkeys[codes.left[i]] = [-1 * panDelta, 0];\n \t\t}\n \t\tfor (i = 0, len = codes.right.length; i < len; i++) {\n \t\t\tkeys[codes.right[i]] = [panDelta, 0];\n \t\t}\n \t\tfor (i = 0, len = codes.down.length; i < len; i++) {\n \t\t\tkeys[codes.down[i]] = [0, panDelta];\n \t\t}\n \t\tfor (i = 0, len = codes.up.length; i < len; i++) {\n \t\t\tkeys[codes.up[i]] = [0, -1 * panDelta];\n \t\t}\n \t},\n\n \t_setZoomDelta: function (zoomDelta) {\n \t\tvar keys = this._zoomKeys = {},\n \t\t codes = this.keyCodes,\n \t\t i, len;\n\n \t\tfor (i = 0, len = codes.zoomIn.length; i < len; i++) {\n \t\t\tkeys[codes.zoomIn[i]] = zoomDelta;\n \t\t}\n \t\tfor (i = 0, len = codes.zoomOut.length; i < len; i++) {\n \t\t\tkeys[codes.zoomOut[i]] = -zoomDelta;\n \t\t}\n \t},\n\n \t_addHooks: function () {\n \t\ton(document, 'keydown', this._onKeyDown, this);\n \t},\n\n \t_removeHooks: function () {\n \t\toff(document, 'keydown', this._onKeyDown, this);\n \t},\n\n \t_onKeyDown: function (e) {\n \t\tif (e.altKey || e.ctrlKey || e.metaKey) { return; }\n\n \t\tvar key = e.keyCode,\n \t\t map = this._map,\n \t\t 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 = toPoint(offset).multiplyBy(3);\n \t\t\t\t}\n\n \t\t\t\tmap.panBy(offset);\n\n \t\t\t\tif (map.options.maxBounds) {\n \t\t\t\t\tmap.panInsideBounds(map.options.maxBounds);\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 === 27 && 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.\n Map.addInitHook('addHandler', 'keyboard', Keyboard);\n\n /*\n * L.Handler.ScrollWheelZoom is used by L.Map to enable mouse scroll wheel zoom on the map.\n */\n\n // @namespace Map\n // @section Interaction Options\n Map.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 mouse 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\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 [L.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\n var ScrollWheelZoom = Handler.extend({\n \taddHooks: function () {\n \t\ton(this._map._container, 'wheel', this._onWheelScroll, this);\n\n \t\tthis._delta = 0;\n \t},\n\n \tremoveHooks: function () {\n \t\toff(this._map._container, 'wheel', this._onWheelScroll, this);\n \t},\n\n \t_onWheelScroll: function (e) {\n \t\tvar delta = getWheelDelta(e);\n\n \t\tvar debounce = this._map.options.wheelDebounceTime;\n\n \t\tthis._delta += delta;\n \t\tthis._lastMousePos = this._map.mouseEventToContainerPoint(e);\n\n \t\tif (!this._startTime) {\n \t\t\tthis._startTime = +new Date();\n \t\t}\n\n \t\tvar left = Math.max(debounce - (+new Date() - this._startTime), 0);\n\n \t\tclearTimeout(this._timer);\n \t\tthis._timer = setTimeout(bind(this._performZoom, this), left);\n\n \t\tstop(e);\n \t},\n\n \t_performZoom: function () {\n \t\tvar map = this._map,\n \t\t zoom = map.getZoom(),\n \t\t snap = 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\tvar d2 = this._delta / (this._map.options.wheelPxPerZoomLevel * 4),\n \t\t d3 = 4 * Math.log(2 / (1 + Math.exp(-Math.abs(d2)))) / Math.LN2,\n \t\t d4 = snap ? Math.ceil(d3 / snap) * snap : d3,\n \t\t delta = 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.\n Map.addInitHook('addHandler', 'scrollWheelZoom', ScrollWheelZoom);\n\n /*\n * L.Map.Tap is used to enable mobile hacks like quick taps and long hold.\n */\n\n // @namespace Map\n // @section Interaction Options\n Map.mergeOptions({\n \t// @section Touch interaction options\n \t// @option tap: Boolean = true\n \t// Enables mobile hacks for supporting instant taps (fixing 200ms click\n \t// delay on iOS/Android) and touch holds (fired as `contextmenu` events).\n \ttap: true,\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\n var Tap = Handler.extend({\n \taddHooks: function () {\n \t\ton(this._map._container, 'touchstart', this._onDown, this);\n \t},\n\n \tremoveHooks: function () {\n \t\toff(this._map._container, 'touchstart', this._onDown, this);\n \t},\n\n \t_onDown: function (e) {\n \t\tif (!e.touches) { return; }\n\n \t\tpreventDefault(e);\n\n \t\tthis._fireClick = true;\n\n \t\t// don't simulate click or track longpress if more than 1 touch\n \t\tif (e.touches.length > 1) {\n \t\t\tthis._fireClick = false;\n \t\t\tclearTimeout(this._holdTimeout);\n \t\t\treturn;\n \t\t}\n\n \t\tvar first = e.touches[0],\n \t\t el = first.target;\n\n \t\tthis._startPos = this._newPos = new Point(first.clientX, first.clientY);\n\n \t\t// if touching a link, highlight it\n \t\tif (el.tagName && el.tagName.toLowerCase() === 'a') {\n \t\t\taddClass(el, 'leaflet-active');\n \t\t}\n\n \t\t// simulate long hold but setting a timeout\n \t\tthis._holdTimeout = setTimeout(bind(function () {\n \t\t\tif (this._isTapValid()) {\n \t\t\t\tthis._fireClick = false;\n \t\t\t\tthis._onUp();\n \t\t\t\tthis._simulateEvent('contextmenu', first);\n \t\t\t}\n \t\t}, this), 1000);\n\n \t\tthis._simulateEvent('mousedown', first);\n\n \t\ton(document, {\n \t\t\ttouchmove: this._onMove,\n \t\t\ttouchend: this._onUp\n \t\t}, this);\n \t},\n\n \t_onUp: function (e) {\n \t\tclearTimeout(this._holdTimeout);\n\n \t\toff(document, {\n \t\t\ttouchmove: this._onMove,\n \t\t\ttouchend: this._onUp\n \t\t}, this);\n\n \t\tif (this._fireClick && e && e.changedTouches) {\n\n \t\t\tvar first = e.changedTouches[0],\n \t\t\t el = first.target;\n\n \t\t\tif (el && el.tagName && el.tagName.toLowerCase() === 'a') {\n \t\t\t\tremoveClass(el, 'leaflet-active');\n \t\t\t}\n\n \t\t\tthis._simulateEvent('mouseup', first);\n\n \t\t\t// simulate click if the touch didn't move too much\n \t\t\tif (this._isTapValid()) {\n \t\t\t\tthis._simulateEvent('click', first);\n \t\t\t}\n \t\t}\n \t},\n\n \t_isTapValid: function () {\n \t\treturn this._newPos.distanceTo(this._startPos) <= this._map.options.tapTolerance;\n \t},\n\n \t_onMove: function (e) {\n \t\tvar first = e.touches[0];\n \t\tthis._newPos = new Point(first.clientX, first.clientY);\n \t\tthis._simulateEvent('mousemove', first);\n \t},\n\n \t_simulateEvent: function (type, e) {\n \t\tvar simulatedEvent = document.createEvent('MouseEvents');\n\n \t\tsimulatedEvent._simulated = true;\n \t\te.target._simulatedClick = true;\n\n \t\tsimulatedEvent.initMouseEvent(\n \t\t type, true, true, window, 1,\n \t\t e.screenX, e.screenY,\n \t\t e.clientX, e.clientY,\n \t\t false, false, false, false, 0, null);\n\n \t\te.target.dispatchEvent(simulatedEvent);\n \t}\n });\n\n // @section Handlers\n // @property tap: Handler\n // Mobile touch hacks (quick tap and touch hold) handler.\n if (touch && (!pointer || safari)) {\n \tMap.addInitHook('addHandler', 'tap', Tap);\n }\n\n /*\n * L.Handler.TouchZoom is used by L.Map to add pinch zoom on supported mobile browsers.\n */\n\n // @namespace Map\n // @section Interaction Options\n Map.mergeOptions({\n \t// @section Touch interaction options\n \t// @option touchZoom: 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 except for old Androids.\n \ttouchZoom: touch && !android23,\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\n var TouchZoom = Handler.extend({\n \taddHooks: function () {\n \t\taddClass(this._map._container, 'leaflet-touch-zoom');\n \t\ton(this._map._container, 'touchstart', this._onTouchStart, this);\n \t},\n\n \tremoveHooks: function () {\n \t\tremoveClass(this._map._container, 'leaflet-touch-zoom');\n \t\toff(this._map._container, 'touchstart', this._onTouchStart, this);\n \t},\n\n \t_onTouchStart: function (e) {\n \t\tvar map = this._map;\n \t\tif (!e.touches || e.touches.length !== 2 || map._animatingZoom || this._zooming) { return; }\n\n \t\tvar p1 = map.mouseEventToContainerPoint(e.touches[0]),\n \t\t p2 = map.mouseEventToContainerPoint(e.touches[1]);\n\n \t\tthis._centerPoint = map.getSize()._divideBy(2);\n \t\tthis._startLatLng = map.containerPointToLatLng(this._centerPoint);\n \t\tif (map.options.touchZoom !== '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, 'touchmove', this._onTouchMove, this);\n \t\ton(document, 'touchend', this._onTouchEnd, this);\n\n \t\tpreventDefault(e);\n \t},\n\n \t_onTouchMove: function (e) {\n \t\tif (!e.touches || e.touches.length !== 2 || !this._zooming) { return; }\n\n \t\tvar map = this._map,\n \t\t p1 = map.mouseEventToContainerPoint(e.touches[0]),\n \t\t p2 = map.mouseEventToContainerPoint(e.touches[1]),\n \t\t scale = 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.touchZoom === '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\tvar 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\tcancelAnimFrame(this._animRequest);\n\n \t\tvar moveFn = bind(map._move, map, this._center, this._zoom, {pinch: true, round: false});\n \t\tthis._animRequest = requestAnimFrame(moveFn, this, true);\n\n \t\tpreventDefault(e);\n \t},\n\n \t_onTouchEnd: function () {\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\tcancelAnimFrame(this._animRequest);\n\n \t\toff(document, 'touchmove', this._onTouchMove, this);\n \t\toff(document, 'touchend', this._onTouchEnd, 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 touchZoom: Handler\n // Touch zoom handler.\n Map.addInitHook('addHandler', 'touchZoom', TouchZoom);\n\n Map.BoxZoom = BoxZoom;\n Map.DoubleClickZoom = DoubleClickZoom;\n Map.Drag = Drag;\n Map.Keyboard = Keyboard;\n Map.ScrollWheelZoom = ScrollWheelZoom;\n Map.Tap = Tap;\n Map.TouchZoom = TouchZoom;\n\n exports.version = version;\n exports.Control = Control;\n exports.control = control;\n exports.Browser = Browser;\n exports.Evented = Evented;\n exports.Mixin = Mixin;\n exports.Util = Util;\n exports.Class = Class;\n exports.Handler = Handler;\n exports.extend = extend;\n exports.bind = bind;\n exports.stamp = stamp;\n exports.setOptions = setOptions;\n exports.DomEvent = DomEvent;\n exports.DomUtil = DomUtil;\n exports.PosAnimation = PosAnimation;\n exports.Draggable = Draggable;\n exports.LineUtil = LineUtil;\n exports.PolyUtil = PolyUtil;\n exports.Point = Point;\n exports.point = toPoint;\n exports.Bounds = Bounds;\n exports.bounds = toBounds;\n exports.Transformation = Transformation;\n exports.transformation = toTransformation;\n exports.Projection = index;\n exports.LatLng = LatLng;\n exports.latLng = toLatLng;\n exports.LatLngBounds = LatLngBounds;\n exports.latLngBounds = toLatLngBounds;\n exports.CRS = CRS;\n exports.GeoJSON = GeoJSON;\n exports.geoJSON = geoJSON;\n exports.geoJson = geoJson;\n exports.Layer = Layer;\n exports.LayerGroup = LayerGroup;\n exports.layerGroup = layerGroup;\n exports.FeatureGroup = FeatureGroup;\n exports.featureGroup = featureGroup;\n exports.ImageOverlay = ImageOverlay;\n exports.imageOverlay = imageOverlay;\n exports.VideoOverlay = VideoOverlay;\n exports.videoOverlay = videoOverlay;\n exports.SVGOverlay = SVGOverlay;\n exports.svgOverlay = svgOverlay;\n exports.DivOverlay = DivOverlay;\n exports.Popup = Popup;\n exports.popup = popup;\n exports.Tooltip = Tooltip;\n exports.tooltip = tooltip;\n exports.Icon = Icon;\n exports.icon = icon;\n exports.DivIcon = DivIcon;\n exports.divIcon = divIcon;\n exports.Marker = Marker;\n exports.marker = marker;\n exports.TileLayer = TileLayer;\n exports.tileLayer = tileLayer;\n exports.GridLayer = GridLayer;\n exports.gridLayer = gridLayer;\n exports.SVG = SVG;\n exports.svg = svg$1;\n exports.Renderer = Renderer;\n exports.Canvas = Canvas;\n exports.canvas = canvas$1;\n exports.Path = Path;\n exports.CircleMarker = CircleMarker;\n exports.circleMarker = circleMarker;\n exports.Circle = Circle;\n exports.circle = circle;\n exports.Polyline = Polyline;\n exports.polyline = polyline;\n exports.Polygon = Polygon;\n exports.polygon = polygon;\n exports.Rectangle = Rectangle;\n exports.rectangle = rectangle;\n exports.Map = Map;\n exports.map = createMap;\n\n var oldL = window.L;\n exports.noConflict = function() {\n \twindow.L = oldL;\n \treturn this;\n }\n\n // Always export us to window global (see #2364)\n window.L = exports;\n\n})));\n//# sourceMappingURL=leaflet-src.js.map\n","<script>\n\n import { map_store } from '../lib/stores.js';\n let last_click_latlng;\n\n let map_center;\n let map_zoom;\n let map_viewbox;\n let view_on_osm_link;\n let last_click;\n let mouse_position;\n\n function map_link_to_osm(map) {\n var zoom = map.getZoom();\n var lat = map.getCenter().lat.toFixed(5);\n var lng = map.getCenter().lng.toFixed(5);\n return 'https://openstreetmap.org/#map=' + zoom + '/' + lat + '/' + lng;\n }\n\n function map_viewbox_as_string(map) {\n var bounds = map.getBounds();\n var west = bounds.getWest();\n var east = bounds.getEast();\n\n if ((east - west) >= 360) { // covers more than whole planet\n west = map.getCenter().lng - 179.999;\n east = map.getCenter().lng + 179.999;\n }\n east = L.latLng(77, east).wrap().lng;\n west = L.latLng(77, west).wrap().lng;\n\n return [\n west.toFixed(5), // left\n bounds.getNorth().toFixed(5), // top\n east.toFixed(5), // right\n bounds.getSouth().toFixed(5) // bottom\n ].join(',');\n }\n\n function display_map_position(map, mouse_lat_lng) {\n map_center = map.getCenter().lat.toFixed(5) + ',' + map.getCenter().lng.toFixed(5);\n view_on_osm_link = map_link_to_osm(map);\n map_zoom = map.getZoom();\n map_viewbox = map_viewbox_as_string(map);\n mouse_position = '-';\n if (mouse_lat_lng) {\n mouse_position = [mouse_lat_lng.lat.toFixed(5), mouse_lat_lng.lng.toFixed(5)].join(',');\n }\n if (last_click_latlng) {\n last_click = [last_click_latlng.lat.toFixed(5), last_click_latlng.lng.toFixed(5)].join(',');\n }\n }\n\n\n map_store.subscribe(map => {\n if (!map) return;\n\n map.on('move', function () {\n display_map_position(map);\n // update_viewbox_field();\n });\n\n map.on('mousemove', function (e) {\n display_map_position(map, e.latlng);\n });\n\n map.on('click', function (e) {\n last_click_latlng = e.latlng;\n display_map_position(map);\n });\n\n map.on('load', function () {\n display_map_position(map);\n });\n });\n\n function handleHideClick() {\n document.getElementById('map-position').style.display = 'none';\n document.getElementById('show-map-position').style.display = 'block';\n }\n\n</script>\n\n<div id=\"map-position\">\n <div id=\"map-position-inner\">\n map center: {map_center}\n <a target=\"_blank\" href=\"{view_on_osm_link}\">view on osm.org</a>\n <br>\n map zoom: {map_zoom}\n <br>\n viewbox: {map_viewbox}\n <br>\n last click: {last_click}\n <br>\n mouse position: {mouse_position}\n </div>\n <div id=\"map-position-close\"><a href=\"#hide\" on:click={handleHideClick}>hide</a></div>\n</div>\n\n\n<style>\n #map-position {\n display: none;\n position: absolute;\n top: 0;\n right: 20px;\n padding: 0 5px;\n color: #333;\n font-size: 11px;\n background-color: rgba(255, 255, 255, 0.7);\n z-index: 1000;\n }\n\n #map-position-close {\n text-align: right;\n }\n\n \n \n\n @media (max-width: 768px) {\n #map-position {\n top: 20px;\n right: 20px;\n }\n }\n</style>\n","(function(factory,window){if(typeof define===\"function\"&&define.amd){define([\"leaflet\"],factory)}else if(typeof exports===\"object\"){module.exports=factory(require(\"leaflet\"))}if(typeof window!==\"undefined\"&&window.L){window.L.Control.MiniMap=factory(L);window.L.control.minimap=function(layer,options){return new window.L.Control.MiniMap(layer,options)}}})(function(L){var MiniMap=L.Control.extend({includes:L.Evented?L.Evented.prototype:L.Mixin.Events,options:{position:\"bottomright\",toggleDisplay:false,zoomLevelOffset:-5,zoomLevelFixed:false,centerFixed:false,zoomAnimation:false,autoToggleDisplay:false,minimized:false,width:150,height:150,collapsedWidth:19,collapsedHeight:19,aimingRectOptions:{color:\"#ff7800\",weight:1,clickable:false},shadowRectOptions:{color:\"#000000\",weight:1,clickable:false,opacity:0,fillOpacity:0},strings:{hideText:\"Hide MiniMap\",showText:\"Show MiniMap\"},mapOptions:{}},initialize:function(layer,options){L.Util.setOptions(this,options);this.options.aimingRectOptions.clickable=false;this.options.shadowRectOptions.clickable=false;this._layer=layer},onAdd:function(map){this._mainMap=map;this._container=L.DomUtil.create(\"div\",\"leaflet-control-minimap\");this._container.style.width=this.options.width+\"px\";this._container.style.height=this.options.height+\"px\";L.DomEvent.disableClickPropagation(this._container);L.DomEvent.on(this._container,\"mousewheel\",L.DomEvent.stopPropagation);var mapOptions={attributionControl:false,dragging:!this.options.centerFixed,zoomControl:false,zoomAnimation:this.options.zoomAnimation,autoToggleDisplay:this.options.autoToggleDisplay,touchZoom:this.options.centerFixed?\"center\":!this._isZoomLevelFixed(),scrollWheelZoom:this.options.centerFixed?\"center\":!this._isZoomLevelFixed(),doubleClickZoom:this.options.centerFixed?\"center\":!this._isZoomLevelFixed(),boxZoom:!this._isZoomLevelFixed(),crs:map.options.crs};mapOptions=L.Util.extend(this.options.mapOptions,mapOptions);this._miniMap=new L.Map(this._container,mapOptions);this._miniMap.addLayer(this._layer);this._mainMapMoving=false;this._miniMapMoving=false;this._userToggledDisplay=false;this._minimized=false;if(this.options.toggleDisplay){this._addToggleButton()}this._miniMap.whenReady(L.Util.bind(function(){this._aimingRect=L.rectangle(this._mainMap.getBounds(),this.options.aimingRectOptions).addTo(this._miniMap);this._shadowRect=L.rectangle(this._mainMap.getBounds(),this.options.shadowRectOptions).addTo(this._miniMap);this._mainMap.on(\"moveend\",this._onMainMapMoved,this);this._mainMap.on(\"move\",this._onMainMapMoving,this);this._miniMap.on(\"movestart\",this._onMiniMapMoveStarted,this);this._miniMap.on(\"move\",this._onMiniMapMoving,this);this._miniMap.on(\"moveend\",this._onMiniMapMoved,this)},this));return this._container},addTo:function(map){L.Control.prototype.addTo.call(this,map);var center=this.options.centerFixed||this._mainMap.getCenter();this._miniMap.setView(center,this._decideZoom(true));this._setDisplay(this.options.minimized);return this},onRemove:function(map){this._mainMap.off(\"moveend\",this._onMainMapMoved,this);this._mainMap.off(\"move\",this._onMainMapMoving,this);this._miniMap.off(\"moveend\",this._onMiniMapMoved,this);this._miniMap.removeLayer(this._layer)},changeLayer:function(layer){this._miniMap.removeLayer(this._layer);this._layer=layer;this._miniMap.addLayer(this._layer)},_addToggleButton:function(){this._toggleDisplayButton=this.options.toggleDisplay?this._createButton(\"\",this._toggleButtonInitialTitleText(),\"leaflet-control-minimap-toggle-display leaflet-control-minimap-toggle-display-\"+this.options.position,this._container,this._toggleDisplayButtonClicked,this):undefined;this._toggleDisplayButton.style.width=this.options.collapsedWidth+\"px\";this._toggleDisplayButton.style.height=this.options.collapsedHeight+\"px\"},_toggleButtonInitialTitleText:function(){if(this.options.minimized){return this.options.strings.showText}else{return this.options.strings.hideText}},_createButton:function(html,title,className,container,fn,context){var link=L.DomUtil.create(\"a\",className,container);link.innerHTML=html;link.href=\"#\";link.title=title;var stop=L.DomEvent.stopPropagation;L.DomEvent.on(link,\"click\",stop).on(link,\"mousedown\",stop).on(link,\"dblclick\",stop).on(link,\"click\",L.DomEvent.preventDefault).on(link,\"click\",fn,context);return link},_toggleDisplayButtonClicked:function(){this._userToggledDisplay=true;if(!this._minimized){this._minimize()}else{this._restore()}},_setDisplay:function(minimize){if(minimize!==this._minimized){if(!this._minimized){this._minimize()}else{this._restore()}}},_minimize:function(){if(this.options.toggleDisplay){this._container.style.width=this.options.collapsedWidth+\"px\";this._container.style.height=this.options.collapsedHeight+\"px\";this._toggleDisplayButton.className+=\" minimized-\"+this.options.position;this._toggleDisplayButton.title=this.options.strings.showText}else{this._container.style.display=\"none\"}this._minimized=true;this._onToggle()},_restore:function(){if(this.options.toggleDisplay){this._container.style.width=this.options.width+\"px\";this._container.style.height=this.options.height+\"px\";this._toggleDisplayButton.className=this._toggleDisplayButton.className.replace(\"minimized-\"+this.options.position,\"\");this._toggleDisplayButton.title=this.options.strings.hideText}else{this._container.style.display=\"block\"}this._minimized=false;this._onToggle()},_onMainMapMoved:function(e){if(!this._miniMapMoving){var center=this.options.centerFixed||this._mainMap.getCenter();this._mainMapMoving=true;this._miniMap.setView(center,this._decideZoom(true));this._setDisplay(this._decideMinimized())}else{this._miniMapMoving=false}this._aimingRect.setBounds(this._mainMap.getBounds())},_onMainMapMoving:function(e){this._aimingRect.setBounds(this._mainMap.getBounds())},_onMiniMapMoveStarted:function(e){if(!this.options.centerFixed){var lastAimingRect=this._aimingRect.getBounds();var sw=this._miniMap.latLngToContainerPoint(lastAimingRect.getSouthWest());var ne=this._miniMap.latLngToContainerPoint(lastAimingRect.getNorthEast());this._lastAimingRectPosition={sw:sw,ne:ne}}},_onMiniMapMoving:function(e){if(!this.options.centerFixed){if(!this._mainMapMoving&&this._lastAimingRectPosition){this._shadowRect.setBounds(new L.LatLngBounds(this._miniMap.containerPointToLatLng(this._lastAimingRectPosition.sw),this._miniMap.containerPointToLatLng(this._lastAimingRectPosition.ne)));this._shadowRect.setStyle({opacity:1,fillOpacity:.3})}}},_onMiniMapMoved:function(e){if(!this._mainMapMoving){this._miniMapMoving=true;this._mainMap.setView(this._miniMap.getCenter(),this._decideZoom(false));this._shadowRect.setStyle({opacity:0,fillOpacity:0})}else{this._mainMapMoving=false}},_isZoomLevelFixed:function(){var zoomLevelFixed=this.options.zoomLevelFixed;return this._isDefined(zoomLevelFixed)&&this._isInteger(zoomLevelFixed)},_decideZoom:function(fromMaintoMini){if(!this._isZoomLevelFixed()){if(fromMaintoMini){return this._mainMap.getZoom()+this.options.zoomLevelOffset}else{var currentDiff=this._miniMap.getZoom()-this._mainMap.getZoom();var proposedZoom=this._miniMap.getZoom()-this.options.zoomLevelOffset;var toRet;if(currentDiff>this.options.zoomLevelOffset&&this._mainMap.getZoom()<this._miniMap.getMinZoom()-this.options.zoomLevelOffset){if(this._miniMap.getZoom()>this._lastMiniMapZoom){toRet=this._mainMap.getZoom()+1;this._miniMap.setZoom(this._miniMap.getZoom()-1)}else{toRet=this._mainMap.getZoom()}}else{toRet=proposedZoom}this._lastMiniMapZoom=this._miniMap.getZoom();return toRet}}else{if(fromMaintoMini){return this.options.zoomLevelFixed}else{return this._mainMap.getZoom()}}},_decideMinimized:function(){if(this._userToggledDisplay){return this._minimized}if(this.options.autoToggleDisplay){if(this._mainMap.getBounds().contains(this._miniMap.getBounds())){return true}return false}return this._minimized},_isInteger:function(value){return typeof value===\"number\"},_isDefined:function(value){return typeof value!==\"undefined\"},_onToggle:function(){L.Util.requestAnimFrame(function(){L.DomEvent.on(this._container,\"transitionend\",this._fireToggleEvents,this);if(!L.Browser.any3d){L.Util.requestAnimFrame(this._fireToggleEvents,this)}},this)},_fireToggleEvents:function(){L.DomEvent.off(this._container,\"transitionend\",this._fireToggleEvents,this);var data={minimized:this._minimized};this.fire(this._minimized?\"minimize\":\"restore\",data);this.fire(\"toggle\",data)}});L.Map.mergeOptions({miniMapControl:false});L.Map.addInitHook(function(){if(this.options.miniMapControl){this.miniMapControl=(new MiniMap).addTo(this)}});return MiniMap},window);","\n<script>\n import * as L from 'leaflet';\n import 'leaflet-minimap';\n import 'leaflet/dist/leaflet.css';\n import 'leaflet-minimap/dist/Control.MiniMap.min.css';\n\n import { get } from 'svelte/store';\n import { map_store } from '../lib/stores.js';\n import MapPosition from '../components/MapPosition.svelte';\n\n export let display_minimap = false;\n export let current_result = null;\n export let position_marker = null;\n\n let dataLayers = [];\n\n function createMap(container) {\n const attribution = Nominatim_Config.Map_Tile_Attribution;\n let map = new L.map(container, {\n attributionControl: (attribution && attribution.length),\n scrollWheelZoom: true, // !L.Browser.touch,\n touchZoom: false,\n center: [\n Nominatim_Config.Map_Default_Lat,\n Nominatim_Config.Map_Default_Lon\n ],\n zoom: Nominatim_Config.Map_Default_Zoom\n });\n\n L.tileLayer(Nominatim_Config.Map_Tile_URL, {\n attribution: attribution\n }).addTo(map);\n\n if (display_minimap) {\n let osm2 = new L.TileLayer(Nominatim_Config.Map_Tile_URL, {\n minZoom: 0,\n maxZoom: 13,\n attribution: attribution\n });\n new L.Control.MiniMap(osm2, { toggleDisplay: true }).addTo(map);\n }\n\n const MapPositionControl = L.Control.extend({\n options: { position: 'topright' },\n onAdd: () => { return document.getElementById('show-map-position'); }\n });\n map.addControl(new MapPositionControl());\n\n return map;\n }\n\n function mapAction(container) {\n let map = createMap(container);\n map_store.set(map);\n setMapData(current_result);\n\n return {\n destroy: () => {\n map_store.set(null);\n map.remove();\n }\n };\n }\n\n function parse_and_normalize_geojson_string(part) {\n // normalize places the geometry into a featurecollection, similar to\n // https://github.com/mapbox/geojson-normalize\n var parsed_geojson = {\n type: 'FeatureCollection',\n features: [\n {\n type: 'Feature',\n geometry: part,\n properties: {}\n }\n ]\n };\n return parsed_geojson;\n }\n\n function resetMapData() {\n let map = get(map_store);\n if (!map) { return; }\n\n dataLayers.forEach(function (layer) {\n map.removeLayer(layer);\n });\n }\n\n function setMapData(aFeature) {\n let map = get(map_store);\n if (!map) { return; }\n\n resetMapData();\n\n if (position_marker) {\n // We don't need a marker, but L.circle would change radius when you zoom in/out\n let cm = L.circleMarker(\n position_marker,\n {\n radius: 5,\n weight: 2,\n fillColor: '#ff7800',\n color: 'red',\n opacity: 0.75,\n zIndexOffset: 100,\n clickable: false\n }\n );\n cm.addTo(map);\n dataLayers.push(cm);\n }\n\n var search_params = new URLSearchParams(window.location.search);\n var viewbox = search_params.get('viewbox');\n if (viewbox) {\n let coords = viewbox.split(','); // <x1>,<y1>,<x2>,<y2>\n let bounds = L.latLngBounds([coords[1], coords[0]], [coords[3], coords[2]]);\n L.rectangle(bounds, {\n color: '#69d53e',\n weight: 3,\n dashArray: '5 5',\n opacity: 0.8,\n fill: false\n }).addTo(map);\n }\n\n if (!aFeature) return;\n\n let lat = aFeature.centroid ? aFeature.centroid.coordinates[1] : aFeature.lat;\n let lon = aFeature.centroid ? aFeature.centroid.coordinates[0] : aFeature.lon;\n let geojson = aFeature.geometry || aFeature.geojson;\n\n if (lat && lon) {\n let circle = L.circleMarker([lat, lon], {\n radius: 10, weight: 2, fillColor: '#ff7800', color: 'blue', opacity: 0.75\n });\n map.addLayer(circle);\n dataLayers.push(circle);\n }\n\n\n if (geojson) {\n var geojson_layer = L.geoJson(\n // https://leafletjs.com/reference-1.7.1.html#path-option\n parse_and_normalize_geojson_string(geojson),\n {\n style: function () {\n return { interactive: false, color: 'blue' };\n }\n }\n );\n map.addLayer(geojson_layer);\n dataLayers.push(geojson_layer);\n map.fitBounds(geojson_layer.getBounds());\n } else if (lat && lon && position_marker) {\n map.fitBounds([[lat, lon], position_marker], { padding: [50, 50] });\n } else if (lat && lon) {\n map.setView([lat, lon], 10);\n }\n }\n\n $: setMapData(current_result);\n\n function show_map_position_click(e) {\n e.target.style.display = 'none';\n document.getElementById('map-position').style.display = 'block';\n }\n</script>\n\n<MapPosition />\n<div id=\"map\" use:mapAction />\n<div id=\"show-map-position\" class=\"leaflet-bar btn btn-sm btn-outline-secondary\"\n on:click|stopPropagation={show_map_position_click}\n>show map bounds</div>\n\n<style>\n #map {\n height: 100%;\n background:#eee;\n }\n\n .btn-outline-secondary {\n background-color: white;\n }\n\n .btn-outline-secondary:hover {\n color: #111;\n }\n\n @media (max-width: 768px) {\n #map {\n height: 300px;\n }\n }\n\n</style>\n","<script>\n import { page, results_store } from '../lib/stores.js';\n import { fetch_from_api, update_html_title } from '../lib/api_utils.js';\n\n import Header from '../components/Header.svelte';\n import SearchSection from '../components/SearchSection.svelte';\n import ResultsList from '../components/ResultsList.svelte';\n import Map from '../components/Map.svelte';\n\n let api_request_params;\n let bStructuredSearch;\n let current_result;\n\n function loaddata(search_params) {\n update_html_title();\n\n api_request_params = {\n q: search_params.get('q'),\n street: search_params.get('street'),\n city: search_params.get('city'),\n county: search_params.get('county'),\n state: search_params.get('state'),\n country: search_params.get('country'),\n postalcode: search_params.get('postalcode'),\n polygon_geojson: Nominatim_Config.Search_AreaPolygons ? 1 : 0,\n viewbox: search_params.get('viewbox'),\n bounded: search_params.get('bounded'),\n dedupe: (!search_params.has('dedupe') || search_params.get('dedupe') === '1') ? 1 : 0,\n 'accept-language': search_params.get('accept-language'),\n countrycodes: search_params.get('countrycodes'),\n limit: search_params.get('limit'),\n polygon_threshold: search_params.get('polygon_threshold'),\n exclude_place_ids: search_params.get('exclude_place_ids'),\n format: 'jsonv2'\n };\n\n let anyStructuredFieldsSet = (api_request_params.street\n || api_request_params.city\n || api_request_params.county\n || api_request_params.state\n || api_request_params.country\n || api_request_params.postalcode);\n\n if (api_request_params.q || anyStructuredFieldsSet) {\n fetch_from_api('search', api_request_params, function (data) {\n results_store.set(data);\n\n update_html_title('Result for ' + api_request_params.q);\n\n if (anyStructuredFieldsSet) {\n document.querySelector(\".nav-tabs a[href='#structured']\").click();\n document.querySelector('input[name=street]').focus();\n } else {\n document.querySelector('input[name=q]').focus();\n }\n });\n } else {\n results_store.set(undefined);\n }\n }\n\n $: {\n let pageinfo = $page;\n if (pageinfo.tab === 'search') {\n loaddata(pageinfo.params);\n }\n }\n</script>\n\n<Header>\n <SearchSection api_request_params={api_request_params} bStructuredSearch={bStructuredSearch} />\n</Header>\n\n<div id=\"content\">\n <div class=\"sidebar\">\n <ResultsList bind:current_result reverse_search={false} />\n </div>\n <div id=\"map-wrapper\">\n <Map {current_result} display_minimap={true} />\n </div>\n</div>\n\n\n<style>\n .sidebar {\n width: 25%;\n min-width: 200px;\n padding: 15px;\n padding-top: 0;\n display: block;\n float: left;\n }\n\n #map-wrapper {\n position: relative;\n height: calc(100vh - 250pt);\n min-height: 300px;\n width: 75%;\n padding-right: 20px;\n display: block;\n float: left;\n }\n\n @media (max-width: 768px) {\n #content {\n top: 0;\n position: relative;\n }\n .sidebar {\n width: 100%;\n }\n #map-wrapper {\n width: 100%;\n height: 300px;\n padding-left: 20px;\n }\n }\n</style>\n","<script>\n import UrlSubmitForm from '../components/UrlSubmitForm.svelte';\n\n import { zoomLevels } from '../lib/helpers.js';\n import { map_store, refresh_page } from '../lib/stores.js';\n\n export let lat = '';\n export let lon = '';\n export let zoom = '';\n\n function gotoCoordinates(newlat, newlon, newzoom) {\n if (newlat === null || newlon === null) return;\n\n let params = new URLSearchParams();\n params.set('lat', newlat);\n params.set('lon', newlon);\n params.set('zoom', newzoom || zoom);\n refresh_page('reverse', params);\n }\n\n map_store.subscribe(map => {\n if (map) {\n map.on('click', (e) => {\n let coords = e.latlng.wrap();\n gotoCoordinates(coords.lat.toFixed(5), coords.lng.toFixed(5));\n });\n }\n });\n\n // common mistake is to copy&paste latitude and longitude into the 'lat' search box\n function maybeSplitLatitude(e) {\n var coords_split = e.target.value.split(',');\n if (coords_split.length === 2) {\n document.querySelector('input[name=lat]').value = L.Util.trim(coords_split[0]);\n document.querySelector('input[name=lon]').value = L.Util.trim(coords_split[1]);\n }\n }\n\n</script>\n\n<UrlSubmitForm page=\"reverse\">\n <div class=\"col-auto\">\n <label for=\"reverse-lat\">lat</label>\n </div>\n <div class=\"col-auto\">\n <input id=\"reverse-lat\"\n name=\"lat\"\n type=\"text\"\n class=\"form-control form-control-sm d-inline\"\n placeholder=\"latitude\"\n pattern=\"^-?\\d+(\\.\\d+)?$\"\n bind:value={lat}\n on:change={maybeSplitLatitude} />\n </div>\n <div class=\"col-auto\">\n <a id=\"switch-coords\"\n on:click|preventDefault|stopPropagation={() => gotoCoordinates(lon, lat)}\n class=\"btn btn-outline-secondary btn-sm\"\n title=\"switch lat and lon\"><></a>\n </div>\n <div class=\"col-auto\">\n <label for=\"reverse-lon\">lon</label>\n </div>\n <div class=\"col-auto\">\n <input id=\"reverse-lon\"\n name=\"lon\"\n type=\"text\"\n class=\"form-control form-control-sm\"\n placeholder=\"longitude\"\n pattern=\"^-?\\d+(\\.\\d+)?$\"\n bind:value={lon} />\n </div>\n <div class=\"col-auto\">\n <label for=\"reverse-zoom\">max zoom</label>\n </div>\n <div class=\"col-auto\">\n <select id=\"reverse-zoom\" name=\"zoom\" class=\"form-select form-select-sm\" bind:value={zoom}>\n <option value=\"\">---</option>\n {#each zoomLevels() as zoomTitle, i}\n <option value=\"{i}\">{i} - {zoomTitle}</option>\n {/each}\n </select>\n </div>\n <div class=\"col-auto\">\n <button type=\"submit\" class=\"btn btn-primary btn-sm mx-1\">Search</button>\n </div>\n</UrlSubmitForm>\n\n<style>\n label {\n font-size: 0.9rem;\n margin-top: 0.3rem;\n }\n\n #switch-coords {\n font-size: 0.6rem;\n font-weight: bold;\n cursor: pointer;\n padding: 2px;\n margin: 5px;\n }\n\n @media (max-width: 850px) {\n #reverse-lon, #reverse-lat, #reverse-zoom {\n width: 8em;\n }\n }\n</style>\n","<script>\n import { page, results_store } from '../lib/stores.js';\n import { fetch_from_api, update_html_title } from '../lib/api_utils.js';\n\n import Header from '../components/Header.svelte';\n import SearchSectionReverse from '../components/SearchSectionReverse.svelte';\n import ResultsList from '../components/ResultsList.svelte';\n import Map from '../components/Map.svelte';\n\n let api_request_params;\n let current_result;\n let position_marker; // what the user searched for\n\n function loaddata(search_params) {\n update_html_title();\n\n api_request_params = {\n lat: search_params.get('lat'),\n lon: search_params.get('lon'),\n zoom: (search_params.get('zoom') > 1\n ? Number(search_params.get('zoom'))\n : Number(Nominatim_Config.Reverse_Default_Search_Zoom)),\n format: 'jsonv2'\n };\n\n if (api_request_params.lat || api_request_params.lat) {\n\n fetch_from_api('reverse', api_request_params, function (data) {\n if (data && !data.error) {\n position_marker = [api_request_params.lat, api_request_params.lon];\n results_store.set([data]);\n } else {\n results_store.set([]);\n }\n\n update_html_title('Reverse result for '\n + api_request_params.lat\n + ','\n + api_request_params.lon);\n document.querySelector('input[name=lat]').focus();\n });\n } else {\n results_store.set(undefined);\n }\n }\n\n $: {\n let pageinfo = $page;\n if (pageinfo.tab === 'reverse') {\n loaddata(pageinfo.params);\n }\n }\n</script>\n\n<Header>\n <SearchSectionReverse {...api_request_params} />\n</Header>\n\n<div id=\"content\">\n <div class=\"sidebar\">\n <ResultsList bind:current_result reverse_search={true} />\n </div>\n <div id=\"map-wrapper\">\n <Map {current_result} {position_marker} display_minimap={true} />\n </div>\n</div>\n\n\n<style>\n .sidebar {\n width: 25%;\n min-width: 200px;\n padding: 15px;\n padding-top: 0;\n display: block;\n float: left;\n }\n\n #map-wrapper {\n position: relative;\n height: calc(100vh - 250pt);\n min-height: 300px;\n width: 75%;\n padding-right: 20px;\n display: block;\n float: left;\n }\n\n @media (max-width: 768px) {\n #content {\n top: 0;\n position: relative;\n }\n .sidebar {\n width: 100%;\n }\n #map-wrapper {\n width: 100%;\n height: 300px;\n padding-left: 20px;\n }\n }\n</style>\n","<script>\n import { refresh_page } from '../lib/stores.js';\n\n export let api_request_params = {};\n\n function handleFormSubmit(event) {\n let form_el = event.target;\n let val = form_el.querySelector('input[type=edit]').value.trim();\n let type_and_id_match = val.match(/^\\s*([NWR])(\\d+)\\s*$/i)\n || val.match(/\\/(relation|way|node)\\/(\\d+)\\s*$/);\n\n var params = new URLSearchParams();\n if (type_and_id_match) {\n params.set('osmtype', type_and_id_match[1].charAt(0).toUpperCase());\n params.set('osmid', type_and_id_match[2]);\n } else if (val.match(/^\\d+$/)) {\n params.set('place_id', val);\n } else {\n alert('invalid input');\n return;\n }\n\n refresh_page('details', params);\n }\n</script>\n\n<form on:submit|preventDefault={handleFormSubmit} class=\"form-inline\" action=\"details.html\">\n <div class=\"row g-1\">\n <div class=\"col-auto\">\n <input type=\"edit\"\n class=\"form-control form-control-sm me-1\"\n pattern=\"^[NWRnwr]?[0-9]+$|.*openstreetmap.*\"\n value=\"{api_request_params.osmtype || ''}{api_request_params.osmid || ''}{api_request_params.place_id || ''}\" />\n </div>\n <div class=\"col-auto\">\n <button type=\"submit\" class=\"btn btn-primary btn-sm\">Show</button>\n </div>\n </div>\n</form>\n<small class=\"form-text text-muted\">\n OSM type+id (<em>N123</em>, <em>n123</em>, <em>W123</em>, <em>w123</em>, <em>R123</em>, <em>r123</em>),\n Place id (<em>1234</em>) or\n URL (<em>https://openstreetmap.org/way/123</em>)\n</small>\n\n<style>\n form .form-control{\n width: 500px;\n max-width: 100%;\n }\n .form-text em {\n font-family: monospace;\n font-style: normal;\n }\n</style>\n","<script>\n import DetailsLink from '../components/DetailsLink.svelte';\n import PageLink from '../components/PageLink.svelte';\n import {\n formatPlaceType, osmLink, formatAdminLevel, formatDistance\n } from '../lib/helpers.js';\n\n export let addressLine;\n export let bDistanceInMeters;\n export let bMarkUnusedLines = false;\n\n $: bAddressLineUsed = addressLine.isaddress;\n $: reverse_only = Nominatim_Config.Reverse_Only;\n</script>\n\n<tr class:notused={bMarkUnusedLines && !bAddressLineUsed}>\n <td class=\"name fw-bold\">\n {#if addressLine.localname}\n {addressLine.localname}\n {:else}\n <span class=\"noname\">No Name</span>\n {/if}\n </td>\n <td>{formatPlaceType(addressLine)}</td>\n <td>{@html osmLink(addressLine)}</td>\n <td>{addressLine.rank_address}</td>\n <td>{formatAdminLevel(addressLine.admin_level)}</td>\n <td>{@html formatDistance(addressLine.distance, bDistanceInMeters)}</td>\n <td>\n {#if addressLine.osm_id}\n <DetailsLink feature={addressLine}>details</DetailsLink>\n {:else if !reverse_only && addressLine.type.match(/^country/)}\n <PageLink page='search' params_hash={{ country: addressLine.localname }}>search by name</PageLink>\n {:else if !reverse_only && addressLine.type === 'postcode'}\n <PageLink page='search' params_hash={{ postalcode: addressLine.localname }}>search by name</PageLink>\n {/if}\n </td>\n</tr>\n\n<style>\n .notused td {\n color: #ccc;\n }\n\n td {\n padding: 2px 8px;\n font-size: 0.9em;\n }\n</style>\n","<script>\n export let postcode;\n export let lat;\n export let lon;\n\n let overpass_query = `\n // Based on the map bounds, you can zoom out and rerun the query\n\n [timeout:30]; // in seconds\n\n // we define a shortcut\n // https://wiki.openstreetmap.org/wiki/Overpass_turbo/Extended_Overpass_Turbo_Queries\n {{postcode=${postcode}}}\n\n (\n node[\"addr:postcode\"=\"{{postcode}}\"]({{bbox}});\n way[\"addr:postcode\"=\"{{postcode}}\"]({{bbox}});\n relation[\"addr:postcode\"=\"{{postcode}}\"]({{bbox}});\n\n node[\"postal_code\"=\"{{postcode}}\"]({{bbox}});\n way[\"postal_code\"=\"{{postcode}}\"]({{bbox}});\n relation[\"postal_code\"=\"{{postcode}}\"]({{bbox}});\n );\n\n out body;\n >;\n out skel qt;\n `.replace(/^ {4}/gm, '');\n\n // https://wiki.openstreetmap.org/wiki/Overpass_turbo/Development#URL_Parameters\n // Q: the query\n // C: map position\n // R: run the query\n let url = 'https://overpass-turbo.eu/'\n + '?Q=' + encodeURIComponent(overpass_query)\n + '&C=' + encodeURIComponent([lat, lon, 15].join(';'))\n + '&R';\n\n function openHint() {\n document.getElementById('postcode-hint').style.display = 'block';\n }\n function closeHint() {\n document.getElementById('postcode-hint').style.display = 'none';\n }\n</script>\n\n(<a href=\"#openHint\" on:click|preventDefault|stopPropagation={openHint}>how?</a>)\n\n<div id=\"postcode-hint\" class=\"my-2 p-2\">\n <button type=\"button\" class=\"close\" aria-label=\"Close\" on:click|stopPropagation={closeHint}>\n <span aria-hidden=\"true\">×</span>\n </button>\n\n Nightly calculated from nearby places having this postcode.\n <a href=\"https://nominatim.org/release-docs/latest/develop/Postcodes/\">Documentation</a>.\n You can search for those with an <a href={url} target=\"_blank\">Overpass Turbo query</a>.\n</div>\n\n<style>\n #postcode-hint {\n font-size: 0.9em;\n background-color: #ededff;\n display: none;\n }\n .close {\n font-size: 1rem;\n }\n</style>","<script>\n export let title;\n</script>\n\n<style>\n td {\n padding: 2px 8px;\n font-size: 0.9em;\n }\n</style>\n\n<tr>\n <td>{title}</td>\n <td><slot></slot></td>\n</tr>\n","<script>\n export let items;\n</script>\n\n<style>\n .name {\n font-weight: bold;\n overflow-wrap: anywhere;\n }\n</style>\n\n{#each Object.keys(items) as name}\n <div class=\"line\">\n <span class=\"name\">{items[name]}</span> ({name})\n </div>\n{/each}\n","<script>\n import { fetch_from_api, update_html_title } from '../lib/api_utils.js';\n import { page } from '../lib/stores.js';\n\n import {\n osmLink, wikipediaLink, coverageType, isAdminBoundary,\n formatAddressRank, formatKeywordToken, formatOSMType\n } from '../lib/helpers.js';\n import Header from '../components/Header.svelte';\n import MapIcon from '../components/MapIcon.svelte';\n import SearchSectionDetails from '../components/SearchSectionDetails.svelte';\n import DetailsOneRow from '../components/DetailsOneRow.svelte';\n import DetailsLink from '../components/DetailsLink.svelte';\n import DetailsPostcodeHint from '../components/DetailsPostcodeHint.svelte';\n import InfoRow from '../components/DetailsInfoRow.svelte';\n import InfoRowList from '../components/DetailsInfoRowList.svelte';\n import Map from '../components/Map.svelte';\n\n let aPlace;\n let base_url;\n let api_request_params;\n let api_request_finished = false;\n\n function loaddata(search_params) {\n api_request_params = {\n place_id: search_params.get('place_id'),\n osmtype: search_params.get('osmtype'),\n osmid: search_params.get('osmid'),\n class: search_params.get('class'),\n keywords: search_params.get('keywords'),\n addressdetails: 1,\n hierarchy: (search_params.get('hierarchy') === '1' ? 1 : 0),\n group_hierarchy: 1,\n polygon_geojson: 1,\n format: 'json'\n };\n api_request_finished = false;\n\n if (api_request_params.place_id || (api_request_params.osmtype && api_request_params.osmid)) {\n\n if (api_request_params.place_id) {\n update_html_title('Details for ' + api_request_params.place_id);\n } else {\n update_html_title('Details for ' + api_request_params.osmtype + api_request_params.osmid);\n }\n\n fetch_from_api('details', api_request_params, function (data) {\n window.scrollTo(0, 0);\n api_request_finished = true;\n aPlace = (data && !data.error) ? data : undefined;\n });\n } else {\n aPlace = undefined;\n }\n }\n\n function place_has_keywords(aThisPlace) {\n // Return false if Nominatim API sends 'keywords: { name: [], address: [] }'\n return (\n aThisPlace.keywords && aThisPlace.keywords.name && aThisPlace.keywords.address\n && (aThisPlace.keywords.name.length > 0 || aThisPlace.keywords.address.length > 0)\n );\n }\n\n $: {\n let pageinfo = $page;\n if (pageinfo.tab === 'details') {\n loaddata(pageinfo.params);\n base_url = window.location.search;\n }\n }\n $: reverse_only = Nominatim_Config.Reverse_Only;\n</script>\n\n<Header>\n <SearchSectionDetails api_request_params={api_request_params}/>\n</Header>\n\n<div class=\"container\">\n {#if aPlace}\n <div class=\"row\">\n <div class=\"col-sm-10\">\n <h1>\n {aPlace.localname || `${formatOSMType(aPlace.osm_type)} ${aPlace.osm_id}` }\n <small><DetailsLink feature={aPlace}>link to this page</DetailsLink></small>\n </h1>\n </div>\n <div class=\"col-sm-2 text-end\">\n <MapIcon aPlace={aPlace} />\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-6\">\n <table id=\"locationdetails\" class=\"table table-striped table-responsive\">\n <tbody>\n <InfoRow title=\"Name\">\n {#if (Array.isArray(aPlace.names)) }\n <span class=\"noname fw-bold\">No Name</span>\n {:else}\n <InfoRowList items={aPlace.names} />\n {/if}\n </InfoRow>\n <InfoRow title=\"Type\">{aPlace.category}:{aPlace.type}</InfoRow>\n <InfoRow title=\"Last Updated\">{aPlace.indexed_date}</InfoRow>\n {#if (isAdminBoundary(aPlace)) }\n <InfoRow title=\"Admin Level\">{aPlace.admin_level}</InfoRow>\n {/if}\n <InfoRow title=\"Search Rank\">{aPlace.rank_search}</InfoRow>\n <InfoRow title=\"Address Rank\">{aPlace.rank_address} ({formatAddressRank(aPlace.rank_address)})</InfoRow>\n {#if aPlace.calculated_importance}\n <InfoRow title=\"Importance\">\n {aPlace.calculated_importance}\n {#if !aPlace.importance} (estimated){/if}\n </InfoRow>\n {/if}\n <InfoRow title=\"Coverage\">{coverageType(aPlace)}</InfoRow>\n <InfoRow title=\"Centre Point (lat,lon)\">\n {aPlace.centroid.coordinates[1]},{aPlace.centroid.coordinates[0]}\n </InfoRow>\n <InfoRow title=\"OSM\">{@html osmLink(aPlace)}</InfoRow>\n <InfoRow title=\"Place Id\">\n {aPlace.place_id}\n (<a href=\"https://nominatim.org/release-docs/develop/api/Output/#place_id-is-not-a-persistent-id\">on this server</a>)\n </InfoRow>\n {#if aPlace.calculated_wikipedia}\n <InfoRow title=\"Wikipedia Calculated\">{@html wikipediaLink(aPlace)}</InfoRow>\n {/if}\n <InfoRow title=\"Computed Postcode\">\n {#if aPlace.calculated_postcode}\n {aPlace.calculated_postcode}\n <DetailsPostcodeHint postcode={aPlace.calculated_postcode} lat={aPlace.centroid.coordinates[1]} lon={aPlace.centroid.coordinates[0]} />\n {/if}\n </InfoRow>\n <InfoRow title=\"Address Tags\"><InfoRowList items={aPlace.addresstags} /></InfoRow>\n <InfoRow title=\"Extra Tags\"><InfoRowList items={aPlace.extratags} /></InfoRow>\n </tbody>\n </table>\n </div>\n <div class=\"col-md-6\">\n <div id=\"map-wrapper\">\n <Map current_result={aPlace} />\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-12\">\n <h2>Address</h2>\n <table id=\"address\" class=\"table table-striped table-small\">\n <thead>\n <tr>\n <th>Local name</th>\n <th>Type</th>\n <th>OSM</th>\n <th>Address rank</th>\n <th>Admin level</th>\n <th>Distance</th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n {#if aPlace.address}\n {#each aPlace.address as addressLine}\n <DetailsOneRow addressLine={addressLine} bMarkUnusedLines=true bDistanceInMeters=false />\n {/each}\n {/if}\n\n {#if aPlace.linked_places}\n <tr class=\"all-columns\"><td colspan=\"7\"><h2>Linked Places</h2></td></tr>\n {#each aPlace.linked_places as addressLine}\n <DetailsOneRow addressLine={addressLine} bMarkUnusedLines=true bDistanceInMeters=true />\n {/each}\n {/if}\n\n {#if !reverse_only}\n <tr class=\"all-columns\"><td colspan=\"7\"><h2>Keywords</h2></td></tr>\n {#if api_request_params.keywords}\n\n {#if place_has_keywords(aPlace)}\n <tr class=\"all-columns\"><td colspan=\"7\"><h3>Name Keywords</h3></td></tr>\n {#each aPlace.keywords.name as keyword}\n <tr>\n <td>{formatKeywordToken(keyword.token)}</td>\n {#if keyword.id}\n <td>word id: {keyword.id}</td>\n {/if}\n </tr>\n {/each}\n\n {#if aPlace.keywords.address}\n <tr class=\"all-columns\"><td colspan=\"7\"><h3>Address Keywords</h3></td></tr>\n {#each aPlace.keywords.address as keyword}\n <tr>\n <td>{formatKeywordToken(keyword.token)}</td>\n {#if keyword.id}\n <td>word id: {keyword.id}</td>\n {/if}\n </tr>\n {/each}\n {/if}\n {:else}\n <tr><td>Place has no keywords</td></tr>\n {/if}\n {:else}\n <tr>\n <td>\n <a class=\"btn btn-outline-secondary btn-sm\"\n href=\"{base_url}&keywords=1\">display keywords</a>\n </td>\n </tr>\n {/if}\n {/if}\n\n <tr class=\"all-columns\"><td colspan=\"7\"><h2>Parent Of</h2></td></tr>\n {#if api_request_params.hierarchy}\n {#if aPlace.hierarchy && typeof (aPlace.hierarchy) === 'object' && Object.keys(aPlace.hierarchy).length}\n {#each Object.keys(aPlace.hierarchy) as type}\n <tr class=\"all-columns\"><td colspan=\"7\"><h3>{type}</h3></td></tr>\n {#each aPlace.hierarchy[type] as line}\n <DetailsOneRow addressLine={line} bDistanceInMeters=true />\n {/each}\n {/each}\n\n {#if Object.keys(aPlace.hierarchy) > 500}\n <p>There are more child objects which are not shown.</p>\n {/if}\n {:else}\n <tr><td>Place is not parent of other places</td></tr>\n {/if}\n {:else}\n <tr>\n <td>\n <a class=\"btn btn-outline-secondary btn-sm\"\n href=\"{base_url}&hierarchy=1\">display child places</a>\n </td>\n </tr>\n {/if}\n </tbody>\n </table>\n </div>\n </div>\n {:else if (window.location.search !== '' && api_request_finished)}\n No such place found.\n {/if}\n</div>\n\n\n\n<style>\n h1 {\n margin: 10px 0;\n padding-left: 8px;\n }\n\n h1 small :global(a) {\n font-size: 0.5em;\n white-space: nowrap;\n }\n\n h2 {\n font-size: 2em;\n padding-left: 8px;\n background-color: white;\n }\n h3 {\n font-size: 1.5em;\n padding-left: 8px;\n }\n\n tr.all-columns {\n background-color: white !important; \n border: none;\n }\n tr.all-columns td {\n border-top: none !important;\n padding-left: 0 !important;\n }\n :global(span.noname){\n color:#800;\n }\n\n #map-wrapper {\n width:100%;\n min-height: auto;\n height:300px;\n border: 1px solid #666;\n }\n</style>\n","<script>\n import { onMount } from 'svelte';\n import { fetch_from_api, update_html_title } from '../lib/api_utils.js';\n import { formatOSMType, osmLink } from '../lib/helpers.js';\n\n import Header from '../components/Header.svelte';\n\n let aPolygons = [];\n\n function loaddata() {\n fetch_from_api('polygons', { format: 'json' }, function (data) {\n aPolygons = data;\n });\n update_html_title('Broken polygons');\n }\n onMount(loaddata);\n</script>\n\n<Header/>\n<div class=\"container\">\n <div class=\"row\">\n <div class=\"col-sm-12\">\n <h1>Broken polygons</h1>\n\n <p>\n Total number of broken polygons: {aPolygons.length}.\n </p>\n\n <table class=\"table table-striped table-hover\">\n <thead>\n <th>OSM type</th>\n <th>OSM id</th>\n <th>Class</th>\n <th>Type</th>\n <th>Name</th>\n <th>Country Code</th>\n <th>Error message</th>\n <th>Updated</th>\n <th></th>\n </thead>\n <tbody>\n {#each aPolygons as polygon}\n <tr>\n <td>{polygon.osm_type}</td>\n <td>{@html osmLink(polygon)}</td>\n <td>{polygon.class}</td>\n <td>{polygon.type}</td>\n <td>{polygon.name}</td>\n <td>{polygon.country_code || ''}</td>\n <td>{polygon.errormessage}</td>\n <td>{polygon.updated}</td>\n <td>\n <a href=\"http://localhost:8111/import?url=https://www.openstreetmap.org/api/0.6/{formatOSMType(polygon.osm_type)}/{polygon.osm_id}/full\" target=\"josm\">josm</a>\n </td>\n </tr>\n {/each}\n </tbody>\n </table>\n </div>\n </div>\n</div>\n","<script>\n import { onMount } from 'svelte';\n import { fetch_from_api, update_html_title } from '../lib/api_utils.js';\n import { osmLink } from '../lib/helpers.js';\n\n import Header from '../components/Header.svelte';\n import DetailsLink from '../components/DetailsLink.svelte';\n\n let aPolygons = [];\n\n function loaddata() {\n fetch_from_api('deletable', { format: 'json' }, function (data) {\n aPolygons = data;\n });\n update_html_title('Deletable objects');\n }\n onMount(loaddata);\n</script>\n\n<Header/>\n<div class=\"container\">\n <div class=\"row\">\n <div class=\"col-sm-12\">\n <h1>Deletable</h1>\n\n <p>\n {aPolygons.length} objects have been deleted in OSM but are still in the Nominatim database.\n </p>\n\n <table class=\"table table-striped table-hover\">\n <thead>\n <th>Place id</th>\n <th>Country Code</th>\n <th>Name</th>\n <th>OSM id</th>\n <th>OSM type</th>\n <th>Class</th>\n <th>Type</th>\n </thead>\n <tbody>\n {#each aPolygons as polygon}\n <tr>\n <td><DetailsLink feature={polygon}>{polygon.place_id}</DetailsLink></td>\n <td>{polygon.country_code}</td>\n <td>{polygon.name}</td>\n <td>{@html osmLink(polygon)}</td>\n <td>{polygon.osm_type}</td>\n <td>{polygon.class}</td>\n <td>{polygon.type}</td>\n </tr>\n {/each}\n </tbody>\n </table>\n\n </div>\n </div>\n</div>\n\n","<script>\n import { onMount } from 'svelte';\n import { fetch_from_api, update_html_title } from '../lib/api_utils.js';\n\n import Header from '../components/Header.svelte';\n\n let aStatusData = {};\n let configuration = Nominatim_Config;\n\n function loaddata() {\n fetch_from_api('status', { format: 'json' }, function (data) {\n aStatusData = data;\n });\n update_html_title('Server status');\n }\n onMount(loaddata);\n</script>\n\n<Header/>\n<div class=\"container\">\n <div class=\"row\">\n <div class=\"col-sm-12\">\n <h1>Server status</h1>\n\n <dl>\n <dt>API Endpoint</dt>\n <dd><a href={configuration.Nominatim_API_Endpoint}>{configuration.Nominatim_API_Endpoint}</a></dd>\n\n <dt>Software version</dt>\n <dd>{aStatusData.software_version}</dd>\n\n <dt>Database version</dt>\n <dd>{aStatusData.database_version}</dd>\n\n <dt>Data last updated</dt>\n <dd>{aStatusData.data_updated}</dd>\n </dl>\n </div>\n </div>\n</div>\n","<script>\n import Header from '../components/Header.svelte';\n import { onMount } from 'svelte';\n import { fetch_content_into_element } from '../lib/api_utils.js';\n\n onMount(() => {\n fetch_content_into_element('theme/about-help.html', document.getElementById('about-help'));\n });\n</script>\n\n<Header />\n<div id=\"about-help\" class=\"container\"></div>\n\n<style>\n #about-help {\n max-width: 800px;\n padding: 4em;\n }\n</style>","<script>\n import 'bootstrap/dist/css/bootstrap.css';\n import 'bootstrap/dist/js/bootstrap.bundle.js';\n\n import { page, refresh_page } from './lib/stores.js';\n\n import Footer from './components/Footer.svelte';\n import SearchPage from './pages/SearchPage.svelte';\n import ReversePage from './pages/ReversePage.svelte';\n import DetailsPage from './pages/DetailsPage.svelte';\n import PolygonsPage from './pages/PolygonsPage.svelte';\n import DeletablePage from './pages/DeletablePage.svelte';\n import StatusPage from './pages/StatusPage.svelte';\n import AboutPage from './pages/AboutPage.svelte';\n\n $: view = $page.tab;\n\n refresh_page();\n</script>\n\n<!-- deal with back-button and other user action -->\n<svelte:window on:popstate={() => refresh_page()} />\n\n{#if view === 'search'}\n<SearchPage />\n{:else if view === 'reverse'}\n<ReversePage />\n{:else if view === 'details'}\n<DetailsPage />\n{:else if view === 'deletable'}\n<DeletablePage />\n{:else if view === 'polygons'}\n<PolygonsPage />\n{:else if view === 'status'}\n<StatusPage />\n{:else if view === 'about'}\n<AboutPage />\n{/if}\n<Footer/>\n","import App from './App.svelte';\n\nconst app = new App({ // eslint-disable-line no-unused-vars\n target: document.body\n});\n"],"names":["noop","assign","tar","src","k","run","fn","blank_object","Object","create","run_all","fns","forEach","is_function","thing","safe_not_equal","a","b","src_url_equal_anchor","current_component","src_url_equal","element_src","url","document","createElement","href","subscribe","store","callbacks","unsub","unsubscribe","get_store_value","value","_","component_subscribe","component","callback","$$","on_destroy","push","create_slot","definition","ctx","$$scope","slot_ctx","get_slot_context","slice","get_slot_changes","dirty","lets","undefined","merged","len","Math","max","length","i","update_slot_base","slot","slot_definition","slot_changes","get_slot_context_fn","slot_context","p","get_all_dirty_from_scope","append","target","node","appendChild","insert","anchor","insertBefore","detach","parentNode","removeChild","destroy_each","iterations","detaching","d","element","name","text","data","createTextNode","space","empty","listen","event","handler","options","addEventListener","removeEventListener","prevent_default","preventDefault","call","this","stop_propagation","stopPropagation","attr","attribute","removeAttribute","getAttribute","setAttribute","set_data","wholeText","set_input_value","input","select_option","select","option","__value","selected","selectedIndex","toggle_class","toggle","classList","HtmlTag","constructor","e","n","c","html","h","m","nodeName","t","innerHTML","Array","from","childNodes","set_current_component","onMount","Error","get_current_component","on_mount","dirty_components","binding_callbacks","render_callbacks","flush_callbacks","resolved_promise","Promise","resolve","update_scheduled","add_render_callback","add_flush_callback","seen_callbacks","Set","flushidx","flush","saved_component","update","pop","has","add","clear","fragment","before_update","after_update","outroing","outros","group_outros","r","check_outros","transition_in","block","local","delete","transition_out","o","bind","index","props","bound","create_component","mount_component","customElement","new_on_destroy","map","filter","destroy_component","make_dirty","then","fill","init","instance","create_fragment","not_equal","append_styles","parent_component","on_disconnect","context","Map","skip_bound","root","ready","ret","rest","hydrate","nodes","children","l","intro","SvelteComponent","$destroy","$on","type","indexOf","splice","$set","$$props","obj","$$set","keys","MAX_UID","MILLISECONDS_MULTIPLIER","TRANSITION_END","toType","toString","match","toLowerCase","getUID","prefix","floor","random","getElementById","getSelector","selector","hrefAttr","includes","startsWith","split","trim","getSelectorFromElement","querySelector","getElementFromSelector","getTransitionDurationFromElement","transitionDuration","transitionDelay","window","getComputedStyle","floatTransitionDuration","Number","parseFloat","floatTransitionDelay","triggerTransitionEnd","dispatchEvent","Event","isElement$1","jquery","nodeType","getElement","typeCheckConfig","componentName","config","configTypes","property","expectedTypes","valueType","RegExp","test","TypeError","toUpperCase","isVisible","getClientRects","getPropertyValue","isDisabled","Node","ELEMENT_NODE","contains","disabled","hasAttribute","findShadowRoot","documentElement","attachShadow","getRootNode","ShadowRoot","reflow","offsetHeight","getjQuery","jQuery","body","DOMContentLoadedCallbacks","onDOMContentLoaded","readyState","isRTL","dir","defineJQueryPlugin","plugin","$","NAME","JQUERY_NO_CONFLICT","jQueryInterface","Constructor","noConflict","execute","executeAfterTransition","transitionElement","waitForTransition","durationPadding","emulatedDuration","called","setTimeout","getNextActiveElement","list","activeElement","shouldGetNext","isCycleAllowed","listLength","min","namespaceRegex","stripNameRegex","stripUidRegex","eventRegistry","uidEvent","customEvents","mouseenter","mouseleave","customEventsRegex","nativeEvents","getUidEvent","uid","getEvent","bootstrapHandler","delegateTarget","oneOff","EventHandler","off","apply","bootstrapDelegationHandler","domElements","querySelectorAll","findHandler","events","delegationSelector","uidEventList","originalHandler","normalizeParams","originalTypeEvent","delegationFn","delegation","typeEvent","getTypeEvent","addHandler","wrapFn","relatedTarget","handlers","previousFn","replace","removeHandler","Boolean","removeNamespacedHandlers","namespace","storeElementEvent","handlerKey","on","one","inNamespace","isNamespace","elementEvent","keyHandlers","trigger","args","isNative","jQueryEvent","bubbles","nativeDispatch","defaultPrevented","evt","isPropagationStopped","isImmediatePropagationStopped","isDefaultPrevented","createEvent","initEvent","CustomEvent","cancelable","key","defineProperty","get","elementMap","Data","set","instanceMap","size","console","error","remove","VERSION","BaseComponent","_element","DATA_KEY","dispose","EVENT_KEY","getOwnPropertyNames","propertyName","_queueCallback","isAnimated","static","getInstance","enableDismissTrigger","method","clickEvent","tagName","closest","getOrCreateInstance","NAME$d","EVENT_KEY$c","EVENT_CLOSE","EVENT_CLOSED","CLASS_NAME_FADE$5","CLASS_NAME_SHOW$8","Alert","close","_destroyElement","each","NAME$c","CLASS_NAME_ACTIVE$3","SELECTOR_DATA_TOGGLE$5","EVENT_CLICK_DATA_API$6","Button","normalizeData","val","normalizeDataKey","chr","button","Manipulator","setDataAttribute","removeDataAttribute","getDataAttributes","attributes","dataset","pureKey","charAt","getDataAttribute","offset","rect","getBoundingClientRect","top","pageYOffset","left","pageXOffset","position","offsetTop","offsetLeft","NODE_TEXT","SelectorEngine","find","concat","Element","prototype","findOne","child","matches","parents","ancestor","prev","previous","previousElementSibling","next","nextElementSibling","focusableChildren","focusables","join","el","NAME$b","EVENT_KEY$a","DATA_API_KEY$6","TOUCHEVENT_COMPAT_WAIT","SWIPE_THRESHOLD","Default$a","interval","keyboard","slide","pause","wrap","touch","DefaultType$a","ORDER_NEXT","ORDER_PREV","DIRECTION_LEFT","DIRECTION_RIGHT","KEY_TO_DIRECTION","ArrowLeft","ArrowRight","EVENT_SLIDE","EVENT_SLID","EVENT_KEYDOWN","EVENT_MOUSEENTER","EVENT_MOUSELEAVE","EVENT_TOUCHSTART","EVENT_TOUCHMOVE","EVENT_TOUCHEND","EVENT_POINTERDOWN","EVENT_POINTERUP","EVENT_DRAG_START","EVENT_LOAD_DATA_API$2","EVENT_CLICK_DATA_API$5","CLASS_NAME_CAROUSEL","CLASS_NAME_ACTIVE$2","CLASS_NAME_SLIDE","CLASS_NAME_END","CLASS_NAME_START","CLASS_NAME_NEXT","CLASS_NAME_PREV","CLASS_NAME_POINTER_EVENT","SELECTOR_ACTIVE$1","SELECTOR_ACTIVE_ITEM","SELECTOR_ITEM","SELECTOR_ITEM_IMG","SELECTOR_NEXT_PREV","SELECTOR_INDICATORS","SELECTOR_INDICATOR","SELECTOR_DATA_SLIDE","SELECTOR_DATA_RIDE","POINTER_TYPE_TOUCH","POINTER_TYPE_PEN","Carousel","super","_items","_interval","_activeElement","_isPaused","_isSliding","touchTimeout","touchStartX","touchDeltaX","_config","_getConfig","_indicatorsElement","_touchSupported","navigator","maxTouchPoints","_pointerEvent","PointerEvent","_addEventListeners","Default","_slide","nextWhenVisible","hidden","cycle","clearInterval","_updateInterval","setInterval","visibilityState","to","activeIndex","_getItemIndex","order","_handleSwipe","absDeltax","abs","direction","_keydown","_addTouchEventListeners","hasPointerPenTouch","pointerType","start","clientX","touches","move","end","clearTimeout","itemImg","_getItemByOrder","isNext","_triggerSlideEvent","eventDirectionName","targetIndex","fromIndex","_setActiveIndicatorElement","activeIndicator","indicators","parseInt","elementInterval","defaultInterval","directionOrOrder","_directionToOrder","activeElementIndex","nextElement","nextElementIndex","isCycling","directionalClassName","orderClassName","_orderToDirection","triggerSlidEvent","completeCallBack","action","ride","carouselInterface","slideIndex","dataApiClickHandler","carousels","NAME$a","DATA_KEY$9","EVENT_KEY$9","Default$9","parent","DefaultType$9","EVENT_SHOW$5","EVENT_SHOWN$5","EVENT_HIDE$5","EVENT_HIDDEN$5","EVENT_CLICK_DATA_API$4","CLASS_NAME_SHOW$7","CLASS_NAME_COLLAPSE","CLASS_NAME_COLLAPSING","CLASS_NAME_COLLAPSED","CLASS_NAME_DEEPER_CHILDREN","CLASS_NAME_HORIZONTAL","WIDTH","HEIGHT","SELECTOR_ACTIVES","SELECTOR_DATA_TOGGLE$4","Collapse","_isTransitioning","_triggerArray","toggleList","elem","filterElement","foundElem","_selector","_initializeChildren","_addAriaAndCollapsedClass","_isShown","hide","show","activesData","actives","container","tempActiveData","elemActive","dimension","_getDimension","style","complete","scrollSize","triggerArrayLength","triggerArray","isOpen","bottom","right","auto","basePlacements","clippingParents","viewport","popper","reference","variationPlacements","reduce","acc","placement","placements","beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite","modifierPhases","getNodeName","getWindow","ownerDocument","defaultView","isElement","isHTMLElement","HTMLElement","isShadowRoot","applyStyles","_ref","state","elements","styles","effect$2","_ref2","initialStyles","strategy","margin","arrow","hasOwnProperty","applyStyles$1","enabled","phase","effect","requires","getBasePlacement","includeScale","scaleX","scaleY","width","height","x","y","getLayoutRect","clientRect","offsetWidth","rootNode","isSameNode","host","getComputedStyle$1","isTableElement","getDocumentElement","getParentNode","assignedSlot","getTrueOffsetParent","offsetParent","getContainingBlock","isFirefox","userAgent","currentNode","css","transform","perspective","contain","willChange","getOffsetParent","getMainAxisFromPlacement","round","within","min$1","max$1","getFreshSideObject","mergePaddingObject","paddingObject","expandToHashMap","hashMap","toPaddingObject","padding","rects","_state$modifiersData$","arrowElement","popperOffsets","modifiersData","basePlacement","axis","arrowRect","minProp","maxProp","endDiff","startDiff","arrowOffsetParent","clientSize","clientHeight","clientWidth","centerToReference","center","axisProp","centerOffset","effect$1","_options$element","arrow$1","requiresIfExists","getVariation","unsetSides","roundOffsetsByDPR","dpr","devicePixelRatio","mapToStyles","_Object$assign2","popperRect","variation","offsets","gpuAcceleration","adaptive","roundOffsets","_ref3","_ref3$x","_ref3$y","hasX","hasY","sideX","sideY","win","heightProp","widthProp","_Object$assign","commonStyles","computeStyles","_ref4","_options$gpuAccelerat","_options$adaptive","_options$roundOffsets","computeStyles$1","passive","_options$scroll","scroll","_options$resize","resize","scrollParents","scrollParent","eventListeners","hash$1","getOppositePlacement","matched","hash","getOppositeVariationPlacement","getWindowScroll","scrollLeft","scrollTop","getWindowScrollBarX","getViewportRect","visualViewport","getDocumentRect","_element$ownerDocumen","winScroll","scrollWidth","scrollHeight","isScrollParent","_getComputedStyle","overflow","overflowX","overflowY","getScrollParent","listScrollParents","isBody","updatedList","rectToClientRect","getInnerBoundingClientRect","clientTop","clientLeft","getClientRectFromMixedType","clippingParent","getClippingParents","clipperElement","getClippingRect","boundary","rootBoundary","mainClippingParents","firstClippingParent","clippingRect","accRect","computeOffsets","commonX","commonY","mainAxis","detectOverflow","_options","_options$placement","_options$boundary","_options$rootBoundary","_options$elementConte","elementContext","_options$altBoundary","altBoundary","_options$padding","altContext","clippingClientRect","contextElement","referenceClientRect","popperClientRect","elementClientRect","overflowOffsets","offsetData","multiply","computeAutoPlacement","flipVariations","_options$allowedAutoP","allowedAutoPlacements","placements$1","allowedPlacements","overflows","sort","getExpandedFallbackPlacements","oppositePlacement","flip","_skip","_options$mainAxis","checkMainAxis","_options$altAxis","altAxis","checkAltAxis","specifiedFallbackPlacements","fallbackPlacements","_options$flipVariatio","preferredPlacement","referenceRect","checksMap","makeFallbackChecks","firstFittingPlacement","_basePlacement","isStartVariation","isVertical","mainVariationSide","altVariationSide","checks","every","check","_loop","_i","fittingPlacement","reset","flip$1","getSideOffsets","preventedOffsets","isAnySideFullyClipped","some","side","preventOverflow","referenceOverflow","popperAltOverflow","referenceClippingOffsets","popperEscapeOffsets","isReferenceHidden","hasPopperEscaped","hide$1","distanceAndSkiddingToXY","invertDistance","skidding","distance","_options$offset","_data$state$placement","offset$1","popperOffsets$1","getAltAxis","_options$tether","tether","_options$tetherOffset","tetherOffset","isBasePlacement","tetherOffsetValue","mainSide","altSide","additive","minLen","maxLen","arrowPaddingObject","arrowPaddingMin","arrowPaddingMax","arrowLen","minOffset","maxOffset","clientOffset","offsetModifierValue","tetherMin","tetherMax","preventedOffset","_mainSide","_altSide","_offset","_min","_max","_preventedOffset","preventOverflow$1","getHTMLElementScroll","getNodeScroll","isElementScaled","getCompositeRect","elementOrVirtualElement","isFixed","isOffsetParentAnElement","modifiers","visited","result","modifier","dep","depModifier","orderModifiers","orderedModifiers","debounce","pending","mergeByName","current","existing","DEFAULT_OPTIONS","areValidElements","_len","arguments","_key","popperGenerator","generatorOptions","_generatorOptions","_generatorOptions$def","defaultModifiers","_generatorOptions$def2","defaultOptions","effectCleanupFns","isDestroyed","setOptions","setOptionsAction","cleanupModifierEffects","runModifierEffects","forceUpdate","_state$elements","_state$orderedModifie","_state$orderedModifie2","destroy","_ref3$options","cleanupFn","noopFn","onFirstUpdate","createPopper$2","createPopper$1","createPopper","Popper","freeze","__proto__","createPopperBase","createPopperLite","NAME$9","EVENT_KEY$8","DATA_API_KEY$4","ESCAPE_KEY$2","SPACE_KEY","TAB_KEY$1","ARROW_UP_KEY","ARROW_DOWN_KEY","RIGHT_MOUSE_BUTTON","REGEXP_KEYDOWN","EVENT_HIDE$4","EVENT_HIDDEN$4","EVENT_SHOW$4","EVENT_SHOWN$4","EVENT_CLICK_DATA_API$3","EVENT_KEYDOWN_DATA_API","EVENT_KEYUP_DATA_API","CLASS_NAME_SHOW$6","CLASS_NAME_DROPUP","CLASS_NAME_DROPEND","CLASS_NAME_DROPSTART","CLASS_NAME_NAVBAR","SELECTOR_DATA_TOGGLE$3","SELECTOR_MENU","SELECTOR_NAVBAR_NAV","SELECTOR_VISIBLE_ITEMS","PLACEMENT_TOP","PLACEMENT_TOPEND","PLACEMENT_BOTTOM","PLACEMENT_BOTTOMEND","PLACEMENT_RIGHT","PLACEMENT_LEFT","Default$8","display","popperConfig","autoClose","DefaultType$8","Dropdown","_popper","_menu","_getMenuElement","_inNavbar","_detectNavbar","DefaultType","getParentFromElement","_createPopper","focus","_completeHide","referenceElement","_getPopperConfig","isDisplayStatic","_getPlacement","parentDropdown","isEnd","_getOffset","popperData","defaultBsPopperConfig","_selectMenuItem","items","toggles","composedPath","isMenuTarget","isActive","getToggleButton","clearMenus","dataApiKeydownHandler","SELECTOR_FIXED_CONTENT","SELECTOR_STICKY_CONTENT","ScrollBarHelper","getWidth","documentWidth","innerWidth","_disableOverFlow","_setElementAttributes","calculatedValue","_saveInitialAttribute","styleProp","scrollbarWidth","manipulationCallBack","_applyManipulationCallback","_resetElementAttributes","actualValue","removeProperty","callBack","isOverflowing","Default$7","className","rootElement","clickCallback","DefaultType$7","NAME$8","CLASS_NAME_FADE$4","CLASS_NAME_SHOW$5","EVENT_MOUSEDOWN","Backdrop","_isAppended","_append","_getElement","_emulateAnimation","backdrop","Default$6","trapElement","autofocus","DefaultType$6","NAME$7","EVENT_KEY$7","EVENT_FOCUSIN$1","EVENT_KEYDOWN_TAB","TAB_KEY","TAB_NAV_FORWARD","TAB_NAV_BACKWARD","FocusTrap","_isActive","_lastTabNavDirection","activate","_handleFocusin","_handleKeydown","deactivate","shiftKey","NAME$6","EVENT_KEY$6","ESCAPE_KEY$1","Default$5","DefaultType$5","EVENT_HIDE$3","EVENT_HIDE_PREVENTED","EVENT_HIDDEN$3","EVENT_SHOW$3","EVENT_SHOWN$3","EVENT_RESIZE","EVENT_CLICK_DISMISS","EVENT_KEYDOWN_DISMISS$1","EVENT_MOUSEUP_DISMISS","EVENT_MOUSEDOWN_DISMISS","EVENT_CLICK_DATA_API$2","CLASS_NAME_OPEN","CLASS_NAME_FADE$3","CLASS_NAME_SHOW$4","CLASS_NAME_STATIC","OPEN_SELECTOR$1","SELECTOR_DIALOG","SELECTOR_MODAL_BODY","SELECTOR_DATA_TOGGLE$2","Modal","_dialog","_backdrop","_initializeBackDrop","_focustrap","_initializeFocusTrap","_ignoreBackdropClick","_scrollBar","_isAnimated","_adjustDialog","_setEscapeEvent","_setResizeEvent","_showBackdrop","_showElement","_hideModal","htmlElement","handleUpdate","modalBody","transitionComplete","_triggerBackdropTransition","_resetAdjustments","currentTarget","isModalOverflowing","isBodyOverflowing","paddingLeft","paddingRight","showEvent","allReadyOpen","NAME$5","EVENT_KEY$5","DATA_API_KEY$2","EVENT_LOAD_DATA_API$1","ESCAPE_KEY","Default$4","DefaultType$4","CLASS_NAME_SHOW$3","CLASS_NAME_BACKDROP","OPEN_SELECTOR","EVENT_SHOW$2","EVENT_SHOWN$2","EVENT_HIDE$2","EVENT_HIDDEN$2","EVENT_CLICK_DATA_API$1","EVENT_KEYDOWN_DISMISS","SELECTOR_DATA_TOGGLE$1","Offcanvas","visibility","blur","completeCallback","uriAttributes","SAFE_URL_PATTERN","DATA_URL_PATTERN","allowedAttribute","allowedAttributeList","attributeName","nodeValue","regExp","attributeRegex","DefaultAllowlist","area","br","col","code","div","em","hr","h1","h2","h3","h4","h5","h6","img","li","ol","pre","s","small","span","sub","sup","strong","u","ul","sanitizeHtml","unsafeHtml","allowList","sanitizeFn","createdDocument","DOMParser","parseFromString","elementName","attributeList","allowedAttributes","NAME$4","EVENT_KEY$4","CLASS_PREFIX$1","DISALLOWED_ATTRIBUTES","DefaultType$3","animation","template","title","delay","customClass","sanitize","AttachmentMap","AUTO","TOP","RIGHT","BOTTOM","LEFT","Default$3","Event$2","HIDE","HIDDEN","SHOW","SHOWN","INSERTED","CLICK","FOCUSIN","FOCUSOUT","MOUSEENTER","MOUSELEAVE","CLASS_NAME_FADE$2","CLASS_NAME_SHOW$2","HOVER_STATE_SHOW","HOVER_STATE_OUT","SELECTOR_TOOLTIP_INNER","SELECTOR_MODAL","EVENT_MODAL_HIDE","TRIGGER_HOVER","TRIGGER_FOCUS","TRIGGER_CLICK","TRIGGER_MANUAL","Tooltip","_isEnabled","_timeout","_hoverState","_activeTrigger","tip","_setListeners","enable","disable","toggleEnabled","_initializeOnDelegatedTarget","click","_isWithActiveTrigger","_enter","_leave","getTipElement","_hideModalHandler","_disposePopper","isWithContent","shadowRoot","isInTheDom","getTitle","tipId","attachment","_getAttachment","_addAttachmentClass","_resolvePossibleFunction","prevHoverState","_cleanTipClass","setContent","_sanitizeAndSetContent","content","templateElement","setElementContent","textContent","updateAttachment","_getDelegateConfig","_handlePopperPlacementChange","_getBasicClassPrefix","eventIn","eventOut","_fixTitle","originalTitleType","dataAttributes","dataAttr","basicClassPrefixRegex","tabClass","token","tClass","NAME$3","EVENT_KEY$3","CLASS_PREFIX","Default$2","DefaultType$2","Event$1","SELECTOR_TITLE","SELECTOR_CONTENT","Popover","_getContent","NAME$2","EVENT_KEY$2","Default$1","DefaultType$1","EVENT_ACTIVATE","EVENT_SCROLL","EVENT_LOAD_DATA_API","CLASS_NAME_DROPDOWN_ITEM","CLASS_NAME_ACTIVE$1","SELECTOR_DATA_SPY","SELECTOR_NAV_LIST_GROUP$1","SELECTOR_NAV_LINKS","SELECTOR_NAV_ITEMS","SELECTOR_LIST_ITEMS","SELECTOR_LINK_ITEMS","SELECTOR_DROPDOWN$1","SELECTOR_DROPDOWN_TOGGLE$1","METHOD_OFFSET","METHOD_POSITION","ScrollSpy","_scrollElement","_offsets","_targets","_activeTarget","_scrollHeight","_process","refresh","autoMethod","offsetMethod","offsetBase","_getScrollTop","_getScrollHeight","targetSelector","targetBCR","item","_getOffsetHeight","innerHeight","maxScroll","_activate","_clear","queries","link","listGroup","navItem","spy","NAME$1","EVENT_KEY$1","EVENT_HIDE$1","EVENT_HIDDEN$1","EVENT_SHOW$1","EVENT_SHOWN$1","EVENT_CLICK_DATA_API","CLASS_NAME_DROPDOWN_MENU","CLASS_NAME_ACTIVE","CLASS_NAME_FADE$1","CLASS_NAME_SHOW$1","SELECTOR_DROPDOWN","SELECTOR_NAV_LIST_GROUP","SELECTOR_ACTIVE","SELECTOR_ACTIVE_UL","SELECTOR_DATA_TOGGLE","SELECTOR_DROPDOWN_TOGGLE","SELECTOR_DROPDOWN_ACTIVE_CHILD","Tab","listElement","itemSelector","hideEvent","active","isTransitioning","_transitionComplete","dropdownChild","dropdownElement","dropdown","EVENT_MOUSEOVER","EVENT_MOUSEOUT","EVENT_FOCUSIN","EVENT_FOCUSOUT","EVENT_HIDE","EVENT_HIDDEN","EVENT_SHOW","EVENT_SHOWN","CLASS_NAME_FADE","CLASS_NAME_HIDE","CLASS_NAME_SHOW","CLASS_NAME_SHOWING","autohide","Toast","_hasMouseInteraction","_hasKeyboardInteraction","_clearTimeout","_maybeScheduleHide","_onInteraction","isInteracting","factory","subscriber_queue","writable","stop","subscribers","new_value","run_queue","subscriber","invalidate","map_store","results_store","last_api_request_url_store","error_store","page","default_pagename","Nominatim_Config","Reverse_Only","pagenames","refresh_page","pagename","params","location","pathname","URLSearchParams","search","param_str","new_url","protocol","history","pushState","tab","api_request_progress","status","loading_el","async","fetch_from_api","endpoint_name","api_url","dedupe","params2","param_names","extend_parameters","Nominatim_API_Endpoint_Params","Nominatim_API_Endpoint","clean_up_parameters","encodeURIComponent","generate_nominatim_api_url","tmp_params","fetch","headers","Nominatim_API_Endpoint_Headers","response","json","err","statusText","message","fetch_content_cache","fetch_content_into_element","dom_element","update_html_title","Page_Title","params_hash","extra_classes","lat","lon","zoom","new_params","EN_US","ZH_CN","Locales","register","locale","func","SEC_ARRAY","toDate","Date","isNaN","format","date","opts","sec","relativeDate","diffSec","diff","localeFunc","agoIn","totalSec","idx","formatDiff","getLocale","timeago.format","last_updated_date","last_api_request_url","fetch_running","URL","origin","searchParams","data_updated","unit","error_message","map_lat","map_lon","getCenter","lng","view","$page","page_title","reverse_only","form","allow_submit","field","pattern","checkValidity","validate_field","alert","checked","serialize_form","q","bounded","countrycodes","limit","polygon_threshold","street","city","county","country","postalcode","viewbox","set_bounded","set_dedupe","set_api_param","apiParam","sViewBox","bStructuredSearch","api_request_params","set_viewbox","use_viewbox","bounds","getBounds","west","getWest","east","getEast","L","latLng","toFixed","getNorth","getSouth","map_viewbox_as_string","update_reverse_link","center_lat_lng","wrapLatLng","matchHtmlRegExp","formatOSMType","aPlace","osm_type","sOSMType","osm_id","label","capitalize","class","calculated_wikipedia","parts","sTitle","escapeHtml","sLanguage","sArticle","isarea","category","iRank","sOut","place_type","iLevel","fDistance","bInMeters","sFormatted","sToken","string","escape","str","exec","lastIndex","charCodeAt","substring","sType","bExcludeExternal","feature","url_params","place_id","sIcon","Images_Base_Url","display_name","formatLabel","important","setProperty","aSearchResults","iHighlightNum","sMoreURL","reverse_search","current_result","search_params","aResults","aExcludePlaceIds","parsed_url","result_el","parentElement","pos","exports","version","extend","dest","j","F","proto","lastId","stamp","_leaflet_id","throttle","time","lock","wrapperFn","later","wrapNum","range","includeMax","falseFn","formatNum","num","digits","pow","splitWords","getParamString","existingUrl","uppercase","templateRe","isArray","array","emptyImageUrl","getPrefixed","lastTime","timeoutDefer","timeToCall","requestFn","requestAnimationFrame","cancelFn","cancelAnimationFrame","id","requestAnimFrame","immediate","cancelAnimFrame","Util","Class","checkDeprecatedMixinEvents","Mixin","Events","warn","stack","NewClass","initialize","callInitHooks","parentProto","__super__","statics","_initHooks","_initHooksCalled","include","mergeOptions","addInitHook","types","_on","_off","_events","typeListeners","newListener","listeners","_firingCount","fire","propagate","listens","sourceTarget","_propagateEvent","_eventParents","once","addEventParent","removeEventParent","layer","propagatedFrom","clearAllEventListeners","addOneTimeEventListener","fireEvent","hasEventListeners","Evented","Point","trunc","v","ceil","toPoint","Bounds","points","toBounds","LatLngBounds","corner1","corner2","latlngs","toLatLngBounds","LatLng","alt","toLatLng","clone","point","_add","subtract","_subtract","divideBy","_divideBy","multiplyBy","_multiplyBy","scaleBy","unscaleBy","_round","_floor","_ceil","_trunc","distanceTo","sqrt","equals","getBottomLeft","getTopRight","getTopLeft","getBottomRight","getSize","intersects","min2","max2","xIntersects","yIntersects","overlaps","xOverlaps","yOverlaps","isValid","sw2","ne2","sw","_southWest","ne","_northEast","pad","bufferRatio","heightBuffer","widthBuffer","getSouthWest","getNorthEast","getNorthWest","getSouthEast","latIntersects","lngIntersects","latOverlaps","lngOverlaps","toBBoxString","maxMargin","precision","other","Earth","sizeInMeters","latAccuracy","lngAccuracy","cos","PI","CRS","latLngToPoint","latlng","projectedPoint","projection","project","scale","transformation","_transform","pointToLatLng","untransformedPoint","untransform","unproject","log","LN2","getProjectedBounds","infinite","wrapLng","wrapLat","wrapLatLngBounds","newCenter","latShift","lngShift","R","latlng1","latlng2","rad","lat1","lat2","sinDLat","sin","sinDLon","atan2","earthRadius","SphericalMercator","MAX_LATITUDE","atan","exp","Transformation","_a","_b","_c","_d","toTransformation","EPSG3857","EPSG900913","svgCreate","createElementNS","pointsToPath","rings","closed","len2","svg","style$1","ie","ielt9","edge","webkit","userAgentContains","android","android23","webkitVer","androidStock","opera","chrome","gecko","safari","phantom","opera12","platform","ie3d","webkit3d","WebKitCSSMatrix","gecko3d","any3d","L_DISABLE_3D","mobile","orientation","mobileWebkit","mobileWebkit3d","msPointer","MSPointerEvent","pointer","L_NO_TOUCH","DocumentTouch","mobileOpera","mobileGecko","retina","screen","deviceXDPI","logicalXDPI","passiveEvents","supportsPassiveOption","canvas","getContext","createSVGRect","vml","shape","firstChild","behavior","adj","Browser","POINTER_DOWN","POINTER_MOVE","POINTER_UP","POINTER_CANCEL","_pointers","_pointerDocListener","addPointerListener","_addPointerStart","_addPointerMove","_addPointerEnd","removePointerListener","onDown","MSPOINTER_TYPE_TOUCH","_handlePointer","_globalPointerDown","_globalPointerMove","_globalPointerUp","pointerId","changedTouches","onMove","MSPOINTER_TYPE_MOUSE","buttons","onUp","_touchstart","_touchend","_pre","addDoubleTapListener","last","touch$$1","doubleTap","onTouchStart","isPrimary","now","delta","onTouchEnd","cancelBubble","prop","newTouch","removeDoubleTapListener","touchstart","touchend","dblclick","disableTextSelection","enableTextSelection","_userSelect","_outlineElement","_outlineStyle","TRANSFORM","testProp","TRANSITION","getStyle","currentStyle","create$1","toFront","lastChild","toBack","hasClass","getClass","addClass","classes","setClass","removeClass","baseVal","correspondingElement","setOpacity","opacity","_setOpacityIE","filterName","filters","Enabled","Opacity","setTransform","setPosition","_leaflet_pos","getPosition","userSelectProperty","disableImageDrag","enableImageDrag","preventOutline","tabIndex","restoreOutline","outline","getSizedParentNode","getScale","boundingClientRect","DomUtil","addOne","eventsKey","removeOne","browserFiresNativeDblClick","mouseSubst","wheel","isExternalTarget","attachEvent","detachEvent","originalEvent","_stopped","skipped","disableScrollPropagation","disableClickPropagation","fakeStop","returnValue","getMousePosition","clientY","wheelPxFactor","getWheelDelta","wheelDeltaY","deltaY","deltaMode","deltaX","deltaZ","wheelDelta","detail","skipEvents","related","DomEvent","addListener","removeListener","PosAnimation","newPos","duration","easeLinearity","_el","_inProgress","_duration","_easeOutPower","_startPos","_startTime","_animate","_step","_complete","_animId","elapsed","_runFrame","_easeOut","progress","crs","minZoom","maxZoom","layers","maxBounds","renderer","zoomAnimation","zoomAnimationThreshold","fadeAnimation","markerZoomAnimation","transform3DLimit","zoomSnap","zoomDelta","trackResize","_handlers","_layers","_zoomBoundLayers","_sizeChanged","_initContainer","_initLayout","_onResize","_initEvents","setMaxBounds","_zoom","_limitZoom","setView","_zoomAnimated","_createAnimProxy","_proxy","_catchTransitionEnd","_addLayers","_limitCenter","_stop","_loaded","animate","pan","_tryAnimatedZoom","_tryAnimatedPan","_sizeTimer","_resetView","setZoom","zoomIn","zoomOut","setZoomAround","getZoomScale","viewHalf","latLngToContainerPoint","containerPointToLatLng","_getBoundsCenterZoom","paddingTL","paddingTopLeft","paddingBR","paddingBottomRight","getBoundsZoom","Infinity","paddingOffset","swPoint","nePoint","fitBounds","fitWorld","panTo","panBy","getZoom","_panAnim","step","_onPanTransitionStep","_onPanTransitionEnd","noMoveStart","_mapPane","_getMapPanePos","_rawPanBy","flyTo","targetCenter","targetZoom","startZoom","w0","w1","u1","rho","rho2","sq","sinh","cosh","tanh","r0","w","easeOut","S","frame","_flyToFrame","_move","getScaleZoom","_moveEnd","_moveStart","flyToBounds","_panInsideMaxBounds","setMinZoom","oldZoom","setMaxZoom","panInsideBounds","_enforcingBounds","panInside","pixelCenter","pixelPoint","pixelBounds","getPixelBounds","halfPixelBounds","paddedBounds","invalidateSize","oldSize","_lastCenter","newSize","oldCenter","debounceMoveend","locate","_locateOptions","timeout","watch","_handleGeolocationError","onResponse","_handleGeolocationResponse","onError","_locationWatchId","geolocation","watchPosition","getCurrentPosition","stopLocate","clearWatch","coords","latitude","longitude","accuracy","timestamp","HandlerClass","_containerId","_container","_clearControlPos","_resizeRequest","_clearHandlers","_panes","_renderer","createPane","pane","_checkIfLoaded","_moved","layerPointToLatLng","_getCenterLayerPoint","getMinZoom","_layersMinZoom","getMaxZoom","_layersMaxZoom","inside","nw","se","boundsSize","snap","scalex","scaley","_size","topLeftPoint","_getTopLeftPoint","getPixelOrigin","_pixelOrigin","getPixelWorldBounds","getPane","getPanes","getContainer","toZoom","fromZoom","latLngToLayerPoint","containerPointToLayerPoint","layerPointToContainerPoint","layerPoint","mouseEventToContainerPoint","mouseEventToLayerPoint","mouseEventToLatLng","_onScroll","_fadeAnimated","_initPanes","_initControlPos","panes","_paneRenderers","markerPane","shadowPane","loading","zoomChanged","_getNewPixelOrigin","pinch","_getZoomSpan","remove$$1","onOff","_handleDOMEvent","_onMoveEnd","_findEventTargets","targets","isHover","srcElement","dragging","_simulated","_draggableMoved","_fireDOMEvent","_mouseEvents","synth","isMarker","getLatLng","_radius","containerPoint","bubblingMouseEvents","moved","boxZoom","whenReady","_latLngToNewLayerPoint","topLeft","_latLngBoundsToNewLayerBounds","latLngBounds","_getCenterOffset","centerPoint","viewBounds","_getBoundsOffset","_limitOffset","newBounds","pxBounds","projectedMaxBounds","_rebound","proxy","mapPane","_animatingZoom","_onZoomTransitionEnd","_animMoveEnd","_destroyAnimProxy","z","_nothingToAnimate","getElementsByClassName","_animateZoom","startAnim","noUpdate","_animateToCenter","_animateToZoom","createMap","Control","_map","removeControl","addControl","addTo","onAdd","corner","_controlCorners","onRemove","_refocusOnMap","screenX","screenY","control","corners","_controlContainer","createCorner","vSide","hSide","Layers","collapsed","autoZIndex","hideSingleBase","sortLayers","sortFunction","layerA","layerB","nameA","nameB","baseLayers","overlays","_layerControlInputs","_lastZIndex","_handlingClick","_addLayer","_update","_checkDisabledLayers","_onLayerChange","_expandIfNotCollapsed","addBaseLayer","addOverlay","removeLayer","_getLayer","expand","_section","acceptableHeight","collapse","section","_layersLink","_baseLayersList","_separator","_overlaysList","overlay","setZIndex","baseLayersPresent","overlaysPresent","baseLayersCount","_addItem","_createRadioElement","radioHtml","radioFragment","hasLayer","defaultChecked","layerId","_onInputClick","holder","inputs","addedLayers","removedLayers","addLayer","_expand","_collapse","Zoom","zoomInText","zoomInTitle","zoomOutText","zoomOutTitle","zoomName","_zoomInButton","_createButton","_zoomIn","_zoomOutButton","_zoomOut","_updateDisabled","_disabled","zoomControl","Scale","maxWidth","metric","imperial","_addScales","updateWhenIdle","_mScale","_iScale","maxMeters","_updateScales","_updateMetric","_updateImperial","meters","_getRoundNum","_updateScale","maxMiles","miles","feet","maxFeet","ratio","pow10","Attribution","_attributions","attributionControl","getAttribution","addAttribution","setPrefix","removeAttribution","attribs","prefixAndAttribs","attribution","Handler","_enabled","addHooks","removeHooks","_lastCode","START","END","mousedown","pointerdown","MSPointerDown","MOVE","Draggable","clickTolerance","dragStartTarget","preventOutline$$1","_dragStartTarget","_preventOutline","_onDown","_dragging","finishDrag","which","_moving","first","sizedParent","_startPoint","_parentScale","_onMove","_onUp","_lastTarget","SVGElementInstance","correspondingUseElement","_newPos","_animRequest","_lastEvent","_updatePosition","simplify","tolerance","sqTolerance","_simplifyDP","_reducePoints","pointToSegmentDistance","p1","p2","_sqClosestPointOnSegment","closestPointOnSegment","markers","Uint8Array","_simplifyDPStep","newPoints","sqDist","maxSqDist","reducedPoints","_sqDist","clipSegment","useLastCode","codeOut","newCode","codeA","_getBitCode","codeB","_getEdgeIntersection","dx","dy","dot","isFlat","_flat","LineUtil","clipPolygon","clippedPoints","edges","_code","PolyUtil","LonLat","Mercator","R_MINOR","tmp","con","ts","tan","phi","dphi","EPSG3395","EPSG4326","Simple","Layer","removeFrom","_mapToAdd","addInteractiveTarget","targetEl","removeInteractiveTarget","_layerAdd","getEvents","beforeAdd","eachLayer","_addZoomLimit","_updateZoomLevels","_removeZoomLimit","oldZoomSpan","LayerGroup","getLayerId","clearLayers","invoke","methodName","getLayer","getLayers","zIndex","layerGroup","FeatureGroup","setStyle","bringToFront","bringToBack","featureGroup","Icon","popupAnchor","tooltipAnchor","createIcon","oldIcon","_createIcon","createShadow","_getIconUrl","_createImg","_setIconStyles","sizeOption","shadowAnchor","iconAnchor","marginLeft","marginTop","icon","IconDefault","iconUrl","iconRetinaUrl","shadowUrl","iconSize","shadowSize","imagePath","_detectIconPath","path","MarkerDrag","marker","_marker","_icon","_draggable","dragstart","_onDragStart","predrag","_onPreDrag","drag","_onDrag","dragend","_onDragEnd","_adjustPan","speed","autoPanSpeed","autoPanPadding","iconPos","panBounds","movement","_panRequest","_oldLatLng","closePopup","autoPan","shadow","_shadow","_latlng","oldLatLng","Marker","interactive","zIndexOffset","riseOnHover","riseOffset","draggable","_initIcon","_removeIcon","_removeShadow","viewreset","setLatLng","setZIndexOffset","getIcon","setIcon","_popup","bindPopup","_setPos","classToAdd","addIcon","mouseover","_bringToFront","mouseout","_resetZIndex","newShadow","addShadow","_updateOpacity","_initInteraction","_zIndex","_updateZIndex","opt","_getPopupAnchor","_getTooltipAnchor","Path","stroke","color","weight","lineCap","lineJoin","dashArray","dashOffset","fillColor","fillOpacity","fillRule","getRenderer","_initPath","_reset","_addPath","_removePath","redraw","_updatePath","_updateStyle","_updateBounds","_bringToBack","_path","_project","_clickTolerance","CircleMarker","radius","setRadius","getRadius","_point","r2","_radiusY","_pxBounds","_updateCircle","_empty","_bounds","_containsPoint","circleMarker","Circle","legacyOptions","_mRadius","half","latR","lngR","acos","circle","Polyline","smoothFactor","noClip","_setLatLngs","getLatLngs","_latlngs","setLatLngs","isEmpty","closestLayerPoint","minDistance","minPoint","jLen","_parts","halfDist","segDist","dist","_rings","addLatLng","_defaultShape","_convertLatLngs","flat","_projectLatlngs","_rawPxBounds","projectedBounds","ring","_clipPoints","segment","_simplifyPoints","_updatePoly","part","polyline","Polygon","f","clipped","polygon","GeoJSON","geojson","addData","features","geometries","geometry","coordinates","geometryToLayer","asFeature","resetStyle","onEachFeature","_setLayerStyle","pointToLayer","_coordsToLatLng","coordsToLatLng","_pointToLayer","coordsToLatLngs","properties","pointToLayerFn","markersInheritOptions","levelsDeep","latLngToCoords","latLngsToCoords","getFeature","newGeometry","PointToGeoJSON","toGeoJSON","geoJSON","multi","holes","toMultiPoint","isGeometryCollection","jsons","geoJson","ImageOverlay","crossOrigin","errorOverlayUrl","_url","_image","_initImage","styleOpts","setUrl","setBounds","zoomanim","wasElementSupplied","onselectstart","onmousemove","onload","onerror","_overlayOnError","image","errorUrl","imageOverlay","VideoOverlay","autoplay","loop","keepAspectRatio","muted","vid","onloadeddata","sourceElements","getElementsByTagName","sources","source","videoOverlay","video","SVGOverlay","svgOverlay","DivOverlay","_source","_removeTimeout","getContent","_content","_updateContent","_updateLayout","_prepareOpen","_contentNode","hasChildNodes","_getAnchor","_containerBottom","_containerLeft","_containerWidth","Popup","minWidth","maxHeight","autoPanPaddingTopLeft","autoPanPaddingBottomRight","keepInView","closeButton","closeOnEscapeKey","openOn","openPopup","popup","closeOnClick","closePopupOnClick","preclick","_close","moveend","wrapper","_wrapper","_tipContainer","_tip","_closeButton","_onCloseButtonClick","whiteSpace","scrolledClass","marginBottom","containerHeight","containerWidth","layerPos","containerPos","_popupHandlersAdded","_openPopup","keypress","_onKeyPress","_movePopup","unbindPopup","togglePopup","isPopupOpen","setPopupContent","getPopup","keyCode","permanent","sticky","tooltip","closeTooltip","_setPosition","subX","subY","tooltipPoint","tooltipWidth","tooltipHeight","openTooltip","bindTooltip","_tooltip","_initTooltipInteractions","unbindTooltip","_tooltipHandlersAdded","_moveTooltip","_openTooltip","mousemove","toggleTooltip","isTooltipOpen","setTooltipContent","getTooltip","DivIcon","bgPos","backgroundPosition","divIcon","GridLayer","tileSize","updateWhenZooming","updateInterval","maxNativeZoom","minNativeZoom","noWrap","keepBuffer","_levels","_tiles","_removeAllTiles","_tileZoom","_setAutoZIndex","isLoading","_loading","viewprereset","_invalidateAll","createTile","getTileSize","compare","edgeZIndex","isFinite","nextFrame","willPrune","tile","loaded","fade","_onOpaqueTile","_noPrune","_pruneTiles","_fadeFrame","_updateLevels","_onUpdateLevel","_removeTilesAtZoom","_onRemoveLevel","level","_setZoomTransform","_onCreateLevel","_level","retain","_retainParent","_retainChildren","_removeTile","x2","y2","z2","coords2","_tileCoordsToKey","animating","_setView","_clampZoom","noPrune","tileZoom","tileZoomChanged","_abortLoading","_resetGrid","_setZoomTransforms","translate","_tileSize","_globalTileRange","_pxBoundsToTileRange","_wrapX","_wrapY","_getTiledPixelBounds","mapZoom","halfSize","tileRange","tileCenter","queue","noPruneRange","_isValidTile","createDocumentFragment","_addTile","tileBounds","_tileCoordsToBounds","_keyToBounds","_keyToTileCoords","_tileCoordsToNwSe","nwPoint","sePoint","bp","_initTile","WebkitBackfaceVisibility","tilePos","_getTilePos","_wrapCoords","_tileReady","_noTilesToLoad","newCoords","gridLayer","TileLayer","subdomains","errorTileUrl","zoomOffset","tms","zoomReverse","detectRetina","_onTileRemove","noRedraw","done","_tileOnLoad","_tileOnError","getTileUrl","_getSubdomain","_getZoomForUrl","invertedY","tilePoint","tileLayer","TileLayerWMS","defaultWmsParams","service","request","transparent","wmsParams","realRetina","_crs","_wmsVersion","projectionKey","bbox","setParams","tileLayerWMS","WMS","wms","Renderer","_updatePaths","_destroyContainer","_onZoom","zoomend","_onZoomEnd","_onAnimZoom","ev","_updateTransform","currentCenterPoint","_center","topLeftOffset","Canvas","_onViewPreReset","_postponeUpdatePaths","_draw","_onMouseMove","_onClick","_handleMouseOut","_ctx","_redrawRequest","_redrawBounds","_redraw","_updateDashArray","_order","_drawLast","_drawFirst","_requestRedraw","_extendRedrawBounds","dashValue","_dashArray","clearRect","save","restore","beginPath","clip","_drawing","closePath","_fillStroke","arc","globalAlpha","fillStyle","setLineDash","lineWidth","strokeStyle","clickedLayer","_fireEvent","moving","_handleMouseHover","_hoveredLayer","_mouseHoverThrottled","candidateHoveredLayer","canvas$1","vmlCreate","namespaces","vmlMixin","coordsize","_stroke","_fill","stroked","filled","dashStyle","endcap","joinstyle","_setPath","create$2","SVG","zoomstart","_onZoomStart","_rootGroup","_svgSize","svg$1","_getPaneRenderer","_createRenderer","preferCanvas","Rectangle","_boundsToLatLngs","rectangle","BoxZoom","_pane","overlayPane","_resetStateTimeout","_destroy","_onMouseDown","_resetState","_clearDeferredResetState","contextmenu","mouseup","_onMouseUp","keydown","_onKeyDown","_box","_finish","boxZoomBounds","doubleClickZoom","DoubleClickZoom","_onDoubleClick","inertia","inertiaDeceleration","inertiaMaxSpeed","worldCopyJump","maxBoundsViscosity","Drag","_onPreDragLimit","_onPreDragWrap","_positions","_times","_offsetLimit","_viscosity","_lastTime","_lastPos","_absPos","_prunePositions","shift","pxCenter","pxWorldCenter","_initialWorldOffset","_worldWidth","_viscousLimit","threshold","worldWidth","halfWidth","newX1","newX2","newX","noInertia","ease","speedVector","limitedSpeed","limitedSpeedVector","decelerationDuration","keyboardPanDelta","Keyboard","keyCodes","down","up","_setPanDelta","_setZoomDelta","_onFocus","_onBlur","_addHooks","_removeHooks","_focused","docEl","scrollTo","panDelta","_panKeys","codes","_zoomKeys","altKey","ctrlKey","metaKey","scrollWheelZoom","wheelDebounceTime","wheelPxPerZoomLevel","ScrollWheelZoom","_onWheelScroll","_delta","_lastMousePos","_timer","_performZoom","d2","d3","d4","tap","tapTolerance","Tap","_fireClick","_holdTimeout","_isTapValid","_simulateEvent","touchmove","simulatedEvent","_simulatedClick","initMouseEvent","touchZoom","bounceAtZoomLimits","TouchZoom","_onTouchStart","_zooming","_centerPoint","_startLatLng","_pinchStartLatLng","_startDist","_startZoom","_onTouchMove","_onTouchEnd","moveFn","Projection","oldL","handleHideClick","last_click_latlng","map_center","map_zoom","map_viewbox","view_on_osm_link","last_click","mouse_position","display_map_position","mouse_lat_lng","map_link_to_osm","module","require$$0","MiniMap","minimap","toggleDisplay","zoomLevelOffset","zoomLevelFixed","centerFixed","autoToggleDisplay","minimized","collapsedWidth","collapsedHeight","aimingRectOptions","clickable","shadowRectOptions","strings","hideText","showText","mapOptions","_layer","_mainMap","_isZoomLevelFixed","_miniMap","_mainMapMoving","_miniMapMoving","_userToggledDisplay","_minimized","_addToggleButton","_aimingRect","_shadowRect","_onMainMapMoved","_onMainMapMoving","_onMiniMapMoveStarted","_onMiniMapMoving","_onMiniMapMoved","_decideZoom","_setDisplay","changeLayer","_toggleDisplayButton","_toggleButtonInitialTitleText","_toggleDisplayButtonClicked","_restore","_minimize","minimize","_onToggle","_decideMinimized","lastAimingRect","_lastAimingRectPosition","_isDefined","_isInteger","fromMaintoMini","toRet","currentDiff","proposedZoom","_lastMiniMapZoom","_fireToggleEvents","miniMapControl","action_result","show_map_position_click","display_minimap","position_marker","dataLayers","setMapData","aFeature","resetMapData","cm","L.circleMarker","L.latLngBounds","L.rectangle","centroid","geojson_layer","L.geoJson","Map_Tile_Attribution","L.map","Map_Default_Lat","Map_Default_Lon","Map_Default_Zoom","L.tileLayer","Map_Tile_URL","osm2","L.TileLayer","L.Control","MapPositionControl","pageinfo","polygon_geojson","Search_AreaPolygons","exclude_place_ids","anyStructuredFieldsSet","loaddata","zoomLevels","maybeSplitLatitude","coords_split","gotoCoordinates","newlat","newlon","newzoom","selected_option","levels","updates","to_null_out","accounted_for","spread_props","Reverse_Default_Search_Zoom","osmtype","osmid","type_and_id_match","localname","formatPlaceType","osmLink","rank_address","formatAdminLevel","admin_level","formatDistance","addressLine","bDistanceInMeters","bMarkUnusedLines","bAddressLineUsed","isaddress","openHint","closeHint","postcode","overpass_query","isAdminBoundary","calculated_importance","address","linked_places","hierarchy","names","indexed_date","rank_search","formatAddressRank","importance","coverageType","wikipediaLink","calculated_postcode","addresstags","extratags","keywords","aThisPlace","formatKeywordToken","base_url","api_request_finished","addressdetails","group_hierarchy","country_code","errormessage","updated","aPolygons","software_version","database_version","aStatusData","configuration"],"mappings":"yBAAA,SAASA,KAET,SAASC,EAAOC,EAAKC,GAEjB,IAAK,MAAMC,KAAKD,EACZD,EAAIE,GAAKD,EAAIC,GACjB,OAAOF,EAUX,SAASG,EAAIC,GACT,OAAOA,IAEX,SAASC,IACL,OAAOC,OAAOC,OAAO,MAEzB,SAASC,EAAQC,GACbA,EAAIC,QAAQP,GAEhB,SAASQ,EAAYC,GACjB,MAAwB,mBAAVA,EAElB,SAASC,EAAeC,EAAGC,GACvB,OAAOD,GAAKA,EAAIC,GAAK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G,YAQJnlG,cALEozC,GAAe,aAAe0C,OAAQ,kBAAoB/4C,OACxDooG,EAAYpoG,MAEd63C,GAAkB,+JCYsCr6C,KAAcq5C,4BAG7Dr5C,KAAY6qG,sBAGZ7qG,KAAY8qG,sBAGZ9qG,KAAY28C,2ZATJ38C,KAAcq5C,wHAPnC13C,SACEJ,OACEA,OACEA,cAEAA,OACEA,OACAA,OAAIA,cAEJA,OACAA,cAEAA,OACAA,cAEAA,OACAA,+CANKvB,KAAY6qG,+CAGZ7qG,KAAY8qG,+CAGZ9qG,KAAY28C,mJA7BnBouD,KACAC,EAAgBvzD,wBAQpBhyC,cALEozC,GAAe,UAAY0C,OAAQ,kBAAoB/4C,OACrDuoG,EAAcvoG,MAEhB63C,GAAkB,6QCFtB14C,2IANE8D,QACE00C,GAA2B,wBAAyBt7C,SAASyM,eAAe,s2CCiBlE,WAATtL,OAEc,YAATA,OAES,YAATA,OAES,cAATA,OAES,aAATA,OAES,WAATA,OAES,UAATA,2fAlBR43C,+CAFGsF,EAAOC,EAAM3E,eAMgBZ,MCnBtB,oEAAQ,CAClBp2C,OAAQ3C,SAASiQ"}
\ No newline at end of file
+{"version":3,"file":"bundle.js","sources":["../../.yarn/cache/svelte-npm-3.50.1-9c43f6e0f1-90c9f80ed1.zip/node_modules/svelte/internal/index.mjs","../../.yarn/$$virtual/bootstrap-virtual-191b9b7a0d/0/cache/bootstrap-npm-5.2.1-615925a4f6-2ee91b6f87.zip/node_modules/bootstrap/dist/js/bootstrap.bundle.js","../../.yarn/cache/svelte-npm-3.50.1-9c43f6e0f1-90c9f80ed1.zip/node_modules/svelte/store/index.mjs","../../src/lib/stores.js","../../src/components/Footer.svelte","../../src/lib/api_utils.js","../../src/components/PageLink.svelte","../../src/components/ReverseLink.svelte","../../.yarn/cache/timeago.js-npm-4.0.2-e87d64f9a3-7c5bb9d45f.zip/node_modules/timeago.js/esm/lang/en_US.js","../../.yarn/cache/timeago.js-npm-4.0.2-e87d64f9a3-7c5bb9d45f.zip/node_modules/timeago.js/esm/lang/zh_CN.js","../../.yarn/cache/timeago.js-npm-4.0.2-e87d64f9a3-7c5bb9d45f.zip/node_modules/timeago.js/esm/register.js","../../.yarn/cache/timeago.js-npm-4.0.2-e87d64f9a3-7c5bb9d45f.zip/node_modules/timeago.js/esm/utils/date.js","../../.yarn/cache/timeago.js-npm-4.0.2-e87d64f9a3-7c5bb9d45f.zip/node_modules/timeago.js/esm/format.js","../../src/components/LastUpdated.svelte","../../.yarn/cache/timeago.js-npm-4.0.2-e87d64f9a3-7c5bb9d45f.zip/node_modules/timeago.js/esm/index.js","../../src/components/Error.svelte","../../src/components/Header.svelte","../../src/components/UrlSubmitForm.svelte","../../src/components/SearchSection.svelte","../../.yarn/cache/escape-html-npm-1.0.3-376c22ee74-900a7f2b80.zip/node_modules/escape-html/index.js","../../src/lib/helpers.js","../../src/components/DetailsLink.svelte","../../src/components/Welcome.svelte","../../src/components/MapIcon.svelte","../../src/components/ResultsList.svelte","../../.yarn/cache/leaflet-npm-1.9.1-501e2cd745-8a84fbe690.zip/node_modules/leaflet/dist/leaflet-src.esm.js","../../src/components/MapPosition.svelte","../../.yarn/cache/leaflet-minimap-npm-3.6.1-945fa818a3-ac48b72b86.zip/node_modules/leaflet-minimap/dist/Control.MiniMap.min.js","../../src/components/Map.svelte","../../src/pages/SearchPage.svelte","../../src/components/SearchSectionReverse.svelte","../../src/pages/ReversePage.svelte","../../src/components/SearchSectionDetails.svelte","../../src/components/DetailsOneRow.svelte","../../src/components/DetailsPostcodeHint.svelte","../../src/components/DetailsInfoRow.svelte","../../src/components/DetailsInfoRowList.svelte","../../src/pages/DetailsPage.svelte","../../src/pages/PolygonsPage.svelte","../../src/pages/DeletablePage.svelte","../../src/pages/StatusPage.svelte","../../src/pages/AboutPage.svelte","../../src/App.svelte","../../src/main.js"],"sourcesContent":["function noop() { }\nconst identity = x => x;\nfunction assign(tar, src) {\n // @ts-ignore\n for (const k in src)\n tar[k] = src[k];\n return tar;\n}\nfunction is_promise(value) {\n return value && typeof value === 'object' && typeof value.then === 'function';\n}\nfunction add_location(element, file, line, column, char) {\n element.__svelte_meta = {\n loc: { file, line, column, char }\n };\n}\nfunction run(fn) {\n return fn();\n}\nfunction blank_object() {\n return Object.create(null);\n}\nfunction run_all(fns) {\n fns.forEach(run);\n}\nfunction is_function(thing) {\n return typeof thing === 'function';\n}\nfunction safe_not_equal(a, b) {\n return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');\n}\nlet src_url_equal_anchor;\nfunction src_url_equal(element_src, url) {\n if (!src_url_equal_anchor) {\n src_url_equal_anchor = document.createElement('a');\n }\n src_url_equal_anchor.href = url;\n return element_src === src_url_equal_anchor.href;\n}\nfunction not_equal(a, b) {\n return a != a ? b == b : a !== b;\n}\nfunction is_empty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction validate_store(store, name) {\n if (store != null && typeof store.subscribe !== 'function') {\n throw new Error(`'${name}' is not a store with a 'subscribe' method`);\n }\n}\nfunction subscribe(store, ...callbacks) {\n if (store == null) {\n return noop;\n }\n const unsub = store.subscribe(...callbacks);\n return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\nfunction get_store_value(store) {\n let value;\n subscribe(store, _ => value = _)();\n return value;\n}\nfunction component_subscribe(component, store, callback) {\n component.$$.on_destroy.push(subscribe(store, callback));\n}\nfunction create_slot(definition, ctx, $$scope, fn) {\n if (definition) {\n const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n return definition[0](slot_ctx);\n }\n}\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n return definition[1] && fn\n ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))\n : $$scope.ctx;\n}\nfunction get_slot_changes(definition, $$scope, dirty, fn) {\n if (definition[2] && fn) {\n const lets = definition[2](fn(dirty));\n if ($$scope.dirty === undefined) {\n return lets;\n }\n if (typeof lets === 'object') {\n const merged = [];\n const len = Math.max($$scope.dirty.length, lets.length);\n for (let i = 0; i < len; i += 1) {\n merged[i] = $$scope.dirty[i] | lets[i];\n }\n return merged;\n }\n return $$scope.dirty | lets;\n }\n return $$scope.dirty;\n}\nfunction update_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn) {\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\n}\nfunction update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n update_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn);\n}\nfunction get_all_dirty_from_scope($$scope) {\n if ($$scope.ctx.length > 32) {\n const dirty = [];\n const length = $$scope.ctx.length / 32;\n for (let i = 0; i < length; i++) {\n dirty[i] = -1;\n }\n return dirty;\n }\n return -1;\n}\nfunction exclude_internal_props(props) {\n const result = {};\n for (const k in props)\n if (k[0] !== '$')\n result[k] = props[k];\n return result;\n}\nfunction compute_rest_props(props, keys) {\n const rest = {};\n keys = new Set(keys);\n for (const k in props)\n if (!keys.has(k) && k[0] !== '$')\n rest[k] = props[k];\n return rest;\n}\nfunction compute_slots(slots) {\n const result = {};\n for (const key in slots) {\n result[key] = true;\n }\n return result;\n}\nfunction once(fn) {\n let ran = false;\n return function (...args) {\n if (ran)\n return;\n ran = true;\n fn.call(this, ...args);\n };\n}\nfunction null_to_empty(value) {\n return value == null ? '' : value;\n}\nfunction set_store_value(store, ret, value) {\n store.set(value);\n return ret;\n}\nconst has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\nfunction action_destroyer(action_result) {\n return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\n\nconst is_client = typeof window !== 'undefined';\nlet now = is_client\n ? () => window.performance.now()\n : () => Date.now();\nlet raf = is_client ? cb => requestAnimationFrame(cb) : noop;\n// used internally for testing\nfunction set_now(fn) {\n now = fn;\n}\nfunction set_raf(fn) {\n raf = fn;\n}\n\nconst tasks = new Set();\nfunction run_tasks(now) {\n tasks.forEach(task => {\n if (!task.c(now)) {\n tasks.delete(task);\n task.f();\n }\n });\n if (tasks.size !== 0)\n raf(run_tasks);\n}\n/**\n * For testing purposes only!\n */\nfunction clear_loops() {\n tasks.clear();\n}\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n */\nfunction loop(callback) {\n let task;\n if (tasks.size === 0)\n raf(run_tasks);\n return {\n promise: new Promise(fulfill => {\n tasks.add(task = { c: callback, f: fulfill });\n }),\n abort() {\n tasks.delete(task);\n }\n };\n}\n\n// Track which nodes are claimed during hydration. Unclaimed nodes can then be removed from the DOM\n// at the end of hydration without touching the remaining nodes.\nlet is_hydrating = false;\nfunction start_hydrating() {\n is_hydrating = true;\n}\nfunction end_hydrating() {\n is_hydrating = false;\n}\nfunction upper_bound(low, high, key, value) {\n // Return first index of value larger than input value in the range [low, high)\n while (low < high) {\n const mid = low + ((high - low) >> 1);\n if (key(mid) <= value) {\n low = mid + 1;\n }\n else {\n high = mid;\n }\n }\n return low;\n}\nfunction init_hydrate(target) {\n if (target.hydrate_init)\n return;\n target.hydrate_init = true;\n // We know that all children have claim_order values since the unclaimed have been detached if target is not <head>\n let children = target.childNodes;\n // If target is <head>, there may be children without claim_order\n if (target.nodeName === 'HEAD') {\n const myChildren = [];\n for (let i = 0; i < children.length; i++) {\n const node = children[i];\n if (node.claim_order !== undefined) {\n myChildren.push(node);\n }\n }\n children = myChildren;\n }\n /*\n * Reorder claimed children optimally.\n * We can reorder claimed children optimally by finding the longest subsequence of\n * nodes that are already claimed in order and only moving the rest. The longest\n * subsequence subsequence of nodes that are claimed in order can be found by\n * computing the longest increasing subsequence of .claim_order values.\n *\n * This algorithm is optimal in generating the least amount of reorder operations\n * possible.\n *\n * Proof:\n * We know that, given a set of reordering operations, the nodes that do not move\n * always form an increasing subsequence, since they do not move among each other\n * meaning that they must be already ordered among each other. Thus, the maximal\n * set of nodes that do not move form a longest increasing subsequence.\n */\n // Compute longest increasing subsequence\n // m: subsequence length j => index k of smallest value that ends an increasing subsequence of length j\n const m = new Int32Array(children.length + 1);\n // Predecessor indices + 1\n const p = new Int32Array(children.length);\n m[0] = -1;\n let longest = 0;\n for (let i = 0; i < children.length; i++) {\n const current = children[i].claim_order;\n // Find the largest subsequence length such that it ends in a value less than our current value\n // upper_bound returns first greater value, so we subtract one\n // with fast path for when we are on the current longest subsequence\n const seqLen = ((longest > 0 && children[m[longest]].claim_order <= current) ? longest + 1 : upper_bound(1, longest, idx => children[m[idx]].claim_order, current)) - 1;\n p[i] = m[seqLen] + 1;\n const newLen = seqLen + 1;\n // We can guarantee that current is the smallest value. Otherwise, we would have generated a longer sequence.\n m[newLen] = i;\n longest = Math.max(newLen, longest);\n }\n // The longest increasing subsequence of nodes (initially reversed)\n const lis = [];\n // The rest of the nodes, nodes that will be moved\n const toMove = [];\n let last = children.length - 1;\n for (let cur = m[longest] + 1; cur != 0; cur = p[cur - 1]) {\n lis.push(children[cur - 1]);\n for (; last >= cur; last--) {\n toMove.push(children[last]);\n }\n last--;\n }\n for (; last >= 0; last--) {\n toMove.push(children[last]);\n }\n lis.reverse();\n // We sort the nodes being moved to guarantee that their insertion order matches the claim order\n toMove.sort((a, b) => a.claim_order - b.claim_order);\n // Finally, we move the nodes\n for (let i = 0, j = 0; i < toMove.length; i++) {\n while (j < lis.length && toMove[i].claim_order >= lis[j].claim_order) {\n j++;\n }\n const anchor = j < lis.length ? lis[j] : null;\n target.insertBefore(toMove[i], anchor);\n }\n}\nfunction append(target, node) {\n target.appendChild(node);\n}\nfunction append_styles(target, style_sheet_id, styles) {\n const append_styles_to = get_root_for_style(target);\n if (!append_styles_to.getElementById(style_sheet_id)) {\n const style = element('style');\n style.id = style_sheet_id;\n style.textContent = styles;\n append_stylesheet(append_styles_to, style);\n }\n}\nfunction get_root_for_style(node) {\n if (!node)\n return document;\n const root = node.getRootNode ? node.getRootNode() : node.ownerDocument;\n if (root && root.host) {\n return root;\n }\n return node.ownerDocument;\n}\nfunction append_empty_stylesheet(node) {\n const style_element = element('style');\n append_stylesheet(get_root_for_style(node), style_element);\n return style_element.sheet;\n}\nfunction append_stylesheet(node, style) {\n append(node.head || node, style);\n return style.sheet;\n}\nfunction append_hydration(target, node) {\n if (is_hydrating) {\n init_hydrate(target);\n if ((target.actual_end_child === undefined) || ((target.actual_end_child !== null) && (target.actual_end_child.parentNode !== target))) {\n target.actual_end_child = target.firstChild;\n }\n // Skip nodes of undefined ordering\n while ((target.actual_end_child !== null) && (target.actual_end_child.claim_order === undefined)) {\n target.actual_end_child = target.actual_end_child.nextSibling;\n }\n if (node !== target.actual_end_child) {\n // We only insert if the ordering of this node should be modified or the parent node is not target\n if (node.claim_order !== undefined || node.parentNode !== target) {\n target.insertBefore(node, target.actual_end_child);\n }\n }\n else {\n target.actual_end_child = node.nextSibling;\n }\n }\n else if (node.parentNode !== target || node.nextSibling !== null) {\n target.appendChild(node);\n }\n}\nfunction insert(target, node, anchor) {\n target.insertBefore(node, anchor || null);\n}\nfunction insert_hydration(target, node, anchor) {\n if (is_hydrating && !anchor) {\n append_hydration(target, node);\n }\n else if (node.parentNode !== target || node.nextSibling != anchor) {\n target.insertBefore(node, anchor || null);\n }\n}\nfunction detach(node) {\n node.parentNode.removeChild(node);\n}\nfunction destroy_each(iterations, detaching) {\n for (let i = 0; i < iterations.length; i += 1) {\n if (iterations[i])\n iterations[i].d(detaching);\n }\n}\nfunction element(name) {\n return document.createElement(name);\n}\nfunction element_is(name, is) {\n return document.createElement(name, { is });\n}\nfunction object_without_properties(obj, exclude) {\n const target = {};\n for (const k in obj) {\n if (has_prop(obj, k)\n // @ts-ignore\n && exclude.indexOf(k) === -1) {\n // @ts-ignore\n target[k] = obj[k];\n }\n }\n return target;\n}\nfunction svg_element(name) {\n return document.createElementNS('http://www.w3.org/2000/svg', name);\n}\nfunction text(data) {\n return document.createTextNode(data);\n}\nfunction space() {\n return text(' ');\n}\nfunction empty() {\n return text('');\n}\nfunction listen(node, event, handler, options) {\n node.addEventListener(event, handler, options);\n return () => node.removeEventListener(event, handler, options);\n}\nfunction prevent_default(fn) {\n return function (event) {\n event.preventDefault();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction stop_propagation(fn) {\n return function (event) {\n event.stopPropagation();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction self(fn) {\n return function (event) {\n // @ts-ignore\n if (event.target === this)\n fn.call(this, event);\n };\n}\nfunction trusted(fn) {\n return function (event) {\n // @ts-ignore\n if (event.isTrusted)\n fn.call(this, event);\n };\n}\nfunction attr(node, attribute, value) {\n if (value == null)\n node.removeAttribute(attribute);\n else if (node.getAttribute(attribute) !== value)\n node.setAttribute(attribute, value);\n}\nfunction set_attributes(node, attributes) {\n // @ts-ignore\n const descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n for (const key in attributes) {\n if (attributes[key] == null) {\n node.removeAttribute(key);\n }\n else if (key === 'style') {\n node.style.cssText = attributes[key];\n }\n else if (key === '__value') {\n node.value = node[key] = attributes[key];\n }\n else if (descriptors[key] && descriptors[key].set) {\n node[key] = attributes[key];\n }\n else {\n attr(node, key, attributes[key]);\n }\n }\n}\nfunction set_svg_attributes(node, attributes) {\n for (const key in attributes) {\n attr(node, key, attributes[key]);\n }\n}\nfunction set_custom_element_data(node, prop, value) {\n if (prop in node) {\n node[prop] = typeof node[prop] === 'boolean' && value === '' ? true : value;\n }\n else {\n attr(node, prop, value);\n }\n}\nfunction xlink_attr(node, attribute, value) {\n node.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\nfunction get_binding_group_value(group, __value, checked) {\n const value = new Set();\n for (let i = 0; i < group.length; i += 1) {\n if (group[i].checked)\n value.add(group[i].__value);\n }\n if (!checked) {\n value.delete(__value);\n }\n return Array.from(value);\n}\nfunction to_number(value) {\n return value === '' ? null : +value;\n}\nfunction time_ranges_to_array(ranges) {\n const array = [];\n for (let i = 0; i < ranges.length; i += 1) {\n array.push({ start: ranges.start(i), end: ranges.end(i) });\n }\n return array;\n}\nfunction children(element) {\n return Array.from(element.childNodes);\n}\nfunction init_claim_info(nodes) {\n if (nodes.claim_info === undefined) {\n nodes.claim_info = { last_index: 0, total_claimed: 0 };\n }\n}\nfunction claim_node(nodes, predicate, processNode, createNode, dontUpdateLastIndex = false) {\n // Try to find nodes in an order such that we lengthen the longest increasing subsequence\n init_claim_info(nodes);\n const resultNode = (() => {\n // We first try to find an element after the previous one\n for (let i = nodes.claim_info.last_index; i < nodes.length; i++) {\n const node = nodes[i];\n if (predicate(node)) {\n const replacement = processNode(node);\n if (replacement === undefined) {\n nodes.splice(i, 1);\n }\n else {\n nodes[i] = replacement;\n }\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n return node;\n }\n }\n // Otherwise, we try to find one before\n // We iterate in reverse so that we don't go too far back\n for (let i = nodes.claim_info.last_index - 1; i >= 0; i--) {\n const node = nodes[i];\n if (predicate(node)) {\n const replacement = processNode(node);\n if (replacement === undefined) {\n nodes.splice(i, 1);\n }\n else {\n nodes[i] = replacement;\n }\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n else if (replacement === undefined) {\n // Since we spliced before the last_index, we decrease it\n nodes.claim_info.last_index--;\n }\n return node;\n }\n }\n // If we can't find any matching node, we create a new one\n return createNode();\n })();\n resultNode.claim_order = nodes.claim_info.total_claimed;\n nodes.claim_info.total_claimed += 1;\n return resultNode;\n}\nfunction claim_element_base(nodes, name, attributes, create_element) {\n return claim_node(nodes, (node) => node.nodeName === name, (node) => {\n const remove = [];\n for (let j = 0; j < node.attributes.length; j++) {\n const attribute = node.attributes[j];\n if (!attributes[attribute.name]) {\n remove.push(attribute.name);\n }\n }\n remove.forEach(v => node.removeAttribute(v));\n return undefined;\n }, () => create_element(name));\n}\nfunction claim_element(nodes, name, attributes) {\n return claim_element_base(nodes, name, attributes, element);\n}\nfunction claim_svg_element(nodes, name, attributes) {\n return claim_element_base(nodes, name, attributes, svg_element);\n}\nfunction claim_text(nodes, data) {\n return claim_node(nodes, (node) => node.nodeType === 3, (node) => {\n const dataStr = '' + data;\n if (node.data.startsWith(dataStr)) {\n if (node.data.length !== dataStr.length) {\n return node.splitText(dataStr.length);\n }\n }\n else {\n node.data = dataStr;\n }\n }, () => text(data), true // Text nodes should not update last index since it is likely not worth it to eliminate an increasing subsequence of actual elements\n );\n}\nfunction claim_space(nodes) {\n return claim_text(nodes, ' ');\n}\nfunction find_comment(nodes, text, start) {\n for (let i = start; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeType === 8 /* comment node */ && node.textContent.trim() === text) {\n return i;\n }\n }\n return nodes.length;\n}\nfunction claim_html_tag(nodes, is_svg) {\n // find html opening tag\n const start_index = find_comment(nodes, 'HTML_TAG_START', 0);\n const end_index = find_comment(nodes, 'HTML_TAG_END', start_index);\n if (start_index === end_index) {\n return new HtmlTagHydration(undefined, is_svg);\n }\n init_claim_info(nodes);\n const html_tag_nodes = nodes.splice(start_index, end_index - start_index + 1);\n detach(html_tag_nodes[0]);\n detach(html_tag_nodes[html_tag_nodes.length - 1]);\n const claimed_nodes = html_tag_nodes.slice(1, html_tag_nodes.length - 1);\n for (const n of claimed_nodes) {\n n.claim_order = nodes.claim_info.total_claimed;\n nodes.claim_info.total_claimed += 1;\n }\n return new HtmlTagHydration(claimed_nodes, is_svg);\n}\nfunction set_data(text, data) {\n data = '' + data;\n if (text.wholeText !== data)\n text.data = data;\n}\nfunction set_input_value(input, value) {\n input.value = value == null ? '' : value;\n}\nfunction set_input_type(input, type) {\n try {\n input.type = type;\n }\n catch (e) {\n // do nothing\n }\n}\nfunction set_style(node, key, value, important) {\n if (value === null) {\n node.style.removeProperty(key);\n }\n else {\n node.style.setProperty(key, value, important ? 'important' : '');\n }\n}\nfunction select_option(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n if (option.__value === value) {\n option.selected = true;\n return;\n }\n }\n select.selectedIndex = -1; // no option should be selected\n}\nfunction select_options(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n option.selected = ~value.indexOf(option.__value);\n }\n}\nfunction select_value(select) {\n const selected_option = select.querySelector(':checked') || select.options[0];\n return selected_option && selected_option.__value;\n}\nfunction select_multiple_value(select) {\n return [].map.call(select.querySelectorAll(':checked'), option => option.__value);\n}\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\nlet crossorigin;\nfunction is_crossorigin() {\n if (crossorigin === undefined) {\n crossorigin = false;\n try {\n if (typeof window !== 'undefined' && window.parent) {\n void window.parent.document;\n }\n }\n catch (error) {\n crossorigin = true;\n }\n }\n return crossorigin;\n}\nfunction add_resize_listener(node, fn) {\n const computed_style = getComputedStyle(node);\n if (computed_style.position === 'static') {\n node.style.position = 'relative';\n }\n const iframe = element('iframe');\n iframe.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' +\n 'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;');\n iframe.setAttribute('aria-hidden', 'true');\n iframe.tabIndex = -1;\n const crossorigin = is_crossorigin();\n let unsubscribe;\n if (crossorigin) {\n iframe.src = \"data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}</script>\";\n unsubscribe = listen(window, 'message', (event) => {\n if (event.source === iframe.contentWindow)\n fn();\n });\n }\n else {\n iframe.src = 'about:blank';\n iframe.onload = () => {\n unsubscribe = listen(iframe.contentWindow, 'resize', fn);\n };\n }\n append(node, iframe);\n return () => {\n if (crossorigin) {\n unsubscribe();\n }\n else if (unsubscribe && iframe.contentWindow) {\n unsubscribe();\n }\n detach(iframe);\n };\n}\nfunction toggle_class(element, name, toggle) {\n element.classList[toggle ? 'add' : 'remove'](name);\n}\nfunction custom_event(type, detail, { bubbles = false, cancelable = false } = {}) {\n const e = document.createEvent('CustomEvent');\n e.initCustomEvent(type, bubbles, cancelable, detail);\n return e;\n}\nfunction query_selector_all(selector, parent = document.body) {\n return Array.from(parent.querySelectorAll(selector));\n}\nclass HtmlTag {\n constructor(is_svg = false) {\n this.is_svg = false;\n this.is_svg = is_svg;\n this.e = this.n = null;\n }\n c(html) {\n this.h(html);\n }\n m(html, target, anchor = null) {\n if (!this.e) {\n if (this.is_svg)\n this.e = svg_element(target.nodeName);\n else\n this.e = element(target.nodeName);\n this.t = target;\n this.c(html);\n }\n this.i(anchor);\n }\n h(html) {\n this.e.innerHTML = html;\n this.n = Array.from(this.e.childNodes);\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert(this.t, this.n[i], anchor);\n }\n }\n p(html) {\n this.d();\n this.h(html);\n this.i(this.a);\n }\n d() {\n this.n.forEach(detach);\n }\n}\nclass HtmlTagHydration extends HtmlTag {\n constructor(claimed_nodes, is_svg = false) {\n super(is_svg);\n this.e = this.n = null;\n this.l = claimed_nodes;\n }\n c(html) {\n if (this.l) {\n this.n = this.l;\n }\n else {\n super.c(html);\n }\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert_hydration(this.t, this.n[i], anchor);\n }\n }\n}\nfunction attribute_to_object(attributes) {\n const result = {};\n for (const attribute of attributes) {\n result[attribute.name] = attribute.value;\n }\n return result;\n}\nfunction get_custom_elements_slots(element) {\n const result = {};\n element.childNodes.forEach((node) => {\n result[node.slot || 'default'] = true;\n });\n return result;\n}\n\n// we need to store the information for multiple documents because a Svelte application could also contain iframes\n// https://github.com/sveltejs/svelte/issues/3624\nconst managed_styles = new Map();\nlet active = 0;\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\nfunction hash(str) {\n let hash = 5381;\n let i = str.length;\n while (i--)\n hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n return hash >>> 0;\n}\nfunction create_style_information(doc, node) {\n const info = { stylesheet: append_empty_stylesheet(node), rules: {} };\n managed_styles.set(doc, info);\n return info;\n}\nfunction create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {\n const step = 16.666 / duration;\n let keyframes = '{\\n';\n for (let p = 0; p <= 1; p += step) {\n const t = a + (b - a) * ease(p);\n keyframes += p * 100 + `%{${fn(t, 1 - t)}}\\n`;\n }\n const rule = keyframes + `100% {${fn(b, 1 - b)}}\\n}`;\n const name = `__svelte_${hash(rule)}_${uid}`;\n const doc = get_root_for_style(node);\n const { stylesheet, rules } = managed_styles.get(doc) || create_style_information(doc, node);\n if (!rules[name]) {\n rules[name] = true;\n stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);\n }\n const animation = node.style.animation || '';\n node.style.animation = `${animation ? `${animation}, ` : ''}${name} ${duration}ms linear ${delay}ms 1 both`;\n active += 1;\n return name;\n}\nfunction delete_rule(node, name) {\n const previous = (node.style.animation || '').split(', ');\n const next = previous.filter(name\n ? anim => anim.indexOf(name) < 0 // remove specific animation\n : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n );\n const deleted = previous.length - next.length;\n if (deleted) {\n node.style.animation = next.join(', ');\n active -= deleted;\n if (!active)\n clear_rules();\n }\n}\nfunction clear_rules() {\n raf(() => {\n if (active)\n return;\n managed_styles.forEach(info => {\n const { ownerNode } = info.stylesheet;\n // there is no ownerNode if it runs on jsdom.\n if (ownerNode)\n detach(ownerNode);\n });\n managed_styles.clear();\n });\n}\n\nfunction create_animation(node, from, fn, params) {\n if (!from)\n return noop;\n const to = node.getBoundingClientRect();\n if (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom)\n return noop;\n const { delay = 0, duration = 300, easing = identity, \n // @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation?\n start: start_time = now() + delay, \n // @ts-ignore todo:\n end = start_time + duration, tick = noop, css } = fn(node, { from, to }, params);\n let running = true;\n let started = false;\n let name;\n function start() {\n if (css) {\n name = create_rule(node, 0, 1, duration, delay, easing, css);\n }\n if (!delay) {\n started = true;\n }\n }\n function stop() {\n if (css)\n delete_rule(node, name);\n running = false;\n }\n loop(now => {\n if (!started && now >= start_time) {\n started = true;\n }\n if (started && now >= end) {\n tick(1, 0);\n stop();\n }\n if (!running) {\n return false;\n }\n if (started) {\n const p = now - start_time;\n const t = 0 + 1 * easing(p / duration);\n tick(t, 1 - t);\n }\n return true;\n });\n start();\n tick(0, 1);\n return stop;\n}\nfunction fix_position(node) {\n const style = getComputedStyle(node);\n if (style.position !== 'absolute' && style.position !== 'fixed') {\n const { width, height } = style;\n const a = node.getBoundingClientRect();\n node.style.position = 'absolute';\n node.style.width = width;\n node.style.height = height;\n add_transform(node, a);\n }\n}\nfunction add_transform(node, a) {\n const b = node.getBoundingClientRect();\n if (a.left !== b.left || a.top !== b.top) {\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n node.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;\n }\n}\n\nlet current_component;\nfunction set_current_component(component) {\n current_component = component;\n}\nfunction get_current_component() {\n if (!current_component)\n throw new Error('Function called outside component initialization');\n return current_component;\n}\nfunction beforeUpdate(fn) {\n get_current_component().$$.before_update.push(fn);\n}\nfunction onMount(fn) {\n get_current_component().$$.on_mount.push(fn);\n}\nfunction afterUpdate(fn) {\n get_current_component().$$.after_update.push(fn);\n}\nfunction onDestroy(fn) {\n get_current_component().$$.on_destroy.push(fn);\n}\nfunction createEventDispatcher() {\n const component = get_current_component();\n return (type, detail, { cancelable = false } = {}) => {\n const callbacks = component.$$.callbacks[type];\n if (callbacks) {\n // TODO are there situations where events could be dispatched\n // in a server (non-DOM) environment?\n const event = custom_event(type, detail, { cancelable });\n callbacks.slice().forEach(fn => {\n fn.call(component, event);\n });\n return !event.defaultPrevented;\n }\n return true;\n };\n}\nfunction setContext(key, context) {\n get_current_component().$$.context.set(key, context);\n return context;\n}\nfunction getContext(key) {\n return get_current_component().$$.context.get(key);\n}\nfunction getAllContexts() {\n return get_current_component().$$.context;\n}\nfunction hasContext(key) {\n return get_current_component().$$.context.has(key);\n}\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\nfunction bubble(component, event) {\n const callbacks = component.$$.callbacks[event.type];\n if (callbacks) {\n // @ts-ignore\n callbacks.slice().forEach(fn => fn.call(this, event));\n }\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\nconst binding_callbacks = [];\nconst render_callbacks = [];\nconst flush_callbacks = [];\nconst resolved_promise = Promise.resolve();\nlet update_scheduled = false;\nfunction schedule_update() {\n if (!update_scheduled) {\n update_scheduled = true;\n resolved_promise.then(flush);\n }\n}\nfunction tick() {\n schedule_update();\n return resolved_promise;\n}\nfunction add_render_callback(fn) {\n render_callbacks.push(fn);\n}\nfunction add_flush_callback(fn) {\n flush_callbacks.push(fn);\n}\n// flush() calls callbacks in this order:\n// 1. All beforeUpdate callbacks, in order: parents before children\n// 2. All bind:this callbacks, in reverse order: children before parents.\n// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT\n// for afterUpdates called during the initial onMount, which are called in\n// reverse order: children before parents.\n// Since callbacks might update component values, which could trigger another\n// call to flush(), the following steps guard against this:\n// 1. During beforeUpdate, any updated components will be added to the\n// dirty_components array and will cause a reentrant call to flush(). Because\n// the flush index is kept outside the function, the reentrant call will pick\n// up where the earlier call left off and go through all dirty components. The\n// current_component value is saved and restored so that the reentrant call will\n// not interfere with the \"parent\" flush() call.\n// 2. bind:this callbacks cannot trigger new flush() calls.\n// 3. During afterUpdate, any updated components will NOT have their afterUpdate\n// callback called a second time; the seen_callbacks set, outside the flush()\n// function, guarantees this behavior.\nconst seen_callbacks = new Set();\nlet flushidx = 0; // Do *not* move this inside the flush() function\nfunction flush() {\n const saved_component = current_component;\n do {\n // first, call beforeUpdate functions\n // and update components\n while (flushidx < dirty_components.length) {\n const component = dirty_components[flushidx];\n flushidx++;\n set_current_component(component);\n update(component.$$);\n }\n set_current_component(null);\n dirty_components.length = 0;\n flushidx = 0;\n while (binding_callbacks.length)\n binding_callbacks.pop()();\n // then, once components are updated, call\n // afterUpdate functions. This may cause\n // subsequent updates...\n for (let i = 0; i < render_callbacks.length; i += 1) {\n const callback = render_callbacks[i];\n if (!seen_callbacks.has(callback)) {\n // ...so guard against infinite loops\n seen_callbacks.add(callback);\n callback();\n }\n }\n render_callbacks.length = 0;\n } while (dirty_components.length);\n while (flush_callbacks.length) {\n flush_callbacks.pop()();\n }\n update_scheduled = false;\n seen_callbacks.clear();\n set_current_component(saved_component);\n}\nfunction update($$) {\n if ($$.fragment !== null) {\n $$.update();\n run_all($$.before_update);\n const dirty = $$.dirty;\n $$.dirty = [-1];\n $$.fragment && $$.fragment.p($$.ctx, dirty);\n $$.after_update.forEach(add_render_callback);\n }\n}\n\nlet promise;\nfunction wait() {\n if (!promise) {\n promise = Promise.resolve();\n promise.then(() => {\n promise = null;\n });\n }\n return promise;\n}\nfunction dispatch(node, direction, kind) {\n node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\nconst outroing = new Set();\nlet outros;\nfunction group_outros() {\n outros = {\n r: 0,\n c: [],\n p: outros // parent group\n };\n}\nfunction check_outros() {\n if (!outros.r) {\n run_all(outros.c);\n }\n outros = outros.p;\n}\nfunction transition_in(block, local) {\n if (block && block.i) {\n outroing.delete(block);\n block.i(local);\n }\n}\nfunction transition_out(block, local, detach, callback) {\n if (block && block.o) {\n if (outroing.has(block))\n return;\n outroing.add(block);\n outros.c.push(() => {\n outroing.delete(block);\n if (callback) {\n if (detach)\n block.d(1);\n callback();\n }\n });\n block.o(local);\n }\n else if (callback) {\n callback();\n }\n}\nconst null_transition = { duration: 0 };\nfunction create_in_transition(node, fn, params) {\n let config = fn(node, params);\n let running = false;\n let animation_name;\n let task;\n let uid = 0;\n function cleanup() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n tick(0, 1);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n if (task)\n task.abort();\n running = true;\n add_render_callback(() => dispatch(node, true, 'start'));\n task = loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(1, 0);\n dispatch(node, true, 'end');\n cleanup();\n return running = false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(t, 1 - t);\n }\n }\n return running;\n });\n }\n let started = false;\n return {\n start() {\n if (started)\n return;\n started = true;\n delete_rule(node);\n if (is_function(config)) {\n config = config();\n wait().then(go);\n }\n else {\n go();\n }\n },\n invalidate() {\n started = false;\n },\n end() {\n if (running) {\n cleanup();\n running = false;\n }\n }\n };\n}\nfunction create_out_transition(node, fn, params) {\n let config = fn(node, params);\n let running = true;\n let animation_name;\n const group = outros;\n group.r += 1;\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n add_render_callback(() => dispatch(node, false, 'start'));\n loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(0, 1);\n dispatch(node, false, 'end');\n if (!--group.r) {\n // this will result in `end()` being called,\n // so we don't need to clean up here\n run_all(group.c);\n }\n return false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(1 - t, t);\n }\n }\n return running;\n });\n }\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go();\n });\n }\n else {\n go();\n }\n return {\n end(reset) {\n if (reset && config.tick) {\n config.tick(1, 0);\n }\n if (running) {\n if (animation_name)\n delete_rule(node, animation_name);\n running = false;\n }\n }\n };\n}\nfunction create_bidirectional_transition(node, fn, params, intro) {\n let config = fn(node, params);\n let t = intro ? 0 : 1;\n let running_program = null;\n let pending_program = null;\n let animation_name = null;\n function clear_animation() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function init(program, duration) {\n const d = (program.b - t);\n duration *= Math.abs(d);\n return {\n a: t,\n b: program.b,\n d,\n duration,\n start: program.start,\n end: program.start + duration,\n group: program.group\n };\n }\n function go(b) {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n const program = {\n start: now() + delay,\n b\n };\n if (!b) {\n // @ts-ignore todo: improve typings\n program.group = outros;\n outros.r += 1;\n }\n if (running_program || pending_program) {\n pending_program = program;\n }\n else {\n // if this is an intro, and there's a delay, we need to do\n // an initial tick and/or apply CSS animation immediately\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, b, duration, delay, easing, css);\n }\n if (b)\n tick(0, 1);\n running_program = init(program, duration);\n add_render_callback(() => dispatch(node, b, 'start'));\n loop(now => {\n if (pending_program && now > pending_program.start) {\n running_program = init(pending_program, duration);\n pending_program = null;\n dispatch(node, running_program.b, 'start');\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);\n }\n }\n if (running_program) {\n if (now >= running_program.end) {\n tick(t = running_program.b, 1 - t);\n dispatch(node, running_program.b, 'end');\n if (!pending_program) {\n // we're done\n if (running_program.b) {\n // intro — we can tidy up immediately\n clear_animation();\n }\n else {\n // outro — needs to be coordinated\n if (!--running_program.group.r)\n run_all(running_program.group.c);\n }\n }\n running_program = null;\n }\n else if (now >= running_program.start) {\n const p = now - running_program.start;\n t = running_program.a + running_program.d * easing(p / running_program.duration);\n tick(t, 1 - t);\n }\n }\n return !!(running_program || pending_program);\n });\n }\n }\n return {\n run(b) {\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go(b);\n });\n }\n else {\n go(b);\n }\n },\n end() {\n clear_animation();\n running_program = pending_program = null;\n }\n };\n}\n\nfunction handle_promise(promise, info) {\n const token = info.token = {};\n function update(type, index, key, value) {\n if (info.token !== token)\n return;\n info.resolved = value;\n let child_ctx = info.ctx;\n if (key !== undefined) {\n child_ctx = child_ctx.slice();\n child_ctx[key] = value;\n }\n const block = type && (info.current = type)(child_ctx);\n let needs_flush = false;\n if (info.block) {\n if (info.blocks) {\n info.blocks.forEach((block, i) => {\n if (i !== index && block) {\n group_outros();\n transition_out(block, 1, 1, () => {\n if (info.blocks[i] === block) {\n info.blocks[i] = null;\n }\n });\n check_outros();\n }\n });\n }\n else {\n info.block.d(1);\n }\n block.c();\n transition_in(block, 1);\n block.m(info.mount(), info.anchor);\n needs_flush = true;\n }\n info.block = block;\n if (info.blocks)\n info.blocks[index] = block;\n if (needs_flush) {\n flush();\n }\n }\n if (is_promise(promise)) {\n const current_component = get_current_component();\n promise.then(value => {\n set_current_component(current_component);\n update(info.then, 1, info.value, value);\n set_current_component(null);\n }, error => {\n set_current_component(current_component);\n update(info.catch, 2, info.error, error);\n set_current_component(null);\n if (!info.hasCatch) {\n throw error;\n }\n });\n // if we previously had a then/catch block, destroy it\n if (info.current !== info.pending) {\n update(info.pending, 0);\n return true;\n }\n }\n else {\n if (info.current !== info.then) {\n update(info.then, 1, info.value, promise);\n return true;\n }\n info.resolved = promise;\n }\n}\nfunction update_await_block_branch(info, ctx, dirty) {\n const child_ctx = ctx.slice();\n const { resolved } = info;\n if (info.current === info.then) {\n child_ctx[info.value] = resolved;\n }\n if (info.current === info.catch) {\n child_ctx[info.error] = resolved;\n }\n info.block.p(child_ctx, dirty);\n}\n\nconst globals = (typeof window !== 'undefined'\n ? window\n : typeof globalThis !== 'undefined'\n ? globalThis\n : global);\n\nfunction destroy_block(block, lookup) {\n block.d(1);\n lookup.delete(block.key);\n}\nfunction outro_and_destroy_block(block, lookup) {\n transition_out(block, 1, 1, () => {\n lookup.delete(block.key);\n });\n}\nfunction fix_and_destroy_block(block, lookup) {\n block.f();\n destroy_block(block, lookup);\n}\nfunction fix_and_outro_and_destroy_block(block, lookup) {\n block.f();\n outro_and_destroy_block(block, lookup);\n}\nfunction update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {\n let o = old_blocks.length;\n let n = list.length;\n let i = o;\n const old_indexes = {};\n while (i--)\n old_indexes[old_blocks[i].key] = i;\n const new_blocks = [];\n const new_lookup = new Map();\n const deltas = new Map();\n i = n;\n while (i--) {\n const child_ctx = get_context(ctx, list, i);\n const key = get_key(child_ctx);\n let block = lookup.get(key);\n if (!block) {\n block = create_each_block(key, child_ctx);\n block.c();\n }\n else if (dynamic) {\n block.p(child_ctx, dirty);\n }\n new_lookup.set(key, new_blocks[i] = block);\n if (key in old_indexes)\n deltas.set(key, Math.abs(i - old_indexes[key]));\n }\n const will_move = new Set();\n const did_move = new Set();\n function insert(block) {\n transition_in(block, 1);\n block.m(node, next);\n lookup.set(block.key, block);\n next = block.first;\n n--;\n }\n while (o && n) {\n const new_block = new_blocks[n - 1];\n const old_block = old_blocks[o - 1];\n const new_key = new_block.key;\n const old_key = old_block.key;\n if (new_block === old_block) {\n // do nothing\n next = new_block.first;\n o--;\n n--;\n }\n else if (!new_lookup.has(old_key)) {\n // remove old block\n destroy(old_block, lookup);\n o--;\n }\n else if (!lookup.has(new_key) || will_move.has(new_key)) {\n insert(new_block);\n }\n else if (did_move.has(old_key)) {\n o--;\n }\n else if (deltas.get(new_key) > deltas.get(old_key)) {\n did_move.add(new_key);\n insert(new_block);\n }\n else {\n will_move.add(old_key);\n o--;\n }\n }\n while (o--) {\n const old_block = old_blocks[o];\n if (!new_lookup.has(old_block.key))\n destroy(old_block, lookup);\n }\n while (n)\n insert(new_blocks[n - 1]);\n return new_blocks;\n}\nfunction validate_each_keys(ctx, list, get_context, get_key) {\n const keys = new Set();\n for (let i = 0; i < list.length; i++) {\n const key = get_key(get_context(ctx, list, i));\n if (keys.has(key)) {\n throw new Error('Cannot have duplicate keys in a keyed each');\n }\n keys.add(key);\n }\n}\n\nfunction get_spread_update(levels, updates) {\n const update = {};\n const to_null_out = {};\n const accounted_for = { $$scope: 1 };\n let i = levels.length;\n while (i--) {\n const o = levels[i];\n const n = updates[i];\n if (n) {\n for (const key in o) {\n if (!(key in n))\n to_null_out[key] = 1;\n }\n for (const key in n) {\n if (!accounted_for[key]) {\n update[key] = n[key];\n accounted_for[key] = 1;\n }\n }\n levels[i] = n;\n }\n else {\n for (const key in o) {\n accounted_for[key] = 1;\n }\n }\n }\n for (const key in to_null_out) {\n if (!(key in update))\n update[key] = undefined;\n }\n return update;\n}\nfunction get_spread_object(spread_props) {\n return typeof spread_props === 'object' && spread_props !== null ? spread_props : {};\n}\n\n// source: https://html.spec.whatwg.org/multipage/indices.html\nconst boolean_attributes = new Set([\n 'allowfullscreen',\n 'allowpaymentrequest',\n 'async',\n 'autofocus',\n 'autoplay',\n 'checked',\n 'controls',\n 'default',\n 'defer',\n 'disabled',\n 'formnovalidate',\n 'hidden',\n 'ismap',\n 'loop',\n 'multiple',\n 'muted',\n 'nomodule',\n 'novalidate',\n 'open',\n 'playsinline',\n 'readonly',\n 'required',\n 'reversed',\n 'selected'\n]);\n\n/** regex of all html void element names */\nconst void_element_names = /^(?:area|base|br|col|command|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)$/;\nfunction is_void(name) {\n return void_element_names.test(name) || name.toLowerCase() === '!doctype';\n}\n\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\nfunction spread(args, attrs_to_add) {\n const attributes = Object.assign({}, ...args);\n if (attrs_to_add) {\n const classes_to_add = attrs_to_add.classes;\n const styles_to_add = attrs_to_add.styles;\n if (classes_to_add) {\n if (attributes.class == null) {\n attributes.class = classes_to_add;\n }\n else {\n attributes.class += ' ' + classes_to_add;\n }\n }\n if (styles_to_add) {\n if (attributes.style == null) {\n attributes.style = style_object_to_string(styles_to_add);\n }\n else {\n attributes.style = style_object_to_string(merge_ssr_styles(attributes.style, styles_to_add));\n }\n }\n }\n let str = '';\n Object.keys(attributes).forEach(name => {\n if (invalid_attribute_name_character.test(name))\n return;\n const value = attributes[name];\n if (value === true)\n str += ' ' + name;\n else if (boolean_attributes.has(name.toLowerCase())) {\n if (value)\n str += ' ' + name;\n }\n else if (value != null) {\n str += ` ${name}=\"${value}\"`;\n }\n });\n return str;\n}\nfunction merge_ssr_styles(style_attribute, style_directive) {\n const style_object = {};\n for (const individual_style of style_attribute.split(';')) {\n const colon_index = individual_style.indexOf(':');\n const name = individual_style.slice(0, colon_index).trim();\n const value = individual_style.slice(colon_index + 1).trim();\n if (!name)\n continue;\n style_object[name] = value;\n }\n for (const name in style_directive) {\n const value = style_directive[name];\n if (value) {\n style_object[name] = value;\n }\n else {\n delete style_object[name];\n }\n }\n return style_object;\n}\nconst ATTR_REGEX = /[&\"]/g;\nconst CONTENT_REGEX = /[&<]/g;\n/**\n * Note: this method is performance sensitive and has been optimized\n * https://github.com/sveltejs/svelte/pull/5701\n */\nfunction escape(value, is_attr = false) {\n const str = String(value);\n const pattern = is_attr ? ATTR_REGEX : CONTENT_REGEX;\n pattern.lastIndex = 0;\n let escaped = '';\n let last = 0;\n while (pattern.test(str)) {\n const i = pattern.lastIndex - 1;\n const ch = str[i];\n escaped += str.substring(last, i) + (ch === '&' ? '&' : (ch === '\"' ? '"' : '<'));\n last = i + 1;\n }\n return escaped + str.substring(last);\n}\nfunction escape_attribute_value(value) {\n // keep booleans, null, and undefined for the sake of `spread`\n const should_escape = typeof value === 'string' || (value && typeof value === 'object');\n return should_escape ? escape(value, true) : value;\n}\nfunction escape_object(obj) {\n const result = {};\n for (const key in obj) {\n result[key] = escape_attribute_value(obj[key]);\n }\n return result;\n}\nfunction each(items, fn) {\n let str = '';\n for (let i = 0; i < items.length; i += 1) {\n str += fn(items[i], i);\n }\n return str;\n}\nconst missing_component = {\n $$render: () => ''\n};\nfunction validate_component(component, name) {\n if (!component || !component.$$render) {\n if (name === 'svelte:component')\n name += ' this={...}';\n throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules`);\n }\n return component;\n}\nfunction debug(file, line, column, values) {\n console.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n console.log(values); // eslint-disable-line no-console\n return '';\n}\nlet on_destroy;\nfunction create_ssr_component(fn) {\n function $$render(result, props, bindings, slots, context) {\n const parent_component = current_component;\n const $$ = {\n on_destroy,\n context: new Map(context || (parent_component ? parent_component.$$.context : [])),\n // these will be immediately discarded\n on_mount: [],\n before_update: [],\n after_update: [],\n callbacks: blank_object()\n };\n set_current_component({ $$ });\n const html = fn(result, props, bindings, slots);\n set_current_component(parent_component);\n return html;\n }\n return {\n render: (props = {}, { $$slots = {}, context = new Map() } = {}) => {\n on_destroy = [];\n const result = { title: '', head: '', css: new Set() };\n const html = $$render(result, props, {}, $$slots, context);\n run_all(on_destroy);\n return {\n html,\n css: {\n code: Array.from(result.css).map(css => css.code).join('\\n'),\n map: null // TODO\n },\n head: result.title + result.head\n };\n },\n $$render\n };\n}\nfunction add_attribute(name, value, boolean) {\n if (value == null || (boolean && !value))\n return '';\n const assignment = (boolean && value === true) ? '' : `=\"${escape(value, true)}\"`;\n return ` ${name}${assignment}`;\n}\nfunction add_classes(classes) {\n return classes ? ` class=\"${classes}\"` : '';\n}\nfunction style_object_to_string(style_object) {\n return Object.keys(style_object)\n .filter(key => style_object[key])\n .map(key => `${key}: ${style_object[key]};`)\n .join(' ');\n}\nfunction add_styles(style_object) {\n const styles = style_object_to_string(style_object);\n return styles ? ` style=\"${styles}\"` : '';\n}\n\nfunction bind(component, name, callback) {\n const index = component.$$.props[name];\n if (index !== undefined) {\n component.$$.bound[index] = callback;\n callback(component.$$.ctx[index]);\n }\n}\nfunction create_component(block) {\n block && block.c();\n}\nfunction claim_component(block, parent_nodes) {\n block && block.l(parent_nodes);\n}\nfunction mount_component(component, target, anchor, customElement) {\n const { fragment, on_mount, on_destroy, after_update } = component.$$;\n fragment && fragment.m(target, anchor);\n if (!customElement) {\n // onMount happens before the initial afterUpdate\n add_render_callback(() => {\n const new_on_destroy = on_mount.map(run).filter(is_function);\n if (on_destroy) {\n on_destroy.push(...new_on_destroy);\n }\n else {\n // Edge case - component was destroyed immediately,\n // most likely as a result of a binding initialising\n run_all(new_on_destroy);\n }\n component.$$.on_mount = [];\n });\n }\n after_update.forEach(add_render_callback);\n}\nfunction destroy_component(component, detaching) {\n const $$ = component.$$;\n if ($$.fragment !== null) {\n run_all($$.on_destroy);\n $$.fragment && $$.fragment.d(detaching);\n // TODO null out other refs, including component.$$ (but need to\n // preserve final state?)\n $$.on_destroy = $$.fragment = null;\n $$.ctx = [];\n }\n}\nfunction make_dirty(component, i) {\n if (component.$$.dirty[0] === -1) {\n dirty_components.push(component);\n schedule_update();\n component.$$.dirty.fill(0);\n }\n component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));\n}\nfunction init(component, options, instance, create_fragment, not_equal, props, append_styles, dirty = [-1]) {\n const parent_component = current_component;\n set_current_component(component);\n const $$ = component.$$ = {\n fragment: null,\n ctx: null,\n // state\n props,\n update: noop,\n not_equal,\n bound: blank_object(),\n // lifecycle\n on_mount: [],\n on_destroy: [],\n on_disconnect: [],\n before_update: [],\n after_update: [],\n context: new Map(options.context || (parent_component ? parent_component.$$.context : [])),\n // everything else\n callbacks: blank_object(),\n dirty,\n skip_bound: false,\n root: options.target || parent_component.$$.root\n };\n append_styles && append_styles($$.root);\n let ready = false;\n $$.ctx = instance\n ? instance(component, options.props || {}, (i, ret, ...rest) => {\n const value = rest.length ? rest[0] : ret;\n if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n if (!$$.skip_bound && $$.bound[i])\n $$.bound[i](value);\n if (ready)\n make_dirty(component, i);\n }\n return ret;\n })\n : [];\n $$.update();\n ready = true;\n run_all($$.before_update);\n // `false` as a special case of no DOM component\n $$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n if (options.target) {\n if (options.hydrate) {\n start_hydrating();\n const nodes = children(options.target);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.l(nodes);\n nodes.forEach(detach);\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.c();\n }\n if (options.intro)\n transition_in(component.$$.fragment);\n mount_component(component, options.target, options.anchor, options.customElement);\n end_hydrating();\n flush();\n }\n set_current_component(parent_component);\n}\nlet SvelteElement;\nif (typeof HTMLElement === 'function') {\n SvelteElement = class extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n }\n connectedCallback() {\n const { on_mount } = this.$$;\n this.$$.on_disconnect = on_mount.map(run).filter(is_function);\n // @ts-ignore todo: improve typings\n for (const key in this.$$.slotted) {\n // @ts-ignore todo: improve typings\n this.appendChild(this.$$.slotted[key]);\n }\n }\n attributeChangedCallback(attr, _oldValue, newValue) {\n this[attr] = newValue;\n }\n disconnectedCallback() {\n run_all(this.$$.on_disconnect);\n }\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n // TODO should this delegate to addEventListener?\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n };\n}\n/**\n * Base class for Svelte components. Used when dev=false.\n */\nclass SvelteComponent {\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n}\n\nfunction dispatch_dev(type, detail) {\n document.dispatchEvent(custom_event(type, Object.assign({ version: '3.50.1' }, detail), { bubbles: true }));\n}\nfunction append_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append(target, node);\n}\nfunction append_hydration_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append_hydration(target, node);\n}\nfunction insert_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert(target, node, anchor);\n}\nfunction insert_hydration_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert_hydration(target, node, anchor);\n}\nfunction detach_dev(node) {\n dispatch_dev('SvelteDOMRemove', { node });\n detach(node);\n}\nfunction detach_between_dev(before, after) {\n while (before.nextSibling && before.nextSibling !== after) {\n detach_dev(before.nextSibling);\n }\n}\nfunction detach_before_dev(after) {\n while (after.previousSibling) {\n detach_dev(after.previousSibling);\n }\n}\nfunction detach_after_dev(before) {\n while (before.nextSibling) {\n detach_dev(before.nextSibling);\n }\n}\nfunction listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {\n const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : [];\n if (has_prevent_default)\n modifiers.push('preventDefault');\n if (has_stop_propagation)\n modifiers.push('stopPropagation');\n dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });\n const dispose = listen(node, event, handler, options);\n return () => {\n dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });\n dispose();\n };\n}\nfunction attr_dev(node, attribute, value) {\n attr(node, attribute, value);\n if (value == null)\n dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });\n else\n dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });\n}\nfunction prop_dev(node, property, value) {\n node[property] = value;\n dispatch_dev('SvelteDOMSetProperty', { node, property, value });\n}\nfunction dataset_dev(node, property, value) {\n node.dataset[property] = value;\n dispatch_dev('SvelteDOMSetDataset', { node, property, value });\n}\nfunction set_data_dev(text, data) {\n data = '' + data;\n if (text.wholeText === data)\n return;\n dispatch_dev('SvelteDOMSetData', { node: text, data });\n text.data = data;\n}\nfunction validate_each_argument(arg) {\n if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {\n let msg = '{#each} only iterates over array-like objects.';\n if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {\n msg += ' You can use a spread to convert this iterable into an array.';\n }\n throw new Error(msg);\n }\n}\nfunction validate_slots(name, slot, keys) {\n for (const slot_key of Object.keys(slot)) {\n if (!~keys.indexOf(slot_key)) {\n console.warn(`<${name}> received an unexpected slot \"${slot_key}\".`);\n }\n }\n}\nfunction validate_dynamic_element(tag) {\n const is_string = typeof tag === 'string';\n if (tag && !is_string) {\n throw new Error('<svelte:element> expects \"this\" attribute to be a string.');\n }\n}\nfunction validate_void_dynamic_element(tag) {\n if (tag && is_void(tag)) {\n throw new Error(`<svelte:element this=\"${tag}\"> is self-closing and cannot have content.`);\n }\n}\n/**\n * Base class for Svelte components with some minor dev-enhancements. Used when dev=true.\n */\nclass SvelteComponentDev extends SvelteComponent {\n constructor(options) {\n if (!options || (!options.target && !options.$$inline)) {\n throw new Error(\"'target' is a required option\");\n }\n super();\n }\n $destroy() {\n super.$destroy();\n this.$destroy = () => {\n console.warn('Component was already destroyed'); // eslint-disable-line no-console\n };\n }\n $capture_state() { }\n $inject_state() { }\n}\n/**\n * Base class to create strongly typed Svelte components.\n * This only exists for typing purposes and should be used in `.d.ts` files.\n *\n * ### Example:\n *\n * You have component library on npm called `component-library`, from which\n * you export a component called `MyComponent`. For Svelte+TypeScript users,\n * you want to provide typings. Therefore you create a `index.d.ts`:\n * ```ts\n * import { SvelteComponentTyped } from \"svelte\";\n * export class MyComponent extends SvelteComponentTyped<{foo: string}> {}\n * ```\n * Typing this makes it possible for IDEs like VS Code with the Svelte extension\n * to provide intellisense and to use the component like this in a Svelte file\n * with TypeScript:\n * ```svelte\n * <script lang=\"ts\">\n * \timport { MyComponent } from \"component-library\";\n * </script>\n * <MyComponent foo={'bar'} />\n * ```\n *\n * #### Why not make this part of `SvelteComponent(Dev)`?\n * Because\n * ```ts\n * class ASubclassOfSvelteComponent extends SvelteComponent<{foo: string}> {}\n * const component: typeof SvelteComponent = ASubclassOfSvelteComponent;\n * ```\n * will throw a type error, so we need to separate the more strictly typed class.\n */\nclass SvelteComponentTyped extends SvelteComponentDev {\n constructor(options) {\n super(options);\n }\n}\nfunction loop_guard(timeout) {\n const start = Date.now();\n return () => {\n if (Date.now() - start > timeout) {\n throw new Error('Infinite loop detected');\n }\n };\n}\n\nexport { HtmlTag, HtmlTagHydration, SvelteComponent, SvelteComponentDev, SvelteComponentTyped, SvelteElement, action_destroyer, add_attribute, add_classes, add_flush_callback, add_location, add_render_callback, add_resize_listener, add_styles, add_transform, afterUpdate, append, append_dev, append_empty_stylesheet, append_hydration, append_hydration_dev, append_styles, assign, attr, attr_dev, attribute_to_object, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_html_tag, claim_space, claim_svg_element, claim_text, clear_loops, component_subscribe, compute_rest_props, compute_slots, createEventDispatcher, create_animation, create_bidirectional_transition, create_component, create_in_transition, create_out_transition, create_slot, create_ssr_component, current_component, custom_event, dataset_dev, debug, destroy_block, destroy_component, destroy_each, detach, detach_after_dev, detach_before_dev, detach_between_dev, detach_dev, dirty_components, dispatch_dev, each, element, element_is, empty, end_hydrating, escape, escape_attribute_value, escape_object, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, getAllContexts, getContext, get_all_dirty_from_scope, get_binding_group_value, get_current_component, get_custom_elements_slots, get_root_for_style, get_slot_changes, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, hasContext, has_prop, identity, init, insert, insert_dev, insert_hydration, insert_hydration_dev, intros, invalid_attribute_name_character, is_client, is_crossorigin, is_empty, is_function, is_promise, is_void, listen, listen_dev, loop, loop_guard, merge_ssr_styles, missing_component, mount_component, noop, not_equal, now, null_to_empty, object_without_properties, onDestroy, onMount, once, outro_and_destroy_block, prevent_default, prop_dev, query_selector_all, raf, run, run_all, safe_not_equal, schedule_update, select_multiple_value, select_option, select_options, select_value, self, setContext, set_attributes, set_current_component, set_custom_element_data, set_data, set_data_dev, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, spread, src_url_equal, start_hydrating, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, trusted, update_await_block_branch, update_keyed_each, update_slot, update_slot_base, validate_component, validate_dynamic_element, validate_each_argument, validate_each_keys, validate_slots, validate_store, validate_void_dynamic_element, xlink_attr };\n","/*!\n * Bootstrap v5.2.1 (https://getbootstrap.com/)\n * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.bootstrap = factory());\n})(this, (function () { 'use strict';\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n const MAX_UID = 1000000;\n const MILLISECONDS_MULTIPLIER = 1000;\n const TRANSITION_END = 'transitionend'; // Shout-out Angus Croll (https://goo.gl/pxwQGp)\n\n const toType = object => {\n if (object === null || object === undefined) {\n return `${object}`;\n }\n\n return Object.prototype.toString.call(object).match(/\\s([a-z]+)/i)[1].toLowerCase();\n };\n /**\n * Public Util API\n */\n\n\n const getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID);\n } while (document.getElementById(prefix));\n\n return prefix;\n };\n\n const getSelector = element => {\n let selector = element.getAttribute('data-bs-target');\n\n if (!selector || selector === '#') {\n let hrefAttribute = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n\n if (!hrefAttribute || !hrefAttribute.includes('#') && !hrefAttribute.startsWith('.')) {\n return null;\n } // Just in case some CMS puts out a full URL with the anchor appended\n\n\n if (hrefAttribute.includes('#') && !hrefAttribute.startsWith('#')) {\n hrefAttribute = `#${hrefAttribute.split('#')[1]}`;\n }\n\n selector = hrefAttribute && hrefAttribute !== '#' ? hrefAttribute.trim() : null;\n }\n\n return selector;\n };\n\n const getSelectorFromElement = element => {\n const selector = getSelector(element);\n\n if (selector) {\n return document.querySelector(selector) ? selector : null;\n }\n\n return null;\n };\n\n const getElementFromSelector = element => {\n const selector = getSelector(element);\n return selector ? document.querySelector(selector) : null;\n };\n\n const getTransitionDurationFromElement = element => {\n if (!element) {\n return 0;\n } // Get transition-duration of the element\n\n\n let {\n transitionDuration,\n transitionDelay\n } = window.getComputedStyle(element);\n const floatTransitionDuration = Number.parseFloat(transitionDuration);\n const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found\n\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0;\n } // If multiple durations are defined, take the first\n\n\n transitionDuration = transitionDuration.split(',')[0];\n transitionDelay = transitionDelay.split(',')[0];\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;\n };\n\n const triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END));\n };\n\n const isElement$1 = object => {\n if (!object || typeof object !== 'object') {\n return false;\n }\n\n if (typeof object.jquery !== 'undefined') {\n object = object[0];\n }\n\n return typeof object.nodeType !== 'undefined';\n };\n\n const getElement = object => {\n // it's a jQuery object or a node element\n if (isElement$1(object)) {\n return object.jquery ? object[0] : object;\n }\n\n if (typeof object === 'string' && object.length > 0) {\n return document.querySelector(object);\n }\n\n return null;\n };\n\n const isVisible = element => {\n if (!isElement$1(element) || element.getClientRects().length === 0) {\n return false;\n }\n\n const elementIsVisible = getComputedStyle(element).getPropertyValue('visibility') === 'visible'; // Handle `details` element as its content may falsie appear visible when it is closed\n\n const closedDetails = element.closest('details:not([open])');\n\n if (!closedDetails) {\n return elementIsVisible;\n }\n\n if (closedDetails !== element) {\n const summary = element.closest('summary');\n\n if (summary && summary.parentNode !== closedDetails) {\n return false;\n }\n\n if (summary === null) {\n return false;\n }\n }\n\n return elementIsVisible;\n };\n\n const isDisabled = element => {\n if (!element || element.nodeType !== Node.ELEMENT_NODE) {\n return true;\n }\n\n if (element.classList.contains('disabled')) {\n return true;\n }\n\n if (typeof element.disabled !== 'undefined') {\n return element.disabled;\n }\n\n return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false';\n };\n\n const findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null;\n } // Can find the shadow root otherwise it'll return the document\n\n\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode();\n return root instanceof ShadowRoot ? root : null;\n }\n\n if (element instanceof ShadowRoot) {\n return element;\n } // when we don't find a shadow root\n\n\n if (!element.parentNode) {\n return null;\n }\n\n return findShadowRoot(element.parentNode);\n };\n\n const noop = () => {};\n /**\n * Trick to restart an element's animation\n *\n * @param {HTMLElement} element\n * @return void\n *\n * @see https://www.charistheo.io/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation\n */\n\n\n const reflow = element => {\n element.offsetHeight; // eslint-disable-line no-unused-expressions\n };\n\n const getjQuery = () => {\n if (window.jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return window.jQuery;\n }\n\n return null;\n };\n\n const DOMContentLoadedCallbacks = [];\n\n const onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n // add listener on the first call when the document is in loading state\n if (!DOMContentLoadedCallbacks.length) {\n document.addEventListener('DOMContentLoaded', () => {\n for (const callback of DOMContentLoadedCallbacks) {\n callback();\n }\n });\n }\n\n DOMContentLoadedCallbacks.push(callback);\n } else {\n callback();\n }\n };\n\n const isRTL = () => document.documentElement.dir === 'rtl';\n\n const defineJQueryPlugin = plugin => {\n onDOMContentLoaded(() => {\n const $ = getjQuery();\n /* istanbul ignore if */\n\n if ($) {\n const name = plugin.NAME;\n const JQUERY_NO_CONFLICT = $.fn[name];\n $.fn[name] = plugin.jQueryInterface;\n $.fn[name].Constructor = plugin;\n\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT;\n return plugin.jQueryInterface;\n };\n }\n });\n };\n\n const execute = callback => {\n if (typeof callback === 'function') {\n callback();\n }\n };\n\n const executeAfterTransition = (callback, transitionElement, waitForTransition = true) => {\n if (!waitForTransition) {\n execute(callback);\n return;\n }\n\n const durationPadding = 5;\n const emulatedDuration = getTransitionDurationFromElement(transitionElement) + durationPadding;\n let called = false;\n\n const handler = ({\n target\n }) => {\n if (target !== transitionElement) {\n return;\n }\n\n called = true;\n transitionElement.removeEventListener(TRANSITION_END, handler);\n execute(callback);\n };\n\n transitionElement.addEventListener(TRANSITION_END, handler);\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(transitionElement);\n }\n }, emulatedDuration);\n };\n /**\n * Return the previous/next element of a list.\n *\n * @param {array} list The list of elements\n * @param activeElement The active element\n * @param shouldGetNext Choose to get next or previous element\n * @param isCycleAllowed\n * @return {Element|elem} The proper element\n */\n\n\n const getNextActiveElement = (list, activeElement, shouldGetNext, isCycleAllowed) => {\n const listLength = list.length;\n let index = list.indexOf(activeElement); // if the element does not exist in the list return an element\n // depending on the direction and if cycle is allowed\n\n if (index === -1) {\n return !shouldGetNext && isCycleAllowed ? list[listLength - 1] : list[0];\n }\n\n index += shouldGetNext ? 1 : -1;\n\n if (isCycleAllowed) {\n index = (index + listLength) % listLength;\n }\n\n return list[Math.max(0, Math.min(index, listLength - 1))];\n };\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): dom/event-handler.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const namespaceRegex = /[^.]*(?=\\..*)\\.|.*/;\n const stripNameRegex = /\\..*/;\n const stripUidRegex = /::\\d+$/;\n const eventRegistry = {}; // Events storage\n\n let uidEvent = 1;\n const customEvents = {\n mouseenter: 'mouseover',\n mouseleave: 'mouseout'\n };\n const nativeEvents = new Set(['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll']);\n /**\n * Private methods\n */\n\n function makeEventUid(element, uid) {\n return uid && `${uid}::${uidEvent++}` || element.uidEvent || uidEvent++;\n }\n\n function getElementEvents(element) {\n const uid = makeEventUid(element);\n element.uidEvent = uid;\n eventRegistry[uid] = eventRegistry[uid] || {};\n return eventRegistry[uid];\n }\n\n function bootstrapHandler(element, fn) {\n return function handler(event) {\n hydrateObj(event, {\n delegateTarget: element\n });\n\n if (handler.oneOff) {\n EventHandler.off(element, event.type, fn);\n }\n\n return fn.apply(element, [event]);\n };\n }\n\n function bootstrapDelegationHandler(element, selector, fn) {\n return function handler(event) {\n const domElements = element.querySelectorAll(selector);\n\n for (let {\n target\n } = event; target && target !== this; target = target.parentNode) {\n for (const domElement of domElements) {\n if (domElement !== target) {\n continue;\n }\n\n hydrateObj(event, {\n delegateTarget: target\n });\n\n if (handler.oneOff) {\n EventHandler.off(element, event.type, selector, fn);\n }\n\n return fn.apply(target, [event]);\n }\n }\n };\n }\n\n function findHandler(events, callable, delegationSelector = null) {\n return Object.values(events).find(event => event.callable === callable && event.delegationSelector === delegationSelector);\n }\n\n function normalizeParameters(originalTypeEvent, handler, delegationFunction) {\n const isDelegated = typeof handler === 'string'; // todo: tooltip passes `false` instead of selector, so we need to check\n\n const callable = isDelegated ? delegationFunction : handler || delegationFunction;\n let typeEvent = getTypeEvent(originalTypeEvent);\n\n if (!nativeEvents.has(typeEvent)) {\n typeEvent = originalTypeEvent;\n }\n\n return [isDelegated, callable, typeEvent];\n }\n\n function addHandler(element, originalTypeEvent, handler, delegationFunction, oneOff) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return;\n }\n\n let [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction); // in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position\n // this prevents the handler from being dispatched the same way as mouseover or mouseout does\n\n if (originalTypeEvent in customEvents) {\n const wrapFunction = fn => {\n return function (event) {\n if (!event.relatedTarget || event.relatedTarget !== event.delegateTarget && !event.delegateTarget.contains(event.relatedTarget)) {\n return fn.call(this, event);\n }\n };\n };\n\n callable = wrapFunction(callable);\n }\n\n const events = getElementEvents(element);\n const handlers = events[typeEvent] || (events[typeEvent] = {});\n const previousFunction = findHandler(handlers, callable, isDelegated ? handler : null);\n\n if (previousFunction) {\n previousFunction.oneOff = previousFunction.oneOff && oneOff;\n return;\n }\n\n const uid = makeEventUid(callable, originalTypeEvent.replace(namespaceRegex, ''));\n const fn = isDelegated ? bootstrapDelegationHandler(element, handler, callable) : bootstrapHandler(element, callable);\n fn.delegationSelector = isDelegated ? handler : null;\n fn.callable = callable;\n fn.oneOff = oneOff;\n fn.uidEvent = uid;\n handlers[uid] = fn;\n element.addEventListener(typeEvent, fn, isDelegated);\n }\n\n function removeHandler(element, events, typeEvent, handler, delegationSelector) {\n const fn = findHandler(events[typeEvent], handler, delegationSelector);\n\n if (!fn) {\n return;\n }\n\n element.removeEventListener(typeEvent, fn, Boolean(delegationSelector));\n delete events[typeEvent][fn.uidEvent];\n }\n\n function removeNamespacedHandlers(element, events, typeEvent, namespace) {\n const storeElementEvent = events[typeEvent] || {};\n\n for (const handlerKey of Object.keys(storeElementEvent)) {\n if (handlerKey.includes(namespace)) {\n const event = storeElementEvent[handlerKey];\n removeHandler(element, events, typeEvent, event.callable, event.delegationSelector);\n }\n }\n }\n\n function getTypeEvent(event) {\n // allow to get the native events from namespaced events ('click.bs.button' --> 'click')\n event = event.replace(stripNameRegex, '');\n return customEvents[event] || event;\n }\n\n const EventHandler = {\n on(element, event, handler, delegationFunction) {\n addHandler(element, event, handler, delegationFunction, false);\n },\n\n one(element, event, handler, delegationFunction) {\n addHandler(element, event, handler, delegationFunction, true);\n },\n\n off(element, originalTypeEvent, handler, delegationFunction) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return;\n }\n\n const [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction);\n const inNamespace = typeEvent !== originalTypeEvent;\n const events = getElementEvents(element);\n const storeElementEvent = events[typeEvent] || {};\n const isNamespace = originalTypeEvent.startsWith('.');\n\n if (typeof callable !== 'undefined') {\n // Simplest case: handler is passed, remove that listener ONLY.\n if (!Object.keys(storeElementEvent).length) {\n return;\n }\n\n removeHandler(element, events, typeEvent, callable, isDelegated ? handler : null);\n return;\n }\n\n if (isNamespace) {\n for (const elementEvent of Object.keys(events)) {\n removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1));\n }\n }\n\n for (const keyHandlers of Object.keys(storeElementEvent)) {\n const handlerKey = keyHandlers.replace(stripUidRegex, '');\n\n if (!inNamespace || originalTypeEvent.includes(handlerKey)) {\n const event = storeElementEvent[keyHandlers];\n removeHandler(element, events, typeEvent, event.callable, event.delegationSelector);\n }\n }\n },\n\n trigger(element, event, args) {\n if (typeof event !== 'string' || !element) {\n return null;\n }\n\n const $ = getjQuery();\n const typeEvent = getTypeEvent(event);\n const inNamespace = event !== typeEvent;\n let jQueryEvent = null;\n let bubbles = true;\n let nativeDispatch = true;\n let defaultPrevented = false;\n\n if (inNamespace && $) {\n jQueryEvent = $.Event(event, args);\n $(element).trigger(jQueryEvent);\n bubbles = !jQueryEvent.isPropagationStopped();\n nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();\n defaultPrevented = jQueryEvent.isDefaultPrevented();\n }\n\n let evt = new Event(event, {\n bubbles,\n cancelable: true\n });\n evt = hydrateObj(evt, args);\n\n if (defaultPrevented) {\n evt.preventDefault();\n }\n\n if (nativeDispatch) {\n element.dispatchEvent(evt);\n }\n\n if (evt.defaultPrevented && jQueryEvent) {\n jQueryEvent.preventDefault();\n }\n\n return evt;\n }\n\n };\n\n function hydrateObj(obj, meta) {\n for (const [key, value] of Object.entries(meta || {})) {\n try {\n obj[key] = value;\n } catch (_unused) {\n Object.defineProperty(obj, key, {\n configurable: true,\n\n get() {\n return value;\n }\n\n });\n }\n }\n\n return obj;\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): dom/data.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n /**\n * Constants\n */\n const elementMap = new Map();\n const Data = {\n set(element, key, instance) {\n if (!elementMap.has(element)) {\n elementMap.set(element, new Map());\n }\n\n const instanceMap = elementMap.get(element); // make it clear we only want one instance per element\n // can be removed later when multiple key/instances are fine to be used\n\n if (!instanceMap.has(key) && instanceMap.size !== 0) {\n // eslint-disable-next-line no-console\n console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`);\n return;\n }\n\n instanceMap.set(key, instance);\n },\n\n get(element, key) {\n if (elementMap.has(element)) {\n return elementMap.get(element).get(key) || null;\n }\n\n return null;\n },\n\n remove(element, key) {\n if (!elementMap.has(element)) {\n return;\n }\n\n const instanceMap = elementMap.get(element);\n instanceMap.delete(key); // free up element references if there are no instances left for an element\n\n if (instanceMap.size === 0) {\n elementMap.delete(element);\n }\n }\n\n };\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n function normalizeData(value) {\n if (value === 'true') {\n return true;\n }\n\n if (value === 'false') {\n return false;\n }\n\n if (value === Number(value).toString()) {\n return Number(value);\n }\n\n if (value === '' || value === 'null') {\n return null;\n }\n\n if (typeof value !== 'string') {\n return value;\n }\n\n try {\n return JSON.parse(decodeURIComponent(value));\n } catch (_unused) {\n return value;\n }\n }\n\n function normalizeDataKey(key) {\n return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`);\n }\n\n const Manipulator = {\n setDataAttribute(element, key, value) {\n element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value);\n },\n\n removeDataAttribute(element, key) {\n element.removeAttribute(`data-bs-${normalizeDataKey(key)}`);\n },\n\n getDataAttributes(element) {\n if (!element) {\n return {};\n }\n\n const attributes = {};\n const bsKeys = Object.keys(element.dataset).filter(key => key.startsWith('bs') && !key.startsWith('bsConfig'));\n\n for (const key of bsKeys) {\n let pureKey = key.replace(/^bs/, '');\n pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length);\n attributes[pureKey] = normalizeData(element.dataset[key]);\n }\n\n return attributes;\n },\n\n getDataAttribute(element, key) {\n return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`));\n }\n\n };\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): util/config.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Class definition\n */\n\n class Config {\n // Getters\n static get Default() {\n return {};\n }\n\n static get DefaultType() {\n return {};\n }\n\n static get NAME() {\n throw new Error('You have to implement the static method \"NAME\", for each component!');\n }\n\n _getConfig(config) {\n config = this._mergeConfigObj(config);\n config = this._configAfterMerge(config);\n\n this._typeCheckConfig(config);\n\n return config;\n }\n\n _configAfterMerge(config) {\n return config;\n }\n\n _mergeConfigObj(config, element) {\n const jsonConfig = isElement$1(element) ? Manipulator.getDataAttribute(element, 'config') : {}; // try to parse\n\n return { ...this.constructor.Default,\n ...(typeof jsonConfig === 'object' ? jsonConfig : {}),\n ...(isElement$1(element) ? Manipulator.getDataAttributes(element) : {}),\n ...(typeof config === 'object' ? config : {})\n };\n }\n\n _typeCheckConfig(config, configTypes = this.constructor.DefaultType) {\n for (const property of Object.keys(configTypes)) {\n const expectedTypes = configTypes[property];\n const value = config[property];\n const valueType = isElement$1(value) ? 'element' : toType(value);\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option \"${property}\" provided type \"${valueType}\" but expected type \"${expectedTypes}\".`);\n }\n }\n }\n\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): base-component.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const VERSION = '5.2.1';\n /**\n * Class definition\n */\n\n class BaseComponent extends Config {\n constructor(element, config) {\n super();\n element = getElement(element);\n\n if (!element) {\n return;\n }\n\n this._element = element;\n this._config = this._getConfig(config);\n Data.set(this._element, this.constructor.DATA_KEY, this);\n } // Public\n\n\n dispose() {\n Data.remove(this._element, this.constructor.DATA_KEY);\n EventHandler.off(this._element, this.constructor.EVENT_KEY);\n\n for (const propertyName of Object.getOwnPropertyNames(this)) {\n this[propertyName] = null;\n }\n }\n\n _queueCallback(callback, element, isAnimated = true) {\n executeAfterTransition(callback, element, isAnimated);\n }\n\n _getConfig(config) {\n config = this._mergeConfigObj(config, this._element);\n config = this._configAfterMerge(config);\n\n this._typeCheckConfig(config);\n\n return config;\n } // Static\n\n\n static getInstance(element) {\n return Data.get(getElement(element), this.DATA_KEY);\n }\n\n static getOrCreateInstance(element, config = {}) {\n return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null);\n }\n\n static get VERSION() {\n return VERSION;\n }\n\n static get DATA_KEY() {\n return `bs.${this.NAME}`;\n }\n\n static get EVENT_KEY() {\n return `.${this.DATA_KEY}`;\n }\n\n static eventName(name) {\n return `${name}${this.EVENT_KEY}`;\n }\n\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): util/component-functions.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n const enableDismissTrigger = (component, method = 'hide') => {\n const clickEvent = `click.dismiss${component.EVENT_KEY}`;\n const name = component.NAME;\n EventHandler.on(document, clickEvent, `[data-bs-dismiss=\"${name}\"]`, function (event) {\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault();\n }\n\n if (isDisabled(this)) {\n return;\n }\n\n const target = getElementFromSelector(this) || this.closest(`.${name}`);\n const instance = component.getOrCreateInstance(target); // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method\n\n instance[method]();\n });\n };\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): alert.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$f = 'alert';\n const DATA_KEY$a = 'bs.alert';\n const EVENT_KEY$b = `.${DATA_KEY$a}`;\n const EVENT_CLOSE = `close${EVENT_KEY$b}`;\n const EVENT_CLOSED = `closed${EVENT_KEY$b}`;\n const CLASS_NAME_FADE$5 = 'fade';\n const CLASS_NAME_SHOW$8 = 'show';\n /**\n * Class definition\n */\n\n class Alert extends BaseComponent {\n // Getters\n static get NAME() {\n return NAME$f;\n } // Public\n\n\n close() {\n const closeEvent = EventHandler.trigger(this._element, EVENT_CLOSE);\n\n if (closeEvent.defaultPrevented) {\n return;\n }\n\n this._element.classList.remove(CLASS_NAME_SHOW$8);\n\n const isAnimated = this._element.classList.contains(CLASS_NAME_FADE$5);\n\n this._queueCallback(() => this._destroyElement(), this._element, isAnimated);\n } // Private\n\n\n _destroyElement() {\n this._element.remove();\n\n EventHandler.trigger(this._element, EVENT_CLOSED);\n this.dispose();\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Alert.getOrCreateInstance(this);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config](this);\n });\n }\n\n }\n /**\n * Data API implementation\n */\n\n\n enableDismissTrigger(Alert, 'close');\n /**\n * jQuery\n */\n\n defineJQueryPlugin(Alert);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): button.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$e = 'button';\n const DATA_KEY$9 = 'bs.button';\n const EVENT_KEY$a = `.${DATA_KEY$9}`;\n const DATA_API_KEY$6 = '.data-api';\n const CLASS_NAME_ACTIVE$3 = 'active';\n const SELECTOR_DATA_TOGGLE$5 = '[data-bs-toggle=\"button\"]';\n const EVENT_CLICK_DATA_API$6 = `click${EVENT_KEY$a}${DATA_API_KEY$6}`;\n /**\n * Class definition\n */\n\n class Button extends BaseComponent {\n // Getters\n static get NAME() {\n return NAME$e;\n } // Public\n\n\n toggle() {\n // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method\n this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE$3));\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Button.getOrCreateInstance(this);\n\n if (config === 'toggle') {\n data[config]();\n }\n });\n }\n\n }\n /**\n * Data API implementation\n */\n\n\n EventHandler.on(document, EVENT_CLICK_DATA_API$6, SELECTOR_DATA_TOGGLE$5, event => {\n event.preventDefault();\n const button = event.target.closest(SELECTOR_DATA_TOGGLE$5);\n const data = Button.getOrCreateInstance(button);\n data.toggle();\n });\n /**\n * jQuery\n */\n\n defineJQueryPlugin(Button);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): dom/selector-engine.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const SelectorEngine = {\n find(selector, element = document.documentElement) {\n return [].concat(...Element.prototype.querySelectorAll.call(element, selector));\n },\n\n findOne(selector, element = document.documentElement) {\n return Element.prototype.querySelector.call(element, selector);\n },\n\n children(element, selector) {\n return [].concat(...element.children).filter(child => child.matches(selector));\n },\n\n parents(element, selector) {\n const parents = [];\n let ancestor = element.parentNode.closest(selector);\n\n while (ancestor) {\n parents.push(ancestor);\n ancestor = ancestor.parentNode.closest(selector);\n }\n\n return parents;\n },\n\n prev(element, selector) {\n let previous = element.previousElementSibling;\n\n while (previous) {\n if (previous.matches(selector)) {\n return [previous];\n }\n\n previous = previous.previousElementSibling;\n }\n\n return [];\n },\n\n // TODO: this is now unused; remove later along with prev()\n next(element, selector) {\n let next = element.nextElementSibling;\n\n while (next) {\n if (next.matches(selector)) {\n return [next];\n }\n\n next = next.nextElementSibling;\n }\n\n return [];\n },\n\n focusableChildren(element) {\n const focusables = ['a', 'button', 'input', 'textarea', 'select', 'details', '[tabindex]', '[contenteditable=\"true\"]'].map(selector => `${selector}:not([tabindex^=\"-\"])`).join(',');\n return this.find(focusables, element).filter(el => !isDisabled(el) && isVisible(el));\n }\n\n };\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): util/swipe.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$d = 'swipe';\n const EVENT_KEY$9 = '.bs.swipe';\n const EVENT_TOUCHSTART = `touchstart${EVENT_KEY$9}`;\n const EVENT_TOUCHMOVE = `touchmove${EVENT_KEY$9}`;\n const EVENT_TOUCHEND = `touchend${EVENT_KEY$9}`;\n const EVENT_POINTERDOWN = `pointerdown${EVENT_KEY$9}`;\n const EVENT_POINTERUP = `pointerup${EVENT_KEY$9}`;\n const POINTER_TYPE_TOUCH = 'touch';\n const POINTER_TYPE_PEN = 'pen';\n const CLASS_NAME_POINTER_EVENT = 'pointer-event';\n const SWIPE_THRESHOLD = 40;\n const Default$c = {\n endCallback: null,\n leftCallback: null,\n rightCallback: null\n };\n const DefaultType$c = {\n endCallback: '(function|null)',\n leftCallback: '(function|null)',\n rightCallback: '(function|null)'\n };\n /**\n * Class definition\n */\n\n class Swipe extends Config {\n constructor(element, config) {\n super();\n this._element = element;\n\n if (!element || !Swipe.isSupported()) {\n return;\n }\n\n this._config = this._getConfig(config);\n this._deltaX = 0;\n this._supportPointerEvents = Boolean(window.PointerEvent);\n\n this._initEvents();\n } // Getters\n\n\n static get Default() {\n return Default$c;\n }\n\n static get DefaultType() {\n return DefaultType$c;\n }\n\n static get NAME() {\n return NAME$d;\n } // Public\n\n\n dispose() {\n EventHandler.off(this._element, EVENT_KEY$9);\n } // Private\n\n\n _start(event) {\n if (!this._supportPointerEvents) {\n this._deltaX = event.touches[0].clientX;\n return;\n }\n\n if (this._eventIsPointerPenTouch(event)) {\n this._deltaX = event.clientX;\n }\n }\n\n _end(event) {\n if (this._eventIsPointerPenTouch(event)) {\n this._deltaX = event.clientX - this._deltaX;\n }\n\n this._handleSwipe();\n\n execute(this._config.endCallback);\n }\n\n _move(event) {\n this._deltaX = event.touches && event.touches.length > 1 ? 0 : event.touches[0].clientX - this._deltaX;\n }\n\n _handleSwipe() {\n const absDeltaX = Math.abs(this._deltaX);\n\n if (absDeltaX <= SWIPE_THRESHOLD) {\n return;\n }\n\n const direction = absDeltaX / this._deltaX;\n this._deltaX = 0;\n\n if (!direction) {\n return;\n }\n\n execute(direction > 0 ? this._config.rightCallback : this._config.leftCallback);\n }\n\n _initEvents() {\n if (this._supportPointerEvents) {\n EventHandler.on(this._element, EVENT_POINTERDOWN, event => this._start(event));\n EventHandler.on(this._element, EVENT_POINTERUP, event => this._end(event));\n\n this._element.classList.add(CLASS_NAME_POINTER_EVENT);\n } else {\n EventHandler.on(this._element, EVENT_TOUCHSTART, event => this._start(event));\n EventHandler.on(this._element, EVENT_TOUCHMOVE, event => this._move(event));\n EventHandler.on(this._element, EVENT_TOUCHEND, event => this._end(event));\n }\n }\n\n _eventIsPointerPenTouch(event) {\n return this._supportPointerEvents && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH);\n } // Static\n\n\n static isSupported() {\n return 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;\n }\n\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): carousel.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$c = 'carousel';\n const DATA_KEY$8 = 'bs.carousel';\n const EVENT_KEY$8 = `.${DATA_KEY$8}`;\n const DATA_API_KEY$5 = '.data-api';\n const ARROW_LEFT_KEY$1 = 'ArrowLeft';\n const ARROW_RIGHT_KEY$1 = 'ArrowRight';\n const TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch\n\n const ORDER_NEXT = 'next';\n const ORDER_PREV = 'prev';\n const DIRECTION_LEFT = 'left';\n const DIRECTION_RIGHT = 'right';\n const EVENT_SLIDE = `slide${EVENT_KEY$8}`;\n const EVENT_SLID = `slid${EVENT_KEY$8}`;\n const EVENT_KEYDOWN$1 = `keydown${EVENT_KEY$8}`;\n const EVENT_MOUSEENTER$1 = `mouseenter${EVENT_KEY$8}`;\n const EVENT_MOUSELEAVE$1 = `mouseleave${EVENT_KEY$8}`;\n const EVENT_DRAG_START = `dragstart${EVENT_KEY$8}`;\n const EVENT_LOAD_DATA_API$3 = `load${EVENT_KEY$8}${DATA_API_KEY$5}`;\n const EVENT_CLICK_DATA_API$5 = `click${EVENT_KEY$8}${DATA_API_KEY$5}`;\n const CLASS_NAME_CAROUSEL = 'carousel';\n const CLASS_NAME_ACTIVE$2 = 'active';\n const CLASS_NAME_SLIDE = 'slide';\n const CLASS_NAME_END = 'carousel-item-end';\n const CLASS_NAME_START = 'carousel-item-start';\n const CLASS_NAME_NEXT = 'carousel-item-next';\n const CLASS_NAME_PREV = 'carousel-item-prev';\n const SELECTOR_ACTIVE = '.active';\n const SELECTOR_ITEM = '.carousel-item';\n const SELECTOR_ACTIVE_ITEM = SELECTOR_ACTIVE + SELECTOR_ITEM;\n const SELECTOR_ITEM_IMG = '.carousel-item img';\n const SELECTOR_INDICATORS = '.carousel-indicators';\n const SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]';\n const SELECTOR_DATA_RIDE = '[data-bs-ride=\"carousel\"]';\n const KEY_TO_DIRECTION = {\n [ARROW_LEFT_KEY$1]: DIRECTION_RIGHT,\n [ARROW_RIGHT_KEY$1]: DIRECTION_LEFT\n };\n const Default$b = {\n interval: 5000,\n keyboard: true,\n pause: 'hover',\n ride: false,\n touch: true,\n wrap: true\n };\n const DefaultType$b = {\n interval: '(number|boolean)',\n // TODO:v6 remove boolean support\n keyboard: 'boolean',\n pause: '(string|boolean)',\n ride: '(boolean|string)',\n touch: 'boolean',\n wrap: 'boolean'\n };\n /**\n * Class definition\n */\n\n class Carousel extends BaseComponent {\n constructor(element, config) {\n super(element, config);\n this._interval = null;\n this._activeElement = null;\n this._isSliding = false;\n this.touchTimeout = null;\n this._swipeHelper = null;\n this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, this._element);\n\n this._addEventListeners();\n\n if (this._config.ride === CLASS_NAME_CAROUSEL) {\n this.cycle();\n }\n } // Getters\n\n\n static get Default() {\n return Default$b;\n }\n\n static get DefaultType() {\n return DefaultType$b;\n }\n\n static get NAME() {\n return NAME$c;\n } // Public\n\n\n next() {\n this._slide(ORDER_NEXT);\n }\n\n nextWhenVisible() {\n // FIXME TODO use `document.visibilityState`\n // Don't call next when the page isn't visible\n // or the carousel or its parent isn't visible\n if (!document.hidden && isVisible(this._element)) {\n this.next();\n }\n }\n\n prev() {\n this._slide(ORDER_PREV);\n }\n\n pause() {\n if (this._isSliding) {\n triggerTransitionEnd(this._element);\n }\n\n this._clearInterval();\n }\n\n cycle() {\n this._clearInterval();\n\n this._updateInterval();\n\n this._interval = setInterval(() => this.nextWhenVisible(), this._config.interval);\n }\n\n _maybeEnableCycle() {\n if (!this._config.ride) {\n return;\n }\n\n if (this._isSliding) {\n EventHandler.one(this._element, EVENT_SLID, () => this.cycle());\n return;\n }\n\n this.cycle();\n }\n\n to(index) {\n const items = this._getItems();\n\n if (index > items.length - 1 || index < 0) {\n return;\n }\n\n if (this._isSliding) {\n EventHandler.one(this._element, EVENT_SLID, () => this.to(index));\n return;\n }\n\n const activeIndex = this._getItemIndex(this._getActive());\n\n if (activeIndex === index) {\n return;\n }\n\n const order = index > activeIndex ? ORDER_NEXT : ORDER_PREV;\n\n this._slide(order, items[index]);\n }\n\n dispose() {\n if (this._swipeHelper) {\n this._swipeHelper.dispose();\n }\n\n super.dispose();\n } // Private\n\n\n _configAfterMerge(config) {\n config.defaultInterval = config.interval;\n return config;\n }\n\n _addEventListeners() {\n if (this._config.keyboard) {\n EventHandler.on(this._element, EVENT_KEYDOWN$1, event => this._keydown(event));\n }\n\n if (this._config.pause === 'hover') {\n EventHandler.on(this._element, EVENT_MOUSEENTER$1, () => this.pause());\n EventHandler.on(this._element, EVENT_MOUSELEAVE$1, () => this._maybeEnableCycle());\n }\n\n if (this._config.touch && Swipe.isSupported()) {\n this._addTouchEventListeners();\n }\n }\n\n _addTouchEventListeners() {\n for (const img of SelectorEngine.find(SELECTOR_ITEM_IMG, this._element)) {\n EventHandler.on(img, EVENT_DRAG_START, event => event.preventDefault());\n }\n\n const endCallBack = () => {\n if (this._config.pause !== 'hover') {\n return;\n } // If it's a touch-enabled device, mouseenter/leave are fired as\n // part of the mouse compatibility events on first tap - the carousel\n // would stop cycling until user tapped out of it;\n // here, we listen for touchend, explicitly pause the carousel\n // (as if it's the second time we tap on it, mouseenter compat event\n // is NOT fired) and after a timeout (to allow for mouse compatibility\n // events to fire) we explicitly restart cycling\n\n\n this.pause();\n\n if (this.touchTimeout) {\n clearTimeout(this.touchTimeout);\n }\n\n this.touchTimeout = setTimeout(() => this._maybeEnableCycle(), TOUCHEVENT_COMPAT_WAIT + this._config.interval);\n };\n\n const swipeConfig = {\n leftCallback: () => this._slide(this._directionToOrder(DIRECTION_LEFT)),\n rightCallback: () => this._slide(this._directionToOrder(DIRECTION_RIGHT)),\n endCallback: endCallBack\n };\n this._swipeHelper = new Swipe(this._element, swipeConfig);\n }\n\n _keydown(event) {\n if (/input|textarea/i.test(event.target.tagName)) {\n return;\n }\n\n const direction = KEY_TO_DIRECTION[event.key];\n\n if (direction) {\n event.preventDefault();\n\n this._slide(this._directionToOrder(direction));\n }\n }\n\n _getItemIndex(element) {\n return this._getItems().indexOf(element);\n }\n\n _setActiveIndicatorElement(index) {\n if (!this._indicatorsElement) {\n return;\n }\n\n const activeIndicator = SelectorEngine.findOne(SELECTOR_ACTIVE, this._indicatorsElement);\n activeIndicator.classList.remove(CLASS_NAME_ACTIVE$2);\n activeIndicator.removeAttribute('aria-current');\n const newActiveIndicator = SelectorEngine.findOne(`[data-bs-slide-to=\"${index}\"]`, this._indicatorsElement);\n\n if (newActiveIndicator) {\n newActiveIndicator.classList.add(CLASS_NAME_ACTIVE$2);\n newActiveIndicator.setAttribute('aria-current', 'true');\n }\n }\n\n _updateInterval() {\n const element = this._activeElement || this._getActive();\n\n if (!element) {\n return;\n }\n\n const elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10);\n this._config.interval = elementInterval || this._config.defaultInterval;\n }\n\n _slide(order, element = null) {\n if (this._isSliding) {\n return;\n }\n\n const activeElement = this._getActive();\n\n const isNext = order === ORDER_NEXT;\n const nextElement = element || getNextActiveElement(this._getItems(), activeElement, isNext, this._config.wrap);\n\n if (nextElement === activeElement) {\n return;\n }\n\n const nextElementIndex = this._getItemIndex(nextElement);\n\n const triggerEvent = eventName => {\n return EventHandler.trigger(this._element, eventName, {\n relatedTarget: nextElement,\n direction: this._orderToDirection(order),\n from: this._getItemIndex(activeElement),\n to: nextElementIndex\n });\n };\n\n const slideEvent = triggerEvent(EVENT_SLIDE);\n\n if (slideEvent.defaultPrevented) {\n return;\n }\n\n if (!activeElement || !nextElement) {\n // Some weirdness is happening, so we bail\n // todo: change tests that use empty divs to avoid this check\n return;\n }\n\n const isCycling = Boolean(this._interval);\n this.pause();\n this._isSliding = true;\n\n this._setActiveIndicatorElement(nextElementIndex);\n\n this._activeElement = nextElement;\n const directionalClassName = isNext ? CLASS_NAME_START : CLASS_NAME_END;\n const orderClassName = isNext ? CLASS_NAME_NEXT : CLASS_NAME_PREV;\n nextElement.classList.add(orderClassName);\n reflow(nextElement);\n activeElement.classList.add(directionalClassName);\n nextElement.classList.add(directionalClassName);\n\n const completeCallBack = () => {\n nextElement.classList.remove(directionalClassName, orderClassName);\n nextElement.classList.add(CLASS_NAME_ACTIVE$2);\n activeElement.classList.remove(CLASS_NAME_ACTIVE$2, orderClassName, directionalClassName);\n this._isSliding = false;\n triggerEvent(EVENT_SLID);\n };\n\n this._queueCallback(completeCallBack, activeElement, this._isAnimated());\n\n if (isCycling) {\n this.cycle();\n }\n }\n\n _isAnimated() {\n return this._element.classList.contains(CLASS_NAME_SLIDE);\n }\n\n _getActive() {\n return SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);\n }\n\n _getItems() {\n return SelectorEngine.find(SELECTOR_ITEM, this._element);\n }\n\n _clearInterval() {\n if (this._interval) {\n clearInterval(this._interval);\n this._interval = null;\n }\n }\n\n _directionToOrder(direction) {\n if (isRTL()) {\n return direction === DIRECTION_LEFT ? ORDER_PREV : ORDER_NEXT;\n }\n\n return direction === DIRECTION_LEFT ? ORDER_NEXT : ORDER_PREV;\n }\n\n _orderToDirection(order) {\n if (isRTL()) {\n return order === ORDER_PREV ? DIRECTION_LEFT : DIRECTION_RIGHT;\n }\n\n return order === ORDER_PREV ? DIRECTION_RIGHT : DIRECTION_LEFT;\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Carousel.getOrCreateInstance(this, config);\n\n if (typeof config === 'number') {\n data.to(config);\n return;\n }\n\n if (typeof config === 'string') {\n if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n }\n });\n }\n\n }\n /**\n * Data API implementation\n */\n\n\n EventHandler.on(document, EVENT_CLICK_DATA_API$5, SELECTOR_DATA_SLIDE, function (event) {\n const target = getElementFromSelector(this);\n\n if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {\n return;\n }\n\n event.preventDefault();\n const carousel = Carousel.getOrCreateInstance(target);\n const slideIndex = this.getAttribute('data-bs-slide-to');\n\n if (slideIndex) {\n carousel.to(slideIndex);\n\n carousel._maybeEnableCycle();\n\n return;\n }\n\n if (Manipulator.getDataAttribute(this, 'slide') === 'next') {\n carousel.next();\n\n carousel._maybeEnableCycle();\n\n return;\n }\n\n carousel.prev();\n\n carousel._maybeEnableCycle();\n });\n EventHandler.on(window, EVENT_LOAD_DATA_API$3, () => {\n const carousels = SelectorEngine.find(SELECTOR_DATA_RIDE);\n\n for (const carousel of carousels) {\n Carousel.getOrCreateInstance(carousel);\n }\n });\n /**\n * jQuery\n */\n\n defineJQueryPlugin(Carousel);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): collapse.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$b = 'collapse';\n const DATA_KEY$7 = 'bs.collapse';\n const EVENT_KEY$7 = `.${DATA_KEY$7}`;\n const DATA_API_KEY$4 = '.data-api';\n const EVENT_SHOW$6 = `show${EVENT_KEY$7}`;\n const EVENT_SHOWN$6 = `shown${EVENT_KEY$7}`;\n const EVENT_HIDE$6 = `hide${EVENT_KEY$7}`;\n const EVENT_HIDDEN$6 = `hidden${EVENT_KEY$7}`;\n const EVENT_CLICK_DATA_API$4 = `click${EVENT_KEY$7}${DATA_API_KEY$4}`;\n const CLASS_NAME_SHOW$7 = 'show';\n const CLASS_NAME_COLLAPSE = 'collapse';\n const CLASS_NAME_COLLAPSING = 'collapsing';\n const CLASS_NAME_COLLAPSED = 'collapsed';\n const CLASS_NAME_DEEPER_CHILDREN = `:scope .${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`;\n const CLASS_NAME_HORIZONTAL = 'collapse-horizontal';\n const WIDTH = 'width';\n const HEIGHT = 'height';\n const SELECTOR_ACTIVES = '.collapse.show, .collapse.collapsing';\n const SELECTOR_DATA_TOGGLE$4 = '[data-bs-toggle=\"collapse\"]';\n const Default$a = {\n parent: null,\n toggle: true\n };\n const DefaultType$a = {\n parent: '(null|element)',\n toggle: 'boolean'\n };\n /**\n * Class definition\n */\n\n class Collapse extends BaseComponent {\n constructor(element, config) {\n super(element, config);\n this._isTransitioning = false;\n this._triggerArray = [];\n const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE$4);\n\n for (const elem of toggleList) {\n const selector = getSelectorFromElement(elem);\n const filterElement = SelectorEngine.find(selector).filter(foundElement => foundElement === this._element);\n\n if (selector !== null && filterElement.length) {\n this._triggerArray.push(elem);\n }\n }\n\n this._initializeChildren();\n\n if (!this._config.parent) {\n this._addAriaAndCollapsedClass(this._triggerArray, this._isShown());\n }\n\n if (this._config.toggle) {\n this.toggle();\n }\n } // Getters\n\n\n static get Default() {\n return Default$a;\n }\n\n static get DefaultType() {\n return DefaultType$a;\n }\n\n static get NAME() {\n return NAME$b;\n } // Public\n\n\n toggle() {\n if (this._isShown()) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n show() {\n if (this._isTransitioning || this._isShown()) {\n return;\n }\n\n let activeChildren = []; // find active children\n\n if (this._config.parent) {\n activeChildren = this._getFirstLevelChildren(SELECTOR_ACTIVES).filter(element => element !== this._element).map(element => Collapse.getOrCreateInstance(element, {\n toggle: false\n }));\n }\n\n if (activeChildren.length && activeChildren[0]._isTransitioning) {\n return;\n }\n\n const startEvent = EventHandler.trigger(this._element, EVENT_SHOW$6);\n\n if (startEvent.defaultPrevented) {\n return;\n }\n\n for (const activeInstance of activeChildren) {\n activeInstance.hide();\n }\n\n const dimension = this._getDimension();\n\n this._element.classList.remove(CLASS_NAME_COLLAPSE);\n\n this._element.classList.add(CLASS_NAME_COLLAPSING);\n\n this._element.style[dimension] = 0;\n\n this._addAriaAndCollapsedClass(this._triggerArray, true);\n\n this._isTransitioning = true;\n\n const complete = () => {\n this._isTransitioning = false;\n\n this._element.classList.remove(CLASS_NAME_COLLAPSING);\n\n this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);\n\n this._element.style[dimension] = '';\n EventHandler.trigger(this._element, EVENT_SHOWN$6);\n };\n\n const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);\n const scrollSize = `scroll${capitalizedDimension}`;\n\n this._queueCallback(complete, this._element, true);\n\n this._element.style[dimension] = `${this._element[scrollSize]}px`;\n }\n\n hide() {\n if (this._isTransitioning || !this._isShown()) {\n return;\n }\n\n const startEvent = EventHandler.trigger(this._element, EVENT_HIDE$6);\n\n if (startEvent.defaultPrevented) {\n return;\n }\n\n const dimension = this._getDimension();\n\n this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`;\n reflow(this._element);\n\n this._element.classList.add(CLASS_NAME_COLLAPSING);\n\n this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);\n\n for (const trigger of this._triggerArray) {\n const element = getElementFromSelector(trigger);\n\n if (element && !this._isShown(element)) {\n this._addAriaAndCollapsedClass([trigger], false);\n }\n }\n\n this._isTransitioning = true;\n\n const complete = () => {\n this._isTransitioning = false;\n\n this._element.classList.remove(CLASS_NAME_COLLAPSING);\n\n this._element.classList.add(CLASS_NAME_COLLAPSE);\n\n EventHandler.trigger(this._element, EVENT_HIDDEN$6);\n };\n\n this._element.style[dimension] = '';\n\n this._queueCallback(complete, this._element, true);\n }\n\n _isShown(element = this._element) {\n return element.classList.contains(CLASS_NAME_SHOW$7);\n } // Private\n\n\n _configAfterMerge(config) {\n config.toggle = Boolean(config.toggle); // Coerce string values\n\n config.parent = getElement(config.parent);\n return config;\n }\n\n _getDimension() {\n return this._element.classList.contains(CLASS_NAME_HORIZONTAL) ? WIDTH : HEIGHT;\n }\n\n _initializeChildren() {\n if (!this._config.parent) {\n return;\n }\n\n const children = this._getFirstLevelChildren(SELECTOR_DATA_TOGGLE$4);\n\n for (const element of children) {\n const selected = getElementFromSelector(element);\n\n if (selected) {\n this._addAriaAndCollapsedClass([element], this._isShown(selected));\n }\n }\n }\n\n _getFirstLevelChildren(selector) {\n const children = SelectorEngine.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent); // remove children if greater depth\n\n return SelectorEngine.find(selector, this._config.parent).filter(element => !children.includes(element));\n }\n\n _addAriaAndCollapsedClass(triggerArray, isOpen) {\n if (!triggerArray.length) {\n return;\n }\n\n for (const element of triggerArray) {\n element.classList.toggle(CLASS_NAME_COLLAPSED, !isOpen);\n element.setAttribute('aria-expanded', isOpen);\n }\n } // Static\n\n\n static jQueryInterface(config) {\n const _config = {};\n\n if (typeof config === 'string' && /show|hide/.test(config)) {\n _config.toggle = false;\n }\n\n return this.each(function () {\n const data = Collapse.getOrCreateInstance(this, _config);\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n }\n });\n }\n\n }\n /**\n * Data API implementation\n */\n\n\n EventHandler.on(document, EVENT_CLICK_DATA_API$4, SELECTOR_DATA_TOGGLE$4, function (event) {\n // preventDefault only for <a> elements (which change the URL) not inside the collapsible element\n if (event.target.tagName === 'A' || event.delegateTarget && event.delegateTarget.tagName === 'A') {\n event.preventDefault();\n }\n\n const selector = getSelectorFromElement(this);\n const selectorElements = SelectorEngine.find(selector);\n\n for (const element of selectorElements) {\n Collapse.getOrCreateInstance(element, {\n toggle: false\n }).toggle();\n }\n });\n /**\n * jQuery\n */\n\n defineJQueryPlugin(Collapse);\n\n var top = 'top';\n var bottom = 'bottom';\n var right = 'right';\n var left = 'left';\n var auto = 'auto';\n var basePlacements = [top, bottom, right, left];\n var start = 'start';\n var end = 'end';\n var clippingParents = 'clippingParents';\n var viewport = 'viewport';\n var popper = 'popper';\n var reference = 'reference';\n var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n }, []);\n var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n }, []); // modifiers that need to read the DOM\n\n var beforeRead = 'beforeRead';\n var read = 'read';\n var afterRead = 'afterRead'; // pure-logic modifiers\n\n var beforeMain = 'beforeMain';\n var main = 'main';\n var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\n var beforeWrite = 'beforeWrite';\n var write = 'write';\n var afterWrite = 'afterWrite';\n var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];\n\n function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n }\n\n function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n }\n\n function isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n }\n\n function isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n }\n\n function isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n }\n\n // and applies them to the HTMLElements such as popper and arrow\n\n function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n }\n\n function effect$2(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const applyStyles$1 = {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect$2,\n requires: ['computeStyles']\n };\n\n function getBasePlacement(placement) {\n return placement.split('-')[0];\n }\n\n var max = Math.max;\n var min = Math.min;\n var round = Math.round;\n\n function getUAString() {\n var uaData = navigator.userAgentData;\n\n if (uaData != null && uaData.brands) {\n return uaData.brands.map(function (item) {\n return item.brand + \"/\" + item.version;\n }).join(' ');\n }\n\n return navigator.userAgent;\n }\n\n function isLayoutViewport() {\n return !/^((?!chrome|android).)*safari/i.test(getUAString());\n }\n\n function getBoundingClientRect(element, includeScale, isFixedStrategy) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n\n var clientRect = element.getBoundingClientRect();\n var scaleX = 1;\n var scaleY = 1;\n\n if (includeScale && isHTMLElement(element)) {\n scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n var _ref = isElement(element) ? getWindow(element) : window,\n visualViewport = _ref.visualViewport;\n\n var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n var width = clientRect.width / scaleX;\n var height = clientRect.height / scaleY;\n return {\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x,\n x: x,\n y: y\n };\n }\n\n // means it doesn't take into account transforms.\n\n function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n }\n\n function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n }\n\n function getComputedStyle$1(element) {\n return getWindow(element).getComputedStyle(element);\n }\n\n function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n }\n\n function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n }\n\n function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n }\n\n function getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle$1(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n } // `.offsetParent` reports `null` for fixed elements, while absolute elements\n // return the containing block\n\n\n function getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle$1(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle$1(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n } // Gets the closest ancestor positioned element. Handles some edge cases,\n // such as table ancestors and cross browser bugs.\n\n\n function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle$1(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n }\n\n function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n }\n\n function within(min$1, value, max$1) {\n return max(min$1, min(value, max$1));\n }\n function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n }\n\n function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n }\n\n function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n }\n\n function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n }\n\n var toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n };\n\n function arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n }\n\n function effect$1(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n\n return;\n }\n\n state.elements.arrow = arrowElement;\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const arrow$1 = {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect$1,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n };\n\n function getVariation(placement) {\n return placement.split('-')[1];\n }\n\n var unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n }; // Round the offsets to the nearest suitable subpixel based on the DPR.\n // Zooming can change the DPR, but it seems to report a value that will\n // cleanly divide the values into the appropriate subpixels.\n\n function roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n }\n\n function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n var _offsets$x = offsets.x,\n x = _offsets$x === void 0 ? 0 : _offsets$x,\n _offsets$y = offsets.y,\n y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref3.x;\n y = _ref3.y;\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle$1(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref4.x;\n y = _ref4.y;\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n }\n\n function computeStyles(_ref5) {\n var state = _ref5.state,\n options = _ref5.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const computeStyles$1 = {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n };\n\n var passive = {\n passive: true\n };\n\n function effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const eventListeners = {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n };\n\n var hash$1 = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n };\n function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash$1[matched];\n });\n }\n\n var hash = {\n start: 'end',\n end: 'start'\n };\n function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n }\n\n function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n }\n\n function getWindowScrollBarX(element) {\n // If <html> has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on <html>\n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n }\n\n function getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var layoutViewport = isLayoutViewport();\n\n if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n }\n\n // of the `<html>` and `<body>` rect bounds if horizontally scrollable\n\n function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle$1(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n }\n\n function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle$1(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n }\n\n function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n }\n\n /*\n given a DOM element, return the list of all scroll parents, up the list of ancesors\n until we get to the top window object. This list is what we attach scroll listeners\n to, because if any of these parent elements scroll, we'll need to re-calculate the\n reference element's position.\n */\n\n function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n }\n\n function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n }\n\n function getInnerBoundingClientRect(element, strategy) {\n var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n }\n\n function getClientRectFromMixedType(element, clippingParent, strategy) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n } // A \"clipping parent\" is an overflowable container with the characteristic of\n // clipping (or hiding) overflowing elements with a position different from\n // `initial`\n\n\n function getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle$1(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n } // Gets the maximum area that the element is visible in due to any number of\n // clipping parents\n\n\n function getClippingRect(element, boundary, rootBoundary, strategy) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n }\n\n function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n }\n }\n\n return offsets;\n }\n\n function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$strategy = _options.strategy,\n strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n }\n\n function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements$1 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements$1.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements$1;\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n }\n\n function getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n }\n\n function flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const flip$1 = {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n };\n\n function getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n }\n\n function isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n }\n\n function hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const hide$1 = {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n };\n\n function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n }\n\n function offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const offset$1 = {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n };\n\n function popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const popperOffsets$1 = {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n };\n\n function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n }\n\n function preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min$1 = offset + overflow[mainSide];\n var max$1 = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n } // eslint-disable-next-line import/no-unused-modules\n\n\n const preventOverflow$1 = {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n };\n\n function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n\n function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n }\n\n function isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n } // Returns the composite rect of an element relative to its offsetParent.\n // Composite means it takes into account transforms as well as layout.\n\n\n function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n }\n\n function order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n }\n\n function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n }\n\n function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n }\n\n function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n }\n\n var DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n };\n\n function areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n }\n\n function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n }); // Validate the provided modifiers so that the consumer will get warned\n\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n }\n var createPopper$2 = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\n var defaultModifiers$1 = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1];\n var createPopper$1 = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers$1\n }); // eslint-disable-next-line import/no-unused-modules\n\n var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$1, flip$1, preventOverflow$1, arrow$1, hide$1];\n var createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n }); // eslint-disable-next-line import/no-unused-modules\n\n const Popper = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({\n __proto__: null,\n popperGenerator,\n detectOverflow,\n createPopperBase: createPopper$2,\n createPopper,\n createPopperLite: createPopper$1,\n top,\n bottom,\n right,\n left,\n auto,\n basePlacements,\n start,\n end,\n clippingParents,\n viewport,\n popper,\n reference,\n variationPlacements,\n placements,\n beforeRead,\n read,\n afterRead,\n beforeMain,\n main,\n afterMain,\n beforeWrite,\n write,\n afterWrite,\n modifierPhases,\n applyStyles: applyStyles$1,\n arrow: arrow$1,\n computeStyles: computeStyles$1,\n eventListeners,\n flip: flip$1,\n hide: hide$1,\n offset: offset$1,\n popperOffsets: popperOffsets$1,\n preventOverflow: preventOverflow$1\n }, Symbol.toStringTag, { value: 'Module' }));\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): dropdown.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$a = 'dropdown';\n const DATA_KEY$6 = 'bs.dropdown';\n const EVENT_KEY$6 = `.${DATA_KEY$6}`;\n const DATA_API_KEY$3 = '.data-api';\n const ESCAPE_KEY$2 = 'Escape';\n const TAB_KEY$1 = 'Tab';\n const ARROW_UP_KEY$1 = 'ArrowUp';\n const ARROW_DOWN_KEY$1 = 'ArrowDown';\n const RIGHT_MOUSE_BUTTON = 2; // MouseEvent.button value for the secondary button, usually the right button\n\n const EVENT_HIDE$5 = `hide${EVENT_KEY$6}`;\n const EVENT_HIDDEN$5 = `hidden${EVENT_KEY$6}`;\n const EVENT_SHOW$5 = `show${EVENT_KEY$6}`;\n const EVENT_SHOWN$5 = `shown${EVENT_KEY$6}`;\n const EVENT_CLICK_DATA_API$3 = `click${EVENT_KEY$6}${DATA_API_KEY$3}`;\n const EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY$6}${DATA_API_KEY$3}`;\n const EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY$6}${DATA_API_KEY$3}`;\n const CLASS_NAME_SHOW$6 = 'show';\n const CLASS_NAME_DROPUP = 'dropup';\n const CLASS_NAME_DROPEND = 'dropend';\n const CLASS_NAME_DROPSTART = 'dropstart';\n const CLASS_NAME_DROPUP_CENTER = 'dropup-center';\n const CLASS_NAME_DROPDOWN_CENTER = 'dropdown-center';\n const SELECTOR_DATA_TOGGLE$3 = '[data-bs-toggle=\"dropdown\"]:not(.disabled):not(:disabled)';\n const SELECTOR_DATA_TOGGLE_SHOWN = `${SELECTOR_DATA_TOGGLE$3}.${CLASS_NAME_SHOW$6}`;\n const SELECTOR_MENU = '.dropdown-menu';\n const SELECTOR_NAVBAR = '.navbar';\n const SELECTOR_NAVBAR_NAV = '.navbar-nav';\n const SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';\n const PLACEMENT_TOP = isRTL() ? 'top-end' : 'top-start';\n const PLACEMENT_TOPEND = isRTL() ? 'top-start' : 'top-end';\n const PLACEMENT_BOTTOM = isRTL() ? 'bottom-end' : 'bottom-start';\n const PLACEMENT_BOTTOMEND = isRTL() ? 'bottom-start' : 'bottom-end';\n const PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start';\n const PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start';\n const PLACEMENT_TOPCENTER = 'top';\n const PLACEMENT_BOTTOMCENTER = 'bottom';\n const Default$9 = {\n autoClose: true,\n boundary: 'clippingParents',\n display: 'dynamic',\n offset: [0, 2],\n popperConfig: null,\n reference: 'toggle'\n };\n const DefaultType$9 = {\n autoClose: '(boolean|string)',\n boundary: '(string|element)',\n display: 'string',\n offset: '(array|string|function)',\n popperConfig: '(null|object|function)',\n reference: '(string|element|object)'\n };\n /**\n * Class definition\n */\n\n class Dropdown extends BaseComponent {\n constructor(element, config) {\n super(element, config);\n this._popper = null;\n this._parent = this._element.parentNode; // dropdown wrapper\n // todo: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.2/forms/input-group/\n\n this._menu = SelectorEngine.next(this._element, SELECTOR_MENU)[0] || SelectorEngine.prev(this._element, SELECTOR_MENU)[0];\n this._inNavbar = this._detectNavbar();\n } // Getters\n\n\n static get Default() {\n return Default$9;\n }\n\n static get DefaultType() {\n return DefaultType$9;\n }\n\n static get NAME() {\n return NAME$a;\n } // Public\n\n\n toggle() {\n return this._isShown() ? this.hide() : this.show();\n }\n\n show() {\n if (isDisabled(this._element) || this._isShown()) {\n return;\n }\n\n const relatedTarget = {\n relatedTarget: this._element\n };\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$5, relatedTarget);\n\n if (showEvent.defaultPrevented) {\n return;\n }\n\n this._createPopper(); // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n\n\n if ('ontouchstart' in document.documentElement && !this._parent.closest(SELECTOR_NAVBAR_NAV)) {\n for (const element of [].concat(...document.body.children)) {\n EventHandler.on(element, 'mouseover', noop);\n }\n }\n\n this._element.focus();\n\n this._element.setAttribute('aria-expanded', true);\n\n this._menu.classList.add(CLASS_NAME_SHOW$6);\n\n this._element.classList.add(CLASS_NAME_SHOW$6);\n\n EventHandler.trigger(this._element, EVENT_SHOWN$5, relatedTarget);\n }\n\n hide() {\n if (isDisabled(this._element) || !this._isShown()) {\n return;\n }\n\n const relatedTarget = {\n relatedTarget: this._element\n };\n\n this._completeHide(relatedTarget);\n }\n\n dispose() {\n if (this._popper) {\n this._popper.destroy();\n }\n\n super.dispose();\n }\n\n update() {\n this._inNavbar = this._detectNavbar();\n\n if (this._popper) {\n this._popper.update();\n }\n } // Private\n\n\n _completeHide(relatedTarget) {\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$5, relatedTarget);\n\n if (hideEvent.defaultPrevented) {\n return;\n } // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n\n\n if ('ontouchstart' in document.documentElement) {\n for (const element of [].concat(...document.body.children)) {\n EventHandler.off(element, 'mouseover', noop);\n }\n }\n\n if (this._popper) {\n this._popper.destroy();\n }\n\n this._menu.classList.remove(CLASS_NAME_SHOW$6);\n\n this._element.classList.remove(CLASS_NAME_SHOW$6);\n\n this._element.setAttribute('aria-expanded', 'false');\n\n Manipulator.removeDataAttribute(this._menu, 'popper');\n EventHandler.trigger(this._element, EVENT_HIDDEN$5, relatedTarget);\n }\n\n _getConfig(config) {\n config = super._getConfig(config);\n\n if (typeof config.reference === 'object' && !isElement$1(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') {\n // Popper virtual elements require a getBoundingClientRect method\n throw new TypeError(`${NAME$a.toUpperCase()}: Option \"reference\" provided type \"object\" without a required \"getBoundingClientRect\" method.`);\n }\n\n return config;\n }\n\n _createPopper() {\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap\\'s dropdowns require Popper (https://popper.js.org)');\n }\n\n let referenceElement = this._element;\n\n if (this._config.reference === 'parent') {\n referenceElement = this._parent;\n } else if (isElement$1(this._config.reference)) {\n referenceElement = getElement(this._config.reference);\n } else if (typeof this._config.reference === 'object') {\n referenceElement = this._config.reference;\n }\n\n const popperConfig = this._getPopperConfig();\n\n this._popper = createPopper(referenceElement, this._menu, popperConfig);\n }\n\n _isShown() {\n return this._menu.classList.contains(CLASS_NAME_SHOW$6);\n }\n\n _getPlacement() {\n const parentDropdown = this._parent;\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) {\n return PLACEMENT_RIGHT;\n }\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) {\n return PLACEMENT_LEFT;\n }\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPUP_CENTER)) {\n return PLACEMENT_TOPCENTER;\n }\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPDOWN_CENTER)) {\n return PLACEMENT_BOTTOMCENTER;\n } // We need to trim the value because custom properties can also include spaces\n\n\n const isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end';\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {\n return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP;\n }\n\n return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM;\n }\n\n _detectNavbar() {\n return this._element.closest(SELECTOR_NAVBAR) !== null;\n }\n\n _getOffset() {\n const {\n offset\n } = this._config;\n\n if (typeof offset === 'string') {\n return offset.split(',').map(value => Number.parseInt(value, 10));\n }\n\n if (typeof offset === 'function') {\n return popperData => offset(popperData, this._element);\n }\n\n return offset;\n }\n\n _getPopperConfig() {\n const defaultBsPopperConfig = {\n placement: this._getPlacement(),\n modifiers: [{\n name: 'preventOverflow',\n options: {\n boundary: this._config.boundary\n }\n }, {\n name: 'offset',\n options: {\n offset: this._getOffset()\n }\n }]\n }; // Disable Popper if we have a static display or Dropdown is in Navbar\n\n if (this._inNavbar || this._config.display === 'static') {\n Manipulator.setDataAttribute(this._menu, 'popper', 'static'); // todo:v6 remove\n\n defaultBsPopperConfig.modifiers = [{\n name: 'applyStyles',\n enabled: false\n }];\n }\n\n return { ...defaultBsPopperConfig,\n ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)\n };\n }\n\n _selectMenuItem({\n key,\n target\n }) {\n const items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, this._menu).filter(element => isVisible(element));\n\n if (!items.length) {\n return;\n } // if target isn't included in items (e.g. when expanding the dropdown)\n // allow cycling to get the last item in case key equals ARROW_UP_KEY\n\n\n getNextActiveElement(items, target, key === ARROW_DOWN_KEY$1, !items.includes(target)).focus();\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Dropdown.getOrCreateInstance(this, config);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n });\n }\n\n static clearMenus(event) {\n if (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY$1) {\n return;\n }\n\n const openToggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE_SHOWN);\n\n for (const toggle of openToggles) {\n const context = Dropdown.getInstance(toggle);\n\n if (!context || context._config.autoClose === false) {\n continue;\n }\n\n const composedPath = event.composedPath();\n const isMenuTarget = composedPath.includes(context._menu);\n\n if (composedPath.includes(context._element) || context._config.autoClose === 'inside' && !isMenuTarget || context._config.autoClose === 'outside' && isMenuTarget) {\n continue;\n } // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu\n\n\n if (context._menu.contains(event.target) && (event.type === 'keyup' && event.key === TAB_KEY$1 || /input|select|option|textarea|form/i.test(event.target.tagName))) {\n continue;\n }\n\n const relatedTarget = {\n relatedTarget: context._element\n };\n\n if (event.type === 'click') {\n relatedTarget.clickEvent = event;\n }\n\n context._completeHide(relatedTarget);\n }\n }\n\n static dataApiKeydownHandler(event) {\n // If not an UP | DOWN | ESCAPE key => not a dropdown command\n // If input/textarea && if key is other than ESCAPE => not a dropdown command\n const isInput = /input|textarea/i.test(event.target.tagName);\n const isEscapeEvent = event.key === ESCAPE_KEY$2;\n const isUpOrDownEvent = [ARROW_UP_KEY$1, ARROW_DOWN_KEY$1].includes(event.key);\n\n if (!isUpOrDownEvent && !isEscapeEvent) {\n return;\n }\n\n if (isInput && !isEscapeEvent) {\n return;\n }\n\n event.preventDefault(); // todo: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.2/forms/input-group/\n\n const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.next(this, SELECTOR_DATA_TOGGLE$3)[0];\n const instance = Dropdown.getOrCreateInstance(getToggleButton);\n\n if (isUpOrDownEvent) {\n event.stopPropagation();\n instance.show();\n\n instance._selectMenuItem(event);\n\n return;\n }\n\n if (instance._isShown()) {\n // else is escape and we check if it is shown\n event.stopPropagation();\n instance.hide();\n getToggleButton.focus();\n }\n }\n\n }\n /**\n * Data API implementation\n */\n\n\n EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE$3, Dropdown.dataApiKeydownHandler);\n EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler);\n EventHandler.on(document, EVENT_CLICK_DATA_API$3, Dropdown.clearMenus);\n EventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus);\n EventHandler.on(document, EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$3, function (event) {\n event.preventDefault();\n Dropdown.getOrCreateInstance(this).toggle();\n });\n /**\n * jQuery\n */\n\n defineJQueryPlugin(Dropdown);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): util/scrollBar.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';\n const SELECTOR_STICKY_CONTENT = '.sticky-top';\n const PROPERTY_PADDING = 'padding-right';\n const PROPERTY_MARGIN = 'margin-right';\n /**\n * Class definition\n */\n\n class ScrollBarHelper {\n constructor() {\n this._element = document.body;\n } // Public\n\n\n getWidth() {\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes\n const documentWidth = document.documentElement.clientWidth;\n return Math.abs(window.innerWidth - documentWidth);\n }\n\n hide() {\n const width = this.getWidth();\n\n this._disableOverFlow(); // give padding to element to balance the hidden scrollbar width\n\n\n this._setElementAttributes(this._element, PROPERTY_PADDING, calculatedValue => calculatedValue + width); // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements to keep showing fullwidth\n\n\n this._setElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING, calculatedValue => calculatedValue + width);\n\n this._setElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN, calculatedValue => calculatedValue - width);\n }\n\n reset() {\n this._resetElementAttributes(this._element, 'overflow');\n\n this._resetElementAttributes(this._element, PROPERTY_PADDING);\n\n this._resetElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING);\n\n this._resetElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN);\n }\n\n isOverflowing() {\n return this.getWidth() > 0;\n } // Private\n\n\n _disableOverFlow() {\n this._saveInitialAttribute(this._element, 'overflow');\n\n this._element.style.overflow = 'hidden';\n }\n\n _setElementAttributes(selector, styleProperty, callback) {\n const scrollbarWidth = this.getWidth();\n\n const manipulationCallBack = element => {\n if (element !== this._element && window.innerWidth > element.clientWidth + scrollbarWidth) {\n return;\n }\n\n this._saveInitialAttribute(element, styleProperty);\n\n const calculatedValue = window.getComputedStyle(element).getPropertyValue(styleProperty);\n element.style.setProperty(styleProperty, `${callback(Number.parseFloat(calculatedValue))}px`);\n };\n\n this._applyManipulationCallback(selector, manipulationCallBack);\n }\n\n _saveInitialAttribute(element, styleProperty) {\n const actualValue = element.style.getPropertyValue(styleProperty);\n\n if (actualValue) {\n Manipulator.setDataAttribute(element, styleProperty, actualValue);\n }\n }\n\n _resetElementAttributes(selector, styleProperty) {\n const manipulationCallBack = element => {\n const value = Manipulator.getDataAttribute(element, styleProperty); // We only want to remove the property if the value is `null`; the value can also be zero\n\n if (value === null) {\n element.style.removeProperty(styleProperty);\n return;\n }\n\n Manipulator.removeDataAttribute(element, styleProperty);\n element.style.setProperty(styleProperty, value);\n };\n\n this._applyManipulationCallback(selector, manipulationCallBack);\n }\n\n _applyManipulationCallback(selector, callBack) {\n if (isElement$1(selector)) {\n callBack(selector);\n return;\n }\n\n for (const sel of SelectorEngine.find(selector, this._element)) {\n callBack(sel);\n }\n }\n\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): util/backdrop.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$9 = 'backdrop';\n const CLASS_NAME_FADE$4 = 'fade';\n const CLASS_NAME_SHOW$5 = 'show';\n const EVENT_MOUSEDOWN = `mousedown.bs.${NAME$9}`;\n const Default$8 = {\n className: 'modal-backdrop',\n clickCallback: null,\n isAnimated: false,\n isVisible: true,\n // if false, we use the backdrop helper without adding any element to the dom\n rootElement: 'body' // give the choice to place backdrop under different elements\n\n };\n const DefaultType$8 = {\n className: 'string',\n clickCallback: '(function|null)',\n isAnimated: 'boolean',\n isVisible: 'boolean',\n rootElement: '(element|string)'\n };\n /**\n * Class definition\n */\n\n class Backdrop extends Config {\n constructor(config) {\n super();\n this._config = this._getConfig(config);\n this._isAppended = false;\n this._element = null;\n } // Getters\n\n\n static get Default() {\n return Default$8;\n }\n\n static get DefaultType() {\n return DefaultType$8;\n }\n\n static get NAME() {\n return NAME$9;\n } // Public\n\n\n show(callback) {\n if (!this._config.isVisible) {\n execute(callback);\n return;\n }\n\n this._append();\n\n const element = this._getElement();\n\n if (this._config.isAnimated) {\n reflow(element);\n }\n\n element.classList.add(CLASS_NAME_SHOW$5);\n\n this._emulateAnimation(() => {\n execute(callback);\n });\n }\n\n hide(callback) {\n if (!this._config.isVisible) {\n execute(callback);\n return;\n }\n\n this._getElement().classList.remove(CLASS_NAME_SHOW$5);\n\n this._emulateAnimation(() => {\n this.dispose();\n execute(callback);\n });\n }\n\n dispose() {\n if (!this._isAppended) {\n return;\n }\n\n EventHandler.off(this._element, EVENT_MOUSEDOWN);\n\n this._element.remove();\n\n this._isAppended = false;\n } // Private\n\n\n _getElement() {\n if (!this._element) {\n const backdrop = document.createElement('div');\n backdrop.className = this._config.className;\n\n if (this._config.isAnimated) {\n backdrop.classList.add(CLASS_NAME_FADE$4);\n }\n\n this._element = backdrop;\n }\n\n return this._element;\n }\n\n _configAfterMerge(config) {\n // use getElement() with the default \"body\" to get a fresh Element on each instantiation\n config.rootElement = getElement(config.rootElement);\n return config;\n }\n\n _append() {\n if (this._isAppended) {\n return;\n }\n\n const element = this._getElement();\n\n this._config.rootElement.append(element);\n\n EventHandler.on(element, EVENT_MOUSEDOWN, () => {\n execute(this._config.clickCallback);\n });\n this._isAppended = true;\n }\n\n _emulateAnimation(callback) {\n executeAfterTransition(callback, this._getElement(), this._config.isAnimated);\n }\n\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): util/focustrap.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$8 = 'focustrap';\n const DATA_KEY$5 = 'bs.focustrap';\n const EVENT_KEY$5 = `.${DATA_KEY$5}`;\n const EVENT_FOCUSIN$2 = `focusin${EVENT_KEY$5}`;\n const EVENT_KEYDOWN_TAB = `keydown.tab${EVENT_KEY$5}`;\n const TAB_KEY = 'Tab';\n const TAB_NAV_FORWARD = 'forward';\n const TAB_NAV_BACKWARD = 'backward';\n const Default$7 = {\n autofocus: true,\n trapElement: null // The element to trap focus inside of\n\n };\n const DefaultType$7 = {\n autofocus: 'boolean',\n trapElement: 'element'\n };\n /**\n * Class definition\n */\n\n class FocusTrap extends Config {\n constructor(config) {\n super();\n this._config = this._getConfig(config);\n this._isActive = false;\n this._lastTabNavDirection = null;\n } // Getters\n\n\n static get Default() {\n return Default$7;\n }\n\n static get DefaultType() {\n return DefaultType$7;\n }\n\n static get NAME() {\n return NAME$8;\n } // Public\n\n\n activate() {\n if (this._isActive) {\n return;\n }\n\n if (this._config.autofocus) {\n this._config.trapElement.focus();\n }\n\n EventHandler.off(document, EVENT_KEY$5); // guard against infinite focus loop\n\n EventHandler.on(document, EVENT_FOCUSIN$2, event => this._handleFocusin(event));\n EventHandler.on(document, EVENT_KEYDOWN_TAB, event => this._handleKeydown(event));\n this._isActive = true;\n }\n\n deactivate() {\n if (!this._isActive) {\n return;\n }\n\n this._isActive = false;\n EventHandler.off(document, EVENT_KEY$5);\n } // Private\n\n\n _handleFocusin(event) {\n const {\n trapElement\n } = this._config;\n\n if (event.target === document || event.target === trapElement || trapElement.contains(event.target)) {\n return;\n }\n\n const elements = SelectorEngine.focusableChildren(trapElement);\n\n if (elements.length === 0) {\n trapElement.focus();\n } else if (this._lastTabNavDirection === TAB_NAV_BACKWARD) {\n elements[elements.length - 1].focus();\n } else {\n elements[0].focus();\n }\n }\n\n _handleKeydown(event) {\n if (event.key !== TAB_KEY) {\n return;\n }\n\n this._lastTabNavDirection = event.shiftKey ? TAB_NAV_BACKWARD : TAB_NAV_FORWARD;\n }\n\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): modal.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$7 = 'modal';\n const DATA_KEY$4 = 'bs.modal';\n const EVENT_KEY$4 = `.${DATA_KEY$4}`;\n const DATA_API_KEY$2 = '.data-api';\n const ESCAPE_KEY$1 = 'Escape';\n const EVENT_HIDE$4 = `hide${EVENT_KEY$4}`;\n const EVENT_HIDE_PREVENTED$1 = `hidePrevented${EVENT_KEY$4}`;\n const EVENT_HIDDEN$4 = `hidden${EVENT_KEY$4}`;\n const EVENT_SHOW$4 = `show${EVENT_KEY$4}`;\n const EVENT_SHOWN$4 = `shown${EVENT_KEY$4}`;\n const EVENT_RESIZE$1 = `resize${EVENT_KEY$4}`;\n const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY$4}`;\n const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY$4}`;\n const EVENT_KEYDOWN_DISMISS$1 = `keydown.dismiss${EVENT_KEY$4}`;\n const EVENT_CLICK_DATA_API$2 = `click${EVENT_KEY$4}${DATA_API_KEY$2}`;\n const CLASS_NAME_OPEN = 'modal-open';\n const CLASS_NAME_FADE$3 = 'fade';\n const CLASS_NAME_SHOW$4 = 'show';\n const CLASS_NAME_STATIC = 'modal-static';\n const OPEN_SELECTOR$1 = '.modal.show';\n const SELECTOR_DIALOG = '.modal-dialog';\n const SELECTOR_MODAL_BODY = '.modal-body';\n const SELECTOR_DATA_TOGGLE$2 = '[data-bs-toggle=\"modal\"]';\n const Default$6 = {\n backdrop: true,\n focus: true,\n keyboard: true\n };\n const DefaultType$6 = {\n backdrop: '(boolean|string)',\n focus: 'boolean',\n keyboard: 'boolean'\n };\n /**\n * Class definition\n */\n\n class Modal extends BaseComponent {\n constructor(element, config) {\n super(element, config);\n this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, this._element);\n this._backdrop = this._initializeBackDrop();\n this._focustrap = this._initializeFocusTrap();\n this._isShown = false;\n this._isTransitioning = false;\n this._scrollBar = new ScrollBarHelper();\n\n this._addEventListeners();\n } // Getters\n\n\n static get Default() {\n return Default$6;\n }\n\n static get DefaultType() {\n return DefaultType$6;\n }\n\n static get NAME() {\n return NAME$7;\n } // Public\n\n\n toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget);\n }\n\n show(relatedTarget) {\n if (this._isShown || this._isTransitioning) {\n return;\n }\n\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$4, {\n relatedTarget\n });\n\n if (showEvent.defaultPrevented) {\n return;\n }\n\n this._isShown = true;\n this._isTransitioning = true;\n\n this._scrollBar.hide();\n\n document.body.classList.add(CLASS_NAME_OPEN);\n\n this._adjustDialog();\n\n this._backdrop.show(() => this._showElement(relatedTarget));\n }\n\n hide() {\n if (!this._isShown || this._isTransitioning) {\n return;\n }\n\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$4);\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n this._isShown = false;\n this._isTransitioning = true;\n\n this._focustrap.deactivate();\n\n this._element.classList.remove(CLASS_NAME_SHOW$4);\n\n this._queueCallback(() => this._hideModal(), this._element, this._isAnimated());\n }\n\n dispose() {\n for (const htmlElement of [window, this._dialog]) {\n EventHandler.off(htmlElement, EVENT_KEY$4);\n }\n\n this._backdrop.dispose();\n\n this._focustrap.deactivate();\n\n super.dispose();\n }\n\n handleUpdate() {\n this._adjustDialog();\n } // Private\n\n\n _initializeBackDrop() {\n return new Backdrop({\n isVisible: Boolean(this._config.backdrop),\n // 'static' option will be translated to true, and booleans will keep their value,\n isAnimated: this._isAnimated()\n });\n }\n\n _initializeFocusTrap() {\n return new FocusTrap({\n trapElement: this._element\n });\n }\n\n _showElement(relatedTarget) {\n // try to append dynamic modal\n if (!document.body.contains(this._element)) {\n document.body.append(this._element);\n }\n\n this._element.style.display = 'block';\n\n this._element.removeAttribute('aria-hidden');\n\n this._element.setAttribute('aria-modal', true);\n\n this._element.setAttribute('role', 'dialog');\n\n this._element.scrollTop = 0;\n const modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog);\n\n if (modalBody) {\n modalBody.scrollTop = 0;\n }\n\n reflow(this._element);\n\n this._element.classList.add(CLASS_NAME_SHOW$4);\n\n const transitionComplete = () => {\n if (this._config.focus) {\n this._focustrap.activate();\n }\n\n this._isTransitioning = false;\n EventHandler.trigger(this._element, EVENT_SHOWN$4, {\n relatedTarget\n });\n };\n\n this._queueCallback(transitionComplete, this._dialog, this._isAnimated());\n }\n\n _addEventListeners() {\n EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS$1, event => {\n if (event.key !== ESCAPE_KEY$1) {\n return;\n }\n\n if (this._config.keyboard) {\n event.preventDefault();\n this.hide();\n return;\n }\n\n this._triggerBackdropTransition();\n });\n EventHandler.on(window, EVENT_RESIZE$1, () => {\n if (this._isShown && !this._isTransitioning) {\n this._adjustDialog();\n }\n });\n EventHandler.on(this._element, EVENT_MOUSEDOWN_DISMISS, event => {\n EventHandler.one(this._element, EVENT_CLICK_DISMISS, event2 => {\n // a bad trick to segregate clicks that may start inside dialog but end outside, and avoid listen to scrollbar clicks\n if (this._dialog.contains(event.target) || this._dialog.contains(event2.target)) {\n return;\n }\n\n if (this._config.backdrop === 'static') {\n this._triggerBackdropTransition();\n\n return;\n }\n\n if (this._config.backdrop) {\n this.hide();\n }\n });\n });\n }\n\n _hideModal() {\n this._element.style.display = 'none';\n\n this._element.setAttribute('aria-hidden', true);\n\n this._element.removeAttribute('aria-modal');\n\n this._element.removeAttribute('role');\n\n this._isTransitioning = false;\n\n this._backdrop.hide(() => {\n document.body.classList.remove(CLASS_NAME_OPEN);\n\n this._resetAdjustments();\n\n this._scrollBar.reset();\n\n EventHandler.trigger(this._element, EVENT_HIDDEN$4);\n });\n }\n\n _isAnimated() {\n return this._element.classList.contains(CLASS_NAME_FADE$3);\n }\n\n _triggerBackdropTransition() {\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED$1);\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;\n const initialOverflowY = this._element.style.overflowY; // return if the following background transition hasn't yet completed\n\n if (initialOverflowY === 'hidden' || this._element.classList.contains(CLASS_NAME_STATIC)) {\n return;\n }\n\n if (!isModalOverflowing) {\n this._element.style.overflowY = 'hidden';\n }\n\n this._element.classList.add(CLASS_NAME_STATIC);\n\n this._queueCallback(() => {\n this._element.classList.remove(CLASS_NAME_STATIC);\n\n this._queueCallback(() => {\n this._element.style.overflowY = initialOverflowY;\n }, this._dialog);\n }, this._dialog);\n\n this._element.focus();\n }\n /**\n * The following methods are used to handle overflowing modals\n */\n\n\n _adjustDialog() {\n const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;\n\n const scrollbarWidth = this._scrollBar.getWidth();\n\n const isBodyOverflowing = scrollbarWidth > 0;\n\n if (isBodyOverflowing && !isModalOverflowing) {\n const property = isRTL() ? 'paddingLeft' : 'paddingRight';\n this._element.style[property] = `${scrollbarWidth}px`;\n }\n\n if (!isBodyOverflowing && isModalOverflowing) {\n const property = isRTL() ? 'paddingRight' : 'paddingLeft';\n this._element.style[property] = `${scrollbarWidth}px`;\n }\n }\n\n _resetAdjustments() {\n this._element.style.paddingLeft = '';\n this._element.style.paddingRight = '';\n } // Static\n\n\n static jQueryInterface(config, relatedTarget) {\n return this.each(function () {\n const data = Modal.getOrCreateInstance(this, config);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config](relatedTarget);\n });\n }\n\n }\n /**\n * Data API implementation\n */\n\n\n EventHandler.on(document, EVENT_CLICK_DATA_API$2, SELECTOR_DATA_TOGGLE$2, function (event) {\n const target = getElementFromSelector(this);\n\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault();\n }\n\n EventHandler.one(target, EVENT_SHOW$4, showEvent => {\n if (showEvent.defaultPrevented) {\n // only register focus restorer if modal will actually get shown\n return;\n }\n\n EventHandler.one(target, EVENT_HIDDEN$4, () => {\n if (isVisible(this)) {\n this.focus();\n }\n });\n }); // avoid conflict when clicking modal toggler while another one is open\n\n const alreadyOpen = SelectorEngine.findOne(OPEN_SELECTOR$1);\n\n if (alreadyOpen) {\n Modal.getInstance(alreadyOpen).hide();\n }\n\n const data = Modal.getOrCreateInstance(target);\n data.toggle(this);\n });\n enableDismissTrigger(Modal);\n /**\n * jQuery\n */\n\n defineJQueryPlugin(Modal);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): offcanvas.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$6 = 'offcanvas';\n const DATA_KEY$3 = 'bs.offcanvas';\n const EVENT_KEY$3 = `.${DATA_KEY$3}`;\n const DATA_API_KEY$1 = '.data-api';\n const EVENT_LOAD_DATA_API$2 = `load${EVENT_KEY$3}${DATA_API_KEY$1}`;\n const ESCAPE_KEY = 'Escape';\n const CLASS_NAME_SHOW$3 = 'show';\n const CLASS_NAME_SHOWING$1 = 'showing';\n const CLASS_NAME_HIDING = 'hiding';\n const CLASS_NAME_BACKDROP = 'offcanvas-backdrop';\n const OPEN_SELECTOR = '.offcanvas.show';\n const EVENT_SHOW$3 = `show${EVENT_KEY$3}`;\n const EVENT_SHOWN$3 = `shown${EVENT_KEY$3}`;\n const EVENT_HIDE$3 = `hide${EVENT_KEY$3}`;\n const EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY$3}`;\n const EVENT_HIDDEN$3 = `hidden${EVENT_KEY$3}`;\n const EVENT_RESIZE = `resize${EVENT_KEY$3}`;\n const EVENT_CLICK_DATA_API$1 = `click${EVENT_KEY$3}${DATA_API_KEY$1}`;\n const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY$3}`;\n const SELECTOR_DATA_TOGGLE$1 = '[data-bs-toggle=\"offcanvas\"]';\n const Default$5 = {\n backdrop: true,\n keyboard: true,\n scroll: false\n };\n const DefaultType$5 = {\n backdrop: '(boolean|string)',\n keyboard: 'boolean',\n scroll: 'boolean'\n };\n /**\n * Class definition\n */\n\n class Offcanvas extends BaseComponent {\n constructor(element, config) {\n super(element, config);\n this._isShown = false;\n this._backdrop = this._initializeBackDrop();\n this._focustrap = this._initializeFocusTrap();\n\n this._addEventListeners();\n } // Getters\n\n\n static get Default() {\n return Default$5;\n }\n\n static get DefaultType() {\n return DefaultType$5;\n }\n\n static get NAME() {\n return NAME$6;\n } // Public\n\n\n toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget);\n }\n\n show(relatedTarget) {\n if (this._isShown) {\n return;\n }\n\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$3, {\n relatedTarget\n });\n\n if (showEvent.defaultPrevented) {\n return;\n }\n\n this._isShown = true;\n\n this._backdrop.show();\n\n if (!this._config.scroll) {\n new ScrollBarHelper().hide();\n }\n\n this._element.setAttribute('aria-modal', true);\n\n this._element.setAttribute('role', 'dialog');\n\n this._element.classList.add(CLASS_NAME_SHOWING$1);\n\n const completeCallBack = () => {\n if (!this._config.scroll || this._config.backdrop) {\n this._focustrap.activate();\n }\n\n this._element.classList.add(CLASS_NAME_SHOW$3);\n\n this._element.classList.remove(CLASS_NAME_SHOWING$1);\n\n EventHandler.trigger(this._element, EVENT_SHOWN$3, {\n relatedTarget\n });\n };\n\n this._queueCallback(completeCallBack, this._element, true);\n }\n\n hide() {\n if (!this._isShown) {\n return;\n }\n\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$3);\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n this._focustrap.deactivate();\n\n this._element.blur();\n\n this._isShown = false;\n\n this._element.classList.add(CLASS_NAME_HIDING);\n\n this._backdrop.hide();\n\n const completeCallback = () => {\n this._element.classList.remove(CLASS_NAME_SHOW$3, CLASS_NAME_HIDING);\n\n this._element.removeAttribute('aria-modal');\n\n this._element.removeAttribute('role');\n\n if (!this._config.scroll) {\n new ScrollBarHelper().reset();\n }\n\n EventHandler.trigger(this._element, EVENT_HIDDEN$3);\n };\n\n this._queueCallback(completeCallback, this._element, true);\n }\n\n dispose() {\n this._backdrop.dispose();\n\n this._focustrap.deactivate();\n\n super.dispose();\n } // Private\n\n\n _initializeBackDrop() {\n const clickCallback = () => {\n if (this._config.backdrop === 'static') {\n EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);\n return;\n }\n\n this.hide();\n }; // 'static' option will be translated to true, and booleans will keep their value\n\n\n const isVisible = Boolean(this._config.backdrop);\n return new Backdrop({\n className: CLASS_NAME_BACKDROP,\n isVisible,\n isAnimated: true,\n rootElement: this._element.parentNode,\n clickCallback: isVisible ? clickCallback : null\n });\n }\n\n _initializeFocusTrap() {\n return new FocusTrap({\n trapElement: this._element\n });\n }\n\n _addEventListeners() {\n EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => {\n if (event.key !== ESCAPE_KEY) {\n return;\n }\n\n if (!this._config.keyboard) {\n EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);\n return;\n }\n\n this.hide();\n });\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Offcanvas.getOrCreateInstance(this, config);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config](this);\n });\n }\n\n }\n /**\n * Data API implementation\n */\n\n\n EventHandler.on(document, EVENT_CLICK_DATA_API$1, SELECTOR_DATA_TOGGLE$1, function (event) {\n const target = getElementFromSelector(this);\n\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault();\n }\n\n if (isDisabled(this)) {\n return;\n }\n\n EventHandler.one(target, EVENT_HIDDEN$3, () => {\n // focus on trigger when it is closed\n if (isVisible(this)) {\n this.focus();\n }\n }); // avoid conflict when clicking a toggler of an offcanvas, while another is open\n\n const alreadyOpen = SelectorEngine.findOne(OPEN_SELECTOR);\n\n if (alreadyOpen && alreadyOpen !== target) {\n Offcanvas.getInstance(alreadyOpen).hide();\n }\n\n const data = Offcanvas.getOrCreateInstance(target);\n data.toggle(this);\n });\n EventHandler.on(window, EVENT_LOAD_DATA_API$2, () => {\n for (const selector of SelectorEngine.find(OPEN_SELECTOR)) {\n Offcanvas.getOrCreateInstance(selector).show();\n }\n });\n EventHandler.on(window, EVENT_RESIZE, () => {\n for (const element of SelectorEngine.find('[aria-modal][class*=show][class*=offcanvas-]')) {\n if (getComputedStyle(element).position !== 'fixed') {\n Offcanvas.getOrCreateInstance(element).hide();\n }\n }\n });\n enableDismissTrigger(Offcanvas);\n /**\n * jQuery\n */\n\n defineJQueryPlugin(Offcanvas);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): util/sanitizer.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n const uriAttributes = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);\n const ARIA_ATTRIBUTE_PATTERN = /^aria-[\\w-]*$/i;\n /**\n * A pattern that recognizes a commonly useful subset of URLs that are safe.\n *\n * Shout-out to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts\n */\n\n const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i;\n /**\n * A pattern that matches safe data URLs. Only matches image, video and audio types.\n *\n * Shout-out to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts\n */\n\n const DATA_URL_PATTERN = /^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[\\d+/a-z]+=*$/i;\n\n const allowedAttribute = (attribute, allowedAttributeList) => {\n const attributeName = attribute.nodeName.toLowerCase();\n\n if (allowedAttributeList.includes(attributeName)) {\n if (uriAttributes.has(attributeName)) {\n return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue) || DATA_URL_PATTERN.test(attribute.nodeValue));\n }\n\n return true;\n } // Check if a regular expression validates the attribute.\n\n\n return allowedAttributeList.filter(attributeRegex => attributeRegex instanceof RegExp).some(regex => regex.test(attributeName));\n };\n\n const DefaultAllowlist = {\n // Global attributes allowed on any supplied element below.\n '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],\n a: ['target', 'href', 'title', 'rel'],\n area: [],\n b: [],\n br: [],\n col: [],\n code: [],\n div: [],\n em: [],\n hr: [],\n h1: [],\n h2: [],\n h3: [],\n h4: [],\n h5: [],\n h6: [],\n i: [],\n img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],\n li: [],\n ol: [],\n p: [],\n pre: [],\n s: [],\n small: [],\n span: [],\n sub: [],\n sup: [],\n strong: [],\n u: [],\n ul: []\n };\n function sanitizeHtml(unsafeHtml, allowList, sanitizeFunction) {\n if (!unsafeHtml.length) {\n return unsafeHtml;\n }\n\n if (sanitizeFunction && typeof sanitizeFunction === 'function') {\n return sanitizeFunction(unsafeHtml);\n }\n\n const domParser = new window.DOMParser();\n const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');\n const elements = [].concat(...createdDocument.body.querySelectorAll('*'));\n\n for (const element of elements) {\n const elementName = element.nodeName.toLowerCase();\n\n if (!Object.keys(allowList).includes(elementName)) {\n element.remove();\n continue;\n }\n\n const attributeList = [].concat(...element.attributes);\n const allowedAttributes = [].concat(allowList['*'] || [], allowList[elementName] || []);\n\n for (const attribute of attributeList) {\n if (!allowedAttribute(attribute, allowedAttributes)) {\n element.removeAttribute(attribute.nodeName);\n }\n }\n }\n\n return createdDocument.body.innerHTML;\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): util/template-factory.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$5 = 'TemplateFactory';\n const Default$4 = {\n allowList: DefaultAllowlist,\n content: {},\n // { selector : text , selector2 : text2 , }\n extraClass: '',\n html: false,\n sanitize: true,\n sanitizeFn: null,\n template: '<div></div>'\n };\n const DefaultType$4 = {\n allowList: 'object',\n content: 'object',\n extraClass: '(string|function)',\n html: 'boolean',\n sanitize: 'boolean',\n sanitizeFn: '(null|function)',\n template: 'string'\n };\n const DefaultContentType = {\n entry: '(string|element|function|null)',\n selector: '(string|element)'\n };\n /**\n * Class definition\n */\n\n class TemplateFactory extends Config {\n constructor(config) {\n super();\n this._config = this._getConfig(config);\n } // Getters\n\n\n static get Default() {\n return Default$4;\n }\n\n static get DefaultType() {\n return DefaultType$4;\n }\n\n static get NAME() {\n return NAME$5;\n } // Public\n\n\n getContent() {\n return Object.values(this._config.content).map(config => this._resolvePossibleFunction(config)).filter(Boolean);\n }\n\n hasContent() {\n return this.getContent().length > 0;\n }\n\n changeContent(content) {\n this._checkContent(content);\n\n this._config.content = { ...this._config.content,\n ...content\n };\n return this;\n }\n\n toHtml() {\n const templateWrapper = document.createElement('div');\n templateWrapper.innerHTML = this._maybeSanitize(this._config.template);\n\n for (const [selector, text] of Object.entries(this._config.content)) {\n this._setContent(templateWrapper, text, selector);\n }\n\n const template = templateWrapper.children[0];\n\n const extraClass = this._resolvePossibleFunction(this._config.extraClass);\n\n if (extraClass) {\n template.classList.add(...extraClass.split(' '));\n }\n\n return template;\n } // Private\n\n\n _typeCheckConfig(config) {\n super._typeCheckConfig(config);\n\n this._checkContent(config.content);\n }\n\n _checkContent(arg) {\n for (const [selector, content] of Object.entries(arg)) {\n super._typeCheckConfig({\n selector,\n entry: content\n }, DefaultContentType);\n }\n }\n\n _setContent(template, content, selector) {\n const templateElement = SelectorEngine.findOne(selector, template);\n\n if (!templateElement) {\n return;\n }\n\n content = this._resolvePossibleFunction(content);\n\n if (!content) {\n templateElement.remove();\n return;\n }\n\n if (isElement$1(content)) {\n this._putElementInTemplate(getElement(content), templateElement);\n\n return;\n }\n\n if (this._config.html) {\n templateElement.innerHTML = this._maybeSanitize(content);\n return;\n }\n\n templateElement.textContent = content;\n }\n\n _maybeSanitize(arg) {\n return this._config.sanitize ? sanitizeHtml(arg, this._config.allowList, this._config.sanitizeFn) : arg;\n }\n\n _resolvePossibleFunction(arg) {\n return typeof arg === 'function' ? arg(this) : arg;\n }\n\n _putElementInTemplate(element, templateElement) {\n if (this._config.html) {\n templateElement.innerHTML = '';\n templateElement.append(element);\n return;\n }\n\n templateElement.textContent = element.textContent;\n }\n\n }\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): tooltip.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$4 = 'tooltip';\n const DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn']);\n const CLASS_NAME_FADE$2 = 'fade';\n const CLASS_NAME_MODAL = 'modal';\n const CLASS_NAME_SHOW$2 = 'show';\n const SELECTOR_TOOLTIP_INNER = '.tooltip-inner';\n const SELECTOR_MODAL = `.${CLASS_NAME_MODAL}`;\n const EVENT_MODAL_HIDE = 'hide.bs.modal';\n const TRIGGER_HOVER = 'hover';\n const TRIGGER_FOCUS = 'focus';\n const TRIGGER_CLICK = 'click';\n const TRIGGER_MANUAL = 'manual';\n const EVENT_HIDE$2 = 'hide';\n const EVENT_HIDDEN$2 = 'hidden';\n const EVENT_SHOW$2 = 'show';\n const EVENT_SHOWN$2 = 'shown';\n const EVENT_INSERTED = 'inserted';\n const EVENT_CLICK$1 = 'click';\n const EVENT_FOCUSIN$1 = 'focusin';\n const EVENT_FOCUSOUT$1 = 'focusout';\n const EVENT_MOUSEENTER = 'mouseenter';\n const EVENT_MOUSELEAVE = 'mouseleave';\n const AttachmentMap = {\n AUTO: 'auto',\n TOP: 'top',\n RIGHT: isRTL() ? 'left' : 'right',\n BOTTOM: 'bottom',\n LEFT: isRTL() ? 'right' : 'left'\n };\n const Default$3 = {\n allowList: DefaultAllowlist,\n animation: true,\n boundary: 'clippingParents',\n container: false,\n customClass: '',\n delay: 0,\n fallbackPlacements: ['top', 'right', 'bottom', 'left'],\n html: false,\n offset: [0, 0],\n placement: 'top',\n popperConfig: null,\n sanitize: true,\n sanitizeFn: null,\n selector: false,\n template: '<div class=\"tooltip\" role=\"tooltip\">' + '<div class=\"tooltip-arrow\"></div>' + '<div class=\"tooltip-inner\"></div>' + '</div>',\n title: '',\n trigger: 'hover focus'\n };\n const DefaultType$3 = {\n allowList: 'object',\n animation: 'boolean',\n boundary: '(string|element)',\n container: '(string|element|boolean)',\n customClass: '(string|function)',\n delay: '(number|object)',\n fallbackPlacements: 'array',\n html: 'boolean',\n offset: '(array|string|function)',\n placement: '(string|function)',\n popperConfig: '(null|object|function)',\n sanitize: 'boolean',\n sanitizeFn: '(null|function)',\n selector: '(string|boolean)',\n template: 'string',\n title: '(string|element|function)',\n trigger: 'string'\n };\n /**\n * Class definition\n */\n\n class Tooltip extends BaseComponent {\n constructor(element, config) {\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap\\'s tooltips require Popper (https://popper.js.org)');\n }\n\n super(element, config); // Private\n\n this._isEnabled = true;\n this._timeout = 0;\n this._isHovered = null;\n this._activeTrigger = {};\n this._popper = null;\n this._templateFactory = null;\n this._newContent = null; // Protected\n\n this.tip = null;\n\n this._setListeners();\n } // Getters\n\n\n static get Default() {\n return Default$3;\n }\n\n static get DefaultType() {\n return DefaultType$3;\n }\n\n static get NAME() {\n return NAME$4;\n } // Public\n\n\n enable() {\n this._isEnabled = true;\n }\n\n disable() {\n this._isEnabled = false;\n }\n\n toggleEnabled() {\n this._isEnabled = !this._isEnabled;\n }\n\n toggle(event) {\n if (!this._isEnabled) {\n return;\n }\n\n if (event) {\n const context = this._initializeOnDelegatedTarget(event);\n\n context._activeTrigger.click = !context._activeTrigger.click;\n\n if (context._isWithActiveTrigger()) {\n context._enter();\n } else {\n context._leave();\n }\n\n return;\n }\n\n if (this._isShown()) {\n this._leave();\n\n return;\n }\n\n this._enter();\n }\n\n dispose() {\n clearTimeout(this._timeout);\n EventHandler.off(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);\n\n if (this.tip) {\n this.tip.remove();\n }\n\n if (this._config.originalTitle) {\n this._element.setAttribute('title', this._config.originalTitle);\n }\n\n this._disposePopper();\n\n super.dispose();\n }\n\n show() {\n if (this._element.style.display === 'none') {\n throw new Error('Please use show on visible elements');\n }\n\n if (!(this._isWithContent() && this._isEnabled)) {\n return;\n }\n\n const showEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOW$2));\n const shadowRoot = findShadowRoot(this._element);\n\n const isInTheDom = (shadowRoot || this._element.ownerDocument.documentElement).contains(this._element);\n\n if (showEvent.defaultPrevented || !isInTheDom) {\n return;\n } // todo v6 remove this OR make it optional\n\n\n if (this.tip) {\n this.tip.remove();\n this.tip = null;\n }\n\n const tip = this._getTipElement();\n\n this._element.setAttribute('aria-describedby', tip.getAttribute('id'));\n\n const {\n container\n } = this._config;\n\n if (!this._element.ownerDocument.documentElement.contains(this.tip)) {\n container.append(tip);\n EventHandler.trigger(this._element, this.constructor.eventName(EVENT_INSERTED));\n }\n\n if (this._popper) {\n this._popper.update();\n } else {\n this._popper = this._createPopper(tip);\n }\n\n tip.classList.add(CLASS_NAME_SHOW$2); // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n\n if ('ontouchstart' in document.documentElement) {\n for (const element of [].concat(...document.body.children)) {\n EventHandler.on(element, 'mouseover', noop);\n }\n }\n\n const complete = () => {\n EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOWN$2));\n\n if (this._isHovered === false) {\n this._leave();\n }\n\n this._isHovered = false;\n };\n\n this._queueCallback(complete, this.tip, this._isAnimated());\n }\n\n hide() {\n if (!this._isShown()) {\n return;\n }\n\n const hideEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_HIDE$2));\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n const tip = this._getTipElement();\n\n tip.classList.remove(CLASS_NAME_SHOW$2); // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n\n if ('ontouchstart' in document.documentElement) {\n for (const element of [].concat(...document.body.children)) {\n EventHandler.off(element, 'mouseover', noop);\n }\n }\n\n this._activeTrigger[TRIGGER_CLICK] = false;\n this._activeTrigger[TRIGGER_FOCUS] = false;\n this._activeTrigger[TRIGGER_HOVER] = false;\n this._isHovered = null; // it is a trick to support manual triggering\n\n const complete = () => {\n if (this._isWithActiveTrigger()) {\n return;\n }\n\n if (!this._isHovered) {\n tip.remove();\n }\n\n this._element.removeAttribute('aria-describedby');\n\n EventHandler.trigger(this._element, this.constructor.eventName(EVENT_HIDDEN$2));\n\n this._disposePopper();\n };\n\n this._queueCallback(complete, this.tip, this._isAnimated());\n }\n\n update() {\n if (this._popper) {\n this._popper.update();\n }\n } // Protected\n\n\n _isWithContent() {\n return Boolean(this._getTitle());\n }\n\n _getTipElement() {\n if (!this.tip) {\n this.tip = this._createTipElement(this._newContent || this._getContentForTemplate());\n }\n\n return this.tip;\n }\n\n _createTipElement(content) {\n const tip = this._getTemplateFactory(content).toHtml(); // todo: remove this check on v6\n\n\n if (!tip) {\n return null;\n }\n\n tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$2); // todo: on v6 the following can be achieved with CSS only\n\n tip.classList.add(`bs-${this.constructor.NAME}-auto`);\n const tipId = getUID(this.constructor.NAME).toString();\n tip.setAttribute('id', tipId);\n\n if (this._isAnimated()) {\n tip.classList.add(CLASS_NAME_FADE$2);\n }\n\n return tip;\n }\n\n setContent(content) {\n this._newContent = content;\n\n if (this._isShown()) {\n this._disposePopper();\n\n this.show();\n }\n }\n\n _getTemplateFactory(content) {\n if (this._templateFactory) {\n this._templateFactory.changeContent(content);\n } else {\n this._templateFactory = new TemplateFactory({ ...this._config,\n // the `content` var has to be after `this._config`\n // to override config.content in case of popover\n content,\n extraClass: this._resolvePossibleFunction(this._config.customClass)\n });\n }\n\n return this._templateFactory;\n }\n\n _getContentForTemplate() {\n return {\n [SELECTOR_TOOLTIP_INNER]: this._getTitle()\n };\n }\n\n _getTitle() {\n return this._resolvePossibleFunction(this._config.title) || this._config.originalTitle;\n } // Private\n\n\n _initializeOnDelegatedTarget(event) {\n return this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig());\n }\n\n _isAnimated() {\n return this._config.animation || this.tip && this.tip.classList.contains(CLASS_NAME_FADE$2);\n }\n\n _isShown() {\n return this.tip && this.tip.classList.contains(CLASS_NAME_SHOW$2);\n }\n\n _createPopper(tip) {\n const placement = typeof this._config.placement === 'function' ? this._config.placement.call(this, tip, this._element) : this._config.placement;\n const attachment = AttachmentMap[placement.toUpperCase()];\n return createPopper(this._element, tip, this._getPopperConfig(attachment));\n }\n\n _getOffset() {\n const {\n offset\n } = this._config;\n\n if (typeof offset === 'string') {\n return offset.split(',').map(value => Number.parseInt(value, 10));\n }\n\n if (typeof offset === 'function') {\n return popperData => offset(popperData, this._element);\n }\n\n return offset;\n }\n\n _resolvePossibleFunction(arg) {\n return typeof arg === 'function' ? arg.call(this._element) : arg;\n }\n\n _getPopperConfig(attachment) {\n const defaultBsPopperConfig = {\n placement: attachment,\n modifiers: [{\n name: 'flip',\n options: {\n fallbackPlacements: this._config.fallbackPlacements\n }\n }, {\n name: 'offset',\n options: {\n offset: this._getOffset()\n }\n }, {\n name: 'preventOverflow',\n options: {\n boundary: this._config.boundary\n }\n }, {\n name: 'arrow',\n options: {\n element: `.${this.constructor.NAME}-arrow`\n }\n }, {\n name: 'preSetPlacement',\n enabled: true,\n phase: 'beforeMain',\n fn: data => {\n // Pre-set Popper's placement attribute in order to read the arrow sizes properly.\n // Otherwise, Popper mixes up the width and height dimensions since the initial arrow style is for top placement\n this._getTipElement().setAttribute('data-popper-placement', data.state.placement);\n }\n }]\n };\n return { ...defaultBsPopperConfig,\n ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)\n };\n }\n\n _setListeners() {\n const triggers = this._config.trigger.split(' ');\n\n for (const trigger of triggers) {\n if (trigger === 'click') {\n EventHandler.on(this._element, this.constructor.eventName(EVENT_CLICK$1), this._config.selector, event => this.toggle(event));\n } else if (trigger !== TRIGGER_MANUAL) {\n const eventIn = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSEENTER) : this.constructor.eventName(EVENT_FOCUSIN$1);\n const eventOut = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSELEAVE) : this.constructor.eventName(EVENT_FOCUSOUT$1);\n EventHandler.on(this._element, eventIn, this._config.selector, event => {\n const context = this._initializeOnDelegatedTarget(event);\n\n context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;\n\n context._enter();\n });\n EventHandler.on(this._element, eventOut, this._config.selector, event => {\n const context = this._initializeOnDelegatedTarget(event);\n\n context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = context._element.contains(event.relatedTarget);\n\n context._leave();\n });\n }\n }\n\n this._hideModalHandler = () => {\n if (this._element) {\n this.hide();\n }\n };\n\n EventHandler.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);\n\n if (this._config.selector) {\n this._config = { ...this._config,\n trigger: 'manual',\n selector: ''\n };\n } else {\n this._fixTitle();\n }\n }\n\n _fixTitle() {\n const title = this._config.originalTitle;\n\n if (!title) {\n return;\n }\n\n if (!this._element.getAttribute('aria-label') && !this._element.textContent.trim()) {\n this._element.setAttribute('aria-label', title);\n }\n\n this._element.removeAttribute('title');\n }\n\n _enter() {\n if (this._isShown() || this._isHovered) {\n this._isHovered = true;\n return;\n }\n\n this._isHovered = true;\n\n this._setTimeout(() => {\n if (this._isHovered) {\n this.show();\n }\n }, this._config.delay.show);\n }\n\n _leave() {\n if (this._isWithActiveTrigger()) {\n return;\n }\n\n this._isHovered = false;\n\n this._setTimeout(() => {\n if (!this._isHovered) {\n this.hide();\n }\n }, this._config.delay.hide);\n }\n\n _setTimeout(handler, timeout) {\n clearTimeout(this._timeout);\n this._timeout = setTimeout(handler, timeout);\n }\n\n _isWithActiveTrigger() {\n return Object.values(this._activeTrigger).includes(true);\n }\n\n _getConfig(config) {\n const dataAttributes = Manipulator.getDataAttributes(this._element);\n\n for (const dataAttribute of Object.keys(dataAttributes)) {\n if (DISALLOWED_ATTRIBUTES.has(dataAttribute)) {\n delete dataAttributes[dataAttribute];\n }\n }\n\n config = { ...dataAttributes,\n ...(typeof config === 'object' && config ? config : {})\n };\n config = this._mergeConfigObj(config);\n config = this._configAfterMerge(config);\n\n this._typeCheckConfig(config);\n\n return config;\n }\n\n _configAfterMerge(config) {\n config.container = config.container === false ? document.body : getElement(config.container);\n\n if (typeof config.delay === 'number') {\n config.delay = {\n show: config.delay,\n hide: config.delay\n };\n }\n\n config.originalTitle = this._element.getAttribute('title') || '';\n\n if (typeof config.title === 'number') {\n config.title = config.title.toString();\n }\n\n if (typeof config.content === 'number') {\n config.content = config.content.toString();\n }\n\n return config;\n }\n\n _getDelegateConfig() {\n const config = {};\n\n for (const key in this._config) {\n if (this.constructor.Default[key] !== this._config[key]) {\n config[key] = this._config[key];\n }\n } // In the future can be replaced with:\n // const keysWithDifferentValues = Object.entries(this._config).filter(entry => this.constructor.Default[entry[0]] !== this._config[entry[0]])\n // `Object.fromEntries(keysWithDifferentValues)`\n\n\n return config;\n }\n\n _disposePopper() {\n if (this._popper) {\n this._popper.destroy();\n\n this._popper = null;\n }\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Tooltip.getOrCreateInstance(this, config);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n });\n }\n\n }\n /**\n * jQuery\n */\n\n\n defineJQueryPlugin(Tooltip);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): popover.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$3 = 'popover';\n const SELECTOR_TITLE = '.popover-header';\n const SELECTOR_CONTENT = '.popover-body';\n const Default$2 = { ...Tooltip.Default,\n content: '',\n offset: [0, 8],\n placement: 'right',\n template: '<div class=\"popover\" role=\"tooltip\">' + '<div class=\"popover-arrow\"></div>' + '<h3 class=\"popover-header\"></h3>' + '<div class=\"popover-body\"></div>' + '</div>',\n trigger: 'click'\n };\n const DefaultType$2 = { ...Tooltip.DefaultType,\n content: '(null|string|element|function)'\n };\n /**\n * Class definition\n */\n\n class Popover extends Tooltip {\n // Getters\n static get Default() {\n return Default$2;\n }\n\n static get DefaultType() {\n return DefaultType$2;\n }\n\n static get NAME() {\n return NAME$3;\n } // Overrides\n\n\n _isWithContent() {\n return this._getTitle() || this._getContent();\n } // Private\n\n\n _getContentForTemplate() {\n return {\n [SELECTOR_TITLE]: this._getTitle(),\n [SELECTOR_CONTENT]: this._getContent()\n };\n }\n\n _getContent() {\n return this._resolvePossibleFunction(this._config.content);\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Popover.getOrCreateInstance(this, config);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n });\n }\n\n }\n /**\n * jQuery\n */\n\n\n defineJQueryPlugin(Popover);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): scrollspy.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$2 = 'scrollspy';\n const DATA_KEY$2 = 'bs.scrollspy';\n const EVENT_KEY$2 = `.${DATA_KEY$2}`;\n const DATA_API_KEY = '.data-api';\n const EVENT_ACTIVATE = `activate${EVENT_KEY$2}`;\n const EVENT_CLICK = `click${EVENT_KEY$2}`;\n const EVENT_LOAD_DATA_API$1 = `load${EVENT_KEY$2}${DATA_API_KEY}`;\n const CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';\n const CLASS_NAME_ACTIVE$1 = 'active';\n const SELECTOR_DATA_SPY = '[data-bs-spy=\"scroll\"]';\n const SELECTOR_TARGET_LINKS = '[href]';\n const SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';\n const SELECTOR_NAV_LINKS = '.nav-link';\n const SELECTOR_NAV_ITEMS = '.nav-item';\n const SELECTOR_LIST_ITEMS = '.list-group-item';\n const SELECTOR_LINK_ITEMS = `${SELECTOR_NAV_LINKS}, ${SELECTOR_NAV_ITEMS} > ${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}`;\n const SELECTOR_DROPDOWN = '.dropdown';\n const SELECTOR_DROPDOWN_TOGGLE$1 = '.dropdown-toggle';\n const Default$1 = {\n offset: null,\n // TODO: v6 @deprecated, keep it for backwards compatibility reasons\n rootMargin: '0px 0px -25%',\n smoothScroll: false,\n target: null,\n threshold: [0.1, 0.5, 1]\n };\n const DefaultType$1 = {\n offset: '(number|null)',\n // TODO v6 @deprecated, keep it for backwards compatibility reasons\n rootMargin: 'string',\n smoothScroll: 'boolean',\n target: 'element',\n threshold: 'array'\n };\n /**\n * Class definition\n */\n\n class ScrollSpy extends BaseComponent {\n constructor(element, config) {\n super(element, config); // this._element is the observablesContainer and config.target the menu links wrapper\n\n this._targetLinks = new Map();\n this._observableSections = new Map();\n this._rootElement = getComputedStyle(this._element).overflowY === 'visible' ? null : this._element;\n this._activeTarget = null;\n this._observer = null;\n this._previousScrollData = {\n visibleEntryTop: 0,\n parentScrollTop: 0\n };\n this.refresh(); // initialize\n } // Getters\n\n\n static get Default() {\n return Default$1;\n }\n\n static get DefaultType() {\n return DefaultType$1;\n }\n\n static get NAME() {\n return NAME$2;\n } // Public\n\n\n refresh() {\n this._initializeTargetsAndObservables();\n\n this._maybeEnableSmoothScroll();\n\n if (this._observer) {\n this._observer.disconnect();\n } else {\n this._observer = this._getNewObserver();\n }\n\n for (const section of this._observableSections.values()) {\n this._observer.observe(section);\n }\n }\n\n dispose() {\n this._observer.disconnect();\n\n super.dispose();\n } // Private\n\n\n _configAfterMerge(config) {\n // TODO: on v6 target should be given explicitly & remove the {target: 'ss-target'} case\n config.target = getElement(config.target) || document.body; // TODO: v6 Only for backwards compatibility reasons. Use rootMargin only\n\n config.rootMargin = config.offset ? `${config.offset}px 0px -30%` : config.rootMargin;\n\n if (typeof config.threshold === 'string') {\n config.threshold = config.threshold.split(',').map(value => Number.parseFloat(value));\n }\n\n return config;\n }\n\n _maybeEnableSmoothScroll() {\n if (!this._config.smoothScroll) {\n return;\n } // unregister any previous listeners\n\n\n EventHandler.off(this._config.target, EVENT_CLICK);\n EventHandler.on(this._config.target, EVENT_CLICK, SELECTOR_TARGET_LINKS, event => {\n const observableSection = this._observableSections.get(event.target.hash);\n\n if (observableSection) {\n event.preventDefault();\n const root = this._rootElement || window;\n const height = observableSection.offsetTop - this._element.offsetTop;\n\n if (root.scrollTo) {\n root.scrollTo({\n top: height,\n behavior: 'smooth'\n });\n return;\n } // Chrome 60 doesn't support `scrollTo`\n\n\n root.scrollTop = height;\n }\n });\n }\n\n _getNewObserver() {\n const options = {\n root: this._rootElement,\n threshold: this._config.threshold,\n rootMargin: this._config.rootMargin\n };\n return new IntersectionObserver(entries => this._observerCallback(entries), options);\n } // The logic of selection\n\n\n _observerCallback(entries) {\n const targetElement = entry => this._targetLinks.get(`#${entry.target.id}`);\n\n const activate = entry => {\n this._previousScrollData.visibleEntryTop = entry.target.offsetTop;\n\n this._process(targetElement(entry));\n };\n\n const parentScrollTop = (this._rootElement || document.documentElement).scrollTop;\n const userScrollsDown = parentScrollTop >= this._previousScrollData.parentScrollTop;\n this._previousScrollData.parentScrollTop = parentScrollTop;\n\n for (const entry of entries) {\n if (!entry.isIntersecting) {\n this._activeTarget = null;\n\n this._clearActiveClass(targetElement(entry));\n\n continue;\n }\n\n const entryIsLowerThanPrevious = entry.target.offsetTop >= this._previousScrollData.visibleEntryTop; // if we are scrolling down, pick the bigger offsetTop\n\n if (userScrollsDown && entryIsLowerThanPrevious) {\n activate(entry); // if parent isn't scrolled, let's keep the first visible item, breaking the iteration\n\n if (!parentScrollTop) {\n return;\n }\n\n continue;\n } // if we are scrolling up, pick the smallest offsetTop\n\n\n if (!userScrollsDown && !entryIsLowerThanPrevious) {\n activate(entry);\n }\n }\n }\n\n _initializeTargetsAndObservables() {\n this._targetLinks = new Map();\n this._observableSections = new Map();\n const targetLinks = SelectorEngine.find(SELECTOR_TARGET_LINKS, this._config.target);\n\n for (const anchor of targetLinks) {\n // ensure that the anchor has an id and is not disabled\n if (!anchor.hash || isDisabled(anchor)) {\n continue;\n }\n\n const observableSection = SelectorEngine.findOne(anchor.hash, this._element); // ensure that the observableSection exists & is visible\n\n if (isVisible(observableSection)) {\n this._targetLinks.set(anchor.hash, anchor);\n\n this._observableSections.set(anchor.hash, observableSection);\n }\n }\n }\n\n _process(target) {\n if (this._activeTarget === target) {\n return;\n }\n\n this._clearActiveClass(this._config.target);\n\n this._activeTarget = target;\n target.classList.add(CLASS_NAME_ACTIVE$1);\n\n this._activateParents(target);\n\n EventHandler.trigger(this._element, EVENT_ACTIVATE, {\n relatedTarget: target\n });\n }\n\n _activateParents(target) {\n // Activate dropdown parents\n if (target.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {\n SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE$1, target.closest(SELECTOR_DROPDOWN)).classList.add(CLASS_NAME_ACTIVE$1);\n return;\n }\n\n for (const listGroup of SelectorEngine.parents(target, SELECTOR_NAV_LIST_GROUP)) {\n // Set triggered links parents as active\n // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor\n for (const item of SelectorEngine.prev(listGroup, SELECTOR_LINK_ITEMS)) {\n item.classList.add(CLASS_NAME_ACTIVE$1);\n }\n }\n }\n\n _clearActiveClass(parent) {\n parent.classList.remove(CLASS_NAME_ACTIVE$1);\n const activeNodes = SelectorEngine.find(`${SELECTOR_TARGET_LINKS}.${CLASS_NAME_ACTIVE$1}`, parent);\n\n for (const node of activeNodes) {\n node.classList.remove(CLASS_NAME_ACTIVE$1);\n }\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = ScrollSpy.getOrCreateInstance(this, config);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n });\n }\n\n }\n /**\n * Data API implementation\n */\n\n\n EventHandler.on(window, EVENT_LOAD_DATA_API$1, () => {\n for (const spy of SelectorEngine.find(SELECTOR_DATA_SPY)) {\n ScrollSpy.getOrCreateInstance(spy);\n }\n });\n /**\n * jQuery\n */\n\n defineJQueryPlugin(ScrollSpy);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): tab.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME$1 = 'tab';\n const DATA_KEY$1 = 'bs.tab';\n const EVENT_KEY$1 = `.${DATA_KEY$1}`;\n const EVENT_HIDE$1 = `hide${EVENT_KEY$1}`;\n const EVENT_HIDDEN$1 = `hidden${EVENT_KEY$1}`;\n const EVENT_SHOW$1 = `show${EVENT_KEY$1}`;\n const EVENT_SHOWN$1 = `shown${EVENT_KEY$1}`;\n const EVENT_CLICK_DATA_API = `click${EVENT_KEY$1}`;\n const EVENT_KEYDOWN = `keydown${EVENT_KEY$1}`;\n const EVENT_LOAD_DATA_API = `load${EVENT_KEY$1}`;\n const ARROW_LEFT_KEY = 'ArrowLeft';\n const ARROW_RIGHT_KEY = 'ArrowRight';\n const ARROW_UP_KEY = 'ArrowUp';\n const ARROW_DOWN_KEY = 'ArrowDown';\n const CLASS_NAME_ACTIVE = 'active';\n const CLASS_NAME_FADE$1 = 'fade';\n const CLASS_NAME_SHOW$1 = 'show';\n const CLASS_DROPDOWN = 'dropdown';\n const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';\n const SELECTOR_DROPDOWN_MENU = '.dropdown-menu';\n const SELECTOR_DROPDOWN_ITEM = '.dropdown-item';\n const NOT_SELECTOR_DROPDOWN_TOGGLE = ':not(.dropdown-toggle)';\n const SELECTOR_TAB_PANEL = '.list-group, .nav, [role=\"tablist\"]';\n const SELECTOR_OUTER = '.nav-item, .list-group-item';\n const SELECTOR_INNER = `.nav-link${NOT_SELECTOR_DROPDOWN_TOGGLE}, .list-group-item${NOT_SELECTOR_DROPDOWN_TOGGLE}, [role=\"tab\"]${NOT_SELECTOR_DROPDOWN_TOGGLE}`;\n const SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"tab\"], [data-bs-toggle=\"pill\"], [data-bs-toggle=\"list\"]'; // todo:v6: could be only `tab`\n\n const SELECTOR_INNER_ELEM = `${SELECTOR_INNER}, ${SELECTOR_DATA_TOGGLE}`;\n const SELECTOR_DATA_TOGGLE_ACTIVE = `.${CLASS_NAME_ACTIVE}[data-bs-toggle=\"tab\"], .${CLASS_NAME_ACTIVE}[data-bs-toggle=\"pill\"], .${CLASS_NAME_ACTIVE}[data-bs-toggle=\"list\"]`;\n /**\n * Class definition\n */\n\n class Tab extends BaseComponent {\n constructor(element) {\n super(element);\n this._parent = this._element.closest(SELECTOR_TAB_PANEL);\n\n if (!this._parent) {\n return; // todo: should Throw exception on v6\n // throw new TypeError(`${element.outerHTML} has not a valid parent ${SELECTOR_INNER_ELEM}`)\n } // Set up initial aria attributes\n\n\n this._setInitialAttributes(this._parent, this._getChildren());\n\n EventHandler.on(this._element, EVENT_KEYDOWN, event => this._keydown(event));\n } // Getters\n\n\n static get NAME() {\n return NAME$1;\n } // Public\n\n\n show() {\n // Shows this elem and deactivate the active sibling if exists\n const innerElem = this._element;\n\n if (this._elemIsActive(innerElem)) {\n return;\n } // Search for active tab on same parent to deactivate it\n\n\n const active = this._getActiveElem();\n\n const hideEvent = active ? EventHandler.trigger(active, EVENT_HIDE$1, {\n relatedTarget: innerElem\n }) : null;\n const showEvent = EventHandler.trigger(innerElem, EVENT_SHOW$1, {\n relatedTarget: active\n });\n\n if (showEvent.defaultPrevented || hideEvent && hideEvent.defaultPrevented) {\n return;\n }\n\n this._deactivate(active, innerElem);\n\n this._activate(innerElem, active);\n } // Private\n\n\n _activate(element, relatedElem) {\n if (!element) {\n return;\n }\n\n element.classList.add(CLASS_NAME_ACTIVE);\n\n this._activate(getElementFromSelector(element)); // Search and activate/show the proper section\n\n\n const complete = () => {\n if (element.getAttribute('role') !== 'tab') {\n element.classList.add(CLASS_NAME_SHOW$1);\n return;\n }\n\n element.focus();\n element.removeAttribute('tabindex');\n element.setAttribute('aria-selected', true);\n\n this._toggleDropDown(element, true);\n\n EventHandler.trigger(element, EVENT_SHOWN$1, {\n relatedTarget: relatedElem\n });\n };\n\n this._queueCallback(complete, element, element.classList.contains(CLASS_NAME_FADE$1));\n }\n\n _deactivate(element, relatedElem) {\n if (!element) {\n return;\n }\n\n element.classList.remove(CLASS_NAME_ACTIVE);\n element.blur();\n\n this._deactivate(getElementFromSelector(element)); // Search and deactivate the shown section too\n\n\n const complete = () => {\n if (element.getAttribute('role') !== 'tab') {\n element.classList.remove(CLASS_NAME_SHOW$1);\n return;\n }\n\n element.setAttribute('aria-selected', false);\n element.setAttribute('tabindex', '-1');\n\n this._toggleDropDown(element, false);\n\n EventHandler.trigger(element, EVENT_HIDDEN$1, {\n relatedTarget: relatedElem\n });\n };\n\n this._queueCallback(complete, element, element.classList.contains(CLASS_NAME_FADE$1));\n }\n\n _keydown(event) {\n if (![ARROW_LEFT_KEY, ARROW_RIGHT_KEY, ARROW_UP_KEY, ARROW_DOWN_KEY].includes(event.key)) {\n return;\n }\n\n event.stopPropagation(); // stopPropagation/preventDefault both added to support up/down keys without scrolling the page\n\n event.preventDefault();\n const isNext = [ARROW_RIGHT_KEY, ARROW_DOWN_KEY].includes(event.key);\n const nextActiveElement = getNextActiveElement(this._getChildren().filter(element => !isDisabled(element)), event.target, isNext, true);\n\n if (nextActiveElement) {\n Tab.getOrCreateInstance(nextActiveElement).show();\n }\n }\n\n _getChildren() {\n // collection of inner elements\n return SelectorEngine.find(SELECTOR_INNER_ELEM, this._parent);\n }\n\n _getActiveElem() {\n return this._getChildren().find(child => this._elemIsActive(child)) || null;\n }\n\n _setInitialAttributes(parent, children) {\n this._setAttributeIfNotExists(parent, 'role', 'tablist');\n\n for (const child of children) {\n this._setInitialAttributesOnChild(child);\n }\n }\n\n _setInitialAttributesOnChild(child) {\n child = this._getInnerElement(child);\n\n const isActive = this._elemIsActive(child);\n\n const outerElem = this._getOuterElement(child);\n\n child.setAttribute('aria-selected', isActive);\n\n if (outerElem !== child) {\n this._setAttributeIfNotExists(outerElem, 'role', 'presentation');\n }\n\n if (!isActive) {\n child.setAttribute('tabindex', '-1');\n }\n\n this._setAttributeIfNotExists(child, 'role', 'tab'); // set attributes to the related panel too\n\n\n this._setInitialAttributesOnTargetPanel(child);\n }\n\n _setInitialAttributesOnTargetPanel(child) {\n const target = getElementFromSelector(child);\n\n if (!target) {\n return;\n }\n\n this._setAttributeIfNotExists(target, 'role', 'tabpanel');\n\n if (child.id) {\n this._setAttributeIfNotExists(target, 'aria-labelledby', `#${child.id}`);\n }\n }\n\n _toggleDropDown(element, open) {\n const outerElem = this._getOuterElement(element);\n\n if (!outerElem.classList.contains(CLASS_DROPDOWN)) {\n return;\n }\n\n const toggle = (selector, className) => {\n const element = SelectorEngine.findOne(selector, outerElem);\n\n if (element) {\n element.classList.toggle(className, open);\n }\n };\n\n toggle(SELECTOR_DROPDOWN_TOGGLE, CLASS_NAME_ACTIVE);\n toggle(SELECTOR_DROPDOWN_MENU, CLASS_NAME_SHOW$1);\n toggle(SELECTOR_DROPDOWN_ITEM, CLASS_NAME_ACTIVE);\n outerElem.setAttribute('aria-expanded', open);\n }\n\n _setAttributeIfNotExists(element, attribute, value) {\n if (!element.hasAttribute(attribute)) {\n element.setAttribute(attribute, value);\n }\n }\n\n _elemIsActive(elem) {\n return elem.classList.contains(CLASS_NAME_ACTIVE);\n } // Try to get the inner element (usually the .nav-link)\n\n\n _getInnerElement(elem) {\n return elem.matches(SELECTOR_INNER_ELEM) ? elem : SelectorEngine.findOne(SELECTOR_INNER_ELEM, elem);\n } // Try to get the outer element (usually the .nav-item)\n\n\n _getOuterElement(elem) {\n return elem.closest(SELECTOR_OUTER) || elem;\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Tab.getOrCreateInstance(this);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n });\n }\n\n }\n /**\n * Data API implementation\n */\n\n\n EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault();\n }\n\n if (isDisabled(this)) {\n return;\n }\n\n Tab.getOrCreateInstance(this).show();\n });\n /**\n * Initialize on focus\n */\n\n EventHandler.on(window, EVENT_LOAD_DATA_API, () => {\n for (const element of SelectorEngine.find(SELECTOR_DATA_TOGGLE_ACTIVE)) {\n Tab.getOrCreateInstance(element);\n }\n });\n /**\n * jQuery\n */\n\n defineJQueryPlugin(Tab);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): toast.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME = 'toast';\n const DATA_KEY = 'bs.toast';\n const EVENT_KEY = `.${DATA_KEY}`;\n const EVENT_MOUSEOVER = `mouseover${EVENT_KEY}`;\n const EVENT_MOUSEOUT = `mouseout${EVENT_KEY}`;\n const EVENT_FOCUSIN = `focusin${EVENT_KEY}`;\n const EVENT_FOCUSOUT = `focusout${EVENT_KEY}`;\n const EVENT_HIDE = `hide${EVENT_KEY}`;\n const EVENT_HIDDEN = `hidden${EVENT_KEY}`;\n const EVENT_SHOW = `show${EVENT_KEY}`;\n const EVENT_SHOWN = `shown${EVENT_KEY}`;\n const CLASS_NAME_FADE = 'fade';\n const CLASS_NAME_HIDE = 'hide'; // @deprecated - kept here only for backwards compatibility\n\n const CLASS_NAME_SHOW = 'show';\n const CLASS_NAME_SHOWING = 'showing';\n const DefaultType = {\n animation: 'boolean',\n autohide: 'boolean',\n delay: 'number'\n };\n const Default = {\n animation: true,\n autohide: true,\n delay: 5000\n };\n /**\n * Class definition\n */\n\n class Toast extends BaseComponent {\n constructor(element, config) {\n super(element, config);\n this._timeout = null;\n this._hasMouseInteraction = false;\n this._hasKeyboardInteraction = false;\n\n this._setListeners();\n } // Getters\n\n\n static get Default() {\n return Default;\n }\n\n static get DefaultType() {\n return DefaultType;\n }\n\n static get NAME() {\n return NAME;\n } // Public\n\n\n show() {\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW);\n\n if (showEvent.defaultPrevented) {\n return;\n }\n\n this._clearTimeout();\n\n if (this._config.animation) {\n this._element.classList.add(CLASS_NAME_FADE);\n }\n\n const complete = () => {\n this._element.classList.remove(CLASS_NAME_SHOWING);\n\n EventHandler.trigger(this._element, EVENT_SHOWN);\n\n this._maybeScheduleHide();\n };\n\n this._element.classList.remove(CLASS_NAME_HIDE); // @deprecated\n\n\n reflow(this._element);\n\n this._element.classList.add(CLASS_NAME_SHOW, CLASS_NAME_SHOWING);\n\n this._queueCallback(complete, this._element, this._config.animation);\n }\n\n hide() {\n if (!this.isShown()) {\n return;\n }\n\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE);\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n const complete = () => {\n this._element.classList.add(CLASS_NAME_HIDE); // @deprecated\n\n\n this._element.classList.remove(CLASS_NAME_SHOWING, CLASS_NAME_SHOW);\n\n EventHandler.trigger(this._element, EVENT_HIDDEN);\n };\n\n this._element.classList.add(CLASS_NAME_SHOWING);\n\n this._queueCallback(complete, this._element, this._config.animation);\n }\n\n dispose() {\n this._clearTimeout();\n\n if (this.isShown()) {\n this._element.classList.remove(CLASS_NAME_SHOW);\n }\n\n super.dispose();\n }\n\n isShown() {\n return this._element.classList.contains(CLASS_NAME_SHOW);\n } // Private\n\n\n _maybeScheduleHide() {\n if (!this._config.autohide) {\n return;\n }\n\n if (this._hasMouseInteraction || this._hasKeyboardInteraction) {\n return;\n }\n\n this._timeout = setTimeout(() => {\n this.hide();\n }, this._config.delay);\n }\n\n _onInteraction(event, isInteracting) {\n switch (event.type) {\n case 'mouseover':\n case 'mouseout':\n this._hasMouseInteraction = isInteracting;\n break;\n\n case 'focusin':\n case 'focusout':\n this._hasKeyboardInteraction = isInteracting;\n break;\n }\n\n if (isInteracting) {\n this._clearTimeout();\n\n return;\n }\n\n const nextElement = event.relatedTarget;\n\n if (this._element === nextElement || this._element.contains(nextElement)) {\n return;\n }\n\n this._maybeScheduleHide();\n }\n\n _setListeners() {\n EventHandler.on(this._element, EVENT_MOUSEOVER, event => this._onInteraction(event, true));\n EventHandler.on(this._element, EVENT_MOUSEOUT, event => this._onInteraction(event, false));\n EventHandler.on(this._element, EVENT_FOCUSIN, event => this._onInteraction(event, true));\n EventHandler.on(this._element, EVENT_FOCUSOUT, event => this._onInteraction(event, false));\n }\n\n _clearTimeout() {\n clearTimeout(this._timeout);\n this._timeout = null;\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Toast.getOrCreateInstance(this, config);\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config](this);\n }\n });\n }\n\n }\n /**\n * Data API implementation\n */\n\n\n enableDismissTrigger(Toast);\n /**\n * jQuery\n */\n\n defineJQueryPlugin(Toast);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): index.umd.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n const index_umd = {\n Alert,\n Button,\n Carousel,\n Collapse,\n Dropdown,\n Modal,\n Offcanvas,\n Popover,\n ScrollSpy,\n Tab,\n Toast,\n Tooltip\n };\n\n return index_umd;\n\n}));\n//# sourceMappingURL=bootstrap.bundle.js.map\n","import { noop, safe_not_equal, subscribe, run_all, is_function } from '../internal/index.mjs';\nexport { get_store_value as get } from '../internal/index.mjs';\n\nconst subscriber_queue = [];\n/**\n * Creates a `Readable` store that allows reading by subscription.\n * @param value initial value\n * @param {StartStopNotifier}start start and stop notifications for subscriptions\n */\nfunction readable(value, start) {\n return {\n subscribe: writable(value, start).subscribe\n };\n}\n/**\n * Create a `Writable` store that allows both updating and reading by subscription.\n * @param {*=}value initial value\n * @param {StartStopNotifier=}start start and stop notifications for subscriptions\n */\nfunction writable(value, start = noop) {\n let stop;\n const subscribers = new Set();\n function set(new_value) {\n if (safe_not_equal(value, new_value)) {\n value = new_value;\n if (stop) { // store is ready\n const run_queue = !subscriber_queue.length;\n for (const subscriber of subscribers) {\n subscriber[1]();\n subscriber_queue.push(subscriber, value);\n }\n if (run_queue) {\n for (let i = 0; i < subscriber_queue.length; i += 2) {\n subscriber_queue[i][0](subscriber_queue[i + 1]);\n }\n subscriber_queue.length = 0;\n }\n }\n }\n }\n function update(fn) {\n set(fn(value));\n }\n function subscribe(run, invalidate = noop) {\n const subscriber = [run, invalidate];\n subscribers.add(subscriber);\n if (subscribers.size === 1) {\n stop = start(set) || noop;\n }\n run(value);\n return () => {\n subscribers.delete(subscriber);\n if (subscribers.size === 0) {\n stop();\n stop = null;\n }\n };\n }\n return { set, update, subscribe };\n}\nfunction derived(stores, fn, initial_value) {\n const single = !Array.isArray(stores);\n const stores_array = single\n ? [stores]\n : stores;\n const auto = fn.length < 2;\n return readable(initial_value, (set) => {\n let inited = false;\n const values = [];\n let pending = 0;\n let cleanup = noop;\n const sync = () => {\n if (pending) {\n return;\n }\n cleanup();\n const result = fn(single ? values[0] : values, set);\n if (auto) {\n set(result);\n }\n else {\n cleanup = is_function(result) ? result : noop;\n }\n };\n const unsubscribers = stores_array.map((store, i) => subscribe(store, (value) => {\n values[i] = value;\n pending &= ~(1 << i);\n if (inited) {\n sync();\n }\n }, () => {\n pending |= (1 << i);\n }));\n inited = true;\n sync();\n return function stop() {\n run_all(unsubscribers);\n cleanup();\n };\n });\n}\n\nexport { derived, readable, writable };\n","import { writable } from 'svelte/store';\n\nexport const map_store = writable();\nexport const results_store = writable();\nexport const last_api_request_url_store = writable();\nexport const error_store = writable();\nexport const page = writable();\n\n/**\n * Update the global page state.\n *\n * When called without a parameter, then the current window.location is\n * parsed and the page state is set accordingly. Otherwise the page state\n * is set from the parameters. 'pagename' is the overall subpage (without\n * .html extension). 'params' must be an URLSearchParams object and contain\n * the requested query parameters. It may also be omitted completely for a\n * link without query parameters.\n */\nconst default_pagename = Nominatim_Config.Reverse_Only ? 'reverse' : 'search';\nconst pagenames = [\n default_pagename,\n 'reverse',\n 'details',\n 'deletable',\n 'polygons',\n 'status',\n 'about'\n];\n\nexport function refresh_page(pagename, params) {\n if (typeof pagename === 'undefined') {\n pagename = window.location.pathname.replace('.html', '').replace(/^.*\\//, '');\n\n if (!pagenames.includes(pagename)) pagename = default_pagename;\n\n params = new URLSearchParams(window.location.search);\n } else {\n if (!pagenames.includes(pagename)) pagename = default_pagename;\n\n if (typeof params === 'undefined') {\n params = new URLSearchParams();\n }\n\n let param_str = params.toString();\n if (param_str) {\n param_str = '?' + param_str;\n }\n let new_url = pagename + '.html' + param_str;\n\n if (window.location.protocol.match(/^http/)) {\n window.history.pushState([], '', new_url);\n } else {\n window.location.href = new_url;\n }\n }\n\n page.set({ tab: pagename, params: params });\n last_api_request_url_store.set(null);\n error_store.set(null);\n}\n","<style>\n footer {\n clear: both;\n font-size: 0.8em;\n text-align: center;\n }\n footer p {\n margin: 1em;\n }\n</style>\n\n<footer>\n <p class=\"disclaimer\">\n Addresses and postcodes are approximate\n </p>\n <p class=\"copyright\">\n © <a href=\"https://osm.org/copyright\">OpenStreetMap</a> contributors\n </p>\n</footer>\n","import { last_api_request_url_store, error_store } from './stores.js';\n\nfunction api_request_progress(status) {\n var loading_el = document.getElementById('loading');\n if (!loading_el) return; // might not be on page yet\n\n loading_el.style.display = (status === 'start') ? 'block' : null;\n}\n\nexport async function fetch_from_api(endpoint_name, params, callback) {\n var api_url = generate_nominatim_api_url(endpoint_name, params);\n\n // For the test suite:\n // If httpbin_status URL parameter is set we call https://httpbin.org/#/Status_codes\n var tmp_params = new URLSearchParams(window.location.search);\n if (tmp_params && tmp_params.get('httpbin_status')) {\n api_url = 'https://httpbin.org/status/' + parseInt(tmp_params.get('httpbin_status'), 10);\n }\n\n api_request_progress('start');\n if (endpoint_name !== 'status') last_api_request_url_store.set(null);\n\n try {\n await fetch(api_url, { headers: Nominatim_Config.Nominatim_API_Endpoint_Headers || {} })\n .then(async (response) => {\n if (!((response.status >= 200 && response.status < 300) || response.status === 404)) {\n error_store.set(`Error fetching data from ${api_url} (${response.statusText})`);\n return undefined;\n }\n\n // Parse JSON here instead of returning a promise so we can catch possible\n // errors.\n var data;\n try {\n data = await response.json();\n } catch (err) {\n // e.g. 'JSON.parse: unexpected non-whitespace character after JSON data at line 1'\n error_store.set(`Error parsing JSON data from ${api_url} (${err})`);\n return undefined;\n }\n return data;\n })\n .then((data) => {\n if (data) {\n if (data.error) {\n error_store.set(data.error.message);\n }\n callback(data);\n }\n api_request_progress('finish');\n });\n } catch (error) {\n error_store.set(`Error fetching data from ${api_url} (${error})`);\n api_request_progress('finish');\n }\n\n if (endpoint_name !== 'status') last_api_request_url_store.set(api_url);\n}\n\nvar fetch_content_cache = {};\nexport async function fetch_content_into_element(url, dom_element) {\n if (!window.location.protocol.match(/^http/)) {\n dom_element.innerHTML = `Cannot display data from ${url} here. `\n + 'Browser security prevents loading content from file:// URLs.';\n return;\n }\n\n if (fetch_content_cache[url]) {\n dom_element.innerHTML = fetch_content_cache[url];\n return;\n }\n try {\n await fetch(url)\n .then(response => response.text())\n .then(html => {\n html = html.replace('Nominatim_API_Endpoint', generate_nominatim_endpoint_url());\n dom_element.innerHTML = html;\n fetch_content_cache[url] = html;\n });\n } catch (error) {\n dom_element.innerHTML = `Error fetching content from ${url} (${error})`;\n }\n}\n\nfunction generate_nominatim_endpoint_url(endpoint_name) {\n var conf_endpoint = Nominatim_Config.Nominatim_API_Endpoint;\n\n if (typeof conf_endpoint === 'function') {\n return conf_endpoint(endpoint_name);\n }\n\n if (!endpoint_name) return conf_endpoint;\n\n return conf_endpoint + endpoint_name + '.php';\n}\n\nfunction generate_nominatim_api_url(endpoint_name, params) {\n // default value for /search\n if (params.dedupe === 1) delete params.dedupe;\n\n extend_parameters(params, Nominatim_Config.Nominatim_API_Endpoint_Params);\n return generate_nominatim_endpoint_url(endpoint_name)\n + '?'\n + Object.keys(clean_up_parameters(params)).map((k) => {\n return encodeURIComponent(k) + '=' + encodeURIComponent(params[k]);\n }).join('&');\n}\n\nfunction extend_parameters(params, params2) {\n var param_names = Object.keys(params2);\n for (var i = 0; i < param_names.length; i += 1) {\n params[param_names[i]] = params2[param_names[i]];\n }\n}\n\nfunction clean_up_parameters(params) {\n // `&a=&b=&c=1` => '&c=1'\n var param_names = Object.keys(params);\n for (var i = 0; i < param_names.length; i += 1) {\n var val = params[param_names[i]];\n if (typeof (val) === 'undefined' || val === '' || val === null) {\n delete params[param_names[i]];\n }\n }\n return params;\n}\n\nexport function update_html_title(title) {\n document.title = [title, Nominatim_Config.Page_Title]\n .filter((val) => val && val.length > 1)\n .join(' | ');\n}\n\n","<script>\n import { refresh_page } from '../lib/stores.js';\n\n export let page;\n export let params_hash = {};\n export let extra_classes = '';\n let href = page + '.html';\n\n function handleClick() {\n refresh_page(page, new URLSearchParams(params_hash));\n }\n\n $: {\n let param_str = new URLSearchParams(params_hash).toString();\n href = page + '.html' + (param_str ? '?' : '') + param_str;\n }\n</script>\n\n<a on:click|preventDefault|stopPropagation={handleClick} href={href} class={extra_classes}><slot></slot></a>\n","<script>\nimport { refresh_page } from '../lib/stores.js';\n\nexport let lat = null;\nexport let lon = null;\nexport let zoom = null;\nexport let extra_classes = '';\n\nlet params = new URLSearchParams();\nlet href = 'reverse.html';\n\n$: {\n let new_params = new URLSearchParams();\n\n if (lat && lon) {\n new_params.set('lat', lat);\n new_params.set('lon', lon);\n\n if (zoom) {\n new_params.set('zoom', zoom);\n }\n }\n\n params = new_params;\n}\n\n$: {\n let param_str = params.toString();\n href = 'reverse.html' + (param_str ? '?' : '') + param_str;\n}\n</script>\n\n<a on:click|preventDefault|stopPropagation={() => refresh_page('reverse', params)} href={href} class={extra_classes}><slot></slot></a>\n","var EN_US = ['second', 'minute', 'hour', 'day', 'week', 'month', 'year'];\nexport default function (diff, idx) {\n if (idx === 0)\n return ['just now', 'right now'];\n var unit = EN_US[Math.floor(idx / 2)];\n if (diff > 1)\n unit += 's';\n return [diff + \" \" + unit + \" ago\", \"in \" + diff + \" \" + unit];\n}\n//# sourceMappingURL=en_US.js.map","var ZH_CN = ['秒', '分钟', '小时', '天', '周', '个月', '年'];\nexport default function (diff, idx) {\n if (idx === 0)\n return ['刚刚', '片刻后'];\n var unit = ZH_CN[~~(idx / 2)];\n return [diff + \" \" + unit + \"\\u524D\", diff + \" \" + unit + \"\\u540E\"];\n}\n//# sourceMappingURL=zh_CN.js.map","/**\n * Created by hustcc on 18/5/20.\n * Contract: i@hust.cc\n */\n/**\n * All supported locales\n */\nvar Locales = {};\n/**\n * register a locale\n * @param locale\n * @param func\n */\nexport var register = function (locale, func) {\n Locales[locale] = func;\n};\n/**\n * get a locale, default is en_US\n * @param locale\n * @returns {*}\n */\nexport var getLocale = function (locale) {\n return Locales[locale] || Locales['en_US'];\n};\n//# sourceMappingURL=register.js.map","/**\n * Created by hustcc on 18/5/20.\n * Contract: i@hust.cc\n */\nvar SEC_ARRAY = [\n 60,\n 60,\n 24,\n 7,\n 365 / 7 / 12,\n 12,\n];\n/**\n * format Date / string / timestamp to timestamp\n * @param input\n * @returns {*}\n */\nexport function toDate(input) {\n if (input instanceof Date)\n return input;\n // @ts-ignore\n if (!isNaN(input) || /^\\d+$/.test(input))\n return new Date(parseInt(input));\n input = (input || '')\n // @ts-ignore\n .trim()\n .replace(/\\.\\d+/, '') // remove milliseconds\n .replace(/-/, '/')\n .replace(/-/, '/')\n .replace(/(\\d)T(\\d)/, '$1 $2')\n .replace(/Z/, ' UTC') // 2017-2-5T3:57:52Z -> 2017-2-5 3:57:52UTC\n .replace(/([+-]\\d\\d):?(\\d\\d)/, ' $1$2'); // -04:00 -> -0400\n return new Date(input);\n}\n/**\n * format the diff second to *** time ago, with setting locale\n * @param diff\n * @param localeFunc\n * @returns\n */\nexport function formatDiff(diff, localeFunc) {\n /**\n * if locale is not exist, use defaultLocale.\n * if defaultLocale is not exist, use build-in `en`.\n * be sure of no error when locale is not exist.\n *\n * If `time in`, then 1\n * If `time ago`, then 0\n */\n var agoIn = diff < 0 ? 1 : 0;\n /**\n * Get absolute value of number (|diff| is non-negative) value of x\n * |diff| = diff if diff is positive\n * |diff| = -diff if diff is negative\n * |0| = 0\n */\n diff = Math.abs(diff);\n /**\n * Time in seconds\n */\n var totalSec = diff;\n /**\n * Unit of time\n */\n var idx = 0;\n for (; diff >= SEC_ARRAY[idx] && idx < SEC_ARRAY.length; idx++) {\n diff /= SEC_ARRAY[idx];\n }\n /**\n * Math.floor() is alternative of ~~\n *\n * The differences and bugs:\n * Math.floor(3.7) -> 4 but ~~3.7 -> 3\n * Math.floor(1559125440000.6) -> 1559125440000 but ~~1559125440000.6 -> 52311552\n *\n * More information about the performance of algebraic:\n * https://www.youtube.com/watch?v=65-RbBwZQdU\n */\n diff = Math.floor(diff);\n idx *= 2;\n if (diff > (idx === 0 ? 9 : 1))\n idx += 1;\n return localeFunc(diff, idx, totalSec)[agoIn].replace('%s', diff.toString());\n}\n/**\n * calculate the diff second between date to be formatted an now date.\n * @param date\n * @param relativeDate\n * @returns {number}\n */\nexport function diffSec(date, relativeDate) {\n var relDate = relativeDate ? toDate(relativeDate) : new Date();\n return (+relDate - +toDate(date)) / 1000;\n}\n/**\n * nextInterval: calculate the next interval time.\n * - diff: the diff sec between now and date to be formatted.\n *\n * What's the meaning?\n * diff = 61 then return 59\n * diff = 3601 (an hour + 1 second), then return 3599\n * make the interval with high performance.\n **/\nexport function nextInterval(diff) {\n var rst = 1, i = 0, d = Math.abs(diff);\n for (; diff >= SEC_ARRAY[i] && i < SEC_ARRAY.length; i++) {\n diff /= SEC_ARRAY[i];\n rst *= SEC_ARRAY[i];\n }\n d = d % rst;\n d = d ? rst - d : rst;\n return Math.ceil(d);\n}\n//# sourceMappingURL=date.js.map","import { formatDiff, diffSec } from './utils/date';\nimport { getLocale } from './register';\n/**\n * format a TDate into string\n * @param date\n * @param locale\n * @param opts\n */\nexport var format = function (date, locale, opts) {\n // diff seconds\n var sec = diffSec(date, opts && opts.relativeDate);\n // format it with locale\n return formatDiff(sec, getLocale(locale));\n};\n//# sourceMappingURL=format.js.map","<script>\n import PageLink from './PageLink.svelte';\n import * as timeago from 'timeago.js';\n import { last_api_request_url_store } from '../lib/stores.js';\n import { fetch_from_api } from '../lib/api_utils.js';\n\n let last_updated_date;\n let last_api_request_url;\n let fetch_running = false; // prevent multiple parallel fetch runs\n\n last_api_request_url_store.subscribe(url => {\n last_api_request_url = url;\n\n if (last_api_request_url) {\n last_api_request_url = new URL(last_api_request_url, window.location.origin);\n last_api_request_url.searchParams.delete('polygon_geojson');\n last_api_request_url = last_api_request_url.toString();\n }\n\n if (fetch_running || last_updated_date) return;\n\n fetch_running = true;\n\n fetch_from_api('status', { format: 'json' }, function (data) {\n last_updated_date = data.data_updated;\n fetch_running = false;\n });\n });\n</script>\n\n<style>\n #last-updated {\n position: relative;\n font-size: 0.8rem;\n font-style: italic;\n }\n #loading {\n display: none;\n position: absolute;\n padding: 0.5em 1em;\n top: 0;\n left: 0;\n width: 100%;\n background-color: #eee;\n z-index: 100;\n }\n</style>\n\n<div id=\"last-updated\" class=\"container-fluid py-2 px-4 mb-3\">\n <div id=\"loading\" class=\"py-2 px-4\">\n <div class=\"spinner-border spinner-border-sm text-primary me-1\" role=\"status\"></div>\n Loading data from API ...\n </div>\n <div class=\"row\">\n <div class=\"col-sm-6\">\n {#if last_api_request_url}\n <div id=\"api-request\">\n Data from <a href=\"{last_api_request_url}\">API request</a>\n <span id=\"api-request-debug\">\n (<a href=\"{last_api_request_url}&debug=1\">debug output</a>)\n </span>\n </div>\n {/if}\n </div>\n <div class=\"col-sm-6 text-end\">\n {#if last_updated_date}\n Data last updated:\n <abbr id=\"data-date\" title=\"{last_updated_date} (UTC timezone)\">{timeago.format(new Date(last_updated_date))}</abbr>\n {/if}\n (<PageLink page=\"status\">Details</PageLink>)\n </div>\n </div>\n</div>\n","/**\n * Created by hustcc on 18/5/20.\n * Contract: i@hust.cc\n */\nimport en_US from './lang/en_US';\nimport zh_CN from './lang/zh_CN';\nimport { register } from './register';\nregister('en_US', en_US);\nregister('zh_CN', zh_CN);\nexport { format } from './format';\nexport { render, cancel } from './realtime';\nexport { register };\n//# sourceMappingURL=index.js.map","<script>\n import { error_store } from '../lib/stores.js';\n\n let error_message;\n\n error_store.subscribe(text => { error_message = text; });\n\n function dismiss_message() {\n error_store.set(null);\n }\n</script>\n\n{#if error_message}\n <div id=\"error\" class=\"container-fluid alert-danger py-3 px-4\">\n {error_message}\n\n <button type=\"button\" class=\"btn-close float-end\" aria-label=\"dismiss\" on:click={dismiss_message}></button>\n </div>\n{/if}\n","<script>\n import PageLink from './PageLink.svelte';\n import ReverseLink from './ReverseLink.svelte';\n import LastUpdated from './LastUpdated.svelte';\n import Error from './Error.svelte';\n\n import { map_store, page } from '../lib/stores.js';\n\n $: view = $page.tab;\n $: page_title = Nominatim_Config.Page_Title;\n $: reverse_only = Nominatim_Config.Reverse_Only;\n\n let map_lat;\n let map_lon;\n\n map_store.subscribe(map => {\n if (!map) return;\n\n map.on('move', function () {\n map_lat = map.getCenter().lat;\n map_lon = map.getCenter().lng;\n });\n });\n</script>\n\n<style>\n .navbar-brand :global(a:hover) {\n text-decoration: none;\n }\n\n .navbar-brand h1 {\n display: inline;\n font-size: 1.2em;\n color: #333;\n }\n\n .navbar-brand img {\n display: inline-block;\n margin-right: 5px;\n margin-top: -5px;\n }\n\n .nav-item {\n white-space: nowrap;\n }\n\n .page-title-section {\n display: none;\n text-align: center;\n padding: 1em;\n }\n @media (max-width: 600px) {\n .page-title-section {\n display: block;\n }\n }\n\n .search-section {\n padding: 1em 30px;\n background-color: #f5f5f5;\n border-top: 2px solid #ddd;\n border-bottom: 2px solid #ddd;\n }\n</style>\n\n<header class=\"container-fluid\">\n <nav class=\"navbar navbar-expand-sm navbar-light\">\n <div class=\"container-fluid\">\n <!-- Brand -->\n <div class=\"navbar-brand\">\n <PageLink page={reverse_only ? 'reverse' : 'search'}>\n <img alt=\"logo\" id=\"theme-logo\" src=\"theme/logo.png\" />\n <h1>{page_title}</h1>\n </PageLink>\n </div>\n <!-- Toggler (hamburger button) -->\n <button class=\"navbar-toggler\" type=\"button\" data-bs-toggle=\"collapse\" data-bs-target=\"#navbarSupportedContent\" aria-controls=\"navbarSupportedContent\" aria-expanded=\"false\" aria-label=\"Toggle navigation\">\n <span class=\"navbar-toggler-icon\"></span>\n </button>\n <div class=\"collapse navbar-collapse\" id=\"navbarSupportedContent\">\n <!-- Left-aligned links -->\n <ul class=\"navbar-nav me-auto\">\n {#if !reverse_only}\n <li class=\"nav-item\">\n <PageLink page=\"search\" extra_classes=\"nav-link {view === 'search' ? 'active' : ''}\">Search</PageLink>\n </li>\n {/if}\n <li class=\"nav-item\">\n <ReverseLink lat={map_lat} lon={map_lon} extra_classes=\"nav-link {view === 'reverse' ? 'active' : ''}\">Reverse</ReverseLink>\n </li>\n <li class=\"nav-item\">\n <PageLink page=\"details\" extra_classes=\"nav-link {view === 'details' ? 'active' : ''}\">Search By ID</PageLink>\n </li>\n </ul>\n </div>\n <!-- Right aligned links -->\n <ul class=\"navbar-nav\">\n <li class=\"nav-item\">\n <PageLink page=\"about\" extra_classes=\"nav-link {view === 'about' ? 'active' : ''}\">About & Help</PageLink>\n </li>\n </ul>\n </div>\n </nav>\n</header>\n<section class=\"page-title-section\">\n <h2>{view}</h2>\n</section>\n<section class=\"search-section\">\n <slot/>\n</section>\n<Error/>\n<LastUpdated/>\n","<script>\n import { refresh_page } from '../lib/stores.js';\n\n export let page;\n\n function serialize_form(form) {\n var params = new URLSearchParams();\n\n Array.prototype.slice.call(form.elements).forEach(function (field) {\n if (!field.name || field.disabled || ['submit', 'button'].indexOf(field.type) > -1) return;\n\n if (['checkbox', 'radio'].indexOf(field.type) > -1 && !field.checked) return;\n if (typeof field.value === 'undefined' || field.value === '') return;\n\n // Default value for /search endpoint\n if (field.name === 'dedupe' && (field.value === 1 || field.value === '1')) return;\n\n params.set(field.name, field.value);\n });\n\n return params;\n }\n\n // https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation\n // doesn't support hidden fields, so we check those in an extra step\n function validate_field(field) {\n if (field.type === 'hidden') {\n if (field.value.length) {\n if (field.pattern && !field.value.match(field.pattern)) return false;\n }\n }\n return field.checkValidity(); // for hidden field always true\n }\n\n function handle_submit(event) {\n let form = event.target;\n\n let allow_submit = true;\n\n Array.prototype.slice.call(form.elements).forEach(function (field) {\n if (!validate_field(field)) {\n alert('Invalid input in ' + field.name);\n allow_submit = false;\n }\n });\n\n if (allow_submit) refresh_page(page, serialize_form(form));\n }\n</script>\n\n<form on:submit|preventDefault={handle_submit} class=\"form-inline\" role=\"search\" accept-charset=\"UTF-8\" action=\"\">\n <div class=\"row g-2\">\n <slot></slot>\n </div>\n</form>\n","<script>\n import UrlSubmitForm from '../components/UrlSubmitForm.svelte';\n\n import { map_store } from '../lib/stores.js';\n import { get } from 'svelte/store';\n\n export let bStructuredSearch = false;\n export let api_request_params = {};\n let sViewBox;\n let lat;\n let lon;\n\n function map_viewbox_as_string(map) {\n var bounds = map.getBounds();\n var west = bounds.getWest();\n var east = bounds.getEast();\n\n if ((east - west) >= 360) { // covers more than whole planet\n west = map.getCenter().lng - 179.999;\n east = map.getCenter().lng + 179.999;\n }\n east = L.latLng(77, east).wrap().lng;\n west = L.latLng(77, west).wrap().lng;\n\n return [\n west.toFixed(5), // left\n bounds.getNorth().toFixed(5), // top\n east.toFixed(5), // right\n bounds.getSouth().toFixed(5) // bottom\n ].join(',');\n }\n\n function set_viewbox(map) {\n let use_viewbox = document.getElementById('use_viewbox');\n if (use_viewbox && use_viewbox.checked) {\n sViewBox = map_viewbox_as_string(map);\n } else {\n sViewBox = '';\n }\n }\n\n function update_reverse_link(map) {\n let center_lat_lng = map.wrapLatLng(map.getCenter());\n lat = center_lat_lng.lat.toFixed(5);\n lon = center_lat_lng.lng.toFixed(5);\n }\n\n map_store.subscribe(map => {\n if (!map) { return; }\n\n map.on('move', function () {\n set_viewbox(map);\n update_reverse_link(map);\n });\n\n map.on('load', function () {\n set_viewbox(map);\n update_reverse_link(map);\n });\n });\n\n function reset_viewbox() {\n let map = get(map_store);\n if (map) { set_viewbox(map); }\n }\n\n function set_bounded(e) {\n document.querySelector('input[name=bounded]').value = e.target.checked ? 1 : '';\n }\n\n function set_dedupe(e) {\n document.querySelector('input[name=dedupe]').value = e.target.checked ? 1 : 0;\n }\n\n function set_api_param(e) {\n document.querySelector('input[name=' + e.target.dataset.apiParam + ']').value = e.target.value;\n }\n</script>\n\n<ul class=\"nav nav-tabs\">\n <li class=\"nav-item\">\n <a class=\"nav-link\" class:active={!bStructuredSearch} data-bs-toggle=\"tab\" href=\"#simple\">Simple</a>\n </li>\n <li class=\"nav-item\">\n <a class=\"nav-link\" class:active={bStructuredSearch} data-bs-toggle=\"tab\" href=\"#structured\">Structured</a>\n </li>\n</ul>\n\n<div class=\"tab-content py-2\">\n <div class=\"tab-pane\" class:active={!bStructuredSearch} id=\"simple\" role=\"tabpanel\">\n <UrlSubmitForm page=\"search\">\n <div class=\"col-auto\">\n <input id=\"q\"\n name=\"q\"\n type=\"text\"\n class=\"form-control form-control-sm\"\n placeholder=\"Search\"\n value=\"{api_request_params.q || ''}\" />\n </div>\n <div class=\"col-auto\">\n <button type=\"submit\" class=\"btn btn-primary btn-sm mx-1\">Search</button>\n <input type=\"hidden\" name=\"viewbox\" value=\"{sViewBox || ''}\" />\n <input type=\"hidden\" name=\"dedupe\" value=\"{api_request_params.dedupe === 0 ? 0 : 1}\" />\n <input type=\"hidden\" name=\"bounded\" value=\"{api_request_params.bounded ? 1 : ''}\" />\n <input type=\"hidden\" name=\"accept-language\" value=\"{api_request_params['accept-language'] || ''}\" />\n <input type=\"hidden\" name=\"countrycodes\" value=\"{api_request_params.countrycodes || ''}\"\n pattern=\"^[a-zA-Z]{'{2}'}(,[a-zA-Z]{'{2}'})*$\" />\n <input type=\"hidden\" name=\"limit\" value=\"{api_request_params.limit || ''}\" />\n <input type=\"hidden\" name=\"polygon_threshold\" value=\"{api_request_params.polygon_threshold || ''}\" />\n </div>\n </UrlSubmitForm>\n </div>\n <div class=\"tab-pane\" class:active={bStructuredSearch} id=\"structured\" role=\"tabpanel\">\n <UrlSubmitForm page=\"search\">\n <div class=\"col-auto\">\n <input name=\"street\" type=\"text\" class=\"form-control form-control-sm me-1\"\n placeholder=\"House number/Street\"\n value=\"{api_request_params.street || ''}\" />\n </div>\n <div class=\"col-auto\">\n <input name=\"city\" type=\"text\" class=\"form-control form-control-sm me-1\"\n placeholder=\"City\"\n value=\"{api_request_params.city || ''}\" />\n </div>\n <div class=\"col-auto\">\n <input id=\"county\" name=\"county\" type=\"text\" class=\"form-control form-control-sm me-1\"\n placeholder=\"County\"\n value=\"{api_request_params.county || ''}\" />\n </div>\n <div class=\"col-auto\">\n <input name=\"state\" type=\"text\" class=\"form-control form-control-sm me-1\"\n placeholder=\"State\"\n value=\"{api_request_params.state || ''}\" />\n </div>\n <div class=\"col-auto\">\n <input name=\"country\" type=\"text\" class=\"form-control form-control-sm me-1\"\n placeholder=\"Country\"\n value=\"{api_request_params.country || ''}\" />\n </div>\n <div class=\"col-auto\">\n <input name=\"postalcode\" type=\"text\" class=\"form-control form-control-sm me-1\"\n placeholder=\"Postal Code\"\n value=\"{api_request_params.postalcode || ''}\" />\n </div>\n <div class=\"col-auto\">\n <button type=\"submit\" class=\"btn btn-primary btn-sm\">Search</button>\n <input type=\"hidden\" name=\"viewbox\" value=\"{sViewBox || ''}\" />\n <input type=\"hidden\" name=\"dedupe\" value=\"{api_request_params.dedupe === 0 ? 0 : 1}\" />\n <input type=\"hidden\" name=\"bounded\" value=\"{api_request_params.bounded ? 1 : ''}\" />\n <input type=\"hidden\" name=\"accept-language\" value=\"{api_request_params['accept-language'] || ''}\" />\n <input type=\"hidden\" name=\"countrycodes\" value=\"{api_request_params.countrycodes || ''}\"\n pattern=\"^[a-zA-Z]{'{2}'}(,[a-zA-Z]{'{2}'})*$\" />\n <input type=\"hidden\" name=\"limit\" value=\"{api_request_params.limit || ''}\" />\n <input type=\"hidden\" name=\"polygon_threshold\" value=\"{api_request_params.polygon_threshold || ''}\" />\n </div>\n </UrlSubmitForm>\n </div>\n</div> <!-- /tab-content -->\n\n<!-- Additional options -->\n<details id=\"searchAdvancedOptions\">\n <summary><small>Advanced options</small></summary>\n <ul>\n <li>\n <div class=\"form-check form-check-inline\">\n <label class=\"form-check-label\" for=\"use_viewbox\">apply viewbox</label>\n <input type=\"checkbox\" class=\"form-check-input api-param-setting\"\n id=\"use_viewbox\" checked={api_request_params.viewbox} on:change={reset_viewbox}>\n </div>\n </li>\n\n <li>\n <div class=\"form-check form-check-inline\">\n <label class=\"form-check-label\" for=\"option_bounded\">bounded to viewbox</label>\n <input type=\"checkbox\" class=\"form-check-input api-param-setting\"\n id=\"option_bounded\" checked={!!api_request_params.bounded} on:change={set_bounded}>\n </div>\n </li>\n\n <li>\n <div class=\"form-check form-check-inline\">\n <label class=\"form-check-label\" for=\"option_dedupe\">deduplicate results</label>\n <input type=\"checkbox\" class=\"form-check-input api-param-setting\"\n id=\"option_dedupe\" checked={api_request_params.dedupe === 0 ? 0 : 1} on:change={set_dedupe}>\n </div>\n </li>\n\n <li>\n <label for=\"option_limit\">Maximum number of results</label>\n <input type=\"number\" class=\"form-control form-control-sm d-inline w-auto api-param-setting\"\n data-api-param=\"limit\" id=\"option_limit\" min=\"1\" max=\"50\"\n value=\"{api_request_params.limit || ''}\"\n on:change={set_api_param}>\n </li>\n\n <li>\n <label for=\"option_polygon_threshold\">Polygon simplification</label>\n <input type=\"number\" class=\"form-control form-control-sm d-inline w-auto api-param-setting\"\n data-api-param=\"polygon_threshold\" id=\"option_polygon_threshold\" min=\"0.0\" max=\"1.0\" step=\"0.001\"\n value=\"{api_request_params.polygon_threshold || ''}\"\n on:change={set_api_param}>\n </li>\n\n <li>\n <label for=\"accept_lang\">Languages</label>\n <input type=\"text\" placeholder=\"e.g. en,zh-Hant\" class=\"form-control form-control-sm d-inline w-auto api-param-setting\"\n data-api-param=\"accept-language\" id=\"accept_lang\" size=\"15\"\n value=\"{api_request_params['accept-language'] || ''}\"\n on:change={set_api_param}>\n </li>\n\n <li>\n <label for=\"option_ccode\">Country Codes</label>\n <input type=\"text\" placeholder=\"e.g. de,gb\" class=\"form-control form-control-sm d-inline w-auto api-param-setting\"\n data-api-param=\"countrycodes\" id=\"option_ccode\" size=\"15\"\n value=\"{api_request_params.countrycodes || ''}\"\n pattern=\"^[a-zA-Z]{'{2}'}(,[a-zA-Z]{'{2}'})*$\"\n on:change={set_api_param}>\n </li>\n </ul>\n</details>\n\n<style>\n .nav-tabs {\n font-size: 0.8em;\n margin-top: -1em;\n }\n\n .nav-link {\n padding: 0.1rem 1rem;\n }\n\n #q {\n width: 500px;\n max-width: 100%;\n }\n\n #searchAdvancedOptions ul {\n list-style-type: none;\n padding: 0;\n font-size: 0.85rem;\n }\n\n #searchAdvancedOptions li {\n display: inline-block;\n padding: 4px 10px;\n border-radius: 5px;\n border: 1px dotted #ccc;\n margin-right: 1em;\n }\n\n #searchAdvancedOptions label {\n margin-right: 0.5em;\n }\n\n</style>\n","/*!\n * escape-html\n * Copyright(c) 2012-2013 TJ Holowaychuk\n * Copyright(c) 2015 Andreas Lubbe\n * Copyright(c) 2015 Tiancheng \"Timothy\" Gu\n * MIT Licensed\n */\n\n'use strict';\n\n/**\n * Module variables.\n * @private\n */\n\nvar matchHtmlRegExp = /[\"'&<>]/;\n\n/**\n * Module exports.\n * @public\n */\n\nmodule.exports = escapeHtml;\n\n/**\n * Escape special characters in the given string of html.\n *\n * @param {string} string The string to escape for inserting into HTML\n * @return {string}\n * @public\n */\n\nfunction escapeHtml(string) {\n var str = '' + string;\n var match = matchHtmlRegExp.exec(str);\n\n if (!match) {\n return str;\n }\n\n var escape;\n var html = '';\n var index = 0;\n var lastIndex = 0;\n\n for (index = match.index; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34: // \"\n escape = '"';\n break;\n case 38: // &\n escape = '&';\n break;\n case 39: // '\n escape = ''';\n break;\n case 60: // <\n escape = '<';\n break;\n case 62: // >\n escape = '>';\n break;\n default:\n continue;\n }\n\n if (lastIndex !== index) {\n html += str.substring(lastIndex, index);\n }\n\n lastIndex = index + 1;\n html += escape;\n }\n\n return lastIndex !== index\n ? html + str.substring(lastIndex, index)\n : html;\n}\n","module.exports.formatOSMType = formatOSMType;\nmodule.exports.osmLink = osmLink;\nmodule.exports.formatLabel = formatLabel;\nmodule.exports.wikipediaLink = wikipediaLink;\nmodule.exports.coverageType = coverageType;\nmodule.exports.isAdminBoundary = isAdminBoundary;\nmodule.exports.formatAddressRank = formatAddressRank;\nmodule.exports.formatPlaceType = formatPlaceType;\nmodule.exports.formatAdminLevel = formatAdminLevel;\nmodule.exports.formatDistance = formatDistance;\nmodule.exports.formatKeywordToken = formatKeywordToken;\nmodule.exports.zoomLevels = zoomLevels;\n\nconst escapeHtml = require('escape-html');\n\nfunction formatOSMType(sType, bExcludeExternal) {\n if (sType === 'N') return 'node';\n if (sType === 'W') return 'way';\n if (sType === 'R') return 'relation';\n\n if (!bExcludeExternal) return '';\n\n if (sType === 'T') return 'way';\n if (sType === 'I') return 'way';\n\n return '';\n}\n\nfunction osmLink(aPlace) {\n if (!aPlace.osm_type) return '';\n var sOSMType = formatOSMType(aPlace.osm_type, false);\n if (!sOSMType) return '';\n\n return '<a href=\"https://www.openstreetmap.org/' + sOSMType + '/' + aPlace.osm_id + '\">' + sOSMType + ' ' + aPlace.osm_id + '</a>';\n}\n\nfunction formatLabel(aPlace) {\n if (aPlace.label) return aPlace.label;\n\n function capitalize(s) {\n return s && s[0].toUpperCase() + s.slice(1);\n }\n\n if (aPlace.type && aPlace.type === 'yes' && aPlace.class) {\n return capitalize(aPlace.class.replace(/_/g, ' '));\n }\n if (aPlace.type) {\n return capitalize(aPlace.type.replace(/_/g, ' '));\n }\n return '';\n}\n\n/* en:London_Borough_of_Redbridge => https://en.wikipedia.org/wiki/London_Borough_of_Redbridge */\nfunction wikipediaLink(aPlace) {\n if (!aPlace.calculated_wikipedia) return '';\n\n var parts = aPlace.calculated_wikipedia.split(':', 2);\n\n var sTitle = escapeHtml(aPlace.calculated_wikipedia);\n var sLanguage = escapeHtml(parts[0]);\n var sArticle = escapeHtml(parts[1]);\n\n return '<a href=\"https://' + sLanguage + '.wikipedia.org/wiki/' + sArticle + '\" target=\"_blank\">' + sTitle + '</a>';\n}\n\nfunction coverageType(aPlace) {\n return (aPlace.isarea ? 'Polygon' : 'Point');\n}\n\nfunction isAdminBoundary(aPlace) {\n return aPlace.category === 'boundary' && aPlace.type === 'administrative';\n}\n\nfunction formatAddressRank(iRank) {\n if (iRank < 4) return 'other';\n if (iRank < 6) return 'country';\n if (iRank < 8) return 'region';\n if (iRank < 10) return 'state';\n if (iRank < 12) return 'state district';\n if (iRank < 14) return 'county';\n if (iRank < 16) return 'municipality';\n if (iRank < 18) return 'city / town / village';\n if (iRank < 20) return 'city / village district';\n if (iRank < 22) return 'suburb / hamlet';\n if (iRank < 24) return 'neighbourhood';\n if (iRank < 26) return 'city block / square';\n if (iRank === 26) return 'major street';\n if (iRank === 27) return 'minory street / path';\n if (iRank <= 30) return 'house / building';\n return 'other';\n}\n\nfunction formatPlaceType(aPlace) {\n var sOut = aPlace.class + ':' + aPlace.type;\n if (aPlace.type && aPlace.type === 'administrative' && aPlace.place_type) {\n sOut = sOut + ' (' + aPlace.place_type + ')';\n }\n return escapeHtml(sOut);\n}\n\n// Any over 15 are invalid data in OSM anyway\nfunction formatAdminLevel(iLevel) {\n return (iLevel && iLevel < 15 ? iLevel : '');\n}\n\nfunction formatDistance(fDistance, bInMeters) {\n if (bInMeters) {\n if (fDistance < 1) return '0';\n var sFormatted = (fDistance >= 1000)\n ? Math.round(fDistance / 1000, 1) + ' km'\n : Math.round(fDistance, 0) + ' m';\n\n return '<abbr class=\"distance\" title=\"' + fDistance + ' meters\">~' + sFormatted + '</abbr>';\n }\n\n // spheric distance, http://postgis.net/docs/ST_Distance_Spheroid.html\n if (fDistance === 0) return '0';\n\n return '<abbr class=\"distance\" title=\"spheric distance ' + fDistance + '\">~'\n + (Math.round(fDistance * 1000, 4) / 1000)\n + '</abbr>';\n}\n\n// mark partial tokens (those starting with a space) with a star for readability\nfunction formatKeywordToken(sToken) {\n return (sToken[0] === ' ' ? '*' : '') + escapeHtml(sToken);\n}\n\nfunction zoomLevels() {\n const aZoomLevels = [\n /* 0 */ 'Continent / Sea',\n /* 1 */ '',\n /* 2 */ '',\n /* 3 */ 'Country',\n /* 4 */ '',\n /* 5 */ 'State',\n /* 6 */ 'Region',\n /* 7 */ '',\n /* 8 */ 'County',\n /* 9 */ '',\n /* 10 */ 'City',\n /* 11 */ '',\n /* 12 */ 'Town / Village',\n /* 13 */ '',\n /* 14 */ 'Suburb',\n /* 15 */ '',\n /* 16 */ 'Street',\n /* 17 */ '',\n /* 18 */ 'Building',\n /* 19 */ '',\n /* 20 */ '',\n /* 21 */ ''\n ];\n return aZoomLevels;\n}\n","<script>\n import { refresh_page } from '../lib/stores.js';\n\n export let extra_classes = '';\n export let feature = null;\n\n let url_params = new URLSearchParams();\n let href = 'details.html';\n\n function formatShortOSMType(sType) {\n if (sType === 'node') return 'N';\n if (sType === 'way') return 'W';\n if (sType === 'relation') return 'R';\n return '';\n }\n\n function handleClick() {\n refresh_page('details', url_params);\n }\n\n $: {\n let new_params = new URLSearchParams();\n\n if (feature !== null) {\n if (feature.osm_type) {\n if (feature.osm_type.length === 1) {\n new_params.set('osmtype', feature.osm_type);\n } else {\n new_params.set('osmtype', formatShortOSMType(feature.osm_type));\n }\n\n new_params.set('osmid', feature.osm_id);\n\n if (feature.class) {\n new_params.set('class', feature.class);\n } else if (feature.category) {\n new_params.set('class', feature.category);\n }\n } else if (feature.place_id) {\n new_params.set('place_id', feature.place_id);\n }\n }\n url_params = new_params;\n }\n\n $: {\n let param_str = url_params.toString();\n href = 'details.html' + (param_str ? '?' : '') + param_str;\n }\n</script>\n\n<a on:click|preventDefault|stopPropagation={handleClick} href={href} class={extra_classes}><slot></slot></a>\n","<script>\n import { onMount } from 'svelte';\n import { fetch_content_into_element } from '../lib/api_utils.js';\n\n onMount(() => {\n fetch_content_into_element('theme/welcome.html', document.getElementById('welcome'));\n });\n</script>\n\n<div id=\"welcome\"></div>\n","<script>\n\n export let aPlace;\n\n $: sIcon = getIcon(aPlace.category, aPlace.type);\n $: title = 'icon for ' + aPlace.category + ' ' + aPlace.type;\n $: url = Nominatim_Config.Images_Base_Url + sIcon + '.p.20.png';\n\n function getIcon(category, type) {\n // equivalent to PHP Nominatim::ClassTypes::getIcon\n // covers 83 of 214 available icon filenames, e.g. transport_roundabout_anticlockwise\n // transport_rental_bicycle or place_of_worship_christian would need more data from\n // the place.\n var aIcons = {\n 'boundary:administrative': 'poi_boundary_administrative',\n 'place:city': 'poi_place_city',\n 'place:town': 'poi_place_town',\n 'place:village': 'poi_place_village',\n 'place:hamlet': 'poi_place_village',\n 'place:suburb': 'poi_place_village',\n 'place:locality': 'poi_place_village',\n 'place:airport': 'transport_airport2',\n 'aeroway:aerodrome': 'transport_airport2',\n 'railway:station': 'transport_train_station2',\n 'amenity:place_of_worship': 'place_of_worship_unknown3',\n 'amenity:pub': 'food_pub',\n 'amenity:bar': 'food_bar',\n 'amenity:university': 'education_university',\n 'tourism:museum': 'tourist_museum',\n 'amenity:arts_centre': 'tourist_art_gallery2',\n 'tourism:zoo': 'tourist_zoo',\n 'tourism:theme_park': 'poi_point_of_interest',\n 'tourism:attraction': 'poi_point_of_interest',\n 'leisure:golf_course': 'sport_golf',\n 'historic:castle': 'tourist_castle',\n 'amenity:hospital': 'health_hospital',\n 'amenity:school': 'education_school',\n 'amenity:theatre': 'tourist_theatre',\n 'amenity:library': 'amenity_library',\n 'amenity:fire_station': 'amenity_firestation3',\n 'amenity:police': 'amenity_police2',\n 'amenity:bank': 'money_bank2',\n 'amenity:post_office': 'amenity_post_office',\n 'tourism:hotel': 'accommodation_hotel2',\n 'amenity:cinema': 'tourist_cinema',\n 'tourism:artwork': 'tourist_art_gallery2',\n 'historic:archaeological_site': 'tourist_archaeological2',\n 'amenity:doctors': 'health_doctors',\n 'leisure:sports_centre': 'sport_leisure_centre',\n 'leisure:swimming_pool': 'sport_swimming_outdoor',\n 'shop:supermarket': 'shopping_supermarket',\n 'shop:convenience': 'shopping_convenience',\n 'amenity:restaurant': 'food_restaurant',\n 'amenity:fast_food': 'food_fastfood',\n 'amenity:cafe': 'food_cafe',\n 'tourism:guest_house': 'accommodation_bed_and_breakfast',\n 'amenity:pharmacy': 'health_pharmacy_dispensing',\n 'amenity:fuel': 'transport_fuel',\n 'natural:peak': 'poi_peak',\n 'natural:wood': 'landuse_coniferous_and_deciduous',\n 'shop:bicycle': 'shopping_bicycle',\n 'shop:clothes': 'shopping_clothes',\n 'shop:hairdresser': 'shopping_hairdresser',\n 'shop:doityourself': 'shopping_diy',\n 'shop:estate_agent': 'shopping_estateagent2',\n 'shop:car': 'shopping_car',\n 'shop:garden_centre': 'shopping_garden_centre',\n 'shop:car_repair': 'shopping_car_repair',\n 'shop:bakery': 'shopping_bakery',\n 'shop:butcher': 'shopping_butcher',\n 'shop:apparel': 'shopping_clothes',\n 'shop:laundry': 'shopping_laundrette',\n 'shop:beverages': 'shopping_alcohol',\n 'shop:alcohol': 'shopping_alcohol',\n 'shop:optician': 'health_opticians',\n 'shop:chemist': 'health_pharmacy',\n 'shop:gallery': 'tourist_art_gallery2',\n 'shop:jewelry': 'shopping_jewelry',\n 'tourism:information': 'amenity_information',\n 'historic:ruins': 'tourist_ruin',\n 'amenity:college': 'education_school',\n 'historic:monument': 'tourist_monument',\n 'historic:memorial': 'tourist_monument',\n 'historic:mine': 'poi_mine',\n 'tourism:caravan_site': 'accommodation_caravan_park',\n 'amenity:bus_station': 'transport_bus_station',\n 'amenity:atm': 'money_atm2',\n 'tourism:viewpoint': 'tourist_view_point',\n 'tourism:guesthouse': 'accommodation_bed_and_breakfast',\n 'railway:tram': 'transport_tram_stop',\n 'amenity:courthouse': 'amenity_court',\n 'amenity:recycling': 'amenity_recycling',\n 'amenity:dentist': 'health_dentist',\n 'natural:beach': 'tourist_beach',\n 'railway:tram_stop': 'transport_tram_stop',\n 'amenity:prison': 'amenity_prison',\n 'highway:bus_stop': 'transport_bus_stop2'\n };\n\n return aIcons[category + ':' + type];\n }\n\n</script>\n\n{#if sIcon}\n <img class=\"mapicon\" src={url} alt={title} />\n{/if}\n\n<style>\n .mapicon {\n margin: 10px 0;\n }\n</style>\n","<script>\n import { results_store } from '../lib/stores.js';\n import { formatLabel } from '../lib/helpers.js';\n\n import DetailsLink from './DetailsLink.svelte';\n import Welcome from './Welcome.svelte';\n import MapIcon from './MapIcon.svelte';\n\n export let reverse_search = false;\n export let current_result = null;\n\n let aSearchResults;\n let iHighlightNum;\n let sMoreURL;\n\n results_store.subscribe(data => {\n if (!data) { return; }\n aSearchResults = data;\n iHighlightNum = 0;\n current_result = aSearchResults[0];\n\n\n let search_params = new URLSearchParams(window.location.search);\n\n let aResults = data;\n // lonvia wrote: https://github.com/osm-search/nominatim-ui/issues/24\n // I would suggest to remove the guessing and always show the link. Nominatim only returns\n // one or two results when it believes the result to be a good enough match.\n // if (aResults.length >= 10) {\n var aExcludePlaceIds = [];\n if (search_params.has('exclude_place_ids')) {\n aExcludePlaceIds = search_params.get('exclude_place_ids').split(',');\n }\n for (var i = 0; i < aResults.length; i += 1) {\n aExcludePlaceIds.push(aResults[i].place_id);\n }\n var parsed_url = new URLSearchParams(window.location.search);\n parsed_url.set('exclude_place_ids', aExcludePlaceIds.join(','));\n sMoreURL = '?' + parsed_url.toString();\n });\n\n function handleClick(e) {\n let result_el = e.target;\n if (!result_el.className.match('result')) {\n result_el = result_el.parentElement;\n }\n let pos = Number(result_el.dataset.position);\n\n current_result = aSearchResults[pos];\n iHighlightNum = pos;\n }\n\n</script>\n\n{#if aSearchResults && aSearchResults.length > 0}\n <div id=\"searchresults\">\n\n {#each aSearchResults as aResult, iResNum}\n <div class=\"result\" class:highlight={iResNum === iHighlightNum} data-position=\"{iResNum}\" on:click|stopPropagation={handleClick}>\n <div style=\"float:right\">\n <MapIcon aPlace={aResult} />\n </div>\n <span class=\"name\">{aResult.display_name}</span>\n <span class=\"type\">{formatLabel(aResult)}</span>\n <p class=\"coords\">{aResult.lat},{aResult.lon}</p>\n\n <DetailsLink extra_classes=\"btn btn-outline-secondary btn-sm\" feature={aResult}>details</DetailsLink>\n </div>\n {/each}\n\n {#if sMoreURL && !reverse_search}\n <div class=\"more\">\n <a class=\"btn btn-primary\" href=\"{sMoreURL}\">\n Search for more results\n </a>\n </div>\n {/if}\n </div>\n{:else if aSearchResults}\n {#if reverse_search}\n <div id=\"intro\" class=\"sidebar\">Search for coordinates or click anywhere on the map.</div>\n {:else}\n <div class=\"noresults\">No search results found</div>\n {/if}\n{:else}\n <Welcome/>\n{/if}\n\n<style>\n .result {\n font-size: 0.8em;\n margin: 5px;\n margin-top:0px;\n padding: 4px 8px;\n border-radius: 2px;\n background:#F0F7FF;\n border: 2px solid #D7E7FF;\n cursor:pointer;\n min-height: 5em;\n }\n\n .result.highlight {\n background-color: #D9E7F7;\n border-color: #9DB9E4;\n }\n .result.highlight :global(a) {\n margin: 10px auto;\n display: block;\n max-width: 10em;\n padding: 1px;\n background-color: white;\n }\n .result .type{\n color: gray;\n font-size: 0.8em;\n }\n .result :global(a) {\n display: none;\n }\n\n .result .coords {\n display: none; \n }\n\n .noresults{\n text-align: center;\n padding: 1em;\n }\n\n .more{\n text-align:center;\n margin-top: 1em;\n }\n\n .result.highlight :global(a):hover {\n color: #111;\n }\n</style>\n","/* @preserve\n * Leaflet 1.9.1, a JS library for interactive maps. https://leafletjs.com\n * (c) 2010-2022 Vladimir Agafonkin, (c) 2010-2011 CloudMade\n */\n\nvar version = \"1.9.1\";\n\n/*\r\n * @namespace Util\r\n *\r\n * Various utility functions, used by Leaflet internally.\r\n */\r\n\r\n// @function extend(dest: Object, src?: Object): Object\r\n// Merges the properties of the `src` object (or multiple objects) into `dest` object and returns the latter. Has an `L.extend` shortcut.\r\nfunction extend(dest) {\r\n\tvar i, j, len, src;\r\n\r\n\tfor (j = 1, len = arguments.length; j < len; j++) {\r\n\t\tsrc = arguments[j];\r\n\t\tfor (i in src) {\r\n\t\t\tdest[i] = src[i];\r\n\t\t}\r\n\t}\r\n\treturn dest;\r\n}\r\n\r\n// @function create(proto: Object, properties?: Object): Object\r\n// Compatibility polyfill for [Object.create](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/create)\r\nvar create$2 = Object.create || (function () {\r\n\tfunction F() {}\r\n\treturn function (proto) {\r\n\t\tF.prototype = proto;\r\n\t\treturn new F();\r\n\t};\r\n})();\r\n\r\n// @function bind(fn: Function, …): Function\r\n// Returns a new function bound to the arguments passed, like [Function.prototype.bind](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/bind).\r\n// Has a `L.bind()` shortcut.\r\nfunction bind(fn, obj) {\r\n\tvar slice = Array.prototype.slice;\r\n\r\n\tif (fn.bind) {\r\n\t\treturn fn.bind.apply(fn, slice.call(arguments, 1));\r\n\t}\r\n\r\n\tvar args = slice.call(arguments, 2);\r\n\r\n\treturn function () {\r\n\t\treturn fn.apply(obj, args.length ? args.concat(slice.call(arguments)) : arguments);\r\n\t};\r\n}\r\n\r\n// @property lastId: Number\r\n// Last unique ID used by [`stamp()`](#util-stamp)\r\nvar 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\n// Has an `L.throttle` shortcut.\r\nfunction throttle(fn, time, context) {\r\n\tvar lock, args, wrapperFn, later;\r\n\r\n\tlater = function () {\r\n\t\t// reset lock and call if queued\r\n\t\tlock = false;\r\n\t\tif (args) {\r\n\t\t\twrapperFn.apply(context, args);\r\n\t\t\targs = false;\r\n\t\t}\r\n\t};\r\n\r\n\twrapperFn = function () {\r\n\t\tif (lock) {\r\n\t\t\t// called too soon, queue to call later\r\n\t\t\targs = arguments;\r\n\r\n\t\t} else {\r\n\t\t\t// call and lock until later\r\n\t\t\tfn.apply(context, arguments);\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\tvar max = range[1],\r\n\t min = range[0],\r\n\t d = 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\tvar pow = Math.pow(10, precision === undefined ? 6 : precision);\r\n\treturn Math.round(num * pow) / pow;\r\n}\r\n\r\n// @function trim(str: String): String\r\n// Compatibility polyfill for [String.prototype.trim](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim)\r\nfunction trim(str) {\r\n\treturn str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g, '');\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 trim(str).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`. Has an `L.setOptions` shortcut.\r\nfunction setOptions(obj, options) {\r\n\tif (!Object.prototype.hasOwnProperty.call(obj, 'options')) {\r\n\t\tobj.options = obj.options ? create$2(obj.options) : {};\r\n\t}\r\n\tfor (var i in options) {\r\n\t\tobj.options[i] = options[i];\r\n\t}\r\n\treturn obj.options;\r\n}\r\n\r\n// @function getParamString(obj: Object, existingUrl?: String, uppercase?: Boolean): String\r\n// Converts an object into a parameter URL string, e.g. `{a: \"foo\", b: \"bar\"}`\r\n// translates to `'?a=foo&b=bar'`. If `existingUrl` is set, the parameters will\r\n// be appended at the end. If `uppercase` is `true`, the parameter names will\r\n// be uppercased (e.g. `'?A=foo&B=bar'`)\r\nfunction getParamString(obj, existingUrl, uppercase) {\r\n\tvar params = [];\r\n\tfor (var i in obj) {\r\n\t\tparams.push(encodeURIComponent(uppercase ? i.toUpperCase() : i) + '=' + encodeURIComponent(obj[i]));\r\n\t}\r\n\treturn ((!existingUrl || existingUrl.indexOf('?') === -1) ? '?' : '&') + params.join('&');\r\n}\r\n\r\nvar 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, function (str, key) {\r\n\t\tvar 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// @function isArray(obj): Boolean\r\n// Compatibility polyfill for [Array.isArray](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray)\r\nvar isArray = Array.isArray || function (obj) {\r\n\treturn (Object.prototype.toString.call(obj) === '[object Array]');\r\n};\r\n\r\n// @function indexOf(array: Array, el: Object): Number\r\n// Compatibility polyfill for [Array.prototype.indexOf](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf)\r\nfunction indexOf(array, el) {\r\n\tfor (var i = 0; i < array.length; i++) {\r\n\t\tif (array[i] === el) { return i; }\r\n\t}\r\n\treturn -1;\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\nvar emptyImageUrl = 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=';\r\n\r\n// inspired by https://paulirish.com/2011/requestanimationframe-for-smart-animating/\r\n\r\nfunction getPrefixed(name) {\r\n\treturn window['webkit' + name] || window['moz' + name] || window['ms' + name];\r\n}\r\n\r\nvar lastTime = 0;\r\n\r\n// fallback for IE 7-8\r\nfunction timeoutDefer(fn) {\r\n\tvar time = +new Date(),\r\n\t timeToCall = Math.max(0, 16 - (time - lastTime));\r\n\r\n\tlastTime = time + timeToCall;\r\n\treturn window.setTimeout(fn, timeToCall);\r\n}\r\n\r\nvar requestFn = window.requestAnimationFrame || getPrefixed('RequestAnimationFrame') || timeoutDefer;\r\nvar cancelFn = window.cancelAnimationFrame || getPrefixed('CancelAnimationFrame') ||\r\n\t\tgetPrefixed('CancelRequestAnimationFrame') || function (id) { window.clearTimeout(id); };\r\n\r\n// @function requestAnimFrame(fn: Function, context?: Object, immediate?: Boolean): Number\r\n// Schedules `fn` to be executed when the browser repaints. `fn` is bound to\r\n// `context` if given. When `immediate` is set, `fn` is called immediately if\r\n// the browser doesn't have native support for\r\n// [`window.requestAnimationFrame`](https://developer.mozilla.org/docs/Web/API/window/requestAnimationFrame),\r\n// otherwise it's delayed. Returns a request ID that can be used to cancel the request.\r\nfunction requestAnimFrame(fn, context, immediate) {\r\n\tif (immediate && requestFn === timeoutDefer) {\r\n\t\tfn.call(context);\r\n\t} else {\r\n\t\treturn requestFn.call(window, bind(fn, context));\r\n\t}\r\n}\r\n\r\n// @function cancelAnimFrame(id: Number): undefined\r\n// Cancels a previous `requestAnimFrame`. See also [window.cancelAnimationFrame](https://developer.mozilla.org/docs/Web/API/window/cancelAnimationFrame).\r\nfunction cancelAnimFrame(id) {\r\n\tif (id) {\r\n\t\tcancelFn.call(window, id);\r\n\t}\r\n}\n\nvar Util = {\n __proto__: null,\n extend: extend,\n create: create$2,\n bind: bind,\n get lastId () { return lastId; },\n stamp: stamp,\n throttle: throttle,\n wrapNum: wrapNum,\n falseFn: falseFn,\n formatNum: formatNum,\n trim: trim,\n splitWords: splitWords,\n setOptions: setOptions,\n getParamString: getParamString,\n template: template,\n isArray: isArray,\n indexOf: indexOf,\n emptyImageUrl: emptyImageUrl,\n requestFn: requestFn,\n cancelFn: cancelFn,\n requestAnimFrame: requestAnimFrame,\n cancelAnimFrame: cancelAnimFrame\n};\n\n// @class Class\r\n// @aka L.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\nfunction Class() {}\r\n\r\nClass.extend = function (props) {\r\n\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// Returns a Javascript function that is a class constructor (to be called with `new`).\r\n\tvar NewClass = function () {\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.apply(this, arguments);\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\tvar parentProto = NewClass.__super__ = this.prototype;\r\n\r\n\tvar proto = create$2(parentProto);\r\n\tproto.constructor = NewClass;\r\n\r\n\tNewClass.prototype = proto;\r\n\r\n\t// inherit parent's statics\r\n\tfor (var i in this) {\r\n\t\tif (Object.prototype.hasOwnProperty.call(this, i) && i !== 'prototype' && i !== '__super__') {\r\n\t\t\tNewClass[i] = this[i];\r\n\t\t}\r\n\t}\r\n\r\n\t// mix static properties into the class\r\n\tif (props.statics) {\r\n\t\textend(NewClass, props.statics);\r\n\t}\r\n\r\n\t// mix includes into the prototype\r\n\tif (props.includes) {\r\n\t\tcheckDeprecatedMixinEvents(props.includes);\r\n\t\textend.apply(null, [proto].concat(props.includes));\r\n\t}\r\n\r\n\t// mix given properties into the prototype\r\n\textend(proto, props);\r\n\tdelete proto.statics;\r\n\tdelete proto.includes;\r\n\r\n\t// merge options\r\n\tif (proto.options) {\r\n\t\tproto.options = parentProto.options ? create$2(parentProto.options) : {};\r\n\t\textend(proto.options, props.options);\r\n\t}\r\n\r\n\tproto._initHooks = [];\r\n\r\n\t// add method for calling all hooks\r\n\tproto.callInitHooks = function () {\r\n\r\n\t\tif (this._initHooksCalled) { return; }\r\n\r\n\t\tif (parentProto.callInitHooks) {\r\n\t\t\tparentProto.callInitHooks.call(this);\r\n\t\t}\r\n\r\n\t\tthis._initHooksCalled = true;\r\n\r\n\t\tfor (var i = 0, len = proto._initHooks.length; i < len; i++) {\r\n\t\t\tproto._initHooks[i].call(this);\r\n\t\t}\r\n\t};\r\n\r\n\treturn NewClass;\r\n};\r\n\r\n\r\n// @function include(properties: Object): this\r\n// [Includes a mixin](#class-includes) into the current class.\r\nClass.include = function (props) {\r\n\tvar parentOptions = this.prototype.options;\r\n\textend(this.prototype, props);\r\n\tif (props.options) {\r\n\t\tthis.prototype.options = parentOptions;\r\n\t\tthis.mergeOptions(props.options);\r\n\t}\r\n\treturn this;\r\n};\r\n\r\n// @function mergeOptions(options: Object): this\r\n// [Merges `options`](#class-options) into the defaults of the class.\r\nClass.mergeOptions = function (options) {\r\n\textend(this.prototype.options, options);\r\n\treturn this;\r\n};\r\n\r\n// @function addInitHook(fn: Function): this\r\n// Adds a [constructor hook](#class-constructor-hooks) to the class.\r\nClass.addInitHook = function (fn) { // (Function) || (String, args...)\r\n\tvar args = Array.prototype.slice.call(arguments, 1);\r\n\r\n\tvar init = typeof fn === 'function' ? fn : function () {\r\n\t\tthis[fn].apply(this, args);\r\n\t};\r\n\r\n\tthis.prototype._initHooks = this.prototype._initHooks || [];\r\n\tthis.prototype._initHooks.push(init);\r\n\treturn this;\r\n};\r\n\r\nfunction checkDeprecatedMixinEvents(includes) {\r\n\tif (typeof L === 'undefined' || !L || !L.Mixin) { return; }\r\n\r\n\tincludes = isArray(includes) ? includes : [includes];\r\n\r\n\tfor (var i = 0; i < includes.length; i++) {\r\n\t\tif (includes[i] === L.Mixin.Events) {\r\n\t\t\tconsole.warn('Deprecated include of L.Mixin.Events: ' +\r\n\t\t\t\t'this property will be removed in future releases, ' +\r\n\t\t\t\t'please inherit from L.Evented instead.', new Error().stack);\r\n\t\t}\r\n\t}\r\n}\n\n/*\r\n * @class Evented\r\n * @aka L.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\nvar Events = {\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, mousemove: onMouseMove}`\r\n\t */\r\n\ton: function (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 (var type in 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, types[type], 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\ttypes = splitWords(types);\r\n\r\n\t\t\tfor (var i = 0, len = types.length; i < len; i++) {\r\n\t\t\t\tthis._on(types[i], 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: function (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 (var type in types) {\r\n\t\t\t\tthis._off(type, types[type], fn);\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\ttypes = splitWords(types);\r\n\r\n\t\t\tvar removeAll = arguments.length === 1;\r\n\t\t\tfor (var i = 0, len = types.length; i < len; i++) {\r\n\t\t\t\tif (removeAll) {\r\n\t\t\t\t\tthis._off(types[i]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis._off(types[i], 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: function (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\tvar newListener = {fn: 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 = this._events || {};\r\n\t\tthis._events[type] = this._events[type] || [];\r\n\t\tthis._events[type].push(newListener);\r\n\t},\r\n\r\n\t_off: function (type, fn, context) {\r\n\t\tvar listeners,\r\n\t\t i,\r\n\t\t len;\r\n\r\n\t\tif (!this._events) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tlisteners = 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 (i = 0, len = listeners.length; i < len; i++) {\r\n\t\t\t\t\tlisteners[i].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\tvar index = this._listens(type, fn, context);\r\n\t\tif (index !== false) {\r\n\t\t\tvar 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: function (type, data, propagate) {\r\n\t\tif (!this.listens(type, propagate)) { return this; }\r\n\r\n\t\tvar event = extend({}, data, {\r\n\t\t\ttype: type,\r\n\t\t\ttarget: this,\r\n\t\t\tsourceTarget: data && data.sourceTarget || this\r\n\t\t});\r\n\r\n\t\tif (this._events) {\r\n\t\t\tvar 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 (var i = 0, len = listeners.length; i < len; i++) {\r\n\t\t\t\t\tvar l = listeners[i];\r\n\t\t\t\t\t// off overwrites l.fn, so we need to copy fn to a var\r\n\t\t\t\t\tvar 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: function (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\tvar _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\tvar listeners = this._events && this._events[type];\r\n\t\tif (listeners && listeners.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 (var id in this._eventParents) {\r\n\t\t\t\tif (this._eventParents[id].listens(type, fn, context, propagate)) { return true; }\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: function (type, fn, context) {\r\n\t\tif (!this._events) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tvar 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\tfor (var i = 0, len = listeners.length; i < len; i++) {\r\n\t\t\tif (listeners[i].fn === fn && listeners[i].ctx === context) {\r\n\t\t\t\treturn i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\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: function (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 (var type in 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, types[type], 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\ttypes = splitWords(types);\r\n\r\n\t\t\tfor (var i = 0, len = types.length; i < len; i++) {\r\n\t\t\t\tthis._on(types[i], 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: function (obj) {\r\n\t\tthis._eventParents = this._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: function (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: function (e) {\r\n\t\tfor (var id in this._eventParents) {\r\n\t\t\tthis._eventParents[id].fire(e.type, extend({\r\n\t\t\t\tlayer: e.target,\r\n\t\t\t\tpropagatedFrom: e.target\r\n\t\t\t}, e), true);\r\n\t\t}\r\n\t}\r\n};\r\n\r\n// aliases; we should ditch those eventually\r\n\r\n// @method addEventListener(…): this\r\n// Alias to [`on(…)`](#evented-on)\r\nEvents.addEventListener = Events.on;\r\n\r\n// @method removeEventListener(…): this\r\n// Alias to [`off(…)`](#evented-off)\r\n\r\n// @method clearAllEventListeners(…): this\r\n// Alias to [`off()`](#evented-off)\r\nEvents.removeEventListener = Events.clearAllEventListeners = Events.off;\r\n\r\n// @method addOneTimeEventListener(…): this\r\n// Alias to [`once(…)`](#evented-once)\r\nEvents.addOneTimeEventListener = Events.once;\r\n\r\n// @method fireEvent(…): this\r\n// Alias to [`fire(…)`](#evented-fire)\r\nEvents.fireEvent = Events.fire;\r\n\r\n// @method hasEventListeners(…): Boolean\r\n// Alias to [`listens(…)`](#evented-listens)\r\nEvents.hasEventListeners = Events.listens;\r\n\r\nvar Evented = Class.extend(Events);\n\n/*\r\n * @class Point\r\n * @aka L.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 * var point = L.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(L.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\nfunction Point(x, y, round) {\r\n\t// @property x: Number; The `x` coordinate of the point\r\n\tthis.x = (round ? Math.round(x) : x);\r\n\t// @property y: Number; The `y` coordinate of the point\r\n\tthis.y = (round ? Math.round(y) : y);\r\n}\r\n\r\nvar trunc = Math.trunc || function (v) {\r\n\treturn v > 0 ? Math.floor(v) : Math.ceil(v);\r\n};\r\n\r\nPoint.prototype = {\r\n\r\n\t// @method clone(): Point\r\n\t// Returns a copy of the current point.\r\n\tclone: function () {\r\n\t\treturn new Point(this.x, this.y);\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: function (point) {\r\n\t\t// non-destructive, returns a new point\r\n\t\treturn this.clone()._add(toPoint(point));\r\n\t},\r\n\r\n\t_add: function (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: function (point) {\r\n\t\treturn this.clone()._subtract(toPoint(point));\r\n\t},\r\n\r\n\t_subtract: function (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: function (num) {\r\n\t\treturn this.clone()._divideBy(num);\r\n\t},\r\n\r\n\t_divideBy: function (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: function (num) {\r\n\t\treturn this.clone()._multiplyBy(num);\r\n\t},\r\n\r\n\t_multiplyBy: function (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: function (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: function (point) {\r\n\t\treturn new Point(this.x / point.x, this.y / point.y);\r\n\t},\r\n\r\n\t// @method round(): Point\r\n\t// Returns a copy of the current point with rounded coordinates.\r\n\tround: function () {\r\n\t\treturn this.clone()._round();\r\n\t},\r\n\r\n\t_round: function () {\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: function () {\r\n\t\treturn this.clone()._floor();\r\n\t},\r\n\r\n\t_floor: function () {\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: function () {\r\n\t\treturn this.clone()._ceil();\r\n\t},\r\n\r\n\t_ceil: function () {\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// @method trunc(): Point\r\n\t// Returns a copy of the current point with truncated coordinates (rounded towards zero).\r\n\ttrunc: function () {\r\n\t\treturn this.clone()._trunc();\r\n\t},\r\n\r\n\t_trunc: function () {\r\n\t\tthis.x = trunc(this.x);\r\n\t\tthis.y = 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: function (point) {\r\n\t\tpoint = toPoint(point);\r\n\r\n\t\tvar x = point.x - this.x,\r\n\t\t y = 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: function (point) {\r\n\t\tpoint = toPoint(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: function (point) {\r\n\t\tpoint = toPoint(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: function () {\r\n\t\treturn 'Point(' +\r\n\t\t formatNum(this.x) + ', ' +\r\n\t\t formatNum(this.y) + ')';\r\n\t}\r\n};\r\n\r\n// @factory L.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// @factory L.point(coords: Number[])\r\n// Expects an array of the form `[x, y]` instead.\r\n\r\n// @alternative\r\n// @factory L.point(coords: Object)\r\n// Expects a plain object of the form `{x: Number, y: Number}` instead.\r\nfunction toPoint(x, y, round) {\r\n\tif (x instanceof Point) {\r\n\t\treturn x;\r\n\t}\r\n\tif (isArray(x)) {\r\n\t\treturn new Point(x[0], x[1]);\r\n\t}\r\n\tif (x === undefined || x === null) {\r\n\t\treturn x;\r\n\t}\r\n\tif (typeof x === 'object' && 'x' in x && 'y' in x) {\r\n\t\treturn new Point(x.x, x.y);\r\n\t}\r\n\treturn new Point(x, y, round);\r\n}\n\n/*\r\n * @class Bounds\r\n * @aka L.Bounds\r\n *\r\n * Represents a rectangular area in pixel coordinates.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var p1 = L.point(10, 10),\r\n * p2 = L.point(40, 60),\r\n * bounds = L.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\nfunction Bounds(a, b) {\r\n\tif (!a) { return; }\r\n\r\n\tvar points = b ? [a, b] : a;\r\n\r\n\tfor (var i = 0, len = points.length; i < len; i++) {\r\n\t\tthis.extend(points[i]);\r\n\t}\r\n}\r\n\r\nBounds.prototype = {\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: function (obj) {\r\n\t\tvar 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 = toPoint(obj);\r\n\t\t} else {\r\n\t\t\tobj = toBounds(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: function (round) {\r\n\t\treturn toPoint(\r\n\t\t (this.min.x + this.max.x) / 2,\r\n\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: function () {\r\n\t\treturn toPoint(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: function () { // -> Point\r\n\t\treturn toPoint(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: function () {\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: function () {\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: function () {\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: function (obj) {\r\n\t\tvar min, max;\r\n\r\n\t\tif (typeof obj[0] === 'number' || obj instanceof Point) {\r\n\t\t\tobj = toPoint(obj);\r\n\t\t} else {\r\n\t\t\tobj = toBounds(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: function (bounds) { // (Bounds) -> Boolean\r\n\t\tbounds = toBounds(bounds);\r\n\r\n\t\tvar min = this.min,\r\n\t\t max = this.max,\r\n\t\t min2 = bounds.min,\r\n\t\t max2 = bounds.max,\r\n\t\t xIntersects = (max2.x >= min.x) && (min2.x <= max.x),\r\n\t\t yIntersects = (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: function (bounds) { // (Bounds) -> Boolean\r\n\t\tbounds = toBounds(bounds);\r\n\r\n\t\tvar min = this.min,\r\n\t\t max = this.max,\r\n\t\t min2 = bounds.min,\r\n\t\t max2 = bounds.max,\r\n\t\t xOverlaps = (max2.x > min.x) && (min2.x < max.x),\r\n\t\t yOverlaps = (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: function () {\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: function (bufferRatio) {\r\n\t\tvar 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 toBounds(\r\n\t\t\ttoPoint(min.x - heightBuffer, min.y - widthBuffer),\r\n\t\t\ttoPoint(max.x + heightBuffer, max.y + widthBuffer));\r\n\t},\r\n\r\n\r\n\t// @method equals(otherBounds: Bounds, 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: function (bounds) {\r\n\t\tif (!bounds) { return false; }\r\n\r\n\t\tbounds = toBounds(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};\r\n\r\n\r\n// @factory L.bounds(corner1: Point, corner2: Point)\r\n// Creates a Bounds object from two corners coordinate pairs.\r\n// @alternative\r\n// @factory L.bounds(points: Point[])\r\n// Creates a Bounds object from the given array of points.\r\nfunction toBounds(a, b) {\r\n\tif (!a || a instanceof Bounds) {\r\n\t\treturn a;\r\n\t}\r\n\treturn new Bounds(a, b);\r\n}\n\n/*\r\n * @class LatLngBounds\r\n * @aka L.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 * var corner1 = L.latLng(40.712, -74.227),\r\n * corner2 = L.latLng(40.774, -74.125),\r\n * bounds = L.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\nfunction LatLngBounds(corner1, corner2) { // (LatLng, LatLng) or (LatLng[])\r\n\tif (!corner1) { return; }\r\n\r\n\tvar latlngs = corner2 ? [corner1, corner2] : corner1;\r\n\r\n\tfor (var i = 0, len = latlngs.length; i < len; i++) {\r\n\t\tthis.extend(latlngs[i]);\r\n\t}\r\n}\r\n\r\nLatLngBounds.prototype = {\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: function (obj) {\r\n\t\tvar sw = this._southWest,\r\n\t\t ne = this._northEast,\r\n\t\t 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\treturn obj ? this.extend(toLatLng(obj) || toLatLngBounds(obj)) : this;\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: function (bufferRatio) {\r\n\t\tvar sw = this._southWest,\r\n\t\t ne = this._northEast,\r\n\t\t heightBuffer = Math.abs(sw.lat - ne.lat) * bufferRatio,\r\n\t\t widthBuffer = Math.abs(sw.lng - ne.lng) * bufferRatio;\r\n\r\n\t\treturn new LatLngBounds(\r\n\t\t new LatLng(sw.lat - heightBuffer, sw.lng - widthBuffer),\r\n\t\t new 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: function () {\r\n\t\treturn new LatLng(\r\n\t\t (this._southWest.lat + this._northEast.lat) / 2,\r\n\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: function () {\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: function () {\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: function () {\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: function () {\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: function () {\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: function () {\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: function () {\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: function () {\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: function (obj) { // (LatLngBounds) or (LatLng) -> Boolean\r\n\t\tif (typeof obj[0] === 'number' || obj instanceof LatLng || 'lat' in obj) {\r\n\t\t\tobj = toLatLng(obj);\r\n\t\t} else {\r\n\t\t\tobj = toLatLngBounds(obj);\r\n\t\t}\r\n\r\n\t\tvar sw = this._southWest,\r\n\t\t ne = this._northEast,\r\n\t\t 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: function (bounds) {\r\n\t\tbounds = toLatLngBounds(bounds);\r\n\r\n\t\tvar sw = this._southWest,\r\n\t\t ne = this._northEast,\r\n\t\t sw2 = bounds.getSouthWest(),\r\n\t\t ne2 = bounds.getNorthEast(),\r\n\r\n\t\t latIntersects = (ne2.lat >= sw.lat) && (sw2.lat <= ne.lat),\r\n\t\t lngIntersects = (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: function (bounds) {\r\n\t\tbounds = toLatLngBounds(bounds);\r\n\r\n\t\tvar sw = this._southWest,\r\n\t\t ne = this._northEast,\r\n\t\t sw2 = bounds.getSouthWest(),\r\n\t\t ne2 = bounds.getNorthEast(),\r\n\r\n\t\t latOverlaps = (ne2.lat > sw.lat) && (sw2.lat < ne.lat),\r\n\t\t lngOverlaps = (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: function () {\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: function (bounds, maxMargin) {\r\n\t\tif (!bounds) { return false; }\r\n\r\n\t\tbounds = toLatLngBounds(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: function () {\r\n\t\treturn !!(this._southWest && this._northEast);\r\n\t}\r\n};\r\n\r\n// TODO International date line?\r\n\r\n// @factory L.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// @factory L.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\nfunction toLatLngBounds(a, b) {\r\n\tif (a instanceof LatLngBounds) {\r\n\t\treturn a;\r\n\t}\r\n\treturn new LatLngBounds(a, b);\r\n}\n\n/* @class LatLng\r\n * @aka L.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 * var latlng = L.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({lon: 30, lat: 50});\r\n * map.panTo({lat: 50, lng: 30});\r\n * map.panTo(L.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\nfunction LatLng(lat, lng, alt) {\r\n\tif (isNaN(lat) || isNaN(lng)) {\r\n\t\tthrow new Error('Invalid LatLng object: (' + lat + ', ' + lng + ')');\r\n\t}\r\n\r\n\t// @property lat: Number\r\n\t// Latitude in degrees\r\n\tthis.lat = +lat;\r\n\r\n\t// @property lng: Number\r\n\t// Longitude in degrees\r\n\tthis.lng = +lng;\r\n\r\n\t// @property alt: Number\r\n\t// Altitude in meters (optional)\r\n\tif (alt !== undefined) {\r\n\t\tthis.alt = +alt;\r\n\t}\r\n}\r\n\r\nLatLng.prototype = {\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: function (obj, maxMargin) {\r\n\t\tif (!obj) { return false; }\r\n\r\n\t\tobj = toLatLng(obj);\r\n\r\n\t\tvar margin = Math.max(\r\n\t\t Math.abs(this.lat - obj.lat),\r\n\t\t Math.abs(this.lng - obj.lng));\r\n\r\n\t\treturn margin <= (maxMargin === undefined ? 1.0E-9 : maxMargin);\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: function (precision) {\r\n\t\treturn 'LatLng(' +\r\n\t\t formatNum(this.lat, precision) + ', ' +\r\n\t\t 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 [Spherical Law of Cosines](https://en.wikipedia.org/wiki/Spherical_law_of_cosines).\r\n\tdistanceTo: function (other) {\r\n\t\treturn Earth.distance(this, toLatLng(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: function () {\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: function (sizeInMeters) {\r\n\t\tvar latAccuracy = 180 * sizeInMeters / 40075017,\r\n\t\t lngAccuracy = latAccuracy / Math.cos((Math.PI / 180) * this.lat);\r\n\r\n\t\treturn toLatLngBounds(\r\n\t\t [this.lat - latAccuracy, this.lng - lngAccuracy],\r\n\t\t [this.lat + latAccuracy, this.lng + lngAccuracy]);\r\n\t},\r\n\r\n\tclone: function () {\r\n\t\treturn new LatLng(this.lat, this.lng, this.alt);\r\n\t}\r\n};\r\n\r\n\r\n\r\n// @factory L.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// @factory L.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// @factory L.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\r\nfunction toLatLng(a, b, c) {\r\n\tif (a instanceof LatLng) {\r\n\t\treturn a;\r\n\t}\r\n\tif (isArray(a) && typeof a[0] !== 'object') {\r\n\t\tif (a.length === 3) {\r\n\t\t\treturn new LatLng(a[0], a[1], a[2]);\r\n\t\t}\r\n\t\tif (a.length === 2) {\r\n\t\t\treturn new LatLng(a[0], a[1]);\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\tif (a === undefined || a === null) {\r\n\t\treturn a;\r\n\t}\r\n\tif (typeof a === 'object' && 'lat' in a) {\r\n\t\treturn new LatLng(a.lat, 'lng' in a ? a.lng : a.lon, a.alt);\r\n\t}\r\n\tif (b === undefined) {\r\n\t\treturn null;\r\n\t}\r\n\treturn new LatLng(a, b, c);\r\n}\n\n/*\r\n * @namespace CRS\r\n * @crs L.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\nvar CRS = {\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\tlatLngToPoint: function (latlng, zoom) {\r\n\t\tvar projectedPoint = this.projection.project(latlng),\r\n\t\t scale = 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\tpointToLatLng: function (point, zoom) {\r\n\t\tvar scale = this.scale(zoom),\r\n\t\t untransformedPoint = 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\tproject: function (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\tunproject: function (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\tscale: function (zoom) {\r\n\t\treturn 256 * Math.pow(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\tzoom: function (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\tgetProjectedBounds: function (zoom) {\r\n\t\tif (this.infinite) { return null; }\r\n\r\n\t\tvar b = this.projection.bounds,\r\n\t\t s = this.scale(zoom),\r\n\t\t min = this.transformation.transform(b.min, s),\r\n\t\t max = 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\tinfinite: 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\twrapLatLng: function (latlng) {\r\n\t\tvar lng = this.wrapLng ? wrapNum(latlng.lng, this.wrapLng, true) : latlng.lng,\r\n\t\t lat = this.wrapLat ? wrapNum(latlng.lat, this.wrapLat, true) : latlng.lat,\r\n\t\t alt = 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\t// Only accepts actual `L.LatLngBounds` instances, not arrays.\r\n\twrapLatLngBounds: function (bounds) {\r\n\t\tvar center = bounds.getCenter(),\r\n\t\t newCenter = this.wrapLatLng(center),\r\n\t\t latShift = center.lat - newCenter.lat,\r\n\t\t lngShift = 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\tvar sw = bounds.getSouthWest(),\r\n\t\t ne = bounds.getNorthEast(),\r\n\t\t newSw = new LatLng(sw.lat - latShift, sw.lng - lngShift),\r\n\t\t newNe = 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 L.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\nvar Earth = extend({}, CRS, {\n\twrapLng: [-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\tR: 6371000,\n\n\t// distance between two geographical points using spherical law of cosines approximation\n\tdistance: function (latlng1, latlng2) {\n\t\tvar rad = Math.PI / 180,\n\t\t lat1 = latlng1.lat * rad,\n\t\t lat2 = latlng2.lat * rad,\n\t\t sinDLat = Math.sin((latlng2.lat - latlng1.lat) * rad / 2),\n\t\t sinDLon = Math.sin((latlng2.lng - latlng1.lng) * rad / 2),\n\t\t a = sinDLat * sinDLat + Math.cos(lat1) * Math.cos(lat2) * sinDLon * sinDLon,\n\t\t c = 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 L.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\nvar earthRadius = 6378137;\r\n\r\nvar SphericalMercator = {\r\n\r\n\tR: earthRadius,\r\n\tMAX_LATITUDE: 85.0511287798,\r\n\r\n\tproject: function (latlng) {\r\n\t\tvar d = Math.PI / 180,\r\n\t\t max = this.MAX_LATITUDE,\r\n\t\t lat = Math.max(Math.min(max, latlng.lat), -max),\r\n\t\t sin = 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: function (point) {\r\n\t\tvar 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: (function () {\r\n\t\tvar d = earthRadius * 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 * @aka L.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 * var transformation = L.transformation(2, 5, -1, 10),\r\n * \tp = L.point(1, 2),\r\n * \tp2 = transformation.transform(p), // L.point(7, 8)\r\n * \tp3 = transformation.untransform(p2); // L.point(1, 2)\r\n * ```\r\n */\r\n\r\n\r\n// factory new L.Transformation(a: Number, b: Number, c: Number, d: Number)\r\n// Creates a `Transformation` object with the given coefficients.\r\nfunction Transformation(a, b, c, d) {\r\n\tif (isArray(a)) {\r\n\t\t// use array properties\r\n\t\tthis._a = a[0];\r\n\t\tthis._b = a[1];\r\n\t\tthis._c = a[2];\r\n\t\tthis._d = a[3];\r\n\t\treturn;\r\n\t}\r\n\tthis._a = a;\r\n\tthis._b = b;\r\n\tthis._c = c;\r\n\tthis._d = d;\r\n}\r\n\r\nTransformation.prototype = {\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 `L.Point` instances, not arrays.\r\n\ttransform: function (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: function (point, scale) {\r\n\t\tscale = scale || 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 `L.Point` instances, not arrays.\r\n\tuntransform: function (point, scale) {\r\n\t\tscale = scale || 1;\r\n\t\treturn new Point(\r\n\t\t (point.x / scale - this._b) / this._a,\r\n\t\t (point.y / scale - this._d) / this._c);\r\n\t}\r\n};\r\n\r\n// factory L.transformation(a: Number, b: Number, c: Number, d: Number)\r\n\r\n// @factory L.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// @factory L.transformation(coefficients: Array): Transformation\r\n// Expects an coefficients array of the form\r\n// `[a: Number, b: Number, c: Number, d: Number]`.\r\n\r\nfunction toTransformation(a, b, c, d) {\r\n\treturn new Transformation(a, b, c, d);\r\n}\n\n/*\r\n * @namespace CRS\r\n * @crs L.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\nvar EPSG3857 = extend({}, Earth, {\r\n\tcode: 'EPSG:3857',\r\n\tprojection: SphericalMercator,\r\n\r\n\ttransformation: (function () {\r\n\t\tvar scale = 0.5 / (Math.PI * SphericalMercator.R);\r\n\t\treturn toTransformation(scale, 0.5, -scale, 0.5);\r\n\t}())\r\n});\r\n\r\nvar EPSG900913 = extend({}, EPSG3857, {\r\n\tcode: 'EPSG:900913'\r\n});\n\n// @namespace SVG; @section\n// There are several static functions which can be called without instantiating L.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\tvar str = '',\n\ti, j, len, len2, points, p;\n\n\tfor (i = 0, len = rings.length; i < len; i++) {\n\t\tpoints = rings[i];\n\n\t\tfor (j = 0, len2 = points.length; j < len2; j++) {\n\t\t\tp = points[j];\n\t\t\tstr += (j ? 'L' : 'M') + p.x + ' ' + p.y;\n\t\t}\n\n\t\t// closes the ring for polygons; \"x\" is VML syntax\n\t\tstr += closed ? (Browser.svg ? 'z' : 'x') : '';\n\t}\n\n\t// SVG complains about empty path strings\n\treturn str || 'M0 0';\n}\n\n/*\r\n * @namespace Browser\r\n * @aka L.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 (L.Browser.ielt9) {\r\n * alert('Upgrade your browser, dude!');\r\n * }\r\n * ```\r\n */\r\n\r\nvar style = document.documentElement.style;\r\n\r\n// @property ie: Boolean; `true` for all Internet Explorer versions (not Edge).\r\nvar ie = 'ActiveXObject' in window;\r\n\r\n// @property ielt9: Boolean; `true` for Internet Explorer versions less than 9.\r\nvar ielt9 = ie && !document.addEventListener;\r\n\r\n// @property edge: Boolean; `true` for the Edge web browser.\r\nvar edge = 'msLaunchUri' in navigator && !('documentMode' in document);\r\n\r\n// @property webkit: Boolean;\r\n// `true` for webkit-based browsers like Chrome and Safari (including mobile versions).\r\nvar webkit = userAgentContains('webkit');\r\n\r\n// @property android: Boolean\r\n// **Deprecated.** `true` for any browser running on an Android platform.\r\nvar android = userAgentContains('android');\r\n\r\n// @property android23: Boolean; **Deprecated.** `true` for browsers running on Android 2 or Android 3.\r\nvar android23 = userAgentContains('android 2') || userAgentContains('android 3');\r\n\r\n/* See https://stackoverflow.com/a/17961266 for details on detecting stock Android */\r\nvar webkitVer = parseInt(/WebKit\\/([0-9]+)|$/.exec(navigator.userAgent)[1], 10); // also matches AppleWebKit\r\n// @property androidStock: Boolean; **Deprecated.** `true` for the Android stock browser (i.e. not Chrome)\r\nvar androidStock = android && userAgentContains('Google') && webkitVer < 537 && !('AudioNode' in window);\r\n\r\n// @property opera: Boolean; `true` for the Opera browser\r\nvar opera = !!window.opera;\r\n\r\n// @property chrome: Boolean; `true` for the Chrome browser.\r\nvar chrome = !edge && userAgentContains('chrome');\r\n\r\n// @property gecko: Boolean; `true` for gecko-based browsers like Firefox.\r\nvar gecko = userAgentContains('gecko') && !webkit && !opera && !ie;\r\n\r\n// @property safari: Boolean; `true` for the Safari browser.\r\nvar safari = !chrome && userAgentContains('safari');\r\n\r\nvar phantom = userAgentContains('phantom');\r\n\r\n// @property opera12: Boolean\r\n// `true` for the Opera browser supporting CSS transforms (version 12 or later).\r\nvar opera12 = 'OTransition' in style;\r\n\r\n// @property win: Boolean; `true` when the browser is running in a Windows platform\r\nvar win = navigator.platform.indexOf('Win') === 0;\r\n\r\n// @property ie3d: Boolean; `true` for all Internet Explorer versions supporting CSS transforms.\r\nvar ie3d = ie && ('transition' in style);\r\n\r\n// @property webkit3d: Boolean; `true` for webkit-based browsers supporting CSS transforms.\r\nvar webkit3d = ('WebKitCSSMatrix' in window) && ('m11' in new window.WebKitCSSMatrix()) && !android23;\r\n\r\n// @property gecko3d: Boolean; `true` for gecko-based browsers supporting CSS transforms.\r\nvar gecko3d = 'MozPerspective' in style;\r\n\r\n// @property any3d: Boolean\r\n// `true` for all browsers supporting CSS transforms.\r\nvar any3d = !window.L_DISABLE_3D && (ie3d || webkit3d || gecko3d) && !opera12 && !phantom;\r\n\r\n// @property mobile: Boolean; `true` for all browsers running in a mobile device.\r\nvar mobile = typeof orientation !== 'undefined' || userAgentContains('mobile');\r\n\r\n// @property mobileWebkit: Boolean; `true` for all webkit-based browsers in a mobile device.\r\nvar mobileWebkit = mobile && webkit;\r\n\r\n// @property mobileWebkit3d: Boolean\r\n// `true` for all webkit-based browsers in a mobile device supporting CSS transforms.\r\nvar mobileWebkit3d = mobile && webkit3d;\r\n\r\n// @property msPointer: Boolean\r\n// `true` for browsers implementing the Microsoft touch events model (notably IE10).\r\nvar msPointer = !window.PointerEvent && window.MSPointerEvent;\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\nvar pointer = !!(window.PointerEvent || msPointer);\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\nvar touchNative = '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\nvar touch = !window.L_NO_TOUCH && (touchNative || pointer);\r\n\r\n// @property mobileOpera: Boolean; `true` for the Opera browser in a mobile device.\r\nvar mobileOpera = mobile && opera;\r\n\r\n// @property mobileGecko: Boolean\r\n// `true` for gecko-based browsers running in a mobile device.\r\nvar mobileGecko = mobile && gecko;\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\nvar retina = (window.devicePixelRatio || (window.screen.deviceXDPI / window.screen.logicalXDPI)) > 1;\r\n\r\n// @property passiveEvents: Boolean\r\n// `true` for browsers that support passive events.\r\nvar passiveEvents = (function () {\r\n\tvar supportsPassiveOption = false;\r\n\ttry {\r\n\t\tvar opts = Object.defineProperty({}, 'passive', {\r\n\t\t\tget: function () { // eslint-disable-line getter-return\r\n\t\t\t\tsupportsPassiveOption = true;\r\n\t\t\t}\r\n\t\t});\r\n\t\twindow.addEventListener('testPassiveEventSupport', falseFn, opts);\r\n\t\twindow.removeEventListener('testPassiveEventSupport', falseFn, opts);\r\n\t} catch (e) {\r\n\t\t// Errors can safely be ignored since this is only a browser support test.\r\n\t}\r\n\treturn supportsPassiveOption;\r\n}());\r\n\r\n// @property canvas: Boolean\r\n// `true` when the browser supports [`<canvas>`](https://developer.mozilla.org/docs/Web/API/Canvas_API).\r\nvar canvas$1 = (function () {\r\n\treturn !!document.createElement('canvas').getContext;\r\n}());\r\n\r\n// @property svg: Boolean\r\n// `true` when the browser supports [SVG](https://developer.mozilla.org/docs/Web/SVG).\r\nvar svg$1 = !!(document.createElementNS && svgCreate('svg').createSVGRect);\r\n\r\nvar inlineSvg = !!svg$1 && (function () {\r\n\tvar div = document.createElement('div');\r\n\tdiv.innerHTML = '<svg/>';\r\n\treturn (div.firstChild && div.firstChild.namespaceURI) === 'http://www.w3.org/2000/svg';\r\n})();\r\n\r\n// @property vml: Boolean\r\n// `true` if the browser supports [VML](https://en.wikipedia.org/wiki/Vector_Markup_Language).\r\nvar vml = !svg$1 && (function () {\r\n\ttry {\r\n\t\tvar div = document.createElement('div');\r\n\t\tdiv.innerHTML = '<v:shape adj=\"1\"/>';\r\n\r\n\t\tvar shape = div.firstChild;\r\n\t\tshape.style.behavior = 'url(#default#VML)';\r\n\r\n\t\treturn shape && (typeof shape.adj === 'object');\r\n\r\n\t} catch (e) {\r\n\t\treturn false;\r\n\t}\r\n}());\r\n\r\n\r\n// @property mac: Boolean; `true` when the browser is running in a Mac platform\r\nvar mac = navigator.platform.indexOf('Mac') === 0;\r\n\r\n// @property mac: Boolean; `true` when the browser is running in a Linux platform\r\nvar linux = navigator.platform.indexOf('Linux') === 0;\r\n\r\nfunction userAgentContains(str) {\r\n\treturn navigator.userAgent.toLowerCase().indexOf(str) >= 0;\r\n}\r\n\r\n\r\nvar Browser = {\r\n\tie: ie,\r\n\tielt9: ielt9,\r\n\tedge: edge,\r\n\twebkit: webkit,\r\n\tandroid: android,\r\n\tandroid23: android23,\r\n\tandroidStock: androidStock,\r\n\topera: opera,\r\n\tchrome: chrome,\r\n\tgecko: gecko,\r\n\tsafari: safari,\r\n\tphantom: phantom,\r\n\topera12: opera12,\r\n\twin: win,\r\n\tie3d: ie3d,\r\n\twebkit3d: webkit3d,\r\n\tgecko3d: gecko3d,\r\n\tany3d: any3d,\r\n\tmobile: mobile,\r\n\tmobileWebkit: mobileWebkit,\r\n\tmobileWebkit3d: mobileWebkit3d,\r\n\tmsPointer: msPointer,\r\n\tpointer: pointer,\r\n\ttouch: touch,\r\n\ttouchNative: touchNative,\r\n\tmobileOpera: mobileOpera,\r\n\tmobileGecko: mobileGecko,\r\n\tretina: retina,\r\n\tpassiveEvents: passiveEvents,\r\n\tcanvas: canvas$1,\r\n\tsvg: svg$1,\r\n\tvml: vml,\r\n\tinlineSvg: inlineSvg,\r\n\tmac: mac,\r\n\tlinux: linux\r\n};\n\n/*\n * Extends L.DomEvent to provide touch support for Internet Explorer and Windows-based devices.\n */\n\nvar POINTER_DOWN = Browser.msPointer ? 'MSPointerDown' : 'pointerdown';\nvar POINTER_MOVE = Browser.msPointer ? 'MSPointerMove' : 'pointermove';\nvar POINTER_UP = Browser.msPointer ? 'MSPointerUp' : 'pointerup';\nvar POINTER_CANCEL = Browser.msPointer ? 'MSPointerCancel' : 'pointercancel';\nvar pEvent = {\n\ttouchstart : POINTER_DOWN,\n\ttouchmove : POINTER_MOVE,\n\ttouchend : POINTER_UP,\n\ttouchcancel : POINTER_CANCEL\n};\nvar handle = {\n\ttouchstart : _onPointerStart,\n\ttouchmove : _handlePointer,\n\ttouchend : _handlePointer,\n\ttouchcancel : _handlePointer\n};\nvar _pointers = {};\nvar _pointerDocListener = false;\n\n// Provides a touch events wrapper for (ms)pointer events.\n// ref https://www.w3.org/TR/pointerevents/ https://www.w3.org/Bugs/Public/show_bug.cgi?id=22890\n\nfunction addPointerListener(obj, type, handler) {\n\tif (type === 'touchstart') {\n\t\t_addPointerDocListener();\n\t}\n\tif (!handle[type]) {\n\t\tconsole.warn('wrong event specified:', type);\n\t\treturn L.Util.falseFn;\n\t}\n\thandler = handle[type].bind(this, handler);\n\tobj.addEventListener(pEvent[type], handler, false);\n\treturn handler;\n}\n\nfunction removePointerListener(obj, type, handler) {\n\tif (!pEvent[type]) {\n\t\tconsole.warn('wrong event specified:', type);\n\t\treturn;\n\t}\n\tobj.removeEventListener(pEvent[type], handler, false);\n}\n\nfunction _globalPointerDown(e) {\n\t_pointers[e.pointerId] = e;\n}\n\nfunction _globalPointerMove(e) {\n\tif (_pointers[e.pointerId]) {\n\t\t_pointers[e.pointerId] = e;\n\t}\n}\n\nfunction _globalPointerUp(e) {\n\tdelete _pointers[e.pointerId];\n}\n\nfunction _addPointerDocListener() {\n\t// need to keep track of what pointers and how many are active to provide e.touches emulation\n\tif (!_pointerDocListener) {\n\t\t// we listen document as any drags that end by moving the touch off the screen get fired there\n\t\tdocument.addEventListener(POINTER_DOWN, _globalPointerDown, true);\n\t\tdocument.addEventListener(POINTER_MOVE, _globalPointerMove, true);\n\t\tdocument.addEventListener(POINTER_UP, _globalPointerUp, true);\n\t\tdocument.addEventListener(POINTER_CANCEL, _globalPointerUp, true);\n\n\t\t_pointerDocListener = true;\n\t}\n}\n\nfunction _handlePointer(handler, e) {\n\tif (e.pointerType === (e.MSPOINTER_TYPE_MOUSE || 'mouse')) { return; }\n\n\te.touches = [];\n\tfor (var i in _pointers) {\n\t\te.touches.push(_pointers[i]);\n\t}\n\te.changedTouches = [e];\n\n\thandler(e);\n}\n\nfunction _onPointerStart(handler, e) {\n\t// IE10 specific: MsTouch needs preventDefault. See #2000\n\tif (e.MSPOINTER_TYPE_TOUCH && e.pointerType === e.MSPOINTER_TYPE_TOUCH) {\n\t\tpreventDefault(e);\n\t}\n\t_handlePointer(handler, e);\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(event) {\r\n\t// in modern browsers `type` cannot be just overridden:\r\n\t// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Getter_only\r\n\tvar newEvent = {},\r\n\t prop, i;\r\n\tfor (i in event) {\r\n\t\tprop = event[i];\r\n\t\tnewEvent[i] = prop && prop.bind ? prop.bind(event) : prop;\r\n\t}\r\n\tevent = newEvent;\r\n\tnewEvent.type = 'dblclick';\r\n\tnewEvent.detail = 2;\r\n\tnewEvent.isTrusted = false;\r\n\tnewEvent._simulated = true; // for debug purposes\r\n\treturn newEvent;\r\n}\r\n\r\nvar 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\tvar last = 0,\r\n\t detail;\r\n\tfunction simDblclick(e) {\r\n\t\tif (e.detail !== 1) {\r\n\t\t\tdetail = e.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 (e.pointerType === 'mouse' ||\r\n\t\t\t(e.sourceCapabilities && !e.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\tvar path = getPropagationPath(e);\r\n\t\tif (path.some(function (el) {\r\n\t\t\treturn el instanceof HTMLLabelElement && el.attributes.for;\r\n\t\t}) &&\r\n\t\t\t!path.some(function (el) {\r\n\t\t\t\treturn (\r\n\t\t\t\t\tel instanceof HTMLInputElement ||\r\n\t\t\t\t\tel instanceof HTMLSelectElement\r\n\t\t\t\t);\r\n\t\t\t})\r\n\t\t) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar 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\thandler(makeDblclick(e));\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: simDblclick\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\r\n// @property TRANSFORM: String\r\n// Vendor-prefixed transform style name (e.g. `'webkitTransform'` for WebKit).\r\nvar TRANSFORM = testProp(\r\n\t['transform', 'webkitTransform', 'OTransform', 'MozTransform', 'msTransform']);\r\n\r\n// webkitTransition comes first because some browser versions that drop vendor prefix don't do\r\n// the same for the transitionend event, in particular the Android 4.1 stock browser\r\n\r\n// @property TRANSITION: String\r\n// Vendor-prefixed transition style name.\r\nvar TRANSITION = testProp(\r\n\t['webkitTransition', 'transition', 'OTransition', 'MozTransition', 'msTransition']);\r\n\r\n// @property TRANSITION_END: String\r\n// Vendor-prefixed transitionend event name.\r\nvar TRANSITION_END =\r\n\tTRANSITION === 'webkitTransition' || TRANSITION === 'OTransition' ? TRANSITION + 'End' : 'transitionend';\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 getStyle(el: HTMLElement, styleAttrib: String): String\r\n// Returns the value for a certain style attribute on an element,\r\n// including computed values or values set through CSS.\r\nfunction getStyle(el, style) {\r\n\tvar value = el.style[style] || (el.currentStyle && el.currentStyle[style]);\r\n\r\n\tif ((!value || value === 'auto') && document.defaultView) {\r\n\t\tvar css = document.defaultView.getComputedStyle(el, null);\r\n\t\tvalue = css ? css[style] : null;\r\n\t}\r\n\treturn value === 'auto' ? null : value;\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\tvar el = document.createElement(tagName);\r\n\tel.className = className || '';\r\n\r\n\tif (container) {\r\n\t\tcontainer.appendChild(el);\r\n\t}\r\n\treturn el;\r\n}\r\n\r\n// @function remove(el: HTMLElement)\r\n// Removes `el` from its parent element\r\nfunction remove(el) {\r\n\tvar parent = el.parentNode;\r\n\tif (parent) {\r\n\t\tparent.removeChild(el);\r\n\t}\r\n}\r\n\r\n// @function empty(el: HTMLElement)\r\n// Removes all of `el`'s children elements from `el`\r\nfunction empty(el) {\r\n\twhile (el.firstChild) {\r\n\t\tel.removeChild(el.firstChild);\r\n\t}\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\tvar 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\tvar 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 hasClass(el: HTMLElement, name: String): Boolean\r\n// Returns `true` if the element's class attribute contains `name`.\r\nfunction hasClass(el, name) {\r\n\tif (el.classList !== undefined) {\r\n\t\treturn el.classList.contains(name);\r\n\t}\r\n\tvar className = getClass(el);\r\n\treturn className.length > 0 && new RegExp('(^|\\\\s)' + name + '(\\\\s|$)').test(className);\r\n}\r\n\r\n// @function addClass(el: HTMLElement, name: String)\r\n// Adds `name` to the element's class attribute.\r\nfunction addClass(el, name) {\r\n\tif (el.classList !== undefined) {\r\n\t\tvar classes = splitWords(name);\r\n\t\tfor (var i = 0, len = classes.length; i < len; i++) {\r\n\t\t\tel.classList.add(classes[i]);\r\n\t\t}\r\n\t} else if (!hasClass(el, name)) {\r\n\t\tvar className = getClass(el);\r\n\t\tsetClass(el, (className ? className + ' ' : '') + name);\r\n\t}\r\n}\r\n\r\n// @function removeClass(el: HTMLElement, name: String)\r\n// Removes `name` from the element's class attribute.\r\nfunction removeClass(el, name) {\r\n\tif (el.classList !== undefined) {\r\n\t\tel.classList.remove(name);\r\n\t} else {\r\n\t\tsetClass(el, trim((' ' + getClass(el) + ' ').replace(' ' + name + ' ', ' ')));\r\n\t}\r\n}\r\n\r\n// @function setClass(el: HTMLElement, name: String)\r\n// Sets the element's class.\r\nfunction setClass(el, name) {\r\n\tif (el.className.baseVal === undefined) {\r\n\t\tel.className = name;\r\n\t} else {\r\n\t\t// in case of SVG element\r\n\t\tel.className.baseVal = name;\r\n\t}\r\n}\r\n\r\n// @function getClass(el: HTMLElement): String\r\n// Returns the element's class.\r\nfunction getClass(el) {\r\n\t// Check if the element is an SVGElementInstance and use the correspondingElement instead\r\n\t// (Required for linked SVG elements in IE11.)\r\n\tif (el.correspondingElement) {\r\n\t\tel = el.correspondingElement;\r\n\t}\r\n\treturn el.className.baseVal === undefined ? el.className : el.className.baseVal;\r\n}\r\n\r\n// @function setOpacity(el: HTMLElement, opacity: Number)\r\n// Set the opacity of an element (including old IE support).\r\n// `opacity` must be a number from `0` to `1`.\r\nfunction setOpacity(el, value) {\r\n\tif ('opacity' in el.style) {\r\n\t\tel.style.opacity = value;\r\n\t} else if ('filter' in el.style) {\r\n\t\t_setOpacityIE(el, value);\r\n\t}\r\n}\r\n\r\nfunction _setOpacityIE(el, value) {\r\n\tvar filter = false,\r\n\t filterName = 'DXImageTransform.Microsoft.Alpha';\r\n\r\n\t// filters collection throws an error if we try to retrieve a filter that doesn't exist\r\n\ttry {\r\n\t\tfilter = el.filters.item(filterName);\r\n\t} catch (e) {\r\n\t\t// don't set opacity to 1 if we haven't already set an opacity,\r\n\t\t// it isn't needed and breaks transparent pngs.\r\n\t\tif (value === 1) { return; }\r\n\t}\r\n\r\n\tvalue = Math.round(value * 100);\r\n\r\n\tif (filter) {\r\n\t\tfilter.Enabled = (value !== 100);\r\n\t\tfilter.Opacity = value;\r\n\t} else {\r\n\t\tel.style.filter += ' progid:' + filterName + '(opacity=' + value + ')';\r\n\t}\r\n}\r\n\r\n// @function testProp(props: String[]): String|false\r\n// Goes through the array of style names and returns the first name\r\n// that is a valid style name for an element. If no such name is found,\r\n// it returns false. Useful for vendor-prefixed styles like `transform`.\r\nfunction testProp(props) {\r\n\tvar style = document.documentElement.style;\r\n\r\n\tfor (var i = 0; i < props.length; i++) {\r\n\t\tif (props[i] in style) {\r\n\t\t\treturn props[i];\r\n\t\t}\r\n\t}\r\n\treturn false;\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\tvar pos = offset || new Point(0, 0);\r\n\r\n\tel.style[TRANSFORM] =\r\n\t\t(Browser.ie3d ?\r\n\t\t\t'translate(' + pos.x + 'px,' + pos.y + 'px)' :\r\n\t\t\t'translate3d(' + pos.x + 'px,' + pos.y + 'px,0)') +\r\n\t\t(scale ? ' scale(' + scale + ')' : '');\r\n}\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\r\n\t/*eslint-disable */\r\n\tel._leaflet_pos = point;\r\n\t/* eslint-enable */\r\n\r\n\tif (Browser.any3d) {\r\n\t\tsetTransform(el, point);\r\n\t} else {\r\n\t\tel.style.left = point.x + 'px';\r\n\t\tel.style.top = point.y + 'px';\r\n\t}\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\r\n\treturn el._leaflet_pos || new Point(0, 0);\r\n}\r\n\r\n// @function disableTextSelection()\r\n// Prevents the user from generating `selectstart` DOM events, usually generated\r\n// when the user drags the mouse through a page with text. 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\n\r\n// @function enableTextSelection()\r\n// Cancels the effects of a previous [`L.DomUtil.disableTextSelection`](#domutil-disabletextselection).\r\nvar disableTextSelection;\r\nvar enableTextSelection;\r\nvar _userSelect;\r\nif ('onselectstart' in document) {\r\n\tdisableTextSelection = function () {\r\n\t\ton(window, 'selectstart', preventDefault);\r\n\t};\r\n\tenableTextSelection = function () {\r\n\t\toff(window, 'selectstart', preventDefault);\r\n\t};\r\n} else {\r\n\tvar userSelectProperty = testProp(\r\n\t\t['userSelect', 'WebkitUserSelect', 'OUserSelect', 'MozUserSelect', 'msUserSelect']);\r\n\r\n\tdisableTextSelection = function () {\r\n\t\tif (userSelectProperty) {\r\n\t\t\tvar style = document.documentElement.style;\r\n\t\t\t_userSelect = style[userSelectProperty];\r\n\t\t\tstyle[userSelectProperty] = 'none';\r\n\t\t}\r\n\t};\r\n\tenableTextSelection = function () {\r\n\t\tif (userSelectProperty) {\r\n\t\t\tdocument.documentElement.style[userSelectProperty] = _userSelect;\r\n\t\t\t_userSelect = undefined;\r\n\t\t}\r\n\t};\r\n}\r\n\r\n// @function disableImageDrag()\r\n// As [`L.DomUtil.disableTextSelection`](#domutil-disabletextselection), but\r\n// for `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 [`L.DomUtil.disableImageDrag`](#domutil-disabletextselection).\r\nfunction enableImageDrag() {\r\n\toff(window, 'dragstart', preventDefault);\r\n}\r\n\r\nvar _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.outline;\r\n\telement.style.outline = 'none';\r\n\ton(window, 'keydown', restoreOutline);\r\n}\r\n\r\n// @function restoreOutline()\r\n// Cancels the effects of a previous [`L.DomUtil.preventOutline`]().\r\nfunction restoreOutline() {\r\n\tif (!_outlineElement) { return; }\r\n\t_outlineElement.style.outline = _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\tvar 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 __proto__: null,\n TRANSFORM: TRANSFORM,\n TRANSITION: TRANSITION,\n TRANSITION_END: TRANSITION_END,\n get: get,\n getStyle: getStyle,\n create: create$1,\n remove: remove,\n empty: empty,\n toFront: toFront,\n toBack: toBack,\n hasClass: hasClass,\n addClass: addClass,\n removeClass: removeClass,\n setClass: setClass,\n getClass: getClass,\n setOpacity: setOpacity,\n testProp: testProp,\n setTransform: setTransform,\n setPosition: setPosition,\n getPosition: getPosition,\n get disableTextSelection () { return disableTextSelection; },\n get enableTextSelection () { return enableTextSelection; },\n disableImageDrag: disableImageDrag,\n enableImageDrag: enableImageDrag,\n preventOutline: preventOutline,\n restoreOutline: restoreOutline,\n getSizedParentNode: getSizedParentNode,\n getScale: getScale\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, mousemove: onMouseMove}`\r\nfunction on(obj, types, fn, context) {\r\n\r\n\tif (types && typeof types === 'object') {\r\n\t\tfor (var type in types) {\r\n\t\t\taddOne(obj, type, types[type], fn);\r\n\t\t}\r\n\t} else {\r\n\t\ttypes = splitWords(types);\r\n\r\n\t\tfor (var i = 0, len = types.length; i < len; i++) {\r\n\t\t\taddOne(obj, types[i], fn, context);\r\n\t\t}\r\n\t}\r\n\r\n\treturn this;\r\n}\r\n\r\nvar 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, mousemove: onMouseMove}`\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 (var type in types) {\r\n\t\t\tremoveOne(obj, type, types[type], 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, function (type) {\r\n\t\t\t\treturn indexOf(types, type) !== -1;\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tfor (var i = 0, len = types.length; i < len; i++) {\r\n\t\t\t\tremoveOne(obj, types[i], 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 (var id in obj[eventsKey]) {\r\n\t\tvar 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\nvar mouseSubst = {\r\n\tmouseenter: 'mouseover',\r\n\tmouseleave: 'mouseout',\r\n\twheel: !('onwheel' in window) && 'mousewheel'\r\n};\r\n\r\nfunction addOne(obj, type, fn, context) {\r\n\tvar id = type + stamp(fn) + (context ? '_' + stamp(context) : '');\r\n\r\n\tif (obj[eventsKey] && obj[eventsKey][id]) { return this; }\r\n\r\n\tvar handler = function (e) {\r\n\t\treturn fn.call(context || obj, e || window.event);\r\n\t};\r\n\r\n\tvar originalHandler = handler;\r\n\r\n\tif (!Browser.touchNative && Browser.pointer && type.indexOf('touch') === 0) {\r\n\t\t// Needs DomEvent.Pointer.js\r\n\t\thandler = addPointerListener(obj, type, handler);\r\n\r\n\t} else if (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 === 'touchstart' || type === 'touchmove' || type === 'wheel' || type === 'mousewheel') {\r\n\t\t\tobj.addEventListener(mouseSubst[type] || type, handler, Browser.passiveEvents ? {passive: false} : false);\r\n\r\n\t\t} else if (type === 'mouseenter' || type === 'mouseleave') {\r\n\t\t\thandler = function (e) {\r\n\t\t\t\te = e || 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(mouseSubst[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] = obj[eventsKey] || {};\r\n\tobj[eventsKey][id] = handler;\r\n}\r\n\r\nfunction removeOne(obj, type, fn, context, id) {\r\n\tid = id || type + stamp(fn) + (context ? '_' + stamp(context) : '');\r\n\tvar handler = obj[eventsKey] && obj[eventsKey][id];\r\n\r\n\tif (!handler) { return this; }\r\n\r\n\tif (!Browser.touchNative && Browser.pointer && type.indexOf('touch') === 0) {\r\n\t\tremovePointerListener(obj, type, handler);\r\n\r\n\t} else if (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(mouseSubst[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// L.DomEvent.on(div, 'click', function (ev) {\r\n// \tL.DomEvent.stopPropagation(ev);\r\n// });\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// `'mousedown'` and `'touchstart'` events (plus browser variants).\r\nfunction disableClickPropagation(el) {\r\n\ton(el, 'mousedown touchstart 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// Compatibility polyfill for [`Event.composedPath()`](https://developer.mozilla.org/en-US/docs/Web/API/Event/composedPath).\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\tif (ev.composedPath) {\r\n\t\treturn ev.composedPath();\r\n\t}\r\n\r\n\tvar path = [];\r\n\tvar el = ev.target;\r\n\r\n\twhile (el) {\r\n\t\tpath.push(el);\r\n\t\tel = el.parentNode;\r\n\t}\r\n\treturn path;\r\n}\r\n\r\n\r\n// @function getMousePosition(ev: DOMEvent, container?: HTMLElement): Point\r\n// Gets normalized mouse position from a DOM event relative to the\r\n// `container` (border excluded) or to the whole page if not specified.\r\nfunction getMousePosition(e, container) {\r\n\tif (!container) {\r\n\t\treturn new Point(e.clientX, e.clientY);\r\n\t}\r\n\r\n\tvar scale = getScale(container),\r\n\t offset = 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\r\n// except , Safari and\r\n// We need double the scroll pixels (see #7403 and #4538) for all Browsers\r\n// except OSX (Mac) -> 3x, Chrome running on Linux 1x\r\n\r\nvar wheelPxFactor =\r\n\t(Browser.linux && Browser.chrome) ? window.devicePixelRatio :\r\n\tBrowser.mac ? window.devicePixelRatio * 3 :\r\n\twindow.devicePixelRatio > 0 ? 2 * window.devicePixelRatio : 1;\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 (Browser.edge) ? e.wheelDeltaY / 2 : // Don't trust window-geometry-based delta\r\n\t (e.deltaY && e.deltaMode === 0) ? -e.deltaY / wheelPxFactor : // Pixels\r\n\t (e.deltaY && e.deltaMode === 1) ? -e.deltaY * 20 : // Lines\r\n\t (e.deltaY && e.deltaMode === 2) ? -e.deltaY * 60 : // Pages\r\n\t (e.deltaX || e.deltaZ) ? 0 :\t// Skip horizontal/depth wheel events\r\n\t e.wheelDelta ? (e.wheelDeltaY || e.wheelDelta) / 2 : // Legacy IE pixels\r\n\t (e.detail && Math.abs(e.detail) < 32765) ? -e.detail * 20 : // Legacy Moz lines\r\n\t e.detail ? e.detail / -32765 * 60 : // Legacy Moz pages\r\n\t 0;\r\n}\r\n\r\n// check if element really left/entered the event target (for mouseenter/mouseleave)\r\nfunction isExternalTarget(el, e) {\r\n\r\n\tvar 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 __proto__: null,\n on: on,\n off: off,\n stopPropagation: stopPropagation,\n disableScrollPropagation: disableScrollPropagation,\n disableClickPropagation: disableClickPropagation,\n preventDefault: preventDefault,\n stop: stop,\n getPropagationPath: getPropagationPath,\n getMousePosition: getMousePosition,\n getWheelDelta: getWheelDelta,\n isExternalTarget: isExternalTarget,\n addListener: on,\n removeListener: off\n};\n\n/*\n * @class PosAnimation\n * @aka L.PosAnimation\n * @inherits Evented\n * Used internally for panning animations, utilizing CSS3 Transitions for modern browsers and a timer fallback for IE6-9.\n *\n * @example\n * ```js\n * var myPositionMarker = L.marker([48.864716, 2.294694]).addTo(map);\n *\n * myPositionMarker.on(\"click\", function() {\n * \tvar pos = map.latLngToLayerPoint(myPositionMarker.getLatLng());\n * \tpos.y -= 25;\n * \tvar fx = new L.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 L.PosAnimation()\n * Creates a `PosAnimation` object.\n *\n */\n\nvar PosAnimation = Evented.extend({\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: function (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: function () {\n\t\tif (!this._inProgress) { return; }\n\n\t\tthis._step(true);\n\t\tthis._complete();\n\t},\n\n\t_animate: function () {\n\t\t// animation loop\n\t\tthis._animId = requestAnimFrame(this._animate, this);\n\t\tthis._step();\n\t},\n\n\t_step: function (round) {\n\t\tvar elapsed = (+new Date()) - this._startTime,\n\t\t duration = 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: function (progress, round) {\n\t\tvar 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: function () {\n\t\tcancelAnimFrame(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: function (t) {\n\t\treturn 1 - Math.pow(1 - t, this._easeOutPower);\n\t}\n});\n\n/*\r\n * @class Map\r\n * @aka L.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 * var map = L.map('map', {\r\n * \tcenter: [51.505, -0.09],\r\n * \tzoom: 13\r\n * });\r\n * ```\r\n *\r\n */\r\n\r\nvar Map = Evented.extend({\r\n\r\n\toptions: {\r\n\t\t// @section Map State Options\r\n\t\t// @option crs: CRS = L.CRS.EPSG3857\r\n\t\t// The [Coordinate Reference System](#crs) to use. Don't change this if you're not\r\n\t\t// sure what it means.\r\n\t\tcrs: EPSG3857,\r\n\r\n\t\t// @option center: LatLng = undefined\r\n\t\t// Initial geographic center of the map\r\n\t\tcenter: undefined,\r\n\r\n\t\t// @option zoom: Number = undefined\r\n\t\t// Initial map zoom level\r\n\t\tzoom: undefined,\r\n\r\n\t\t// @option minZoom: Number = *\r\n\t\t// Minimum zoom level of the map.\r\n\t\t// If not specified and at least one `GridLayer` or `TileLayer` is in the map,\r\n\t\t// the lowest of their `minZoom` options will be used instead.\r\n\t\tminZoom: undefined,\r\n\r\n\t\t// @option maxZoom: Number = *\r\n\t\t// Maximum zoom level of the map.\r\n\t\t// If not specified and at least one `GridLayer` or `TileLayer` is in the map,\r\n\t\t// the highest of their `maxZoom` options will be used instead.\r\n\t\tmaxZoom: undefined,\r\n\r\n\t\t// @option layers: Layer[] = []\r\n\t\t// Array of layers that will be added to the map initially\r\n\t\tlayers: [],\r\n\r\n\t\t// @option maxBounds: LatLngBounds = null\r\n\t\t// When this option is set, the map restricts the view to the given\r\n\t\t// geographical bounds, bouncing the user back if the user tries to pan\r\n\t\t// outside the view. To set the restriction dynamically, use\r\n\t\t// [`setMaxBounds`](#map-setmaxbounds) method.\r\n\t\tmaxBounds: undefined,\r\n\r\n\t\t// @option renderer: Renderer = *\r\n\t\t// The default method for drawing vector layers on the map. `L.SVG`\r\n\t\t// or `L.Canvas` by default depending on browser support.\r\n\t\trenderer: undefined,\r\n\r\n\r\n\t\t// @section Animation Options\r\n\t\t// @option zoomAnimation: Boolean = true\r\n\t\t// Whether the map zoom animation is enabled. By default it's enabled\r\n\t\t// in all browsers that support CSS3 Transitions except Android.\r\n\t\tzoomAnimation: true,\r\n\r\n\t\t// @option zoomAnimationThreshold: Number = 4\r\n\t\t// Won't animate zoom if the zoom difference exceeds this value.\r\n\t\tzoomAnimationThreshold: 4,\r\n\r\n\t\t// @option fadeAnimation: Boolean = true\r\n\t\t// Whether the tile fade animation is enabled. By default it's enabled\r\n\t\t// in all browsers that support CSS3 Transitions except Android.\r\n\t\tfadeAnimation: true,\r\n\r\n\t\t// @option markerZoomAnimation: Boolean = true\r\n\t\t// Whether markers animate their zoom with the zoom animation, if disabled\r\n\t\t// they will disappear for the length of the animation. By default it's\r\n\t\t// enabled in all browsers that support CSS3 Transitions except Android.\r\n\t\tmarkerZoomAnimation: true,\r\n\r\n\t\t// @option transform3DLimit: Number = 2^23\r\n\t\t// Defines the maximum size of a CSS translation transform. The default\r\n\t\t// value should not be changed unless a web browser positions layers in\r\n\t\t// the wrong place after doing a large `panBy`.\r\n\t\ttransform3DLimit: 8388608, // Precision limit of a 32-bit float\r\n\r\n\t\t// @section Interaction Options\r\n\t\t// @option zoomSnap: Number = 1\r\n\t\t// Forces the map's zoom level to always be a multiple of this, particularly\r\n\t\t// right after a [`fitBounds()`](#map-fitbounds) or a pinch-zoom.\r\n\t\t// By default, the zoom level snaps to the nearest integer; lower values\r\n\t\t// (e.g. `0.5` or `0.1`) allow for greater granularity. A value of `0`\r\n\t\t// means the zoom level will not be snapped after `fitBounds` or a pinch-zoom.\r\n\t\tzoomSnap: 1,\r\n\r\n\t\t// @option zoomDelta: Number = 1\r\n\t\t// Controls how much the map's zoom level will change after a\r\n\t\t// [`zoomIn()`](#map-zoomin), [`zoomOut()`](#map-zoomout), pressing `+`\r\n\t\t// or `-` on the keyboard, or using the [zoom controls](#control-zoom).\r\n\t\t// Values smaller than `1` (e.g. `0.5`) allow for greater granularity.\r\n\t\tzoomDelta: 1,\r\n\r\n\t\t// @option trackResize: Boolean = true\r\n\t\t// Whether the map automatically handles browser window resize to update itself.\r\n\t\ttrackResize: true\r\n\t},\r\n\r\n\tinitialize: function (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\t// hack for https://github.com/Leaflet/Leaflet/issues/1980\r\n\t\tthis._onResize = bind(this._onResize, this);\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(toLatLng(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/Opera\r\n\t\tthis._zoomAnimated = TRANSITION && Browser.any3d && !Browser.mobileOpera &&\r\n\t\t\t\tthis.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\ton(this._proxy, TRANSITION_END, this._catchTransitionEnd, this);\r\n\t\t}\r\n\r\n\t\tthis._addLayers(this.options.layers);\r\n\t},\r\n\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: function (center, zoom, options) {\r\n\r\n\t\tzoom = zoom === undefined ? this._zoom : this._limitZoom(zoom);\r\n\t\tcenter = this._limitCenter(toLatLng(center), zoom, this.options.maxBounds);\r\n\t\toptions = options || {};\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 = extend({animate: options.animate}, options.zoom);\r\n\t\t\t\toptions.pan = extend({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\tvar 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 && 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: function (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: function (delta, options) {\r\n\t\tdelta = delta || (Browser.any3d ? this.options.zoomDelta : 1);\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: function (delta, options) {\r\n\t\tdelta = delta || (Browser.any3d ? this.options.zoomDelta : 1);\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: function (latlng, zoom, options) {\r\n\t\tvar scale = this.getZoomScale(zoom),\r\n\t\t viewHalf = this.getSize().divideBy(2),\r\n\t\t containerPoint = latlng instanceof Point ? latlng : this.latLngToContainerPoint(latlng),\r\n\r\n\t\t centerOffset = containerPoint.subtract(viewHalf).multiplyBy(1 - 1 / scale),\r\n\t\t newCenter = 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: function (bounds, options) {\r\n\r\n\t\toptions = options || {};\r\n\t\tbounds = bounds.getBounds ? bounds.getBounds() : toLatLngBounds(bounds);\r\n\r\n\t\tvar paddingTL = toPoint(options.paddingTopLeft || options.padding || [0, 0]),\r\n\t\t paddingBR = toPoint(options.paddingBottomRight || options.padding || [0, 0]),\r\n\r\n\t\t 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: zoom\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tvar paddingOffset = paddingBR.subtract(paddingTL).divideBy(2),\r\n\r\n\t\t swPoint = this.project(bounds.getSouthWest(), zoom),\r\n\t\t nePoint = this.project(bounds.getNorthEast(), zoom),\r\n\t\t center = this.unproject(swPoint.add(nePoint).divideBy(2).add(paddingOffset), zoom);\r\n\r\n\t\treturn {\r\n\t\t\tcenter: center,\r\n\t\t\tzoom: zoom\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: function (bounds, options) {\r\n\r\n\t\tbounds = toLatLngBounds(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\tvar 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: function (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: function (center, options) { // (LatLng)\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: function (offset, options) {\r\n\t\toffset = toPoint(offset).round();\r\n\t\toptions = options || {};\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\taddClass(this._mapPane, 'leaflet-pan-anim');\r\n\r\n\t\t\tvar 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: function (targetCenter, targetZoom, options) {\r\n\r\n\t\toptions = options || {};\r\n\t\tif (options.animate === false || !Browser.any3d) {\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\tvar from = this.project(this.getCenter()),\r\n\t\t to = this.project(targetCenter),\r\n\t\t size = this.getSize(),\r\n\t\t startZoom = this._zoom;\r\n\r\n\t\ttargetCenter = toLatLng(targetCenter);\r\n\t\ttargetZoom = targetZoom === undefined ? startZoom : targetZoom;\r\n\r\n\t\tvar w0 = Math.max(size.x, size.y),\r\n\t\t w1 = w0 * this.getZoomScale(startZoom, targetZoom),\r\n\t\t u1 = (to.distanceTo(from)) || 1,\r\n\t\t rho = 1.42,\r\n\t\t rho2 = rho * rho;\r\n\r\n\t\tfunction r(i) {\r\n\t\t\tvar s1 = i ? -1 : 1,\r\n\t\t\t s2 = i ? w1 : w0,\r\n\t\t\t t1 = w1 * w1 - w0 * w0 + s1 * rho2 * rho2 * u1 * u1,\r\n\t\t\t b1 = 2 * s2 * rho2 * u1,\r\n\t\t\t b = t1 / b1,\r\n\t\t\t sq = 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\t var 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\tvar 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 - Math.pow(1 - t, 1.5); }\r\n\r\n\t\tvar start = Date.now(),\r\n\t\t S = (r(1) - r0) / rho,\r\n\t\t duration = options.duration ? 1000 * options.duration : 1000 * S * 0.8;\r\n\r\n\t\tfunction frame() {\r\n\t\t\tvar t = (Date.now() - start) / duration,\r\n\t\t\t s = easeOut(t) * S;\r\n\r\n\t\t\tif (t <= 1) {\r\n\t\t\t\tthis._flyToFrame = requestAnimFrame(frame, this);\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.call(this);\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: function (bounds, options) {\r\n\t\tvar 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: function (bounds) {\r\n\t\tbounds = toLatLngBounds(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: function (zoom) {\r\n\t\tvar 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: function (zoom) {\r\n\t\tvar 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: function (bounds, options) {\r\n\t\tthis._enforcingBounds = true;\r\n\t\tvar center = this.getCenter(),\r\n\t\t newCenter = this._limitCenter(center, this._zoom, toLatLngBounds(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: function (latlng, options) {\r\n\t\toptions = options || {};\r\n\r\n\t\tvar paddingTL = toPoint(options.paddingTopLeft || options.padding || [0, 0]),\r\n\t\t paddingBR = toPoint(options.paddingBottomRight || options.padding || [0, 0]),\r\n\t\t pixelCenter = this.project(this.getCenter()),\r\n\t\t pixelPoint = this.project(latlng),\r\n\t\t pixelBounds = this.getPixelBounds(),\r\n\t\t paddedBounds = toBounds([pixelBounds.min.add(paddingTL), pixelBounds.max.subtract(paddingBR)]),\r\n\t\t paddedSize = paddedBounds.getSize();\r\n\r\n\t\tif (!paddedBounds.contains(pixelPoint)) {\r\n\t\t\tthis._enforcingBounds = true;\r\n\t\t\tvar centerOffset = pixelPoint.subtract(paddedBounds.getCenter());\r\n\t\t\tvar 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: Zoom/pan 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: function (options) {\r\n\t\tif (!this._loaded) { return this; }\r\n\r\n\t\toptions = extend({\r\n\t\t\tanimate: false,\r\n\t\t\tpan: true\r\n\t\t}, options === true ? {animate: true} : options);\r\n\r\n\t\tvar oldSize = this.getSize();\r\n\t\tthis._sizeChanged = true;\r\n\t\tthis._lastCenter = null;\r\n\r\n\t\tvar newSize = this.getSize(),\r\n\t\t oldCenter = oldSize.divideBy(2).round(),\r\n\t\t newCenter = newSize.divideBy(2).round(),\r\n\t\t offset = 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(bind(this.fire, 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: oldSize,\r\n\t\t\tnewSize: newSize\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: function () {\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: function (options) {\r\n\r\n\t\toptions = this._locateOptions = extend({\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}, options);\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\tvar onResponse = bind(this._handleGeolocationResponse, this),\r\n\t\t onError = bind(this._handleGeolocationError, this);\r\n\r\n\t\tif (options.watch) {\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: function () {\r\n\t\tif (navigator.geolocation && navigator.geolocation.clearWatch) {\r\n\t\t\tnavigator.geolocation.clearWatch(this._locationWatchId);\r\n\t\t}\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: function (error) {\r\n\t\tif (!this._container._leaflet_id) { return; }\r\n\r\n\t\tvar c = error.code,\r\n\t\t message = 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: function (pos) {\r\n\t\tif (!this._container._leaflet_id) { return; }\r\n\r\n\t\tvar lat = pos.coords.latitude,\r\n\t\t lng = pos.coords.longitude,\r\n\t\t latlng = new LatLng(lat, lng),\r\n\t\t bounds = latlng.toBounds(pos.coords.accuracy * 2),\r\n\t\t options = this._locateOptions;\r\n\r\n\t\tif (options.setView) {\r\n\t\t\tvar 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\tvar data = {\r\n\t\t\tlatlng: latlng,\r\n\t\t\tbounds: bounds,\r\n\t\t\ttimestamp: pos.timestamp\r\n\t\t};\r\n\r\n\t\tfor (var i in pos.coords) {\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: function (name, HandlerClass) {\r\n\t\tif (!HandlerClass) { return this; }\r\n\r\n\t\tvar 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: function () {\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\ttry {\r\n\t\t\t// throws error in IE6-8\r\n\t\t\tdelete this._container._leaflet_id;\r\n\t\t\tdelete this._containerId;\r\n\t\t} catch (e) {\r\n\t\t\t/*eslint-disable */\r\n\t\t\tthis._container._leaflet_id = undefined;\r\n\t\t\t/* eslint-enable */\r\n\t\t\tthis._containerId = undefined;\r\n\t\t}\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\tremove(this._mapPane);\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\tcancelAnimFrame(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\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\tvar i;\r\n\t\tfor (i in this._layers) {\r\n\t\t\tthis._layers[i].remove();\r\n\t\t}\r\n\t\tfor (i in this._panes) {\r\n\t\t\tremove(this._panes[i]);\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: function (name, container) {\r\n\t\tvar className = 'leaflet-pane' + (name ? ' leaflet-' + name.replace('Pane', '') + '-pane' : ''),\r\n\t\t pane = 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: function () {\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: function () {\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: function () {\r\n\t\tvar bounds = this.getPixelBounds(),\r\n\t\t sw = this.unproject(bounds.getBottomLeft()),\r\n\t\t ne = 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: function () {\r\n\t\treturn this.options.minZoom === undefined ? this._layersMinZoom || 0 : this.options.minZoom;\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: function () {\r\n\t\treturn this.options.maxZoom === undefined ?\r\n\t\t\t(this._layersMaxZoom === undefined ? Infinity : this._layersMaxZoom) :\r\n\t\t\tthis.options.maxZoom;\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: function (bounds, inside, padding) { // (LatLngBounds[, Boolean, Point]) -> Number\r\n\t\tbounds = toLatLngBounds(bounds);\r\n\t\tpadding = toPoint(padding || [0, 0]);\r\n\r\n\t\tvar zoom = this.getZoom() || 0,\r\n\t\t min = this.getMinZoom(),\r\n\t\t max = this.getMaxZoom(),\r\n\t\t nw = bounds.getNorthWest(),\r\n\t\t se = bounds.getSouthEast(),\r\n\t\t size = this.getSize().subtract(padding),\r\n\t\t boundsSize = toBounds(this.project(se, zoom), this.project(nw, zoom)).getSize(),\r\n\t\t snap = Browser.any3d ? this.options.zoomSnap : 1,\r\n\t\t scalex = size.x / boundsSize.x,\r\n\t\t scaley = size.y / boundsSize.y,\r\n\t\t scale = 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: function () {\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(): 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\tgetPixelBounds: function (center, zoom) {\r\n\t\tvar 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: function () {\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: function (zoom) {\r\n\t\treturn this.options.crs.getProjectedBounds(zoom === undefined ? this.getZoom() : zoom);\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: function (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: function () {\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: function () {\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: function (toZoom, fromZoom) {\r\n\t\t// TODO replace with universal implementation after refactoring projections\r\n\t\tvar crs = this.options.crs;\r\n\t\tfromZoom = fromZoom === undefined ? this._zoom : fromZoom;\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: function (scale, fromZoom) {\r\n\t\tvar crs = this.options.crs;\r\n\t\tfromZoom = fromZoom === undefined ? this._zoom : fromZoom;\r\n\t\tvar 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: function (latlng, zoom) {\r\n\t\tzoom = zoom === undefined ? this._zoom : zoom;\r\n\t\treturn this.options.crs.latLngToPoint(toLatLng(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: function (point, zoom) {\r\n\t\tzoom = zoom === undefined ? this._zoom : zoom;\r\n\t\treturn this.options.crs.pointToLatLng(toPoint(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: function (point) {\r\n\t\tvar projectedPoint = toPoint(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: function (latlng) {\r\n\t\tvar projectedPoint = this.project(toLatLng(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: function (latlng) {\r\n\t\treturn this.options.crs.wrapLatLng(toLatLng(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: function (latlng) {\r\n\t\treturn this.options.crs.wrapLatLngBounds(toLatLngBounds(latlng));\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: function (latlng1, latlng2) {\r\n\t\treturn this.options.crs.distance(toLatLng(latlng1), toLatLng(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: function (point) { // (Point)\r\n\t\treturn toPoint(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: function (point) { // (Point)\r\n\t\treturn toPoint(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: function (point) {\r\n\t\tvar layerPoint = this.containerPointToLayerPoint(toPoint(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: function (latlng) {\r\n\t\treturn this.layerPointToContainerPoint(this.latLngToLayerPoint(toLatLng(latlng)));\r\n\t},\r\n\r\n\t// @method mouseEventToContainerPoint(ev: MouseEvent): Point\r\n\t// Given a MouseEvent object, returns the pixel coordinate relative to the\r\n\t// map container where the event took place.\r\n\tmouseEventToContainerPoint: function (e) {\r\n\t\treturn getMousePosition(e, this._container);\r\n\t},\r\n\r\n\t// @method mouseEventToLayerPoint(ev: MouseEvent): Point\r\n\t// Given a MouseEvent object, returns the pixel coordinate relative to\r\n\t// the [origin pixel](#map-getpixelorigin) where the event took place.\r\n\tmouseEventToLayerPoint: function (e) {\r\n\t\treturn this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e));\r\n\t},\r\n\r\n\t// @method mouseEventToLatLng(ev: MouseEvent): LatLng\r\n\t// Given a MouseEvent object, returns geographical coordinate where the\r\n\t// event took place.\r\n\tmouseEventToLatLng: function (e) { // (MouseEvent)\r\n\t\treturn this.layerPointToLatLng(this.mouseEventToLayerPoint(e));\r\n\t},\r\n\r\n\r\n\t// map initialization methods\r\n\r\n\t_initContainer: function (id) {\r\n\t\tvar 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\t},\r\n\r\n\t_initLayout: function () {\r\n\t\tvar container = this._container;\r\n\r\n\t\tthis._fadeAnimated = this.options.fadeAnimation && Browser.any3d;\r\n\r\n\t\taddClass(container, 'leaflet-container' +\r\n\t\t\t(Browser.touch ? ' leaflet-touch' : '') +\r\n\t\t\t(Browser.retina ? ' leaflet-retina' : '') +\r\n\t\t\t(Browser.ielt9 ? ' leaflet-oldie' : '') +\r\n\t\t\t(Browser.safari ? ' leaflet-safari' : '') +\r\n\t\t\t(this._fadeAnimated ? ' leaflet-fade-anim' : ''));\r\n\r\n\t\tvar position = getStyle(container, 'position');\r\n\r\n\t\tif (position !== 'absolute' && position !== 'relative' && position !== 'fixed') {\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: function () {\r\n\t\tvar 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\taddClass(panes.markerPane, 'leaflet-zoom-hide');\r\n\t\t\taddClass(panes.shadowPane, '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: function (center, zoom, noMoveStart) {\r\n\t\tsetPosition(this._mapPane, new Point(0, 0));\r\n\r\n\t\tvar 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\tvar 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: function (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: function (center, zoom, data, supressEvent) {\r\n\t\tif (zoom === undefined) {\r\n\t\t\tzoom = this._zoom;\r\n\t\t}\r\n\t\tvar 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 && 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 && 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: function (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: function () {\r\n\t\tcancelAnimFrame(this._flyToFrame);\r\n\t\tif (this._panAnim) {\r\n\t\t\tthis._panAnim.stop();\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_rawPanBy: function (offset) {\r\n\t\tsetPosition(this._mapPane, this._getMapPanePos().subtract(offset));\r\n\t},\r\n\r\n\t_getZoomSpan: function () {\r\n\t\treturn this.getMaxZoom() - this.getMinZoom();\r\n\t},\r\n\r\n\t_panInsideMaxBounds: function () {\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: function () {\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: function (remove) {\r\n\t\tthis._targets = {};\r\n\t\tthis._targets[stamp(this._container)] = this;\r\n\r\n\t\tvar onOff = remove ? off : on;\r\n\r\n\t\t// @event click: MouseEvent\r\n\t\t// Fired when the user clicks (or taps) the map.\r\n\t\t// @event dblclick: MouseEvent\r\n\t\t// Fired when the user double-clicks (or double-taps) the map.\r\n\t\t// @event mousedown: MouseEvent\r\n\t\t// Fired when the user pushes the mouse button on the map.\r\n\t\t// @event mouseup: MouseEvent\r\n\t\t// Fired when the user releases the mouse button on the map.\r\n\t\t// @event mouseover: MouseEvent\r\n\t\t// Fired when the mouse enters the map.\r\n\t\t// @event mouseout: MouseEvent\r\n\t\t// Fired when the mouse leaves the map.\r\n\t\t// @event mousemove: MouseEvent\r\n\t\t// Fired while the mouse moves over the map.\r\n\t\t// @event contextmenu: MouseEvent\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 mousedown mouseup ' +\r\n\t\t\t'mouseover mouseout mousemove contextmenu keypress keydown keyup', this._handleDOMEvent, this);\r\n\r\n\t\tif (this.options.trackResize) {\r\n\t\t\tonOff(window, 'resize', this._onResize, this);\r\n\t\t}\r\n\r\n\t\tif (Browser.any3d && 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: function () {\r\n\t\tcancelAnimFrame(this._resizeRequest);\r\n\t\tthis._resizeRequest = requestAnimFrame(\r\n\t\t function () { this.invalidateSize({debounceMoveend: true}); }, this);\r\n\t},\r\n\r\n\t_onScroll: function () {\r\n\t\tthis._container.scrollTop = 0;\r\n\t\tthis._container.scrollLeft = 0;\r\n\t},\r\n\r\n\t_onMoveEnd: function () {\r\n\t\tvar 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: function (e, type) {\r\n\t\tvar targets = [],\r\n\t\t target,\r\n\t\t isHover = type === 'mouseout' || type === 'mouseover',\r\n\t\t src = e.target || e.srcElement,\r\n\t\t dragging = false;\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: function (el) {\r\n\t\twhile (el && el !== this._container) {\r\n\t\t\tif (el['_leaflet_disable_click']) { return true; }\r\n\t\t\tel = el.parentNode;\r\n\t\t}\r\n\t},\r\n\r\n\t_handleDOMEvent: function (e) {\r\n\t\tvar 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\tvar type = e.type;\r\n\r\n\t\tif (type === 'mousedown') {\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\t_mouseEvents: ['click', 'dblclick', 'mouseover', 'mouseout', 'contextmenu'],\r\n\r\n\t_fireDOMEvent: function (e, type, canvasTargets) {\r\n\r\n\t\tif (e.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: MouseEvent\r\n\t\t\t// Fired before mouse 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\tvar synth = extend({}, e);\r\n\t\t\tsynth.type = 'preclick';\r\n\t\t\tthis._fireDOMEvent(synth, synth.type, 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\tvar targets = this._findEventTargets(e, type);\r\n\r\n\t\tif (canvasTargets) {\r\n\t\t\tvar filtered = []; // pick only targets with listeners\r\n\t\t\tfor (var i = 0; i < canvasTargets.length; i++) {\r\n\t\t\t\tif (canvasTargets[i].listens(type, true)) {\r\n\t\t\t\t\tfiltered.push(canvasTargets[i]);\r\n\t\t\t\t}\r\n\t\t\t}\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\tvar target = targets[0];\r\n\t\tvar 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\tvar 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.mouseEventToContainerPoint(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 (i = 0; i < targets.length; i++) {\r\n\t\t\ttargets[i].fire(type, data, true);\r\n\t\t\tif (data.originalEvent._stopped ||\r\n\t\t\t\t(targets[i].options.bubblingMouseEvents === false && indexOf(this._mouseEvents, type) !== -1)) { return; }\r\n\t\t}\r\n\t},\r\n\r\n\t_draggableMoved: function (obj) {\r\n\t\tobj = obj.dragging && obj.dragging.enabled() ? obj : this;\r\n\t\treturn (obj.dragging && obj.dragging.moved()) || (this.boxZoom && this.boxZoom.moved());\r\n\t},\r\n\r\n\t_clearHandlers: function () {\r\n\t\tfor (var i = 0, len = this._handlers.length; i < len; i++) {\r\n\t\t\tthis._handlers[i].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: function (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: function () {\r\n\t\treturn getPosition(this._mapPane) || new Point(0, 0);\r\n\t},\r\n\r\n\t_moved: function () {\r\n\t\tvar pos = this._getMapPanePos();\r\n\t\treturn pos && !pos.equals([0, 0]);\r\n\t},\r\n\r\n\t_getTopLeftPoint: function (center, zoom) {\r\n\t\tvar 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: function (center, zoom) {\r\n\t\tvar 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: function (latlng, zoom, center) {\r\n\t\tvar topLeft = this._getNewPixelOrigin(center, zoom);\r\n\t\treturn this.project(latlng, zoom)._subtract(topLeft);\r\n\t},\r\n\r\n\t_latLngBoundsToNewLayerBounds: function (latLngBounds, zoom, center) {\r\n\t\tvar topLeft = this._getNewPixelOrigin(center, zoom);\r\n\t\treturn toBounds([\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: function () {\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: function (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: function (center, zoom, bounds) {\r\n\r\n\t\tif (!bounds) { return center; }\r\n\r\n\t\tvar centerPoint = this.project(center, zoom),\r\n\t\t viewHalf = this.getSize().divideBy(2),\r\n\t\t viewBounds = new Bounds(centerPoint.subtract(viewHalf), centerPoint.add(viewHalf)),\r\n\t\t offset = 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 (offset.round().equals([0, 0])) {\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: function (offset, bounds) {\r\n\t\tif (!bounds) { return offset; }\r\n\r\n\t\tvar viewBounds = this.getPixelBounds(),\r\n\t\t newBounds = 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: function (pxBounds, maxBounds, zoom) {\r\n\t\tvar projectedMaxBounds = toBounds(\r\n\t\t this.project(maxBounds.getNorthEast(), zoom),\r\n\t\t this.project(maxBounds.getSouthWest(), zoom)\r\n\t\t ),\r\n\t\t minOffset = projectedMaxBounds.min.subtract(pxBounds.min),\r\n\t\t maxOffset = projectedMaxBounds.max.subtract(pxBounds.max),\r\n\r\n\t\t dx = this._rebound(minOffset.x, -maxOffset.x),\r\n\t\t dy = 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: function (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: function (zoom) {\r\n\t\tvar min = this.getMinZoom(),\r\n\t\t max = this.getMaxZoom(),\r\n\t\t snap = Browser.any3d ? this.options.zoomSnap : 1;\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: function () {\r\n\t\tthis.fire('move');\r\n\t},\r\n\r\n\t_onPanTransitionEnd: function () {\r\n\t\tremoveClass(this._mapPane, 'leaflet-pan-anim');\r\n\t\tthis.fire('moveend');\r\n\t},\r\n\r\n\t_tryAnimatedPan: function (center, options) {\r\n\t\t// difference between the new and current centers in pixels\r\n\t\tvar 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 && 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: function () {\r\n\r\n\t\tvar proxy = this._proxy = create$1('div', 'leaflet-proxy leaflet-zoom-animated');\r\n\t\tthis._panes.mapPane.appendChild(proxy);\r\n\r\n\t\tthis.on('zoomanim', function (e) {\r\n\t\t\tvar prop = TRANSFORM,\r\n\t\t\t transform = this._proxy.style[prop];\r\n\r\n\t\t\tsetTransform(this._proxy, this.project(e.center, e.zoom), this.getZoomScale(e.zoom, 1));\r\n\r\n\t\t\t// workaround for case when transform is the same and so transitionend event is not fired\r\n\t\t\tif (transform === this._proxy.style[prop] && this._animatingZoom) {\r\n\t\t\t\tthis._onZoomTransitionEnd();\r\n\t\t\t}\r\n\t\t}, this);\r\n\r\n\t\tthis.on('load moveend', this._animMoveEnd, this);\r\n\r\n\t\tthis._on('unload', this._destroyAnimProxy, this);\r\n\t},\r\n\r\n\t_destroyAnimProxy: function () {\r\n\t\tremove(this._proxy);\r\n\t\tthis.off('load moveend', this._animMoveEnd, this);\r\n\t\tdelete this._proxy;\r\n\t},\r\n\r\n\t_animMoveEnd: function () {\r\n\t\tvar c = this.getCenter(),\r\n\t\t z = this.getZoom();\r\n\t\tsetTransform(this._proxy, this.project(c, z), this.getZoomScale(z, 1));\r\n\t},\r\n\r\n\t_catchTransitionEnd: function (e) {\r\n\t\tif (this._animatingZoom && e.propertyName.indexOf('transform') >= 0) {\r\n\t\t\tthis._onZoomTransitionEnd();\r\n\t\t}\r\n\t},\r\n\r\n\t_nothingToAnimate: function () {\r\n\t\treturn !this._container.getElementsByClassName('leaflet-zoom-animated').length;\r\n\t},\r\n\r\n\t_tryAnimatedZoom: function (center, zoom, options) {\r\n\r\n\t\tif (this._animatingZoom) { return true; }\r\n\r\n\t\toptions = options || {};\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\tvar scale = this.getZoomScale(zoom),\r\n\t\t offset = 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\trequestAnimFrame(function () {\r\n\t\t\tthis\r\n\t\t\t ._moveStart(true, false)\r\n\t\t\t ._animateZoom(center, zoom, true);\r\n\t\t}, this);\r\n\r\n\t\treturn true;\r\n\t},\r\n\r\n\t_animateZoom: function (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\taddClass(this._mapPane, '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: center,\r\n\t\t\tzoom: zoom,\r\n\t\t\tnoUpdate: noUpdate\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\tsetTimeout(bind(this._onZoomTransitionEnd, this), 250);\r\n\t},\r\n\r\n\t_onZoomTransitionEnd: function () {\r\n\t\tif (!this._animatingZoom) { return; }\r\n\r\n\t\tif (this._mapPane) {\r\n\t\t\tremoveClass(this._mapPane, 'leaflet-zoom-anim');\r\n\t\t}\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\n// @section\r\n\r\n// @factory L.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// @factory L.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\nfunction createMap(id, options) {\r\n\treturn new Map(id, options);\r\n}\n\n/*\r\n * @class Control\r\n * @aka L.Control\r\n * @inherits Class\r\n *\r\n * L.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\nvar Control = Class.extend({\r\n\t// @section\r\n\t// @aka Control Options\r\n\toptions: {\r\n\t\t// @option position: String = 'topright'\r\n\t\t// The position of the control (one of the map corners). Possible values are `'topleft'`,\r\n\t\t// `'topright'`, `'bottomleft'` or `'bottomright'`\r\n\t\tposition: 'topright'\r\n\t},\r\n\r\n\tinitialize: function (options) {\r\n\t\tsetOptions(this, options);\r\n\t},\r\n\r\n\t/* @section\r\n\t * Classes extending L.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: function () {\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: function (position) {\r\n\t\tvar map = this._map;\r\n\r\n\t\tif (map) {\r\n\t\t\tmap.removeControl(this);\r\n\t\t}\r\n\r\n\t\tthis.options.position = position;\r\n\r\n\t\tif (map) {\r\n\t\t\tmap.addControl(this);\r\n\t\t}\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: function () {\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: function (map) {\r\n\t\tthis.remove();\r\n\t\tthis._map = map;\r\n\r\n\t\tvar container = this._container = this.onAdd(map),\r\n\t\t pos = this.getPosition(),\r\n\t\t corner = map._controlCorners[pos];\r\n\r\n\t\taddClass(container, 'leaflet-control');\r\n\r\n\t\tif (pos.indexOf('bottom') !== -1) {\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: function () {\r\n\t\tif (!this._map) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tremove(this._container);\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: function (e) {\r\n\t\t// if map exists and event is not a keyboard event\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\nvar control = function (options) {\r\n\treturn new Control(options);\r\n};\r\n\r\n/* @section Extension methods\r\n * @uninheritable\r\n *\r\n * Every control should extend from `L.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.include({\r\n\t// @method addControl(control: Control): this\r\n\t// Adds the given control to the map\r\n\taddControl: function (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: function (control) {\r\n\t\tcontrol.remove();\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_initControlPos: function () {\r\n\t\tvar corners = this._controlCorners = {},\r\n\t\t l = 'leaflet-',\r\n\t\t container = 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\tvar 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: function () {\r\n\t\tfor (var i in this._controlCorners) {\r\n\t\t\tremove(this._controlCorners[i]);\r\n\t\t}\r\n\t\tremove(this._controlContainer);\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 * @aka L.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 * var baseLayers = {\r\n * \t\"Mapbox\": mapbox,\r\n * \t\"OpenStreetMap\": osm\r\n * };\r\n *\r\n * var overlays = {\r\n * \t\"Marker\": marker,\r\n * \t\"Roads\": roadsLayer\r\n * };\r\n *\r\n * L.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\nvar Layers = Control.extend({\r\n\t// @section\r\n\t// @aka Control.Layers options\r\n\toptions: {\r\n\t\t// @option collapsed: Boolean = true\r\n\t\t// If `true`, the control will be collapsed into an icon and expanded on mouse hover, touch, or keyboard activation.\r\n\t\tcollapsed: true,\r\n\t\tposition: 'topright',\r\n\r\n\t\t// @option autoZIndex: Boolean = true\r\n\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\tautoZIndex: true,\r\n\r\n\t\t// @option hideSingleBase: Boolean = false\r\n\t\t// If `true`, the base layers in the control will be hidden when there is only one.\r\n\t\thideSingleBase: false,\r\n\r\n\t\t// @option sortLayers: Boolean = false\r\n\t\t// Whether to sort the layers. When `false`, layers will keep the order\r\n\t\t// in which they were added to the control.\r\n\t\tsortLayers: false,\r\n\r\n\t\t// @option sortFunction: Function = *\r\n\t\t// A [compare function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/sort)\r\n\t\t// that will be used for sorting the layers, when `sortLayers` is `true`.\r\n\t\t// The function receives both the `L.Layer` instances and their names, as in\r\n\t\t// `sortFunction(layerA, layerB, nameA, nameB)`.\r\n\t\t// By default, it sorts layers alphabetically by their name.\r\n\t\tsortFunction: function (layerA, layerB, nameA, nameB) {\r\n\t\t\treturn nameA < nameB ? -1 : (nameB < nameA ? 1 : 0);\r\n\t\t}\r\n\t},\r\n\r\n\tinitialize: function (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\r\n\t\tfor (var i in baseLayers) {\r\n\t\t\tthis._addLayer(baseLayers[i], i);\r\n\t\t}\r\n\r\n\t\tfor (i in overlays) {\r\n\t\t\tthis._addLayer(overlays[i], i, true);\r\n\t\t}\r\n\t},\r\n\r\n\tonAdd: function (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 (var i = 0; i < this._layers.length; i++) {\r\n\t\t\tthis._layers[i].layer.on('add remove', this._onLayerChange, this);\r\n\t\t}\r\n\r\n\t\treturn this._container;\r\n\t},\r\n\r\n\taddTo: function (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: function () {\r\n\t\tthis._map.off('zoomend', this._checkDisabledLayers, this);\r\n\r\n\t\tfor (var i = 0; i < this._layers.length; i++) {\r\n\t\t\tthis._layers[i].layer.off('add remove', this._onLayerChange, this);\r\n\t\t}\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: function (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: function (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: function (layer) {\r\n\t\tlayer.off('add remove', this._onLayerChange, this);\r\n\r\n\t\tvar 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: function () {\r\n\t\taddClass(this._container, 'leaflet-control-layers-expanded');\r\n\t\tthis._section.style.height = null;\r\n\t\tvar acceptableHeight = this._map.getSize().y - (this._container.offsetTop + 50);\r\n\t\tif (acceptableHeight < this._section.clientHeight) {\r\n\t\t\taddClass(this._section, 'leaflet-control-layers-scrollbar');\r\n\t\t\tthis._section.style.height = acceptableHeight + 'px';\r\n\t\t} else {\r\n\t\t\tremoveClass(this._section, '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: function () {\r\n\t\tremoveClass(this._container, 'leaflet-control-layers-expanded');\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_initLayout: function () {\r\n\t\tvar className = 'leaflet-control-layers',\r\n\t\t container = this._container = create$1('div', className),\r\n\t\t collapsed = this.options.collapsed;\r\n\r\n\t\t// makes this work on IE touch devices by stopping it from firing a mouseout event when the touch is released\r\n\t\tcontainer.setAttribute('aria-haspopup', true);\r\n\r\n\t\tdisableClickPropagation(container);\r\n\t\tdisableScrollPropagation(container);\r\n\r\n\t\tvar section = this._section = create$1('section', 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\tmouseenter: function () {\r\n\t\t\t\t\ton(section, 'click', preventDefault);\r\n\t\t\t\t\tthis.expand();\r\n\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\toff(section, 'click', preventDefault);\r\n\t\t\t\t\t});\r\n\t\t\t\t},\r\n\t\t\t\tmouseleave: this.collapse\r\n\t\t\t}, this);\r\n\t\t}\r\n\r\n\t\tvar 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, 'click', preventDefault); // prevent link function\r\n\t\ton(link, 'focus', this.expand, 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: function (id) {\r\n\t\tfor (var i = 0; i < this._layers.length; i++) {\r\n\r\n\t\t\tif (this._layers[i] && stamp(this._layers[i].layer) === id) {\r\n\t\t\t\treturn this._layers[i];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_addLayer: function (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: layer,\r\n\t\t\tname: name,\r\n\t\t\toverlay: overlay\r\n\t\t});\r\n\r\n\t\tif (this.options.sortLayers) {\r\n\t\t\tthis._layers.sort(bind(function (a, b) {\r\n\t\t\t\treturn this.options.sortFunction(a.layer, b.layer, a.name, b.name);\r\n\t\t\t}, this));\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: function () {\r\n\t\tif (!this._container) { return this; }\r\n\r\n\t\tempty(this._baseLayersList);\r\n\t\tempty(this._overlaysList);\r\n\r\n\t\tthis._layerControlInputs = [];\r\n\t\tvar baseLayersPresent, overlaysPresent, i, obj, baseLayersCount = 0;\r\n\r\n\t\tfor (i = 0; i < this._layers.length; i++) {\r\n\t\t\tobj = this._layers[i];\r\n\t\t\tthis._addItem(obj);\r\n\t\t\toverlaysPresent = overlaysPresent || obj.overlay;\r\n\t\t\tbaseLayersPresent = baseLayersPresent || !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: function (e) {\r\n\t\tif (!this._handlingClick) {\r\n\t\t\tthis._update();\r\n\t\t}\r\n\r\n\t\tvar 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\tvar 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// IE7 bugs out if you create a radio dynamically, so you have to do it this hacky way (see https://stackoverflow.com/a/119079)\r\n\t_createRadioElement: function (name, checked) {\r\n\r\n\t\tvar radioHtml = '<input type=\"radio\" class=\"leaflet-control-layers-selector\" name=\"' +\r\n\t\t\t\tname + '\"' + (checked ? ' checked=\"checked\"' : '') + '/>';\r\n\r\n\t\tvar radioFragment = document.createElement('div');\r\n\t\tradioFragment.innerHTML = radioHtml;\r\n\r\n\t\treturn radioFragment.firstChild;\r\n\t},\r\n\r\n\t_addItem: function (obj) {\r\n\t\tvar label = document.createElement('label'),\r\n\t\t checked = this._map.hasLayer(obj.layer),\r\n\t\t input;\r\n\r\n\t\tif (obj.overlay) {\r\n\t\t\tinput = document.createElement('input');\r\n\t\t\tinput.type = 'checkbox';\r\n\t\t\tinput.className = 'leaflet-control-layers-selector';\r\n\t\t\tinput.defaultChecked = checked;\r\n\t\t} else {\r\n\t\t\tinput = this._createRadioElement('leaflet-base-layers_' + stamp(this), checked);\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\tvar 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\tvar 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\tvar 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: function () {\r\n\t\tvar inputs = this._layerControlInputs,\r\n\t\t input, layer;\r\n\t\tvar addedLayers = [],\r\n\t\t removedLayers = [];\r\n\r\n\t\tthis._handlingClick = true;\r\n\r\n\t\tfor (var i = inputs.length - 1; i >= 0; i--) {\r\n\t\t\tinput = inputs[i];\r\n\t\t\tlayer = 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 (i = 0; i < removedLayers.length; i++) {\r\n\t\t\tif (this._map.hasLayer(removedLayers[i])) {\r\n\t\t\t\tthis._map.removeLayer(removedLayers[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (i = 0; i < addedLayers.length; i++) {\r\n\t\t\tif (!this._map.hasLayer(addedLayers[i])) {\r\n\t\t\t\tthis._map.addLayer(addedLayers[i]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._handlingClick = false;\r\n\r\n\t\tthis._refocusOnMap();\r\n\t},\r\n\r\n\t_checkDisabledLayers: function () {\r\n\t\tvar inputs = this._layerControlInputs,\r\n\t\t input,\r\n\t\t layer,\r\n\t\t zoom = this._map.getZoom();\r\n\r\n\t\tfor (var i = inputs.length - 1; i >= 0; i--) {\r\n\t\t\tinput = inputs[i];\r\n\t\t\tlayer = 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: function () {\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});\r\n\r\n\r\n// @factory L.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\nvar layers = function (baseLayers, overlays, options) {\r\n\treturn new Layers(baseLayers, overlays, options);\r\n};\n\n/*\r\n * @class Control.Zoom\r\n * @aka L.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\nvar Zoom = Control.extend({\r\n\t// @section\r\n\t// @aka Control.Zoom options\r\n\toptions: {\r\n\t\tposition: 'topleft',\r\n\r\n\t\t// @option zoomInText: String = '<span aria-hidden=\"true\">+</span>'\r\n\t\t// The text set on the 'zoom in' button.\r\n\t\tzoomInText: '<span aria-hidden=\"true\">+</span>',\r\n\r\n\t\t// @option zoomInTitle: String = 'Zoom in'\r\n\t\t// The title set on the 'zoom in' button.\r\n\t\tzoomInTitle: 'Zoom in',\r\n\r\n\t\t// @option zoomOutText: String = '<span aria-hidden=\"true\">−</span>'\r\n\t\t// The text set on the 'zoom out' button.\r\n\t\tzoomOutText: '<span aria-hidden=\"true\">−</span>',\r\n\r\n\t\t// @option zoomOutTitle: String = 'Zoom out'\r\n\t\t// The title set on the 'zoom out' button.\r\n\t\tzoomOutTitle: 'Zoom out'\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\t\tvar zoomName = 'leaflet-control-zoom',\r\n\t\t container = create$1('div', zoomName + ' leaflet-bar'),\r\n\t\t options = this.options;\r\n\r\n\t\tthis._zoomInButton = this._createButton(options.zoomInText, options.zoomInTitle,\r\n\t\t zoomName + '-in', container, this._zoomIn);\r\n\t\tthis._zoomOutButton = this._createButton(options.zoomOutText, options.zoomOutTitle,\r\n\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: function (map) {\r\n\t\tmap.off('zoomend zoomlevelschange', this._updateDisabled, this);\r\n\t},\r\n\r\n\tdisable: function () {\r\n\t\tthis._disabled = true;\r\n\t\tthis._updateDisabled();\r\n\t\treturn this;\r\n\t},\r\n\r\n\tenable: function () {\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: function (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: function (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: function (html, title, className, container, fn) {\r\n\t\tvar 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: function () {\r\n\t\tvar map = this._map,\r\n\t\t className = 'leaflet-disabled';\r\n\r\n\t\tremoveClass(this._zoomInButton, className);\r\n\t\tremoveClass(this._zoomOutButton, 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\taddClass(this._zoomOutButton, 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\taddClass(this._zoomInButton, 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.mergeOptions({\r\n\tzoomControl: true\r\n});\r\n\r\nMap.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});\r\n\r\n// @namespace Control.Zoom\r\n// @factory L.control.zoom(options: Control.Zoom options)\r\n// Creates a zoom control\r\nvar zoom = function (options) {\r\n\treturn new Zoom(options);\r\n};\n\n/*\n * @class Control.Scale\n * @aka L.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 * L.control.scale().addTo(map);\n * ```\n */\n\nvar Scale = Control.extend({\n\t// @section\n\t// @aka Control.Scale options\n\toptions: {\n\t\tposition: 'bottomleft',\n\n\t\t// @option maxWidth: Number = 100\n\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\tmaxWidth: 100,\n\n\t\t// @option metric: Boolean = True\n\t\t// Whether to show the metric scale line (m/km).\n\t\tmetric: true,\n\n\t\t// @option imperial: Boolean = True\n\t\t// Whether to show the imperial scale line (mi/ft).\n\t\timperial: true\n\n\t\t// @option updateWhenIdle: Boolean = false\n\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},\n\n\tonAdd: function (map) {\n\t\tvar className = 'leaflet-control-scale',\n\t\t container = create$1('div', className),\n\t\t options = 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: function (map) {\n\t\tmap.off(this.options.updateWhenIdle ? 'moveend' : 'move', this._update, this);\n\t},\n\n\t_addScales: function (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: function () {\n\t\tvar map = this._map,\n\t\t y = map.getSize().y / 2;\n\n\t\tvar 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: function (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: function (maxMeters) {\n\t\tvar meters = this._getRoundNum(maxMeters),\n\t\t label = meters < 1000 ? meters + ' m' : (meters / 1000) + ' km';\n\n\t\tthis._updateScale(this._mScale, label, meters / maxMeters);\n\t},\n\n\t_updateImperial: function (maxMeters) {\n\t\tvar maxFeet = maxMeters * 3.2808399,\n\t\t 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: function (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: function (num) {\n\t\tvar pow10 = Math.pow(10, (Math.floor(num) + '').length - 1),\n\t\t d = num / pow10;\n\n\t\td = d >= 10 ? 10 :\n\t\t d >= 5 ? 5 :\n\t\t d >= 3 ? 3 :\n\t\t d >= 2 ? 2 : 1;\n\n\t\treturn pow10 * d;\n\t}\n});\n\n\n// @factory L.control.scale(options?: Control.Scale options)\n// Creates an scale control with the given options.\nvar scale = function (options) {\n\treturn new Scale(options);\n};\n\nvar 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 * @aka L.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\nvar Attribution = Control.extend({\r\n\t// @section\r\n\t// @aka Control.Attribution options\r\n\toptions: {\r\n\t\tposition: 'bottomright',\r\n\r\n\t\t// @option prefix: String|false = 'Leaflet'\r\n\t\t// The HTML text shown before the attributions. Pass `false` to disable.\r\n\t\tprefix: '<a href=\"https://leafletjs.com\" title=\"A JavaScript library for interactive maps\">' + (Browser.inlineSvg ? ukrainianFlag + ' ' : '') + 'Leaflet</a>'\r\n\t},\r\n\r\n\tinitialize: function (options) {\r\n\t\tsetOptions(this, options);\r\n\r\n\t\tthis._attributions = {};\r\n\t},\r\n\r\n\tonAdd: function (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 (var i in map._layers) {\r\n\t\t\tif (map._layers[i].getAttribution) {\r\n\t\t\t\tthis.addAttribution(map._layers[i].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: function (map) {\r\n\t\tmap.off('layeradd', this._addAttribution, this);\r\n\t},\r\n\r\n\t_addAttribution: function (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', function () {\r\n\t\t\t\tthis.removeAttribution(ev.layer.getAttribution());\r\n\t\t\t}, this);\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: function (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. `'© OpenStreetMap contributors'`).\r\n\taddAttribution: function (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: function (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: function () {\r\n\t\tif (!this._map) { return; }\r\n\r\n\t\tvar attribs = [];\r\n\r\n\t\tfor (var i in this._attributions) {\r\n\t\t\tif (this._attributions[i]) {\r\n\t\t\t\tattribs.push(i);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar 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.mergeOptions({\r\n\tattributionControl: true\r\n});\r\n\r\nMap.addInitHook(function () {\r\n\tif (this.options.attributionControl) {\r\n\t\tnew Attribution().addTo(this);\r\n\t}\r\n});\r\n\r\n// @namespace Control.Attribution\r\n// @factory L.control.attribution(options: Control.Attribution options)\r\n// Creates an attribution control.\r\nvar attribution = function (options) {\r\n\treturn new Attribution(options);\r\n};\n\nControl.Layers = Layers;\nControl.Zoom = Zoom;\nControl.Scale = Scale;\nControl.Attribution = Attribution;\n\ncontrol.layers = layers;\ncontrol.zoom = zoom;\ncontrol.scale = scale;\ncontrol.attribution = attribution;\n\n/*\n\tL.Handler 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// @aka L.Handler\n// Abstract class for map interaction handlers\n\nvar Handler = Class.extend({\n\tinitialize: function (map) {\n\t\tthis._map = map;\n\t},\n\n\t// @method enable(): this\n\t// Enables the handler\n\tenable: function () {\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: function () {\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: function () {\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 L.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\nvar Mixin = {Events: Events};\n\n/*\r\n * @class Draggable\r\n * @aka L.Draggable\r\n * @inherits Evented\r\n *\r\n * A class for making DOM elements draggable (including touch support).\r\n * Used internally for map and marker dragging. Only works for elements\r\n * that were positioned with [`L.DomUtil.setPosition`](#domutil-setposition).\r\n *\r\n * @example\r\n * ```js\r\n * var draggable = new L.Draggable(elementToDrag);\r\n * draggable.enable();\r\n * ```\r\n */\r\n\r\nvar START = Browser.touch ? 'touchstart mousedown' : 'mousedown';\r\n\r\nvar Draggable = Evented.extend({\r\n\r\n\toptions: {\r\n\t\t// @section\r\n\t\t// @aka Draggable options\r\n\t\t// @option clickTolerance: Number = 3\r\n\t\t// The max number of pixels a user can shift the mouse pointer during a click\r\n\t\t// for it to be considered a valid click (as opposed to a mouse drag).\r\n\t\tclickTolerance: 3\r\n\t},\r\n\r\n\t// @constructor L.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: function (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: function () {\r\n\t\tif (this._enabled) { return; }\r\n\r\n\t\ton(this._dragStartTarget, START, 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: function () {\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, START, 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: function (e) {\r\n\t\t// Ignore the event if disabled; this happens in IE11\r\n\t\t// under some circumstances, see #3666.\r\n\t\tif (!this._enabled) { return; }\r\n\r\n\t\tthis._moved = false;\r\n\r\n\t\tif (hasClass(this._element, 'leaflet-zoom-anim')) { return; }\r\n\r\n\t\tif (e.touches && e.touches.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.which !== 1) && (e.button !== 1) && !e.touches)) { 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\tvar first = e.touches ? e.touches[0] : e,\r\n\t\t sizedParent = getSizedParentNode(this._element);\r\n\r\n\t\tthis._startPoint = new Point(first.clientX, first.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\tvar mouseevent = e.type === 'mousedown';\r\n\t\ton(document, mouseevent ? 'mousemove' : 'touchmove', this._onMove, this);\r\n\t\ton(document, mouseevent ? 'mouseup' : 'touchend touchcancel', this._onUp, this);\r\n\t},\r\n\r\n\t_onMove: function (e) {\r\n\t\t// Ignore the event if disabled; this happens in IE11\r\n\t\t// under some circumstances, see #3666.\r\n\t\tif (!this._enabled) { return; }\r\n\r\n\t\tif (e.touches && e.touches.length > 1) {\r\n\t\t\tthis._moved = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar first = (e.touches && e.touches.length === 1 ? e.touches[0] : e),\r\n\t\t offset = new Point(first.clientX, first.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\tpreventDefault(e);\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\taddClass(document.body, 'leaflet-dragging');\r\n\r\n\t\t\tthis._lastTarget = e.target || e.srcElement;\r\n\t\t\t// IE and Edge do not give the <use> element, so fetch it\r\n\t\t\t// if necessary\r\n\t\t\tif (window.SVGElementInstance && this._lastTarget instanceof window.SVGElementInstance) {\r\n\t\t\t\tthis._lastTarget = this._lastTarget.correspondingUseElement;\r\n\t\t\t}\r\n\t\t\taddClass(this._lastTarget, '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: function () {\r\n\t\tvar 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: function () {\r\n\t\t// Ignore the event if disabled; this happens in IE11\r\n\t\t// under some circumstances, see #3666.\r\n\t\tif (!this._enabled) { return; }\r\n\t\tthis.finishDrag();\r\n\t},\r\n\r\n\tfinishDrag: function (noInertia) {\r\n\t\tremoveClass(document.body, 'leaflet-dragging');\r\n\r\n\t\tif (this._lastTarget) {\r\n\t\t\tremoveClass(this._lastTarget, 'leaflet-drag-target');\r\n\t\t\tthis._lastTarget = null;\r\n\t\t}\r\n\r\n\t\toff(document, 'mousemove touchmove', this._onMove, this);\r\n\t\toff(document, 'mouseup touchend touchcancel', this._onUp, this);\r\n\r\n\t\tenableImageDrag();\r\n\t\tenableTextSelection();\r\n\r\n\t\tif (this._moved && this._moving) {\r\n\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: noInertia,\r\n\t\t\t\tdistance: this._newPos.distanceTo(this._startPos)\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis._moving = false;\r\n\t\tDraggable._dragging = false;\r\n\t}\r\n\r\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\tvar sqTolerance = tolerance * tolerance;\r\n\r\n\t // stage 1: vertex reduction\r\n\t points = _reducePoints(points, sqTolerance);\r\n\r\n\t // stage 2: Douglas-Peucker simplification\r\n\t points = _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\tvar len = points.length,\r\n\t ArrayConstructor = typeof Uint8Array !== undefined + '' ? Uint8Array : Array,\r\n\t markers = new ArrayConstructor(len);\r\n\r\n\t markers[0] = markers[len - 1] = 1;\r\n\r\n\t_simplifyDPStep(points, markers, sqTolerance, 0, len - 1);\r\n\r\n\tvar i,\r\n\t 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\tvar 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\tvar reducedPoints = [points[0]];\r\n\r\n\tfor (var i = 1, prev = 0, len = points.length; i < len; 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 < len - 1) {\r\n\t\treducedPoints.push(points[len - 1]);\r\n\t}\r\n\treturn reducedPoints;\r\n}\r\n\r\nvar _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\tvar codeA = useLastCode ? _lastCode : _getBitCode(a, bounds),\r\n\t codeB = _getBitCode(b, bounds),\r\n\r\n\t codeOut, 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\tvar dx = b.x - a.x,\r\n\t dy = b.y - a.y,\r\n\t min = bounds.min,\r\n\t max = bounds.max,\r\n\t 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\tvar 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\tvar dx = p2.x - p1.x,\r\n\t dy = 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\tvar x = p1.x,\r\n\t y = p1.y,\r\n\t dx = p2.x - x,\r\n\t dy = p2.y - y,\r\n\t dot = dx * dx + dy * dy,\r\n\t t;\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 !isArray(latlngs[0]) || (typeof latlngs[0][0] !== 'object' && typeof latlngs[0][0] !== 'undefined');\r\n}\r\n\r\nfunction _flat(latlngs) {\r\n\tconsole.warn('Deprecated use of _flat, please use L.LineUtil.isFlat instead.');\r\n\treturn isFlat(latlngs);\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\tvar 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\tvar points = [];\r\n\tfor (var j in latlngs) {\r\n\t\tpoints.push(crs.project(toLatLng(latlngs[j])));\r\n\t}\r\n\r\n\tvar len = points.length;\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\treturn crs.unproject(toPoint(center));\r\n}\n\nvar LineUtil = {\n __proto__: null,\n simplify: simplify,\n pointToSegmentDistance: pointToSegmentDistance,\n closestPointOnSegment: closestPointOnSegment,\n clipSegment: clipSegment,\n _getEdgeIntersection: _getEdgeIntersection,\n _getBitCode: _getBitCode,\n _sqClosestPointOnSegment: _sqClosestPointOnSegment,\n isFlat: isFlat,\n _flat: _flat,\n polylineCenter: polylineCenter\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\tvar clippedPoints,\r\n\t edges = [1, 4, 2, 8],\r\n\t i, j, k,\r\n\t a, b,\r\n\t len, edge, p;\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\tvar 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\tvar points = [];\r\n\tfor (var k in latlngs) {\r\n\t\tpoints.push(crs.project(toLatLng(latlngs[k])));\r\n\t}\r\n\r\n\tvar len = points.length;\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\treturn crs.unproject(toPoint(center));\r\n}\n\nvar PolyUtil = {\n __proto__: null,\n clipPolygon: clipPolygon,\n polygonCenter: polygonCenter\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 L.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\nvar LonLat = {\r\n\tproject: function (latlng) {\r\n\t\treturn new Point(latlng.lng, latlng.lat);\r\n\t},\r\n\r\n\tunproject: function (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 L.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\nvar Mercator = {\r\n\tR: 6378137,\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: function (latlng) {\r\n\t\tvar d = Math.PI / 180,\r\n\t\t r = this.R,\r\n\t\t y = latlng.lat * d,\r\n\t\t tmp = this.R_MINOR / r,\r\n\t\t e = Math.sqrt(1 - tmp * tmp),\r\n\t\t con = e * Math.sin(y);\r\n\r\n\t\tvar ts = Math.tan(Math.PI / 4 - y / 2) / Math.pow((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: function (point) {\r\n\t\tvar d = 180 / Math.PI,\r\n\t\t r = this.R,\r\n\t\t tmp = this.R_MINOR / r,\r\n\t\t e = Math.sqrt(1 - tmp * tmp),\r\n\t\t ts = Math.exp(-point.y / r),\r\n\t\t phi = Math.PI / 2 - 2 * Math.atan(ts);\r\n\r\n\t\tfor (var 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 = Math.pow((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 `L.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 `L.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 __proto__: null,\n LonLat: LonLat,\n Mercator: Mercator,\n SphericalMercator: SphericalMercator\n};\n\n/*\r\n * @namespace CRS\r\n * @crs L.CRS.EPSG3395\r\n *\r\n * Rarely used by some commercial tile providers. Uses Elliptical Mercator projection.\r\n */\r\nvar EPSG3395 = extend({}, Earth, {\r\n\tcode: 'EPSG:3395',\r\n\tprojection: Mercator,\r\n\r\n\ttransformation: (function () {\r\n\t\tvar scale = 0.5 / (Math.PI * Mercator.R);\r\n\t\treturn toTransformation(scale, 0.5, -scale, 0.5);\r\n\t}())\r\n});\n\n/*\r\n * @namespace CRS\r\n * @crs L.CRS.EPSG4326\r\n *\r\n * A common CRS among GIS enthusiasts. Uses simple Equirectangular projection.\r\n *\r\n * Leaflet 1.0.x complies with the [TMS coordinate scheme for EPSG:4326](https://wiki.osgeo.org/wiki/Tile_Map_Service_Specification#global-geodetic),\r\n * which is a breaking change from 0.7.x behaviour. If you are using a `TileLayer`\r\n * 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\nvar EPSG4326 = extend({}, Earth, {\r\n\tcode: 'EPSG:4326',\r\n\tprojection: LonLat,\r\n\ttransformation: toTransformation(1 / 180, 1, -1 / 180, 0.5)\r\n});\n\n/*\n * @namespace CRS\n * @crs L.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\nvar Simple = extend({}, CRS, {\n\tprojection: LonLat,\n\ttransformation: toTransformation(1, 0, -1, 0),\n\n\tscale: function (zoom) {\n\t\treturn Math.pow(2, zoom);\n\t},\n\n\tzoom: function (scale) {\n\t\treturn Math.log(scale) / Math.LN2;\n\t},\n\n\tdistance: function (latlng1, latlng2) {\n\t\tvar dx = latlng2.lng - latlng1.lng,\n\t\t dy = latlng2.lat - latlng1.lat;\n\n\t\treturn Math.sqrt(dx * dx + dy * dy);\n\t},\n\n\tinfinite: 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 L.Layer\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 `L.Evented`.\n *\n * @example\n *\n * ```js\n * var layer = L.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\nvar Layer = Evented.extend({\n\n\t// Classes extending `L.Layer` will inherit the following options:\n\toptions: {\n\t\t// @option pane: String = 'overlayPane'\n\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\tpane: 'overlayPane',\n\n\t\t// @option attribution: String = null\n\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\tattribution: null,\n\n\t\tbubblingMouseEvents: true\n\t},\n\n\t/* @section\n\t * Classes extending `L.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: function (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: function () {\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: function (obj) {\n\t\tif (obj) {\n\t\t\tobj.removeLayer(this);\n\t\t}\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: function (name) {\n\t\treturn this._map.getPane(name ? (this.options[name] || name) : this.options.pane);\n\t},\n\n\taddInteractiveTarget: function (targetEl) {\n\t\tthis._map._targets[stamp(targetEl)] = this;\n\t\treturn this;\n\t},\n\n\tremoveInteractiveTarget: function (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: function () {\n\t\treturn this.options.attribution;\n\t},\n\n\t_layerAdd: function (e) {\n\t\tvar 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\tvar events = this.getEvents();\n\t\t\tmap.on(events, this);\n\t\t\tthis.once('remove', function () {\n\t\t\t\tmap.off(events, this);\n\t\t\t}, 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 `L.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 [`addEventListener`](#evented-addeventlistener). 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.include({\n\t// @method addLayer(layer: Layer): this\n\t// Adds the given layer to the map\n\taddLayer: function (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\tvar 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: function (layer) {\n\t\tvar 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: 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: function (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: function (method, context) {\n\t\tfor (var i in this._layers) {\n\t\t\tmethod.call(context, this._layers[i]);\n\t\t}\n\t\treturn this;\n\t},\n\n\t_addLayers: function (layers) {\n\t\tlayers = layers ? (isArray(layers) ? layers : [layers]) : [];\n\n\t\tfor (var i = 0, len = layers.length; i < len; i++) {\n\t\t\tthis.addLayer(layers[i]);\n\t\t}\n\t},\n\n\t_addZoomLimit: function (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: function (layer) {\n\t\tvar 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: function () {\n\t\tvar minZoom = Infinity,\n\t\t maxZoom = -Infinity,\n\t\t oldZoomSpan = this._getZoomSpan();\n\n\t\tfor (var i in this._zoomBoundLayers) {\n\t\t\tvar options = this._zoomBoundLayers[i].options;\n\n\t\t\tminZoom = options.minZoom === undefined ? minZoom : Math.min(minZoom, options.minZoom);\n\t\t\tmaxZoom = options.maxZoom === undefined ? maxZoom : Math.max(maxZoom, options.maxZoom);\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 * @aka L.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 * L.layerGroup([marker1, marker2])\r\n * \t.addLayer(polyline)\r\n * \t.addTo(map);\r\n * ```\r\n */\r\n\r\nvar LayerGroup = Layer.extend({\r\n\r\n\tinitialize: function (layers, options) {\r\n\t\tsetOptions(this, options);\r\n\r\n\t\tthis._layers = {};\r\n\r\n\t\tvar i, len;\r\n\r\n\t\tif (layers) {\r\n\t\t\tfor (i = 0, len = layers.length; i < len; i++) {\r\n\t\t\t\tthis.addLayer(layers[i]);\r\n\t\t\t}\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: function (layer) {\r\n\t\tvar id = this.getLayerId(layer);\r\n\r\n\t\tthis._layers[id] = layer;\r\n\r\n\t\tif (this._map) {\r\n\t\t\tthis._map.addLayer(layer);\r\n\t\t}\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: function (layer) {\r\n\t\tvar 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: function (layer) {\r\n\t\tvar 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: function () {\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: function (methodName) {\r\n\t\tvar args = Array.prototype.slice.call(arguments, 1),\r\n\t\t i, layer;\r\n\r\n\t\tfor (i in this._layers) {\r\n\t\t\tlayer = this._layers[i];\r\n\r\n\t\t\tif (layer[methodName]) {\r\n\t\t\t\tlayer[methodName].apply(layer, args);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\t\tthis.eachLayer(map.addLayer, map);\r\n\t},\r\n\r\n\tonRemove: function (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(function (layer) {\r\n\t// \tlayer.bindPopup('Hello');\r\n\t// });\r\n\t// ```\r\n\teachLayer: function (method, context) {\r\n\t\tfor (var i in this._layers) {\r\n\t\t\tmethod.call(context, this._layers[i]);\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: function (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: function () {\r\n\t\tvar 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: function (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: function (layer) {\r\n\t\treturn stamp(layer);\r\n\t}\r\n});\r\n\r\n\r\n// @factory L.layerGroup(layers?: Layer[], options?: Object)\r\n// Create a layer group, optionally given an initial set of layers and an `options` object.\r\nvar layerGroup = function (layers, options) {\r\n\treturn new LayerGroup(layers, options);\r\n};\n\n/*\r\n * @class FeatureGroup\r\n * @aka L.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 mouse 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 * L.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\nvar FeatureGroup = LayerGroup.extend({\r\n\r\n\taddLayer: function (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: layer});\r\n\t},\r\n\r\n\tremoveLayer: function (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: 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: function (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: function () {\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: function () {\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: function () {\r\n\t\tvar bounds = new LatLngBounds();\r\n\r\n\t\tfor (var id in this._layers) {\r\n\t\t\tvar layer = this._layers[id];\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});\r\n\r\n// @factory L.featureGroup(layers?: Layer[], options?: Object)\r\n// Create a feature group, optionally given an initial set of layers and an `options` object.\r\nvar featureGroup = function (layers, options) {\r\n\treturn new FeatureGroup(layers, options);\r\n};\n\n/*\r\n * @class Icon\r\n * @aka L.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 * var myIcon = L.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 * L.marker([50.505, 30.57], {icon: myIcon}).addTo(map);\r\n * ```\r\n *\r\n * `L.Icon.Default` extends `L.Icon` and is the blue icon Leaflet uses for markers by default.\r\n *\r\n */\r\n\r\nvar Icon = Class.extend({\r\n\r\n\t/* @section\r\n\t * @aka Icon options\r\n\t *\r\n\t * @option iconUrl: String = null\r\n\t * **(required)** The URL to the icon image (absolute or relative to your script path).\r\n\t *\r\n\t * @option iconRetinaUrl: String = null\r\n\t * The URL to a retina sized version of the icon image (absolute or relative to your\r\n\t * script path). Used for Retina screen devices.\r\n\t *\r\n\t * @option iconSize: Point = null\r\n\t * Size of the icon image in pixels.\r\n\t *\r\n\t * @option iconAnchor: Point = null\r\n\t * The coordinates of the \"tip\" of the icon (relative to its top left corner). The icon\r\n\t * will be aligned so that this point is at the marker's geographical location. Centered\r\n\t * by default if size is specified, also can be set in CSS with negative margins.\r\n\t *\r\n\t * @option popupAnchor: Point = [0, 0]\r\n\t * The coordinates of the point from which popups will \"open\", relative to the icon anchor.\r\n\t *\r\n\t * @option tooltipAnchor: Point = [0, 0]\r\n\t * The coordinates of the point from which tooltips will \"open\", relative to the icon anchor.\r\n\t *\r\n\t * @option shadowUrl: String = null\r\n\t * The URL to the icon shadow image. If not specified, no shadow image will be created.\r\n\t *\r\n\t * @option shadowRetinaUrl: String = null\r\n\t *\r\n\t * @option shadowSize: Point = null\r\n\t * Size of the shadow image in pixels.\r\n\t *\r\n\t * @option shadowAnchor: Point = null\r\n\t * The coordinates of the \"tip\" of the shadow (relative to its top left corner) (the same\r\n\t * as iconAnchor if not specified).\r\n\t *\r\n\t * @option className: String = ''\r\n\t * A custom class name to assign to both icon and shadow images. Empty by default.\r\n\t */\r\n\r\n\toptions: {\r\n\t\tpopupAnchor: [0, 0],\r\n\t\ttooltipAnchor: [0, 0],\r\n\r\n\t\t// @option crossOrigin: Boolean|String = false\r\n\t\t// Whether the crossOrigin attribute will be added to the tiles.\r\n\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// Refer to [CORS Settings](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for valid String values.\r\n\t\tcrossOrigin: false\r\n\t},\r\n\r\n\tinitialize: function (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: function (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: function (oldIcon) {\r\n\t\treturn this._createIcon('shadow', oldIcon);\r\n\t},\r\n\r\n\t_createIcon: function (name, oldIcon) {\r\n\t\tvar 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\tvar 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: function (img, name) {\r\n\t\tvar options = this.options;\r\n\t\tvar 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\tvar size = toPoint(sizeOption),\r\n\t\t anchor = toPoint(name === 'shadow' && options.shadowAnchor || options.iconAnchor ||\r\n\t\t size && size.divideBy(2, true));\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: function (src, el) {\r\n\t\tel = el || document.createElement('img');\r\n\t\tel.src = src;\r\n\t\treturn el;\r\n\t},\r\n\r\n\t_getIconUrl: function (name) {\r\n\t\treturn Browser.retina && this.options[name + 'RetinaUrl'] || this.options[name + 'Url'];\r\n\t}\r\n});\r\n\r\n\r\n// @factory L.icon(options: Icon options)\r\n// Creates an icon instance with the given options.\r\nfunction icon(options) {\r\n\treturn new Icon(options);\r\n}\n\n/*\n * @miniclass Icon.Default (Icon)\n * @aka L.Icon.Default\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 `L.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 * `L.Marker.prototype.options.icon` with your own icon instead.\n */\n\nvar IconDefault = Icon.extend({\n\n\toptions: {\n\t\ticonUrl: 'marker-icon.png',\n\t\ticonRetinaUrl: 'marker-icon-2x.png',\n\t\tshadowUrl: 'marker-shadow.png',\n\t\ticonSize: [25, 41],\n\t\ticonAnchor: [12, 41],\n\t\tpopupAnchor: [1, -34],\n\t\ttooltipAnchor: [16, -28],\n\t\tshadowSize: [41, 41]\n\t},\n\n\t_getIconUrl: function (name) {\n\t\tif (typeof IconDefault.imagePath !== 'string') {\t// Deprecated, backwards-compatibility only\n\t\t\tIconDefault.imagePath = this._detectIconPath();\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) + Icon.prototype._getIconUrl.call(this, name);\n\t},\n\n\t_stripUrl: function (path) {\t// separate function to use in tests\n\t\tvar strip = function (str, re, idx) {\n\t\t\tvar 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: function () {\n\t\tvar el = create$1('div', 'leaflet-default-icon-path', document.body);\n\t\tvar path = getStyle(el, 'background-image') ||\n\t\t getStyle(el, 'backgroundImage');\t// IE8\n\n\t\tdocument.body.removeChild(el);\n\t\tpath = this._stripUrl(path);\n\t\tif (path) { return path; }\n\t\tvar 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 * L.Handler.MarkerDrag is used internally by L.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 (by both mouse and touch). Only valid when the marker is on the map (Otherwise set [`marker.options.draggable`](#marker-draggable)).\n */\n\nvar MarkerDrag = Handler.extend({\n\tinitialize: function (marker) {\n\t\tthis._marker = marker;\n\t},\n\n\taddHooks: function () {\n\t\tvar 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\taddClass(icon, 'leaflet-marker-draggable');\n\t},\n\n\tremoveHooks: function () {\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\tif (this._marker._icon) {\n\t\t\tremoveClass(this._marker._icon, 'leaflet-marker-draggable');\n\t\t}\n\t},\n\n\tmoved: function () {\n\t\treturn this._draggable && this._draggable._moved;\n\t},\n\n\t_adjustPan: function (e) {\n\t\tvar marker = this._marker,\n\t\t map = marker._map,\n\t\t speed = this._marker.options.autoPanSpeed,\n\t\t padding = this._marker.options.autoPanPadding,\n\t\t iconPos = getPosition(marker._icon),\n\t\t bounds = map.getPixelBounds(),\n\t\t origin = map.getPixelOrigin();\n\n\t\tvar panBounds = toBounds(\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\tvar movement = toPoint(\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 = requestAnimFrame(this._adjustPan.bind(this, e));\n\t\t}\n\t},\n\n\t_onDragStart: function () {\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 && this._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: function (e) {\n\t\tif (this._marker.options.autoPan) {\n\t\t\tcancelAnimFrame(this._panRequest);\n\t\t\tthis._panRequest = requestAnimFrame(this._adjustPan.bind(this, e));\n\t\t}\n\t},\n\n\t_onDrag: function (e) {\n\t\tvar marker = this._marker,\n\t\t shadow = marker._shadow,\n\t\t iconPos = getPosition(marker._icon),\n\t\t latlng = 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 .fire('move', e)\n\t\t .fire('drag', e);\n\t},\n\n\t_onDragEnd: function (e) {\n\t\t// @event dragend: DragEndEvent\n\t\t// Fired when the user stops dragging the marker.\n\n\t\t cancelAnimFrame(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 .fire('moveend')\n\t\t .fire('dragend', e);\n\t}\n});\n\n/*\r\n * @class Marker\r\n * @inherits Interactive layer\r\n * @aka L.Marker\r\n * L.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 * L.marker([50.5, 30.5]).addTo(map);\r\n * ```\r\n */\r\n\r\nvar Marker = Layer.extend({\r\n\r\n\t// @section\r\n\t// @aka Marker options\r\n\toptions: {\r\n\t\t// @option icon: Icon = *\r\n\t\t// Icon instance to use for rendering the marker.\r\n\t\t// See [Icon documentation](#L.Icon) for details on how to customize the marker icon.\r\n\t\t// If not specified, a common instance of `L.Icon.Default` is used.\r\n\t\ticon: new IconDefault(),\r\n\r\n\t\t// Option inherited from \"Interactive layer\" abstract class\r\n\t\tinteractive: true,\r\n\r\n\t\t// @option keyboard: Boolean = true\r\n\t\t// Whether the marker can be tabbed to with a keyboard and clicked by pressing enter.\r\n\t\tkeyboard: true,\r\n\r\n\t\t// @option title: String = ''\r\n\t\t// Text for the browser tooltip that appear on marker hover (no tooltip by default).\r\n\t\t// [Useful for accessibility](https://leafletjs.com/examples/accessibility/#markers-must-be-labelled).\r\n\t\ttitle: '',\r\n\r\n\t\t// @option alt: String = 'Marker'\r\n\t\t// Text for the `alt` attribute of the icon image.\r\n\t\t// [Useful for accessibility](https://leafletjs.com/examples/accessibility/#markers-must-be-labelled).\r\n\t\talt: 'Marker',\r\n\r\n\t\t// @option zIndexOffset: Number = 0\r\n\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\tzIndexOffset: 0,\r\n\r\n\t\t// @option opacity: Number = 1.0\r\n\t\t// The opacity of the marker.\r\n\t\topacity: 1,\r\n\r\n\t\t// @option riseOnHover: Boolean = false\r\n\t\t// If `true`, the marker will get on top of others when you hover the mouse over it.\r\n\t\triseOnHover: false,\r\n\r\n\t\t// @option riseOffset: Number = 250\r\n\t\t// The z-index offset used for the `riseOnHover` feature.\r\n\t\triseOffset: 250,\r\n\r\n\t\t// @option pane: String = 'markerPane'\r\n\t\t// `Map pane` where the markers icon will be added.\r\n\t\tpane: 'markerPane',\r\n\r\n\t\t// @option shadowPane: String = 'shadowPane'\r\n\t\t// `Map pane` where the markers shadow will be added.\r\n\t\tshadowPane: 'shadowPane',\r\n\r\n\t\t// @option bubblingMouseEvents: Boolean = false\r\n\t\t// When `true`, a mouse event on this marker will trigger the same event on the map\r\n\t\t// (unless [`L.DomEvent.stopPropagation`](#domevent-stoppropagation) is used).\r\n\t\tbubblingMouseEvents: false,\r\n\r\n\t\t// @option autoPanOnFocus: Boolean = true\r\n\t\t// When `true`, the map will pan whenever the marker is focused (via\r\n\t\t// e.g. pressing `tab` on the keyboard) to ensure the marker is\r\n\t\t// visible within the map's bounds\r\n\t\tautoPanOnFocus: true,\r\n\r\n\t\t// @section Draggable marker options\r\n\t\t// @option draggable: Boolean = false\r\n\t\t// Whether the marker is draggable with mouse/touch or not.\r\n\t\tdraggable: false,\r\n\r\n\t\t// @option autoPan: Boolean = false\r\n\t\t// Whether to pan the map when dragging this marker near its edge or not.\r\n\t\tautoPan: false,\r\n\r\n\t\t// @option autoPanPadding: Point = Point(50, 50)\r\n\t\t// Distance (in pixels to the left/right and to the top/bottom) of the\r\n\t\t// map edge to start panning the map.\r\n\t\tautoPanPadding: [50, 50],\r\n\r\n\t\t// @option autoPanSpeed: Number = 10\r\n\t\t// Number of pixels the map should pan by.\r\n\t\tautoPanSpeed: 10\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: function (latlng, options) {\r\n\t\tsetOptions(this, options);\r\n\t\tthis._latlng = toLatLng(latlng);\r\n\t},\r\n\r\n\tonAdd: function (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: function (map) {\r\n\t\tif (this.dragging && 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: function () {\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: function () {\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: function (latlng) {\r\n\t\tvar oldLatLng = this._latlng;\r\n\t\tthis._latlng = toLatLng(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: 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: function (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: function () {\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: function (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\tgetElement: function () {\r\n\t\treturn this._icon;\r\n\t},\r\n\r\n\tupdate: function () {\r\n\r\n\t\tif (this._icon && this._map) {\r\n\t\t\tvar 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: function () {\r\n\t\tvar options = this.options,\r\n\t\t classToAdd = 'leaflet-zoom-' + (this._zoomAnimated ? 'animated' : 'hide');\r\n\r\n\t\tvar icon = options.icon.createIcon(this._icon),\r\n\t\t 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\taddClass(icon, 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\tmouseover: this._bringToFront,\r\n\t\t\t\tmouseout: 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\tvar newShadow = options.icon.createShadow(this._shadow),\r\n\t\t 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\taddClass(newShadow, 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: function () {\r\n\t\tif (this.options.riseOnHover) {\r\n\t\t\tthis.off({\r\n\t\t\t\tmouseover: this._bringToFront,\r\n\t\t\t\tmouseout: 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\tremove(this._icon);\r\n\t\tthis.removeInteractiveTarget(this._icon);\r\n\r\n\t\tthis._icon = null;\r\n\t},\r\n\r\n\t_removeShadow: function () {\r\n\t\tif (this._shadow) {\r\n\t\t\tremove(this._shadow);\r\n\t\t}\r\n\t\tthis._shadow = null;\r\n\t},\r\n\r\n\t_setPos: function (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: function (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: function (opt) {\r\n\t\tvar 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: function () {\r\n\r\n\t\tif (!this.options.interactive) { return; }\r\n\r\n\t\taddClass(this._icon, 'leaflet-interactive');\r\n\r\n\t\tthis.addInteractiveTarget(this._icon);\r\n\r\n\t\tif (MarkerDrag) {\r\n\t\t\tvar 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: function (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: function () {\r\n\t\tvar opacity = this.options.opacity;\r\n\r\n\t\tif (this._icon) {\r\n\t\t\tsetOpacity(this._icon, opacity);\r\n\t\t}\r\n\r\n\t\tif (this._shadow) {\r\n\t\t\tsetOpacity(this._shadow, opacity);\r\n\t\t}\r\n\t},\r\n\r\n\t_bringToFront: function () {\r\n\t\tthis._updateZIndex(this.options.riseOffset);\r\n\t},\r\n\r\n\t_resetZIndex: function () {\r\n\t\tthis._updateZIndex(0);\r\n\t},\r\n\r\n\t_panOnFocus: function () {\r\n\t\tvar map = this._map;\r\n\t\tif (!map) { return; }\r\n\r\n\t\tvar iconOpts = this.options.icon.options;\r\n\t\tvar size = iconOpts.iconSize ? toPoint(iconOpts.iconSize) : toPoint(0, 0);\r\n\t\tvar anchor = iconOpts.iconAnchor ? toPoint(iconOpts.iconAnchor) : toPoint(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: function () {\r\n\t\treturn this.options.icon.options.popupAnchor;\r\n\t},\r\n\r\n\t_getTooltipAnchor: function () {\r\n\t\treturn this.options.icon.options.tooltipAnchor;\r\n\t}\r\n});\r\n\r\n\r\n// factory L.marker(latlng: LatLng, options? : Marker options)\r\n\r\n// @factory L.marker(latlng: LatLng, options? : Marker options)\r\n// Instantiates a Marker object given a geographical point and optionally an options object.\r\nfunction marker(latlng, options) {\r\n\treturn new Marker(latlng, options);\r\n}\n\n/*\n * @class Path\n * @aka L.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\nvar Path = Layer.extend({\n\n\t// @section\n\t// @aka Path options\n\toptions: {\n\t\t// @option stroke: Boolean = true\n\t\t// Whether to draw stroke along the path. Set it to `false` to disable borders on polygons or circles.\n\t\tstroke: true,\n\n\t\t// @option color: String = '#3388ff'\n\t\t// Stroke color\n\t\tcolor: '#3388ff',\n\n\t\t// @option weight: Number = 3\n\t\t// Stroke width in pixels\n\t\tweight: 3,\n\n\t\t// @option opacity: Number = 1.0\n\t\t// Stroke opacity\n\t\topacity: 1,\n\n\t\t// @option lineCap: String= 'round'\n\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\tlineCap: 'round',\n\n\t\t// @option lineJoin: String = 'round'\n\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\tlineJoin: 'round',\n\n\t\t// @option dashArray: String = null\n\t\t// A string that defines the stroke [dash pattern](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-dasharray). Doesn't work on `Canvas`-powered layers in [some old browsers](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setLineDash#Browser_compatibility).\n\t\tdashArray: null,\n\n\t\t// @option dashOffset: String = null\n\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). Doesn't work on `Canvas`-powered layers in [some old browsers](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setLineDash#Browser_compatibility).\n\t\tdashOffset: null,\n\n\t\t// @option fill: Boolean = depends\n\t\t// Whether to fill the path with color. Set it to `false` to disable filling on polygons or circles.\n\t\tfill: false,\n\n\t\t// @option fillColor: String = *\n\t\t// Fill color. Defaults to the value of the [`color`](#path-color) option\n\t\tfillColor: null,\n\n\t\t// @option fillOpacity: Number = 0.2\n\t\t// Fill opacity.\n\t\tfillOpacity: 0.2,\n\n\t\t// @option fillRule: String = 'evenodd'\n\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\tfillRule: 'evenodd',\n\n\t\t// className: '',\n\n\t\t// Option inherited from \"Interactive layer\" abstract class\n\t\tinteractive: true,\n\n\t\t// @option bubblingMouseEvents: Boolean = true\n\t\t// When `true`, a mouse event on this path will trigger the same event on the map\n\t\t// (unless [`L.DomEvent.stopPropagation`](#domevent-stoppropagation) is used).\n\t\tbubblingMouseEvents: true\n\t},\n\n\tbeforeAdd: function (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: function () {\n\t\tthis._renderer._initPath(this);\n\t\tthis._reset();\n\t\tthis._renderer._addPath(this);\n\t},\n\n\tonRemove: function () {\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: function () {\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: function (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.prototype.hasOwnProperty.call(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: function () {\n\t\tif (this._renderer) {\n\t\t\tthis._renderer._bringToFront(this);\n\t\t}\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: function () {\n\t\tif (this._renderer) {\n\t\t\tthis._renderer._bringToBack(this);\n\t\t}\n\t\treturn this;\n\t},\n\n\tgetElement: function () {\n\t\treturn this._path;\n\t},\n\n\t_reset: function () {\n\t\t// defined in child classes\n\t\tthis._project();\n\t\tthis._update();\n\t},\n\n\t_clickTolerance: function () {\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 * @aka L.CircleMarker\n * @inherits Path\n *\n * A circle of a fixed size with radius specified in pixels. Extends `Path`.\n */\n\nvar CircleMarker = Path.extend({\n\n\t// @section\n\t// @aka CircleMarker options\n\toptions: {\n\t\tfill: true,\n\n\t\t// @option radius: Number = 10\n\t\t// Radius of the circle marker, in pixels\n\t\tradius: 10\n\t},\n\n\tinitialize: function (latlng, options) {\n\t\tsetOptions(this, options);\n\t\tthis._latlng = toLatLng(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: function (latlng) {\n\t\tvar oldLatLng = this._latlng;\n\t\tthis._latlng = toLatLng(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: 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: function () {\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: function (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: function () {\n\t\treturn this._radius;\n\t},\n\n\tsetStyle : function (options) {\n\t\tvar radius = options && 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: function () {\n\t\tthis._point = this._map.latLngToLayerPoint(this._latlng);\n\t\tthis._updateBounds();\n\t},\n\n\t_updateBounds: function () {\n\t\tvar r = this._radius,\n\t\t r2 = this._radiusY || r,\n\t\t w = this._clickTolerance(),\n\t\t p = [r + w, r2 + w];\n\t\tthis._pxBounds = new Bounds(this._point.subtract(p), this._point.add(p));\n\t},\n\n\t_update: function () {\n\t\tif (this._map) {\n\t\t\tthis._updatePath();\n\t\t}\n\t},\n\n\t_updatePath: function () {\n\t\tthis._renderer._updateCircle(this);\n\t},\n\n\t_empty: function () {\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: function (p) {\n\t\treturn p.distanceTo(this._point) <= this._radius + this._clickTolerance();\n\t}\n});\n\n\n// @factory L.circleMarker(latlng: LatLng, options?: CircleMarker options)\n// Instantiates a circle marker object given a geographical point, and an optional options object.\nfunction circleMarker(latlng, options) {\n\treturn new CircleMarker(latlng, options);\n}\n\n/*\n * @class Circle\n * @aka L.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 * L.circle([50.5, 30.5], {radius: 200}).addTo(map);\n * ```\n */\n\nvar Circle = CircleMarker.extend({\n\n\tinitialize: function (latlng, options, legacyOptions) {\n\t\tif (typeof options === 'number') {\n\t\t\t// Backwards compatibility with 0.7.x factory (latlng, radius, options?)\n\t\t\toptions = extend({}, legacyOptions, {radius: options});\n\t\t}\n\t\tsetOptions(this, options);\n\t\tthis._latlng = toLatLng(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: function (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: function () {\n\t\treturn this._mRadius;\n\t},\n\n\t// @method getBounds(): LatLngBounds\n\t// Returns the `LatLngBounds` of the path.\n\tgetBounds: function () {\n\t\tvar 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: function () {\n\n\t\tvar lng = this._latlng.lng,\n\t\t lat = this._latlng.lat,\n\t\t map = this._map,\n\t\t crs = map.options.crs;\n\n\t\tif (crs.distance === Earth.distance) {\n\t\t\tvar d = Math.PI / 180,\n\t\t\t latR = (this._mRadius / Earth.R) / d,\n\t\t\t top = map.project([lat + latR, lng]),\n\t\t\t bottom = map.project([lat - latR, lng]),\n\t\t\t p = top.add(bottom).divideBy(2),\n\t\t\t lat2 = map.unproject(p).lat,\n\t\t\t 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\tvar 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 = this._point.x - map.latLngToLayerPoint(latlng2).x;\n\t\t}\n\n\t\tthis._updateBounds();\n\t}\n});\n\n// @factory L.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.\n// @alternative\n// @factory L.circle(latlng: LatLng, radius: Number, options?: Circle options)\n// Obsolete way of instantiating a circle, for compatibility with 0.7.x code.\n// Do not use in new applications or plugins.\nfunction circle(latlng, options, legacyOptions) {\n\treturn new Circle(latlng, options, legacyOptions);\n}\n\n/*\n * @class Polyline\n * @aka L.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 * var latlngs = [\n * \t[45.51, -122.68],\n * \t[37.77, -122.43],\n * \t[34.04, -118.2]\n * ];\n *\n * var polyline = L.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 * var 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\nvar Polyline = Path.extend({\n\n\t// @section\n\t// @aka Polyline options\n\toptions: {\n\t\t// @option smoothFactor: Number = 1.0\n\t\t// How much to simplify the polyline on each zoom level. More means\n\t\t// better performance and smoother look, and less means more accurate representation.\n\t\tsmoothFactor: 1.0,\n\n\t\t// @option noClip: Boolean = false\n\t\t// Disable polyline clipping.\n\t\tnoClip: false\n\t},\n\n\tinitialize: function (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: function () {\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: function (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: function () {\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: function (p) {\n\t\tvar minDistance = Infinity,\n\t\t minPoint = null,\n\t\t closest = _sqClosestPointOnSegment,\n\t\t p1, p2;\n\n\t\tfor (var j = 0, jLen = this._parts.length; j < jLen; j++) {\n\t\t\tvar points = this._parts[j];\n\n\t\t\tfor (var 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\tvar 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: function () {\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: function () {\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: function (latlng, latlngs) {\n\t\tlatlngs = latlngs || this._defaultShape();\n\t\tlatlng = toLatLng(latlng);\n\t\tlatlngs.push(latlng);\n\t\tthis._bounds.extend(latlng);\n\t\treturn this.redraw();\n\t},\n\n\t_setLatLngs: function (latlngs) {\n\t\tthis._bounds = new LatLngBounds();\n\t\tthis._latlngs = this._convertLatLngs(latlngs);\n\t},\n\n\t_defaultShape: function () {\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: function (latlngs) {\n\t\tvar result = [],\n\t\t flat = isFlat(latlngs);\n\n\t\tfor (var i = 0, len = latlngs.length; i < len; i++) {\n\t\t\tif (flat) {\n\t\t\t\tresult[i] = toLatLng(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: function () {\n\t\tvar 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: function () {\n\t\tvar w = this._clickTolerance(),\n\t\t p = 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: function (latlngs, result, projectedBounds) {\n\t\tvar flat = latlngs[0] instanceof LatLng,\n\t\t len = latlngs.length,\n\t\t i, ring;\n\n\t\tif (flat) {\n\t\t\tring = [];\n\t\t\tfor (i = 0; i < len; i++) {\n\t\t\t\tring[i] = this._map.latLngToLayerPoint(latlngs[i]);\n\t\t\t\tprojectedBounds.extend(ring[i]);\n\t\t\t}\n\t\t\tresult.push(ring);\n\t\t} else {\n\t\t\tfor (i = 0; i < len; i++) {\n\t\t\t\tthis._projectLatlngs(latlngs[i], result, projectedBounds);\n\t\t\t}\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: function () {\n\t\tvar 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\tvar parts = this._parts,\n\t\t 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] = parts[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: function () {\n\t\tvar parts = this._parts,\n\t\t tolerance = this.options.smoothFactor;\n\n\t\tfor (var 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: function () {\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: function () {\n\t\tthis._renderer._updatePoly(this);\n\t},\n\n\t// Needed by the `Canvas` renderer for interactivity\n\t_containsPoint: function (p, closed) {\n\t\tvar i, j, k, len, len2, part,\n\t\t 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// @factory L.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.\nfunction polyline(latlngs, options) {\n\treturn new Polyline(latlngs, options);\n}\n\n// Retrocompat. Allow plugins to support Leaflet versions before and after 1.1.\nPolyline._flat = _flat;\n\n/*\n * @class Polygon\n * @aka L.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 * var latlngs = [[37, -109.05],[41, -109.03],[41, -102.05],[37, -102.04]];\n *\n * var polygon = L.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 * var 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 * var 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\nvar Polygon = Polyline.extend({\n\n\toptions: {\n\t\tfill: true\n\t},\n\n\tisEmpty: function () {\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: function () {\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: function (latlngs) {\n\t\tvar result = Polyline.prototype._convertLatLngs.call(this, latlngs),\n\t\t len = 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: function (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: function () {\n\t\treturn isFlat(this._latlngs[0]) ? this._latlngs[0] : this._latlngs[0][0];\n\t},\n\n\t_clipPoints: function () {\n\t\t// polygons need a different clipping algorithm so we redefine that\n\n\t\tvar bounds = this._renderer._bounds,\n\t\t w = this.options.weight,\n\t\t p = 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 (var i = 0, len = this._rings.length, clipped; i < len; i++) {\n\t\t\tclipped = clipPolygon(this._rings[i], 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: function () {\n\t\tthis._renderer._updatePoly(this, true);\n\t},\n\n\t// Needed by the `Canvas` renderer for interactivity\n\t_containsPoint: function (p) {\n\t\tvar inside = false,\n\t\t part, 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\n// @factory L.polygon(latlngs: LatLng[], options?: Polyline options)\nfunction polygon(latlngs, options) {\n\treturn new Polygon(latlngs, options);\n}\n\n/*\r\n * @class GeoJSON\r\n * @aka L.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 * L.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\nvar GeoJSON = FeatureGroup.extend({\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 L.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: function (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: function (geojson) {\r\n\t\tvar features = isArray(geojson) ? geojson : geojson.features,\r\n\t\t i, len, feature;\r\n\r\n\t\tif (features) {\r\n\t\t\tfor (i = 0, len = features.length; i < len; i++) {\r\n\t\t\t\t// only add this if geometry or geometries are set and not null\r\n\t\t\t\tfeature = features[i];\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\tvar options = this.options;\r\n\r\n\t\tif (options.filter && !options.filter(geojson)) { return this; }\r\n\r\n\t\tvar 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: function (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 = extend({}, 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: function (style) {\r\n\t\treturn this.eachLayer(function (layer) {\r\n\t\t\tthis._setLayerStyle(layer, style);\r\n\t\t}, this);\r\n\t},\r\n\r\n\t_setLayerStyle: function (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 L.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\tvar geometry = geojson.type === 'Feature' ? geojson.geometry : geojson,\r\n\t coords = geometry ? geometry.coordinates : null,\r\n\t layers = [],\r\n\t pointToLayer = options && options.pointToLayer,\r\n\t _coordsToLatLng = options && options.coordsToLatLng || coordsToLatLng,\r\n\t latlng, latlngs, i, len;\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 (i = 0, len = coords.length; i < len; i++) {\r\n\t\t\tlatlng = _coordsToLatLng(coords[i]);\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 (i = 0, len = geometry.geometries.length; i < len; i++) {\r\n\t\t\tvar geoLayer = geometryToLayer({\r\n\t\t\t\tgeometry: geometry.geometries[i],\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 (i = 0, len = geometry.features.length; i < len; i++) {\r\n\t\t\tvar featureLayer = geometryToLayer(geometry.features[i], 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 && 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\tvar latlngs = [];\r\n\r\n\tfor (var i = 0, len = coords.length, latlng; i < len; i++) {\r\n\t\tlatlng = levelsDeep ?\r\n\t\t\tcoordsToLatLngs(coords[i], levelsDeep - 1, _coordsToLatLng) :\r\n\t\t\t(_coordsToLatLng || coordsToLatLng)(coords[i]);\r\n\r\n\t\tlatlngs.push(latlng);\r\n\t}\r\n\r\n\treturn latlngs;\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 = toLatLng(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, closed?: Boolean, precision?: Number|false): Array\r\n// Reverse of [`coordsToLatLngs`](#geojson-coordstolatlngs)\r\n// `closed` 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, closed, precision) {\r\n\tvar coords = [];\r\n\r\n\tfor (var i = 0, len = latlngs.length; i < len; i++) {\r\n\t\t// Check for flat arrays required to ensure unbalanced arrays are correctly converted in recursion\r\n\t\tcoords.push(levelsDeep ?\r\n\t\t\tlatLngsToCoords(latlngs[i], isFlat(latlngs[i]) ? 0 : levelsDeep - 1, closed, precision) :\r\n\t\t\tlatLngToCoords(latlngs[i], precision));\r\n\t}\r\n\r\n\tif (!levelsDeep && closed) {\r\n\t\tcoords.push(coords[0]);\r\n\t}\r\n\r\n\treturn coords;\r\n}\r\n\r\nfunction getFeature(layer, newGeometry) {\r\n\treturn layer.feature ?\r\n\t\textend({}, 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\nvar PointToGeoJSON = {\r\n\ttoGeoJSON: function (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: function (precision) {\r\n\t\tvar multi = !isFlat(this._latlngs);\r\n\r\n\t\tvar 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: function (precision) {\r\n\t\tvar holes = !isFlat(this._latlngs),\r\n\t\t multi = holes && !isFlat(this._latlngs[0]);\r\n\r\n\t\tvar 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: function (precision) {\r\n\t\tvar coords = [];\r\n\r\n\t\tthis.eachLayer(function (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: function (precision) {\r\n\r\n\t\tvar type = this.feature && this.feature.geometry && 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\tvar isGeometryCollection = type === 'GeometryCollection',\r\n\t\t jsons = [];\r\n\r\n\t\tthis.eachLayer(function (layer) {\r\n\t\t\tif (layer.toGeoJSON) {\r\n\t\t\t\tvar 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\tvar 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});\r\n\r\n// @namespace GeoJSON\r\n// @factory L.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\nfunction geoJSON(geojson, options) {\r\n\treturn new GeoJSON(geojson, options);\r\n}\r\n\r\n// Backward compatibility.\r\nvar geoJson = geoJSON;\n\n/*\r\n * @class ImageOverlay\r\n * @aka L.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 * var 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 * L.imageOverlay(imageUrl, imageBounds).addTo(map);\r\n * ```\r\n */\r\n\r\nvar ImageOverlay = Layer.extend({\r\n\r\n\t// @section\r\n\t// @aka ImageOverlay options\r\n\toptions: {\r\n\t\t// @option opacity: Number = 1.0\r\n\t\t// The opacity of the image overlay.\r\n\t\topacity: 1,\r\n\r\n\t\t// @option alt: String = ''\r\n\t\t// Text for the `alt` attribute of the image (useful for accessibility).\r\n\t\talt: '',\r\n\r\n\t\t// @option interactive: Boolean = false\r\n\t\t// If `true`, the image overlay will emit [mouse events](#interactive-layer) when clicked or hovered.\r\n\t\tinteractive: false,\r\n\r\n\t\t// @option crossOrigin: Boolean|String = false\r\n\t\t// Whether the crossOrigin attribute will be added to the image.\r\n\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// Refer to [CORS Settings](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for valid String values.\r\n\t\tcrossOrigin: false,\r\n\r\n\t\t// @option errorOverlayUrl: String = ''\r\n\t\t// URL to the overlay image to show in place of the overlay that failed to load.\r\n\t\terrorOverlayUrl: '',\r\n\r\n\t\t// @option zIndex: Number = 1\r\n\t\t// The explicit [zIndex](https://developer.mozilla.org/docs/Web/CSS/CSS_Positioning/Understanding_z_index) of the overlay layer.\r\n\t\tzIndex: 1,\r\n\r\n\t\t// @option className: String = ''\r\n\t\t// A custom class name to assign to the image. Empty by default.\r\n\t\tclassName: ''\r\n\t},\r\n\r\n\tinitialize: function (url, bounds, options) { // (String, LatLngBounds, Object)\r\n\t\tthis._url = url;\r\n\t\tthis._bounds = toLatLngBounds(bounds);\r\n\r\n\t\tsetOptions(this, options);\r\n\t},\r\n\r\n\tonAdd: function () {\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\taddClass(this._image, '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: function () {\r\n\t\tremove(this._image);\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: function (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: function (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: function () {\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: function () {\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: function (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: function (bounds) {\r\n\t\tthis._bounds = toLatLngBounds(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: function () {\r\n\t\tvar 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: function (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: function () {\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: function () {\r\n\t\treturn this._image;\r\n\t},\r\n\r\n\t_initImage: function () {\r\n\t\tvar wasElementSupplied = this._url.tagName === 'IMG';\r\n\t\tvar img = this._image = wasElementSupplied ? this._url : create$1('img');\r\n\r\n\t\taddClass(img, 'leaflet-image-layer');\r\n\t\tif (this._zoomAnimated) { addClass(img, 'leaflet-zoom-animated'); }\r\n\t\tif (this.options.className) { addClass(img, this.options.className); }\r\n\r\n\t\timg.onselectstart = falseFn;\r\n\t\timg.onmousemove = 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 = bind(this.fire, this, 'load');\r\n\t\timg.onerror = bind(this._overlayOnError, this, 'error');\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\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: function (e) {\r\n\t\tvar scale = this._map.getZoomScale(e.zoom),\r\n\t\t offset = 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: function () {\r\n\t\tvar image = this._image,\r\n\t\t bounds = new Bounds(\r\n\t\t this._map.latLngToLayerPoint(this._bounds.getNorthWest()),\r\n\t\t this._map.latLngToLayerPoint(this._bounds.getSouthEast())),\r\n\t\t size = 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: function () {\r\n\t\tsetOpacity(this._image, this.options.opacity);\r\n\t},\r\n\r\n\t_updateZIndex: function () {\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: function () {\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\tvar 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: function () {\r\n\t\treturn this._bounds.getCenter();\r\n\t}\r\n});\r\n\r\n// @factory L.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\nvar imageOverlay = function (url, bounds, options) {\r\n\treturn new ImageOverlay(url, bounds, options);\r\n};\n\n/*\r\n * @class VideoOverlay\r\n * @aka L.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 * HTML5 element.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var videoUrl = 'https://www.mapbox.com/bites/00188/patricia_nasa.webm',\r\n * \tvideoBounds = [[ 32, -130], [ 13, -100]];\r\n * L.videoOverlay(videoUrl, videoBounds ).addTo(map);\r\n * ```\r\n */\r\n\r\nvar VideoOverlay = ImageOverlay.extend({\r\n\r\n\t// @section\r\n\t// @aka VideoOverlay options\r\n\toptions: {\r\n\t\t// @option autoplay: Boolean = true\r\n\t\t// Whether the video starts playing automatically when loaded.\r\n\t\t// On some browsers autoplay will only work with `muted: true`\r\n\t\tautoplay: true,\r\n\r\n\t\t// @option loop: Boolean = true\r\n\t\t// Whether the video will loop back to the beginning when played.\r\n\t\tloop: true,\r\n\r\n\t\t// @option keepAspectRatio: Boolean = true\r\n\t\t// Whether the video will save aspect ratio after the projection.\r\n\t\t// Relevant for supported browsers. See [browser compatibility](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit)\r\n\t\tkeepAspectRatio: true,\r\n\r\n\t\t// @option muted: Boolean = false\r\n\t\t// Whether the video starts on mute when loaded.\r\n\t\tmuted: false,\r\n\r\n\t\t// @option playsInline: Boolean = true\r\n\t\t// Mobile browsers will play the video right where it is instead of open it up in fullscreen mode.\r\n\t\tplaysInline: true\r\n\t},\r\n\r\n\t_initImage: function () {\r\n\t\tvar wasElementSupplied = this._url.tagName === 'VIDEO';\r\n\t\tvar vid = this._image = wasElementSupplied ? this._url : create$1('video');\r\n\r\n\t\taddClass(vid, 'leaflet-image-layer');\r\n\t\tif (this._zoomAnimated) { addClass(vid, 'leaflet-zoom-animated'); }\r\n\t\tif (this.options.className) { addClass(vid, this.options.className); }\r\n\r\n\t\tvid.onselectstart = falseFn;\r\n\t\tvid.onmousemove = falseFn;\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 = bind(this.fire, this, 'load');\r\n\r\n\t\tif (wasElementSupplied) {\r\n\t\t\tvar sourceElements = vid.getElementsByTagName('source');\r\n\t\t\tvar sources = [];\r\n\t\t\tfor (var j = 0; j < sourceElements.length; j++) {\r\n\t\t\t\tsources.push(sourceElements[j].src);\r\n\t\t\t}\r\n\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 (!isArray(this._url)) { this._url = [this._url]; }\r\n\r\n\t\tif (!this.options.keepAspectRatio && Object.prototype.hasOwnProperty.call(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.loop = !!this.options.loop;\r\n\t\tvid.muted = !!this.options.muted;\r\n\t\tvid.playsInline = !!this.options.playsInline;\r\n\t\tfor (var i = 0; i < this._url.length; i++) {\r\n\t\t\tvar source = create$1('source');\r\n\t\t\tsource.src = this._url[i];\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});\r\n\r\n\r\n// @factory L.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\n\r\nfunction videoOverlay(video, bounds, options) {\r\n\treturn new VideoOverlay(video, bounds, options);\r\n}\n\n/*\n * @class SVGOverlay\n * @aka L.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 * var 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 * var svgElementBounds = [ [ 32, -130 ], [ 13, -100 ] ];\n * L.svgOverlay(svgElement, svgElementBounds).addTo(map);\n * ```\n */\n\nvar SVGOverlay = ImageOverlay.extend({\n\t_initImage: function () {\n\t\tvar el = this._image = this._url;\n\n\t\taddClass(el, 'leaflet-image-layer');\n\t\tif (this._zoomAnimated) { addClass(el, 'leaflet-zoom-animated'); }\n\t\tif (this.options.className) { addClass(el, this.options.className); }\n\n\t\tel.onselectstart = falseFn;\n\t\tel.onmousemove = 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\n// @factory L.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.\n\nfunction svgOverlay(el, bounds, options) {\n\treturn new SVGOverlay(el, bounds, options);\n}\n\n/*\r\n * @class DivOverlay\r\n * @inherits Interactive layer\r\n * @aka L.DivOverlay\r\n * Base model for L.Popup and L.Tooltip. Inherit from it for custom overlays like plugins.\r\n */\r\n\r\n// @namespace DivOverlay\r\nvar DivOverlay = Layer.extend({\r\n\r\n\t// @section\r\n\t// @aka DivOverlay options\r\n\toptions: {\r\n\t\t// @option interactive: Boolean = false\r\n\t\t// If true, the popup/tooltip will listen to the mouse events.\r\n\t\tinteractive: false,\r\n\r\n\t\t// @option offset: Point = Point(0, 0)\r\n\t\t// The offset of the overlay position.\r\n\t\toffset: [0, 0],\r\n\r\n\t\t// @option className: String = ''\r\n\t\t// A custom CSS class name to assign to the overlay.\r\n\t\tclassName: '',\r\n\r\n\t\t// @option pane: String = undefined\r\n\t\t// `Map pane` where the overlay will be added.\r\n\t\tpane: undefined,\r\n\r\n\t\t// @option content: String|HTMLElement|Function = ''\r\n\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// passed to the function. The function should return a `String` or `HTMLElement` to be used in the overlay.\r\n\t\tcontent: ''\r\n\t},\r\n\r\n\tinitialize: function (options, source) {\r\n\t\tif (options && (options instanceof L.LatLng || isArray(options))) {\r\n\t\t\tthis._latlng = toLatLng(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: function (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: function () {\r\n\t\tif (this._map) {\r\n\t\t\tthis._map.removeLayer(this);\r\n\t\t}\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: function (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: function (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\tsetOpacity(this._container, 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\tsetOpacity(this._container, 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\taddClass(this._container, 'leaflet-interactive');\r\n\t\t\tthis.addInteractiveTarget(this._container);\r\n\t\t}\r\n\t},\r\n\r\n\tonRemove: function (map) {\r\n\t\tif (map._fadeAnimated) {\r\n\t\t\tsetOpacity(this._container, 0);\r\n\t\t\tthis._removeTimeout = setTimeout(bind(remove, undefined, this._container), 200);\r\n\t\t} else {\r\n\t\t\tremove(this._container);\r\n\t\t}\r\n\r\n\t\tif (this.options.interactive) {\r\n\t\t\tremoveClass(this._container, '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: function () {\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: function (latlng) {\r\n\t\tthis._latlng = toLatLng(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\r\n\t// Returns the content of the overlay.\r\n\tgetContent: function () {\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: function (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: String|HTMLElement\r\n\t// Returns the HTML container of the overlay.\r\n\tgetElement: function () {\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: function () {\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: function () {\r\n\t\tvar 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: function () {\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: function () {\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: function () {\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: function (latlng) {\r\n\t\tvar 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\tvar layers = this._source._layers;\r\n\t\t\tfor (var id in layers) {\r\n\t\t\t\tif (layers[id]._map) {\r\n\t\t\t\t\tsource = layers[id];\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: function () {\r\n\t\tif (!this._content) { return; }\r\n\r\n\t\tvar node = this._contentNode;\r\n\t\tvar 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: function () {\r\n\t\tif (!this._map) { return; }\r\n\r\n\t\tvar pos = this._map.latLngToLayerPoint(this._latlng),\r\n\t\t offset = toPoint(this.options.offset),\r\n\t\t anchor = this._getAnchor();\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\tvar bottom = this._containerBottom = -offset.y,\r\n\t\t left = 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: function () {\r\n\t\treturn [0, 0];\r\n\t}\r\n\r\n});\r\n\r\nMap.include({\r\n\t_initOverlay: function (OverlayClass, content, latlng, options) {\r\n\t\tvar 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: function (OverlayClass, old, content, options) {\r\n\t\tvar 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 * @aka L.Popup\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 * var popup = L.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 * var popup = L.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\nvar Popup = DivOverlay.extend({\r\n\r\n\t// @section\r\n\t// @aka Popup options\r\n\toptions: {\r\n\t\t// @option pane: String = 'popupPane'\r\n\t\t// `Map pane` where the popup will be added.\r\n\t\tpane: 'popupPane',\r\n\r\n\t\t// @option offset: Point = Point(0, 7)\r\n\t\t// The offset of the popup position.\r\n\t\toffset: [0, 7],\r\n\r\n\t\t// @option maxWidth: Number = 300\r\n\t\t// Max width of the popup, in pixels.\r\n\t\tmaxWidth: 300,\r\n\r\n\t\t// @option minWidth: Number = 50\r\n\t\t// Min width of the popup, in pixels.\r\n\t\tminWidth: 50,\r\n\r\n\t\t// @option maxHeight: Number = null\r\n\t\t// If set, creates a scrollable container of the given height\r\n\t\t// inside a popup if its content exceeds it.\r\n\t\t// The scrollable container can be styled using the\r\n\t\t// `leaflet-popup-scrolled` CSS class selector.\r\n\t\tmaxHeight: null,\r\n\r\n\t\t// @option autoPan: Boolean = true\r\n\t\t// Set it to `false` if you don't want the map to do panning animation\r\n\t\t// to fit the opened popup.\r\n\t\tautoPan: true,\r\n\r\n\t\t// @option autoPanPaddingTopLeft: Point = null\r\n\t\t// The margin between the popup and the top left corner of the map\r\n\t\t// view after autopanning was performed.\r\n\t\tautoPanPaddingTopLeft: null,\r\n\r\n\t\t// @option autoPanPaddingBottomRight: Point = null\r\n\t\t// The margin between the popup and the bottom right corner of the map\r\n\t\t// view after autopanning was performed.\r\n\t\tautoPanPaddingBottomRight: null,\r\n\r\n\t\t// @option autoPanPadding: Point = Point(5, 5)\r\n\t\t// Equivalent of setting both top left and bottom right autopan padding to the same value.\r\n\t\tautoPanPadding: [5, 5],\r\n\r\n\t\t// @option keepInView: Boolean = false\r\n\t\t// Set it to `true` if you want to prevent users from panning the popup\r\n\t\t// off of the screen while it is open.\r\n\t\tkeepInView: false,\r\n\r\n\t\t// @option closeButton: Boolean = true\r\n\t\t// Controls the presence of a close button in the popup.\r\n\t\tcloseButton: true,\r\n\r\n\t\t// @option autoClose: Boolean = true\r\n\t\t// Set it to `false` if you want to override the default behavior of\r\n\t\t// the popup closing when another popup is opened.\r\n\t\tautoClose: true,\r\n\r\n\t\t// @option closeOnEscapeKey: Boolean = true\r\n\t\t// Set it to `false` if you want to override the default behavior of\r\n\t\t// the ESC key for closing of the popup.\r\n\t\tcloseOnEscapeKey: true,\r\n\r\n\t\t// @option closeOnClick: Boolean = *\r\n\t\t// Set it if you want to override the default behavior of the popup closing when user clicks\r\n\t\t// on the map. Defaults to the map's [`closePopupOnClick`](#map-closepopuponclick) option.\r\n\r\n\t\t// @option className: String = ''\r\n\t\t// A custom CSS class name to assign to the popup.\r\n\t\tclassName: ''\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: function (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: function (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: function (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: function () {\r\n\t\tvar events = DivOverlay.prototype.getEvents.call(this);\r\n\r\n\t\tif (this.options.closeOnClick !== undefined ? 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: function () {\r\n\t\tvar prefix = 'leaflet-popup',\r\n\t\t container = this._container = create$1('div',\r\n\t\t\tprefix + ' ' + (this.options.className || '') +\r\n\t\t\t' leaflet-zoom-animated');\r\n\r\n\t\tvar 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\tvar 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', 'Close popup');\r\n\t\t\tcloseButton.href = '#close';\r\n\t\t\tcloseButton.innerHTML = '<span aria-hidden=\"true\">×</span>';\r\n\r\n\t\t\ton(closeButton, 'click', function (ev) {\r\n\t\t\t\tpreventDefault(ev);\r\n\t\t\t\tthis.close();\r\n\t\t\t}, this);\r\n\t\t}\r\n\t},\r\n\r\n\t_updateLayout: function () {\r\n\t\tvar container = this._contentNode,\r\n\t\t style = container.style;\r\n\r\n\t\tstyle.width = '';\r\n\t\tstyle.whiteSpace = 'nowrap';\r\n\r\n\t\tvar width = container.offsetWidth;\r\n\t\twidth = Math.min(width, this.options.maxWidth);\r\n\t\twidth = Math.max(width, this.options.minWidth);\r\n\r\n\t\tstyle.width = (width + 1) + 'px';\r\n\t\tstyle.whiteSpace = '';\r\n\r\n\t\tstyle.height = '';\r\n\r\n\t\tvar height = container.offsetHeight,\r\n\t\t maxHeight = this.options.maxHeight,\r\n\t\t scrolledClass = 'leaflet-popup-scrolled';\r\n\r\n\t\tif (maxHeight && height > maxHeight) {\r\n\t\t\tstyle.height = maxHeight + 'px';\r\n\t\t\taddClass(container, scrolledClass);\r\n\t\t} else {\r\n\t\t\tremoveClass(container, scrolledClass);\r\n\t\t}\r\n\r\n\t\tthis._containerWidth = this._container.offsetWidth;\r\n\t},\r\n\r\n\t_animateZoom: function (e) {\r\n\t\tvar pos = this._map._latLngToNewLayerPoint(this._latlng, e.zoom, e.center),\r\n\t\t anchor = this._getAnchor();\r\n\t\tsetPosition(this._container, pos.add(anchor));\r\n\t},\r\n\r\n\t_adjustPan: function (e) {\r\n\t\tif (!this.options.autoPan) { return; }\r\n\t\tif (this._map._panAnim) { this._map._panAnim.stop(); }\r\n\r\n\t\tvar map = this._map,\r\n\t\t marginBottom = parseInt(getStyle(this._container, 'marginBottom'), 10) || 0,\r\n\t\t containerHeight = this._container.offsetHeight + marginBottom,\r\n\t\t containerWidth = this._containerWidth,\r\n\t\t layerPos = new Point(this._containerLeft, -containerHeight - this._containerBottom);\r\n\r\n\t\tlayerPos._add(getPosition(this._container));\r\n\r\n\t\tvar containerPos = map.layerPointToContainerPoint(layerPos),\r\n\t\t padding = toPoint(this.options.autoPanPadding),\r\n\t\t paddingTL = toPoint(this.options.autoPanPaddingTopLeft || padding),\r\n\t\t paddingBR = toPoint(this.options.autoPanPaddingBottomRight || padding),\r\n\t\t size = map.getSize(),\r\n\t\t dx = 0,\r\n\t\t dy = 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\tmap\r\n\t\t\t .fire('autopanstart')\r\n\t\t\t .panBy([dx, dy], {animate: e && e.type === 'moveend'});\r\n\t\t}\r\n\t},\r\n\r\n\t_getAnchor: function () {\r\n\t\t// Where should we anchor the popup on the source layer?\r\n\t\treturn toPoint(this._source && this._source._getPopupAnchor ? this._source._getPopupAnchor() : [0, 0]);\r\n\t}\r\n\r\n});\r\n\r\n// @namespace Popup\r\n// @factory L.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// @factory L.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\nvar popup = function (options, source) {\r\n\treturn new Popup(options, source);\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.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.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: function (popup, latlng, options) {\r\n\t\tthis._initOverlay(Popup, popup, latlng, options)\r\n\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: function (popup) {\r\n\t\tpopup = arguments.length ? popup : this._popup;\r\n\t\tif (popup) {\r\n\t\t\tpopup.close();\r\n\t\t}\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 * var layer = L.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: function (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: function () {\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: function (latlng) {\r\n\t\tif (this._popup && this._popup._prepareOpen(latlng)) {\r\n\t\t\t// open the popup on the map\r\n\t\t\tthis._popup.openOn(this._map);\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: function () {\r\n\t\tif (this._popup) {\r\n\t\t\tthis._popup.close();\r\n\t\t}\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: function () {\r\n\t\tif (this._popup) {\r\n\t\t\tthis._popup.toggle(this);\r\n\t\t}\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: function () {\r\n\t\treturn (this._popup ? 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: function (content) {\r\n\t\tif (this._popup) {\r\n\t\t\tthis._popup.setContent(content);\r\n\t\t}\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: function () {\r\n\t\treturn this._popup;\r\n\t},\r\n\r\n\t_openPopup: function (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\tvar target = e.layer || 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: function (e) {\r\n\t\tthis._popup.setLatLng(e.latlng);\r\n\t},\r\n\r\n\t_onKeyPress: function (e) {\r\n\t\tif (e.originalEvent.keyCode === 13) {\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 * @aka L.Tooltip\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 * var tooltip = L.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 * var tooltip = L.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\nvar Tooltip = DivOverlay.extend({\n\n\t// @section\n\t// @aka Tooltip options\n\toptions: {\n\t\t// @option pane: String = 'tooltipPane'\n\t\t// `Map pane` where the tooltip will be added.\n\t\tpane: 'tooltipPane',\n\n\t\t// @option offset: Point = Point(0, 0)\n\t\t// Optional offset of the tooltip position.\n\t\toffset: [0, 0],\n\n\t\t// @option direction: String = 'auto'\n\t\t// Direction where to open the tooltip. Possible values are: `right`, `left`,\n\t\t// `top`, `bottom`, `center`, `auto`.\n\t\t// `auto` will dynamically switch between `right` and `left` according to the tooltip\n\t\t// position on the map.\n\t\tdirection: 'auto',\n\n\t\t// @option permanent: Boolean = false\n\t\t// Whether to open the tooltip permanently or only on mouseover.\n\t\tpermanent: false,\n\n\t\t// @option sticky: Boolean = false\n\t\t// If true, the tooltip will follow the mouse instead of being fixed at the feature center.\n\t\tsticky: false,\n\n\t\t// @option opacity: Number = 0.9\n\t\t// Tooltip container opacity.\n\t\topacity: 0.9\n\t},\n\n\tonAdd: function (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: function (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: function () {\n\t\tvar 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: function () {\n\t\tvar prefix = 'leaflet-tooltip',\n\t\t className = 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: function () {},\n\n\t_adjustPan: function () {},\n\n\t_setPosition: function (pos) {\n\t\tvar subX, subY,\n\t\t map = this._map,\n\t\t container = this._container,\n\t\t centerPoint = map.latLngToContainerPoint(map.getCenter()),\n\t\t tooltipPoint = map.layerPointToContainerPoint(pos),\n\t\t direction = this.options.direction,\n\t\t tooltipWidth = container.offsetWidth,\n\t\t tooltipHeight = container.offsetHeight,\n\t\t offset = toPoint(this.options.offset),\n\t\t anchor = 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(toPoint(subX, subY, true)).add(offset).add(anchor);\n\n\t\tremoveClass(container, 'leaflet-tooltip-right');\n\t\tremoveClass(container, 'leaflet-tooltip-left');\n\t\tremoveClass(container, 'leaflet-tooltip-top');\n\t\tremoveClass(container, 'leaflet-tooltip-bottom');\n\t\taddClass(container, 'leaflet-tooltip-' + direction);\n\t\tsetPosition(container, pos);\n\t},\n\n\t_updatePosition: function () {\n\t\tvar pos = this._map.latLngToLayerPoint(this._latlng);\n\t\tthis._setPosition(pos);\n\t},\n\n\tsetOpacity: function (opacity) {\n\t\tthis.options.opacity = opacity;\n\n\t\tif (this._container) {\n\t\t\tsetOpacity(this._container, opacity);\n\t\t}\n\t},\n\n\t_animateZoom: function (e) {\n\t\tvar pos = this._map._latLngToNewLayerPoint(this._latlng, e.zoom, e.center);\n\t\tthis._setPosition(pos);\n\t},\n\n\t_getAnchor: function () {\n\t\t// Where should we anchor the tooltip on the source layer?\n\t\treturn toPoint(this._source && this._source._getTooltipAnchor && !this.options.sticky ? this._source._getTooltipAnchor() : [0, 0]);\n\t}\n\n});\n\n// @namespace Tooltip\n// @factory L.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// @factory L.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.\nvar tooltip = function (options, source) {\n\treturn new Tooltip(options, source);\n};\n\n// @namespace Map\n// @section Methods for Layers and Controls\nMap.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: function (tooltip, latlng, options) {\n\t\tthis._initOverlay(Tooltip, tooltip, latlng, options)\n\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: function (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 * var layer = L.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: function (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: function () {\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: function (remove) {\n\t\tif (!remove && this._tooltipHandlersAdded) { return; }\n\t\tvar onOff = remove ? 'off' : 'on',\n\t\t events = {\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.mouseover = this._openTooltip;\n\t\t\tevents.mouseout = this.closeTooltip;\n\t\t\tevents.click = this._openTooltip;\n\t\t\tif (this._map) {\n\t\t\t\tthis._addFocusListeners();\n\t\t\t} else {\n\t\t\t\tevents.add = this._addFocusListeners;\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.mousemove = 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: function (latlng) {\n\t\tif (this._tooltip && this._tooltip._prepareOpen(latlng)) {\n\t\t\t// open the tooltip on the map\n\t\t\tthis._tooltip.openOn(this._map);\n\n\t\t\tif (this.getElement) {\n\t\t\t\tthis._setAriaDescribedByOnLayer(this);\n\t\t\t} else if (this.eachLayer) {\n\t\t\t\tthis.eachLayer(this._setAriaDescribedByOnLayer, this);\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: function () {\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: function () {\n\t\tif (this._tooltip) {\n\t\t\tthis._tooltip.toggle(this);\n\t\t}\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: function () {\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: function (content) {\n\t\tif (this._tooltip) {\n\t\t\tthis._tooltip.setContent(content);\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method getTooltip(): Tooltip\n\t// Returns the tooltip bound to this layer.\n\tgetTooltip: function () {\n\t\treturn this._tooltip;\n\t},\n\n\t_addFocusListeners: function () {\n\t\tif (this.getElement) {\n\t\t\tthis._addFocusListenersOnLayer(this);\n\t\t} else if (this.eachLayer) {\n\t\t\tthis.eachLayer(this._addFocusListenersOnLayer, this);\n\t\t}\n\t},\n\n\t_addFocusListenersOnLayer: function (layer) {\n\t\ton(layer.getElement(), 'focus', function () {\n\t\t\tthis._tooltip._source = layer;\n\t\t\tthis.openTooltip();\n\t\t}, this);\n\t\ton(layer.getElement(), 'blur', this.closeTooltip, this);\n\t},\n\n\t_setAriaDescribedByOnLayer: function (layer) {\n\t\tlayer.getElement().setAttribute('aria-describedby', this._tooltip._container.id);\n\t},\n\n\n\t_openTooltip: function (e) {\n\t\tif (!this._tooltip || !this._map || (this._map.dragging && this._map.dragging.moving())) {\n\t\t\treturn;\n\t\t}\n\t\tthis._tooltip._source = e.layer || e.target;\n\n\t\tthis.openTooltip(this._tooltip.options.sticky ? e.latlng : undefined);\n\t},\n\n\t_moveTooltip: function (e) {\n\t\tvar latlng = e.latlng, containerPoint, layerPoint;\n\t\tif (this._tooltip.options.sticky && e.originalEvent) {\n\t\t\tcontainerPoint = this._map.mouseEventToContainerPoint(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 * @aka L.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 * var myIcon = L.divIcon({className: 'my-div-icon'});\n * // you can set .my-div-icon styles in CSS\n *\n * L.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\nvar DivIcon = Icon.extend({\n\toptions: {\n\t\t// @section\n\t\t// @aka DivIcon options\n\t\ticonSize: [12, 12], // also can be set through CSS\n\n\t\t// iconAnchor: (Point),\n\t\t// popupAnchor: (Point),\n\n\t\t// @option html: String|HTMLElement = ''\n\t\t// Custom HTML code to put inside the div element, empty by default. Alternatively,\n\t\t// an instance of `HTMLElement`.\n\t\thtml: false,\n\n\t\t// @option bgPos: Point = [0, 0]\n\t\t// Optional relative position of the background, in pixels\n\t\tbgPos: null,\n\n\t\tclassName: 'leaflet-div-icon'\n\t},\n\n\tcreateIcon: function (oldIcon) {\n\t\tvar div = (oldIcon && oldIcon.tagName === 'DIV') ? oldIcon : document.createElement('div'),\n\t\t options = this.options;\n\n\t\tif (options.html instanceof Element) {\n\t\t\tempty(div);\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\tvar bgPos = toPoint(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: function () {\n\t\treturn null;\n\t}\n});\n\n// @factory L.divIcon(options: DivIcon options)\n// Creates a `DivIcon` instance with the given options.\nfunction divIcon(options) {\n\treturn new DivIcon(options);\n}\n\nIcon.Default = IconDefault;\n\n/*\n * @class GridLayer\n * @inherits Layer\n * @aka L.GridLayer\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 * var CanvasLayer = L.GridLayer.extend({\n * createTile: function(coords){\n * // create a <canvas> element for drawing\n * var tile = L.DomUtil.create('canvas', 'leaflet-tile');\n *\n * // setup tile width and height according to the options\n * var 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 * var 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 * var CanvasLayer = L.GridLayer.extend({\n * createTile: function(coords, done){\n * var error;\n *\n * // create a <canvas> element for drawing\n * var tile = L.DomUtil.create('canvas', 'leaflet-tile');\n *\n * // setup tile width and height according to the options\n * var 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\nvar GridLayer = Layer.extend({\n\n\t// @section\n\t// @aka GridLayer options\n\toptions: {\n\t\t// @option tileSize: Number|Point = 256\n\t\t// Width and height of tiles in the grid. Use a number if width and height are equal, or `L.point(width, height)` otherwise.\n\t\ttileSize: 256,\n\n\t\t// @option opacity: Number = 1.0\n\t\t// Opacity of the tiles. Can be used in the `createTile()` function.\n\t\topacity: 1,\n\n\t\t// @option updateWhenIdle: Boolean = (depends)\n\t\t// Load new tiles only when panning ends.\n\t\t// `true` by default on mobile browsers, in order to avoid too many requests and keep smooth navigation.\n\t\t// `false` otherwise in order to display new tiles _during_ panning, since it is easy to pan outside the\n\t\t// [`keepBuffer`](#gridlayer-keepbuffer) option in desktop browsers.\n\t\tupdateWhenIdle: Browser.mobile,\n\n\t\t// @option updateWhenZooming: Boolean = true\n\t\t// By default, a smooth zoom animation (during a [touch zoom](#map-touchzoom) 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\tupdateWhenZooming: true,\n\n\t\t// @option updateInterval: Number = 200\n\t\t// Tiles will not update more than once every `updateInterval` milliseconds when panning.\n\t\tupdateInterval: 200,\n\n\t\t// @option zIndex: Number = 1\n\t\t// The explicit zIndex of the tile layer.\n\t\tzIndex: 1,\n\n\t\t// @option bounds: LatLngBounds = undefined\n\t\t// If set, tiles will only be loaded inside the set `LatLngBounds`.\n\t\tbounds: null,\n\n\t\t// @option minZoom: Number = 0\n\t\t// The minimum zoom level down to which this layer will be displayed (inclusive).\n\t\tminZoom: 0,\n\n\t\t// @option maxZoom: Number = undefined\n\t\t// The maximum zoom level up to which this layer will be displayed (inclusive).\n\t\tmaxZoom: undefined,\n\n\t\t// @option maxNativeZoom: Number = undefined\n\t\t// Maximum zoom number the tile source has available. If it is specified,\n\t\t// the tiles on all zoom levels higher than `maxNativeZoom` will be loaded\n\t\t// from `maxNativeZoom` level and auto-scaled.\n\t\tmaxNativeZoom: undefined,\n\n\t\t// @option minNativeZoom: Number = undefined\n\t\t// Minimum zoom number the tile source has available. If it is specified,\n\t\t// the tiles on all zoom levels lower than `minNativeZoom` will be loaded\n\t\t// from `minNativeZoom` level and auto-scaled.\n\t\tminNativeZoom: undefined,\n\n\t\t// @option noWrap: Boolean = false\n\t\t// Whether the layer is wrapped around the antimeridian. If `true`, the\n\t\t// GridLayer will only be displayed once at low zoom levels. Has no\n\t\t// effect when the [map CRS](#map-crs) doesn't wrap around. Can be used\n\t\t// in combination with [`bounds`](#gridlayer-bounds) to prevent requesting\n\t\t// tiles outside the CRS limits.\n\t\tnoWrap: false,\n\n\t\t// @option pane: String = 'tilePane'\n\t\t// `Map pane` where the grid layer will be added.\n\t\tpane: 'tilePane',\n\n\t\t// @option className: String = ''\n\t\t// A custom class name to assign to the tile layer. Empty by default.\n\t\tclassName: '',\n\n\t\t// @option keepBuffer: Number = 2\n\t\t// When panning the map, keep this many rows and columns of tiles before unloading them.\n\t\tkeepBuffer: 2\n\t},\n\n\tinitialize: function (options) {\n\t\tsetOptions(this, options);\n\t},\n\n\tonAdd: function () {\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: function (map) {\n\t\tmap._addZoomLimit(this);\n\t},\n\n\tonRemove: function (map) {\n\t\tthis._removeAllTiles();\n\t\tremove(this._container);\n\t\tmap._removeZoomLimit(this);\n\t\tthis._container = null;\n\t\tthis._tileZoom = undefined;\n\t},\n\n\t// @method bringToFront: this\n\t// Brings the tile layer to the top of all tile layers.\n\tbringToFront: function () {\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: function () {\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: function () {\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: function (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: function (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: function () {\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: function () {\n\t\tif (this._map) {\n\t\t\tthis._removeAllTiles();\n\t\t\tvar 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: function () {\n\t\tvar 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: function () {\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: function () {\n\t\tvar s = this.options.tileSize;\n\t\treturn s instanceof Point ? s : new Point(s, s);\n\t},\n\n\t_updateZIndex: function () {\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: function (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\tvar layers = this.getPane().children,\n\t\t edgeZIndex = -compare(-Infinity, Infinity); // -Infinity for max, Infinity for min\n\n\t\tfor (var i = 0, len = layers.length, zIndex; i < len; i++) {\n\n\t\t\tzIndex = layers[i].style.zIndex;\n\n\t\t\tif (layers[i] !== 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: function () {\n\t\tif (!this._map) { return; }\n\n\t\t// IE doesn't inherit filter opacity properly, so we're forced to set it on tiles\n\t\tif (Browser.ielt9) { return; }\n\n\t\tsetOpacity(this._container, this.options.opacity);\n\n\t\tvar now = +new Date(),\n\t\t nextFrame = false,\n\t\t willPrune = false;\n\n\t\tfor (var key in this._tiles) {\n\t\t\tvar tile = this._tiles[key];\n\t\t\tif (!tile.current || !tile.loaded) { continue; }\n\n\t\t\tvar fade = Math.min(1, (now - tile.loaded) / 200);\n\n\t\t\tsetOpacity(tile.el, 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\tcancelAnimFrame(this._fadeFrame);\n\t\t\tthis._fadeFrame = requestAnimFrame(this._updateOpacity, this);\n\t\t}\n\t},\n\n\t_onOpaqueTile: falseFn,\n\n\t_initContainer: function () {\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: function () {\n\n\t\tvar zoom = this._tileZoom,\n\t\t maxZoom = this.options.maxZoom;\n\n\t\tif (zoom === undefined) { return undefined; }\n\n\t\tfor (var z in 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\tremove(this._levels[z].el);\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\tvar level = this._levels[zoom],\n\t\t 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 the browser to consider 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: falseFn,\n\n\t_onRemoveLevel: falseFn,\n\n\t_onCreateLevel: falseFn,\n\n\t_pruneTiles: function () {\n\t\tif (!this._map) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar key, tile;\n\n\t\tvar 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 (key in this._tiles) {\n\t\t\ttile = this._tiles[key];\n\t\t\ttile.retain = tile.current;\n\t\t}\n\n\t\tfor (key in this._tiles) {\n\t\t\ttile = this._tiles[key];\n\t\t\tif (tile.current && !tile.active) {\n\t\t\t\tvar 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 (key in this._tiles) {\n\t\t\tif (!this._tiles[key].retain) {\n\t\t\t\tthis._removeTile(key);\n\t\t\t}\n\t\t}\n\t},\n\n\t_removeTilesAtZoom: function (zoom) {\n\t\tfor (var key in this._tiles) {\n\t\t\tif (this._tiles[key].coords.z !== zoom) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis._removeTile(key);\n\t\t}\n\t},\n\n\t_removeAllTiles: function () {\n\t\tfor (var key in this._tiles) {\n\t\t\tthis._removeTile(key);\n\t\t}\n\t},\n\n\t_invalidateAll: function () {\n\t\tfor (var z in this._levels) {\n\t\t\tremove(this._levels[z].el);\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: function (x, y, z, minZoom) {\n\t\tvar x2 = Math.floor(x / 2),\n\t\t y2 = Math.floor(y / 2),\n\t\t z2 = z - 1,\n\t\t coords2 = new Point(+x2, +y2);\n\t\tcoords2.z = +z2;\n\n\t\tvar key = this._tileCoordsToKey(coords2),\n\t\t tile = this._tiles[key];\n\n\t\tif (tile && tile.active) {\n\t\t\ttile.retain = true;\n\t\t\treturn true;\n\n\t\t} else if (tile && 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: function (x, y, z, maxZoom) {\n\n\t\tfor (var i = 2 * x; i < 2 * x + 2; i++) {\n\t\t\tfor (var j = 2 * y; j < 2 * y + 2; j++) {\n\n\t\t\t\tvar coords = new Point(i, j);\n\t\t\t\tcoords.z = z + 1;\n\n\t\t\t\tvar key = this._tileCoordsToKey(coords),\n\t\t\t\t tile = this._tiles[key];\n\n\t\t\t\tif (tile && 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 && 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: function (e) {\n\t\tvar animating = e && (e.pinch || e.flyTo);\n\t\tthis._setView(this._map.getCenter(), this._map.getZoom(), animating, animating);\n\t},\n\n\t_animateZoom: function (e) {\n\t\tthis._setView(e.center, e.zoom, true, e.noUpdate);\n\t},\n\n\t_clampZoom: function (zoom) {\n\t\tvar 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: function (center, zoom, noPrune, noUpdate) {\n\t\tvar 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\tvar 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: function (center, zoom) {\n\t\tfor (var i in this._levels) {\n\t\t\tthis._setZoomTransform(this._levels[i], center, zoom);\n\t\t}\n\t},\n\n\t_setZoomTransform: function (level, center, zoom) {\n\t\tvar scale = this._map.getZoomScale(zoom, level.zoom),\n\t\t translate = level.origin.multiplyBy(scale)\n\t\t .subtract(this._map._getNewPixelOrigin(center, zoom)).round();\n\n\t\tif (Browser.any3d) {\n\t\t\tsetTransform(level.el, translate, scale);\n\t\t} else {\n\t\t\tsetPosition(level.el, translate);\n\t\t}\n\t},\n\n\t_resetGrid: function () {\n\t\tvar map = this._map,\n\t\t crs = map.options.crs,\n\t\t tileSize = this._tileSize = this.getTileSize(),\n\t\t tileZoom = this._tileZoom;\n\n\t\tvar 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: function () {\n\t\tif (!this._map || this._map._animatingZoom) { return; }\n\n\t\tthis._update();\n\t},\n\n\t_getTiledPixelBounds: function (center) {\n\t\tvar map = this._map,\n\t\t mapZoom = map._animatingZoom ? Math.max(map._animateToZoom, map.getZoom()) : map.getZoom(),\n\t\t scale = map.getZoomScale(mapZoom, this._tileZoom),\n\t\t pixelCenter = map.project(center, this._tileZoom).floor(),\n\t\t halfSize = 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: function (center) {\n\t\tvar map = this._map;\n\t\tif (!map) { return; }\n\t\tvar 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\tvar pixelBounds = this._getTiledPixelBounds(center),\n\t\t tileRange = this._pxBoundsToTileRange(pixelBounds),\n\t\t tileCenter = tileRange.getCenter(),\n\t\t queue = [],\n\t\t margin = this.options.keepBuffer,\n\t\t noPruneRange = new Bounds(tileRange.getBottomLeft().subtract([margin, -margin]),\n\t\t tileRange.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 (var key in this._tiles) {\n\t\t\tvar c = this._tiles[key].coords;\n\t\t\tif (c.z !== this._tileZoom || !noPruneRange.contains(new Point(c.x, c.y))) {\n\t\t\t\tthis._tiles[key].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 (var j = tileRange.min.y; j <= tileRange.max.y; j++) {\n\t\t\tfor (var i = tileRange.min.x; i <= tileRange.max.x; i++) {\n\t\t\t\tvar 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\tvar 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(function (a, b) {\n\t\t\treturn a.distanceTo(tileCenter) - b.distanceTo(tileCenter);\n\t\t});\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\tvar fragment = document.createDocumentFragment();\n\n\t\t\tfor (i = 0; i < queue.length; i++) {\n\t\t\t\tthis._addTile(queue[i], fragment);\n\t\t\t}\n\n\t\t\tthis._level.el.appendChild(fragment);\n\t\t}\n\t},\n\n\t_isValidTile: function (coords) {\n\t\tvar 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\tvar 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\tvar tileBounds = this._tileCoordsToBounds(coords);\n\t\treturn toLatLngBounds(this.options.bounds).overlaps(tileBounds);\n\t},\n\n\t_keyToBounds: function (key) {\n\t\treturn this._tileCoordsToBounds(this._keyToTileCoords(key));\n\t},\n\n\t_tileCoordsToNwSe: function (coords) {\n\t\tvar map = this._map,\n\t\t tileSize = this.getTileSize(),\n\t\t nwPoint = coords.scaleBy(tileSize),\n\t\t sePoint = nwPoint.add(tileSize),\n\t\t nw = map.unproject(nwPoint, coords.z),\n\t\t se = 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: function (coords) {\n\t\tvar bp = this._tileCoordsToNwSe(coords),\n\t\t 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: function (coords) {\n\t\treturn coords.x + ':' + coords.y + ':' + coords.z;\n\t},\n\n\t// converts tile cache key to coordinates\n\t_keyToTileCoords: function (key) {\n\t\tvar k = key.split(':'),\n\t\t coords = new Point(+k[0], +k[1]);\n\t\tcoords.z = +k[2];\n\t\treturn coords;\n\t},\n\n\t_removeTile: function (key) {\n\t\tvar tile = this._tiles[key];\n\t\tif (!tile) { return; }\n\n\t\tremove(tile.el);\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: function (tile) {\n\t\taddClass(tile, 'leaflet-tile');\n\n\t\tvar 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.onmousemove = falseFn;\n\n\t\t// update opacity on tiles in IE7-8 because of filter inheritance problems\n\t\tif (Browser.ielt9 && this.options.opacity < 1) {\n\t\t\tsetOpacity(tile, this.options.opacity);\n\t\t}\n\t},\n\n\t_addTile: function (coords, container) {\n\t\tvar tilePos = this._getTilePos(coords),\n\t\t key = this._tileCoordsToKey(coords);\n\n\t\tvar tile = this.createTile(this._wrapCoords(coords), bind(this._tileReady, 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\trequestAnimFrame(bind(this._tileReady, 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: coords,\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: tile,\n\t\t\tcoords: coords\n\t\t});\n\t},\n\n\t_tileReady: function (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: tile,\n\t\t\t\tcoords: coords\n\t\t\t});\n\t\t}\n\n\t\tvar 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\tsetOpacity(tile.el, 0);\n\t\t\tcancelAnimFrame(this._fadeFrame);\n\t\t\tthis._fadeFrame = requestAnimFrame(this._updateOpacity, 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\taddClass(tile.el, '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: coords\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 (Browser.ielt9 || !this._map._fadeAnimated) {\n\t\t\t\trequestAnimFrame(this._pruneTiles, 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\tsetTimeout(bind(this._pruneTiles, this), 250);\n\t\t\t}\n\t\t}\n\t},\n\n\t_getTilePos: function (coords) {\n\t\treturn coords.scaleBy(this.getTileSize()).subtract(this._level.origin);\n\t},\n\n\t_wrapCoords: function (coords) {\n\t\tvar 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: function (bounds) {\n\t\tvar 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: function () {\n\t\tfor (var key in this._tiles) {\n\t\t\tif (!this._tiles[key].loaded) { return false; }\n\t\t}\n\t\treturn true;\n\t}\n});\n\n// @factory L.gridLayer(options?: GridLayer options)\n// Creates a new instance of GridLayer with the supplied options.\nfunction gridLayer(options) {\n\treturn new GridLayer(options);\n}\n\n/*\r\n * @class TileLayer\r\n * @inherits GridLayer\r\n * @aka L.TileLayer\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 * L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png?{foo}', {foo: 'bar', attribution: '© <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors'}).addTo(map);\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 \"@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 * L.tileLayer('https://{s}.somedomain.com/{foo}/{z}/{x}/{y}.png', {foo: 'bar'});\r\n * ```\r\n */\r\n\r\n\r\nvar TileLayer = GridLayer.extend({\r\n\r\n\t// @section\r\n\t// @aka TileLayer options\r\n\toptions: {\r\n\t\t// @option minZoom: Number = 0\r\n\t\t// The minimum zoom level down to which this layer will be displayed (inclusive).\r\n\t\tminZoom: 0,\r\n\r\n\t\t// @option maxZoom: Number = 18\r\n\t\t// The maximum zoom level up to which this layer will be displayed (inclusive).\r\n\t\tmaxZoom: 18,\r\n\r\n\t\t// @option subdomains: String|String[] = 'abc'\r\n\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\tsubdomains: 'abc',\r\n\r\n\t\t// @option errorTileUrl: String = ''\r\n\t\t// URL to the tile image to show in place of the tile that failed to load.\r\n\t\terrorTileUrl: '',\r\n\r\n\t\t// @option zoomOffset: Number = 0\r\n\t\t// The zoom number used in tile URLs will be offset with this value.\r\n\t\tzoomOffset: 0,\r\n\r\n\t\t// @option tms: Boolean = false\r\n\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\ttms: false,\r\n\r\n\t\t// @option zoomReverse: Boolean = false\r\n\t\t// If set to true, the zoom number used in tile URLs will be reversed (`maxZoom - zoom` instead of `zoom`)\r\n\t\tzoomReverse: false,\r\n\r\n\t\t// @option detectRetina: Boolean = false\r\n\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\tdetectRetina: false,\r\n\r\n\t\t// @option crossOrigin: Boolean|String = false\r\n\t\t// Whether the crossOrigin attribute will be added to the tiles.\r\n\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// Refer to [CORS Settings](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for valid String values.\r\n\t\tcrossOrigin: false,\r\n\r\n\t\t// @option referrerPolicy: Boolean|String = false\r\n\t\t// Whether the referrerPolicy attribute will be added to the tiles.\r\n\t\t// If a String is provided, all tiles will have their referrerPolicy attribute set to the String provided.\r\n\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// (e.g. to validate an API token).\r\n\t\t// Refer to [HTMLImageElement.referrerPolicy](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/referrerPolicy) for valid String values.\r\n\t\treferrerPolicy: false\r\n\t},\r\n\r\n\tinitialize: function (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// 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: function (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: function (coords, done) {\r\n\t\tvar tile = document.createElement('img');\r\n\r\n\t\ton(tile, 'load', bind(this._tileOnLoad, this, done, tile));\r\n\t\ton(tile, 'error', bind(this._tileOnError, 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: function (coords) {\r\n\t\tvar 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\tvar 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, extend(data, this.options));\r\n\t},\r\n\r\n\t_tileOnLoad: function (done, tile) {\r\n\t\t// For https://github.com/Leaflet/Leaflet/issues/3332\r\n\t\tif (Browser.ielt9) {\r\n\t\t\tsetTimeout(bind(done, this, null, tile), 0);\r\n\t\t} else {\r\n\t\t\tdone(null, tile);\r\n\t\t}\r\n\t},\r\n\r\n\t_tileOnError: function (done, tile, e) {\r\n\t\tvar 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: function (e) {\r\n\t\te.tile.onload = null;\r\n\t},\r\n\r\n\t_getZoomForUrl: function () {\r\n\t\tvar zoom = this._tileZoom,\r\n\t\tmaxZoom = 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: function (tilePoint) {\r\n\t\tvar 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: function () {\r\n\t\tvar i, tile;\r\n\t\tfor (i in 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\tvar coords = this._tiles[i].coords;\r\n\t\t\t\t\tremove(tile);\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: tile,\r\n\t\t\t\t\t\tcoords: coords\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: function (key) {\r\n\t\tvar 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: function (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\r\n\r\n// @factory L.tilelayer(urlTemplate: String, options?: TileLayer options)\r\n// Instantiates a tile layer object given a `URL template` and optionally an options object.\r\n\r\nfunction tileLayer(url, options) {\r\n\treturn new TileLayer(url, options);\r\n}\n\n/*\r\n * @class TileLayer.WMS\r\n * @inherits TileLayer\r\n * @aka L.TileLayer.WMS\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 * var nexrad = L.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\nvar TileLayerWMS = TileLayer.extend({\r\n\r\n\t// @section\r\n\t// @aka TileLayer.WMS options\r\n\t// If any custom options not documented here are used, they will be sent to the\r\n\t// WMS server as extra parameters in each request URL. This can be useful for\r\n\t// [non-standard vendor WMS parameters](https://docs.geoserver.org/stable/en/user/services/wms/vendor.html).\r\n\tdefaultWmsParams: {\r\n\t\tservice: 'WMS',\r\n\t\trequest: 'GetMap',\r\n\r\n\t\t// @option layers: String = ''\r\n\t\t// **(required)** Comma-separated list of WMS layers to show.\r\n\t\tlayers: '',\r\n\r\n\t\t// @option styles: String = ''\r\n\t\t// Comma-separated list of WMS styles.\r\n\t\tstyles: '',\r\n\r\n\t\t// @option format: String = 'image/jpeg'\r\n\t\t// WMS image format (use `'image/png'` for layers with transparency).\r\n\t\tformat: 'image/jpeg',\r\n\r\n\t\t// @option transparent: Boolean = false\r\n\t\t// If `true`, the WMS service will return images with transparency.\r\n\t\ttransparent: false,\r\n\r\n\t\t// @option version: String = '1.1.1'\r\n\t\t// Version of the WMS service to use\r\n\t\tversion: '1.1.1'\r\n\t},\r\n\r\n\toptions: {\r\n\t\t// @option crs: CRS = null\r\n\t\t// Coordinate Reference System to use for the WMS requests, defaults to\r\n\t\t// map CRS. Don't change this if you're not sure what it means.\r\n\t\tcrs: null,\r\n\r\n\t\t// @option uppercase: Boolean = false\r\n\t\t// If `true`, WMS request parameter keys will be uppercase.\r\n\t\tuppercase: false\r\n\t},\r\n\r\n\tinitialize: function (url, options) {\r\n\r\n\t\tthis._url = url;\r\n\r\n\t\tvar wmsParams = extend({}, this.defaultWmsParams);\r\n\r\n\t\t// all keys that are not TileLayer options go to WMS params\r\n\t\tfor (var i in options) {\r\n\t\t\tif (!(i in this.options)) {\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\tvar realRetina = options.detectRetina && Browser.retina ? 2 : 1;\r\n\t\tvar 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: function (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\tvar 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: function (coords) {\r\n\r\n\t\tvar tileBounds = this._tileCoordsToNwSe(coords),\r\n\t\t crs = this._crs,\r\n\t\t bounds = toBounds(crs.project(tileBounds[0]), crs.project(tileBounds[1])),\r\n\t\t min = bounds.min,\r\n\t\t max = bounds.max,\r\n\t\t bbox = (this._wmsVersion >= 1.3 && this._crs === EPSG4326 ?\r\n\t\t [min.y, min.x, max.y, max.x] :\r\n\t\t [min.x, min.y, max.x, max.y]).join(','),\r\n\t\t url = TileLayer.prototype.getTileUrl.call(this, coords);\r\n\t\treturn url +\r\n\t\t\tgetParamString(this.wmsParams, url, this.options.uppercase) +\r\n\t\t\t(this.options.uppercase ? '&BBOX=' : '&bbox=') + bbox;\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: function (params, noRedraw) {\r\n\r\n\t\textend(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});\r\n\r\n\r\n// @factory L.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\nfunction tileLayerWMS(url, options) {\r\n\treturn new TileLayerWMS(url, options);\r\n}\n\nTileLayer.WMS = TileLayerWMS;\ntileLayer.wms = tileLayerWMS;\n\n/*\n * @class Renderer\n * @inherits Layer\n * @aka L.Renderer\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 * @event update: Event\n * Fired when the renderer updates its bounds, center and zoom, for example when\n * its map has moved\n */\n\nvar Renderer = Layer.extend({\n\n\t// @section\n\t// @aka Renderer options\n\toptions: {\n\t\t// @option padding: Number = 0.1\n\t\t// How much to extend the clip area around the map view (relative to its size)\n\t\t// e.g. 0.1 would be 10% of map view in each direction\n\t\tpadding: 0.1\n\t},\n\n\tinitialize: function (options) {\n\t\tsetOptions(this, options);\n\t\tstamp(this);\n\t\tthis._layers = this._layers || {};\n\t},\n\n\tonAdd: function () {\n\t\tif (!this._container) {\n\t\t\tthis._initContainer(); // defined by renderer implementations\n\n\t\t\tif (this._zoomAnimated) {\n\t\t\t\taddClass(this._container, 'leaflet-zoom-animated');\n\t\t\t}\n\t\t}\n\n\t\tthis.getPane().appendChild(this._container);\n\t\tthis._update();\n\t\tthis.on('update', this._updatePaths, this);\n\t},\n\n\tonRemove: function () {\n\t\tthis.off('update', this._updatePaths, this);\n\t\tthis._destroyContainer();\n\t},\n\n\tgetEvents: function () {\n\t\tvar events = {\n\t\t\tviewreset: this._reset,\n\t\t\tzoom: this._onZoom,\n\t\t\tmoveend: this._update,\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\treturn events;\n\t},\n\n\t_onAnimZoom: function (ev) {\n\t\tthis._updateTransform(ev.center, ev.zoom);\n\t},\n\n\t_onZoom: function () {\n\t\tthis._updateTransform(this._map.getCenter(), this._map.getZoom());\n\t},\n\n\t_updateTransform: function (center, zoom) {\n\t\tvar scale = this._map.getZoomScale(zoom, this._zoom),\n\t\t viewHalf = this._map.getSize().multiplyBy(0.5 + this.options.padding),\n\t\t currentCenterPoint = this._map.project(this._center, zoom),\n\n\t\t topLeftOffset = viewHalf.multiplyBy(-scale).add(currentCenterPoint)\n\t\t\t\t .subtract(this._map._getNewPixelOrigin(center, zoom));\n\n\t\tif (Browser.any3d) {\n\t\t\tsetTransform(this._container, topLeftOffset, scale);\n\t\t} else {\n\t\t\tsetPosition(this._container, topLeftOffset);\n\t\t}\n\t},\n\n\t_reset: function () {\n\t\tthis._update();\n\t\tthis._updateTransform(this._center, this._zoom);\n\n\t\tfor (var id in this._layers) {\n\t\t\tthis._layers[id]._reset();\n\t\t}\n\t},\n\n\t_onZoomEnd: function () {\n\t\tfor (var id in this._layers) {\n\t\t\tthis._layers[id]._project();\n\t\t}\n\t},\n\n\t_updatePaths: function () {\n\t\tfor (var id in this._layers) {\n\t\t\tthis._layers[id]._update();\n\t\t}\n\t},\n\n\t_update: function () {\n\t\t// Update pixel bounds of renderer container (for positioning/sizing/clipping later)\n\t\t// Subclasses are responsible of firing the 'update' event.\n\t\tvar p = this.options.padding,\n\t\t size = this._map.getSize(),\n\t\t min = 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}\n});\n\n/*\n * @class Canvas\n * @inherits Renderer\n * @aka L.Canvas\n *\n * Allows vector layers to be displayed with [`<canvas>`](https://developer.mozilla.org/docs/Web/API/Canvas_API).\n * Inherits `Renderer`.\n *\n * Due to [technical limitations](https://caniuse.com/canvas), Canvas is not\n * available in all web browsers, notably IE8, and overlapping geometries might\n * not display properly in some edge cases.\n *\n * @example\n *\n * Use Canvas by default for all paths in the map:\n *\n * ```js\n * var map = L.map('map', {\n * \trenderer: L.canvas()\n * });\n * ```\n *\n * Use a Canvas renderer with extra padding for specific vector geometries:\n *\n * ```js\n * var map = L.map('map');\n * var myRenderer = L.canvas({ padding: 0.5 });\n * var line = L.polyline( coordinates, { renderer: myRenderer } );\n * var circle = L.circle( center, { renderer: myRenderer } );\n * ```\n */\n\nvar Canvas = Renderer.extend({\n\n\t// @section\n\t// @aka Canvas options\n\toptions: {\n\t\t// @option tolerance: Number = 0\n\t\t// How much to extend the click tolerance around a path/object on the map.\n\t\ttolerance: 0\n\t},\n\n\tgetEvents: function () {\n\t\tvar events = Renderer.prototype.getEvents.call(this);\n\t\tevents.viewprereset = this._onViewPreReset;\n\t\treturn events;\n\t},\n\n\t_onViewPreReset: function () {\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: function () {\n\t\tRenderer.prototype.onAdd.call(this);\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\t_initContainer: function () {\n\t\tvar container = this._container = document.createElement('canvas');\n\n\t\ton(container, 'mousemove', this._onMouseMove, this);\n\t\ton(container, 'click dblclick mousedown mouseup contextmenu', this._onClick, this);\n\t\ton(container, 'mouseout', this._handleMouseOut, this);\n\t\tcontainer['_leaflet_disable_events'] = true;\n\n\t\tthis._ctx = container.getContext('2d');\n\t},\n\n\t_destroyContainer: function () {\n\t\tcancelAnimFrame(this._redrawRequest);\n\t\tdelete this._ctx;\n\t\tremove(this._container);\n\t\toff(this._container);\n\t\tdelete this._container;\n\t},\n\n\t_updatePaths: function () {\n\t\tif (this._postponeUpdatePaths) { return; }\n\n\t\tvar layer;\n\t\tthis._redrawBounds = null;\n\t\tfor (var id in this._layers) {\n\t\t\tlayer = this._layers[id];\n\t\t\tlayer._update();\n\t\t}\n\t\tthis._redraw();\n\t},\n\n\t_update: function () {\n\t\tif (this._map._animatingZoom && this._bounds) { return; }\n\n\t\tRenderer.prototype._update.call(this);\n\n\t\tvar b = this._bounds,\n\t\t container = this._container,\n\t\t size = b.getSize(),\n\t\t m = Browser.retina ? 2 : 1;\n\n\t\tsetPosition(container, b.min);\n\n\t\t// set canvas size (also clearing it); use double size on retina\n\t\tcontainer.width = m * size.x;\n\t\tcontainer.height = m * size.y;\n\t\tcontainer.style.width = size.x + 'px';\n\t\tcontainer.style.height = size.y + 'px';\n\n\t\tif (Browser.retina) {\n\t\t\tthis._ctx.scale(2, 2);\n\t\t}\n\n\t\t// translate so we use the same path coordinates after canvas element moves\n\t\tthis._ctx.translate(-b.min.x, -b.min.y);\n\n\t\t// Tell paths to redraw themselves\n\t\tthis.fire('update');\n\t},\n\n\t_reset: function () {\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: function (layer) {\n\t\tthis._updateDashArray(layer);\n\t\tthis._layers[stamp(layer)] = layer;\n\n\t\tvar order = layer._order = {\n\t\t\tlayer: layer,\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._drawFirst || this._drawLast;\n\t},\n\n\t_addPath: function (layer) {\n\t\tthis._requestRedraw(layer);\n\t},\n\n\t_removePath: function (layer) {\n\t\tvar order = layer._order;\n\t\tvar next = order.next;\n\t\tvar 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: function (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: function (layer) {\n\t\tthis._updateDashArray(layer);\n\t\tthis._requestRedraw(layer);\n\t},\n\n\t_updateDashArray: function (layer) {\n\t\tif (typeof layer.options.dashArray === 'string') {\n\t\t\tvar parts = layer.options.dashArray.split(/[, ]+/),\n\t\t\t dashArray = [],\n\t\t\t dashValue,\n\t\t\t i;\n\t\t\tfor (i = 0; i < parts.length; i++) {\n\t\t\t\tdashValue = Number(parts[i]);\n\t\t\t\t// Ignore dash array containing invalid lengths\n\t\t\t\tif (isNaN(dashValue)) { return; }\n\t\t\t\tdashArray.push(dashValue);\n\t\t\t}\n\t\t\tlayer.options._dashArray = dashArray;\n\t\t} else {\n\t\t\tlayer.options._dashArray = layer.options.dashArray;\n\t\t}\n\t},\n\n\t_requestRedraw: function (layer) {\n\t\tif (!this._map) { return; }\n\n\t\tthis._extendRedrawBounds(layer);\n\t\tthis._redrawRequest = this._redrawRequest || requestAnimFrame(this._redraw, this);\n\t},\n\n\t_extendRedrawBounds: function (layer) {\n\t\tif (layer._pxBounds) {\n\t\t\tvar padding = (layer.options.weight || 0) + 1;\n\t\t\tthis._redrawBounds = this._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: function () {\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: function () {\n\t\tvar bounds = this._redrawBounds;\n\t\tif (bounds) {\n\t\t\tvar 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: function () {\n\t\tvar layer, bounds = this._redrawBounds;\n\t\tthis._ctx.save();\n\t\tif (bounds) {\n\t\t\tvar 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 (var 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: function (layer, closed) {\n\t\tif (!this._drawing) { return; }\n\n\t\tvar i, j, len2, p,\n\t\t parts = layer._parts,\n\t\t len = parts.length,\n\t\t ctx = this._ctx;\n\n\t\tif (!len) { return; }\n\n\t\tctx.beginPath();\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tfor (j = 0, len2 = parts[i].length; j < len2; j++) {\n\t\t\t\tp = parts[i][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: function (layer) {\n\n\t\tif (!this._drawing || layer._empty()) { return; }\n\n\t\tvar p = layer._point,\n\t\t ctx = this._ctx,\n\t\t r = Math.max(Math.round(layer._radius), 1),\n\t\t s = (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: function (ctx, layer) {\n\t\tvar 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.setLineDash(layer.options && layer.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 mouse events for individual drawn objects,\n\t// so we emulate that by calculating what's under the mouse on mousemove/click manually\n\n\t_onClick: function (e) {\n\t\tvar point = this._map.mouseEventToLayerPoint(e), layer, clickedLayer;\n\n\t\tfor (var 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_onMouseMove: function (e) {\n\t\tif (!this._map || this._map.dragging.moving() || this._map._animatingZoom) { return; }\n\n\t\tvar point = this._map.mouseEventToLayerPoint(e);\n\t\tthis._handleMouseHover(e, point);\n\t},\n\n\n\t_handleMouseOut: function (e) {\n\t\tvar layer = this._hoveredLayer;\n\t\tif (layer) {\n\t\t\t// if we're leaving the layer, fire mouseout\n\t\t\tremoveClass(this._container, 'leaflet-interactive');\n\t\t\tthis._fireEvent([layer], e, 'mouseout');\n\t\t\tthis._hoveredLayer = null;\n\t\t\tthis._mouseHoverThrottled = false;\n\t\t}\n\t},\n\n\t_handleMouseHover: function (e, point) {\n\t\tif (this._mouseHoverThrottled) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar layer, candidateHoveredLayer;\n\n\t\tfor (var 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._handleMouseOut(e);\n\n\t\t\tif (candidateHoveredLayer) {\n\t\t\t\taddClass(this._container, 'leaflet-interactive'); // change cursor\n\t\t\t\tthis._fireEvent([candidateHoveredLayer], e, 'mouseover');\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._mouseHoverThrottled = true;\n\t\tsetTimeout(bind(function () {\n\t\t\tthis._mouseHoverThrottled = false;\n\t\t}, this), 32);\n\t},\n\n\t_fireEvent: function (layers, e, type) {\n\t\tthis._map._fireDOMEvent(e, type || e.type, layers);\n\t},\n\n\t_bringToFront: function (layer) {\n\t\tvar order = layer._order;\n\n\t\tif (!order) { return; }\n\n\t\tvar next = order.next;\n\t\tvar 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: function (layer) {\n\t\tvar order = layer._order;\n\n\t\tif (!order) { return; }\n\n\t\tvar next = order.next;\n\t\tvar 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// @factory L.canvas(options?: Renderer options)\n// Creates a Canvas renderer with the given options.\nfunction canvas(options) {\n\treturn Browser.canvas ? new Canvas(options) : null;\n}\n\n/*\n * Thanks to Dmitry Baranovsky and his Raphael library for inspiration!\n */\n\n\nvar vmlCreate = (function () {\n\ttry {\n\t\tdocument.namespaces.add('lvml', 'urn:schemas-microsoft-com:vml');\n\t\treturn function (name) {\n\t\t\treturn document.createElement('<lvml:' + name + ' class=\"lvml\">');\n\t\t};\n\t} catch (e) {\n\t\t// Do not return fn from catch block so `e` can be garbage collected\n\t\t// See https://github.com/Leaflet/Leaflet/pull/7279\n\t}\n\treturn function (name) {\n\t\treturn document.createElement('<' + name + ' xmlns=\"urn:schemas-microsoft.com:vml\" class=\"lvml\">');\n\t};\n})();\n\n\n/*\n * @class SVG\n *\n *\n * VML was deprecated in 2012, which means VML functionality exists only for backwards compatibility\n * with old versions of Internet Explorer.\n */\n\n// mixin to redefine some SVG methods to handle VML syntax which is similar but with some differences\nvar vmlMixin = {\n\n\t_initContainer: function () {\n\t\tthis._container = create$1('div', 'leaflet-vml-container');\n\t},\n\n\t_update: function () {\n\t\tif (this._map._animatingZoom) { return; }\n\t\tRenderer.prototype._update.call(this);\n\t\tthis.fire('update');\n\t},\n\n\t_initPath: function (layer) {\n\t\tvar container = layer._container = vmlCreate('shape');\n\n\t\taddClass(container, 'leaflet-vml-shape ' + (this.options.className || ''));\n\n\t\tcontainer.coordsize = '1 1';\n\n\t\tlayer._path = vmlCreate('path');\n\t\tcontainer.appendChild(layer._path);\n\n\t\tthis._updateStyle(layer);\n\t\tthis._layers[stamp(layer)] = layer;\n\t},\n\n\t_addPath: function (layer) {\n\t\tvar container = layer._container;\n\t\tthis._container.appendChild(container);\n\n\t\tif (layer.options.interactive) {\n\t\t\tlayer.addInteractiveTarget(container);\n\t\t}\n\t},\n\n\t_removePath: function (layer) {\n\t\tvar container = layer._container;\n\t\tremove(container);\n\t\tlayer.removeInteractiveTarget(container);\n\t\tdelete this._layers[stamp(layer)];\n\t},\n\n\t_updateStyle: function (layer) {\n\t\tvar stroke = layer._stroke,\n\t\t fill = layer._fill,\n\t\t options = layer.options,\n\t\t container = layer._container;\n\n\t\tcontainer.stroked = !!options.stroke;\n\t\tcontainer.filled = !!options.fill;\n\n\t\tif (options.stroke) {\n\t\t\tif (!stroke) {\n\t\t\t\tstroke = layer._stroke = vmlCreate('stroke');\n\t\t\t}\n\t\t\tcontainer.appendChild(stroke);\n\t\t\tstroke.weight = options.weight + 'px';\n\t\t\tstroke.color = options.color;\n\t\t\tstroke.opacity = options.opacity;\n\n\t\t\tif (options.dashArray) {\n\t\t\t\tstroke.dashStyle = isArray(options.dashArray) ?\n\t\t\t\t options.dashArray.join(' ') :\n\t\t\t\t options.dashArray.replace(/( *, *)/g, ' ');\n\t\t\t} else {\n\t\t\t\tstroke.dashStyle = '';\n\t\t\t}\n\t\t\tstroke.endcap = options.lineCap.replace('butt', 'flat');\n\t\t\tstroke.joinstyle = options.lineJoin;\n\n\t\t} else if (stroke) {\n\t\t\tcontainer.removeChild(stroke);\n\t\t\tlayer._stroke = null;\n\t\t}\n\n\t\tif (options.fill) {\n\t\t\tif (!fill) {\n\t\t\t\tfill = layer._fill = vmlCreate('fill');\n\t\t\t}\n\t\t\tcontainer.appendChild(fill);\n\t\t\tfill.color = options.fillColor || options.color;\n\t\t\tfill.opacity = options.fillOpacity;\n\n\t\t} else if (fill) {\n\t\t\tcontainer.removeChild(fill);\n\t\t\tlayer._fill = null;\n\t\t}\n\t},\n\n\t_updateCircle: function (layer) {\n\t\tvar p = layer._point.round(),\n\t\t r = Math.round(layer._radius),\n\t\t r2 = Math.round(layer._radiusY || r);\n\n\t\tthis._setPath(layer, layer._empty() ? 'M0 0' :\n\t\t\t'AL ' + p.x + ',' + p.y + ' ' + r + ',' + r2 + ' 0,' + (65535 * 360));\n\t},\n\n\t_setPath: function (layer, path) {\n\t\tlayer._path.v = path;\n\t},\n\n\t_bringToFront: function (layer) {\n\t\ttoFront(layer._container);\n\t},\n\n\t_bringToBack: function (layer) {\n\t\ttoBack(layer._container);\n\t}\n};\n\nvar create = Browser.vml ? vmlCreate : svgCreate;\n\n/*\n * @class SVG\n * @inherits Renderer\n * @aka L.SVG\n *\n * Allows vector layers to be displayed with [SVG](https://developer.mozilla.org/docs/Web/SVG).\n * Inherits `Renderer`.\n *\n * Due to [technical limitations](https://caniuse.com/svg), SVG is not\n * available in all web browsers, notably Android 2.x and 3.x.\n *\n * Although SVG is not available on IE7 and IE8, these browsers support\n * [VML](https://en.wikipedia.org/wiki/Vector_Markup_Language)\n * (a now deprecated technology), and the SVG renderer will fall back to VML in\n * this case.\n *\n * @example\n *\n * Use SVG by default for all paths in the map:\n *\n * ```js\n * var map = L.map('map', {\n * \trenderer: L.svg()\n * });\n * ```\n *\n * Use a SVG renderer with extra padding for specific vector geometries:\n *\n * ```js\n * var map = L.map('map');\n * var myRenderer = L.svg({ padding: 0.5 });\n * var line = L.polyline( coordinates, { renderer: myRenderer } );\n * var circle = L.circle( center, { renderer: myRenderer } );\n * ```\n */\n\nvar SVG = Renderer.extend({\n\n\t_initContainer: function () {\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: function () {\n\t\tremove(this._container);\n\t\toff(this._container);\n\t\tdelete this._container;\n\t\tdelete this._rootGroup;\n\t\tdelete this._svgSize;\n\t},\n\n\t_update: function () {\n\t\tif (this._map._animatingZoom && this._bounds) { return; }\n\n\t\tRenderer.prototype._update.call(this);\n\n\t\tvar b = this._bounds,\n\t\t size = b.getSize(),\n\t\t container = this._container;\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\tcontainer.setAttribute('width', size.x);\n\t\t\tcontainer.setAttribute('height', size.y);\n\t\t}\n\n\t\t// movement: update container viewBox so that we don't have to change coordinates of individual layers\n\t\tsetPosition(container, b.min);\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: function (layer) {\n\t\tvar 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\taddClass(path, layer.options.className);\n\t\t}\n\n\t\tif (layer.options.interactive) {\n\t\t\taddClass(path, 'leaflet-interactive');\n\t\t}\n\n\t\tthis._updateStyle(layer);\n\t\tthis._layers[stamp(layer)] = layer;\n\t},\n\n\t_addPath: function (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: function (layer) {\n\t\tremove(layer._path);\n\t\tlayer.removeInteractiveTarget(layer._path);\n\t\tdelete this._layers[stamp(layer)];\n\t},\n\n\t_updatePath: function (layer) {\n\t\tlayer._project();\n\t\tlayer._update();\n\t},\n\n\t_updateStyle: function (layer) {\n\t\tvar path = layer._path,\n\t\t options = 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: function (layer, closed) {\n\t\tthis._setPath(layer, pointsToPath(layer._parts, closed));\n\t},\n\n\t_updateCircle: function (layer) {\n\t\tvar p = layer._point,\n\t\t r = Math.max(Math.round(layer._radius), 1),\n\t\t r2 = Math.max(Math.round(layer._radiusY), 1) || r,\n\t\t arc = 'a' + r + ',' + r2 + ' 0 1,0 ';\n\n\t\t// drawing a circle with two half-arcs\n\t\tvar d = layer._empty() ? 'M0 0' :\n\t\t\t'M' + (p.x - r) + ',' + p.y +\n\t\t\tarc + (r * 2) + ',0 ' +\n\t\t\tarc + (-r * 2) + ',0 ';\n\n\t\tthis._setPath(layer, d);\n\t},\n\n\t_setPath: function (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: function (layer) {\n\t\ttoFront(layer._path);\n\t},\n\n\t_bringToBack: function (layer) {\n\t\ttoBack(layer._path);\n\t}\n});\n\nif (Browser.vml) {\n\tSVG.include(vmlMixin);\n}\n\n// @namespace SVG\n// @factory L.svg(options?: Renderer options)\n// Creates a SVG renderer with the given options.\nfunction svg(options) {\n\treturn Browser.svg || Browser.vml ? new SVG(options) : null;\n}\n\nMap.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: function (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\tvar 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: function (name) {\n\t\tif (name === 'overlayPane' || name === undefined) {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar 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: function (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 && canvas(options)) || svg(options);\n\t}\n});\n\n/*\n * L.Rectangle extends Polygon and creates a rectangle when passed a LatLngBounds object.\n */\n\n/*\n * @class Rectangle\n * @aka L.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 * var bounds = [[54.559322, -5.767822], [56.1210604, -3.021240]];\n *\n * // create an orange rectangle\n * L.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\nvar Rectangle = Polygon.extend({\n\tinitialize: function (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: function (latLngBounds) {\n\t\treturn this.setLatLngs(this._boundsToLatLngs(latLngBounds));\n\t},\n\n\t_boundsToLatLngs: function (latLngBounds) {\n\t\tlatLngBounds = toLatLngBounds(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\n\n// @factory L.rectangle(latLngBounds: LatLngBounds, options?: Polyline options)\nfunction rectangle(latLngBounds, options) {\n\treturn new Rectangle(latLngBounds, options);\n}\n\nSVG.create = create;\nSVG.pointsToPath = pointsToPath;\n\nGeoJSON.geometryToLayer = geometryToLayer;\nGeoJSON.coordsToLatLng = coordsToLatLng;\nGeoJSON.coordsToLatLngs = coordsToLatLngs;\nGeoJSON.latLngToCoords = latLngToCoords;\nGeoJSON.latLngsToCoords = latLngsToCoords;\nGeoJSON.getFeature = getFeature;\nGeoJSON.asFeature = asFeature;\n\n/*\n * L.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.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 mouse while pressing the shift key.\n\tboxZoom: true\n});\n\nvar BoxZoom = Handler.extend({\n\tinitialize: function (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: function () {\n\t\ton(this._container, 'mousedown', this._onMouseDown, this);\n\t},\n\n\tremoveHooks: function () {\n\t\toff(this._container, 'mousedown', this._onMouseDown, this);\n\t},\n\n\tmoved: function () {\n\t\treturn this._moved;\n\t},\n\n\t_destroy: function () {\n\t\tremove(this._pane);\n\t\tdelete this._pane;\n\t},\n\n\t_resetState: function () {\n\t\tthis._resetStateTimeout = 0;\n\t\tthis._moved = false;\n\t},\n\n\t_clearDeferredResetState: function () {\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_onMouseDown: function (e) {\n\t\tif (!e.shiftKey || ((e.which !== 1) && (e.button !== 1))) { 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.mouseEventToContainerPoint(e);\n\n\t\ton(document, {\n\t\t\tcontextmenu: stop,\n\t\t\tmousemove: this._onMouseMove,\n\t\t\tmouseup: this._onMouseUp,\n\t\t\tkeydown: this._onKeyDown\n\t\t}, this);\n\t},\n\n\t_onMouseMove: function (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\taddClass(this._container, 'leaflet-crosshair');\n\n\t\t\tthis._map.fire('boxzoomstart');\n\t\t}\n\n\t\tthis._point = this._map.mouseEventToContainerPoint(e);\n\n\t\tvar bounds = new Bounds(this._point, this._startPoint),\n\t\t size = 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: function () {\n\t\tif (this._moved) {\n\t\t\tremove(this._box);\n\t\t\tremoveClass(this._container, '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\tmousemove: this._onMouseMove,\n\t\t\tmouseup: this._onMouseUp,\n\t\t\tkeydown: this._onKeyDown\n\t\t}, this);\n\t},\n\n\t_onMouseUp: function (e) {\n\t\tif ((e.which !== 1) && (e.button !== 1)) { 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(bind(this._resetState, this), 0);\n\n\t\tvar bounds = new LatLngBounds(\n\t\t this._map.containerPointToLatLng(this._startPoint),\n\t\t this._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: function (e) {\n\t\tif (e.keyCode === 27) {\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 mouse) zoom handler.\nMap.addInitHook('addHandler', 'boxZoom', BoxZoom);\n\n/*\n * L.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.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 mouse was.\n\tdoubleClickZoom: true\n});\n\nvar DoubleClickZoom = Handler.extend({\n\taddHooks: function () {\n\t\tthis._map.on('dblclick', this._onDoubleClick, this);\n\t},\n\n\tremoveHooks: function () {\n\t\tthis._map.off('dblclick', this._onDoubleClick, this);\n\t},\n\n\t_onDoubleClick: function (e) {\n\t\tvar map = this._map,\n\t\t oldZoom = map.getZoom(),\n\t\t delta = map.options.zoomDelta,\n\t\t zoom = 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.addInitHook('addHandler', 'doubleClickZoom', DoubleClickZoom);\n\n/*\n * L.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.mergeOptions({\n\t// @option dragging: Boolean = true\n\t// Whether the map is draggable with mouse/touch 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\nvar Drag = Handler.extend({\n\taddHooks: function () {\n\t\tif (!this._draggable) {\n\t\t\tvar 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\taddClass(this._map._container, 'leaflet-grab leaflet-touch-drag');\n\t\tthis._draggable.enable();\n\t\tthis._positions = [];\n\t\tthis._times = [];\n\t},\n\n\tremoveHooks: function () {\n\t\tremoveClass(this._map._container, 'leaflet-grab');\n\t\tremoveClass(this._map._container, 'leaflet-touch-drag');\n\t\tthis._draggable.disable();\n\t},\n\n\tmoved: function () {\n\t\treturn this._draggable && this._draggable._moved;\n\t},\n\n\tmoving: function () {\n\t\treturn this._draggable && this._draggable._moving;\n\t},\n\n\t_onDragStart: function () {\n\t\tvar map = this._map;\n\n\t\tmap._stop();\n\t\tif (this._map.options.maxBounds && this._map.options.maxBoundsViscosity) {\n\t\t\tvar bounds = toLatLngBounds(this._map.options.maxBounds);\n\n\t\t\tthis._offsetLimit = toBounds(\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 .fire('movestart')\n\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: function (e) {\n\t\tif (this._map.options.inertia) {\n\t\t\tvar time = this._lastTime = +new Date(),\n\t\t\t pos = 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 .fire('move', e)\n\t\t .fire('drag', e);\n\t},\n\n\t_prunePositions: function (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: function () {\n\t\tvar pxCenter = this._map.getSize().divideBy(2),\n\t\t pxWorldCenter = 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: function (value, threshold) {\n\t\treturn value - (value - threshold) * this._viscosity;\n\t},\n\n\t_onPreDragLimit: function () {\n\t\tif (!this._viscosity || !this._offsetLimit) { return; }\n\n\t\tvar offset = this._draggable._newPos.subtract(this._draggable._startPos);\n\n\t\tvar 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: function () {\n\t\t// TODO refactor to be able to adjust map pane position after zoom\n\t\tvar worldWidth = this._worldWidth,\n\t\t halfWidth = Math.round(worldWidth / 2),\n\t\t dx = this._initialWorldOffset,\n\t\t x = this._draggable._newPos.x,\n\t\t newX1 = (x - halfWidth + dx) % worldWidth + halfWidth - dx,\n\t\t newX2 = (x + halfWidth + dx) % worldWidth - halfWidth - dx,\n\t\t newX = 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: function (e) {\n\t\tvar map = this._map,\n\t\t options = map.options,\n\n\t\t noInertia = !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\tvar direction = this._lastPos.subtract(this._positions[0]),\n\t\t\t duration = (this._lastTime - this._times[0]) / 1000,\n\t\t\t ease = options.easeLinearity,\n\n\t\t\t speedVector = direction.multiplyBy(ease / duration),\n\t\t\t speed = speedVector.distanceTo([0, 0]),\n\n\t\t\t limitedSpeed = Math.min(options.inertiaMaxSpeed, speed),\n\t\t\t limitedSpeedVector = speedVector.multiplyBy(limitedSpeed / speed),\n\n\t\t\t decelerationDuration = limitedSpeed / (options.inertiaDeceleration * ease),\n\t\t\t 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\trequestAnimFrame(function () {\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 (by both mouse and touch).\nMap.addInitHook('addHandler', 'dragging', Drag);\n\n/*\n * L.Map.Keyboard is handling keyboard interaction with the map, enabled by default.\n */\n\n// @namespace Map\n// @section Keyboard Navigation Options\nMap.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\nvar Keyboard = Handler.extend({\n\n\tkeyCodes: {\n\t\tleft: [37],\n\t\tright: [39],\n\t\tdown: [40],\n\t\tup: [38],\n\t\tzoomIn: [187, 107, 61, 171],\n\t\tzoomOut: [189, 109, 54, 173]\n\t},\n\n\tinitialize: function (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: function () {\n\t\tvar 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\ton(container, {\n\t\t\tfocus: this._onFocus,\n\t\t\tblur: this._onBlur,\n\t\t\tmousedown: this._onMouseDown\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: function () {\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\tmousedown: this._onMouseDown\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_onMouseDown: function () {\n\t\tif (this._focused) { return; }\n\n\t\tvar body = document.body,\n\t\t docEl = document.documentElement,\n\t\t top = body.scrollTop || docEl.scrollTop,\n\t\t left = body.scrollLeft || docEl.scrollLeft;\n\n\t\tthis._map._container.focus();\n\n\t\twindow.scrollTo(left, top);\n\t},\n\n\t_onFocus: function () {\n\t\tthis._focused = true;\n\t\tthis._map.fire('focus');\n\t},\n\n\t_onBlur: function () {\n\t\tthis._focused = false;\n\t\tthis._map.fire('blur');\n\t},\n\n\t_setPanDelta: function (panDelta) {\n\t\tvar keys = this._panKeys = {},\n\t\t codes = this.keyCodes,\n\t\t i, len;\n\n\t\tfor (i = 0, len = codes.left.length; i < len; i++) {\n\t\t\tkeys[codes.left[i]] = [-1 * panDelta, 0];\n\t\t}\n\t\tfor (i = 0, len = codes.right.length; i < len; i++) {\n\t\t\tkeys[codes.right[i]] = [panDelta, 0];\n\t\t}\n\t\tfor (i = 0, len = codes.down.length; i < len; i++) {\n\t\t\tkeys[codes.down[i]] = [0, panDelta];\n\t\t}\n\t\tfor (i = 0, len = codes.up.length; i < len; i++) {\n\t\t\tkeys[codes.up[i]] = [0, -1 * panDelta];\n\t\t}\n\t},\n\n\t_setZoomDelta: function (zoomDelta) {\n\t\tvar keys = this._zoomKeys = {},\n\t\t codes = this.keyCodes,\n\t\t i, len;\n\n\t\tfor (i = 0, len = codes.zoomIn.length; i < len; i++) {\n\t\t\tkeys[codes.zoomIn[i]] = zoomDelta;\n\t\t}\n\t\tfor (i = 0, len = codes.zoomOut.length; i < len; i++) {\n\t\t\tkeys[codes.zoomOut[i]] = -zoomDelta;\n\t\t}\n\t},\n\n\t_addHooks: function () {\n\t\ton(document, 'keydown', this._onKeyDown, this);\n\t},\n\n\t_removeHooks: function () {\n\t\toff(document, 'keydown', this._onKeyDown, this);\n\t},\n\n\t_onKeyDown: function (e) {\n\t\tif (e.altKey || e.ctrlKey || e.metaKey) { return; }\n\n\t\tvar key = e.keyCode,\n\t\t map = this._map,\n\t\t 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 = toPoint(offset).multiplyBy(3);\n\t\t\t\t}\n\n\t\t\t\tmap.panBy(offset);\n\n\t\t\t\tif (map.options.maxBounds) {\n\t\t\t\t\tmap.panInsideBounds(map.options.maxBounds);\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 === 27 && 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.addInitHook('addHandler', 'keyboard', Keyboard);\n\n/*\n * L.Handler.ScrollWheelZoom is used by L.Map to enable mouse scroll wheel zoom on the map.\n */\n\n// @namespace Map\n// @section Interaction Options\nMap.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 mouse 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\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 [L.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\nvar ScrollWheelZoom = Handler.extend({\n\taddHooks: function () {\n\t\ton(this._map._container, 'wheel', this._onWheelScroll, this);\n\n\t\tthis._delta = 0;\n\t},\n\n\tremoveHooks: function () {\n\t\toff(this._map._container, 'wheel', this._onWheelScroll, this);\n\t},\n\n\t_onWheelScroll: function (e) {\n\t\tvar delta = getWheelDelta(e);\n\n\t\tvar debounce = this._map.options.wheelDebounceTime;\n\n\t\tthis._delta += delta;\n\t\tthis._lastMousePos = this._map.mouseEventToContainerPoint(e);\n\n\t\tif (!this._startTime) {\n\t\t\tthis._startTime = +new Date();\n\t\t}\n\n\t\tvar left = Math.max(debounce - (+new Date() - this._startTime), 0);\n\n\t\tclearTimeout(this._timer);\n\t\tthis._timer = setTimeout(bind(this._performZoom, this), left);\n\n\t\tstop(e);\n\t},\n\n\t_performZoom: function () {\n\t\tvar map = this._map,\n\t\t zoom = map.getZoom(),\n\t\t snap = 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\tvar d2 = this._delta / (this._map.options.wheelPxPerZoomLevel * 4),\n\t\t d3 = 4 * Math.log(2 / (1 + Math.exp(-Math.abs(d2)))) / Math.LN2,\n\t\t d4 = snap ? Math.ceil(d3 / snap) * snap : d3,\n\t\t delta = 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.addInitHook('addHandler', 'scrollWheelZoom', ScrollWheelZoom);\n\n/*\n * L.Map.TapHold is used to simulate `contextmenu` event on long hold,\n * which otherwise is not fired by mobile Safari.\n */\n\nvar tapHoldDelay = 600;\n\n// @namespace Map\n// @section Interaction Options\nMap.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.touchNative && 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\nvar TapHold = Handler.extend({\n\taddHooks: function () {\n\t\ton(this._map._container, 'touchstart', this._onDown, this);\n\t},\n\n\tremoveHooks: function () {\n\t\toff(this._map._container, 'touchstart', this._onDown, this);\n\t},\n\n\t_onDown: function (e) {\n\t\tclearTimeout(this._holdTimeout);\n\t\tif (e.touches.length !== 1) { return; }\n\n\t\tvar first = e.touches[0];\n\t\tthis._startPos = this._newPos = new Point(first.clientX, first.clientY);\n\n\t\tthis._holdTimeout = setTimeout(bind(function () {\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, 'touchend', preventDefault);\n\t\t\ton(document, 'touchend touchcancel', this._cancelClickPrevent);\n\t\t\tthis._simulateEvent('contextmenu', first);\n\t\t}, this), tapHoldDelay);\n\n\t\ton(document, 'touchend touchcancel contextmenu', this._cancel, this);\n\t\ton(document, 'touchmove', this._onMove, this);\n\t},\n\n\t_cancelClickPrevent: function cancelClickPrevent() {\n\t\toff(document, 'touchend', preventDefault);\n\t\toff(document, 'touchend touchcancel', cancelClickPrevent);\n\t},\n\n\t_cancel: function () {\n\t\tclearTimeout(this._holdTimeout);\n\t\toff(document, 'touchend touchcancel contextmenu', this._cancel, this);\n\t\toff(document, 'touchmove', this._onMove, this);\n\t},\n\n\t_onMove: function (e) {\n\t\tvar first = e.touches[0];\n\t\tthis._newPos = new Point(first.clientX, first.clientY);\n\t},\n\n\t_isTapValid: function () {\n\t\treturn this._newPos.distanceTo(this._startPos) <= this._map.options.tapTolerance;\n\t},\n\n\t_simulateEvent: function (type, e) {\n\t\tvar 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.addInitHook('addHandler', 'tapHold', TapHold);\n\n/*\n * L.Handler.TouchZoom is used by L.Map to add pinch zoom on supported mobile browsers.\n */\n\n// @namespace Map\n// @section Interaction Options\nMap.mergeOptions({\n\t// @section Touch interaction options\n\t// @option touchZoom: 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\ttouchZoom: Browser.touch,\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\nvar TouchZoom = Handler.extend({\n\taddHooks: function () {\n\t\taddClass(this._map._container, 'leaflet-touch-zoom');\n\t\ton(this._map._container, 'touchstart', this._onTouchStart, this);\n\t},\n\n\tremoveHooks: function () {\n\t\tremoveClass(this._map._container, 'leaflet-touch-zoom');\n\t\toff(this._map._container, 'touchstart', this._onTouchStart, this);\n\t},\n\n\t_onTouchStart: function (e) {\n\t\tvar map = this._map;\n\t\tif (!e.touches || e.touches.length !== 2 || map._animatingZoom || this._zooming) { return; }\n\n\t\tvar p1 = map.mouseEventToContainerPoint(e.touches[0]),\n\t\t p2 = map.mouseEventToContainerPoint(e.touches[1]);\n\n\t\tthis._centerPoint = map.getSize()._divideBy(2);\n\t\tthis._startLatLng = map.containerPointToLatLng(this._centerPoint);\n\t\tif (map.options.touchZoom !== '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, 'touchmove', this._onTouchMove, this);\n\t\ton(document, 'touchend touchcancel', this._onTouchEnd, this);\n\n\t\tpreventDefault(e);\n\t},\n\n\t_onTouchMove: function (e) {\n\t\tif (!e.touches || e.touches.length !== 2 || !this._zooming) { return; }\n\n\t\tvar map = this._map,\n\t\t p1 = map.mouseEventToContainerPoint(e.touches[0]),\n\t\t p2 = map.mouseEventToContainerPoint(e.touches[1]),\n\t\t scale = 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.touchZoom === '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\tvar 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\tcancelAnimFrame(this._animRequest);\n\n\t\tvar moveFn = bind(map._move, map, this._center, this._zoom, {pinch: true, round: false}, undefined);\n\t\tthis._animRequest = requestAnimFrame(moveFn, this, true);\n\n\t\tpreventDefault(e);\n\t},\n\n\t_onTouchEnd: function () {\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\tcancelAnimFrame(this._animRequest);\n\n\t\toff(document, 'touchmove', this._onTouchMove, this);\n\t\toff(document, 'touchend touchcancel', this._onTouchEnd, 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 touchZoom: Handler\n// Touch zoom handler.\nMap.addInitHook('addHandler', 'touchZoom', TouchZoom);\n\nMap.BoxZoom = BoxZoom;\nMap.DoubleClickZoom = DoubleClickZoom;\nMap.Drag = Drag;\nMap.Keyboard = Keyboard;\nMap.ScrollWheelZoom = ScrollWheelZoom;\nMap.TapHold = TapHold;\nMap.TouchZoom = TouchZoom;\n\nvar L$1 = {\n __proto__: null,\n version: version,\n Control: Control,\n control: control,\n Class: Class,\n Handler: Handler,\n extend: extend,\n bind: bind,\n stamp: stamp,\n setOptions: setOptions,\n Browser: Browser,\n Evented: Evented,\n Mixin: Mixin,\n Util: Util,\n PosAnimation: PosAnimation,\n Draggable: Draggable,\n DomEvent: DomEvent,\n DomUtil: DomUtil,\n Point: Point,\n point: toPoint,\n Bounds: Bounds,\n bounds: toBounds,\n Transformation: Transformation,\n transformation: toTransformation,\n LineUtil: LineUtil,\n PolyUtil: PolyUtil,\n LatLng: LatLng,\n latLng: toLatLng,\n LatLngBounds: LatLngBounds,\n latLngBounds: toLatLngBounds,\n CRS: CRS,\n Projection: index,\n Layer: Layer,\n LayerGroup: LayerGroup,\n layerGroup: layerGroup,\n FeatureGroup: FeatureGroup,\n featureGroup: featureGroup,\n ImageOverlay: ImageOverlay,\n imageOverlay: imageOverlay,\n VideoOverlay: VideoOverlay,\n videoOverlay: videoOverlay,\n SVGOverlay: SVGOverlay,\n svgOverlay: svgOverlay,\n DivOverlay: DivOverlay,\n Popup: Popup,\n popup: popup,\n Tooltip: Tooltip,\n tooltip: tooltip,\n icon: icon,\n DivIcon: DivIcon,\n divIcon: divIcon,\n Marker: Marker,\n marker: marker,\n Icon: Icon,\n GridLayer: GridLayer,\n gridLayer: gridLayer,\n TileLayer: TileLayer,\n tileLayer: tileLayer,\n Renderer: Renderer,\n Canvas: Canvas,\n canvas: canvas,\n Path: Path,\n CircleMarker: CircleMarker,\n circleMarker: circleMarker,\n Circle: Circle,\n circle: circle,\n Polyline: Polyline,\n polyline: polyline,\n Polygon: Polygon,\n polygon: polygon,\n Rectangle: Rectangle,\n rectangle: rectangle,\n SVG: SVG,\n svg: svg,\n GeoJSON: GeoJSON,\n geoJSON: geoJSON,\n geoJson: geoJson,\n Map: Map,\n map: createMap\n};\n\nvar globalL = extend(L$1, {noConflict: noConflict});\n\nvar globalObject = getGlobalObject();\nvar oldL = globalObject.L;\n\nglobalObject.L = globalL;\n\nfunction noConflict() {\n\tglobalObject.L = oldL;\n\treturn globalL;\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 { Bounds, Browser, CRS, Canvas, Circle, CircleMarker, Class, Control, DivIcon, DivOverlay, DomEvent, DomUtil, Draggable, Evented, FeatureGroup, GeoJSON, GridLayer, Handler, Icon, ImageOverlay, LatLng, LatLngBounds, Layer, LayerGroup, LineUtil, Map, Marker, Mixin, Path, Point, PolyUtil, Polygon, Polyline, Popup, PosAnimation, index as Projection, Rectangle, Renderer, SVG, SVGOverlay, TileLayer, Tooltip, Transformation, Util, VideoOverlay, bind, toBounds as bounds, canvas, circle, circleMarker, control, globalL as default, divIcon, extend, featureGroup, geoJSON, geoJson, gridLayer, icon, imageOverlay, toLatLng as latLng, toLatLngBounds as latLngBounds, layerGroup, createMap as map, marker, noConflict, toPoint as point, polygon, polyline, popup, rectangle, setOptions, stamp, svg, svgOverlay, tileLayer, tooltip, toTransformation as transformation, version, videoOverlay };\n//# sourceMappingURL=leaflet-src.esm.js.map\n","<script>\n\n import { map_store } from '../lib/stores.js';\n let last_click_latlng;\n\n let map_center;\n let map_zoom;\n let map_viewbox;\n let view_on_osm_link;\n let last_click;\n let mouse_position;\n\n function map_link_to_osm(map) {\n var zoom = map.getZoom();\n var lat = map.getCenter().lat.toFixed(5);\n var lng = map.getCenter().lng.toFixed(5);\n return 'https://openstreetmap.org/#map=' + zoom + '/' + lat + '/' + lng;\n }\n\n function map_viewbox_as_string(map) {\n var bounds = map.getBounds();\n var west = bounds.getWest();\n var east = bounds.getEast();\n\n if ((east - west) >= 360) { // covers more than whole planet\n west = map.getCenter().lng - 179.999;\n east = map.getCenter().lng + 179.999;\n }\n east = L.latLng(77, east).wrap().lng;\n west = L.latLng(77, west).wrap().lng;\n\n return [\n west.toFixed(5), // left\n bounds.getNorth().toFixed(5), // top\n east.toFixed(5), // right\n bounds.getSouth().toFixed(5) // bottom\n ].join(',');\n }\n\n function display_map_position(map, mouse_lat_lng) {\n map_center = map.getCenter().lat.toFixed(5) + ',' + map.getCenter().lng.toFixed(5);\n view_on_osm_link = map_link_to_osm(map);\n map_zoom = map.getZoom();\n map_viewbox = map_viewbox_as_string(map);\n mouse_position = '-';\n if (mouse_lat_lng) {\n mouse_position = [mouse_lat_lng.lat.toFixed(5), mouse_lat_lng.lng.toFixed(5)].join(',');\n }\n if (last_click_latlng) {\n last_click = [last_click_latlng.lat.toFixed(5), last_click_latlng.lng.toFixed(5)].join(',');\n }\n }\n\n\n map_store.subscribe(map => {\n if (!map) return;\n\n map.on('move', function () {\n display_map_position(map);\n // update_viewbox_field();\n });\n\n map.on('mousemove', function (e) {\n display_map_position(map, e.latlng);\n });\n\n map.on('click', function (e) {\n last_click_latlng = e.latlng;\n display_map_position(map);\n });\n\n map.on('load', function () {\n display_map_position(map);\n });\n });\n\n function handleHideClick() {\n document.getElementById('map-position').style.display = 'none';\n document.getElementById('show-map-position').style.display = 'block';\n }\n\n</script>\n\n<div id=\"map-position\">\n <div id=\"map-position-inner\">\n map center: {map_center}\n <a target=\"_blank\" href=\"{view_on_osm_link}\">view on osm.org</a>\n <br>\n map zoom: {map_zoom}\n <br>\n viewbox: {map_viewbox}\n <br>\n last click: {last_click}\n <br>\n mouse position: {mouse_position}\n </div>\n <div id=\"map-position-close\"><a href=\"#hide\" on:click={handleHideClick}>hide</a></div>\n</div>\n\n\n<style>\n #map-position {\n display: none;\n position: absolute;\n top: 0;\n right: 20px;\n padding: 0 5px;\n color: #333;\n font-size: 11px;\n background-color: rgba(255, 255, 255, 0.7);\n z-index: 1000;\n }\n\n #map-position-close {\n text-align: right;\n }\n\n \n \n\n @media (max-width: 768px) {\n #map-position {\n top: 20px;\n right: 20px;\n }\n }\n</style>\n","(function(factory,window){if(typeof define===\"function\"&&define.amd){define([\"leaflet\"],factory)}else if(typeof exports===\"object\"){module.exports=factory(require(\"leaflet\"))}if(typeof window!==\"undefined\"&&window.L){window.L.Control.MiniMap=factory(L);window.L.control.minimap=function(layer,options){return new window.L.Control.MiniMap(layer,options)}}})(function(L){var MiniMap=L.Control.extend({includes:L.Evented?L.Evented.prototype:L.Mixin.Events,options:{position:\"bottomright\",toggleDisplay:false,zoomLevelOffset:-5,zoomLevelFixed:false,centerFixed:false,zoomAnimation:false,autoToggleDisplay:false,minimized:false,width:150,height:150,collapsedWidth:19,collapsedHeight:19,aimingRectOptions:{color:\"#ff7800\",weight:1,clickable:false},shadowRectOptions:{color:\"#000000\",weight:1,clickable:false,opacity:0,fillOpacity:0},strings:{hideText:\"Hide MiniMap\",showText:\"Show MiniMap\"},mapOptions:{}},initialize:function(layer,options){L.Util.setOptions(this,options);this.options.aimingRectOptions.clickable=false;this.options.shadowRectOptions.clickable=false;this._layer=layer},onAdd:function(map){this._mainMap=map;this._container=L.DomUtil.create(\"div\",\"leaflet-control-minimap\");this._container.style.width=this.options.width+\"px\";this._container.style.height=this.options.height+\"px\";L.DomEvent.disableClickPropagation(this._container);L.DomEvent.on(this._container,\"mousewheel\",L.DomEvent.stopPropagation);var mapOptions={attributionControl:false,dragging:!this.options.centerFixed,zoomControl:false,zoomAnimation:this.options.zoomAnimation,autoToggleDisplay:this.options.autoToggleDisplay,touchZoom:this.options.centerFixed?\"center\":!this._isZoomLevelFixed(),scrollWheelZoom:this.options.centerFixed?\"center\":!this._isZoomLevelFixed(),doubleClickZoom:this.options.centerFixed?\"center\":!this._isZoomLevelFixed(),boxZoom:!this._isZoomLevelFixed(),crs:map.options.crs};mapOptions=L.Util.extend(this.options.mapOptions,mapOptions);this._miniMap=new L.Map(this._container,mapOptions);this._miniMap.addLayer(this._layer);this._mainMapMoving=false;this._miniMapMoving=false;this._userToggledDisplay=false;this._minimized=false;if(this.options.toggleDisplay){this._addToggleButton()}this._miniMap.whenReady(L.Util.bind(function(){this._aimingRect=L.rectangle(this._mainMap.getBounds(),this.options.aimingRectOptions).addTo(this._miniMap);this._shadowRect=L.rectangle(this._mainMap.getBounds(),this.options.shadowRectOptions).addTo(this._miniMap);this._mainMap.on(\"moveend\",this._onMainMapMoved,this);this._mainMap.on(\"move\",this._onMainMapMoving,this);this._miniMap.on(\"movestart\",this._onMiniMapMoveStarted,this);this._miniMap.on(\"move\",this._onMiniMapMoving,this);this._miniMap.on(\"moveend\",this._onMiniMapMoved,this)},this));return this._container},addTo:function(map){L.Control.prototype.addTo.call(this,map);var center=this.options.centerFixed||this._mainMap.getCenter();this._miniMap.setView(center,this._decideZoom(true));this._setDisplay(this.options.minimized);return this},onRemove:function(map){this._mainMap.off(\"moveend\",this._onMainMapMoved,this);this._mainMap.off(\"move\",this._onMainMapMoving,this);this._miniMap.off(\"moveend\",this._onMiniMapMoved,this);this._miniMap.removeLayer(this._layer)},changeLayer:function(layer){this._miniMap.removeLayer(this._layer);this._layer=layer;this._miniMap.addLayer(this._layer)},_addToggleButton:function(){this._toggleDisplayButton=this.options.toggleDisplay?this._createButton(\"\",this._toggleButtonInitialTitleText(),\"leaflet-control-minimap-toggle-display leaflet-control-minimap-toggle-display-\"+this.options.position,this._container,this._toggleDisplayButtonClicked,this):undefined;this._toggleDisplayButton.style.width=this.options.collapsedWidth+\"px\";this._toggleDisplayButton.style.height=this.options.collapsedHeight+\"px\"},_toggleButtonInitialTitleText:function(){if(this.options.minimized){return this.options.strings.showText}else{return this.options.strings.hideText}},_createButton:function(html,title,className,container,fn,context){var link=L.DomUtil.create(\"a\",className,container);link.innerHTML=html;link.href=\"#\";link.title=title;var stop=L.DomEvent.stopPropagation;L.DomEvent.on(link,\"click\",stop).on(link,\"mousedown\",stop).on(link,\"dblclick\",stop).on(link,\"click\",L.DomEvent.preventDefault).on(link,\"click\",fn,context);return link},_toggleDisplayButtonClicked:function(){this._userToggledDisplay=true;if(!this._minimized){this._minimize()}else{this._restore()}},_setDisplay:function(minimize){if(minimize!==this._minimized){if(!this._minimized){this._minimize()}else{this._restore()}}},_minimize:function(){if(this.options.toggleDisplay){this._container.style.width=this.options.collapsedWidth+\"px\";this._container.style.height=this.options.collapsedHeight+\"px\";this._toggleDisplayButton.className+=\" minimized-\"+this.options.position;this._toggleDisplayButton.title=this.options.strings.showText}else{this._container.style.display=\"none\"}this._minimized=true;this._onToggle()},_restore:function(){if(this.options.toggleDisplay){this._container.style.width=this.options.width+\"px\";this._container.style.height=this.options.height+\"px\";this._toggleDisplayButton.className=this._toggleDisplayButton.className.replace(\"minimized-\"+this.options.position,\"\");this._toggleDisplayButton.title=this.options.strings.hideText}else{this._container.style.display=\"block\"}this._minimized=false;this._onToggle()},_onMainMapMoved:function(e){if(!this._miniMapMoving){var center=this.options.centerFixed||this._mainMap.getCenter();this._mainMapMoving=true;this._miniMap.setView(center,this._decideZoom(true));this._setDisplay(this._decideMinimized())}else{this._miniMapMoving=false}this._aimingRect.setBounds(this._mainMap.getBounds())},_onMainMapMoving:function(e){this._aimingRect.setBounds(this._mainMap.getBounds())},_onMiniMapMoveStarted:function(e){if(!this.options.centerFixed){var lastAimingRect=this._aimingRect.getBounds();var sw=this._miniMap.latLngToContainerPoint(lastAimingRect.getSouthWest());var ne=this._miniMap.latLngToContainerPoint(lastAimingRect.getNorthEast());this._lastAimingRectPosition={sw:sw,ne:ne}}},_onMiniMapMoving:function(e){if(!this.options.centerFixed){if(!this._mainMapMoving&&this._lastAimingRectPosition){this._shadowRect.setBounds(new L.LatLngBounds(this._miniMap.containerPointToLatLng(this._lastAimingRectPosition.sw),this._miniMap.containerPointToLatLng(this._lastAimingRectPosition.ne)));this._shadowRect.setStyle({opacity:1,fillOpacity:.3})}}},_onMiniMapMoved:function(e){if(!this._mainMapMoving){this._miniMapMoving=true;this._mainMap.setView(this._miniMap.getCenter(),this._decideZoom(false));this._shadowRect.setStyle({opacity:0,fillOpacity:0})}else{this._mainMapMoving=false}},_isZoomLevelFixed:function(){var zoomLevelFixed=this.options.zoomLevelFixed;return this._isDefined(zoomLevelFixed)&&this._isInteger(zoomLevelFixed)},_decideZoom:function(fromMaintoMini){if(!this._isZoomLevelFixed()){if(fromMaintoMini){return this._mainMap.getZoom()+this.options.zoomLevelOffset}else{var currentDiff=this._miniMap.getZoom()-this._mainMap.getZoom();var proposedZoom=this._miniMap.getZoom()-this.options.zoomLevelOffset;var toRet;if(currentDiff>this.options.zoomLevelOffset&&this._mainMap.getZoom()<this._miniMap.getMinZoom()-this.options.zoomLevelOffset){if(this._miniMap.getZoom()>this._lastMiniMapZoom){toRet=this._mainMap.getZoom()+1;this._miniMap.setZoom(this._miniMap.getZoom()-1)}else{toRet=this._mainMap.getZoom()}}else{toRet=proposedZoom}this._lastMiniMapZoom=this._miniMap.getZoom();return toRet}}else{if(fromMaintoMini){return this.options.zoomLevelFixed}else{return this._mainMap.getZoom()}}},_decideMinimized:function(){if(this._userToggledDisplay){return this._minimized}if(this.options.autoToggleDisplay){if(this._mainMap.getBounds().contains(this._miniMap.getBounds())){return true}return false}return this._minimized},_isInteger:function(value){return typeof value===\"number\"},_isDefined:function(value){return typeof value!==\"undefined\"},_onToggle:function(){L.Util.requestAnimFrame(function(){L.DomEvent.on(this._container,\"transitionend\",this._fireToggleEvents,this);if(!L.Browser.any3d){L.Util.requestAnimFrame(this._fireToggleEvents,this)}},this)},_fireToggleEvents:function(){L.DomEvent.off(this._container,\"transitionend\",this._fireToggleEvents,this);var data={minimized:this._minimized};this.fire(this._minimized?\"minimize\":\"restore\",data);this.fire(\"toggle\",data)}});L.Map.mergeOptions({miniMapControl:false});L.Map.addInitHook(function(){if(this.options.miniMapControl){this.miniMapControl=(new MiniMap).addTo(this)}});return MiniMap},window);","\n<script>\n import * as L from 'leaflet';\n import 'leaflet-minimap';\n import 'leaflet/dist/leaflet.css';\n import 'leaflet-minimap/dist/Control.MiniMap.min.css';\n\n import { get } from 'svelte/store';\n import { map_store } from '../lib/stores.js';\n import MapPosition from '../components/MapPosition.svelte';\n\n export let display_minimap = false;\n export let current_result = null;\n export let position_marker = null;\n\n let dataLayers = [];\n\n function createMap(container) {\n const attribution = Nominatim_Config.Map_Tile_Attribution;\n\n let map = new L.map(container, {\n attributionControl: false,\n scrollWheelZoom: true, // !L.Browser.touch,\n touchZoom: false,\n center: [\n Nominatim_Config.Map_Default_Lat,\n Nominatim_Config.Map_Default_Lon\n ],\n zoom: Nominatim_Config.Map_Default_Zoom\n });\n\n if (attribution && attribution.length) {\n L.control.attribution({ prefix: '<a href=\"https://leafletjs.com/\">Leaflet</a>' }).addTo(map);\n }\n\n L.tileLayer(Nominatim_Config.Map_Tile_URL, {\n attribution: attribution\n }).addTo(map);\n\n if (display_minimap) {\n let osm2 = new L.TileLayer(Nominatim_Config.Map_Tile_URL, {\n minZoom: 0,\n maxZoom: 13,\n attribution: attribution\n });\n new L.Control.MiniMap(osm2, { toggleDisplay: true }).addTo(map);\n }\n\n const MapPositionControl = L.Control.extend({\n options: { position: 'topright' },\n onAdd: () => { return document.getElementById('show-map-position'); }\n });\n map.addControl(new MapPositionControl());\n\n return map;\n }\n\n function mapAction(container) {\n let map = createMap(container);\n map_store.set(map);\n setMapData(current_result);\n\n return {\n destroy: () => {\n map_store.set(null);\n map.remove();\n }\n };\n }\n\n function parse_and_normalize_geojson_string(part) {\n // normalize places the geometry into a featurecollection, similar to\n // https://github.com/mapbox/geojson-normalize\n var parsed_geojson = {\n type: 'FeatureCollection',\n features: [\n {\n type: 'Feature',\n geometry: part,\n properties: {}\n }\n ]\n };\n return parsed_geojson;\n }\n\n function resetMapData() {\n let map = get(map_store);\n if (!map) { return; }\n\n dataLayers.forEach(function (layer) {\n map.removeLayer(layer);\n });\n }\n\n function setMapData(aFeature) {\n let map = get(map_store);\n if (!map) { return; }\n\n resetMapData();\n\n if (position_marker) {\n // We don't need a marker, but L.circle would change radius when you zoom in/out\n let cm = L.circleMarker(\n position_marker,\n {\n radius: 5,\n weight: 2,\n fillColor: '#ff7800',\n color: 'red',\n opacity: 0.75,\n zIndexOffset: 100,\n clickable: false\n }\n );\n cm.bindTooltip(`Search (${position_marker[0]},${position_marker[1]})`).openTooltip();\n cm.addTo(map);\n dataLayers.push(cm);\n }\n\n var search_params = new URLSearchParams(window.location.search);\n var viewbox = search_params.get('viewbox');\n if (viewbox) {\n let coords = viewbox.split(','); // <x1>,<y1>,<x2>,<y2>\n let bounds = L.latLngBounds([coords[1], coords[0]], [coords[3], coords[2]]);\n L.rectangle(bounds, {\n color: '#69d53e',\n weight: 3,\n dashArray: '5 5',\n opacity: 0.8,\n fill: false\n }).addTo(map);\n }\n\n if (!aFeature) return;\n\n let lat = aFeature.centroid ? aFeature.centroid.coordinates[1] : aFeature.lat;\n let lon = aFeature.centroid ? aFeature.centroid.coordinates[0] : aFeature.lon;\n let geojson = aFeature.geometry || aFeature.geojson;\n\n if (lat && lon) {\n let circle = L.circleMarker([lat, lon], {\n radius: 10, weight: 2, fillColor: '#ff7800', color: 'blue', opacity: 0.75\n });\n if (position_marker) { // reverse result\n circle.bindTooltip('Result').openTooltip();\n }\n map.addLayer(circle);\n dataLayers.push(circle);\n }\n\n\n if (geojson) {\n var geojson_layer = L.geoJson(\n // https://leafletjs.com/reference-1.7.1.html#path-option\n parse_and_normalize_geojson_string(geojson),\n {\n style: function () {\n return { interactive: false, color: 'blue' };\n }\n }\n );\n map.addLayer(geojson_layer);\n dataLayers.push(geojson_layer);\n map.fitBounds(geojson_layer.getBounds());\n } else if (lat && lon && position_marker) {\n map.fitBounds([[lat, lon], position_marker], { padding: [50, 50] });\n } else if (lat && lon) {\n map.setView([lat, lon], 10);\n }\n }\n\n $: setMapData(current_result);\n\n function show_map_position_click(e) {\n e.target.style.display = 'none';\n document.getElementById('map-position').style.display = 'block';\n }\n</script>\n\n<MapPosition />\n<div id=\"map\" use:mapAction />\n<div id=\"show-map-position\" class=\"leaflet-bar btn btn-sm btn-outline-secondary\"\n on:click|stopPropagation={show_map_position_click}\n>show map bounds</div>\n\n<style>\n #map {\n height: 100%;\n background:#eee;\n }\n\n .btn-outline-secondary {\n background-color: white;\n }\n\n .btn-outline-secondary:hover {\n color: #111;\n }\n\n @media (max-width: 768px) {\n #map {\n height: 300px;\n }\n }\n\n</style>\n","<script>\n import { page, results_store } from '../lib/stores.js';\n import { fetch_from_api, update_html_title } from '../lib/api_utils.js';\n\n import Header from '../components/Header.svelte';\n import SearchSection from '../components/SearchSection.svelte';\n import ResultsList from '../components/ResultsList.svelte';\n import Map from '../components/Map.svelte';\n\n let api_request_params;\n let bStructuredSearch;\n let current_result;\n\n function loaddata(search_params) {\n update_html_title();\n\n api_request_params = {\n q: search_params.get('q'),\n street: search_params.get('street'),\n city: search_params.get('city'),\n county: search_params.get('county'),\n state: search_params.get('state'),\n country: search_params.get('country'),\n postalcode: search_params.get('postalcode'),\n polygon_geojson: Nominatim_Config.Search_AreaPolygons ? 1 : 0,\n viewbox: search_params.get('viewbox'),\n bounded: search_params.get('bounded'),\n dedupe: (!search_params.has('dedupe') || search_params.get('dedupe') === '1') ? 1 : 0,\n 'accept-language': search_params.get('accept-language'),\n countrycodes: search_params.get('countrycodes'),\n limit: search_params.get('limit'),\n polygon_threshold: search_params.get('polygon_threshold'),\n exclude_place_ids: search_params.get('exclude_place_ids'),\n format: 'jsonv2'\n };\n\n let anyStructuredFieldsSet = (api_request_params.street\n || api_request_params.city\n || api_request_params.county\n || api_request_params.state\n || api_request_params.country\n || api_request_params.postalcode);\n\n if (api_request_params.q || anyStructuredFieldsSet) {\n fetch_from_api('search', api_request_params, function (data) {\n results_store.set(data);\n\n update_html_title('Result for ' + api_request_params.q);\n\n if (anyStructuredFieldsSet) {\n document.querySelector(\".nav-tabs a[href='#structured']\").click();\n document.querySelector('input[name=street]').focus();\n } else {\n document.querySelector('input[name=q]').focus();\n }\n });\n } else {\n results_store.set(undefined);\n }\n }\n\n $: {\n let pageinfo = $page;\n if (pageinfo.tab === 'search') {\n loaddata(pageinfo.params);\n }\n }\n</script>\n\n<Header>\n <SearchSection api_request_params={api_request_params} bStructuredSearch={bStructuredSearch} />\n</Header>\n\n<div id=\"content\">\n <div class=\"sidebar\">\n <ResultsList bind:current_result reverse_search={false} />\n </div>\n <div id=\"map-wrapper\">\n <Map {current_result} display_minimap={true} />\n </div>\n</div>\n\n\n<style>\n .sidebar {\n width: 25%;\n min-width: 200px;\n padding: 15px;\n padding-top: 0;\n display: block;\n float: left;\n }\n\n #map-wrapper {\n position: relative;\n height: calc(100vh - 250pt);\n min-height: 300px;\n width: 75%;\n padding-right: 20px;\n display: block;\n float: left;\n }\n\n @media (max-width: 768px) {\n #content {\n top: 0;\n position: relative;\n }\n .sidebar {\n width: 100%;\n }\n #map-wrapper {\n width: 100%;\n height: 300px;\n padding-left: 20px;\n }\n }\n</style>\n","<script>\n import UrlSubmitForm from '../components/UrlSubmitForm.svelte';\n\n import { zoomLevels } from '../lib/helpers.js';\n import { map_store, refresh_page } from '../lib/stores.js';\n\n export let lat = '';\n export let lon = '';\n export let zoom = '';\n\n function gotoCoordinates(newlat, newlon, newzoom) {\n if (newlat === null || newlon === null) return;\n\n let params = new URLSearchParams();\n params.set('lat', newlat);\n params.set('lon', newlon);\n params.set('zoom', newzoom || zoom);\n refresh_page('reverse', params);\n }\n\n map_store.subscribe(map => {\n if (map) {\n map.on('click', (e) => {\n let coords = e.latlng.wrap();\n gotoCoordinates(coords.lat.toFixed(5), coords.lng.toFixed(5));\n });\n }\n });\n\n // common mistake is to copy&paste latitude and longitude into the 'lat' search box\n function maybeSplitLatitude(e) {\n var coords_split = e.target.value.split(',');\n if (coords_split.length === 2) {\n document.querySelector('input[name=lat]').value = L.Util.trim(coords_split[0]);\n document.querySelector('input[name=lon]').value = L.Util.trim(coords_split[1]);\n }\n }\n\n</script>\n\n<UrlSubmitForm page=\"reverse\">\n <div class=\"col-auto\">\n <label for=\"reverse-lat\">lat</label>\n </div>\n <div class=\"col-auto\">\n <input id=\"reverse-lat\"\n name=\"lat\"\n type=\"text\"\n class=\"form-control form-control-sm d-inline\"\n placeholder=\"latitude\"\n pattern=\"^-?\\d+(\\.\\d+)?$\"\n bind:value={lat}\n on:change={maybeSplitLatitude} />\n </div>\n <div class=\"col-auto\">\n <a id=\"switch-coords\"\n on:click|preventDefault|stopPropagation={() => gotoCoordinates(lon, lat)}\n class=\"btn btn-outline-secondary btn-sm\"\n title=\"switch lat and lon\"><></a>\n </div>\n <div class=\"col-auto\">\n <label for=\"reverse-lon\">lon</label>\n </div>\n <div class=\"col-auto\">\n <input id=\"reverse-lon\"\n name=\"lon\"\n type=\"text\"\n class=\"form-control form-control-sm\"\n placeholder=\"longitude\"\n pattern=\"^-?\\d+(\\.\\d+)?$\"\n bind:value={lon} />\n </div>\n <div class=\"col-auto\">\n <label for=\"reverse-zoom\">max zoom</label>\n </div>\n <div class=\"col-auto\">\n <select id=\"reverse-zoom\" name=\"zoom\" class=\"form-select form-select-sm\" bind:value={zoom}>\n <option value=\"\">---</option>\n {#each zoomLevels() as zoomTitle, i}\n <option value=\"{i}\">{i} - {zoomTitle}</option>\n {/each}\n </select>\n </div>\n <div class=\"col-auto\">\n <button type=\"submit\" class=\"btn btn-primary btn-sm mx-1\">Search</button>\n </div>\n</UrlSubmitForm>\n\n<style>\n label {\n font-size: 0.9rem;\n margin-top: 0.3rem;\n }\n\n #switch-coords {\n font-size: 0.6rem;\n font-weight: bold;\n cursor: pointer;\n padding: 2px;\n margin: 5px;\n }\n\n @media (max-width: 850px) {\n #reverse-lon, #reverse-lat, #reverse-zoom {\n width: 8em;\n }\n }\n</style>\n","<script>\n import { page, results_store } from '../lib/stores.js';\n import { fetch_from_api, update_html_title } from '../lib/api_utils.js';\n\n import Header from '../components/Header.svelte';\n import SearchSectionReverse from '../components/SearchSectionReverse.svelte';\n import ResultsList from '../components/ResultsList.svelte';\n import Map from '../components/Map.svelte';\n\n let api_request_params;\n let current_result;\n let position_marker; // what the user searched for\n\n function loaddata(search_params) {\n update_html_title();\n\n api_request_params = {\n lat: search_params.get('lat'),\n lon: search_params.get('lon'),\n zoom: (search_params.get('zoom') > 1\n ? Number(search_params.get('zoom'))\n : Number(Nominatim_Config.Reverse_Default_Search_Zoom)),\n format: 'jsonv2'\n };\n\n if (api_request_params.lat || api_request_params.lat) {\n\n fetch_from_api('reverse', api_request_params, function (data) {\n if (data && !data.error) {\n position_marker = [api_request_params.lat, api_request_params.lon];\n results_store.set([data]);\n } else {\n results_store.set([]);\n }\n\n update_html_title('Reverse result for '\n + api_request_params.lat\n + ','\n + api_request_params.lon);\n document.querySelector('input[name=lat]').focus();\n });\n } else {\n results_store.set(undefined);\n }\n }\n\n $: {\n let pageinfo = $page;\n if (pageinfo.tab === 'reverse') {\n loaddata(pageinfo.params);\n }\n }\n</script>\n\n<Header>\n <SearchSectionReverse {...api_request_params} />\n</Header>\n\n<div id=\"content\">\n <div class=\"sidebar\">\n <ResultsList bind:current_result reverse_search={true} />\n </div>\n <div id=\"map-wrapper\">\n <Map {current_result} {position_marker} display_minimap={true} />\n </div>\n</div>\n\n\n<style>\n .sidebar {\n width: 25%;\n min-width: 200px;\n padding: 15px;\n padding-top: 0;\n display: block;\n float: left;\n }\n\n #map-wrapper {\n position: relative;\n height: calc(100vh - 250pt);\n min-height: 300px;\n width: 75%;\n padding-right: 20px;\n display: block;\n float: left;\n }\n\n @media (max-width: 768px) {\n #content {\n top: 0;\n position: relative;\n }\n .sidebar {\n width: 100%;\n }\n #map-wrapper {\n width: 100%;\n height: 300px;\n padding-left: 20px;\n }\n }\n</style>\n","<script>\n import { refresh_page } from '../lib/stores.js';\n\n export let api_request_params = {};\n\n function handleFormSubmit(event) {\n let form_el = event.target;\n let val = form_el.querySelector('input[type=edit]').value.trim();\n let type_and_id_match = val.match(/^\\s*([NWR])(\\d+)\\s*$/i)\n || val.match(/\\/(relation|way|node)\\/(\\d+)\\s*$/);\n\n var params = new URLSearchParams();\n if (type_and_id_match) {\n params.set('osmtype', type_and_id_match[1].charAt(0).toUpperCase());\n params.set('osmid', type_and_id_match[2]);\n } else if (val.match(/^\\d+$/)) {\n params.set('place_id', val);\n } else {\n alert('invalid input');\n return;\n }\n\n refresh_page('details', params);\n }\n</script>\n\n<form on:submit|preventDefault={handleFormSubmit} class=\"form-inline\" action=\"details.html\">\n <div class=\"row g-1\">\n <div class=\"col-auto\">\n <input type=\"edit\"\n class=\"form-control form-control-sm me-1\"\n pattern=\"^[NWRnwr]?[0-9]+$|.*openstreetmap.*\"\n value=\"{api_request_params.osmtype || ''}{api_request_params.osmid || ''}{api_request_params.place_id || ''}\" />\n </div>\n <div class=\"col-auto\">\n <button type=\"submit\" class=\"btn btn-primary btn-sm\">Show</button>\n </div>\n </div>\n</form>\n<small class=\"form-text text-muted\">\n OSM type+id (<em>N123</em>, <em>n123</em>, <em>W123</em>, <em>w123</em>, <em>R123</em>, <em>r123</em>),\n Place id (<em>1234</em>) or\n URL (<em>https://openstreetmap.org/way/123</em>)\n</small>\n\n<style>\n form .form-control{\n width: 500px;\n max-width: 100%;\n }\n .form-text em {\n font-family: monospace;\n font-style: normal;\n }\n</style>\n","<script>\n import DetailsLink from '../components/DetailsLink.svelte';\n import PageLink from '../components/PageLink.svelte';\n import {\n formatPlaceType, osmLink, formatAdminLevel, formatDistance\n } from '../lib/helpers.js';\n\n export let addressLine;\n export let bDistanceInMeters;\n export let bMarkUnusedLines = false;\n\n $: bAddressLineUsed = addressLine.isaddress;\n $: reverse_only = Nominatim_Config.Reverse_Only;\n</script>\n\n<tr class:notused={bMarkUnusedLines && !bAddressLineUsed}>\n <td class=\"name fw-bold\">\n {#if addressLine.localname}\n {addressLine.localname}\n {:else}\n <span class=\"noname\">No Name</span>\n {/if}\n </td>\n <td>{formatPlaceType(addressLine)}</td>\n <td>{@html osmLink(addressLine)}</td>\n <td>{addressLine.rank_address}</td>\n <td>{formatAdminLevel(addressLine.admin_level)}</td>\n <td>{@html formatDistance(addressLine.distance, bDistanceInMeters)}</td>\n <td>\n {#if addressLine.osm_id}\n <DetailsLink feature={addressLine}>details</DetailsLink>\n {:else if !reverse_only && addressLine.type.match(/^country/)}\n <PageLink page='search' params_hash={{ country: addressLine.localname }}>search by name</PageLink>\n {:else if !reverse_only && addressLine.type === 'postcode'}\n <PageLink page='search' params_hash={{ postalcode: addressLine.localname }}>search by name</PageLink>\n {/if}\n </td>\n</tr>\n\n<style>\n .notused td {\n color: #ccc;\n }\n\n td {\n padding: 2px 8px;\n font-size: 0.9em;\n }\n</style>\n","<script>\n export let postcode;\n export let lat;\n export let lon;\n\n let overpass_query = `\n // Based on the map bounds, you can zoom out and rerun the query\n\n [timeout:30]; // in seconds\n\n // we define a shortcut\n // https://wiki.openstreetmap.org/wiki/Overpass_turbo/Extended_Overpass_Turbo_Queries\n {{postcode=${postcode}}}\n\n (\n node[\"addr:postcode\"=\"{{postcode}}\"]({{bbox}});\n way[\"addr:postcode\"=\"{{postcode}}\"]({{bbox}});\n relation[\"addr:postcode\"=\"{{postcode}}\"]({{bbox}});\n\n node[\"postal_code\"=\"{{postcode}}\"]({{bbox}});\n way[\"postal_code\"=\"{{postcode}}\"]({{bbox}});\n relation[\"postal_code\"=\"{{postcode}}\"]({{bbox}});\n );\n\n out body;\n >;\n out skel qt;\n `.replace(/^ {4}/gm, '');\n\n // https://wiki.openstreetmap.org/wiki/Overpass_turbo/Development#URL_Parameters\n // Q: the query\n // C: map position\n // R: run the query\n let url = 'https://overpass-turbo.eu/'\n + '?Q=' + encodeURIComponent(overpass_query)\n + '&C=' + encodeURIComponent([lat, lon, 15].join(';'))\n + '&R';\n\n function openHint() {\n document.getElementById('postcode-hint').style.display = 'block';\n }\n function closeHint() {\n document.getElementById('postcode-hint').style.display = 'none';\n }\n</script>\n\n(<a href=\"#openHint\" on:click|preventDefault|stopPropagation={openHint}>how?</a>)\n\n<div id=\"postcode-hint\" class=\"my-2 p-2\">\n <button type=\"button\" class=\"close\" aria-label=\"Close\" on:click|stopPropagation={closeHint}>\n <span aria-hidden=\"true\">×</span>\n </button>\n\n Nightly calculated from nearby places having this postcode.\n <a href=\"https://nominatim.org/release-docs/latest/develop/Postcodes/\">Documentation</a>.\n You can search for those with an <a href={url} target=\"_blank\">Overpass Turbo query</a>.\n</div>\n\n<style>\n #postcode-hint {\n font-size: 0.9em;\n background-color: #ededff;\n display: none;\n }\n .close {\n font-size: 1rem;\n }\n</style>","<script>\n export let title;\n</script>\n\n<style>\n td {\n padding: 2px 8px;\n font-size: 0.9em;\n }\n</style>\n\n<tr>\n <td>{title}</td>\n <td><slot></slot></td>\n</tr>\n","<script>\n export let items;\n</script>\n\n<style>\n .name {\n font-weight: bold;\n overflow-wrap: anywhere;\n }\n</style>\n\n{#each Object.keys(items) as name}\n <div class=\"line\">\n <span class=\"name\">{items[name]}</span> ({name})\n </div>\n{/each}\n","<script>\n import { fetch_from_api, update_html_title } from '../lib/api_utils.js';\n import { page } from '../lib/stores.js';\n\n import {\n osmLink, wikipediaLink, coverageType, isAdminBoundary,\n formatAddressRank, formatKeywordToken, formatOSMType\n } from '../lib/helpers.js';\n import Header from '../components/Header.svelte';\n import MapIcon from '../components/MapIcon.svelte';\n import SearchSectionDetails from '../components/SearchSectionDetails.svelte';\n import DetailsOneRow from '../components/DetailsOneRow.svelte';\n import DetailsLink from '../components/DetailsLink.svelte';\n import DetailsPostcodeHint from '../components/DetailsPostcodeHint.svelte';\n import InfoRow from '../components/DetailsInfoRow.svelte';\n import InfoRowList from '../components/DetailsInfoRowList.svelte';\n import Map from '../components/Map.svelte';\n\n let aPlace;\n let base_url;\n let api_request_params;\n let api_request_finished = false;\n\n function loaddata(search_params) {\n api_request_params = {\n place_id: search_params.get('place_id'),\n osmtype: search_params.get('osmtype'),\n osmid: search_params.get('osmid'),\n class: search_params.get('class'),\n keywords: search_params.get('keywords'),\n addressdetails: 1,\n hierarchy: (search_params.get('hierarchy') === '1' ? 1 : 0),\n group_hierarchy: 1,\n polygon_geojson: 1,\n format: 'json'\n };\n api_request_finished = false;\n\n if (api_request_params.place_id || (api_request_params.osmtype && api_request_params.osmid)) {\n\n if (api_request_params.place_id) {\n update_html_title('Details for ' + api_request_params.place_id);\n } else {\n update_html_title('Details for ' + api_request_params.osmtype + api_request_params.osmid);\n }\n\n fetch_from_api('details', api_request_params, function (data) {\n window.scrollTo(0, 0);\n api_request_finished = true;\n aPlace = (data && !data.error) ? data : undefined;\n });\n } else {\n aPlace = undefined;\n }\n }\n\n function place_has_keywords(aThisPlace) {\n // Return false if Nominatim API sends 'keywords: { name: [], address: [] }'\n return (\n aThisPlace.keywords && aThisPlace.keywords.name && aThisPlace.keywords.address\n && (aThisPlace.keywords.name.length > 0 || aThisPlace.keywords.address.length > 0)\n );\n }\n\n $: {\n let pageinfo = $page;\n if (pageinfo.tab === 'details') {\n loaddata(pageinfo.params);\n base_url = window.location.search;\n }\n }\n $: reverse_only = Nominatim_Config.Reverse_Only;\n</script>\n\n<Header>\n <SearchSectionDetails api_request_params={api_request_params}/>\n</Header>\n\n<div class=\"container\">\n {#if aPlace}\n <div class=\"row\">\n <div class=\"col-sm-10\">\n <h1>\n {aPlace.localname || `${formatOSMType(aPlace.osm_type)} ${aPlace.osm_id}` }\n <small><DetailsLink feature={aPlace}>link to this page</DetailsLink></small>\n </h1>\n </div>\n <div class=\"col-sm-2 text-end\">\n <MapIcon aPlace={aPlace} />\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-6\">\n <table id=\"locationdetails\" class=\"table table-striped table-responsive\">\n <tbody>\n <InfoRow title=\"Name\">\n {#if (Array.isArray(aPlace.names)) }\n <span class=\"noname fw-bold\">No Name</span>\n {:else}\n <InfoRowList items={aPlace.names} />\n {/if}\n </InfoRow>\n <InfoRow title=\"Type\">{aPlace.category}:{aPlace.type}</InfoRow>\n <InfoRow title=\"Last Updated\">{aPlace.indexed_date}</InfoRow>\n {#if (isAdminBoundary(aPlace)) }\n <InfoRow title=\"Admin Level\">{aPlace.admin_level}</InfoRow>\n {/if}\n <InfoRow title=\"Search Rank\">{aPlace.rank_search}</InfoRow>\n <InfoRow title=\"Address Rank\">{aPlace.rank_address} ({formatAddressRank(aPlace.rank_address)})</InfoRow>\n {#if aPlace.calculated_importance}\n <InfoRow title=\"Importance\">\n {aPlace.calculated_importance}\n {#if !aPlace.importance} (estimated){/if}\n </InfoRow>\n {/if}\n <InfoRow title=\"Coverage\">{coverageType(aPlace)}</InfoRow>\n <InfoRow title=\"Centre Point (lat,lon)\">\n {aPlace.centroid.coordinates[1]},{aPlace.centroid.coordinates[0]}\n </InfoRow>\n <InfoRow title=\"OSM\">{@html osmLink(aPlace)}</InfoRow>\n <InfoRow title=\"Place Id\">\n {aPlace.place_id}\n (<a href=\"https://nominatim.org/release-docs/develop/api/Output/#place_id-is-not-a-persistent-id\">on this server</a>)\n </InfoRow>\n {#if aPlace.calculated_wikipedia}\n <InfoRow title=\"Wikipedia Calculated\">{@html wikipediaLink(aPlace)}</InfoRow>\n {/if}\n <InfoRow title=\"Computed Postcode\">\n {#if aPlace.calculated_postcode}\n {aPlace.calculated_postcode}\n <DetailsPostcodeHint postcode={aPlace.calculated_postcode} lat={aPlace.centroid.coordinates[1]} lon={aPlace.centroid.coordinates[0]} />\n {/if}\n </InfoRow>\n <InfoRow title=\"Address Tags\"><InfoRowList items={aPlace.addresstags} /></InfoRow>\n <InfoRow title=\"Extra Tags\"><InfoRowList items={aPlace.extratags} /></InfoRow>\n </tbody>\n </table>\n </div>\n <div class=\"col-md-6\">\n <div id=\"map-wrapper\">\n <Map current_result={aPlace} />\n </div>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-12\">\n <h2>Address</h2>\n <table id=\"address\" class=\"table table-striped table-small\">\n <thead>\n <tr>\n <th>Local name</th>\n <th>Type</th>\n <th>OSM</th>\n <th>Address rank</th>\n <th>Admin level</th>\n <th>Distance</th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n {#if aPlace.address}\n {#each aPlace.address as addressLine}\n <DetailsOneRow addressLine={addressLine} bMarkUnusedLines={true} bDistanceInMeters={false} />\n {/each}\n {/if}\n\n {#if aPlace.linked_places}\n <tr class=\"all-columns\"><td colspan=\"7\"><h2>Linked Places</h2></td></tr>\n {#each aPlace.linked_places as addressLine}\n <DetailsOneRow addressLine={addressLine} bMarkUnusedLines={true} bDistanceInMeters={true} />\n {/each}\n {/if}\n\n {#if !reverse_only}\n <tr class=\"all-columns\"><td colspan=\"7\"><h2>Keywords</h2></td></tr>\n {#if api_request_params.keywords}\n\n {#if place_has_keywords(aPlace)}\n <tr class=\"all-columns\"><td colspan=\"7\"><h3>Name Keywords</h3></td></tr>\n {#each aPlace.keywords.name as keyword}\n <tr>\n <td>{formatKeywordToken(keyword.token)}</td>\n {#if keyword.id}\n <td>word id: {keyword.id}</td>\n {/if}\n </tr>\n {/each}\n\n {#if aPlace.keywords.address}\n <tr class=\"all-columns\"><td colspan=\"7\"><h3>Address Keywords</h3></td></tr>\n {#each aPlace.keywords.address as keyword}\n <tr>\n <td>{formatKeywordToken(keyword.token)}</td>\n {#if keyword.id}\n <td>word id: {keyword.id}</td>\n {/if}\n </tr>\n {/each}\n {/if}\n {:else}\n <tr><td>Place has no keywords</td></tr>\n {/if}\n {:else}\n <tr>\n <td>\n <a class=\"btn btn-outline-secondary btn-sm\"\n href=\"{base_url}&keywords=1\">display keywords</a>\n </td>\n </tr>\n {/if}\n {/if}\n\n <tr class=\"all-columns\"><td colspan=\"7\"><h2>Parent Of</h2></td></tr>\n {#if api_request_params.hierarchy}\n {#if aPlace.hierarchy && typeof (aPlace.hierarchy) === 'object' && Object.keys(aPlace.hierarchy).length}\n {#each Object.keys(aPlace.hierarchy) as type}\n <tr class=\"all-columns\"><td colspan=\"7\"><h3>{type}</h3></td></tr>\n {#each aPlace.hierarchy[type] as line}\n <DetailsOneRow addressLine={line} bDistanceInMeters={true} />\n {/each}\n {/each}\n\n {#if Object.keys(aPlace.hierarchy) > 500}\n <p>There are more child objects which are not shown.</p>\n {/if}\n {:else}\n <tr><td>Place is not parent of other places</td></tr>\n {/if}\n {:else}\n <tr>\n <td>\n <a class=\"btn btn-outline-secondary btn-sm\"\n href=\"{base_url}&hierarchy=1\">display child places</a>\n </td>\n </tr>\n {/if}\n </tbody>\n </table>\n </div>\n </div>\n {:else if (window.location.search !== '' && api_request_finished)}\n No such place found.\n {/if}\n</div>\n\n\n\n<style>\n h1 {\n margin: 10px 0;\n padding-left: 8px;\n }\n\n h1 small :global(a) {\n font-size: 0.5em;\n white-space: nowrap;\n }\n\n h2 {\n font-size: 2em;\n padding-left: 8px;\n background-color: white;\n }\n h3 {\n font-size: 1.5em;\n padding-left: 8px;\n }\n\n tr.all-columns {\n background-color: white !important; \n border: none;\n }\n tr.all-columns td {\n border-top: none !important;\n padding-left: 0 !important;\n }\n :global(span.noname){\n color:#800;\n }\n\n #map-wrapper {\n position: relative;\n width:100%;\n min-height: auto;\n height:300px;\n border: 1px solid #666;\n }\n</style>\n","<script>\n import { onMount } from 'svelte';\n import { fetch_from_api, update_html_title } from '../lib/api_utils.js';\n import { formatOSMType, osmLink } from '../lib/helpers.js';\n\n import Header from '../components/Header.svelte';\n\n let aPolygons = [];\n\n function loaddata() {\n fetch_from_api('polygons', { format: 'json' }, function (data) {\n aPolygons = data;\n });\n update_html_title('Broken polygons');\n }\n onMount(loaddata);\n</script>\n\n<Header/>\n<div class=\"container\">\n <div class=\"row\">\n <div class=\"col-sm-12\">\n <h1>Broken polygons</h1>\n\n <p>\n Total number of broken polygons: {aPolygons.length}.\n </p>\n\n <table class=\"table table-striped table-hover\">\n <thead>\n <th>OSM type</th>\n <th>OSM id</th>\n <th>Class</th>\n <th>Type</th>\n <th>Name</th>\n <th>Country Code</th>\n <th>Error message</th>\n <th>Updated</th>\n <th></th>\n </thead>\n <tbody>\n {#each aPolygons as polygon}\n <tr>\n <td>{polygon.osm_type}</td>\n <td>{@html osmLink(polygon)}</td>\n <td>{polygon.class}</td>\n <td>{polygon.type}</td>\n <td>{polygon.name}</td>\n <td>{polygon.country_code || ''}</td>\n <td>{polygon.errormessage}</td>\n <td>{polygon.updated}</td>\n <td>\n <a href=\"http://localhost:8111/import?url=https://www.openstreetmap.org/api/0.6/{formatOSMType(polygon.osm_type)}/{polygon.osm_id}/full\" target=\"josm\">josm</a>\n </td>\n </tr>\n {/each}\n </tbody>\n </table>\n </div>\n </div>\n</div>\n","<script>\n import { onMount } from 'svelte';\n import { fetch_from_api, update_html_title } from '../lib/api_utils.js';\n import { osmLink } from '../lib/helpers.js';\n\n import Header from '../components/Header.svelte';\n import DetailsLink from '../components/DetailsLink.svelte';\n\n let aPolygons = [];\n\n function loaddata() {\n fetch_from_api('deletable', { format: 'json' }, function (data) {\n aPolygons = data;\n });\n update_html_title('Deletable objects');\n }\n onMount(loaddata);\n</script>\n\n<Header/>\n<div class=\"container\">\n <div class=\"row\">\n <div class=\"col-sm-12\">\n <h1>Deletable</h1>\n\n <p>\n {aPolygons.length} objects have been deleted in OSM but are still in the Nominatim database.\n </p>\n\n <table class=\"table table-striped table-hover\">\n <thead>\n <th>Place id</th>\n <th>Country Code</th>\n <th>Name</th>\n <th>OSM id</th>\n <th>OSM type</th>\n <th>Class</th>\n <th>Type</th>\n </thead>\n <tbody>\n {#each aPolygons as polygon}\n <tr>\n <td><DetailsLink feature={polygon}>{polygon.place_id}</DetailsLink></td>\n <td>{polygon.country_code}</td>\n <td>{polygon.name}</td>\n <td>{@html osmLink(polygon)}</td>\n <td>{polygon.osm_type}</td>\n <td>{polygon.class}</td>\n <td>{polygon.type}</td>\n </tr>\n {/each}\n </tbody>\n </table>\n\n </div>\n </div>\n</div>\n\n","<script>\n import { onMount } from 'svelte';\n import { fetch_from_api, update_html_title } from '../lib/api_utils.js';\n\n import Header from '../components/Header.svelte';\n\n let aStatusData = {};\n let configuration = Nominatim_Config;\n\n function loaddata() {\n fetch_from_api('status', { format: 'json' }, function (data) {\n aStatusData = data;\n });\n update_html_title('Server status');\n }\n onMount(loaddata);\n</script>\n\n<Header/>\n<div class=\"container\">\n <div class=\"row\">\n <div class=\"col-sm-12\">\n <h1>Server status</h1>\n\n <dl>\n <dt>API Endpoint</dt>\n <dd><a href={configuration.Nominatim_API_Endpoint}>{configuration.Nominatim_API_Endpoint}</a></dd>\n\n <dt>Software version</dt>\n <dd>{aStatusData.software_version}</dd>\n\n <dt>Database version</dt>\n <dd>{aStatusData.database_version}</dd>\n\n <dt>Data last updated</dt>\n <dd>{aStatusData.data_updated}</dd>\n </dl>\n </div>\n </div>\n</div>\n","<script>\n import Header from '../components/Header.svelte';\n import { onMount } from 'svelte';\n import { fetch_content_into_element } from '../lib/api_utils.js';\n\n onMount(() => {\n fetch_content_into_element('theme/about-help.html', document.getElementById('about-help'));\n });\n</script>\n\n<Header />\n<div id=\"about-help\" class=\"container\"></div>\n\n<style>\n #about-help {\n max-width: 800px;\n padding: 4em;\n }\n</style>","<script>\n import 'bootstrap/dist/css/bootstrap.css';\n import 'bootstrap/dist/js/bootstrap.bundle.js';\n\n import { page, refresh_page } from './lib/stores.js';\n\n import Footer from './components/Footer.svelte';\n import SearchPage from './pages/SearchPage.svelte';\n import ReversePage from './pages/ReversePage.svelte';\n import DetailsPage from './pages/DetailsPage.svelte';\n import PolygonsPage from './pages/PolygonsPage.svelte';\n import DeletablePage from './pages/DeletablePage.svelte';\n import StatusPage from './pages/StatusPage.svelte';\n import AboutPage from './pages/AboutPage.svelte';\n\n $: view = $page.tab;\n\n refresh_page();\n</script>\n\n<!-- deal with back-button and other user action -->\n<svelte:window on:popstate={() => refresh_page()} />\n\n{#if view === 'search'}\n<SearchPage />\n{:else if view === 'reverse'}\n<ReversePage />\n{:else if view === 'details'}\n<DetailsPage />\n{:else if view === 'deletable'}\n<DeletablePage />\n{:else if view === 'polygons'}\n<PolygonsPage />\n{:else if view === 'status'}\n<StatusPage />\n{:else if view === 'about'}\n<AboutPage />\n{/if}\n<Footer/>\n","import App from './App.svelte';\n\nconst app = new App({ // eslint-disable-line no-unused-vars\n target: document.body\n});\n"],"names":["noop","assign","tar","src","k","run","fn","blank_object","Object","create","run_all","fns","forEach","is_function","thing","safe_not_equal","a","b","src_url_equal_anchor","current_component","src_url_equal","element_src","url","document","createElement","href","subscribe","store","callbacks","unsub","unsubscribe","get_store_value","value","_","component_subscribe","component","callback","$$","on_destroy","push","create_slot","definition","ctx","$$scope","slot_ctx","get_slot_context","slice","get_slot_changes","dirty","lets","undefined","merged","len","Math","max","length","i","update_slot_base","slot","slot_definition","slot_changes","get_slot_context_fn","slot_context","p","get_all_dirty_from_scope","append","target","node","appendChild","insert","anchor","insertBefore","detach","parentNode","removeChild","destroy_each","iterations","detaching","d","element","name","text","data","createTextNode","space","empty","listen","event","handler","options","addEventListener","removeEventListener","prevent_default","preventDefault","call","this","stop_propagation","stopPropagation","attr","attribute","removeAttribute","getAttribute","setAttribute","set_data","wholeText","set_input_value","input","select_option","select","option","__value","selected","selectedIndex","toggle_class","toggle","classList","HtmlTag","constructor","is_svg","e","n","c","html","h","m","nodeName","createElementNS","t","innerHTML","Array","from","childNodes","set_current_component","onMount","Error","get_current_component","on_mount","dirty_components","binding_callbacks","render_callbacks","flush_callbacks","resolved_promise","Promise","resolve","update_scheduled","add_render_callback","add_flush_callback","seen_callbacks","Set","flushidx","flush","saved_component","update","pop","has","add","clear","fragment","before_update","after_update","outroing","outros","group_outros","r","check_outros","transition_in","block","local","delete","transition_out","o","bind","index","props","bound","create_component","mount_component","customElement","new_on_destroy","map","filter","destroy_component","make_dirty","then","fill","init","instance","create_fragment","not_equal","append_styles","parent_component","on_disconnect","context","Map","skip_bound","root","ready","ret","rest","hydrate","nodes","children","l","intro","SvelteComponent","$destroy","$on","type","indexOf","splice","$set","$$props","obj","$$set","keys","MAX_UID","MILLISECONDS_MULTIPLIER","TRANSITION_END","toType","object","prototype","toString","match","toLowerCase","getUID","prefix","floor","random","getElementById","getSelector","selector","hrefAttribute","includes","startsWith","split","trim","getSelectorFromElement","querySelector","getElementFromSelector","getTransitionDurationFromElement","transitionDuration","transitionDelay","window","getComputedStyle","floatTransitionDuration","Number","parseFloat","floatTransitionDelay","triggerTransitionEnd","dispatchEvent","Event","isElement$1","jquery","nodeType","getElement","isVisible","getClientRects","elementIsVisible","getPropertyValue","closedDetails","closest","summary","isDisabled","Node","ELEMENT_NODE","contains","disabled","hasAttribute","findShadowRoot","documentElement","attachShadow","getRootNode","ShadowRoot","reflow","offsetHeight","getjQuery","jQuery","body","DOMContentLoadedCallbacks","onDOMContentLoaded","readyState","isRTL","dir","defineJQueryPlugin","plugin","$","NAME","JQUERY_NO_CONFLICT","jQueryInterface","Constructor","noConflict","execute","executeAfterTransition","transitionElement","waitForTransition","durationPadding","emulatedDuration","called","setTimeout","getNextActiveElement","list","activeElement","shouldGetNext","isCycleAllowed","listLength","min","namespaceRegex","stripNameRegex","stripUidRegex","eventRegistry","uidEvent","customEvents","mouseenter","mouseleave","nativeEvents","makeEventUid","uid","getElementEvents","bootstrapHandler","hydrateObj","delegateTarget","oneOff","EventHandler","off","apply","bootstrapDelegationHandler","domElements","querySelectorAll","domElement","findHandler","events","callable","delegationSelector","values","find","normalizeParameters","originalTypeEvent","delegationFunction","isDelegated","typeEvent","getTypeEvent","addHandler","wrapFunction","relatedTarget","handlers","previousFunction","replace","removeHandler","Boolean","removeNamespacedHandlers","namespace","storeElementEvent","handlerKey","on","one","inNamespace","isNamespace","elementEvent","keyHandlers","trigger","args","jQueryEvent","bubbles","nativeDispatch","defaultPrevented","isPropagationStopped","isImmediatePropagationStopped","isDefaultPrevented","evt","cancelable","meta","key","entries","_unused","defineProperty","configurable","get","elementMap","Data","set","instanceMap","size","console","error","remove","normalizeData","JSON","parse","decodeURIComponent","normalizeDataKey","chr","Manipulator","setDataAttribute","removeDataAttribute","getDataAttributes","attributes","bsKeys","dataset","pureKey","charAt","getDataAttribute","Config","Default","DefaultType","_getConfig","config","_mergeConfigObj","_configAfterMerge","_typeCheckConfig","jsonConfig","configTypes","property","expectedTypes","valueType","RegExp","test","TypeError","toUpperCase","VERSION","BaseComponent","super","_element","_config","DATA_KEY","dispose","EVENT_KEY","propertyName","getOwnPropertyNames","_queueCallback","isAnimated","static","getInstance","enableDismissTrigger","method","clickEvent","tagName","getOrCreateInstance","NAME$f","EVENT_KEY$b","EVENT_CLOSE","EVENT_CLOSED","CLASS_NAME_FADE$5","CLASS_NAME_SHOW$8","Alert","close","_destroyElement","each","NAME$e","CLASS_NAME_ACTIVE$3","SELECTOR_DATA_TOGGLE$5","EVENT_CLICK_DATA_API$6","Button","button","SelectorEngine","concat","Element","findOne","child","matches","parents","ancestor","prev","previous","previousElementSibling","next","nextElementSibling","focusableChildren","focusables","join","el","NAME$d","EVENT_KEY$9","EVENT_TOUCHSTART","EVENT_TOUCHMOVE","EVENT_TOUCHEND","EVENT_POINTERDOWN","EVENT_POINTERUP","POINTER_TYPE_TOUCH","POINTER_TYPE_PEN","CLASS_NAME_POINTER_EVENT","SWIPE_THRESHOLD","Default$c","endCallback","leftCallback","rightCallback","DefaultType$c","Swipe","isSupported","_deltaX","_supportPointerEvents","PointerEvent","_initEvents","_start","_eventIsPointerPenTouch","clientX","touches","_end","_handleSwipe","_move","absDeltaX","abs","direction","pointerType","navigator","maxTouchPoints","NAME$c","EVENT_KEY$8","DATA_API_KEY$5","TOUCHEVENT_COMPAT_WAIT","ORDER_NEXT","ORDER_PREV","DIRECTION_LEFT","DIRECTION_RIGHT","EVENT_SLIDE","EVENT_SLID","EVENT_KEYDOWN$1","EVENT_MOUSEENTER$1","EVENT_MOUSELEAVE$1","EVENT_DRAG_START","EVENT_LOAD_DATA_API$3","EVENT_CLICK_DATA_API$5","CLASS_NAME_CAROUSEL","CLASS_NAME_ACTIVE$2","CLASS_NAME_SLIDE","CLASS_NAME_END","CLASS_NAME_START","CLASS_NAME_NEXT","CLASS_NAME_PREV","SELECTOR_ACTIVE","SELECTOR_ITEM","SELECTOR_ACTIVE_ITEM","SELECTOR_ITEM_IMG","SELECTOR_INDICATORS","SELECTOR_DATA_SLIDE","SELECTOR_DATA_RIDE","KEY_TO_DIRECTION","ArrowLeft","ArrowRight","Default$b","interval","keyboard","pause","ride","touch","wrap","DefaultType$b","Carousel","_interval","_activeElement","_isSliding","touchTimeout","_swipeHelper","_indicatorsElement","_addEventListeners","cycle","_slide","nextWhenVisible","hidden","_clearInterval","_updateInterval","setInterval","_maybeEnableCycle","to","items","_getItems","activeIndex","_getItemIndex","_getActive","order","defaultInterval","_keydown","_addTouchEventListeners","img","swipeConfig","_directionToOrder","clearTimeout","_setActiveIndicatorElement","activeIndicator","newActiveIndicator","elementInterval","parseInt","isNext","nextElement","nextElementIndex","triggerEvent","eventName","_orderToDirection","isCycling","directionalClassName","orderClassName","completeCallBack","_isAnimated","clearInterval","carousel","slideIndex","carousels","NAME$b","EVENT_KEY$7","EVENT_SHOW$6","EVENT_SHOWN$6","EVENT_HIDE$6","EVENT_HIDDEN$6","EVENT_CLICK_DATA_API$4","CLASS_NAME_SHOW$7","CLASS_NAME_COLLAPSE","CLASS_NAME_COLLAPSING","CLASS_NAME_COLLAPSED","CLASS_NAME_DEEPER_CHILDREN","CLASS_NAME_HORIZONTAL","WIDTH","HEIGHT","SELECTOR_ACTIVES","SELECTOR_DATA_TOGGLE$4","Default$a","parent","DefaultType$a","Collapse","_isTransitioning","_triggerArray","toggleList","elem","filterElement","foundElement","_initializeChildren","_addAriaAndCollapsedClass","_isShown","hide","show","activeChildren","_getFirstLevelChildren","activeInstance","dimension","_getDimension","style","complete","scrollSize","getBoundingClientRect","triggerArray","isOpen","selectorElements","top","bottom","right","left","auto","basePlacements","start","end","clippingParents","viewport","popper","reference","variationPlacements","reduce","acc","placement","placements","beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite","modifierPhases","getNodeName","getWindow","ownerDocument","defaultView","isElement","isHTMLElement","HTMLElement","isShadowRoot","applyStyles","_ref","state","elements","styles","effect$2","_ref2","initialStyles","position","strategy","margin","arrow","hasOwnProperty","applyStyles$1","enabled","phase","effect","requires","getBasePlacement","round","getUAString","uaData","userAgentData","brands","item","brand","version","userAgent","isLayoutViewport","includeScale","isFixedStrategy","clientRect","scaleX","scaleY","offsetWidth","width","height","visualViewport","addVisualOffsets","x","offsetLeft","y","offsetTop","getLayoutRect","rootNode","isSameNode","host","getComputedStyle$1","isTableElement","getDocumentElement","getParentNode","assignedSlot","getTrueOffsetParent","offsetParent","getContainingBlock","isFirefox","currentNode","css","transform","perspective","contain","willChange","getOffsetParent","getMainAxisFromPlacement","within","min$1","max$1","withinMaxClamp","v","getFreshSideObject","mergePaddingObject","paddingObject","expandToHashMap","hashMap","toPaddingObject","padding","rects","_state$modifiersData$","arrowElement","popperOffsets","modifiersData","basePlacement","axis","arrowRect","minProp","maxProp","endDiff","startDiff","arrowOffsetParent","clientSize","clientHeight","clientWidth","centerToReference","center","offset","axisProp","centerOffset","effect$1","_options$element","arrow$1","requiresIfExists","getVariation","unsetSides","roundOffsetsByDPR","dpr","devicePixelRatio","mapToStyles","_Object$assign2","popperRect","variation","offsets","gpuAcceleration","adaptive","roundOffsets","isFixed","_offsets$x","_offsets$y","_ref3","hasX","hasY","sideX","sideY","win","heightProp","widthProp","_Object$assign","commonStyles","_ref4","computeStyles","_ref5","_options$gpuAccelerat","_options$adaptive","_options$roundOffsets","computeStyles$1","passive","_options$scroll","scroll","_options$resize","resize","scrollParents","scrollParent","eventListeners","hash$1","getOppositePlacement","matched","hash","getOppositeVariationPlacement","getWindowScroll","scrollLeft","pageXOffset","scrollTop","pageYOffset","getWindowScrollBarX","getViewportRect","layoutViewport","getDocumentRect","_element$ownerDocumen","winScroll","scrollWidth","scrollHeight","isScrollParent","_getComputedStyle","overflow","overflowX","overflowY","getScrollParent","listScrollParents","isBody","updatedList","rectToClientRect","rect","getInnerBoundingClientRect","clientTop","clientLeft","getClientRectFromMixedType","clippingParent","getClippingParents","clipperElement","getClippingRect","boundary","rootBoundary","mainClippingParents","firstClippingParent","clippingRect","accRect","computeOffsets","commonX","commonY","mainAxis","detectOverflow","_options","_options$placement","_options$strategy","_options$boundary","_options$rootBoundary","_options$elementConte","elementContext","_options$altBoundary","altBoundary","_options$padding","altContext","clippingClientRect","contextElement","referenceClientRect","popperClientRect","elementClientRect","overflowOffsets","offsetData","multiply","computeAutoPlacement","flipVariations","_options$allowedAutoP","allowedAutoPlacements","placements$1","allowedPlacements","overflows","sort","getExpandedFallbackPlacements","oppositePlacement","flip","_skip","_options$mainAxis","checkMainAxis","_options$altAxis","altAxis","checkAltAxis","specifiedFallbackPlacements","fallbackPlacements","_options$flipVariatio","preferredPlacement","referenceRect","checksMap","makeFallbackChecks","firstFittingPlacement","_basePlacement","isStartVariation","isVertical","mainVariationSide","altVariationSide","checks","every","check","_loop","_i","fittingPlacement","reset","flip$1","getSideOffsets","preventedOffsets","isAnySideFullyClipped","some","side","preventOverflow","referenceOverflow","popperAltOverflow","referenceClippingOffsets","popperEscapeOffsets","isReferenceHidden","hasPopperEscaped","hide$1","distanceAndSkiddingToXY","invertDistance","skidding","distance","_options$offset","_data$state$placement","offset$1","popperOffsets$1","getAltAxis","_options$tether","tether","_options$tetherOffset","tetherOffset","isBasePlacement","tetherOffsetValue","normalizedTetherOffsetValue","offsetModifierState","_offsetModifierState$","mainSide","altSide","additive","minLen","maxLen","arrowPaddingObject","arrowPaddingMin","arrowPaddingMax","arrowLen","minOffset","maxOffset","clientOffset","offsetModifierValue","tetherMax","preventedOffset","_offsetModifierState$2","_mainSide","_altSide","_offset","_len","_min","_max","isOriginSide","_offsetModifierValue","_tetherMin","_tetherMax","_preventedOffset","preventOverflow$1","getHTMLElementScroll","getNodeScroll","isElementScaled","getCompositeRect","elementOrVirtualElement","isOffsetParentAnElement","offsetParentIsScaled","modifiers","visited","result","modifier","dep","depModifier","orderModifiers","orderedModifiers","debounce","pending","mergeByName","current","existing","DEFAULT_OPTIONS","areValidElements","arguments","_key","popperGenerator","generatorOptions","_generatorOptions","_generatorOptions$def","defaultModifiers","_generatorOptions$def2","defaultOptions","effectCleanupFns","isDestroyed","setOptions","setOptionsAction","cleanupModifierEffects","runModifierEffects","forceUpdate","_state$elements","_state$orderedModifie","_state$orderedModifie2","destroy","_ref3$options","cleanupFn","noopFn","onFirstUpdate","createPopper$2","createPopper$1","createPopper","Popper","freeze","__proto__","createPopperBase","createPopperLite","Symbol","toStringTag","NAME$a","EVENT_KEY$6","DATA_API_KEY$3","ESCAPE_KEY$2","TAB_KEY$1","ARROW_UP_KEY$1","ARROW_DOWN_KEY$1","RIGHT_MOUSE_BUTTON","EVENT_HIDE$5","EVENT_HIDDEN$5","EVENT_SHOW$5","EVENT_SHOWN$5","EVENT_CLICK_DATA_API$3","EVENT_KEYDOWN_DATA_API","EVENT_KEYUP_DATA_API","CLASS_NAME_SHOW$6","CLASS_NAME_DROPUP","CLASS_NAME_DROPEND","CLASS_NAME_DROPSTART","CLASS_NAME_DROPUP_CENTER","CLASS_NAME_DROPDOWN_CENTER","SELECTOR_DATA_TOGGLE$3","SELECTOR_DATA_TOGGLE_SHOWN","SELECTOR_MENU","SELECTOR_NAVBAR","SELECTOR_NAVBAR_NAV","SELECTOR_VISIBLE_ITEMS","PLACEMENT_TOP","PLACEMENT_TOPEND","PLACEMENT_BOTTOM","PLACEMENT_BOTTOMEND","PLACEMENT_RIGHT","PLACEMENT_LEFT","PLACEMENT_TOPCENTER","PLACEMENT_BOTTOMCENTER","Default$9","autoClose","display","popperConfig","DefaultType$9","Dropdown","_popper","_parent","_menu","_inNavbar","_detectNavbar","_createPopper","focus","_completeHide","referenceElement","_getPopperConfig","_getPlacement","parentDropdown","isEnd","_getOffset","popperData","defaultBsPopperConfig","_selectMenuItem","openToggles","composedPath","isMenuTarget","isInput","isEscapeEvent","isUpOrDownEvent","getToggleButton","dataApiKeydownHandler","clearMenus","SELECTOR_FIXED_CONTENT","SELECTOR_STICKY_CONTENT","PROPERTY_PADDING","PROPERTY_MARGIN","ScrollBarHelper","getWidth","documentWidth","innerWidth","_disableOverFlow","_setElementAttributes","calculatedValue","_resetElementAttributes","isOverflowing","_saveInitialAttribute","styleProperty","scrollbarWidth","manipulationCallBack","setProperty","_applyManipulationCallback","actualValue","removeProperty","callBack","sel","NAME$9","CLASS_NAME_FADE$4","CLASS_NAME_SHOW$5","EVENT_MOUSEDOWN","Default$8","className","clickCallback","rootElement","DefaultType$8","Backdrop","_isAppended","_append","_getElement","_emulateAnimation","backdrop","NAME$8","EVENT_KEY$5","EVENT_FOCUSIN$2","EVENT_KEYDOWN_TAB","TAB_KEY","TAB_NAV_FORWARD","TAB_NAV_BACKWARD","Default$7","autofocus","trapElement","DefaultType$7","FocusTrap","_isActive","_lastTabNavDirection","activate","_handleFocusin","_handleKeydown","deactivate","shiftKey","NAME$7","EVENT_KEY$4","ESCAPE_KEY$1","EVENT_HIDE$4","EVENT_HIDE_PREVENTED$1","EVENT_HIDDEN$4","EVENT_SHOW$4","EVENT_SHOWN$4","EVENT_RESIZE$1","EVENT_CLICK_DISMISS","EVENT_MOUSEDOWN_DISMISS","EVENT_KEYDOWN_DISMISS$1","EVENT_CLICK_DATA_API$2","CLASS_NAME_OPEN","CLASS_NAME_FADE$3","CLASS_NAME_SHOW$4","CLASS_NAME_STATIC","OPEN_SELECTOR$1","SELECTOR_DIALOG","SELECTOR_MODAL_BODY","SELECTOR_DATA_TOGGLE$2","Default$6","DefaultType$6","Modal","_dialog","_backdrop","_initializeBackDrop","_focustrap","_initializeFocusTrap","_scrollBar","_adjustDialog","_showElement","_hideModal","htmlElement","handleUpdate","modalBody","transitionComplete","_triggerBackdropTransition","event2","_resetAdjustments","isModalOverflowing","initialOverflowY","isBodyOverflowing","paddingLeft","paddingRight","showEvent","alreadyOpen","NAME$6","EVENT_KEY$3","DATA_API_KEY$1","EVENT_LOAD_DATA_API$2","ESCAPE_KEY","CLASS_NAME_SHOW$3","CLASS_NAME_SHOWING$1","CLASS_NAME_HIDING","CLASS_NAME_BACKDROP","OPEN_SELECTOR","EVENT_SHOW$3","EVENT_SHOWN$3","EVENT_HIDE$3","EVENT_HIDE_PREVENTED","EVENT_HIDDEN$3","EVENT_RESIZE","EVENT_CLICK_DATA_API$1","EVENT_KEYDOWN_DISMISS","SELECTOR_DATA_TOGGLE$1","Default$5","DefaultType$5","Offcanvas","blur","completeCallback","uriAttributes","SAFE_URL_PATTERN","DATA_URL_PATTERN","allowedAttribute","allowedAttributeList","attributeName","nodeValue","attributeRegex","regex","DefaultAllowlist","area","br","col","code","div","em","hr","h1","h2","h3","h4","h5","h6","li","ol","pre","s","small","span","sub","sup","strong","u","ul","sanitizeHtml","unsafeHtml","allowList","sanitizeFunction","createdDocument","DOMParser","parseFromString","elementName","attributeList","allowedAttributes","NAME$5","Default$4","content","extraClass","sanitize","sanitizeFn","template","DefaultType$4","DefaultContentType","entry","TemplateFactory","getContent","_resolvePossibleFunction","hasContent","changeContent","_checkContent","toHtml","templateWrapper","_maybeSanitize","_setContent","arg","templateElement","_putElementInTemplate","textContent","NAME$4","DISALLOWED_ATTRIBUTES","CLASS_NAME_FADE$2","CLASS_NAME_SHOW$2","SELECTOR_TOOLTIP_INNER","SELECTOR_MODAL","EVENT_MODAL_HIDE","TRIGGER_HOVER","TRIGGER_FOCUS","TRIGGER_CLICK","TRIGGER_MANUAL","EVENT_HIDE$2","EVENT_HIDDEN$2","EVENT_SHOW$2","EVENT_SHOWN$2","EVENT_INSERTED","EVENT_CLICK$1","EVENT_FOCUSIN$1","EVENT_FOCUSOUT$1","EVENT_MOUSEENTER","EVENT_MOUSELEAVE","AttachmentMap","AUTO","TOP","RIGHT","BOTTOM","LEFT","Default$3","animation","container","customClass","delay","title","DefaultType$3","Tooltip","_isEnabled","_timeout","_isHovered","_activeTrigger","_templateFactory","_newContent","tip","_setListeners","enable","disable","toggleEnabled","_initializeOnDelegatedTarget","click","_isWithActiveTrigger","_enter","_leave","_hideModalHandler","originalTitle","_disposePopper","_isWithContent","isInTheDom","_getTipElement","_getTitle","_createTipElement","_getContentForTemplate","_getTemplateFactory","tipId","setContent","_getDelegateConfig","attachment","triggers","eventIn","eventOut","_fixTitle","_setTimeout","timeout","dataAttributes","dataAttribute","NAME$3","SELECTOR_TITLE","SELECTOR_CONTENT","Default$2","DefaultType$2","Popover","_getContent","NAME$2","EVENT_KEY$2","EVENT_ACTIVATE","EVENT_CLICK","EVENT_LOAD_DATA_API$1","CLASS_NAME_DROPDOWN_ITEM","CLASS_NAME_ACTIVE$1","SELECTOR_DATA_SPY","SELECTOR_TARGET_LINKS","SELECTOR_NAV_LIST_GROUP","SELECTOR_NAV_LINKS","SELECTOR_LINK_ITEMS","SELECTOR_DROPDOWN","SELECTOR_DROPDOWN_TOGGLE$1","Default$1","rootMargin","smoothScroll","threshold","DefaultType$1","ScrollSpy","_targetLinks","_observableSections","_rootElement","_activeTarget","_observer","_previousScrollData","visibleEntryTop","parentScrollTop","refresh","_initializeTargetsAndObservables","_maybeEnableSmoothScroll","disconnect","_getNewObserver","section","observe","observableSection","scrollTo","behavior","IntersectionObserver","_observerCallback","targetElement","id","_process","userScrollsDown","isIntersecting","_clearActiveClass","entryIsLowerThanPrevious","targetLinks","_activateParents","listGroup","activeNodes","spy","NAME$1","EVENT_KEY$1","EVENT_HIDE$1","EVENT_HIDDEN$1","EVENT_SHOW$1","EVENT_SHOWN$1","EVENT_CLICK_DATA_API","EVENT_KEYDOWN","EVENT_LOAD_DATA_API","ARROW_LEFT_KEY","ARROW_RIGHT_KEY","ARROW_UP_KEY","ARROW_DOWN_KEY","CLASS_NAME_ACTIVE","CLASS_NAME_FADE$1","CLASS_NAME_SHOW$1","CLASS_DROPDOWN","SELECTOR_DROPDOWN_TOGGLE","SELECTOR_DROPDOWN_MENU","SELECTOR_DROPDOWN_ITEM","NOT_SELECTOR_DROPDOWN_TOGGLE","SELECTOR_TAB_PANEL","SELECTOR_OUTER","SELECTOR_DATA_TOGGLE","SELECTOR_INNER_ELEM","SELECTOR_DATA_TOGGLE_ACTIVE","Tab","_setInitialAttributes","_getChildren","innerElem","_elemIsActive","active","_getActiveElem","hideEvent","_deactivate","_activate","relatedElem","_toggleDropDown","nextActiveElement","_setAttributeIfNotExists","_setInitialAttributesOnChild","_getInnerElement","isActive","outerElem","_getOuterElement","_setInitialAttributesOnTargetPanel","open","EVENT_MOUSEOVER","EVENT_MOUSEOUT","EVENT_FOCUSIN","EVENT_FOCUSOUT","EVENT_HIDE","EVENT_HIDDEN","EVENT_SHOW","EVENT_SHOWN","CLASS_NAME_FADE","CLASS_NAME_HIDE","CLASS_NAME_SHOW","CLASS_NAME_SHOWING","autohide","Toast","_hasMouseInteraction","_hasKeyboardInteraction","_clearTimeout","_maybeScheduleHide","isShown","_onInteraction","isInteracting","factory","subscriber_queue","writable","stop","subscribers","new_value","run_queue","subscriber","invalidate","map_store","results_store","last_api_request_url_store","error_store","page","default_pagename","Nominatim_Config","Reverse_Only","pagenames","refresh_page","pagename","params","location","pathname","URLSearchParams","search","param_str","new_url","protocol","history","pushState","tab","footer","api_request_progress","status","loading_el","async","fetch_from_api","endpoint_name","api_url","dedupe","params2","param_names","extend_parameters","Nominatim_API_Endpoint_Params","generate_nominatim_endpoint_url","val","clean_up_parameters","encodeURIComponent","generate_nominatim_api_url","tmp_params","fetch","headers","Nominatim_API_Endpoint_Headers","response","json","err","statusText","message","fetch_content_cache","fetch_content_into_element","dom_element","conf_endpoint","Nominatim_API_Endpoint","update_html_title","Page_Title","params_hash","extra_classes","lat","lon","zoom","new_params","$$invalidate","EN_US","ZH_CN","Locales","register","locale","func","SEC_ARRAY","toDate","Date","isNaN","format","date","opts","sec","relativeDate","diffSec","diff","localeFunc","agoIn","totalSec","idx","formatDiff","getLocale","a0","a1","t1_value","timeago.format","abbr","t1","create_if_block_1","create_if_block","div5","div1","div4","div2","div3","last_updated_date","last_api_request_url","fetch_running","URL","origin","searchParams","data_updated","unit","error_message","pagelink_changes","header","nav","div0","ul0","li0","li1","ul1","li2","section0","section1","reverselink_changes","pagelink1_changes","pagelink2_changes","map_lat","map_lon","getCenter","lng","view","$page","page_title","reverse_only","form","allow_submit","field","pattern","checkValidity","validate_field","alert","checked","serialize_form","q","input1","input1_value_value","input2","input2_value_value","input3","input3_value_value","bounded","countrycodes","input5","limit","polygon_threshold","input0","input4","input6","input7","input0_value_value","street","city","county","country","postalcode","input6_value_value","input7_value_value","input8","input8_value_value","input10","div6","input9","input11","input12","input4_value_value","input5_value_value","input0_checked_value","viewbox","input1_checked_value","input2_checked_value","details","label0","li3","label1","li4","label2","li5","label3","li6","label4","li7","label5","li8","label6","set_bounded","set_dedupe","set_api_param","apiParam","sViewBox","bStructuredSearch","api_request_params","set_viewbox","use_viewbox","bounds","getBounds","west","getWest","east","getEast","L","latLng","toFixed","getNorth","getSouth","map_viewbox_as_string","update_reverse_link","center_lat_lng","wrapLatLng","matchHtmlRegExp","escapeHtml_1","string","escape","str","exec","lastIndex","charCodeAt","substring","formatOSMType_1","formatOSMType","osmLink_1","aPlace","osm_type","sOSMType","osm_id","formatLabel_1","label","capitalize","class","wikipediaLink_1","calculated_wikipedia","parts","sTitle","escapeHtml","sLanguage","sArticle","coverageType_1","isarea","isAdminBoundary_1","category","formatAddressRank_1","iRank","formatPlaceType_1","sOut","place_type","formatAdminLevel_1","iLevel","formatDistance_1","fDistance","bInMeters","sFormatted","formatKeywordToken_1","sToken","zoomLevels_1","require$$0","sType","bExcludeExternal","feature","url_params","place_id","img_src_value","sIcon","Images_Base_Url","create_if_block_3","if_block","each_blocks","display_name","t3_value","formatLabel","t5_value","t7_value","important","span0","span1","t3","t5","t7","aSearchResults","iHighlightNum","sMoreURL","reverse_search","current_result","search_params","aResults","aExcludePlaceIds","parsed_url","result_el","parentElement","pos","extend","dest","j","create$2","F","proto","lastId","stamp","_leaflet_id","throttle","time","lock","wrapperFn","later","wrapNum","range","includeMax","falseFn","formatNum","num","precision","pow","splitWords","getParamString","existingUrl","uppercase","templateRe","isArray","array","emptyImageUrl","getPrefixed","lastTime","timeoutDefer","timeToCall","requestFn","requestAnimationFrame","cancelFn","cancelAnimationFrame","requestAnimFrame","immediate","cancelAnimFrame","Util","Class","NewClass","initialize","callInitHooks","parentProto","__super__","statics","Mixin","Events","warn","stack","checkDeprecatedMixinEvents","_initHooks","_initHooksCalled","include","parentOptions","mergeOptions","addInitHook","types","_on","_off","removeAll","_events","_once","_listens","newListener","once","listeners","listener","_firingCount","fire","propagate","listens","sourceTarget","_propagateEvent","_fn","_eventParents","addEventParent","removeEventParent","layer","propagatedFrom","clearAllEventListeners","addOneTimeEventListener","fireEvent","hasEventListeners","Evented","Point","trunc","ceil","toPoint","Bounds","points","toBounds","LatLngBounds","corner1","corner2","latlngs","toLatLngBounds","LatLng","alt","toLatLng","clone","point","_add","subtract","_subtract","divideBy","_divideBy","multiplyBy","_multiplyBy","scaleBy","unscaleBy","_round","_floor","_ceil","_trunc","distanceTo","sqrt","equals","min2","max2","getBottomLeft","getTopRight","getTopLeft","getBottomRight","getSize","intersects","xIntersects","yIntersects","overlaps","xOverlaps","yOverlaps","isValid","pad","bufferRatio","heightBuffer","widthBuffer","sw2","ne2","sw","_southWest","ne","_northEast","getSouthWest","getNorthEast","getNorthWest","getSouthEast","latIntersects","lngIntersects","latOverlaps","lngOverlaps","toBBoxString","maxMargin","other","Earth","sizeInMeters","latAccuracy","lngAccuracy","cos","PI","CRS","latLngToPoint","latlng","projectedPoint","projection","project","scale","transformation","_transform","pointToLatLng","untransformedPoint","untransform","unproject","log","LN2","getProjectedBounds","infinite","wrapLng","wrapLat","wrapLatLngBounds","newCenter","latShift","lngShift","R","latlng1","latlng2","rad","lat1","lat2","sinDLat","sin","sinDLon","atan2","earthRadius","SphericalMercator","MAX_LATITUDE","atan","exp","Transformation","_a","_b","_c","_d","toTransformation","EPSG3857","EPSG900913","svgCreate","pointsToPath","rings","closed","len2","Browser","svg","ie","ielt9","edge","webkit","userAgentContains","android","android23","webkitVer","androidStock","opera","chrome","gecko","safari","phantom","opera12","platform","ie3d","webkit3d","WebKitCSSMatrix","gecko3d","any3d","L_DISABLE_3D","mobile","orientation","mobileWebkit","mobileWebkit3d","msPointer","MSPointerEvent","pointer","touchNative","TouchEvent","L_NO_TOUCH","mobileOpera","mobileGecko","retina","screen","deviceXDPI","logicalXDPI","passiveEvents","supportsPassiveOption","canvas$1","getContext","svg$1","createSVGRect","inlineSvg","firstChild","namespaceURI","vml","shape","adj","canvas","mac","linux","POINTER_DOWN","POINTER_MOVE","POINTER_UP","POINTER_CANCEL","pEvent","touchstart","touchmove","touchend","touchcancel","handle","MSPOINTER_TYPE_TOUCH","_handlePointer","_pointers","_pointerDocListener","addPointerListener","_globalPointerDown","_globalPointerMove","_globalPointerUp","pointerId","MSPOINTER_TYPE_MOUSE","changedTouches","disableTextSelection","enableTextSelection","_userSelect","_outlineElement","_outlineStyle","TRANSFORM","testProp","TRANSITION","getStyle","currentStyle","create$1","toFront","lastChild","toBack","hasClass","getClass","addClass","classes","setClass","removeClass","baseVal","correspondingElement","setOpacity","opacity","filterName","filters","Enabled","Opacity","_setOpacityIE","setTransform","setPosition","_leaflet_pos","getPosition","userSelectProperty","disableImageDrag","enableImageDrag","preventOutline","tabIndex","restoreOutline","outline","getSizedParentNode","getScale","boundingClientRect","DomUtil","addOne","eventsKey","batchRemove","removeOne","filterFn","mouseSubst","wheel","originalHandler","detail","last","simDblclick","sourceCapabilities","firesTouchEvents","path","getPropagationPath","HTMLLabelElement","for","HTMLInputElement","HTMLSelectElement","now","prop","newEvent","isTrusted","_simulated","makeDblclick","dblclick","addDoubleTapListener","isExternalTarget","attachEvent","removePointerListener","removeDoubleTapListener","detachEvent","originalEvent","_stopped","cancelBubble","disableScrollPropagation","disableClickPropagation","returnValue","ev","getMousePosition","clientY","wheelPxFactor","getWheelDelta","wheelDeltaY","deltaY","deltaMode","deltaX","deltaZ","wheelDelta","related","DomEvent","addListener","removeListener","PosAnimation","newPos","duration","easeLinearity","_el","_inProgress","_duration","_easeOutPower","_startPos","_startTime","_animate","_step","_complete","_animId","elapsed","_runFrame","_easeOut","progress","crs","minZoom","maxZoom","layers","maxBounds","renderer","zoomAnimation","zoomAnimationThreshold","fadeAnimation","markerZoomAnimation","transform3DLimit","zoomSnap","zoomDelta","trackResize","_handlers","_layers","_zoomBoundLayers","_sizeChanged","_initContainer","_initLayout","_onResize","setMaxBounds","_zoom","_limitZoom","setView","_zoomAnimated","_createAnimProxy","_proxy","_catchTransitionEnd","_addLayers","_limitCenter","_stop","_loaded","animate","pan","_tryAnimatedZoom","_tryAnimatedPan","_sizeTimer","_resetView","noMoveStart","setZoom","zoomIn","delta","zoomOut","setZoomAround","getZoomScale","viewHalf","latLngToContainerPoint","containerPointToLatLng","_getBoundsCenterZoom","paddingTL","paddingTopLeft","paddingBR","paddingBottomRight","getBoundsZoom","Infinity","paddingOffset","swPoint","nePoint","fitBounds","fitWorld","panTo","panBy","getZoom","_panAnim","step","_onPanTransitionStep","_onPanTransitionEnd","_mapPane","_getMapPanePos","_rawPanBy","flyTo","targetCenter","targetZoom","startZoom","w0","w1","u1","rho","rho2","sq","sinh","cosh","r0","S","_moveStart","frame","easeOut","_flyToFrame","getScaleZoom","w","_moveEnd","flyToBounds","_panInsideMaxBounds","setMinZoom","oldZoom","setMaxZoom","panInsideBounds","_enforcingBounds","panInside","pixelCenter","pixelPoint","pixelBounds","getPixelBounds","paddedBounds","paddedSize","invalidateSize","oldSize","_lastCenter","newSize","oldCenter","debounceMoveend","locate","_locateOptions","watch","_handleGeolocationError","onResponse","_handleGeolocationResponse","onError","_locationWatchId","geolocation","watchPosition","getCurrentPosition","stopLocate","clearWatch","_container","coords","latitude","longitude","accuracy","timestamp","HandlerClass","_containerId","_clearControlPos","_resizeRequest","_clearHandlers","_panes","_renderer","createPane","pane","_checkIfLoaded","_moved","layerPointToLatLng","_getCenterLayerPoint","getMinZoom","_layersMinZoom","getMaxZoom","_layersMaxZoom","inside","nw","se","boundsSize","snap","scalex","scaley","_size","topLeftPoint","_getTopLeftPoint","getPixelOrigin","_pixelOrigin","getPixelWorldBounds","getPane","getPanes","getContainer","toZoom","fromZoom","latLngToLayerPoint","containerPointToLayerPoint","layerPointToContainerPoint","layerPoint","mouseEventToContainerPoint","mouseEventToLayerPoint","mouseEventToLatLng","_onScroll","_fadeAnimated","_initPanes","_initControlPos","panes","_paneRenderers","markerPane","shadowPane","loading","zoomChanged","supressEvent","_getNewPixelOrigin","pinch","_getZoomSpan","_targets","onOff","_handleDOMEvent","_onMoveEnd","_findEventTargets","targets","isHover","srcElement","dragging","_draggableMoved","_isClickDisabled","_fireDOMEvent","_mouseEvents","canvasTargets","synth","filtered","isMarker","getLatLng","_radius","containerPoint","bubblingMouseEvents","moved","boxZoom","whenReady","_latLngToNewLayerPoint","topLeft","_latLngBoundsToNewLayerBounds","latLngBounds","_getCenterOffset","centerPoint","viewBounds","_getBoundsOffset","_limitOffset","newBounds","pxBounds","projectedMaxBounds","_rebound","proxy","mapPane","_animatingZoom","_onZoomTransitionEnd","_animMoveEnd","_destroyAnimProxy","z","_nothingToAnimate","getElementsByClassName","_animateZoom","startAnim","noUpdate","_animateToCenter","_animateToZoom","_tempFireZoomEvent","createMap","Control","_map","removeControl","addControl","addTo","onAdd","corner","_controlCorners","onRemove","_refocusOnMap","screenX","screenY","control","Map$2","corners","_controlContainer","createCorner","vSide","hSide","Layers","collapsed","autoZIndex","hideSingleBase","sortLayers","sortFunction","layerA","layerB","nameA","nameB","baseLayers","overlays","_layerControlInputs","_lastZIndex","_handlingClick","_addLayer","_update","_checkDisabledLayers","_onLayerChange","_expandIfNotCollapsed","addBaseLayer","addOverlay","removeLayer","_getLayer","expand","_section","acceptableHeight","collapse","link","_layersLink","_baseLayersList","_separator","_overlaysList","overlay","setZIndex","baseLayersPresent","overlaysPresent","baseLayersCount","_addItem","_createRadioElement","radioHtml","radioFragment","hasLayer","defaultChecked","layerId","_onInputClick","holder","inputs","addedLayers","removedLayers","addLayer","Zoom","zoomInText","zoomInTitle","zoomOutText","zoomOutTitle","zoomName","_zoomInButton","_createButton","_zoomIn","_zoomOutButton","_zoomOut","_updateDisabled","_disabled","zoomControl","Scale","maxWidth","metric","imperial","_addScales","updateWhenIdle","_mScale","_iScale","maxMeters","_updateScales","_updateMetric","_updateImperial","meters","_getRoundNum","_updateScale","maxMiles","miles","feet","maxFeet","ratio","pow10","Attribution","ukrainianFlag","_attributions","attributionControl","getAttribution","addAttribution","_addAttribution","removeAttribution","setPrefix","attribs","prefixAndAttribs","attribution","Handler","_enabled","addHooks","removeHooks","_lastCode","START","Draggable","clickTolerance","dragStartTarget","_dragStartTarget","_preventOutline","_onDown","_dragging","finishDrag","which","_moving","first","sizedParent","_startPoint","_parentScale","mouseevent","_onMove","_onUp","_lastTarget","SVGElementInstance","correspondingUseElement","_newPos","_lastEvent","_updatePosition","noInertia","simplify","tolerance","sqTolerance","reducedPoints","_sqDist","_reducePoints","markers","Uint8Array","_simplifyDPStep","newPoints","_simplifyDP","pointToSegmentDistance","p1","p2","_sqClosestPointOnSegment","sqDist","maxSqDist","clipSegment","useLastCode","codeOut","newCode","codeA","_getBitCode","codeB","_getEdgeIntersection","dx","dy","dot","isFlat","_flat","polylineCenter","halfDist","segDist","dist","LineUtil","closestPointOnSegment","clipPolygon","clippedPoints","edges","_code","polygonCenter","f","PolyUtil","LonLat","Mercator","R_MINOR","tmp","con","ts","tan","phi","dphi","EPSG3395","EPSG4326","Simple","Layer","removeFrom","_mapToAdd","addInteractiveTarget","targetEl","removeInteractiveTarget","_layerAdd","getEvents","beforeAdd","eachLayer","_addZoomLimit","_updateZoomLevels","_removeZoomLimit","oldZoomSpan","LayerGroup","getLayerId","clearLayers","invoke","methodName","getLayer","getLayers","zIndex","layerGroup","FeatureGroup","setStyle","bringToFront","bringToBack","featureGroup","Icon","popupAnchor","tooltipAnchor","crossOrigin","createIcon","oldIcon","_createIcon","createShadow","_getIconUrl","_createImg","_setIconStyles","sizeOption","shadowAnchor","iconAnchor","marginLeft","marginTop","icon","IconDefault","iconUrl","iconRetinaUrl","shadowUrl","iconSize","shadowSize","imagePath","_detectIconPath","_stripUrl","strip","re","MarkerDrag","marker","_marker","_icon","_draggable","dragstart","_onDragStart","predrag","_onPreDrag","drag","_onDrag","dragend","_onDragEnd","_adjustPan","speed","autoPanSpeed","autoPanPadding","iconPos","panBounds","movement","_panRequest","_oldLatLng","closePopup","autoPan","shadow","_shadow","_latlng","oldLatLng","Marker","interactive","zIndexOffset","riseOnHover","riseOffset","autoPanOnFocus","draggable","_initIcon","_removeIcon","_removeShadow","viewreset","setLatLng","setZIndexOffset","getIcon","setIcon","_popup","bindPopup","_setPos","classToAdd","addIcon","mouseover","_bringToFront","mouseout","_resetZIndex","_panOnFocus","newShadow","addShadow","_updateOpacity","_initInteraction","_zIndex","_updateZIndex","opt","iconOpts","_getPopupAnchor","_getTooltipAnchor","Path","stroke","color","weight","lineCap","lineJoin","dashArray","dashOffset","fillColor","fillOpacity","fillRule","getRenderer","_initPath","_reset","_addPath","_removePath","redraw","_updatePath","_updateStyle","_updateBounds","_bringToBack","_path","_project","_clickTolerance","CircleMarker","radius","setRadius","getRadius","_point","r2","_radiusY","_pxBounds","_updateCircle","_empty","_bounds","_containsPoint","circleMarker","Circle","legacyOptions","_mRadius","half","latR","lngR","acos","circle","Polyline","smoothFactor","noClip","_setLatLngs","getLatLngs","_latlngs","setLatLngs","isEmpty","closestLayerPoint","minDistance","minPoint","jLen","_parts","_defaultShape","addLatLng","_convertLatLngs","flat","_rings","_projectLatlngs","_rawPxBounds","projectedBounds","ring","_clipPoints","segment","_simplifyPoints","_updatePoly","part","polyline","Polygon","clipped","polygon","GeoJSON","geojson","addData","features","geometries","geometry","coordinates","geometryToLayer","asFeature","resetStyle","onEachFeature","_setLayerStyle","pointToLayer","_coordsToLatLng","coordsToLatLng","_pointToLayer","coordsToLatLngs","geoLayer","properties","featureLayer","pointToLayerFn","markersInheritOptions","levelsDeep","latLngToCoords","latLngsToCoords","getFeature","newGeometry","PointToGeoJSON","toGeoJSON","geoJSON","multi","holes","toMultiPoint","isGeometryCollection","jsons","geoJson","ImageOverlay","errorOverlayUrl","_url","_image","_initImage","styleOpts","setUrl","setBounds","zoomanim","wasElementSupplied","onselectstart","onmousemove","onload","onerror","_overlayOnError","image","errorUrl","imageOverlay","VideoOverlay","autoplay","loop","keepAspectRatio","muted","playsInline","vid","onloadeddata","sourceElements","getElementsByTagName","sources","source","videoOverlay","video","SVGOverlay","svgOverlay","DivOverlay","_source","_content","openOn","_prepareOpen","_removeTimeout","visibility","_updateContent","_updateLayout","_contentNode","hasChildNodes","_getAnchor","_containerBottom","_containerLeft","_containerWidth","_initOverlay","OverlayClass","old","Popup","minWidth","maxHeight","autoPanPaddingTopLeft","autoPanPaddingBottomRight","keepInView","closeButton","closeOnEscapeKey","popup","closeOnClick","closePopupOnClick","preclick","moveend","wrapper","_wrapper","_tipContainer","_tip","_closeButton","whiteSpace","scrolledClass","marginBottom","containerHeight","containerWidth","layerPos","containerPos","openPopup","_popupHandlersAdded","_openPopup","keypress","_onKeyPress","move","_movePopup","unbindPopup","togglePopup","isPopupOpen","setPopupContent","getPopup","keyCode","permanent","sticky","tooltip","_setPosition","subX","subY","tooltipPoint","tooltipWidth","tooltipHeight","openTooltip","closeTooltip","bindTooltip","_tooltip","isTooltipOpen","unbindTooltip","_initTooltipInteractions","_tooltipHandlersAdded","_moveTooltip","_openTooltip","_addFocusListeners","mousemove","_setAriaDescribedByOnLayer","toggleTooltip","setTooltipContent","getTooltip","_addFocusListenersOnLayer","moving","DivIcon","bgPos","backgroundPosition","divIcon","GridLayer","tileSize","updateWhenZooming","updateInterval","maxNativeZoom","minNativeZoom","noWrap","keepBuffer","_levels","_tiles","_removeAllTiles","_tileZoom","_setAutoZIndex","isLoading","_loading","tileZoom","_clampZoom","_updateLevels","viewprereset","_invalidateAll","createTile","getTileSize","compare","edgeZIndex","isFinite","nextFrame","willPrune","tile","loaded","fade","_onOpaqueTile","_noPrune","_pruneTiles","_fadeFrame","_onUpdateLevel","_removeTilesAtZoom","_onRemoveLevel","level","_setZoomTransform","_onCreateLevel","_level","retain","_retainParent","_retainChildren","_removeTile","x2","y2","z2","coords2","_tileCoordsToKey","animating","_setView","noPrune","tileZoomChanged","_abortLoading","_resetGrid","_setZoomTransforms","translate","_tileSize","_globalTileRange","_pxBoundsToTileRange","_wrapX","_wrapY","_getTiledPixelBounds","mapZoom","halfSize","tileRange","tileCenter","queue","noPruneRange","_isValidTile","createDocumentFragment","_addTile","tileBounds","_tileCoordsToBounds","_keyToBounds","_keyToTileCoords","_tileCoordsToNwSe","nwPoint","sePoint","bp","_initTile","tilePos","_getTilePos","_wrapCoords","_tileReady","_noTilesToLoad","newCoords","gridLayer","TileLayer","subdomains","errorTileUrl","zoomOffset","tms","zoomReverse","detectRetina","referrerPolicy","_onTileRemove","noRedraw","done","_tileOnLoad","_tileOnError","getTileUrl","_getSubdomain","_getZoomForUrl","invertedY","tilePoint","tileLayer","TileLayerWMS","defaultWmsParams","service","request","transparent","wmsParams","realRetina","_crs","_wmsVersion","projectionKey","bbox","setParams","WMS","wms","Renderer","_updatePaths","_destroyContainer","_onZoom","zoomend","_onZoomEnd","_onAnimZoom","_updateTransform","currentCenterPoint","_center","topLeftOffset","Canvas","_onViewPreReset","_postponeUpdatePaths","_draw","_onMouseMove","_onClick","_handleMouseOut","_ctx","_redrawRequest","_redrawBounds","_redraw","_updateDashArray","_order","_drawLast","_drawFirst","_requestRedraw","_extendRedrawBounds","dashValue","_dashArray","_clear","clearRect","save","restore","beginPath","clip","_drawing","closePath","_fillStroke","arc","globalAlpha","fillStyle","setLineDash","lineWidth","strokeStyle","clickedLayer","_fireEvent","_handleMouseHover","_hoveredLayer","_mouseHoverThrottled","candidateHoveredLayer","vmlCreate","namespaces","vmlMixin","coordsize","_stroke","_fill","stroked","filled","dashStyle","endcap","joinstyle","_setPath","SVG","_rootGroup","_svgSize","_getPaneRenderer","_createRenderer","preferCanvas","Rectangle","_boundsToLatLngs","rectangle","BoxZoom","_pane","overlayPane","_resetStateTimeout","_destroy","_onMouseDown","_resetState","_clearDeferredResetState","contextmenu","mouseup","_onMouseUp","keydown","_onKeyDown","_box","_finish","boxZoomBounds","doubleClickZoom","DoubleClickZoom","_onDoubleClick","inertia","inertiaDeceleration","inertiaMaxSpeed","worldCopyJump","maxBoundsViscosity","Drag","_onPreDragLimit","_onPreDragWrap","_positions","_times","_offsetLimit","_viscosity","_lastTime","_lastPos","_absPos","_prunePositions","shift","pxCenter","pxWorldCenter","_initialWorldOffset","_worldWidth","_viscousLimit","worldWidth","halfWidth","newX1","newX2","newX","ease","speedVector","limitedSpeed","limitedSpeedVector","decelerationDuration","keyboardPanDelta","Keyboard","keyCodes","down","up","_setPanDelta","_setZoomDelta","_onFocus","_onBlur","mousedown","_addHooks","_removeHooks","_focused","docEl","panDelta","_panKeys","codes","_zoomKeys","altKey","ctrlKey","metaKey","scrollWheelZoom","wheelDebounceTime","wheelPxPerZoomLevel","ScrollWheelZoom","_onWheelScroll","_delta","_lastMousePos","_timer","_performZoom","d2","d3","d4","tapHold","tapTolerance","TapHold","_holdTimeout","_cancel","_isTapValid","_cancelClickPrevent","_simulateEvent","cancelClickPrevent","simulatedEvent","MouseEvent","touchZoom","bounceAtZoomLimits","TouchZoom","_onTouchStart","_zooming","_centerPoint","_startLatLng","_pinchStartLatLng","_startDist","_startZoom","_onTouchMove","_onTouchEnd","_animRequest","moveFn","globalL","Projection","globalObject","globalThis","self","global","getGlobalObject","oldL","br0","br1","br2","br3","handleHideClick","last_click_latlng","map_center","map_zoom","map_viewbox","view_on_osm_link","last_click","mouse_position","display_map_position","mouse_lat_lng","map_link_to_osm","module","exports","MiniMap","minimap","toggleDisplay","zoomLevelOffset","zoomLevelFixed","centerFixed","autoToggleDisplay","minimized","collapsedWidth","collapsedHeight","aimingRectOptions","clickable","shadowRectOptions","strings","hideText","showText","mapOptions","_layer","_mainMap","_isZoomLevelFixed","_miniMap","_mainMapMoving","_miniMapMoving","_userToggledDisplay","_minimized","_addToggleButton","_aimingRect","_shadowRect","_onMainMapMoved","_onMainMapMoving","_onMiniMapMoveStarted","_onMiniMapMoving","_onMiniMapMoved","_decideZoom","_setDisplay","changeLayer","_toggleDisplayButton","_toggleButtonInitialTitleText","_toggleDisplayButtonClicked","_restore","_minimize","minimize","_onToggle","_decideMinimized","lastAimingRect","_lastAimingRectPosition","_isDefined","_isInteger","fromMaintoMini","toRet","currentDiff","proposedZoom","_lastMiniMapZoom","_fireToggleEvents","miniMapControl","action_result","show_map_position_click","display_minimap","position_marker","dataLayers","setMapData","aFeature","resetMapData","cm","L.circleMarker","L.rectangle","L.latLngBounds","centroid","geojson_layer","L.geoJson","Map_Tile_Attribution","L.map","Map_Default_Lat","Map_Default_Lon","Map_Default_Zoom","L.control","L.tileLayer","Map_Tile_URL","osm2","L.TileLayer","L.Control","MapPositionControl","pageinfo","polygon_geojson","Search_AreaPolygons","exclude_place_ids","anyStructuredFieldsSet","loaddata","zoomLevels","div7","maybeSplitLatitude","coords_split","gotoCoordinates","newlat","newlon","newzoom","selected_option","select_value","levels","updates","to_null_out","accounted_for","spread_props","Reverse_Default_Search_Zoom","input_value_value","osmtype","osmid","type_and_id_match","t_value","localname","formatPlaceType","raw0_value","osmLink","t4_value","rank_address","formatAdminLevel","admin_level","raw1_value","formatDistance","show_if","tr","td0","td1","td2","td3","td4","td5","td6","t4","t6","t6_value","addressLine","bDistanceInMeters","bMarkUnusedLines","bAddressLineUsed","isaddress","a2","openHint","closeHint","postcode","overpass_query","t0_value","t0","t2","t2_value","isAdminBoundary","if_block1","calculated_importance","create_if_block_14","if_block2","create_if_block_13","if_block3","address","create_if_block_11","if_block4","linked_places","create_if_block_10","create_if_block_4","hierarchy","table0","tbody0","div8","h20","table1","thead","tbody1","tr1","names","inforowlist_changes","indexed_date","rank_search","formatAddressRank","importance","create_if_block_15","coverageType","raw_value","html_tag","wikipediaLink","calculated_postcode","detailspostcodehint_changes","create_if_block_12","addresstags","extratags","each_value_5","each_value_4","keywords","create_if_block_5","td","aThisPlace","create_if_block_7","formatKeywordToken","token","create_if_block_9","create_if_block_8","each_value","base_url","api_request_finished","addressdetails","group_hierarchy","country_code","t11_value","errormessage","t13_value","updated","a_href_value","td7","td8","t9","t9_value","t11","t13","table","tbody","aPolygons","t8_value","t10_value","t8","t10","software_version","database_version","dl","dt0","dd0","dt1","dd1","dt2","dd2","dt3","dd3","aStatusData","configuration"],"mappings":"yBAAA,SAASA,IAAU,CAEnB,SAASC,EAAOC,EAAKC,GAEjB,IAAK,MAAMC,KAAKD,EACZD,EAAIE,GAAKD,EAAIC,GACjB,OAAOF,CACX,CASA,SAASG,EAAIC,GACT,OAAOA,GACX,CACA,SAASC,IACL,OAAOC,OAAOC,OAAO,KACzB,CACA,SAASC,EAAQC,GACbA,EAAIC,QAAQP,EAChB,CACA,SAASQ,EAAYC,GACjB,MAAwB,mBAAVA,CAClB,CACA,SAASC,EAAeC,EAAGC,GACvB,OAAOD,GAAKA,EAAIC,GAAKA,EAAID,IAAMC,GAAOD,GAAkB,iBAANA,GAAgC,mBAANA,CAChF,CACA,IAAIE,EAm5BAC,EAl5BJ,SAASC,EAAcC,EAAaC,GAKhC,OAJKJ,IACDA,EAAuBK,SAASC,cAAc,MAElDN,EAAqBO,KAAOH,EACrBD,IAAgBH,EAAqBO,IA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