-{"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 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 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 : '';\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 ? '' : 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 ? '' : 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} 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.get('dedupe'),\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","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","dedupe","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,GAAKA,EAAID,IAAMC,GAAOD,GAAkB,iBAANA,GAAgC,mBAANA,EAEhF,IAAIE,EA84BAC,EA74BJ,SAASC,EAAcC,EAAaC,GAKhC,OAJKJ,IACDA,EAAuBK,SAASC,cAAc,MAElDN,E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94C,OACrDuoG,EAAcvoG,MAEhB43C,GAAkB,6QCFtBz4C,2IANE8D,QACEy0C,GAA2B,wBAAyBr7C,SAASyM,eAAe,s2CCiBlE,WAATtL,OAEc,YAATA,OAES,YAATA,OAES,cAATA,OAES,aAATA,OAES,WAATA,OAES,UAATA,2fAlBR43C,+CAFGqF,EAAOC,EAAM1E,eAMgBZ,MCnBtB,oEAAQ,CAClBp2C,OAAQ3C,SAASiQ"}
\ No newline at end of file
+{"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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