diff --git a/Web/Resgrid.Web.Services/Controllers/v4/CallFilesController.cs b/Web/Resgrid.Web.Services/Controllers/v4/CallFilesController.cs index 9621bcda..1ad522e2 100644 --- a/Web/Resgrid.Web.Services/Controllers/v4/CallFilesController.cs +++ b/Web/Resgrid.Web.Services/Controllers/v4/CallFilesController.cs @@ -130,6 +130,44 @@ public async Task GetFile(string query) return File(attachment.Data, contentType); } + /// + /// Get a users avatar from the Resgrid system based on their ID + /// + /// ID of the file + /// + [HttpHead("GetFile")] + [AllowAnonymous] + [ProducesResponseType(StatusCodes.Status200OK)] + [ProducesResponseType(StatusCodes.Status404NotFound)] + public async Task GetFileHead(string query) + { + if (String.IsNullOrWhiteSpace(query)) + return NotFound(); + + var decodedQuery = Encoding.UTF8.GetString(Convert.FromBase64String(query)); + + var decryptedQuery = SymmetricEncryption.Decrypt(decodedQuery, Config.SystemBehaviorConfig.ExternalLinkUrlParamPassphrase); + + var items = decryptedQuery.Split(char.Parse("|")); + + if (String.IsNullOrWhiteSpace(items[0]) || items[0] == "0" || String.IsNullOrWhiteSpace(items[1])) + return NotFound(); + + int departmentId = int.Parse(items[0].Trim()); + string id = items[1].Trim(); + + var attachment = await _callsService.GetCallAttachmentAsync(int.Parse(id)); + + if (attachment == null) + return NotFound(); + + var call = await _callsService.GetCallByIdAsync(attachment.CallId); + if (call.DepartmentId != departmentId) + return Unauthorized(); + + return Ok(); + } + /// /// Attaches a file to a call /// diff --git a/Web/Resgrid.Web.Services/Controllers/v4/ContactsController.cs b/Web/Resgrid.Web.Services/Controllers/v4/ContactsController.cs index a805fe39..283a03e6 100644 --- a/Web/Resgrid.Web.Services/Controllers/v4/ContactsController.cs +++ b/Web/Resgrid.Web.Services/Controllers/v4/ContactsController.cs @@ -166,6 +166,53 @@ public async Task> GetContactById(string contactId) return result; } + /// + /// Gets all the Notes for a Contact by the contact id + /// + /// + [HttpGet("GetContactNotesByContactId")] + [ProducesResponseType(StatusCodes.Status200OK)] + [Authorize(Policy = ResgridResources.Contacts_View)] + public async Task> GetContactNotesByContactId(string contactId) + { + var result = new ContactNotesResult(); + + var contact = await _contactsService.GetContactByIdAsync(contactId); + var department = await _departmentsService.GetDepartmentByIdAsync(DepartmentId); + + if (contact != null && contact.DepartmentId == DepartmentId) + { + var contactNotes = await _contactsService.GetContactNotesByContactIdAsync(contactId, Int32.MaxValue, false); + + foreach (var contactNote in contactNotes) + { + var addedOnPerson = await _userProfileService.GetProfileByUserIdAsync(contactNote.AddedByUserId); + UserProfile editedPerson = null; + + if (!String.IsNullOrWhiteSpace(contactNote.EditedByUserId)) + editedPerson = await _userProfileService.GetProfileByUserIdAsync(contactNote.EditedByUserId); + + ContactNoteType noteType = null; + if (!String.IsNullOrWhiteSpace(contactNote.ContactNoteTypeId)) + noteType = await _contactsService.GetContactNoteTypeByIdAsync(contactNote.ContactNoteTypeId); + + result.Data.Add(ConvertContactNoteData(contactNote, noteType, department, addedOnPerson, editedPerson)); + } + + result.PageSize = contactNotes.Count; + result.Status = ResponseHelper.Success; + } + else + { + result.PageSize = 0; + result.Status = ResponseHelper.NotFound; + } + + ResponseHelper.PopulateV4ResponseData(result); + + return result; + } + public static ContactCategoryResultData ConvertCategoryData(ContactCategory category, Department department, UserProfile addedProfile, UserProfile editedProfile) { var cat = new ContactCategoryResultData(); @@ -246,5 +293,44 @@ public static ContactResultData ConvertContactData(Contact contact, Department d return con; } + + public static ContactNoteResultData ConvertContactNoteData(ContactNote contactNote, ContactNoteType contactNoteType, Department department, UserProfile addedProfile, UserProfile editedProfile) + { + var conNote = new ContactNoteResultData(); + conNote.ContactId = contactNote.ContactId; + conNote.ContactNoteId = contactNote.ContactNoteId; + conNote.ContactNoteTypeId = contactNote.ContactNoteTypeId; + conNote.Note = contactNote.Note; + conNote.ShouldAlert = contactNote.ShouldAlert; + conNote.Visibility = contactNote.Visibility; + + if (contactNoteType != null) + { + conNote.ContactNoteTypeId = contactNoteType.ContactNoteTypeId; + conNote.NoteType = contactNoteType.Name; + } + + if (contactNote.ExpiresOn.HasValue) + { + conNote.ExpiresOnUtc = contactNote.ExpiresOn; + conNote.ExpiresOn = contactNote.ExpiresOn.Value.FormatForDepartment(department); + } + + conNote.IsDeleted = contactNote.IsDeleted; + conNote.AddedOnUtc = contactNote.AddedOn; + conNote.AddedOn = contactNote.AddedOn.FormatForDepartment(department); + conNote.AddedByUserId = contactNote.AddedByUserId; + conNote.AddedByName = addedProfile.FullName.AsFirstNameLastName; + + if (contactNote.EditedOn.HasValue) + { + conNote.EditedOnUtc = contactNote.EditedOn; + conNote.EditedOn = contactNote.EditedOn.Value.FormatForDepartment(department); + conNote.EditedByUserId = contactNote.EditedByUserId; + conNote.EditedByName = editedProfile.FullName.AsFirstNameLastName; + } + + return conNote; + } } } diff --git a/Web/Resgrid.Web.Services/Models/v4/Contacts/ContactNotesResult.cs b/Web/Resgrid.Web.Services/Models/v4/Contacts/ContactNotesResult.cs new file mode 100644 index 00000000..4c4adc5c --- /dev/null +++ b/Web/Resgrid.Web.Services/Models/v4/Contacts/ContactNotesResult.cs @@ -0,0 +1,68 @@ +using System; +using Resgrid.Web.Services.Models.v4.CallTypes; +using System.Collections.Generic; +using Humanizer; + +namespace Resgrid.Web.Services.Models.v4.Contacts +{ + /// + /// Gets the notes for a contact + /// + public class ContactNotesResult : StandardApiResponseV4Base + { + /// + /// Response Data + /// + public List Data { get; set; } + + /// + /// Default constructor + /// + public ContactNotesResult() + { + Data = new List(); + } + } + + /// + /// A contact note + /// + public class ContactNoteResultData + { + public string ContactNoteId { get; set; } + + public string ContactId { get; set; } + + public string ContactNoteTypeId { get; set; } + + public string Note { get; set; } + + public string NoteType { get; set; } + + public bool ShouldAlert { get; set; } + + public int Visibility { get; set; } // 0 Internal, 1 Visible to Client + + public DateTime? ExpiresOnUtc { get; set; } + + public string ExpiresOn { get; set; } + + public bool IsDeleted { get; set; } + + public DateTime AddedOnUtc { get; set; } + + public string AddedOn { get; set; } + + public string AddedByUserId { get; set; } + + public string AddedByName { get; set; } + + public DateTime? EditedOnUtc { get; set; } + + public string EditedOn { get; set; } + + public string EditedByUserId { get; set; } + + public string EditedByName { get; set; } + } +} diff --git a/Web/Resgrid.Web.Services/Resgrid.Web.Services.xml b/Web/Resgrid.Web.Services/Resgrid.Web.Services.xml index 0a19b631..ae67ccc6 100644 --- a/Web/Resgrid.Web.Services/Resgrid.Web.Services.xml +++ b/Web/Resgrid.Web.Services/Resgrid.Web.Services.xml @@ -3179,6 +3179,13 @@ ID of the file + + + Get a users avatar from the Resgrid system based on their ID + + ID of the file + + Attaches a file to a call @@ -3383,6 +3390,12 @@ + + + Gets all the Notes for a Contact by the contact id + + + Custom statuses @@ -5511,6 +5524,26 @@ PostHog Host + + + Gets the notes for a contact + + + + + Response Data + + + + + Default constructor + + + + + A contact note + + Gets the contact categories diff --git a/Web/Resgrid.Web/wwwroot/js/ng/vendor.js b/Web/Resgrid.Web/wwwroot/js/ng/vendor.js index 0223b2d6..b627adf0 100644 --- a/Web/Resgrid.Web/wwwroot/js/ng/vendor.js +++ b/Web/Resgrid.Web/wwwroot/js/ng/vendor.js @@ -909,10 +909,10 @@ var __extends = undefined && undefined.__extends || function () { /** Error thrown when an HTTP request fails. */ var HttpError = /** @class */function (_super) { __extends(HttpError, _super); - /** Constructs a new instance of {@link @microsoft/signalr.HttpError}. - * - * @param {string} errorMessage A descriptive error message. - * @param {number} statusCode The HTTP status code represented by this error. + /** Constructs a new instance of {@link @microsoft/signalr.HttpError}. + * + * @param {string} errorMessage A descriptive error message. + * @param {number} statusCode The HTTP status code represented by this error. */ function HttpError(errorMessage, statusCode) { var _newTarget = this.constructor; @@ -931,9 +931,9 @@ var HttpError = /** @class */function (_super) { /** Error thrown when a timeout elapses. */ var TimeoutError = /** @class */function (_super) { __extends(TimeoutError, _super); - /** Constructs a new instance of {@link @microsoft/signalr.TimeoutError}. - * - * @param {string} errorMessage A descriptive error message. + /** Constructs a new instance of {@link @microsoft/signalr.TimeoutError}. + * + * @param {string} errorMessage A descriptive error message. */ function TimeoutError(errorMessage) { var _newTarget = this.constructor; @@ -954,9 +954,9 @@ var TimeoutError = /** @class */function (_super) { /** Error thrown when an action is aborted. */ var AbortError = /** @class */function (_super) { __extends(AbortError, _super); - /** Constructs a new instance of {@link AbortError}. - * - * @param {string} errorMessage A descriptive error message. + /** Constructs a new instance of {@link AbortError}. + * + * @param {string} errorMessage A descriptive error message. */ function AbortError(errorMessage) { var _newTarget = this.constructor; @@ -1373,9 +1373,9 @@ var HttpResponse = /** @class */function () { return HttpResponse; }(); -/** Abstraction over an HTTP client. - * - * This class provides an abstraction over an HTTP client so that a different implementation can be provided on different platforms. +/** Abstraction over an HTTP client. + * + * This class provides an abstraction over an HTTP client so that a different implementation can be provided on different platforms. */ var HttpClient = /** @class */function () { function HttpClient() {} @@ -1397,10 +1397,10 @@ var HttpClient = /** @class */function () { url: url })); }; - /** Gets all cookies that apply to the specified URL. - * - * @param url The URL that the cookies are valid for. - * @returns {string} A string containing all the key-value cookie pairs for the specified URL. + /** Gets all cookies that apply to the specified URL. + * + * @param url The URL that the cookies are valid for. + * @returns {string} A string containing all the key-value cookie pairs for the specified URL. */ // @ts-ignore HttpClient.prototype.getCookieString = function (url) { @@ -2427,8 +2427,8 @@ var HubConnection = /** @class */function () { configurable: true }); Object.defineProperty(HubConnection.prototype, "connectionId", { - /** Represents the connection id of the {@link HubConnection} on the server. The connection id will be null when the connection is either - * in the disconnected state or if the negotiation step was skipped. + /** Represents the connection id of the {@link HubConnection} on the server. The connection id will be null when the connection is either + * in the disconnected state or if the negotiation step was skipped. */ get: function () { return this.connection ? this.connection.connectionId || null : null; @@ -2441,10 +2441,10 @@ var HubConnection = /** @class */function () { get: function () { return this.connection.baseUrl || ""; }, - /** - * Sets a new url for the HubConnection. Note that the url can only be changed when the connection is in either the Disconnected or - * Reconnecting states. - * @param {string} url The url to connect to. + /** + * Sets a new url for the HubConnection. Note that the url can only be changed when the connection is in either the Disconnected or + * Reconnecting states. + * @param {string} url The url to connect to. */ set: function (url) { if (this.connectionState !== HubConnectionState.Disconnected && this.connectionState !== HubConnectionState.Reconnecting) { @@ -2458,9 +2458,9 @@ var HubConnection = /** @class */function () { enumerable: true, configurable: true }); - /** Starts the connection. - * - * @returns {Promise} A Promise that resolves when the connection has been successfully established, or rejects with an error. + /** Starts the connection. + * + * @returns {Promise} A Promise that resolves when the connection has been successfully established, or rejects with an error. */ HubConnection.prototype.start = function () { this.startPromise = this.startWithStateTransitions(); @@ -2562,9 +2562,9 @@ var HubConnection = /** @class */function () { }); }); }; - /** Stops the connection. - * - * @returns {Promise} A Promise that resolves when the connection has been successfully terminated, or rejects with an error. + /** Stops the connection. + * + * @returns {Promise} A Promise that resolves when the connection has been successfully terminated, or rejects with an error. */ HubConnection.prototype.stop = function () { return __awaiter(this, void 0, void 0, function () { @@ -2624,12 +2624,12 @@ var HubConnection = /** @class */function () { // to the disconnected state if need be before HttpConnection.stop() completes. return this.connection.stop(error); }; - /** Invokes a streaming hub method on the server using the specified name and arguments. - * - * @typeparam T The type of the items returned by the server. - * @param {string} methodName The name of the server method to invoke. - * @param {any[]} args The arguments used to invoke the server method. - * @returns {IStreamResult} An object that yields results from the server as they are received. + /** Invokes a streaming hub method on the server using the specified name and arguments. + * + * @typeparam T The type of the items returned by the server. + * @param {string} methodName The name of the server method to invoke. + * @param {any[]} args The arguments used to invoke the server method. + * @returns {IStreamResult} An object that yields results from the server as they are received. */ HubConnection.prototype.stream = function (methodName) { var _this = this; @@ -2678,21 +2678,21 @@ var HubConnection = /** @class */function () { this.resetKeepAliveInterval(); return this.connection.send(message); }; - /** - * Sends a js object to the server. - * @param message The js object to serialize and send. + /** + * Sends a js object to the server. + * @param message The js object to serialize and send. */ HubConnection.prototype.sendWithProtocol = function (message) { return this.sendMessage(this.protocol.writeMessage(message)); }; - /** Invokes a hub method on the server using the specified name and arguments. Does not wait for a response from the receiver. - * - * The Promise returned by this method resolves when the client has sent the invocation to the server. The server may still - * be processing the invocation. - * - * @param {string} methodName The name of the server method to invoke. - * @param {any[]} args The arguments used to invoke the server method. - * @returns {Promise} A Promise that resolves when the invocation has been successfully sent, or rejects with an error. + /** Invokes a hub method on the server using the specified name and arguments. Does not wait for a response from the receiver. + * + * The Promise returned by this method resolves when the client has sent the invocation to the server. The server may still + * be processing the invocation. + * + * @param {string} methodName The name of the server method to invoke. + * @param {any[]} args The arguments used to invoke the server method. + * @returns {Promise} A Promise that resolves when the invocation has been successfully sent, or rejects with an error. */ HubConnection.prototype.send = function (methodName) { var args = []; @@ -2706,16 +2706,16 @@ var HubConnection = /** @class */function () { this.launchStreams(streams, sendPromise); return sendPromise; }; - /** Invokes a hub method on the server using the specified name and arguments. - * - * The Promise returned by this method resolves when the server indicates it has finished invoking the method. When the promise - * resolves, the server has finished invoking the method. If the server method returns a result, it is produced as the result of - * resolving the Promise. - * - * @typeparam T The expected return type. - * @param {string} methodName The name of the server method to invoke. - * @param {any[]} args The arguments used to invoke the server method. - * @returns {Promise} A Promise that resolves with the result of the server method (if any), or rejects with an error. + /** Invokes a hub method on the server using the specified name and arguments. + * + * The Promise returned by this method resolves when the server indicates it has finished invoking the method. When the promise + * resolves, the server has finished invoking the method. If the server method returns a result, it is produced as the result of + * resolving the Promise. + * + * @typeparam T The expected return type. + * @param {string} methodName The name of the server method to invoke. + * @param {any[]} args The arguments used to invoke the server method. + * @returns {Promise} A Promise that resolves with the result of the server method (if any), or rejects with an error. */ HubConnection.prototype.invoke = function (methodName) { var _this = this; @@ -2755,10 +2755,10 @@ var HubConnection = /** @class */function () { }); return p; }; - /** Registers a handler that will be invoked when the hub method with the specified method name is invoked. - * - * @param {string} methodName The name of the hub method to define. - * @param {Function} newMethod The handler that will be raised when the hub method is invoked. + /** Registers a handler that will be invoked when the hub method with the specified method name is invoked. + * + * @param {string} methodName The name of the hub method to define. + * @param {Function} newMethod The handler that will be raised when the hub method is invoked. */ HubConnection.prototype.on = function (methodName, newMethod) { if (!methodName || !newMethod) { @@ -2795,27 +2795,27 @@ var HubConnection = /** @class */function () { delete this.methods[methodName]; } }; - /** Registers a handler that will be invoked when the connection is closed. - * - * @param {Function} callback The handler that will be invoked when the connection is closed. Optionally receives a single argument containing the error that caused the connection to close (if any). + /** Registers a handler that will be invoked when the connection is closed. + * + * @param {Function} callback The handler that will be invoked when the connection is closed. Optionally receives a single argument containing the error that caused the connection to close (if any). */ HubConnection.prototype.onclose = function (callback) { if (callback) { this.closedCallbacks.push(callback); } }; - /** Registers a handler that will be invoked when the connection starts reconnecting. - * - * @param {Function} callback The handler that will be invoked when the connection starts reconnecting. Optionally receives a single argument containing the error that caused the connection to start reconnecting (if any). + /** Registers a handler that will be invoked when the connection starts reconnecting. + * + * @param {Function} callback The handler that will be invoked when the connection starts reconnecting. Optionally receives a single argument containing the error that caused the connection to start reconnecting (if any). */ HubConnection.prototype.onreconnecting = function (callback) { if (callback) { this.reconnectingCallbacks.push(callback); } }; - /** Registers a handler that will be invoked when the connection successfully reconnects. - * - * @param {Function} callback The handler that will be invoked when the connection successfully reconnects. + /** Registers a handler that will be invoked when the connection successfully reconnects. + * + * @param {Function} callback The handler that will be invoked when the connection successfully reconnects. */ HubConnection.prototype.onreconnected = function (callback) { if (callback) { @@ -3380,9 +3380,9 @@ var HubConnectionBuilder = /** @class */function () { } return this; }; - /** Configures the {@link @microsoft/signalr.HubConnection} to use the specified Hub Protocol. - * - * @param {IHubProtocol} protocol The {@link @microsoft/signalr.IHubProtocol} implementation to use. + /** Configures the {@link @microsoft/signalr.HubConnection} to use the specified Hub Protocol. + * + * @param {IHubProtocol} protocol The {@link @microsoft/signalr.IHubProtocol} implementation to use. */ HubConnectionBuilder.prototype.withHubProtocol = function (protocol) { _Utils__WEBPACK_IMPORTED_MODULE_6__.Arg.isRequired(protocol, "protocol"); @@ -3402,9 +3402,9 @@ var HubConnectionBuilder = /** @class */function () { } return this; }; - /** Creates a {@link @microsoft/signalr.HubConnection} from the configuration options specified in this builder. - * - * @returns {HubConnection} The configured {@link @microsoft/signalr.HubConnection}. + /** Creates a {@link @microsoft/signalr.HubConnection} from the configuration options specified in this builder. + * + * @returns {HubConnection} The configured {@link @microsoft/signalr.HubConnection}. */ HubConnectionBuilder.prototype.build = function () { // If httpConnectionOptions has a logger, use it. Otherwise, override it with the one @@ -3479,9 +3479,9 @@ __webpack_require__.r(__webpack_exports__); // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // These values are designed to match the ASP.NET Log Levels since that's the pattern we're emulating here. -/** Indicates the severity of a log message. - * - * Log Levels are ordered in increasing severity. So `Debug` is more severe than `Trace`, etc. +/** Indicates the severity of a log message. + * + * Log Levels are ordered in increasing severity. So `Debug` is more severe than `Trace`, etc. */ var LogLevel; (function (LogLevel) { @@ -3575,10 +3575,10 @@ var JsonHubProtocol = /** @class */function () { /** @inheritDoc */ this.transferFormat = _ITransport__WEBPACK_IMPORTED_MODULE_2__.TransferFormat.Text; } - /** Creates an array of {@link @microsoft/signalr.HubMessage} objects from the specified serialized representation. - * - * @param {string} input A string containing the serialized representation. - * @param {ILogger} logger A logger that will be used to log messages that occur during parsing. + /** Creates an array of {@link @microsoft/signalr.HubMessage} objects from the specified serialized representation. + * + * @param {string} input A string containing the serialized representation. + * @param {ILogger} logger A logger that will be used to log messages that occur during parsing. */ JsonHubProtocol.prototype.parseMessages = function (input, logger) { // The interface does allow "ArrayBuffer" to be passed in, but this implementation does not. So let's throw a useful error. @@ -3625,10 +3625,10 @@ var JsonHubProtocol = /** @class */function () { } return hubMessages; }; - /** Writes the specified {@link @microsoft/signalr.HubMessage} to a string and returns it. - * - * @param {HubMessage} message The message to write. - * @returns {string} A string containing the serialized representation of the message. + /** Writes the specified {@link @microsoft/signalr.HubMessage} to a string and returns it. + * + * @param {HubMessage} message The message to write. + * @returns {string} A string containing the serialized representation of the message. */ JsonHubProtocol.prototype.writeMessage = function (message) { return _TextMessageFormat__WEBPACK_IMPORTED_MODULE_4__.TextMessageFormat.write(JSON.stringify(message)); @@ -16598,10 +16598,10 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; var version = "1.9.4"; - /* - * @namespace Util - * - * Various utility functions, used by Leaflet internally. + /* + * @namespace Util + * + * Various utility functions, used by Leaflet internally. */ // @function extend(dest: Object, src?: Object): Object @@ -16978,38 +16978,38 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; } } - /* - * @class Evented - * @aka L.Evented - * @inherits Class - * - * 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). - * - * @example - * - * ```js - * map.on('click', function(e) { - * alert(e.latlng); - * } ); - * ``` - * - * Leaflet deals with event listeners by reference, so if you want to add a listener and then remove it, define it as a function: - * - * ```js - * function onClick(e) { ... } - * - * map.on('click', onClick); - * map.off('click', onClick); - * ``` + /* + * @class Evented + * @aka L.Evented + * @inherits Class + * + * 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). + * + * @example + * + * ```js + * map.on('click', function(e) { + * alert(e.latlng); + * } ); + * ``` + * + * Leaflet deals with event listeners by reference, so if you want to add a listener and then remove it, define it as a function: + * + * ```js + * function onClick(e) { ... } + * + * map.on('click', onClick); + * map.off('click', onClick); + * ``` */ var Events = { - /* @method on(type: String, fn: Function, context?: Object): this - * 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'`). - * - * @alternative - * @method on(eventMap: Object): this - * Adds a set of type/listener pairs, e.g. `{click: onClick, mousemove: onMouseMove}` + /* @method on(type: String, fn: Function, context?: Object): this + * 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'`). + * + * @alternative + * @method on(eventMap: Object): this + * Adds a set of type/listener pairs, e.g. `{click: onClick, mousemove: onMouseMove}` */ on: function (types, fn, context) { // types can be a map of types/handlers @@ -17028,16 +17028,16 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; } return this; }, - /* @method off(type: String, fn?: Function, context?: Object): this - * 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. - * - * @alternative - * @method off(eventMap: Object): this - * Removes a set of type/listener pairs. - * - * @alternative - * @method off: this - * Removes all listeners to all events on the object. This includes implicitly attached events. + /* @method off(type: String, fn?: Function, context?: Object): this + * 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. + * + * @alternative + * @method off(eventMap: Object): this + * Removes a set of type/listener pairs. + * + * @alternative + * @method off: this + * Removes all listeners to all events on the object. This includes implicitly attached events. */ off: function (types, fn, context) { if (!arguments.length) { @@ -17284,28 +17284,28 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; Events.hasEventListeners = Events.listens; var Evented = Class.extend(Events); - /* - * @class Point - * @aka L.Point - * - * Represents a point with `x` and `y` coordinates in pixels. - * - * @example - * - * ```js - * var point = L.point(200, 300); - * ``` - * - * 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: - * - * ```js - * map.panBy([200, 300]); - * map.panBy(L.point(200, 300)); - * ``` - * - * Note that `Point` does not inherit from Leaflet's `Class` object, - * which means new classes can't inherit from it, and new methods - * can't be added to it with the `include` function. + /* + * @class Point + * @aka L.Point + * + * Represents a point with `x` and `y` coordinates in pixels. + * + * @example + * + * ```js + * var point = L.point(200, 300); + * ``` + * + * 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: + * + * ```js + * map.panBy([200, 300]); + * map.panBy(L.point(200, 300)); + * ``` + * + * Note that `Point` does not inherit from Leaflet's `Class` object, + * which means new classes can't inherit from it, and new methods + * can't be added to it with the `include` function. */ function Point(x, y, round) { @@ -17472,29 +17472,29 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; return new Point(x, y, round); } - /* - * @class Bounds - * @aka L.Bounds - * - * Represents a rectangular area in pixel coordinates. - * - * @example - * - * ```js - * var p1 = L.point(10, 10), - * p2 = L.point(40, 60), - * bounds = L.bounds(p1, p2); - * ``` - * - * 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: - * - * ```js - * otherBounds.intersects([[10, 10], [40, 60]]); - * ``` - * - * Note that `Bounds` does not inherit from Leaflet's `Class` object, - * which means new classes can't inherit from it, and new methods - * can't be added to it with the `include` function. + /* + * @class Bounds + * @aka L.Bounds + * + * Represents a rectangular area in pixel coordinates. + * + * @example + * + * ```js + * var p1 = L.point(10, 10), + * p2 = L.point(40, 60), + * bounds = L.bounds(p1, p2); + * ``` + * + * 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: + * + * ```js + * otherBounds.intersects([[10, 10], [40, 60]]); + * ``` + * + * Note that `Bounds` does not inherit from Leaflet's `Class` object, + * which means new classes can't inherit from it, and new methods + * can't be added to it with the `include` function. */ function Bounds(a, b) { @@ -17662,34 +17662,34 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; return new Bounds(a, b); } - /* - * @class LatLngBounds - * @aka L.LatLngBounds - * - * Represents a rectangular geographical area on a map. - * - * @example - * - * ```js - * var corner1 = L.latLng(40.712, -74.227), - * corner2 = L.latLng(40.774, -74.125), - * bounds = L.latLngBounds(corner1, corner2); - * ``` - * - * 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: - * - * ```js - * map.fitBounds([ - * [40.712, -74.227], - * [40.774, -74.125] - * ]); - * ``` - * - * 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. - * - * Note that `LatLngBounds` does not inherit from Leaflet's `Class` object, - * which means new classes can't inherit from it, and new methods - * can't be added to it with the `include` function. + /* + * @class LatLngBounds + * @aka L.LatLngBounds + * + * Represents a rectangular geographical area on a map. + * + * @example + * + * ```js + * var corner1 = L.latLng(40.712, -74.227), + * corner2 = L.latLng(40.774, -74.125), + * bounds = L.latLngBounds(corner1, corner2); + * ``` + * + * 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: + * + * ```js + * map.fitBounds([ + * [40.712, -74.227], + * [40.774, -74.125] + * ]); + * ``` + * + * 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. + * + * Note that `LatLngBounds` does not inherit from Leaflet's `Class` object, + * which means new classes can't inherit from it, and new methods + * can't be added to it with the `include` function. */ function LatLngBounds(corner1, corner2) { @@ -17878,29 +17878,29 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; return new LatLngBounds(a, b); } - /* @class LatLng - * @aka L.LatLng - * - * Represents a geographical point with a certain latitude and longitude. - * - * @example - * - * ``` - * var latlng = L.latLng(50.5, 30.5); - * ``` - * - * 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: - * - * ``` - * map.panTo([50, 30]); - * map.panTo({lon: 30, lat: 50}); - * map.panTo({lat: 50, lng: 30}); - * map.panTo(L.latLng(50, 30)); - * ``` - * - * Note that `LatLng` does not inherit from Leaflet's `Class` object, - * which means new classes can't inherit from it, and new methods - * can't be added to it with the `include` function. + /* @class LatLng + * @aka L.LatLng + * + * Represents a geographical point with a certain latitude and longitude. + * + * @example + * + * ``` + * var latlng = L.latLng(50.5, 30.5); + * ``` + * + * 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: + * + * ``` + * map.panTo([50, 30]); + * map.panTo({lon: 30, lat: 50}); + * map.panTo({lat: 50, lng: 30}); + * map.panTo(L.latLng(50, 30)); + * ``` + * + * Note that `LatLng` does not inherit from Leaflet's `Class` object, + * which means new classes can't inherit from it, and new methods + * can't be added to it with the `include` function. */ function LatLng(lat, lng, alt) { @@ -17996,21 +17996,21 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; return new LatLng(a, b, c); } - /* - * @namespace CRS - * @crs L.CRS.Base - * Object that defines coordinate reference systems for projecting - * geographical points into pixel (screen) coordinates and back (and to - * coordinates in other units for [WMS](https://en.wikipedia.org/wiki/Web_Map_Service) services). See - * [spatial reference system](https://en.wikipedia.org/wiki/Spatial_reference_system). - * - * Leaflet defines the most usual CRSs by default. If you want to use a - * CRS not defined by default, take a look at the - * [Proj4Leaflet](https://github.com/kartena/Proj4Leaflet) plugin. - * - * Note that the CRS instances do not inherit from Leaflet's `Class` object, - * and can't be instantiated. Also, new classes can't inherit from them, - * and methods can't be added to them with the `include` function. + /* + * @namespace CRS + * @crs L.CRS.Base + * Object that defines coordinate reference systems for projecting + * geographical points into pixel (screen) coordinates and back (and to + * coordinates in other units for [WMS](https://en.wikipedia.org/wiki/Web_Map_Service) services). See + * [spatial reference system](https://en.wikipedia.org/wiki/Spatial_reference_system). + * + * Leaflet defines the most usual CRSs by default. If you want to use a + * CRS not defined by default, take a look at the + * [Proj4Leaflet](https://github.com/kartena/Proj4Leaflet) plugin. + * + * Note that the CRS instances do not inherit from Leaflet's `Class` object, + * and can't be instantiated. Also, new classes can't inherit from them, + * and methods can't be added to them with the `include` function. */ var CRS = { @@ -18144,13 +18144,13 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; } }); - /* - * @namespace Projection - * @projection L.Projection.SphericalMercator - * - * Spherical Mercator projection — the most common projection for online maps, - * used by almost all free and commercial tile providers. Assumes that Earth is - * a sphere. Used by the `EPSG:3857` CRS. + /* + * @namespace Projection + * @projection L.Projection.SphericalMercator + * + * Spherical Mercator projection — the most common projection for online maps, + * used by almost all free and commercial tile providers. Assumes that Earth is + * a sphere. Used by the `EPSG:3857` CRS. */ var earthRadius = 6378137; @@ -18174,22 +18174,22 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; }() }; - /* - * @class Transformation - * @aka L.Transformation - * - * Represents an affine transformation: a set of coefficients `a`, `b`, `c`, `d` - * for transforming a point of a form `(x, y)` into `(a*x + b, c*y + d)` and doing - * the reverse. Used by Leaflet in its projections code. - * - * @example - * - * ```js - * var transformation = L.transformation(2, 5, -1, 10), - * p = L.point(1, 2), - * p2 = transformation.transform(p), // L.point(7, 8) - * p3 = transformation.untransform(p2); // L.point(1, 2) - * ``` + /* + * @class Transformation + * @aka L.Transformation + * + * Represents an affine transformation: a set of coefficients `a`, `b`, `c`, `d` + * for transforming a point of a form `(x, y)` into `(a*x + b, c*y + d)` and doing + * the reverse. Used by Leaflet in its projections code. + * + * @example + * + * ```js + * var transformation = L.transformation(2, 5, -1, 10), + * p = L.point(1, 2), + * p2 = transformation.transform(p), // L.point(7, 8) + * p3 = transformation.untransform(p2); // L.point(1, 2) + * ``` */ // factory new L.Transformation(a: Number, b: Number, c: Number, d: Number) @@ -18246,13 +18246,13 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; return new Transformation(a, b, c, d); } - /* - * @namespace CRS - * @crs L.CRS.EPSG3857 - * - * The most common CRS for online maps, used by almost all free and commercial - * tile providers. Uses Spherical Mercator projection. Set in by default in - * Map's `crs` option. + /* + * @namespace CRS + * @crs L.CRS.EPSG3857 + * + * The most common CRS for online maps, used by almost all free and commercial + * tile providers. Uses Spherical Mercator projection. Set in by default in + * Map's `crs` option. */ var EPSG3857 = extend({}, Earth, { @@ -18304,19 +18304,19 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; return str || 'M0 0'; } - /* - * @namespace Browser - * @aka L.Browser - * - * A namespace with static properties for browser/feature detection used by Leaflet internally. - * - * @example - * - * ```js - * if (L.Browser.ielt9) { - * alert('Upgrade your browser, dude!'); - * } - * ``` + /* + * @namespace Browser + * @aka L.Browser + * + * A namespace with static properties for browser/feature detection used by Leaflet internally. + * + * @example + * + * ```js + * if (L.Browser.ielt9) { + * alert('Upgrade your browser, dude!'); + * } + * ``` */ var style = document.documentElement.style; @@ -18600,11 +18600,11 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; _handlePointer(handler, e); } - /* - * Extends the event handling code with double tap support for mobile browsers. - * - * Note: currently most browsers fire native dblclick, with only a few exceptions - * (see https://github.com/Leaflet/Leaflet/issues/7012#issuecomment-595087386) + /* + * Extends the event handling code with double tap support for mobile browsers. + * + * Note: currently most browsers fire native dblclick, with only a few exceptions + * (see https://github.com/Leaflet/Leaflet/issues/7012#issuecomment-595087386) */ function makeDblclick(event) { @@ -18678,15 +18678,15 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; obj.removeEventListener('click', handlers.simDblclick); } - /* - * @namespace DomUtil - * - * Utility functions to work with the [DOM](https://developer.mozilla.org/docs/Web/API/Document_Object_Model) - * tree, used by Leaflet internally. - * - * Most functions expecting or returning a `HTMLElement` also work for - * SVG elements. The only difference is that classes refer to CSS classes - * in HTML and SVG classes in SVG. + /* + * @namespace DomUtil + * + * Utility functions to work with the [DOM](https://developer.mozilla.org/docs/Web/API/Document_Object_Model) + * tree, used by Leaflet internally. + * + * Most functions expecting or returning a `HTMLElement` also work for + * SVG elements. The only difference is that classes refer to CSS classes + * in HTML and SVG classes in SVG. */ // @property TRANSFORM: String @@ -19044,9 +19044,9 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; getScale: getScale }; - /* - * @namespace DomEvent - * Utility functions to work with the [DOM events](https://developer.mozilla.org/docs/Web/API/Event), used by Leaflet internally. + /* + * @namespace DomEvent + * Utility functions to work with the [DOM events](https://developer.mozilla.org/docs/Web/API/Event), used by Leaflet internally. */ // Inspired by John Resig, Dean Edwards and YUI addEvent implementations. @@ -19430,23 +19430,23 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; } }); - /* - * @class Map - * @aka L.Map - * @inherits Evented - * - * The central class of the API — it is used to create a map on a page and manipulate it. - * - * @example - * - * ```js - * // initialize the map on the "map" div with a given center and zoom - * var map = L.map('map', { - * center: [51.505, -0.09], - * zoom: 13 - * }); - * ``` - * + /* + * @class Map + * @aka L.Map + * @inherits Evented + * + * The central class of the API — it is used to create a map on a page and manipulate it. + * + * @example + * + * ```js + * // initialize the map on the "map" div with a given center and zoom + * var map = L.map('map', { + * center: [51.505, -0.09], + * zoom: 13 + * }); + * ``` + * */ var Map = Evented.extend({ @@ -20925,13 +20925,13 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; return new Map(id, options); } - /* - * @class Control - * @aka L.Control - * @inherits Class - * - * L.Control is a base class for implementing map controls. Handles positioning. - * All other controls extend from this class. + /* + * @class Control + * @aka L.Control + * @inherits Class + * + * L.Control is a base class for implementing map controls. Handles positioning. + * All other controls extend from this class. */ var Control = Class.extend({ @@ -20946,11 +20946,11 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; initialize: function (options) { setOptions(this, options); }, - /* @section - * Classes extending L.Control will inherit the following methods: - * - * @method getPosition: string - * Returns the position of the control. + /* @section + * Classes extending L.Control will inherit the following methods: + * + * @method getPosition: string + * Returns the position of the control. */ getPosition: function () { return this.options.position; @@ -21015,20 +21015,20 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; return new Control(options); }; - /* @section Extension methods - * @uninheritable - * - * Every control should extend from `L.Control` and (re-)implement the following methods. - * - * @method onAdd(map: Map): HTMLElement - * Should return the container DOM element for the control and add listeners on relevant map events. Called on [`control.addTo(map)`](#control-addTo). - * - * @method onRemove(map: Map) - * Optional method. Should contain all clean up code that removes the listeners previously added in [`onAdd`](#control-onadd). Called on [`control.remove()`](#control-remove). + /* @section Extension methods + * @uninheritable + * + * Every control should extend from `L.Control` and (re-)implement the following methods. + * + * @method onAdd(map: Map): HTMLElement + * Should return the container DOM element for the control and add listeners on relevant map events. Called on [`control.addTo(map)`](#control-addTo). + * + * @method onRemove(map: Map) + * Optional method. Should contain all clean up code that removes the listeners previously added in [`onAdd`](#control-onadd). Called on [`control.remove()`](#control-remove). */ - /* @namespace Map - * @section Methods for Layers and Controls + /* @namespace Map + * @section Methods for Layers and Controls */ Map.include({ // @method addControl(control: Control): this @@ -21066,43 +21066,43 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; } }); - /* - * @class Control.Layers - * @aka L.Control.Layers - * @inherits Control - * - * The layers control gives users the ability to switch between different base layers and switch overlays on/off (check out the [detailed example](https://leafletjs.com/examples/layers-control/)). Extends `Control`. - * - * @example - * - * ```js - * var baseLayers = { - * "Mapbox": mapbox, - * "OpenStreetMap": osm - * }; - * - * var overlays = { - * "Marker": marker, - * "Roads": roadsLayer - * }; - * - * L.control.layers(baseLayers, overlays).addTo(map); - * ``` - * - * The `baseLayers` and `overlays` parameters are object literals with layer names as keys and `Layer` objects as values: - * - * ```js - * { - * "": layer1, - * "": layer2 - * } - * ``` - * - * The layer names can contain HTML, which allows you to add additional styling to the items: - * - * ```js - * {" My Layer": myLayer} - * ``` + /* + * @class Control.Layers + * @aka L.Control.Layers + * @inherits Control + * + * The layers control gives users the ability to switch between different base layers and switch overlays on/off (check out the [detailed example](https://leafletjs.com/examples/layers-control/)). Extends `Control`. + * + * @example + * + * ```js + * var baseLayers = { + * "Mapbox": mapbox, + * "OpenStreetMap": osm + * }; + * + * var overlays = { + * "Marker": marker, + * "Roads": roadsLayer + * }; + * + * L.control.layers(baseLayers, overlays).addTo(map); + * ``` + * + * The `baseLayers` and `overlays` parameters are object literals with layer names as keys and `Layer` objects as values: + * + * ```js + * { + * "": layer1, + * "": layer2 + * } + * ``` + * + * The layer names can contain HTML, which allows you to add additional styling to the items: + * + * ```js + * {" My Layer": myLayer} + * ``` */ var Layers = Control.extend({ @@ -21434,12 +21434,12 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; return new Layers(baseLayers, overlays, options); }; - /* - * @class Control.Zoom - * @aka L.Control.Zoom - * @inherits Control - * - * 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`. + /* + * @class Control.Zoom + * @aka L.Control.Zoom + * @inherits Control + * + * 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`. */ var Zoom = Control.extend({ @@ -21499,8 +21499,8 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; link.href = '#'; link.title = title; - /* - * Will force screen readers like VoiceOver to read this as "Zoom in - button" + /* + * Will force screen readers like VoiceOver to read this as "Zoom in - button" */ link.setAttribute('role', 'button'); link.setAttribute('aria-label', title); @@ -21657,12 +21657,12 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; }; var ukrainianFlag = ''; - /* - * @class Control.Attribution - * @aka L.Control.Attribution - * @inherits Control - * - * 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. + /* + * @class Control.Attribution + * @aka L.Control.Attribution + * @inherits Control + * + * 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. */ var Attribution = Control.extend({ @@ -21843,20 +21843,20 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; Events: Events }; - /* - * @class Draggable - * @aka L.Draggable - * @inherits Evented - * - * A class for making DOM elements draggable (including touch support). - * Used internally for map and marker dragging. Only works for elements - * that were positioned with [`L.DomUtil.setPosition`](#domutil-setposition). - * - * @example - * ```js - * var draggable = new L.Draggable(elementToDrag); - * draggable.enable(); - * ``` + /* + * @class Draggable + * @aka L.Draggable + * @inherits Evented + * + * A class for making DOM elements draggable (including touch support). + * Used internally for map and marker dragging. Only works for elements + * that were positioned with [`L.DomUtil.setPosition`](#domutil-setposition). + * + * @example + * ```js + * var draggable = new L.Draggable(elementToDrag); + * draggable.enable(); + * ``` */ var START = Browser.touch ? 'touchstart mousedown' : 'mousedown'; @@ -22038,16 +22038,16 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; } }); - /* - * @namespace PolyUtil - * Various utility functions for polygon geometries. + /* + * @namespace PolyUtil + * Various utility functions for polygon geometries. */ - /* @function clipPolygon(points: Point[], bounds: Bounds, round?: Boolean): Point[] - * 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)). - * Used by Leaflet to only show polygon points that are on the screen or near, increasing - * performance. Note that polygon points needs different algorithm for clipping - * than polyline, so there's a separate method for it. + /* @function clipPolygon(points: Point[], bounds: Bounds, round?: Boolean): Point[] + * 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)). + * Used by Leaflet to only show polygon points that are on the screen or near, increasing + * performance. Note that polygon points needs different algorithm for clipping + * than polyline, so there's a separate method for it. */ function clipPolygon(points, bounds, round) { var clippedPoints, @@ -22094,8 +22094,8 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; return points; } - /* @function polygonCenter(latlngs: LatLng[], crs: CRS): LatLng - * Returns the center ([centroid](http://en.wikipedia.org/wiki/Centroid)) of the passed LatLngs (first ring) from a polygon. + /* @function polygonCenter(latlngs: LatLng[], crs: CRS): LatLng + * Returns the center ([centroid](http://en.wikipedia.org/wiki/Centroid)) of the passed LatLngs (first ring) from a polygon. */ function polygonCenter(latlngs, crs) { var i, j, p1, p2, f, area, x, y, center; @@ -22141,8 +22141,8 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; return toLatLng([latlngCenter.lat + centroidLatLng.lat, latlngCenter.lng + centroidLatLng.lng]); } - /* @function centroid(latlngs: LatLng[]): LatLng - * Returns the 'center of mass' of the passed LatLngs. + /* @function centroid(latlngs: LatLng[]): LatLng + * Returns the 'center of mass' of the passed LatLngs. */ function centroid(coords) { var latSum = 0; @@ -22163,10 +22163,10 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; centroid: centroid }; - /* - * @namespace LineUtil - * - * Various utility functions for polyline points processing, used by Leaflet internally to make polylines lightning-fast. + /* + * @namespace LineUtil + * + * Various utility functions for polyline points processing, used by Leaflet internally to make polylines lightning-fast. */ // Simplify polyline with vertex reduction and Douglas-Peucker simplification. @@ -22380,8 +22380,8 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; return isFlat(latlngs); } - /* @function polylineCenter(latlngs: LatLng[], crs: CRS): LatLng - * Returns the center ([centroid](http://en.wikipedia.org/wiki/Centroid)) of the passed LatLngs (first ring) from a polyline. + /* @function polylineCenter(latlngs: LatLng[], crs: CRS): LatLng + * Returns the center ([centroid](http://en.wikipedia.org/wiki/Centroid)) of the passed LatLngs (first ring) from a polyline. */ function polylineCenter(latlngs, crs) { var i, halfDist, segDist, dist, p1, p2, ratio, center; @@ -22443,17 +22443,17 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; polylineCenter: polylineCenter }; - /* - * @namespace Projection - * @section - * Leaflet comes with a set of already defined Projections out of the box: - * - * @projection L.Projection.LonLat - * - * Equirectangular, or Plate Carree projection — the most simple projection, - * mostly used by GIS enthusiasts. Directly maps `x` as longitude, and `y` as - * latitude. Also suitable for flat worlds, e.g. game maps. Used by the - * `EPSG:4326` and `Simple` CRS. + /* + * @namespace Projection + * @section + * Leaflet comes with a set of already defined Projections out of the box: + * + * @projection L.Projection.LonLat + * + * Equirectangular, or Plate Carree projection — the most simple projection, + * mostly used by GIS enthusiasts. Directly maps `x` as longitude, and `y` as + * latitude. Also suitable for flat worlds, e.g. game maps. Used by the + * `EPSG:4326` and `Simple` CRS. */ var LonLat = { @@ -22466,11 +22466,11 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; bounds: new Bounds([-180, -90], [180, 90]) }; - /* - * @namespace Projection - * @projection L.Projection.Mercator - * - * Elliptical Mercator projection — more complex than Spherical Mercator. Assumes that Earth is an ellipsoid. Used by the EPSG:3395 CRS. + /* + * @namespace Projection + * @projection L.Projection.Mercator + * + * Elliptical Mercator projection — more complex than Spherical Mercator. Assumes that Earth is an ellipsoid. Used by the EPSG:3395 CRS. */ var Mercator = { @@ -22529,11 +22529,11 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; SphericalMercator: SphericalMercator }; - /* - * @namespace CRS - * @crs L.CRS.EPSG3395 - * - * Rarely used by some commercial tile providers. Uses Elliptical Mercator projection. + /* + * @namespace CRS + * @crs L.CRS.EPSG3395 + * + * Rarely used by some commercial tile providers. Uses Elliptical Mercator projection. */ var EPSG3395 = extend({}, Earth, { code: 'EPSG:3395', @@ -22544,17 +22544,17 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; }() }); - /* - * @namespace CRS - * @crs L.CRS.EPSG4326 - * - * A common CRS among GIS enthusiasts. Uses simple Equirectangular projection. - * - * Leaflet 1.0.x complies with the [TMS coordinate scheme for EPSG:4326](https://wiki.osgeo.org/wiki/Tile_Map_Service_Specification#global-geodetic), - * which is a breaking change from 0.7.x behaviour. If you are using a `TileLayer` - * with this CRS, ensure that there are two 256x256 pixel tiles covering the - * whole earth at zoom level zero, and that the tile coordinate origin is (-180,+90), - * or (-180,-90) for `TileLayer`s with [the `tms` option](#tilelayer-tms) set. + /* + * @namespace CRS + * @crs L.CRS.EPSG4326 + * + * A common CRS among GIS enthusiasts. Uses simple Equirectangular projection. + * + * Leaflet 1.0.x complies with the [TMS coordinate scheme for EPSG:4326](https://wiki.osgeo.org/wiki/Tile_Map_Service_Specification#global-geodetic), + * which is a breaking change from 0.7.x behaviour. If you are using a `TileLayer` + * with this CRS, ensure that there are two 256x256 pixel tiles covering the + * whole earth at zoom level zero, and that the tile coordinate origin is (-180,+90), + * or (-180,-90) for `TileLayer`s with [the `tms` option](#tilelayer-tms) set. */ var EPSG4326 = extend({}, Earth, { @@ -22837,22 +22837,22 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; } }); - /* - * @class LayerGroup - * @aka L.LayerGroup - * @inherits Interactive layer - * - * Used to group several layers and handle them as one. If you add it to the map, - * any layers added or removed from the group will be added/removed on the map as - * well. Extends `Layer`. - * - * @example - * - * ```js - * L.layerGroup([marker1, marker2]) - * .addLayer(polyline) - * .addTo(map); - * ``` + /* + * @class LayerGroup + * @aka L.LayerGroup + * @inherits Interactive layer + * + * Used to group several layers and handle them as one. If you add it to the map, + * any layers added or removed from the group will be added/removed on the map as + * well. Extends `Layer`. + * + * @example + * + * ```js + * L.layerGroup([marker1, marker2]) + * .addLayer(polyline) + * .addTo(map); + * ``` */ var LayerGroup = Layer.extend({ @@ -22968,26 +22968,26 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; return new LayerGroup(layers, options); }; - /* - * @class FeatureGroup - * @aka L.FeatureGroup - * @inherits LayerGroup - * - * Extended `LayerGroup` that makes it easier to do the same thing to all its member layers: - * * [`bindPopup`](#layer-bindpopup) binds a popup to all of the layers at once (likewise with [`bindTooltip`](#layer-bindtooltip)) - * * Events are propagated to the `FeatureGroup`, so if the group has an event - * handler, it will handle events from any of the layers. This includes mouse events - * and custom events. - * * Has `layeradd` and `layerremove` events - * - * @example - * - * ```js - * L.featureGroup([marker1, marker2, polyline]) - * .bindPopup('Hello world!') - * .on('click', function() { alert('Clicked on a member of the group!'); }) - * .addTo(map); - * ``` + /* + * @class FeatureGroup + * @aka L.FeatureGroup + * @inherits LayerGroup + * + * Extended `LayerGroup` that makes it easier to do the same thing to all its member layers: + * * [`bindPopup`](#layer-bindpopup) binds a popup to all of the layers at once (likewise with [`bindTooltip`](#layer-bindtooltip)) + * * Events are propagated to the `FeatureGroup`, so if the group has an event + * handler, it will handle events from any of the layers. This includes mouse events + * and custom events. + * * Has `layeradd` and `layerremove` events + * + * @example + * + * ```js + * L.featureGroup([marker1, marker2, polyline]) + * .bindPopup('Hello world!') + * .on('click', function() { alert('Clicked on a member of the group!'); }) + * .addTo(map); + * ``` */ var FeatureGroup = LayerGroup.extend({ @@ -23053,73 +23053,73 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; return new FeatureGroup(layers, options); }; - /* - * @class Icon - * @aka L.Icon - * - * Represents an icon to provide when creating a marker. - * - * @example - * - * ```js - * var myIcon = L.icon({ - * iconUrl: 'my-icon.png', - * iconRetinaUrl: 'my-icon@2x.png', - * iconSize: [38, 95], - * iconAnchor: [22, 94], - * popupAnchor: [-3, -76], - * shadowUrl: 'my-icon-shadow.png', - * shadowRetinaUrl: 'my-icon-shadow@2x.png', - * shadowSize: [68, 95], - * shadowAnchor: [22, 94] - * }); - * - * L.marker([50.505, 30.57], {icon: myIcon}).addTo(map); - * ``` - * - * `L.Icon.Default` extends `L.Icon` and is the blue icon Leaflet uses for markers by default. - * + /* + * @class Icon + * @aka L.Icon + * + * Represents an icon to provide when creating a marker. + * + * @example + * + * ```js + * var myIcon = L.icon({ + * iconUrl: 'my-icon.png', + * iconRetinaUrl: 'my-icon@2x.png', + * iconSize: [38, 95], + * iconAnchor: [22, 94], + * popupAnchor: [-3, -76], + * shadowUrl: 'my-icon-shadow.png', + * shadowRetinaUrl: 'my-icon-shadow@2x.png', + * shadowSize: [68, 95], + * shadowAnchor: [22, 94] + * }); + * + * L.marker([50.505, 30.57], {icon: myIcon}).addTo(map); + * ``` + * + * `L.Icon.Default` extends `L.Icon` and is the blue icon Leaflet uses for markers by default. + * */ var Icon = Class.extend({ - /* @section - * @aka Icon options - * - * @option iconUrl: String = null - * **(required)** The URL to the icon image (absolute or relative to your script path). - * - * @option iconRetinaUrl: String = null - * The URL to a retina sized version of the icon image (absolute or relative to your - * script path). Used for Retina screen devices. - * - * @option iconSize: Point = null - * Size of the icon image in pixels. - * - * @option iconAnchor: Point = null - * The coordinates of the "tip" of the icon (relative to its top left corner). The icon - * will be aligned so that this point is at the marker's geographical location. Centered - * by default if size is specified, also can be set in CSS with negative margins. - * - * @option popupAnchor: Point = [0, 0] - * The coordinates of the point from which popups will "open", relative to the icon anchor. - * - * @option tooltipAnchor: Point = [0, 0] - * The coordinates of the point from which tooltips will "open", relative to the icon anchor. - * - * @option shadowUrl: String = null - * The URL to the icon shadow image. If not specified, no shadow image will be created. - * - * @option shadowRetinaUrl: String = null - * - * @option shadowSize: Point = null - * Size of the shadow image in pixels. - * - * @option shadowAnchor: Point = null - * The coordinates of the "tip" of the shadow (relative to its top left corner) (the same - * as iconAnchor if not specified). - * - * @option className: String = '' - * A custom class name to assign to both icon and shadow images. Empty by default. + /* @section + * @aka Icon options + * + * @option iconUrl: String = null + * **(required)** The URL to the icon image (absolute or relative to your script path). + * + * @option iconRetinaUrl: String = null + * The URL to a retina sized version of the icon image (absolute or relative to your + * script path). Used for Retina screen devices. + * + * @option iconSize: Point = null + * Size of the icon image in pixels. + * + * @option iconAnchor: Point = null + * The coordinates of the "tip" of the icon (relative to its top left corner). The icon + * will be aligned so that this point is at the marker's geographical location. Centered + * by default if size is specified, also can be set in CSS with negative margins. + * + * @option popupAnchor: Point = [0, 0] + * The coordinates of the point from which popups will "open", relative to the icon anchor. + * + * @option tooltipAnchor: Point = [0, 0] + * The coordinates of the point from which tooltips will "open", relative to the icon anchor. + * + * @option shadowUrl: String = null + * The URL to the icon shadow image. If not specified, no shadow image will be created. + * + * @option shadowRetinaUrl: String = null + * + * @option shadowSize: Point = null + * Size of the shadow image in pixels. + * + * @option shadowAnchor: Point = null + * The coordinates of the "tip" of the shadow (relative to its top left corner) (the same + * as iconAnchor if not specified). + * + * @option className: String = '' + * A custom class name to assign to both icon and shadow images. Empty by default. */ options: { @@ -23380,17 +23380,17 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; } }); - /* - * @class Marker - * @inherits Interactive layer - * @aka L.Marker - * L.Marker is used to display clickable/draggable icons on the map. Extends `Layer`. - * - * @example - * - * ```js - * L.marker([50.5, 30.5]).addTo(map); - * ``` + /* + * @class Marker + * @inherits Interactive layer + * @aka L.Marker + * L.Marker is used to display clickable/draggable icons on the map. Extends `Layer`. + * + * @example + * + * ```js + * L.marker([50.5, 30.5]).addTo(map); + * ``` */ var Marker = Layer.extend({ @@ -23457,9 +23457,9 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; // Number of pixels the map should pan by. autoPanSpeed: 10 }, - /* @section - * - * In addition to [shared layer methods](#Layer) like `addTo()` and `remove()` and [popup methods](#Popup) like bindPopup() you can also use the following methods: + /* @section + * + * In addition to [shared layer methods](#Layer) like `addTo()` and `remove()` and [popup methods](#Popup) like bindPopup() you can also use the following methods: */ initialize: function (latlng, options) { @@ -24435,76 +24435,76 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; return new Polygon(latlngs, options); } - /* - * @class GeoJSON - * @aka L.GeoJSON - * @inherits FeatureGroup - * - * Represents a GeoJSON object or an array of GeoJSON objects. Allows you to parse - * GeoJSON data and display it on the map. Extends `FeatureGroup`. - * - * @example - * - * ```js - * L.geoJSON(data, { - * style: function (feature) { - * return {color: feature.properties.color}; - * } - * }).bindPopup(function (layer) { - * return layer.feature.properties.description; - * }).addTo(map); - * ``` + /* + * @class GeoJSON + * @aka L.GeoJSON + * @inherits FeatureGroup + * + * Represents a GeoJSON object or an array of GeoJSON objects. Allows you to parse + * GeoJSON data and display it on the map. Extends `FeatureGroup`. + * + * @example + * + * ```js + * L.geoJSON(data, { + * style: function (feature) { + * return {color: feature.properties.color}; + * } + * }).bindPopup(function (layer) { + * return layer.feature.properties.description; + * }).addTo(map); + * ``` */ var GeoJSON = FeatureGroup.extend({ - /* @section - * @aka GeoJSON options - * - * @option pointToLayer: Function = * - * A `Function` defining how GeoJSON points spawn Leaflet layers. It is internally - * called when data is added, passing the GeoJSON point feature and its `LatLng`. - * The default is to spawn a default `Marker`: - * ```js - * function(geoJsonPoint, latlng) { - * return L.marker(latlng); - * } - * ``` - * - * @option style: Function = * - * A `Function` defining the `Path options` for styling GeoJSON lines and polygons, - * called internally when data is added. - * The default value is to not override any defaults: - * ```js - * function (geoJsonFeature) { - * return {} - * } - * ``` - * - * @option onEachFeature: Function = * - * A `Function` that will be called once for each created `Feature`, after it has - * been created and styled. Useful for attaching events and popups to features. - * The default is to do nothing with the newly created layers: - * ```js - * function (feature, layer) {} - * ``` - * - * @option filter: Function = * - * A `Function` that will be used to decide whether to include a feature or not. - * The default is to include all features: - * ```js - * function (geoJsonFeature) { - * return true; - * } - * ``` - * Note: dynamically changing the `filter` option will have effect only on newly - * added data. It will _not_ re-evaluate already included features. - * - * @option coordsToLatLng: Function = * - * A `Function` that will be used for converting GeoJSON coordinates to `LatLng`s. - * The default is the `coordsToLatLng` static method. - * - * @option markersInheritOptions: Boolean = false - * Whether default Markers for "Point" type Features inherit from group options. + /* @section + * @aka GeoJSON options + * + * @option pointToLayer: Function = * + * A `Function` defining how GeoJSON points spawn Leaflet layers. It is internally + * called when data is added, passing the GeoJSON point feature and its `LatLng`. + * The default is to spawn a default `Marker`: + * ```js + * function(geoJsonPoint, latlng) { + * return L.marker(latlng); + * } + * ``` + * + * @option style: Function = * + * A `Function` defining the `Path options` for styling GeoJSON lines and polygons, + * called internally when data is added. + * The default value is to not override any defaults: + * ```js + * function (geoJsonFeature) { + * return {} + * } + * ``` + * + * @option onEachFeature: Function = * + * A `Function` that will be called once for each created `Feature`, after it has + * been created and styled. Useful for attaching events and popups to features. + * The default is to do nothing with the newly created layers: + * ```js + * function (feature, layer) {} + * ``` + * + * @option filter: Function = * + * A `Function` that will be used to decide whether to include a feature or not. + * The default is to include all features: + * ```js + * function (geoJsonFeature) { + * return true; + * } + * ``` + * Note: dynamically changing the `filter` option will have effect only on newly + * added data. It will _not_ re-evaluate already included features. + * + * @option coordsToLatLng: Function = * + * A `Function` that will be used for converting GeoJSON coordinates to `LatLng`s. + * The default is the `coordsToLatLng` static method. + * + * @option markersInheritOptions: Boolean = false + * Whether default Markers for "Point" type Features inherit from group options. */ initialize: function (geojson, options) { @@ -24823,20 +24823,20 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; // Backward compatibility. var geoJson = geoJSON; - /* - * @class ImageOverlay - * @aka L.ImageOverlay - * @inherits Interactive layer - * - * Used to load and display a single image over specific bounds of the map. Extends `Layer`. - * - * @example - * - * ```js - * var imageUrl = 'https://maps.lib.utexas.edu/maps/historical/newark_nj_1922.jpg', - * imageBounds = [[40.712216, -74.22655], [40.773941, -74.12544]]; - * L.imageOverlay(imageUrl, imageBounds).addTo(map); - * ``` + /* + * @class ImageOverlay + * @aka L.ImageOverlay + * @inherits Interactive layer + * + * Used to load and display a single image over specific bounds of the map. Extends `Layer`. + * + * @example + * + * ```js + * var imageUrl = 'https://maps.lib.utexas.edu/maps/historical/newark_nj_1922.jpg', + * imageBounds = [[40.712216, -74.22655], [40.773941, -74.12544]]; + * L.imageOverlay(imageUrl, imageBounds).addTo(map); + * ``` */ var ImageOverlay = Layer.extend({ @@ -25045,23 +25045,23 @@ n.prototype = new Error(), n.prototype.name = "InvalidTokenError"; return new ImageOverlay(url, bounds, options); }; - /* - * @class VideoOverlay - * @aka L.VideoOverlay - * @inherits ImageOverlay - * - * Used to load and display a video player over specific bounds of the map. Extends `ImageOverlay`. - * - * A video overlay uses the [`