{"version":3,"sources":["node_modules/leaflet/dist/leaflet-src.js","node_modules/leaflet.fullscreen/Control.FullScreen.js","node_modules/esri-leaflet/package.json","node_modules/esri-leaflet/src/Support.js","node_modules/esri-leaflet/src/Options.js","node_modules/esri-leaflet/src/Request.js","node_modules/@terraformer/arcgis/dist/t-arcgis.esm.js","node_modules/esri-leaflet/src/Util.js","node_modules/esri-leaflet/src/Tasks/Task.js","node_modules/esri-leaflet/src/Tasks/Query.js","node_modules/esri-leaflet/src/Tasks/Find.js","node_modules/esri-leaflet/src/Tasks/Identify.js","node_modules/esri-leaflet/src/Tasks/IdentifyFeatures.js","node_modules/esri-leaflet/src/Tasks/IdentifyImage.js","node_modules/esri-leaflet/src/Services/Service.js","node_modules/esri-leaflet/src/Services/MapService.js","node_modules/esri-leaflet/src/Services/ImageService.js","node_modules/esri-leaflet/src/Services/FeatureLayerService.js","node_modules/esri-leaflet/src/Layers/BasemapLayer.js","node_modules/esri-leaflet/src/Layers/TiledMapLayer.js","node_modules/esri-leaflet/src/Layers/RasterLayer.js","node_modules/esri-leaflet/src/Layers/ImageMapLayer.js","node_modules/esri-leaflet/src/Layers/DynamicMapLayer.js","node_modules/esri-leaflet/src/Layers/FeatureLayer/FeatureGrid.js","node_modules/tiny-binary-search/index.js","node_modules/esri-leaflet/src/Layers/FeatureLayer/FeatureManager.js","node_modules/esri-leaflet/src/Layers/FeatureLayer/FeatureLayer.js","node_modules/esri-leaflet/src/EsriLeaflet.js","node_modules/maplibre-gl/dist/maplibre-gl.js","node_modules/esri-leaflet-vector/dist/esri-leaflet-vector-debug.js","node_modules/object-assign/index.js","node_modules/concaveman/node_modules/rbush/rbush.min.js","node_modules/tinyqueue/index.js","node_modules/point-in-polygon/flat.js","node_modules/point-in-polygon/nested.js","node_modules/point-in-polygon/index.js","node_modules/robust-predicates/umd/orient2d.min.js","node_modules/concaveman/index.js","node_modules/quickselect/quickselect.js","node_modules/rbush/index.js","node_modules/earcut/src/earcut.js","node_modules/geojson-rbush/node_modules/rbush/rbush.min.js","node_modules/@turf/helpers/dist/js/index.js","node_modules/@turf/meta/dist/js/index.js","node_modules/@turf/bbox/dist/js/index.js","node_modules/geojson-rbush/index.js","node_modules/object-keys/isArguments.js","node_modules/object-keys/implementation.js","node_modules/object-keys/index.js","node_modules/has-symbols/shams.js","node_modules/has-tostringtag/shams.js","node_modules/es-errors/index.js","node_modules/es-errors/eval.js","node_modules/es-errors/range.js","node_modules/es-errors/ref.js","node_modules/es-errors/syntax.js","node_modules/es-errors/type.js","node_modules/es-errors/uri.js","node_modules/has-symbols/index.js","node_modules/has-proto/index.js","node_modules/function-bind/implementation.js","node_modules/function-bind/index.js","node_modules/hasown/index.js","node_modules/get-intrinsic/index.js","node_modules/es-define-property/index.js","node_modules/gopd/index.js","node_modules/define-data-property/index.js","node_modules/has-property-descriptors/index.js","node_modules/set-function-length/index.js","node_modules/call-bind/index.js","node_modules/call-bind/callBound.js","node_modules/is-arguments/index.js","node_modules/define-properties/index.js","node_modules/object-is/implementation.js","node_modules/object-is/polyfill.js","node_modules/object-is/shim.js","node_modules/object-is/index.js","node_modules/is-regex/index.js","node_modules/functions-have-names/index.js","node_modules/set-function-name/index.js","node_modules/regexp.prototype.flags/implementation.js","node_modules/regexp.prototype.flags/polyfill.js","node_modules/regexp.prototype.flags/shim.js","node_modules/regexp.prototype.flags/index.js","node_modules/is-date-object/index.js","node_modules/deep-equal/index.js","node_modules/geojson-equality/index.js","node_modules/density-clustering/lib/DBSCAN.js","node_modules/density-clustering/lib/KMEANS.js","node_modules/density-clustering/lib/PriorityQueue.js","node_modules/density-clustering/lib/OPTICS.js","node_modules/density-clustering/lib/index.js","node_modules/skmeans/dist/node/distance.js","node_modules/skmeans/dist/node/kinit.js","node_modules/skmeans/dist/node/main.js","node_modules/polygon-clipping/dist/polygon-clipping.umd.js","node_modules/turf-jsts/jsts.min.js","src/environments/environment.prod.ts","node_modules/@angular/common/fesm2022/http.mjs","node_modules/@angular/platform-browser/fesm2022/platform-browser.mjs","node_modules/@angular/router/fesm2022/router.mjs","src/app/shared/header/header.component.ts","src/app/shared/header/header.component.html","src/app/shared/footer/footer.component.ts","src/app/shared/footer/footer.component.html","node_modules/@angular/cdk/fesm2022/platform.mjs","node_modules/@angular/cdk/fesm2022/coercion.mjs","node_modules/@angular/cdk/fesm2022/layout.mjs","node_modules/@angular/cdk/fesm2022/a11y.mjs","node_modules/@angular/cdk/fesm2022/bidi.mjs","node_modules/@angular/material/fesm2022/core.mjs","node_modules/@angular/material/fesm2022/progress-spinner.mjs","node_modules/@ngneat/until-destroy/fesm2022/ngneat-until-destroy.mjs","src/app/services/loading-status.service.ts","src/app/shared/mat-spinner-overlay/mat-spinner-overlay.component.ts","src/app/shared/mat-spinner-overlay/mat-spinner-overlay.component.html","node_modules/@angular/forms/fesm2022/forms.mjs","node_modules/@asymmetrik/ngx-leaflet/fesm2022/asymmetrik-ngx-leaflet.mjs","node_modules/@asymmetrik/ngx-leaflet-draw/fesm2022/asymmetrik-ngx-leaflet-draw.mjs","node_modules/leaflet-draw/dist/leaflet.draw.js","src/app/shared/map/map.component.ts","src/app/shared/map/map.component.html","node_modules/leaflet.pattern/dist/leaflet.pattern.js","node_modules/@turf/helpers/dist/es/index.js","node_modules/@turf/meta/dist/es/index.js","node_modules/@turf/bbox/dist/es/index.js","node_modules/@turf/invariant/dist/es/index.js","node_modules/@turf/isolines/dist/es/index.js","node_modules/@turf/convex/dist/es/index.js","node_modules/@turf/boolean-point-in-polygon/dist/es/index.js","node_modules/@turf/distance/dist/es/index.js","node_modules/topojson-server/src/hash/point-hash.js","node_modules/@turf/collect/dist/es/index.js","node_modules/@turf/bezier-spline/dist/es/lib/spline.js","node_modules/@turf/bbox-polygon/dist/es/index.js","node_modules/@turf/envelope/dist/es/index.js","node_modules/@turf/destination/dist/es/index.js","node_modules/@turf/bearing/dist/es/index.js","node_modules/@turf/combine/dist/es/index.js","node_modules/@turf/tesselate/dist/es/index.js","node_modules/@turf/line-segment/dist/es/index.js","node_modules/@turf/line-intersect/dist/es/index.js","node_modules/@turf/nearest-point-on-line/dist/es/index.js","node_modules/@turf/nearest-point-to-line/dist/es/index.js","node_modules/@turf/boolean-point-on-line/dist/es/index.js","node_modules/@turf/unkink-polygon/dist/es/index.js","node_modules/@turf/great-circle/dist/es/index.js","node_modules/@turf/line-split/dist/es/index.js","node_modules/@turf/line-overlap/dist/es/index.js","node_modules/@turf/isobands/dist/es/index.js","node_modules/@turf/polygonize/dist/es/lib/util.js","node_modules/@turf/polygonize/dist/es/lib/Node.js","node_modules/@turf/polygonize/dist/es/lib/Edge.js","node_modules/@turf/polygonize/dist/es/lib/EdgeRing.js","node_modules/@turf/polygonize/dist/es/lib/Graph.js","node_modules/@turf/boolean-overlap/dist/es/index.js","node_modules/@turf/boolean-equal/dist/es/index.js","node_modules/@turf/clusters-dbscan/dist/es/index.js","node_modules/@turf/clusters-kmeans/dist/es/index.js","node_modules/@turf/shortest-path/dist/es/index.js","node_modules/d3-voronoi/src/RedBlackTree.js","node_modules/d3-voronoi/src/Edge.js","node_modules/d3-voronoi/src/Cell.js","node_modules/d3-voronoi/src/Circle.js","node_modules/d3-voronoi/src/Beach.js","node_modules/d3-voronoi/src/Diagram.js","node_modules/@turf/difference/dist/es/index.js","node_modules/@turf/buffer/dist/es/index.js","node_modules/d3-geo/src/adder.js","node_modules/d3-geo/src/math.js","node_modules/d3-geo/src/noop.js","node_modules/d3-geo/src/area.js","node_modules/d3-geo/src/cartesian.js","node_modules/d3-geo/src/bounds.js","node_modules/d3-geo/src/rotation.js","node_modules/d3-geo/src/clip/buffer.js","node_modules/d3-geo/src/pointEqual.js","node_modules/d3-geo/src/clip/polygon.js","node_modules/d3-array/src/ascending.js","node_modules/d3-array/src/bisector.js","node_modules/d3-array/src/bisect.js","node_modules/d3-array/src/array.js","node_modules/d3-array/src/ticks.js","node_modules/d3-array/src/merge.js","node_modules/d3-geo/src/clip/extent.js","node_modules/d3-geo/src/polygonContains.js","node_modules/d3-geo/src/length.js","node_modules/d3-geo/src/path/area.js","node_modules/d3-geo/src/path/bounds.js","node_modules/d3-geo/src/path/context.js","node_modules/d3-geo/src/path/measure.js","node_modules/d3-geo/src/path/string.js","node_modules/d3-geo/src/clip/index.js","node_modules/d3-geo/src/clip/antimeridian.js","node_modules/d3-geo/src/transform.js","node_modules/d3-geo/src/projection/resample.js","node_modules/d3-geo/src/projection/index.js","node_modules/d3-geo/src/projection/azimuthal.js","node_modules/d3-geo/src/projection/azimuthalEqualArea.js","node_modules/d3-geo/src/projection/azimuthalEquidistant.js","node_modules/d3-geo/src/projection/mercator.js","node_modules/d3-geo/src/projection/equirectangular.js","node_modules/d3-geo/src/projection/gnomonic.js","node_modules/d3-geo/src/projection/naturalEarth1.js","node_modules/d3-geo/src/projection/orthographic.js","node_modules/d3-geo/src/projection/stereographic.js","node_modules/d3-geo/src/projection/transverseMercator.js","node_modules/@turf/union/dist/es/index.js","node_modules/@turf/intersect/dist/es/index.js","node_modules/@turf/dissolve/dist/es/index.js","node_modules/@turf/mask/dist/es/index.js","src/app/models/shared-models.ts","src/app/shared/services/map.service.ts","src/app/veg-wizard/models/form-wizard-models.ts","src/app/veg-wizard/services/util.service.ts","src/app/services/session.service.ts","src/app/veg-wizard/services/logger-service.ts","src/app/veg-wizard/services/contact.service.ts","src/app/veg-wizard/services/exchange-area.service.ts","src/app/veg-wizard/services/self-audit.service.ts","src/app/veg-wizard/services/notification-area-limit-service.ts","src/app/veg-wizard/services/notification-area-service.ts","src/app/veg-wizard/services/category-service.ts","src/app/services/feature-flag.service.ts","src/app/veg-wizard/services/purpose-service.ts","src/app/veg-wizard/services/regional-ecosystem-status.service.ts","src/app/veg-wizard/services/regional-ecosystem.service.ts","src/app/veg-wizard/services/channel-dimensions.service.ts","src/app/veg-wizard/services/activity-service.ts","src/app/veg-wizard/services/declarations.service.ts","src/app/veg-wizard/services/acknowledgement.service.ts","src/app/veg-wizard/services/reason.service.ts","src/app/veg-wizard/services/veg-wizard-data.service.ts","node_modules/ngx-file-drop/fesm2022/ngx-file-drop.mjs","src/app/shared/global-validation-message/global-validation-message.component.ts","src/app/shared/global-validation-message/global-validation-message.component.html","src/app/shared/shared.module.ts","src/app/veg-wizard/services/veg-wizard-state-machine.service.ts","src/app/app.component.ts","src/app/app.component.html","src/app/veg-wizard/base-wizard.component.ts","src/app/veg-wizard/models/veg-wizard-models.ts","src/app/veg-wizard/acknowledge-notification/acknowledge-notification.component.ts","src/app/veg-wizard/acknowledge-notification/acknowledge-notification.component.html","src/app/veg-wizard/acknowledgements/acknowledgements.component.ts","src/app/veg-wizard/acknowledgements/acknowledgements.component.html","src/app/veg-wizard/select-category/select-category.component.ts","src/app/veg-wizard/select-category/select-category.component.html","src/app/veg-wizard/declarations/declarations.component.ts","src/app/veg-wizard/declarations/declarations.component.html","src/app/veg-wizard/veg-validators/veg-validators.ts","src/app/veg-wizard/services/reference-data-service.ts","src/app/veg-wizard/landholder-details/landholder-details.component.ts","src/app/veg-wizard/landholder-details/landholder-details.component.html","src/app/veg-wizard/reason/reason.component.ts","src/app/veg-wizard/reason/reason.component.html","src/app/veg-wizard/channel-dimensions/channel-dimensions.component.ts","src/app/veg-wizard/channel-dimensions/channel-dimensions.component.html","src/app/veg-wizard/services/lot-plan.service.ts","src/app/veg-wizard/lot-plan/lot-plan.component.ts","src/app/veg-wizard/lot-plan/lot-plan.component.html","src/app/veg-wizard/services/file-management.service.ts","src/app/veg-wizard/notification-area/notification-area.component.ts","src/app/veg-wizard/notification-area/notification-area.component.html","src/app/veg-wizard/services/health-check-service.ts","src/app/veg-wizard/services/appinfo-service.ts","src/app/veg-wizard/pre-notification-advice/pre-notification-advice.component.ts","src/app/veg-wizard/pre-notification-advice/pre-notification-advice.component.html","src/app/veg-wizard/select-purpose/select-purpose.component.ts","src/app/veg-wizard/select-purpose/select-purpose.component.html","src/app/core/directives/feature.directive.ts","src/app/veg-wizard/review-notification/review-notification.component.ts","src/app/veg-wizard/review-notification/review-notification.component.html","src/app/veg-wizard/landholder-confirmation/landholder-confirmation.component.ts","src/app/veg-wizard/landholder-confirmation/landholder-confirmation.component.html","src/app/veg-wizard/self-audit/self-audit.component.ts","src/app/veg-wizard/self-audit/self-audit.component.html","src/app/veg-wizard/exchange-area/exchange-area.component.ts","src/app/veg-wizard/exchange-area/exchange-area.component.html","src/app/veg-wizard/select-activity/select-activity.component.ts","src/app/veg-wizard/select-activity/select-activity.component.html","src/app/veg-wizard/notifier-details/notifier-details.component.ts","src/app/veg-wizard/notifier-details/notifier-details.component.html","src/app/veg-wizard/select-regional-ecosystem-status/select-regional-ecosystem-status.component.ts","src/app/veg-wizard/select-regional-ecosystem-status/select-regional-ecosystem-status.component.html","src/app/core/guards/can-activate-select-purpose.guard.ts","src/app/core/guards/can-activate-self-audit.guard.ts","src/app/core/guards/can-activate-exchange-area.guard.ts","src/app/core/guards/can-activate-pre-notification-advice.guard.ts","src/app/core/guards/can-activate-landholder-confirmation.guard.ts","src/app/core/guards/can-activate-landholder-details.guard.ts","src/app/core/guards/can-activate-notifier-details.guard.ts","src/app/core/guards/can-activate-lot-plan.guard.ts","src/app/core/guards/can-activate-select-category.guard.ts","src/app/core/guards/can-activate-select-activity.guard.ts","src/app/core/guards/can-activate-select-regional-ecosystem-status.guard.ts","src/app/core/guards/can-activate-select-regional-ecosystem.guard.ts","src/app/core/guards/can-activate-notification-area.guard.ts","src/app/core/guards/can-activate-acknowledgements.guard.ts","src/app/core/guards/can-activate-review-notification.guard.ts","src/app/core/guards/can-activate-declarations.guard.ts","src/app/core/guards/can-activate-acknowledge-notification.guard.ts","src/app/core/guards/can-activate-reason.guard.ts","src/app/core/guards/can-activate-channel-dimensions.guard.ts","src/app/veg-wizard/select-regional-ecosystem/select-regional-ecosystem.component.ts","src/app/veg-wizard/select-regional-ecosystem/select-regional-ecosystem.component.html","src/app/app-routes.ts","src/app/core/core.module.ts","src/app/veg-wizard/veg-wizard.module.ts","src/app/http-interceptor-fn.ts","node_modules/@angular/platform-browser/fesm2022/animations/async.mjs","src/main.ts"],"sourcesContent":["/* @preserve\n * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com\n * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.leaflet = {}));\n})(this, function (exports) {\n 'use strict';\n\n var version = \"1.9.4\";\n\n /*\r\n * @namespace Util\r\n *\r\n * Various utility functions, used by Leaflet internally.\r\n */\n\n // @function extend(dest: Object, src?: Object): Object\n // Merges the properties of the `src` object (or multiple objects) into `dest` object and returns the latter. Has an `L.extend` shortcut.\n function extend(dest) {\n var i, j, len, src;\n for (j = 1, len = arguments.length; j < len; j++) {\n src = arguments[j];\n for (i in src) {\n dest[i] = src[i];\n }\n }\n return dest;\n }\n\n // @function create(proto: Object, properties?: Object): Object\n // Compatibility polyfill for [Object.create](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/create)\n var create$2 = Object.create || function () {\n function F() {}\n return function (proto) {\n F.prototype = proto;\n return new F();\n };\n }();\n\n // @function bind(fn: Function, …): Function\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).\n // Has a `L.bind()` shortcut.\n function bind(fn, obj) {\n var slice = Array.prototype.slice;\n if (fn.bind) {\n return fn.bind.apply(fn, slice.call(arguments, 1));\n }\n var args = slice.call(arguments, 2);\n return function () {\n return fn.apply(obj, args.length ? args.concat(slice.call(arguments)) : arguments);\n };\n }\n\n // @property lastId: Number\n // Last unique ID used by [`stamp()`](#util-stamp)\n var lastId = 0;\n\n // @function stamp(obj: Object): Number\n // Returns the unique ID of an object, assigning it one if it doesn't have it.\n function stamp(obj) {\n if (!('_leaflet_id' in obj)) {\n obj['_leaflet_id'] = ++lastId;\n }\n return obj._leaflet_id;\n }\n\n // @function throttle(fn: Function, time: Number, context: Object): Function\n // Returns a function which executes function `fn` with the given scope `context`\n // (so that the `this` keyword refers to `context` inside `fn`'s code). The function\n // `fn` will be called no more than one time per given amount of `time`. The arguments\n // received by the bound function will be any arguments passed when binding the\n // function, followed by any arguments passed when invoking the bound function.\n // Has an `L.throttle` shortcut.\n function throttle(fn, time, context) {\n var lock, args, wrapperFn, later;\n later = function () {\n // reset lock and call if queued\n lock = false;\n if (args) {\n wrapperFn.apply(context, args);\n args = false;\n }\n };\n wrapperFn = function () {\n if (lock) {\n // called too soon, queue to call later\n args = arguments;\n } else {\n // call and lock until later\n fn.apply(context, arguments);\n setTimeout(later, time);\n lock = true;\n }\n };\n return wrapperFn;\n }\n\n // @function wrapNum(num: Number, range: Number[], includeMax?: Boolean): Number\n // Returns the number `num` modulo `range` in such a way so it lies within\n // `range[0]` and `range[1]`. The returned value will be always smaller than\n // `range[1]` unless `includeMax` is set to `true`.\n function wrapNum(x, range, includeMax) {\n var max = range[1],\n min = range[0],\n d = max - min;\n return x === max && includeMax ? x : ((x - min) % d + d) % d + min;\n }\n\n // @function falseFn(): Function\n // Returns a function which always returns `false`.\n function falseFn() {\n return false;\n }\n\n // @function formatNum(num: Number, precision?: Number|false): Number\n // Returns the number `num` rounded with specified `precision`.\n // The default `precision` value is 6 decimal places.\n // `false` can be passed to skip any processing (can be useful to avoid round-off errors).\n function formatNum(num, precision) {\n if (precision === false) {\n return num;\n }\n var pow = Math.pow(10, precision === undefined ? 6 : precision);\n return Math.round(num * pow) / pow;\n }\n\n // @function trim(str: String): String\n // Compatibility polyfill for [String.prototype.trim](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim)\n function trim(str) {\n return str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g, '');\n }\n\n // @function splitWords(str: String): String[]\n // Trims and splits the string on whitespace and returns the array of parts.\n function splitWords(str) {\n return trim(str).split(/\\s+/);\n }\n\n // @function setOptions(obj: Object, options: Object): Object\n // Merges the given properties to the `options` of the `obj` object, returning the resulting options. See `Class options`. Has an `L.setOptions` shortcut.\n function setOptions(obj, options) {\n if (!Object.prototype.hasOwnProperty.call(obj, 'options')) {\n obj.options = obj.options ? create$2(obj.options) : {};\n }\n for (var i in options) {\n obj.options[i] = options[i];\n }\n return obj.options;\n }\n\n // @function getParamString(obj: Object, existingUrl?: String, uppercase?: Boolean): String\n // Converts an object into a parameter URL string, e.g. `{a: \"foo\", b: \"bar\"}`\n // translates to `'?a=foo&b=bar'`. If `existingUrl` is set, the parameters will\n // be appended at the end. If `uppercase` is `true`, the parameter names will\n // be uppercased (e.g. `'?A=foo&B=bar'`)\n function getParamString(obj, existingUrl, uppercase) {\n var params = [];\n for (var i in obj) {\n params.push(encodeURIComponent(uppercase ? i.toUpperCase() : i) + '=' + encodeURIComponent(obj[i]));\n }\n return (!existingUrl || existingUrl.indexOf('?') === -1 ? '?' : '&') + params.join('&');\n }\n var templateRe = /\\{ *([\\w_ -]+) *\\}/g;\n\n // @function template(str: String, data: Object): String\n // Simple templating facility, accepts a template string of the form `'Hello {a}, {b}'`\n // and a data object like `{a: 'foo', b: 'bar'}`, returns evaluated string\n // `('Hello foo, bar')`. You can also specify functions instead of strings for\n // data values — they will be evaluated passing `data` as an argument.\n function template(str, data) {\n return str.replace(templateRe, function (str, key) {\n var value = data[key];\n if (value === undefined) {\n throw new Error('No value provided for variable ' + str);\n } else if (typeof value === 'function') {\n value = value(data);\n }\n return value;\n });\n }\n\n // @function isArray(obj): Boolean\n // Compatibility polyfill for [Array.isArray](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray)\n var isArray = Array.isArray || function (obj) {\n return Object.prototype.toString.call(obj) === '[object Array]';\n };\n\n // @function indexOf(array: Array, el: Object): Number\n // Compatibility polyfill for [Array.prototype.indexOf](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf)\n function indexOf(array, el) {\n for (var i = 0; i < array.length; i++) {\n if (array[i] === el) {\n return i;\n }\n }\n return -1;\n }\n\n // @property emptyImageUrl: String\n // Data URI string containing a base64-encoded empty GIF image.\n // Used as a hack to free memory from unused images on WebKit-powered\n // mobile devices (by setting image `src` to this string).\n var emptyImageUrl = 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=';\n\n // inspired by https://paulirish.com/2011/requestanimationframe-for-smart-animating/\n\n function getPrefixed(name) {\n return window['webkit' + name] || window['moz' + name] || window['ms' + name];\n }\n var lastTime = 0;\n\n // fallback for IE 7-8\n function timeoutDefer(fn) {\n var time = +new Date(),\n timeToCall = Math.max(0, 16 - (time - lastTime));\n lastTime = time + timeToCall;\n return window.setTimeout(fn, timeToCall);\n }\n var requestFn = window.requestAnimationFrame || getPrefixed('RequestAnimationFrame') || timeoutDefer;\n var cancelFn = window.cancelAnimationFrame || getPrefixed('CancelAnimationFrame') || getPrefixed('CancelRequestAnimationFrame') || function (id) {\n window.clearTimeout(id);\n };\n\n // @function requestAnimFrame(fn: Function, context?: Object, immediate?: Boolean): Number\n // Schedules `fn` to be executed when the browser repaints. `fn` is bound to\n // `context` if given. When `immediate` is set, `fn` is called immediately if\n // the browser doesn't have native support for\n // [`window.requestAnimationFrame`](https://developer.mozilla.org/docs/Web/API/window/requestAnimationFrame),\n // otherwise it's delayed. Returns a request ID that can be used to cancel the request.\n function requestAnimFrame(fn, context, immediate) {\n if (immediate && requestFn === timeoutDefer) {\n fn.call(context);\n } else {\n return requestFn.call(window, bind(fn, context));\n }\n }\n\n // @function cancelAnimFrame(id: Number): undefined\n // Cancels a previous `requestAnimFrame`. See also [window.cancelAnimationFrame](https://developer.mozilla.org/docs/Web/API/window/cancelAnimationFrame).\n function cancelAnimFrame(id) {\n if (id) {\n cancelFn.call(window, id);\n }\n }\n var Util = {\n __proto__: null,\n extend: extend,\n create: create$2,\n bind: bind,\n get lastId() {\n return lastId;\n },\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\n // @aka L.Class\n\n // @section\n // @uninheritable\n\n // Thanks to John Resig and Dean Edwards for inspiration!\n\n function Class() {}\n Class.extend = function (props) {\n // @function extend(props: Object): Function\n // [Extends the current class](#class-inheritance) given the properties to be included.\n // Returns a Javascript function that is a class constructor (to be called with `new`).\n var NewClass = function () {\n setOptions(this);\n\n // call the constructor\n if (this.initialize) {\n this.initialize.apply(this, arguments);\n }\n\n // call all constructor hooks\n this.callInitHooks();\n };\n var parentProto = NewClass.__super__ = this.prototype;\n var proto = create$2(parentProto);\n proto.constructor = NewClass;\n NewClass.prototype = proto;\n\n // inherit parent's statics\n for (var i in this) {\n if (Object.prototype.hasOwnProperty.call(this, i) && i !== 'prototype' && i !== '__super__') {\n NewClass[i] = this[i];\n }\n }\n\n // mix static properties into the class\n if (props.statics) {\n extend(NewClass, props.statics);\n }\n\n // mix includes into the prototype\n if (props.includes) {\n checkDeprecatedMixinEvents(props.includes);\n extend.apply(null, [proto].concat(props.includes));\n }\n\n // mix given properties into the prototype\n extend(proto, props);\n delete proto.statics;\n delete proto.includes;\n\n // merge options\n if (proto.options) {\n proto.options = parentProto.options ? create$2(parentProto.options) : {};\n extend(proto.options, props.options);\n }\n proto._initHooks = [];\n\n // add method for calling all hooks\n proto.callInitHooks = function () {\n if (this._initHooksCalled) {\n return;\n }\n if (parentProto.callInitHooks) {\n parentProto.callInitHooks.call(this);\n }\n this._initHooksCalled = true;\n for (var i = 0, len = proto._initHooks.length; i < len; i++) {\n proto._initHooks[i].call(this);\n }\n };\n return NewClass;\n };\n\n // @function include(properties: Object): this\n // [Includes a mixin](#class-includes) into the current class.\n Class.include = function (props) {\n var parentOptions = this.prototype.options;\n extend(this.prototype, props);\n if (props.options) {\n this.prototype.options = parentOptions;\n this.mergeOptions(props.options);\n }\n return this;\n };\n\n // @function mergeOptions(options: Object): this\n // [Merges `options`](#class-options) into the defaults of the class.\n Class.mergeOptions = function (options) {\n extend(this.prototype.options, options);\n return this;\n };\n\n // @function addInitHook(fn: Function): this\n // Adds a [constructor hook](#class-constructor-hooks) to the class.\n Class.addInitHook = function (fn) {\n // (Function) || (String, args...)\n var args = Array.prototype.slice.call(arguments, 1);\n var init = typeof fn === 'function' ? fn : function () {\n this[fn].apply(this, args);\n };\n this.prototype._initHooks = this.prototype._initHooks || [];\n this.prototype._initHooks.push(init);\n return this;\n };\n function checkDeprecatedMixinEvents(includes) {\n /* global L: true */\n if (typeof L === 'undefined' || !L || !L.Mixin) {\n return;\n }\n includes = isArray(includes) ? includes : [includes];\n for (var i = 0; i < includes.length; i++) {\n if (includes[i] === L.Mixin.Events) {\n console.warn('Deprecated include of L.Mixin.Events: ' + 'this property will be removed in future releases, ' + 'please inherit from L.Evented instead.', new Error().stack);\n }\n }\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 */\n\n var Events = {\n /* @method on(type: String, fn: Function, context?: Object): this\r\n * 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 *\r\n * @alternative\r\n * @method on(eventMap: Object): this\r\n * Adds a set of type/listener pairs, e.g. `{click: onClick, mousemove: onMouseMove}`\r\n */\n on: function (types, fn, context) {\n // types can be a map of types/handlers\n if (typeof types === 'object') {\n for (var type in types) {\n // we don't process space-separated events here for performance;\n // it's a hot path since Layer uses the on(obj) syntax\n this._on(type, types[type], fn);\n }\n } else {\n // types can be a string of space-separated words\n types = splitWords(types);\n for (var i = 0, len = types.length; i < len; i++) {\n this._on(types[i], fn, context);\n }\n }\n return this;\n },\n /* @method off(type: String, fn?: Function, context?: Object): this\r\n * 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 *\r\n * @alternative\r\n * @method off(eventMap: Object): this\r\n * Removes a set of type/listener pairs.\r\n *\r\n * @alternative\r\n * @method off: this\r\n * Removes all listeners to all events on the object. This includes implicitly attached events.\r\n */\n off: function (types, fn, context) {\n if (!arguments.length) {\n // clear all listeners if called without arguments\n delete this._events;\n } else if (typeof types === 'object') {\n for (var type in types) {\n this._off(type, types[type], fn);\n }\n } else {\n types = splitWords(types);\n var removeAll = arguments.length === 1;\n for (var i = 0, len = types.length; i < len; i++) {\n if (removeAll) {\n this._off(types[i]);\n } else {\n this._off(types[i], fn, context);\n }\n }\n }\n return this;\n },\n // attach listener (without syntactic sugar now)\n _on: function (type, fn, context, _once) {\n if (typeof fn !== 'function') {\n console.warn('wrong listener type: ' + typeof fn);\n return;\n }\n\n // check if fn already there\n if (this._listens(type, fn, context) !== false) {\n return;\n }\n if (context === this) {\n // Less memory footprint.\n context = undefined;\n }\n var newListener = {\n fn: fn,\n ctx: context\n };\n if (_once) {\n newListener.once = true;\n }\n this._events = this._events || {};\n this._events[type] = this._events[type] || [];\n this._events[type].push(newListener);\n },\n _off: function (type, fn, context) {\n var listeners, i, len;\n if (!this._events) {\n return;\n }\n listeners = this._events[type];\n if (!listeners) {\n return;\n }\n if (arguments.length === 1) {\n // remove all\n if (this._firingCount) {\n // Set all removed listeners to noop\n // so they are not called if remove happens in fire\n for (i = 0, len = listeners.length; i < len; i++) {\n listeners[i].fn = falseFn;\n }\n }\n // clear all listeners for a type if function isn't specified\n delete this._events[type];\n return;\n }\n if (typeof fn !== 'function') {\n console.warn('wrong listener type: ' + typeof fn);\n return;\n }\n\n // find fn and remove it\n var index = this._listens(type, fn, context);\n if (index !== false) {\n var listener = listeners[index];\n if (this._firingCount) {\n // set the removed listener to noop so that's not called if remove happens in fire\n listener.fn = falseFn;\n\n /* copy array in case events are being fired */\n this._events[type] = listeners = listeners.slice();\n }\n listeners.splice(index, 1);\n }\n },\n // @method fire(type: String, data?: Object, propagate?: Boolean): this\n // Fires an event of the specified type. You can optionally provide a data\n // object — the first argument of the listener function will contain its\n // properties. The event can optionally be propagated to event parents.\n fire: function (type, data, propagate) {\n if (!this.listens(type, propagate)) {\n return this;\n }\n var event = extend({}, data, {\n type: type,\n target: this,\n sourceTarget: data && data.sourceTarget || this\n });\n if (this._events) {\n var listeners = this._events[type];\n if (listeners) {\n this._firingCount = this._firingCount + 1 || 1;\n for (var i = 0, len = listeners.length; i < len; i++) {\n var l = listeners[i];\n // off overwrites l.fn, so we need to copy fn to a var\n var fn = l.fn;\n if (l.once) {\n this.off(type, fn, l.ctx);\n }\n fn.call(l.ctx || this, event);\n }\n this._firingCount--;\n }\n }\n if (propagate) {\n // propagate the event to parents (set with addEventParent)\n this._propagateEvent(event);\n }\n return this;\n },\n // @method listens(type: String, propagate?: Boolean): Boolean\n // @method listens(type: String, fn: Function, context?: Object, propagate?: Boolean): Boolean\n // Returns `true` if a particular event type has any listeners attached to it.\n // The verification can optionally be propagated, it will return `true` if parents have the listener attached to it.\n listens: function (type, fn, context, propagate) {\n if (typeof type !== 'string') {\n console.warn('\"string\" type argument expected');\n }\n\n // we don't overwrite the input `fn` value, because we need to use it for propagation\n var _fn = fn;\n if (typeof fn !== 'function') {\n propagate = !!fn;\n _fn = undefined;\n context = undefined;\n }\n var listeners = this._events && this._events[type];\n if (listeners && listeners.length) {\n if (this._listens(type, _fn, context) !== false) {\n return true;\n }\n }\n if (propagate) {\n // also check parents for listeners if event propagates\n for (var id in this._eventParents) {\n if (this._eventParents[id].listens(type, fn, context, propagate)) {\n return true;\n }\n }\n }\n return false;\n },\n // returns the index (number) or false\n _listens: function (type, fn, context) {\n if (!this._events) {\n return false;\n }\n var listeners = this._events[type] || [];\n if (!fn) {\n return !!listeners.length;\n }\n if (context === this) {\n // Less memory footprint.\n context = undefined;\n }\n for (var i = 0, len = listeners.length; i < len; i++) {\n if (listeners[i].fn === fn && listeners[i].ctx === context) {\n return i;\n }\n }\n return false;\n },\n // @method once(…): this\n // Behaves as [`on(…)`](#evented-on), except the listener will only get fired once and then removed.\n once: function (types, fn, context) {\n // types can be a map of types/handlers\n if (typeof types === 'object') {\n for (var type in types) {\n // we don't process space-separated events here for performance;\n // it's a hot path since Layer uses the on(obj) syntax\n this._on(type, types[type], fn, true);\n }\n } else {\n // types can be a string of space-separated words\n types = splitWords(types);\n for (var i = 0, len = types.length; i < len; i++) {\n this._on(types[i], fn, context, true);\n }\n }\n return this;\n },\n // @method addEventParent(obj: Evented): this\n // Adds an event parent - an `Evented` that will receive propagated events\n addEventParent: function (obj) {\n this._eventParents = this._eventParents || {};\n this._eventParents[stamp(obj)] = obj;\n return this;\n },\n // @method removeEventParent(obj: Evented): this\n // Removes an event parent, so it will stop receiving propagated events\n removeEventParent: function (obj) {\n if (this._eventParents) {\n delete this._eventParents[stamp(obj)];\n }\n return this;\n },\n _propagateEvent: function (e) {\n for (var id in this._eventParents) {\n this._eventParents[id].fire(e.type, extend({\n layer: e.target,\n propagatedFrom: e.target\n }, e), true);\n }\n }\n };\n\n // aliases; we should ditch those eventually\n\n // @method addEventListener(…): this\n // Alias to [`on(…)`](#evented-on)\n Events.addEventListener = Events.on;\n\n // @method removeEventListener(…): this\n // Alias to [`off(…)`](#evented-off)\n\n // @method clearAllEventListeners(…): this\n // Alias to [`off()`](#evented-off)\n Events.removeEventListener = Events.clearAllEventListeners = Events.off;\n\n // @method addOneTimeEventListener(…): this\n // Alias to [`once(…)`](#evented-once)\n Events.addOneTimeEventListener = Events.once;\n\n // @method fireEvent(…): this\n // Alias to [`fire(…)`](#evented-fire)\n Events.fireEvent = Events.fire;\n\n // @method hasEventListeners(…): Boolean\n // Alias to [`listens(…)`](#evented-listens)\n Events.hasEventListeners = Events.listens;\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 */\n\n function Point(x, y, round) {\n // @property x: Number; The `x` coordinate of the point\n this.x = round ? Math.round(x) : x;\n // @property y: Number; The `y` coordinate of the point\n this.y = round ? Math.round(y) : y;\n }\n var trunc = Math.trunc || function (v) {\n return v > 0 ? Math.floor(v) : Math.ceil(v);\n };\n Point.prototype = {\n // @method clone(): Point\n // Returns a copy of the current point.\n clone: function () {\n return new Point(this.x, this.y);\n },\n // @method add(otherPoint: Point): Point\n // Returns the result of addition of the current and the given points.\n add: function (point) {\n // non-destructive, returns a new point\n return this.clone()._add(toPoint(point));\n },\n _add: function (point) {\n // destructive, used directly for performance in situations where it's safe to modify existing point\n this.x += point.x;\n this.y += point.y;\n return this;\n },\n // @method subtract(otherPoint: Point): Point\n // Returns the result of subtraction of the given point from the current.\n subtract: function (point) {\n return this.clone()._subtract(toPoint(point));\n },\n _subtract: function (point) {\n this.x -= point.x;\n this.y -= point.y;\n return this;\n },\n // @method divideBy(num: Number): Point\n // Returns the result of division of the current point by the given number.\n divideBy: function (num) {\n return this.clone()._divideBy(num);\n },\n _divideBy: function (num) {\n this.x /= num;\n this.y /= num;\n return this;\n },\n // @method multiplyBy(num: Number): Point\n // Returns the result of multiplication of the current point by the given number.\n multiplyBy: function (num) {\n return this.clone()._multiplyBy(num);\n },\n _multiplyBy: function (num) {\n this.x *= num;\n this.y *= num;\n return this;\n },\n // @method scaleBy(scale: Point): Point\n // Multiply each coordinate of the current point by each coordinate of\n // `scale`. In linear algebra terms, multiply the point by the\n // [scaling matrix](https://en.wikipedia.org/wiki/Scaling_%28geometry%29#Matrix_representation)\n // defined by `scale`.\n scaleBy: function (point) {\n return new Point(this.x * point.x, this.y * point.y);\n },\n // @method unscaleBy(scale: Point): Point\n // Inverse of `scaleBy`. Divide each coordinate of the current point by\n // each coordinate of `scale`.\n unscaleBy: function (point) {\n return new Point(this.x / point.x, this.y / point.y);\n },\n // @method round(): Point\n // Returns a copy of the current point with rounded coordinates.\n round: function () {\n return this.clone()._round();\n },\n _round: function () {\n this.x = Math.round(this.x);\n this.y = Math.round(this.y);\n return this;\n },\n // @method floor(): Point\n // Returns a copy of the current point with floored coordinates (rounded down).\n floor: function () {\n return this.clone()._floor();\n },\n _floor: function () {\n this.x = Math.floor(this.x);\n this.y = Math.floor(this.y);\n return this;\n },\n // @method ceil(): Point\n // Returns a copy of the current point with ceiled coordinates (rounded up).\n ceil: function () {\n return this.clone()._ceil();\n },\n _ceil: function () {\n this.x = Math.ceil(this.x);\n this.y = Math.ceil(this.y);\n return this;\n },\n // @method trunc(): Point\n // Returns a copy of the current point with truncated coordinates (rounded towards zero).\n trunc: function () {\n return this.clone()._trunc();\n },\n _trunc: function () {\n this.x = trunc(this.x);\n this.y = trunc(this.y);\n return this;\n },\n // @method distanceTo(otherPoint: Point): Number\n // Returns the cartesian distance between the current and the given points.\n distanceTo: function (point) {\n point = toPoint(point);\n var x = point.x - this.x,\n y = point.y - this.y;\n return Math.sqrt(x * x + y * y);\n },\n // @method equals(otherPoint: Point): Boolean\n // Returns `true` if the given point has the same coordinates.\n equals: function (point) {\n point = toPoint(point);\n return point.x === this.x && point.y === this.y;\n },\n // @method contains(otherPoint: Point): Boolean\n // Returns `true` if both coordinates of the given point are less than the corresponding current point coordinates (in absolute values).\n contains: function (point) {\n point = toPoint(point);\n return Math.abs(point.x) <= Math.abs(this.x) && Math.abs(point.y) <= Math.abs(this.y);\n },\n // @method toString(): String\n // Returns a string representation of the point for debugging purposes.\n toString: function () {\n return 'Point(' + formatNum(this.x) + ', ' + formatNum(this.y) + ')';\n }\n };\n\n // @factory L.point(x: Number, y: Number, round?: Boolean)\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.\n\n // @alternative\n // @factory L.point(coords: Number[])\n // Expects an array of the form `[x, y]` instead.\n\n // @alternative\n // @factory L.point(coords: Object)\n // Expects a plain object of the form `{x: Number, y: Number}` instead.\n function toPoint(x, y, round) {\n if (x instanceof Point) {\n return x;\n }\n if (isArray(x)) {\n return new Point(x[0], x[1]);\n }\n if (x === undefined || x === null) {\n return x;\n }\n if (typeof x === 'object' && 'x' in x && 'y' in x) {\n return new Point(x.x, x.y);\n }\n return new Point(x, y, round);\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 */\n\n function Bounds(a, b) {\n if (!a) {\n return;\n }\n var points = b ? [a, b] : a;\n for (var i = 0, len = points.length; i < len; i++) {\n this.extend(points[i]);\n }\n }\n Bounds.prototype = {\n // @method extend(point: Point): this\n // Extends the bounds to contain the given point.\n\n // @alternative\n // @method extend(otherBounds: Bounds): this\n // Extend the bounds to contain the given bounds\n extend: function (obj) {\n var min2, max2;\n if (!obj) {\n return this;\n }\n if (obj instanceof Point || typeof obj[0] === 'number' || 'x' in obj) {\n min2 = max2 = toPoint(obj);\n } else {\n obj = toBounds(obj);\n min2 = obj.min;\n max2 = obj.max;\n if (!min2 || !max2) {\n return this;\n }\n }\n\n // @property min: Point\n // The top left corner of the rectangle.\n // @property max: Point\n // The bottom right corner of the rectangle.\n if (!this.min && !this.max) {\n this.min = min2.clone();\n this.max = max2.clone();\n } else {\n this.min.x = Math.min(min2.x, this.min.x);\n this.max.x = Math.max(max2.x, this.max.x);\n this.min.y = Math.min(min2.y, this.min.y);\n this.max.y = Math.max(max2.y, this.max.y);\n }\n return this;\n },\n // @method getCenter(round?: Boolean): Point\n // Returns the center point of the bounds.\n getCenter: function (round) {\n return toPoint((this.min.x + this.max.x) / 2, (this.min.y + this.max.y) / 2, round);\n },\n // @method getBottomLeft(): Point\n // Returns the bottom-left point of the bounds.\n getBottomLeft: function () {\n return toPoint(this.min.x, this.max.y);\n },\n // @method getTopRight(): Point\n // Returns the top-right point of the bounds.\n getTopRight: function () {\n // -> Point\n return toPoint(this.max.x, this.min.y);\n },\n // @method getTopLeft(): Point\n // Returns the top-left point of the bounds (i.e. [`this.min`](#bounds-min)).\n getTopLeft: function () {\n return this.min; // left, top\n },\n // @method getBottomRight(): Point\n // Returns the bottom-right point of the bounds (i.e. [`this.max`](#bounds-max)).\n getBottomRight: function () {\n return this.max; // right, bottom\n },\n // @method getSize(): Point\n // Returns the size of the given bounds\n getSize: function () {\n return this.max.subtract(this.min);\n },\n // @method contains(otherBounds: Bounds): Boolean\n // Returns `true` if the rectangle contains the given one.\n // @alternative\n // @method contains(point: Point): Boolean\n // Returns `true` if the rectangle contains the given point.\n contains: function (obj) {\n var min, max;\n if (typeof obj[0] === 'number' || obj instanceof Point) {\n obj = toPoint(obj);\n } else {\n obj = toBounds(obj);\n }\n if (obj instanceof Bounds) {\n min = obj.min;\n max = obj.max;\n } else {\n min = max = obj;\n }\n return min.x >= this.min.x && max.x <= this.max.x && min.y >= this.min.y && max.y <= this.max.y;\n },\n // @method intersects(otherBounds: Bounds): Boolean\n // Returns `true` if the rectangle intersects the given bounds. Two bounds\n // intersect if they have at least one point in common.\n intersects: function (bounds) {\n // (Bounds) -> Boolean\n bounds = toBounds(bounds);\n var min = this.min,\n max = this.max,\n min2 = bounds.min,\n max2 = bounds.max,\n xIntersects = max2.x >= min.x && min2.x <= max.x,\n yIntersects = max2.y >= min.y && min2.y <= max.y;\n return xIntersects && yIntersects;\n },\n // @method overlaps(otherBounds: Bounds): Boolean\n // Returns `true` if the rectangle overlaps the given bounds. Two bounds\n // overlap if their intersection is an area.\n overlaps: function (bounds) {\n // (Bounds) -> Boolean\n bounds = toBounds(bounds);\n var min = this.min,\n max = this.max,\n min2 = bounds.min,\n max2 = bounds.max,\n xOverlaps = max2.x > min.x && min2.x < max.x,\n yOverlaps = max2.y > min.y && min2.y < max.y;\n return xOverlaps && yOverlaps;\n },\n // @method isValid(): Boolean\n // Returns `true` if the bounds are properly initialized.\n isValid: function () {\n return !!(this.min && this.max);\n },\n // @method pad(bufferRatio: Number): Bounds\n // Returns bounds created by extending or retracting the current bounds by a given ratio in each direction.\n // For example, a ratio of 0.5 extends the bounds by 50% in each direction.\n // Negative values will retract the bounds.\n pad: function (bufferRatio) {\n var min = this.min,\n max = this.max,\n heightBuffer = Math.abs(min.x - max.x) * bufferRatio,\n widthBuffer = Math.abs(min.y - max.y) * bufferRatio;\n return toBounds(toPoint(min.x - heightBuffer, min.y - widthBuffer), toPoint(max.x + heightBuffer, max.y + widthBuffer));\n },\n // @method equals(otherBounds: Bounds): Boolean\n // Returns `true` if the rectangle is equivalent to the given bounds.\n equals: function (bounds) {\n if (!bounds) {\n return false;\n }\n bounds = toBounds(bounds);\n return this.min.equals(bounds.getTopLeft()) && this.max.equals(bounds.getBottomRight());\n }\n };\n\n // @factory L.bounds(corner1: Point, corner2: Point)\n // Creates a Bounds object from two corners coordinate pairs.\n // @alternative\n // @factory L.bounds(points: Point[])\n // Creates a Bounds object from the given array of points.\n function toBounds(a, b) {\n if (!a || a instanceof Bounds) {\n return a;\n }\n return new Bounds(a, b);\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 */\n\n function LatLngBounds(corner1, corner2) {\n // (LatLng, LatLng) or (LatLng[])\n if (!corner1) {\n return;\n }\n var latlngs = corner2 ? [corner1, corner2] : corner1;\n for (var i = 0, len = latlngs.length; i < len; i++) {\n this.extend(latlngs[i]);\n }\n }\n LatLngBounds.prototype = {\n // @method extend(latlng: LatLng): this\n // Extend the bounds to contain the given point\n\n // @alternative\n // @method extend(otherBounds: LatLngBounds): this\n // Extend the bounds to contain the given bounds\n extend: function (obj) {\n var sw = this._southWest,\n ne = this._northEast,\n sw2,\n ne2;\n if (obj instanceof LatLng) {\n sw2 = obj;\n ne2 = obj;\n } else if (obj instanceof LatLngBounds) {\n sw2 = obj._southWest;\n ne2 = obj._northEast;\n if (!sw2 || !ne2) {\n return this;\n }\n } else {\n return obj ? this.extend(toLatLng(obj) || toLatLngBounds(obj)) : this;\n }\n if (!sw && !ne) {\n this._southWest = new LatLng(sw2.lat, sw2.lng);\n this._northEast = new LatLng(ne2.lat, ne2.lng);\n } else {\n sw.lat = Math.min(sw2.lat, sw.lat);\n sw.lng = Math.min(sw2.lng, sw.lng);\n ne.lat = Math.max(ne2.lat, ne.lat);\n ne.lng = Math.max(ne2.lng, ne.lng);\n }\n return this;\n },\n // @method pad(bufferRatio: Number): LatLngBounds\n // Returns bounds created by extending or retracting the current bounds by a given ratio in each direction.\n // For example, a ratio of 0.5 extends the bounds by 50% in each direction.\n // Negative values will retract the bounds.\n pad: function (bufferRatio) {\n var sw = this._southWest,\n ne = this._northEast,\n heightBuffer = Math.abs(sw.lat - ne.lat) * bufferRatio,\n widthBuffer = Math.abs(sw.lng - ne.lng) * bufferRatio;\n return new LatLngBounds(new LatLng(sw.lat - heightBuffer, sw.lng - widthBuffer), new LatLng(ne.lat + heightBuffer, ne.lng + widthBuffer));\n },\n // @method getCenter(): LatLng\n // Returns the center point of the bounds.\n getCenter: function () {\n return new LatLng((this._southWest.lat + this._northEast.lat) / 2, (this._southWest.lng + this._northEast.lng) / 2);\n },\n // @method getSouthWest(): LatLng\n // Returns the south-west point of the bounds.\n getSouthWest: function () {\n return this._southWest;\n },\n // @method getNorthEast(): LatLng\n // Returns the north-east point of the bounds.\n getNorthEast: function () {\n return this._northEast;\n },\n // @method getNorthWest(): LatLng\n // Returns the north-west point of the bounds.\n getNorthWest: function () {\n return new LatLng(this.getNorth(), this.getWest());\n },\n // @method getSouthEast(): LatLng\n // Returns the south-east point of the bounds.\n getSouthEast: function () {\n return new LatLng(this.getSouth(), this.getEast());\n },\n // @method getWest(): Number\n // Returns the west longitude of the bounds\n getWest: function () {\n return this._southWest.lng;\n },\n // @method getSouth(): Number\n // Returns the south latitude of the bounds\n getSouth: function () {\n return this._southWest.lat;\n },\n // @method getEast(): Number\n // Returns the east longitude of the bounds\n getEast: function () {\n return this._northEast.lng;\n },\n // @method getNorth(): Number\n // Returns the north latitude of the bounds\n getNorth: function () {\n return this._northEast.lat;\n },\n // @method contains(otherBounds: LatLngBounds): Boolean\n // Returns `true` if the rectangle contains the given one.\n\n // @alternative\n // @method contains (latlng: LatLng): Boolean\n // Returns `true` if the rectangle contains the given point.\n contains: function (obj) {\n // (LatLngBounds) or (LatLng) -> Boolean\n if (typeof obj[0] === 'number' || obj instanceof LatLng || 'lat' in obj) {\n obj = toLatLng(obj);\n } else {\n obj = toLatLngBounds(obj);\n }\n var sw = this._southWest,\n ne = this._northEast,\n sw2,\n ne2;\n if (obj instanceof LatLngBounds) {\n sw2 = obj.getSouthWest();\n ne2 = obj.getNorthEast();\n } else {\n sw2 = ne2 = obj;\n }\n return sw2.lat >= sw.lat && ne2.lat <= ne.lat && sw2.lng >= sw.lng && ne2.lng <= ne.lng;\n },\n // @method intersects(otherBounds: LatLngBounds): Boolean\n // Returns `true` if the rectangle intersects the given bounds. Two bounds intersect if they have at least one point in common.\n intersects: function (bounds) {\n bounds = toLatLngBounds(bounds);\n var sw = this._southWest,\n ne = this._northEast,\n sw2 = bounds.getSouthWest(),\n ne2 = bounds.getNorthEast(),\n latIntersects = ne2.lat >= sw.lat && sw2.lat <= ne.lat,\n lngIntersects = ne2.lng >= sw.lng && sw2.lng <= ne.lng;\n return latIntersects && lngIntersects;\n },\n // @method overlaps(otherBounds: LatLngBounds): Boolean\n // Returns `true` if the rectangle overlaps the given bounds. Two bounds overlap if their intersection is an area.\n overlaps: function (bounds) {\n bounds = toLatLngBounds(bounds);\n var sw = this._southWest,\n ne = this._northEast,\n sw2 = bounds.getSouthWest(),\n ne2 = bounds.getNorthEast(),\n latOverlaps = ne2.lat > sw.lat && sw2.lat < ne.lat,\n lngOverlaps = ne2.lng > sw.lng && sw2.lng < ne.lng;\n return latOverlaps && lngOverlaps;\n },\n // @method toBBoxString(): String\n // 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.\n toBBoxString: function () {\n return [this.getWest(), this.getSouth(), this.getEast(), this.getNorth()].join(',');\n },\n // @method equals(otherBounds: LatLngBounds, maxMargin?: Number): Boolean\n // 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.\n equals: function (bounds, maxMargin) {\n if (!bounds) {\n return false;\n }\n bounds = toLatLngBounds(bounds);\n return this._southWest.equals(bounds.getSouthWest(), maxMargin) && this._northEast.equals(bounds.getNorthEast(), maxMargin);\n },\n // @method isValid(): Boolean\n // Returns `true` if the bounds are properly initialized.\n isValid: function () {\n return !!(this._southWest && this._northEast);\n }\n };\n\n // TODO International date line?\n\n // @factory L.latLngBounds(corner1: LatLng, corner2: LatLng)\n // Creates a `LatLngBounds` object by defining two diagonally opposite corners of the rectangle.\n\n // @alternative\n // @factory L.latLngBounds(latlngs: LatLng[])\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).\n function toLatLngBounds(a, b) {\n if (a instanceof LatLngBounds) {\n return a;\n }\n return new LatLngBounds(a, b);\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 */\n\n function LatLng(lat, lng, alt) {\n if (isNaN(lat) || isNaN(lng)) {\n throw new Error('Invalid LatLng object: (' + lat + ', ' + lng + ')');\n }\n\n // @property lat: Number\n // Latitude in degrees\n this.lat = +lat;\n\n // @property lng: Number\n // Longitude in degrees\n this.lng = +lng;\n\n // @property alt: Number\n // Altitude in meters (optional)\n if (alt !== undefined) {\n this.alt = +alt;\n }\n }\n LatLng.prototype = {\n // @method equals(otherLatLng: LatLng, maxMargin?: Number): Boolean\n // 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.\n equals: function (obj, maxMargin) {\n if (!obj) {\n return false;\n }\n obj = toLatLng(obj);\n var margin = Math.max(Math.abs(this.lat - obj.lat), Math.abs(this.lng - obj.lng));\n return margin <= (maxMargin === undefined ? 1.0E-9 : maxMargin);\n },\n // @method toString(): String\n // Returns a string representation of the point (for debugging purposes).\n toString: function (precision) {\n return 'LatLng(' + formatNum(this.lat, precision) + ', ' + formatNum(this.lng, precision) + ')';\n },\n // @method distanceTo(otherLatLng: LatLng): Number\n // 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).\n distanceTo: function (other) {\n return Earth.distance(this, toLatLng(other));\n },\n // @method wrap(): LatLng\n // Returns a new `LatLng` object with the longitude wrapped so it's always between -180 and +180 degrees.\n wrap: function () {\n return Earth.wrapLatLng(this);\n },\n // @method toBounds(sizeInMeters: Number): LatLngBounds\n // Returns a new `LatLngBounds` object in which each boundary is `sizeInMeters/2` meters apart from the `LatLng`.\n toBounds: function (sizeInMeters) {\n var latAccuracy = 180 * sizeInMeters / 40075017,\n lngAccuracy = latAccuracy / Math.cos(Math.PI / 180 * this.lat);\n return toLatLngBounds([this.lat - latAccuracy, this.lng - lngAccuracy], [this.lat + latAccuracy, this.lng + lngAccuracy]);\n },\n clone: function () {\n return new LatLng(this.lat, this.lng, this.alt);\n }\n };\n\n // @factory L.latLng(latitude: Number, longitude: Number, altitude?: Number): LatLng\n // Creates an object representing a geographical point with the given latitude and longitude (and optionally altitude).\n\n // @alternative\n // @factory L.latLng(coords: Array): LatLng\n // Expects an array of the form `[Number, Number]` or `[Number, Number, Number]` instead.\n\n // @alternative\n // @factory L.latLng(coords: Object): LatLng\n // Expects an plain object of the form `{lat: Number, lng: Number}` or `{lat: Number, lng: Number, alt: Number}` instead.\n\n function toLatLng(a, b, c) {\n if (a instanceof LatLng) {\n return a;\n }\n if (isArray(a) && typeof a[0] !== 'object') {\n if (a.length === 3) {\n return new LatLng(a[0], a[1], a[2]);\n }\n if (a.length === 2) {\n return new LatLng(a[0], a[1]);\n }\n return null;\n }\n if (a === undefined || a === null) {\n return a;\n }\n if (typeof a === 'object' && 'lat' in a) {\n return new LatLng(a.lat, 'lng' in a ? a.lng : a.lon, a.alt);\n }\n if (b === undefined) {\n return null;\n }\n return new LatLng(a, b, c);\n }\n\n /*\r\n * @namespace CRS\r\n * @crs L.CRS.Base\r\n * Object that defines coordinate reference systems for projecting\r\n * geographical points into pixel (screen) coordinates and back (and to\r\n * coordinates in other units for [WMS](https://en.wikipedia.org/wiki/Web_Map_Service) services). See\r\n * [spatial reference system](https://en.wikipedia.org/wiki/Spatial_reference_system).\r\n *\r\n * Leaflet defines the most usual CRSs by default. If you want to use a\r\n * CRS not defined by default, take a look at the\r\n * [Proj4Leaflet](https://github.com/kartena/Proj4Leaflet) plugin.\r\n *\r\n * Note that the CRS instances do not inherit from Leaflet's `Class` object,\r\n * and can't be instantiated. Also, new classes can't inherit from them,\r\n * and methods can't be added to them with the `include` function.\r\n */\n\n var CRS = {\n // @method latLngToPoint(latlng: LatLng, zoom: Number): Point\n // Projects geographical coordinates into pixel coordinates for a given zoom.\n latLngToPoint: function (latlng, zoom) {\n var projectedPoint = this.projection.project(latlng),\n scale = this.scale(zoom);\n return this.transformation._transform(projectedPoint, scale);\n },\n // @method pointToLatLng(point: Point, zoom: Number): LatLng\n // The inverse of `latLngToPoint`. Projects pixel coordinates on a given\n // zoom into geographical coordinates.\n pointToLatLng: function (point, zoom) {\n var scale = this.scale(zoom),\n untransformedPoint = this.transformation.untransform(point, scale);\n return this.projection.unproject(untransformedPoint);\n },\n // @method project(latlng: LatLng): Point\n // Projects geographical coordinates into coordinates in units accepted for\n // this CRS (e.g. meters for EPSG:3857, for passing it to WMS services).\n project: function (latlng) {\n return this.projection.project(latlng);\n },\n // @method unproject(point: Point): LatLng\n // Given a projected coordinate returns the corresponding LatLng.\n // The inverse of `project`.\n unproject: function (point) {\n return this.projection.unproject(point);\n },\n // @method scale(zoom: Number): Number\n // Returns the scale used when transforming projected coordinates into\n // pixel coordinates for a particular zoom. For example, it returns\n // `256 * 2^zoom` for Mercator-based CRS.\n scale: function (zoom) {\n return 256 * Math.pow(2, zoom);\n },\n // @method zoom(scale: Number): Number\n // Inverse of `scale()`, returns the zoom level corresponding to a scale\n // factor of `scale`.\n zoom: function (scale) {\n return Math.log(scale / 256) / Math.LN2;\n },\n // @method getProjectedBounds(zoom: Number): Bounds\n // Returns the projection's bounds scaled and transformed for the provided `zoom`.\n getProjectedBounds: function (zoom) {\n if (this.infinite) {\n return null;\n }\n var b = this.projection.bounds,\n s = this.scale(zoom),\n min = this.transformation.transform(b.min, s),\n max = this.transformation.transform(b.max, s);\n return new Bounds(min, max);\n },\n // @method distance(latlng1: LatLng, latlng2: LatLng): Number\n // Returns the distance between two geographical coordinates.\n\n // @property code: String\n // Standard code name of the CRS passed into WMS services (e.g. `'EPSG:3857'`)\n //\n // @property wrapLng: Number[]\n // An array of two numbers defining whether the longitude (horizontal) coordinate\n // axis wraps around a given range and how. Defaults to `[-180, 180]` in most\n // geographical CRSs. If `undefined`, the longitude axis does not wrap around.\n //\n // @property wrapLat: Number[]\n // Like `wrapLng`, but for the latitude (vertical) axis.\n\n // wrapLng: [min, max],\n // wrapLat: [min, max],\n\n // @property infinite: Boolean\n // If true, the coordinate space will be unbounded (infinite in both axes)\n infinite: false,\n // @method wrapLatLng(latlng: LatLng): LatLng\n // Returns a `LatLng` where lat and lng has been wrapped according to the\n // CRS's `wrapLat` and `wrapLng` properties, if they are outside the CRS's bounds.\n wrapLatLng: function (latlng) {\n var lng = this.wrapLng ? wrapNum(latlng.lng, this.wrapLng, true) : latlng.lng,\n lat = this.wrapLat ? wrapNum(latlng.lat, this.wrapLat, true) : latlng.lat,\n alt = latlng.alt;\n return new LatLng(lat, lng, alt);\n },\n // @method wrapLatLngBounds(bounds: LatLngBounds): LatLngBounds\n // Returns a `LatLngBounds` with the same size as the given one, ensuring\n // that its center is within the CRS's bounds.\n // Only accepts actual `L.LatLngBounds` instances, not arrays.\n wrapLatLngBounds: function (bounds) {\n var center = bounds.getCenter(),\n newCenter = this.wrapLatLng(center),\n latShift = center.lat - newCenter.lat,\n lngShift = center.lng - newCenter.lng;\n if (latShift === 0 && lngShift === 0) {\n return bounds;\n }\n var sw = bounds.getSouthWest(),\n ne = bounds.getNorthEast(),\n newSw = new LatLng(sw.lat - latShift, sw.lng - lngShift),\n newNe = new LatLng(ne.lat - latShift, ne.lng - lngShift);\n return new LatLngBounds(newSw, newNe);\n }\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 wrapLng: [-180, 180],\n // Mean Earth Radius, as recommended for use by\n // the International Union of Geodesy and Geophysics,\n // see https://rosettacode.org/wiki/Haversine_formula\n R: 6371000,\n // distance between two geographical points using spherical law of cosines approximation\n distance: function (latlng1, latlng2) {\n var rad = Math.PI / 180,\n lat1 = latlng1.lat * rad,\n lat2 = latlng2.lat * rad,\n sinDLat = Math.sin((latlng2.lat - latlng1.lat) * rad / 2),\n sinDLon = Math.sin((latlng2.lng - latlng1.lng) * rad / 2),\n a = sinDLat * sinDLat + Math.cos(lat1) * Math.cos(lat2) * sinDLon * sinDLon,\n c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n return this.R * c;\n }\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 */\n\n var earthRadius = 6378137;\n var SphericalMercator = {\n R: earthRadius,\n MAX_LATITUDE: 85.0511287798,\n project: function (latlng) {\n var d = Math.PI / 180,\n max = this.MAX_LATITUDE,\n lat = Math.max(Math.min(max, latlng.lat), -max),\n sin = Math.sin(lat * d);\n return new Point(this.R * latlng.lng * d, this.R * Math.log((1 + sin) / (1 - sin)) / 2);\n },\n unproject: function (point) {\n var d = 180 / Math.PI;\n return new LatLng((2 * Math.atan(Math.exp(point.y / this.R)) - Math.PI / 2) * d, point.x * d / this.R);\n },\n bounds: function () {\n var d = earthRadius * Math.PI;\n return new Bounds([-d, -d], [d, d]);\n }()\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 */\n\n // factory new L.Transformation(a: Number, b: Number, c: Number, d: Number)\n // Creates a `Transformation` object with the given coefficients.\n function Transformation(a, b, c, d) {\n if (isArray(a)) {\n // use array properties\n this._a = a[0];\n this._b = a[1];\n this._c = a[2];\n this._d = a[3];\n return;\n }\n this._a = a;\n this._b = b;\n this._c = c;\n this._d = d;\n }\n Transformation.prototype = {\n // @method transform(point: Point, scale?: Number): Point\n // Returns a transformed point, optionally multiplied by the given scale.\n // Only accepts actual `L.Point` instances, not arrays.\n transform: function (point, scale) {\n // (Point, Number) -> Point\n return this._transform(point.clone(), scale);\n },\n // destructive transform (faster)\n _transform: function (point, scale) {\n scale = scale || 1;\n point.x = scale * (this._a * point.x + this._b);\n point.y = scale * (this._c * point.y + this._d);\n return point;\n },\n // @method untransform(point: Point, scale?: Number): Point\n // Returns the reverse transformation of the given point, optionally divided\n // by the given scale. Only accepts actual `L.Point` instances, not arrays.\n untransform: function (point, scale) {\n scale = scale || 1;\n return new Point((point.x / scale - this._b) / this._a, (point.y / scale - this._d) / this._c);\n }\n };\n\n // factory L.transformation(a: Number, b: Number, c: Number, d: Number)\n\n // @factory L.transformation(a: Number, b: Number, c: Number, d: Number)\n // Instantiates a Transformation object with the given coefficients.\n\n // @alternative\n // @factory L.transformation(coefficients: Array): Transformation\n // Expects an coefficients array of the form\n // `[a: Number, b: Number, c: Number, d: Number]`.\n\n function toTransformation(a, b, c, d) {\n return new Transformation(a, b, c, d);\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 */\n\n var EPSG3857 = extend({}, Earth, {\n code: 'EPSG:3857',\n projection: SphericalMercator,\n transformation: function () {\n var scale = 0.5 / (Math.PI * SphericalMercator.R);\n return toTransformation(scale, 0.5, -scale, 0.5);\n }()\n });\n var EPSG900913 = extend({}, EPSG3857, {\n code: 'EPSG:900913'\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 return 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 var str = '',\n i,\n j,\n len,\n len2,\n points,\n p;\n for (i = 0, len = rings.length; i < len; i++) {\n points = rings[i];\n for (j = 0, len2 = points.length; j < len2; j++) {\n p = points[j];\n str += (j ? 'L' : 'M') + p.x + ' ' + p.y;\n }\n\n // closes the ring for polygons; \"x\" is VML syntax\n str += closed ? Browser.svg ? 'z' : 'x' : '';\n }\n\n // SVG complains about empty path strings\n return 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 */\n\n var style = document.documentElement.style;\n\n // @property ie: Boolean; `true` for all Internet Explorer versions (not Edge).\n var ie = 'ActiveXObject' in window;\n\n // @property ielt9: Boolean; `true` for Internet Explorer versions less than 9.\n var ielt9 = ie && !document.addEventListener;\n\n // @property edge: Boolean; `true` for the Edge web browser.\n var edge = 'msLaunchUri' in navigator && !('documentMode' in document);\n\n // @property webkit: Boolean;\n // `true` for webkit-based browsers like Chrome and Safari (including mobile versions).\n var webkit = userAgentContains('webkit');\n\n // @property android: Boolean\n // **Deprecated.** `true` for any browser running on an Android platform.\n var android = userAgentContains('android');\n\n // @property android23: Boolean; **Deprecated.** `true` for browsers running on Android 2 or Android 3.\n var android23 = userAgentContains('android 2') || userAgentContains('android 3');\n\n /* See https://stackoverflow.com/a/17961266 for details on detecting stock Android */\n var webkitVer = parseInt(/WebKit\\/([0-9]+)|$/.exec(navigator.userAgent)[1], 10); // also matches AppleWebKit\n // @property androidStock: Boolean; **Deprecated.** `true` for the Android stock browser (i.e. not Chrome)\n var androidStock = android && userAgentContains('Google') && webkitVer < 537 && !('AudioNode' in window);\n\n // @property opera: Boolean; `true` for the Opera browser\n var opera = !!window.opera;\n\n // @property chrome: Boolean; `true` for the Chrome browser.\n var chrome = !edge && userAgentContains('chrome');\n\n // @property gecko: Boolean; `true` for gecko-based browsers like Firefox.\n var gecko = userAgentContains('gecko') && !webkit && !opera && !ie;\n\n // @property safari: Boolean; `true` for the Safari browser.\n var safari = !chrome && userAgentContains('safari');\n var phantom = userAgentContains('phantom');\n\n // @property opera12: Boolean\n // `true` for the Opera browser supporting CSS transforms (version 12 or later).\n var opera12 = 'OTransition' in style;\n\n // @property win: Boolean; `true` when the browser is running in a Windows platform\n var win = navigator.platform.indexOf('Win') === 0;\n\n // @property ie3d: Boolean; `true` for all Internet Explorer versions supporting CSS transforms.\n var ie3d = ie && 'transition' in style;\n\n // @property webkit3d: Boolean; `true` for webkit-based browsers supporting CSS transforms.\n var webkit3d = 'WebKitCSSMatrix' in window && 'm11' in new window.WebKitCSSMatrix() && !android23;\n\n // @property gecko3d: Boolean; `true` for gecko-based browsers supporting CSS transforms.\n var gecko3d = 'MozPerspective' in style;\n\n // @property any3d: Boolean\n // `true` for all browsers supporting CSS transforms.\n var any3d = !window.L_DISABLE_3D && (ie3d || webkit3d || gecko3d) && !opera12 && !phantom;\n\n // @property mobile: Boolean; `true` for all browsers running in a mobile device.\n var mobile = typeof orientation !== 'undefined' || userAgentContains('mobile');\n\n // @property mobileWebkit: Boolean; `true` for all webkit-based browsers in a mobile device.\n var mobileWebkit = mobile && webkit;\n\n // @property mobileWebkit3d: Boolean\n // `true` for all webkit-based browsers in a mobile device supporting CSS transforms.\n var mobileWebkit3d = mobile && webkit3d;\n\n // @property msPointer: Boolean\n // `true` for browsers implementing the Microsoft touch events model (notably IE10).\n var msPointer = !window.PointerEvent && window.MSPointerEvent;\n\n // @property pointer: Boolean\n // `true` for all browsers supporting [pointer events](https://msdn.microsoft.com/en-us/library/dn433244%28v=vs.85%29.aspx).\n var pointer = !!(window.PointerEvent || msPointer);\n\n // @property touchNative: Boolean\n // `true` for all browsers supporting [touch events](https://developer.mozilla.org/docs/Web/API/Touch_events).\n // **This does not necessarily mean** that the browser is running in a computer with\n // a touchscreen, it only means that the browser is capable of understanding\n // touch events.\n var touchNative = 'ontouchstart' in window || !!window.TouchEvent;\n\n // @property touch: Boolean\n // `true` for all browsers supporting either [touch](#browser-touch) or [pointer](#browser-pointer) events.\n // Note: pointer events will be preferred (if available), and processed for all `touch*` listeners.\n var touch = !window.L_NO_TOUCH && (touchNative || pointer);\n\n // @property mobileOpera: Boolean; `true` for the Opera browser in a mobile device.\n var mobileOpera = mobile && opera;\n\n // @property mobileGecko: Boolean\n // `true` for gecko-based browsers running in a mobile device.\n var mobileGecko = mobile && gecko;\n\n // @property retina: Boolean\n // `true` for browsers on a high-resolution \"retina\" screen or on any screen when browser's display zoom is more than 100%.\n var retina = (window.devicePixelRatio || window.screen.deviceXDPI / window.screen.logicalXDPI) > 1;\n\n // @property passiveEvents: Boolean\n // `true` for browsers that support passive events.\n var passiveEvents = function () {\n var supportsPassiveOption = false;\n try {\n var opts = Object.defineProperty({}, 'passive', {\n get: function () {\n // eslint-disable-line getter-return\n supportsPassiveOption = true;\n }\n });\n window.addEventListener('testPassiveEventSupport', falseFn, opts);\n window.removeEventListener('testPassiveEventSupport', falseFn, opts);\n } catch (e) {\n // Errors can safely be ignored since this is only a browser support test.\n }\n return supportsPassiveOption;\n }();\n\n // @property canvas: Boolean\n // `true` when the browser supports [``](https://developer.mozilla.org/docs/Web/API/Canvas_API).\n var canvas$1 = function () {\n return !!document.createElement('canvas').getContext;\n }();\n\n // @property svg: Boolean\n // `true` when the browser supports [SVG](https://developer.mozilla.org/docs/Web/SVG).\n var svg$1 = !!(document.createElementNS && svgCreate('svg').createSVGRect);\n var inlineSvg = !!svg$1 && function () {\n var div = document.createElement('div');\n div.innerHTML = '';\n return (div.firstChild && div.firstChild.namespaceURI) === 'http://www.w3.org/2000/svg';\n }();\n\n // @property vml: Boolean\n // `true` if the browser supports [VML](https://en.wikipedia.org/wiki/Vector_Markup_Language).\n var vml = !svg$1 && function () {\n try {\n var div = document.createElement('div');\n div.innerHTML = '';\n var shape = div.firstChild;\n shape.style.behavior = 'url(#default#VML)';\n return shape && typeof shape.adj === 'object';\n } catch (e) {\n return false;\n }\n }();\n\n // @property mac: Boolean; `true` when the browser is running in a Mac platform\n var mac = navigator.platform.indexOf('Mac') === 0;\n\n // @property mac: Boolean; `true` when the browser is running in a Linux platform\n var linux = navigator.platform.indexOf('Linux') === 0;\n function userAgentContains(str) {\n return navigator.userAgent.toLowerCase().indexOf(str) >= 0;\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 touchNative: touchNative,\n mobileOpera: mobileOpera,\n mobileGecko: mobileGecko,\n retina: retina,\n passiveEvents: passiveEvents,\n canvas: canvas$1,\n svg: svg$1,\n vml: vml,\n inlineSvg: inlineSvg,\n mac: mac,\n linux: linux\n };\n\n /*\n * Extends L.DomEvent to provide touch support for Internet Explorer and Windows-based devices.\n */\n\n var POINTER_DOWN = Browser.msPointer ? 'MSPointerDown' : 'pointerdown';\n var POINTER_MOVE = Browser.msPointer ? 'MSPointerMove' : 'pointermove';\n var POINTER_UP = Browser.msPointer ? 'MSPointerUp' : 'pointerup';\n var POINTER_CANCEL = Browser.msPointer ? 'MSPointerCancel' : 'pointercancel';\n var pEvent = {\n touchstart: POINTER_DOWN,\n touchmove: POINTER_MOVE,\n touchend: POINTER_UP,\n touchcancel: POINTER_CANCEL\n };\n var handle = {\n touchstart: _onPointerStart,\n touchmove: _handlePointer,\n touchend: _handlePointer,\n touchcancel: _handlePointer\n };\n var _pointers = {};\n var _pointerDocListener = false;\n\n // Provides a touch events wrapper for (ms)pointer events.\n // ref https://www.w3.org/TR/pointerevents/ https://www.w3.org/Bugs/Public/show_bug.cgi?id=22890\n\n function addPointerListener(obj, type, handler) {\n if (type === 'touchstart') {\n _addPointerDocListener();\n }\n if (!handle[type]) {\n console.warn('wrong event specified:', type);\n return falseFn;\n }\n handler = handle[type].bind(this, handler);\n obj.addEventListener(pEvent[type], handler, false);\n return handler;\n }\n function removePointerListener(obj, type, handler) {\n if (!pEvent[type]) {\n console.warn('wrong event specified:', type);\n return;\n }\n obj.removeEventListener(pEvent[type], handler, false);\n }\n function _globalPointerDown(e) {\n _pointers[e.pointerId] = e;\n }\n function _globalPointerMove(e) {\n if (_pointers[e.pointerId]) {\n _pointers[e.pointerId] = e;\n }\n }\n function _globalPointerUp(e) {\n delete _pointers[e.pointerId];\n }\n function _addPointerDocListener() {\n // need to keep track of what pointers and how many are active to provide e.touches emulation\n if (!_pointerDocListener) {\n // we listen document as any drags that end by moving the touch off the screen get fired there\n document.addEventListener(POINTER_DOWN, _globalPointerDown, true);\n document.addEventListener(POINTER_MOVE, _globalPointerMove, true);\n document.addEventListener(POINTER_UP, _globalPointerUp, true);\n document.addEventListener(POINTER_CANCEL, _globalPointerUp, true);\n _pointerDocListener = true;\n }\n }\n function _handlePointer(handler, e) {\n if (e.pointerType === (e.MSPOINTER_TYPE_MOUSE || 'mouse')) {\n return;\n }\n e.touches = [];\n for (var i in _pointers) {\n e.touches.push(_pointers[i]);\n }\n e.changedTouches = [e];\n handler(e);\n }\n function _onPointerStart(handler, e) {\n // IE10 specific: MsTouch needs preventDefault. See #2000\n if (e.MSPOINTER_TYPE_TOUCH && e.pointerType === e.MSPOINTER_TYPE_TOUCH) {\n preventDefault(e);\n }\n _handlePointer(handler, e);\n }\n\n /*\r\n * Extends the event handling code with double tap support for mobile browsers.\r\n *\r\n * Note: currently most browsers fire native dblclick, with only a few exceptions\r\n * (see https://github.com/Leaflet/Leaflet/issues/7012#issuecomment-595087386)\r\n */\n\n function makeDblclick(event) {\n // in modern browsers `type` cannot be just overridden:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Getter_only\n var newEvent = {},\n prop,\n i;\n for (i in event) {\n prop = event[i];\n newEvent[i] = prop && prop.bind ? prop.bind(event) : prop;\n }\n event = newEvent;\n newEvent.type = 'dblclick';\n newEvent.detail = 2;\n newEvent.isTrusted = false;\n newEvent._simulated = true; // for debug purposes\n return newEvent;\n }\n var delay = 200;\n function addDoubleTapListener(obj, handler) {\n // Most browsers handle double tap natively\n obj.addEventListener('dblclick', handler);\n\n // On some platforms the browser doesn't fire native dblclicks for touch events.\n // It seems that in all such cases `detail` property of `click` event is always `1`.\n // So here we rely on that fact to avoid excessive 'dblclick' simulation when not needed.\n var last = 0,\n detail;\n function simDblclick(e) {\n if (e.detail !== 1) {\n detail = e.detail; // keep in sync to avoid false dblclick in some cases\n return;\n }\n if (e.pointerType === 'mouse' || e.sourceCapabilities && !e.sourceCapabilities.firesTouchEvents) {\n return;\n }\n\n // When clicking on an , the browser generates a click on its\n //