├── .github └── workflows │ └── tests.yml ├── .gitignore ├── BSD-LICENSE ├── CONTRIBUTING.md ├── README.md ├── leaflet-osm.js ├── package-lock.json ├── package.json └── test ├── fixtures ├── area.json ├── area.xml ├── changeset.json ├── changeset.xml ├── node.json ├── node.xml ├── way.json └── way.xml └── osm_test.js /.github/workflows/tests.yml: -------------------------------------------------------------------------------- 1 | name: Tests 2 | 3 | on: 4 | - push 5 | - pull_request 6 | 7 | jobs: 8 | test: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@v4 12 | - uses: actions/setup-node@v4 13 | with: 14 | cache: 'npm' 15 | - run: npm ci 16 | - run: npm test 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /BSD-LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2012, John Firebaugh 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation and/or 12 | other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS 15 | OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 16 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 17 | SHALL COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 19 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 21 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 22 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 23 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | 25 | 26 | Portions derived from OpenLayers, Copyright 2005-2012 OpenLayers Contributors. 27 | All rights reserved. See authors.txt for full list. 28 | 29 | Redistribution and use in source and binary forms, with or without modification, 30 | are permitted provided that the following conditions are met: 31 | 32 | 1. Redistributions of source code must retain the above copyright notice, this 33 | list of conditions and the following disclaimer. 34 | 35 | 2. Redistributions in binary form must reproduce the above copyright notice, 36 | this list of conditions and the following disclaimer in the documentation and/or 37 | other materials provided with the distribution. 38 | 39 | THIS SOFTWARE IS PROVIDED BY OPENLAYERS CONTRIBUTORS ``AS IS'' AND ANY EXPRESS 40 | OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 41 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 42 | SHALL COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 43 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 44 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 45 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 46 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 47 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 48 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | 50 | The views and conclusions contained in the software and documentation are those 51 | of the authors and should not be interpreted as representing official policies, 52 | either expressed or implied, of OpenLayers Contributors. 53 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Hi, and thanks for your interest in contributing to leaflet-osm. 2 | 3 | To run the leaflet-osm tests: 4 | 5 | ``` 6 | $ npm install 7 | $ npm test 8 | ``` 9 | 10 | Add tests for bugfixes and new features to `test/osm_test.js`. It uses [mocha](http://visionmedia.github.io/mocha/) 11 | and [chai](http://chaijs.com/). 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | leaflet-osm is a [Leaflet](http://leaflet.cloudmade.com/) plugin for rendering 2 | tile and vector data from openstreetmap.org. 3 | 4 | For example, the openstreetmap.org website could use it to highlight a particular 5 | [way](http://www.openstreetmap.org/?way=52477381) or [node](http://www.openstreetmap.org/?node=164979149) 6 | on the base map. 7 | 8 | ## Usage Examples 9 | 10 | ### Tile Layers 11 | 12 | ```js 13 | new L.OSM.Mapnik().addTo(map); 14 | 15 | // L.OSM.CycleMap and L.OSM.TransportMap require an API key: 16 | // http://www.thunderforest.com/blog/apikeys-now-available/ 17 | new L.OSM.CycleMap({apikey: '...'}).addTo(map); 18 | new L.OSM.TransportMap({apikey: '...'}).addTo(map); 19 | ``` 20 | 21 | ### Data Layer 22 | 23 | ```js 24 | $.ajax({ 25 | url: "http://www.openstreetmap.org/api/0.6/node/164979149", 26 | // or "http://www.openstreetmap.org/api/0.6/way/52477381/full" 27 | dataType: "xml", 28 | success: function (xml) { 29 | var layer = new L.OSM.DataLayer(xml).addTo(map); 30 | map.fitBounds(layer.getBounds()); 31 | } 32 | }); 33 | ``` 34 | 35 | ## Contributing 36 | 37 | leaflet-osm is tested with node.js using [mocha](http://mochajs.org/) and [chai](http://chaijs.com/): 38 | 39 | ```bash 40 | $ npm install 41 | $ npm test 42 | ``` 43 | 44 | ## License 45 | 46 | Copyright 2012 John Firebaugh 47 | 48 | BSD License (see the BSD-LICENSE file) 49 | 50 | Portions derived from [OpenLayers](https://github.com/openlayers/openlayers/blob/master/lib/OpenLayers/Format/OSM.js). 51 | See BSD-LICENSE for details. 52 | -------------------------------------------------------------------------------- /leaflet-osm.js: -------------------------------------------------------------------------------- 1 | L.OSM = {}; 2 | 3 | L.OSM.TileLayer = L.TileLayer.extend({ 4 | options: { 5 | url: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png', 6 | attribution: '© OpenStreetMap contributors' 7 | }, 8 | 9 | initialize: function (options) { 10 | options = L.Util.setOptions(this, options); 11 | L.TileLayer.prototype.initialize.call(this, options.url); 12 | } 13 | }); 14 | 15 | L.OSM.Mapnik = L.OSM.TileLayer.extend({ 16 | options: { 17 | url: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png', 18 | maxZoom: 19 19 | } 20 | }); 21 | 22 | L.OSM.CyclOSM = L.OSM.TileLayer.extend({ 23 | options: { 24 | url: 'https://{s}.tile-cyclosm.openstreetmap.fr/cyclosm/{z}/{x}/{y}.png', 25 | maxZoom: 20, 26 | subdomains: 'abc', 27 | attribution: '© OpenStreetMap contributors. Tiles courtesy of OpenStreetMap France' 28 | } 29 | }); 30 | 31 | L.OSM.CycleMap = L.OSM.TileLayer.extend({ 32 | options: { 33 | url: 'https://{s}.tile.thunderforest.com/cycle/{z}/{x}/{y}{r}.png?apikey={apikey}', 34 | maxZoom: 21, 35 | attribution: '© OpenStreetMap contributors. Tiles courtesy of Andy Allan' 36 | } 37 | }); 38 | 39 | L.OSM.TransportMap = L.OSM.TileLayer.extend({ 40 | options: { 41 | url: 'https://{s}.tile.thunderforest.com/transport/{z}/{x}/{y}{r}.png?apikey={apikey}', 42 | maxZoom: 21, 43 | attribution: '© OpenStreetMap contributors. Tiles courtesy of Andy Allan' 44 | } 45 | }); 46 | 47 | L.OSM.TransportDarkMap = L.OSM.TileLayer.extend({ 48 | options: { 49 | url: 'https://{s}.tile.thunderforest.com/transport-dark/{z}/{x}/{y}{r}.png?apikey={apikey}', 50 | maxZoom: 21, 51 | attribution: '© OpenStreetMap contributors. Tiles courtesy of Andy Allan' 52 | } 53 | }); 54 | 55 | L.OSM.OPNVKarte = L.OSM.TileLayer.extend({ 56 | options: { 57 | url: 'https://tileserver.memomaps.de/tilegen/{z}/{x}/{y}.png', 58 | maxZoom: 18, 59 | attribution: '© OpenStreetMap contributors. Tiles courtesy of MeMoMaps' 60 | } 61 | }); 62 | 63 | L.OSM.HOT = L.OSM.TileLayer.extend({ 64 | options: { 65 | url: 'https://tile-{s}.openstreetmap.fr/hot/{z}/{x}/{y}.png', 66 | maxZoom: 20, 67 | subdomains: 'abc', 68 | attribution: '© OpenStreetMap contributors. Tiles courtesy of Humanitarian OpenStreetMap Team' 69 | } 70 | }); 71 | 72 | L.OSM.TracestrackTopo = L.OSM.TileLayer.extend({ 73 | options: { 74 | url: 'https://tile.tracestrack.com/topo__/{z}/{x}/{y}.webp?key={apikey}', 75 | maxZoom: 19, 76 | attribution: '© OpenStreetMap contributors. Tiles courtesy of Tracestrack Maps' 77 | } 78 | }); 79 | 80 | L.OSM.GPS = L.OSM.TileLayer.extend({ 81 | options: { 82 | url: 'https://gps.tile.openstreetmap.org/lines/{z}/{x}/{y}.png', 83 | maxZoom: 21, 84 | maxNativeZoom: 20, 85 | subdomains: 'abc' 86 | } 87 | }); 88 | 89 | L.OSM.DataLayer = L.FeatureGroup.extend({ 90 | options: { 91 | areaTags: ['area', 'building', 'leisure', 'tourism', 'ruins', 'historic', 'landuse', 'military', 'natural', 'sport'], 92 | uninterestingTags: ['source', 'source_ref', 'source:ref', 'history', 'attribution', 'created_by', 'tiger:county', 'tiger:tlid', 'tiger:upload_uuid'], 93 | styles: {}, 94 | asynchronous: false, 95 | }, 96 | 97 | initialize: function (xml, options) { 98 | L.Util.setOptions(this, options); 99 | 100 | L.FeatureGroup.prototype.initialize.call(this); 101 | 102 | if (xml) { 103 | this.addData(xml); 104 | } 105 | }, 106 | 107 | loadingLayers: [], 108 | 109 | cancelLoading: function () { 110 | this.loadingLayers.forEach(layer => clearTimeout(layer)); 111 | this.loadingLayers = []; 112 | }, 113 | 114 | addData: function (features) { 115 | if (!(features instanceof Array)) { 116 | features = this.buildFeatures(features); 117 | } 118 | 119 | for (var i = 0; i < features.length; i++) { 120 | let feature = features[i], layer; 121 | 122 | if (feature.type === "changeset") { 123 | layer = L.rectangle(feature.latLngBounds, this.options.styles.changeset); 124 | } else if (feature.type === "node") { 125 | layer = L.circleMarker(feature.latLng, this.options.styles.node); 126 | } else { 127 | var latLngs = new Array(feature.nodes.length); 128 | 129 | for (var j = 0; j < feature.nodes.length; j++) { 130 | latLngs[j] = feature.nodes[j].latLng; 131 | } 132 | 133 | if (this.isWayArea(feature)) { 134 | latLngs.pop(); // Remove last == first. 135 | layer = L.polygon(latLngs, this.options.styles.area); 136 | } else { 137 | layer = L.polyline(latLngs, this.options.styles.way); 138 | } 139 | } 140 | 141 | if (this.options.asynchronous) { 142 | setTimeout(() => layer.addTo(this)); 143 | } else { 144 | layer.addTo(this); 145 | } 146 | 147 | layer.feature = feature; 148 | } 149 | }, 150 | 151 | buildFeatures: function (data) { 152 | 153 | const parser = data instanceof Document ? L.OSM.XMLParser : L.OSM.JSONParser; 154 | 155 | var features = parser.getChangesets(data), 156 | nodes = parser.getNodes(data), 157 | ways = parser.getWays(data, nodes), 158 | relations = parser.getRelations(data, nodes, ways); 159 | 160 | var wayNodes = {} 161 | for (var i = 0; i < ways.length; i++) { 162 | var way = ways[i]; 163 | for (var j = 0; j < way.nodes.length; j++) { 164 | wayNodes[way.nodes[j].id] = true 165 | } 166 | } 167 | 168 | var relationNodes = {} 169 | for (var i = 0; i < relations.length; i++){ 170 | var relation = relations[i]; 171 | for (var j = 0; j < relation.members.length; j++) { 172 | relationNodes[relation.members[j].id] = true 173 | } 174 | } 175 | 176 | for (var node_id in nodes) { 177 | var node = nodes[node_id]; 178 | if (this.interestingNode(node, wayNodes, relationNodes)) { 179 | features.push(node); 180 | } 181 | } 182 | 183 | for (var i = 0; i < ways.length; i++) { 184 | var way = ways[i]; 185 | features.push(way); 186 | } 187 | 188 | return features; 189 | }, 190 | 191 | isWayArea: function (way) { 192 | if (way.nodes[0] != way.nodes[way.nodes.length - 1]) { 193 | return false; 194 | } 195 | 196 | for (var key in way.tags) { 197 | if (~this.options.areaTags.indexOf(key)) { 198 | return true; 199 | } 200 | } 201 | 202 | return false; 203 | }, 204 | 205 | interestingNode: function (node, wayNodes, relationNodes) { 206 | if (!wayNodes[node.id] || relationNodes[node.id]) { 207 | return true 208 | } 209 | 210 | for (var key in node.tags) { 211 | if (this.options.uninterestingTags.indexOf(key) < 0) { 212 | return true; 213 | } 214 | } 215 | 216 | return false; 217 | }, 218 | 219 | onRemove: function(map) { 220 | this.eachLayer(map.removeLayer, map, this.options.asynchronous); 221 | }, 222 | 223 | onAdd: function(map) { 224 | this.eachLayer(map.addLayer, map, this.options.asynchronous); 225 | }, 226 | 227 | eachLayer: function (method, context, asynchronous = false) { 228 | for (let i in this._layers) { 229 | if (asynchronous) { 230 | this.loadingLayers.push( 231 | setTimeout(() => { 232 | method.call(context, this._layers[i]); 233 | }) 234 | ); 235 | } else { 236 | method.call(context, this._layers[i]); 237 | } 238 | } 239 | return this; 240 | }, 241 | }); 242 | 243 | L.OSM.XMLParser = { 244 | getChangesets(xml) { 245 | const changesets = [...xml.getElementsByTagName("changeset")]; 246 | return changesets.map(cs => ({ 247 | id: String(cs.getAttribute("id")), 248 | type: "changeset", 249 | latLngBounds: L.latLngBounds( 250 | [cs.getAttribute("min_lat"), cs.getAttribute("min_lon")], 251 | [cs.getAttribute("max_lat"), cs.getAttribute("max_lon")] 252 | ), 253 | tags: this.getTags(cs) 254 | })); 255 | }, 256 | 257 | getNodes(xml) { 258 | const result = {}; 259 | const nodes = [...xml.getElementsByTagName("node")]; 260 | 261 | for (const node of nodes) { 262 | const id = node.getAttribute("id"); 263 | result[id] = { 264 | id: String(id), 265 | type: "node", 266 | latLng: L.latLng( 267 | node.getAttribute("lat"), 268 | node.getAttribute("lon"), 269 | true 270 | ), 271 | tags: this.getTags(node) 272 | }; 273 | } 274 | 275 | return result; 276 | }, 277 | 278 | getWays(xml, nodes) { 279 | const ways = [...xml.getElementsByTagName("way")]; 280 | return ways.map(way => { 281 | const nds = [...way.getElementsByTagName("nd")]; 282 | return { 283 | id: String(way.getAttribute("id")), 284 | type: "way", 285 | nodes: nds.map(nd => nodes[nd.getAttribute("ref")]), 286 | tags: this.getTags(way) 287 | }; 288 | }); 289 | }, 290 | 291 | getRelations(xml, nodes, ways) { 292 | const rels = [...xml.getElementsByTagName("relation")]; 293 | return rels.map(rel => { 294 | const members = [...rel.getElementsByTagName("member")]; 295 | return { 296 | id: String(rel.getAttribute("id")), 297 | type: "relation", 298 | members: members // relation-way and relation-relation membership not implemented 299 | .map(member => member.getAttribute("type") === "node" ? nodes[member.getAttribute("ref")] : null) 300 | .filter(Boolean), // filter out null and undefined 301 | tags: this.getTags(rel) 302 | }; 303 | }); 304 | }, 305 | 306 | getTags(xml) { 307 | const result = {}; 308 | const tags = [...xml.getElementsByTagName("tag")]; 309 | 310 | for (const tag of tags) { 311 | result[tag.getAttribute("k")] = tag.getAttribute("v"); 312 | } 313 | 314 | return result; 315 | } 316 | } 317 | 318 | L.OSM.JSONParser = { 319 | getChangesets(json) { 320 | const changesets = json.changeset ? [json.changeset] : []; 321 | 322 | return changesets.map(cs => ({ 323 | id: String(cs.id), 324 | type: "changeset", 325 | latLngBounds: L.latLngBounds( 326 | [cs.min_lat, cs.min_lon], 327 | [cs.max_lat, cs.max_lon] 328 | ), 329 | tags: this.getTags(cs) 330 | })); 331 | }, 332 | 333 | getNodes(json) { 334 | const nodes = json.elements?.filter(el => el.type === "node") ?? []; 335 | let result = {}; 336 | 337 | for (const node of nodes) { 338 | result[node.id] = { 339 | id: String(node.id), 340 | type: "node", 341 | latLng: L.latLng(node.lat, node.lon, true), 342 | tags: this.getTags(node) 343 | }; 344 | } 345 | 346 | return result; 347 | }, 348 | 349 | getWays(json, nodes) { 350 | const ways = json.elements?.filter(el => el.type === "way") ?? []; 351 | 352 | return ways.map(way => ({ 353 | id: String(way.id), 354 | type: "way", 355 | nodes: way.nodes.map(nodeId => nodes[nodeId]), 356 | tags: this.getTags(way) 357 | })); 358 | }, 359 | 360 | getRelations(json, nodes, ways) { 361 | const relations = json.elements?.filter(el => el.type === "relation") ?? []; 362 | 363 | return relations.map(rel => ({ 364 | id: String(rel.id), 365 | type: "relation", 366 | members: (rel.members ?? []) // relation-way and relation-relation membership not implemented 367 | .map(member => member.type === "node" ? nodes[member.ref] : null) 368 | .filter(Boolean), // filter out null and undefined 369 | tags: this.getTags(rel) 370 | })); 371 | }, 372 | 373 | getTags(json) { 374 | return json.tags ?? {}; 375 | } 376 | }; 377 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "leaflet-osm", 3 | "version": "0.1.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "leaflet-osm", 9 | "version": "0.1.0", 10 | "dependencies": { 11 | "leaflet": "0.6" 12 | }, 13 | "devDependencies": { 14 | "chai": "^4.2.0", 15 | "jsdom": "^16.2.2", 16 | "jsdom-global": "^3.0.2", 17 | "mocha": "^10.7.3" 18 | } 19 | }, 20 | "node_modules/@tootallnate/once": { 21 | "version": "1.1.2", 22 | "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", 23 | "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", 24 | "dev": true, 25 | "engines": { 26 | "node": ">= 6" 27 | } 28 | }, 29 | "node_modules/abab": { 30 | "version": "2.0.6", 31 | "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", 32 | "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", 33 | "deprecated": "Use your platform's native atob() and btoa() methods instead", 34 | "dev": true 35 | }, 36 | "node_modules/acorn": { 37 | "version": "8.11.3", 38 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", 39 | "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", 40 | "dev": true, 41 | "bin": { 42 | "acorn": "bin/acorn" 43 | }, 44 | "engines": { 45 | "node": ">=0.4.0" 46 | } 47 | }, 48 | "node_modules/acorn-globals": { 49 | "version": "6.0.0", 50 | "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz", 51 | "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==", 52 | "dev": true, 53 | "dependencies": { 54 | "acorn": "^7.1.1", 55 | "acorn-walk": "^7.1.1" 56 | } 57 | }, 58 | "node_modules/acorn-globals/node_modules/acorn": { 59 | "version": "7.4.1", 60 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", 61 | "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", 62 | "dev": true, 63 | "bin": { 64 | "acorn": "bin/acorn" 65 | }, 66 | "engines": { 67 | "node": ">=0.4.0" 68 | } 69 | }, 70 | "node_modules/acorn-walk": { 71 | "version": "7.2.0", 72 | "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", 73 | "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", 74 | "dev": true, 75 | "engines": { 76 | "node": ">=0.4.0" 77 | } 78 | }, 79 | "node_modules/agent-base": { 80 | "version": "6.0.2", 81 | "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", 82 | "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", 83 | "dev": true, 84 | "dependencies": { 85 | "debug": "4" 86 | }, 87 | "engines": { 88 | "node": ">= 6.0.0" 89 | } 90 | }, 91 | "node_modules/ansi-colors": { 92 | "version": "4.1.3", 93 | "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", 94 | "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", 95 | "dev": true, 96 | "engines": { 97 | "node": ">=6" 98 | } 99 | }, 100 | "node_modules/ansi-regex": { 101 | "version": "5.0.1", 102 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", 103 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", 104 | "dev": true, 105 | "engines": { 106 | "node": ">=8" 107 | } 108 | }, 109 | "node_modules/ansi-styles": { 110 | "version": "4.3.0", 111 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 112 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 113 | "dev": true, 114 | "dependencies": { 115 | "color-convert": "^2.0.1" 116 | }, 117 | "engines": { 118 | "node": ">=8" 119 | }, 120 | "funding": { 121 | "url": "https://github.com/chalk/ansi-styles?sponsor=1" 122 | } 123 | }, 124 | "node_modules/anymatch": { 125 | "version": "3.1.3", 126 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", 127 | "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", 128 | "dev": true, 129 | "dependencies": { 130 | "normalize-path": "^3.0.0", 131 | "picomatch": "^2.0.4" 132 | }, 133 | "engines": { 134 | "node": ">= 8" 135 | } 136 | }, 137 | "node_modules/argparse": { 138 | "version": "2.0.1", 139 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", 140 | "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", 141 | "dev": true 142 | }, 143 | "node_modules/assertion-error": { 144 | "version": "1.1.0", 145 | "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", 146 | "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", 147 | "dev": true, 148 | "engines": { 149 | "node": "*" 150 | } 151 | }, 152 | "node_modules/asynckit": { 153 | "version": "0.4.0", 154 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 155 | "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", 156 | "dev": true 157 | }, 158 | "node_modules/balanced-match": { 159 | "version": "1.0.2", 160 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 161 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 162 | "dev": true 163 | }, 164 | "node_modules/binary-extensions": { 165 | "version": "2.3.0", 166 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", 167 | "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", 168 | "dev": true, 169 | "engines": { 170 | "node": ">=8" 171 | }, 172 | "funding": { 173 | "url": "https://github.com/sponsors/sindresorhus" 174 | } 175 | }, 176 | "node_modules/brace-expansion": { 177 | "version": "2.0.1", 178 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", 179 | "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", 180 | "dev": true, 181 | "dependencies": { 182 | "balanced-match": "^1.0.0" 183 | } 184 | }, 185 | "node_modules/braces": { 186 | "version": "3.0.3", 187 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", 188 | "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", 189 | "dev": true, 190 | "dependencies": { 191 | "fill-range": "^7.1.1" 192 | }, 193 | "engines": { 194 | "node": ">=8" 195 | } 196 | }, 197 | "node_modules/browser-process-hrtime": { 198 | "version": "1.0.0", 199 | "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", 200 | "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", 201 | "dev": true 202 | }, 203 | "node_modules/browser-stdout": { 204 | "version": "1.3.1", 205 | "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", 206 | "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", 207 | "dev": true 208 | }, 209 | "node_modules/camelcase": { 210 | "version": "6.3.0", 211 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", 212 | "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", 213 | "dev": true, 214 | "engines": { 215 | "node": ">=10" 216 | }, 217 | "funding": { 218 | "url": "https://github.com/sponsors/sindresorhus" 219 | } 220 | }, 221 | "node_modules/chai": { 222 | "version": "4.4.1", 223 | "resolved": "https://registry.npmjs.org/chai/-/chai-4.4.1.tgz", 224 | "integrity": "sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==", 225 | "dev": true, 226 | "dependencies": { 227 | "assertion-error": "^1.1.0", 228 | "check-error": "^1.0.3", 229 | "deep-eql": "^4.1.3", 230 | "get-func-name": "^2.0.2", 231 | "loupe": "^2.3.6", 232 | "pathval": "^1.1.1", 233 | "type-detect": "^4.0.8" 234 | }, 235 | "engines": { 236 | "node": ">=4" 237 | } 238 | }, 239 | "node_modules/chalk": { 240 | "version": "4.1.2", 241 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 242 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 243 | "dev": true, 244 | "dependencies": { 245 | "ansi-styles": "^4.1.0", 246 | "supports-color": "^7.1.0" 247 | }, 248 | "engines": { 249 | "node": ">=10" 250 | }, 251 | "funding": { 252 | "url": "https://github.com/chalk/chalk?sponsor=1" 253 | } 254 | }, 255 | "node_modules/chalk/node_modules/supports-color": { 256 | "version": "7.2.0", 257 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 258 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 259 | "dev": true, 260 | "dependencies": { 261 | "has-flag": "^4.0.0" 262 | }, 263 | "engines": { 264 | "node": ">=8" 265 | } 266 | }, 267 | "node_modules/check-error": { 268 | "version": "1.0.3", 269 | "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", 270 | "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", 271 | "dev": true, 272 | "dependencies": { 273 | "get-func-name": "^2.0.2" 274 | }, 275 | "engines": { 276 | "node": "*" 277 | } 278 | }, 279 | "node_modules/chokidar": { 280 | "version": "3.6.0", 281 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", 282 | "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", 283 | "dev": true, 284 | "dependencies": { 285 | "anymatch": "~3.1.2", 286 | "braces": "~3.0.2", 287 | "glob-parent": "~5.1.2", 288 | "is-binary-path": "~2.1.0", 289 | "is-glob": "~4.0.1", 290 | "normalize-path": "~3.0.0", 291 | "readdirp": "~3.6.0" 292 | }, 293 | "engines": { 294 | "node": ">= 8.10.0" 295 | }, 296 | "funding": { 297 | "url": "https://paulmillr.com/funding/" 298 | }, 299 | "optionalDependencies": { 300 | "fsevents": "~2.3.2" 301 | } 302 | }, 303 | "node_modules/cliui": { 304 | "version": "7.0.4", 305 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", 306 | "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", 307 | "dev": true, 308 | "dependencies": { 309 | "string-width": "^4.2.0", 310 | "strip-ansi": "^6.0.0", 311 | "wrap-ansi": "^7.0.0" 312 | } 313 | }, 314 | "node_modules/color-convert": { 315 | "version": "2.0.1", 316 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 317 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 318 | "dev": true, 319 | "dependencies": { 320 | "color-name": "~1.1.4" 321 | }, 322 | "engines": { 323 | "node": ">=7.0.0" 324 | } 325 | }, 326 | "node_modules/color-name": { 327 | "version": "1.1.4", 328 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 329 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 330 | "dev": true 331 | }, 332 | "node_modules/combined-stream": { 333 | "version": "1.0.8", 334 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", 335 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", 336 | "dev": true, 337 | "dependencies": { 338 | "delayed-stream": "~1.0.0" 339 | }, 340 | "engines": { 341 | "node": ">= 0.8" 342 | } 343 | }, 344 | "node_modules/cssom": { 345 | "version": "0.4.4", 346 | "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", 347 | "integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==", 348 | "dev": true 349 | }, 350 | "node_modules/cssstyle": { 351 | "version": "2.3.0", 352 | "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", 353 | "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", 354 | "dev": true, 355 | "dependencies": { 356 | "cssom": "~0.3.6" 357 | }, 358 | "engines": { 359 | "node": ">=8" 360 | } 361 | }, 362 | "node_modules/cssstyle/node_modules/cssom": { 363 | "version": "0.3.8", 364 | "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", 365 | "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", 366 | "dev": true 367 | }, 368 | "node_modules/data-urls": { 369 | "version": "2.0.0", 370 | "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", 371 | "integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==", 372 | "dev": true, 373 | "dependencies": { 374 | "abab": "^2.0.3", 375 | "whatwg-mimetype": "^2.3.0", 376 | "whatwg-url": "^8.0.0" 377 | }, 378 | "engines": { 379 | "node": ">=10" 380 | } 381 | }, 382 | "node_modules/debug": { 383 | "version": "4.3.6", 384 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", 385 | "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", 386 | "dev": true, 387 | "dependencies": { 388 | "ms": "2.1.2" 389 | }, 390 | "engines": { 391 | "node": ">=6.0" 392 | }, 393 | "peerDependenciesMeta": { 394 | "supports-color": { 395 | "optional": true 396 | } 397 | } 398 | }, 399 | "node_modules/decamelize": { 400 | "version": "4.0.0", 401 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", 402 | "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", 403 | "dev": true, 404 | "engines": { 405 | "node": ">=10" 406 | }, 407 | "funding": { 408 | "url": "https://github.com/sponsors/sindresorhus" 409 | } 410 | }, 411 | "node_modules/decimal.js": { 412 | "version": "10.4.3", 413 | "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", 414 | "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==", 415 | "dev": true 416 | }, 417 | "node_modules/deep-eql": { 418 | "version": "4.1.3", 419 | "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", 420 | "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", 421 | "dev": true, 422 | "dependencies": { 423 | "type-detect": "^4.0.0" 424 | }, 425 | "engines": { 426 | "node": ">=6" 427 | } 428 | }, 429 | "node_modules/delayed-stream": { 430 | "version": "1.0.0", 431 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 432 | "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", 433 | "dev": true, 434 | "engines": { 435 | "node": ">=0.4.0" 436 | } 437 | }, 438 | "node_modules/diff": { 439 | "version": "5.2.0", 440 | "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", 441 | "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", 442 | "dev": true, 443 | "engines": { 444 | "node": ">=0.3.1" 445 | } 446 | }, 447 | "node_modules/domexception": { 448 | "version": "2.0.1", 449 | "resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz", 450 | "integrity": "sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==", 451 | "deprecated": "Use your platform's native DOMException instead", 452 | "dev": true, 453 | "dependencies": { 454 | "webidl-conversions": "^5.0.0" 455 | }, 456 | "engines": { 457 | "node": ">=8" 458 | } 459 | }, 460 | "node_modules/domexception/node_modules/webidl-conversions": { 461 | "version": "5.0.0", 462 | "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz", 463 | "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==", 464 | "dev": true, 465 | "engines": { 466 | "node": ">=8" 467 | } 468 | }, 469 | "node_modules/emoji-regex": { 470 | "version": "8.0.0", 471 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", 472 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", 473 | "dev": true 474 | }, 475 | "node_modules/escalade": { 476 | "version": "3.2.0", 477 | "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", 478 | "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", 479 | "dev": true, 480 | "engines": { 481 | "node": ">=6" 482 | } 483 | }, 484 | "node_modules/escape-string-regexp": { 485 | "version": "4.0.0", 486 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", 487 | "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", 488 | "dev": true, 489 | "engines": { 490 | "node": ">=10" 491 | }, 492 | "funding": { 493 | "url": "https://github.com/sponsors/sindresorhus" 494 | } 495 | }, 496 | "node_modules/escodegen": { 497 | "version": "2.1.0", 498 | "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", 499 | "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", 500 | "dev": true, 501 | "dependencies": { 502 | "esprima": "^4.0.1", 503 | "estraverse": "^5.2.0", 504 | "esutils": "^2.0.2" 505 | }, 506 | "bin": { 507 | "escodegen": "bin/escodegen.js", 508 | "esgenerate": "bin/esgenerate.js" 509 | }, 510 | "engines": { 511 | "node": ">=6.0" 512 | }, 513 | "optionalDependencies": { 514 | "source-map": "~0.6.1" 515 | } 516 | }, 517 | "node_modules/esprima": { 518 | "version": "4.0.1", 519 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", 520 | "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", 521 | "dev": true, 522 | "bin": { 523 | "esparse": "bin/esparse.js", 524 | "esvalidate": "bin/esvalidate.js" 525 | }, 526 | "engines": { 527 | "node": ">=4" 528 | } 529 | }, 530 | "node_modules/estraverse": { 531 | "version": "5.3.0", 532 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", 533 | "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", 534 | "dev": true, 535 | "engines": { 536 | "node": ">=4.0" 537 | } 538 | }, 539 | "node_modules/esutils": { 540 | "version": "2.0.3", 541 | "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", 542 | "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", 543 | "dev": true, 544 | "engines": { 545 | "node": ">=0.10.0" 546 | } 547 | }, 548 | "node_modules/fill-range": { 549 | "version": "7.1.1", 550 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", 551 | "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", 552 | "dev": true, 553 | "dependencies": { 554 | "to-regex-range": "^5.0.1" 555 | }, 556 | "engines": { 557 | "node": ">=8" 558 | } 559 | }, 560 | "node_modules/find-up": { 561 | "version": "5.0.0", 562 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", 563 | "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", 564 | "dev": true, 565 | "dependencies": { 566 | "locate-path": "^6.0.0", 567 | "path-exists": "^4.0.0" 568 | }, 569 | "engines": { 570 | "node": ">=10" 571 | }, 572 | "funding": { 573 | "url": "https://github.com/sponsors/sindresorhus" 574 | } 575 | }, 576 | "node_modules/flat": { 577 | "version": "5.0.2", 578 | "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", 579 | "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", 580 | "dev": true, 581 | "bin": { 582 | "flat": "cli.js" 583 | } 584 | }, 585 | "node_modules/form-data": { 586 | "version": "3.0.1", 587 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", 588 | "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", 589 | "dev": true, 590 | "dependencies": { 591 | "asynckit": "^0.4.0", 592 | "combined-stream": "^1.0.8", 593 | "mime-types": "^2.1.12" 594 | }, 595 | "engines": { 596 | "node": ">= 6" 597 | } 598 | }, 599 | "node_modules/fs.realpath": { 600 | "version": "1.0.0", 601 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 602 | "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", 603 | "dev": true 604 | }, 605 | "node_modules/fsevents": { 606 | "version": "2.3.3", 607 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", 608 | "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", 609 | "dev": true, 610 | "hasInstallScript": true, 611 | "optional": true, 612 | "os": [ 613 | "darwin" 614 | ], 615 | "engines": { 616 | "node": "^8.16.0 || ^10.6.0 || >=11.0.0" 617 | } 618 | }, 619 | "node_modules/get-caller-file": { 620 | "version": "2.0.5", 621 | "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", 622 | "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", 623 | "dev": true, 624 | "engines": { 625 | "node": "6.* || 8.* || >= 10.*" 626 | } 627 | }, 628 | "node_modules/get-func-name": { 629 | "version": "2.0.2", 630 | "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", 631 | "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", 632 | "dev": true, 633 | "engines": { 634 | "node": "*" 635 | } 636 | }, 637 | "node_modules/glob": { 638 | "version": "8.1.0", 639 | "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", 640 | "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", 641 | "deprecated": "Glob versions prior to v9 are no longer supported", 642 | "dev": true, 643 | "dependencies": { 644 | "fs.realpath": "^1.0.0", 645 | "inflight": "^1.0.4", 646 | "inherits": "2", 647 | "minimatch": "^5.0.1", 648 | "once": "^1.3.0" 649 | }, 650 | "engines": { 651 | "node": ">=12" 652 | }, 653 | "funding": { 654 | "url": "https://github.com/sponsors/isaacs" 655 | } 656 | }, 657 | "node_modules/glob-parent": { 658 | "version": "5.1.2", 659 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", 660 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 661 | "dev": true, 662 | "dependencies": { 663 | "is-glob": "^4.0.1" 664 | }, 665 | "engines": { 666 | "node": ">= 6" 667 | } 668 | }, 669 | "node_modules/has-flag": { 670 | "version": "4.0.0", 671 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 672 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 673 | "dev": true, 674 | "engines": { 675 | "node": ">=8" 676 | } 677 | }, 678 | "node_modules/he": { 679 | "version": "1.2.0", 680 | "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", 681 | "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", 682 | "dev": true, 683 | "bin": { 684 | "he": "bin/he" 685 | } 686 | }, 687 | "node_modules/html-encoding-sniffer": { 688 | "version": "2.0.1", 689 | "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", 690 | "integrity": "sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==", 691 | "dev": true, 692 | "dependencies": { 693 | "whatwg-encoding": "^1.0.5" 694 | }, 695 | "engines": { 696 | "node": ">=10" 697 | } 698 | }, 699 | "node_modules/http-proxy-agent": { 700 | "version": "4.0.1", 701 | "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", 702 | "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", 703 | "dev": true, 704 | "dependencies": { 705 | "@tootallnate/once": "1", 706 | "agent-base": "6", 707 | "debug": "4" 708 | }, 709 | "engines": { 710 | "node": ">= 6" 711 | } 712 | }, 713 | "node_modules/https-proxy-agent": { 714 | "version": "5.0.1", 715 | "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", 716 | "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", 717 | "dev": true, 718 | "dependencies": { 719 | "agent-base": "6", 720 | "debug": "4" 721 | }, 722 | "engines": { 723 | "node": ">= 6" 724 | } 725 | }, 726 | "node_modules/iconv-lite": { 727 | "version": "0.4.24", 728 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 729 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 730 | "dev": true, 731 | "dependencies": { 732 | "safer-buffer": ">= 2.1.2 < 3" 733 | }, 734 | "engines": { 735 | "node": ">=0.10.0" 736 | } 737 | }, 738 | "node_modules/inflight": { 739 | "version": "1.0.6", 740 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 741 | "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", 742 | "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", 743 | "dev": true, 744 | "dependencies": { 745 | "once": "^1.3.0", 746 | "wrappy": "1" 747 | } 748 | }, 749 | "node_modules/inherits": { 750 | "version": "2.0.4", 751 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 752 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 753 | "dev": true 754 | }, 755 | "node_modules/is-binary-path": { 756 | "version": "2.1.0", 757 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", 758 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", 759 | "dev": true, 760 | "dependencies": { 761 | "binary-extensions": "^2.0.0" 762 | }, 763 | "engines": { 764 | "node": ">=8" 765 | } 766 | }, 767 | "node_modules/is-extglob": { 768 | "version": "2.1.1", 769 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 770 | "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", 771 | "dev": true, 772 | "engines": { 773 | "node": ">=0.10.0" 774 | } 775 | }, 776 | "node_modules/is-fullwidth-code-point": { 777 | "version": "3.0.0", 778 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 779 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 780 | "dev": true, 781 | "engines": { 782 | "node": ">=8" 783 | } 784 | }, 785 | "node_modules/is-glob": { 786 | "version": "4.0.3", 787 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", 788 | "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", 789 | "dev": true, 790 | "dependencies": { 791 | "is-extglob": "^2.1.1" 792 | }, 793 | "engines": { 794 | "node": ">=0.10.0" 795 | } 796 | }, 797 | "node_modules/is-number": { 798 | "version": "7.0.0", 799 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 800 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 801 | "dev": true, 802 | "engines": { 803 | "node": ">=0.12.0" 804 | } 805 | }, 806 | "node_modules/is-plain-obj": { 807 | "version": "2.1.0", 808 | "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", 809 | "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", 810 | "dev": true, 811 | "engines": { 812 | "node": ">=8" 813 | } 814 | }, 815 | "node_modules/is-potential-custom-element-name": { 816 | "version": "1.0.1", 817 | "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", 818 | "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", 819 | "dev": true 820 | }, 821 | "node_modules/is-unicode-supported": { 822 | "version": "0.1.0", 823 | "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", 824 | "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", 825 | "dev": true, 826 | "engines": { 827 | "node": ">=10" 828 | }, 829 | "funding": { 830 | "url": "https://github.com/sponsors/sindresorhus" 831 | } 832 | }, 833 | "node_modules/js-yaml": { 834 | "version": "4.1.0", 835 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", 836 | "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", 837 | "dev": true, 838 | "dependencies": { 839 | "argparse": "^2.0.1" 840 | }, 841 | "bin": { 842 | "js-yaml": "bin/js-yaml.js" 843 | } 844 | }, 845 | "node_modules/jsdom": { 846 | "version": "16.7.0", 847 | "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz", 848 | "integrity": "sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw==", 849 | "dev": true, 850 | "dependencies": { 851 | "abab": "^2.0.5", 852 | "acorn": "^8.2.4", 853 | "acorn-globals": "^6.0.0", 854 | "cssom": "^0.4.4", 855 | "cssstyle": "^2.3.0", 856 | "data-urls": "^2.0.0", 857 | "decimal.js": "^10.2.1", 858 | "domexception": "^2.0.1", 859 | "escodegen": "^2.0.0", 860 | "form-data": "^3.0.0", 861 | "html-encoding-sniffer": "^2.0.1", 862 | "http-proxy-agent": "^4.0.1", 863 | "https-proxy-agent": "^5.0.0", 864 | "is-potential-custom-element-name": "^1.0.1", 865 | "nwsapi": "^2.2.0", 866 | "parse5": "6.0.1", 867 | "saxes": "^5.0.1", 868 | "symbol-tree": "^3.2.4", 869 | "tough-cookie": "^4.0.0", 870 | "w3c-hr-time": "^1.0.2", 871 | "w3c-xmlserializer": "^2.0.0", 872 | "webidl-conversions": "^6.1.0", 873 | "whatwg-encoding": "^1.0.5", 874 | "whatwg-mimetype": "^2.3.0", 875 | "whatwg-url": "^8.5.0", 876 | "ws": "^7.4.6", 877 | "xml-name-validator": "^3.0.0" 878 | }, 879 | "engines": { 880 | "node": ">=10" 881 | }, 882 | "peerDependencies": { 883 | "canvas": "^2.5.0" 884 | }, 885 | "peerDependenciesMeta": { 886 | "canvas": { 887 | "optional": true 888 | } 889 | } 890 | }, 891 | "node_modules/jsdom-global": { 892 | "version": "3.0.2", 893 | "resolved": "https://registry.npmjs.org/jsdom-global/-/jsdom-global-3.0.2.tgz", 894 | "integrity": "sha512-t1KMcBkz/pT5JrvcJbpUR2u/w1kO9jXctaaGJ0vZDzwFnIvGWw9IDSRciT83kIs8Bnw4qpOl8bQK08V01YgMPg==", 895 | "dev": true, 896 | "peerDependencies": { 897 | "jsdom": ">=10.0.0" 898 | } 899 | }, 900 | "node_modules/leaflet": { 901 | "version": "0.6.4", 902 | "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-0.6.4.tgz", 903 | "integrity": "sha512-zpkMKt5gFL3+G5AeC7lSt8b43yRh86tPE3KsF0nDL4Ad7TydX2wa5wVkywSCJzUlNeBkIfJqXDRg/SFM+xANYA==" 904 | }, 905 | "node_modules/locate-path": { 906 | "version": "6.0.0", 907 | "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", 908 | "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", 909 | "dev": true, 910 | "dependencies": { 911 | "p-locate": "^5.0.0" 912 | }, 913 | "engines": { 914 | "node": ">=10" 915 | }, 916 | "funding": { 917 | "url": "https://github.com/sponsors/sindresorhus" 918 | } 919 | }, 920 | "node_modules/lodash": { 921 | "version": "4.17.21", 922 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", 923 | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", 924 | "dev": true 925 | }, 926 | "node_modules/log-symbols": { 927 | "version": "4.1.0", 928 | "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", 929 | "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", 930 | "dev": true, 931 | "dependencies": { 932 | "chalk": "^4.1.0", 933 | "is-unicode-supported": "^0.1.0" 934 | }, 935 | "engines": { 936 | "node": ">=10" 937 | }, 938 | "funding": { 939 | "url": "https://github.com/sponsors/sindresorhus" 940 | } 941 | }, 942 | "node_modules/loupe": { 943 | "version": "2.3.7", 944 | "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", 945 | "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", 946 | "dev": true, 947 | "dependencies": { 948 | "get-func-name": "^2.0.1" 949 | } 950 | }, 951 | "node_modules/mime-db": { 952 | "version": "1.52.0", 953 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", 954 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", 955 | "dev": true, 956 | "engines": { 957 | "node": ">= 0.6" 958 | } 959 | }, 960 | "node_modules/mime-types": { 961 | "version": "2.1.35", 962 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", 963 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 964 | "dev": true, 965 | "dependencies": { 966 | "mime-db": "1.52.0" 967 | }, 968 | "engines": { 969 | "node": ">= 0.6" 970 | } 971 | }, 972 | "node_modules/minimatch": { 973 | "version": "5.1.6", 974 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", 975 | "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", 976 | "dev": true, 977 | "dependencies": { 978 | "brace-expansion": "^2.0.1" 979 | }, 980 | "engines": { 981 | "node": ">=10" 982 | } 983 | }, 984 | "node_modules/mocha": { 985 | "version": "10.7.3", 986 | "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.7.3.tgz", 987 | "integrity": "sha512-uQWxAu44wwiACGqjbPYmjo7Lg8sFrS3dQe7PP2FQI+woptP4vZXSMcfMyFL/e1yFEeEpV4RtyTpZROOKmxis+A==", 988 | "dev": true, 989 | "dependencies": { 990 | "ansi-colors": "^4.1.3", 991 | "browser-stdout": "^1.3.1", 992 | "chokidar": "^3.5.3", 993 | "debug": "^4.3.5", 994 | "diff": "^5.2.0", 995 | "escape-string-regexp": "^4.0.0", 996 | "find-up": "^5.0.0", 997 | "glob": "^8.1.0", 998 | "he": "^1.2.0", 999 | "js-yaml": "^4.1.0", 1000 | "log-symbols": "^4.1.0", 1001 | "minimatch": "^5.1.6", 1002 | "ms": "^2.1.3", 1003 | "serialize-javascript": "^6.0.2", 1004 | "strip-json-comments": "^3.1.1", 1005 | "supports-color": "^8.1.1", 1006 | "workerpool": "^6.5.1", 1007 | "yargs": "^16.2.0", 1008 | "yargs-parser": "^20.2.9", 1009 | "yargs-unparser": "^2.0.0" 1010 | }, 1011 | "bin": { 1012 | "_mocha": "bin/_mocha", 1013 | "mocha": "bin/mocha.js" 1014 | }, 1015 | "engines": { 1016 | "node": ">= 14.0.0" 1017 | } 1018 | }, 1019 | "node_modules/mocha/node_modules/ms": { 1020 | "version": "2.1.3", 1021 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 1022 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 1023 | "dev": true 1024 | }, 1025 | "node_modules/ms": { 1026 | "version": "2.1.2", 1027 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 1028 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", 1029 | "dev": true 1030 | }, 1031 | "node_modules/normalize-path": { 1032 | "version": "3.0.0", 1033 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", 1034 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", 1035 | "dev": true, 1036 | "engines": { 1037 | "node": ">=0.10.0" 1038 | } 1039 | }, 1040 | "node_modules/nwsapi": { 1041 | "version": "2.2.9", 1042 | "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.9.tgz", 1043 | "integrity": "sha512-2f3F0SEEer8bBu0dsNCFF50N0cTThV1nWFYcEYFZttdW0lDAoybv9cQoK7X7/68Z89S7FoRrVjP1LPX4XRf9vg==", 1044 | "dev": true 1045 | }, 1046 | "node_modules/once": { 1047 | "version": "1.4.0", 1048 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 1049 | "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", 1050 | "dev": true, 1051 | "dependencies": { 1052 | "wrappy": "1" 1053 | } 1054 | }, 1055 | "node_modules/p-limit": { 1056 | "version": "3.1.0", 1057 | "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", 1058 | "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", 1059 | "dev": true, 1060 | "dependencies": { 1061 | "yocto-queue": "^0.1.0" 1062 | }, 1063 | "engines": { 1064 | "node": ">=10" 1065 | }, 1066 | "funding": { 1067 | "url": "https://github.com/sponsors/sindresorhus" 1068 | } 1069 | }, 1070 | "node_modules/p-locate": { 1071 | "version": "5.0.0", 1072 | "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", 1073 | "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", 1074 | "dev": true, 1075 | "dependencies": { 1076 | "p-limit": "^3.0.2" 1077 | }, 1078 | "engines": { 1079 | "node": ">=10" 1080 | }, 1081 | "funding": { 1082 | "url": "https://github.com/sponsors/sindresorhus" 1083 | } 1084 | }, 1085 | "node_modules/parse5": { 1086 | "version": "6.0.1", 1087 | "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", 1088 | "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", 1089 | "dev": true 1090 | }, 1091 | "node_modules/path-exists": { 1092 | "version": "4.0.0", 1093 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", 1094 | "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", 1095 | "dev": true, 1096 | "engines": { 1097 | "node": ">=8" 1098 | } 1099 | }, 1100 | "node_modules/pathval": { 1101 | "version": "1.1.1", 1102 | "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", 1103 | "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", 1104 | "dev": true, 1105 | "engines": { 1106 | "node": "*" 1107 | } 1108 | }, 1109 | "node_modules/picomatch": { 1110 | "version": "2.3.1", 1111 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", 1112 | "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", 1113 | "dev": true, 1114 | "engines": { 1115 | "node": ">=8.6" 1116 | }, 1117 | "funding": { 1118 | "url": "https://github.com/sponsors/jonschlinkert" 1119 | } 1120 | }, 1121 | "node_modules/psl": { 1122 | "version": "1.9.0", 1123 | "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", 1124 | "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", 1125 | "dev": true 1126 | }, 1127 | "node_modules/punycode": { 1128 | "version": "2.3.1", 1129 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", 1130 | "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", 1131 | "dev": true, 1132 | "engines": { 1133 | "node": ">=6" 1134 | } 1135 | }, 1136 | "node_modules/querystringify": { 1137 | "version": "2.2.0", 1138 | "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", 1139 | "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", 1140 | "dev": true 1141 | }, 1142 | "node_modules/randombytes": { 1143 | "version": "2.1.0", 1144 | "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", 1145 | "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", 1146 | "dev": true, 1147 | "dependencies": { 1148 | "safe-buffer": "^5.1.0" 1149 | } 1150 | }, 1151 | "node_modules/readdirp": { 1152 | "version": "3.6.0", 1153 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", 1154 | "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", 1155 | "dev": true, 1156 | "dependencies": { 1157 | "picomatch": "^2.2.1" 1158 | }, 1159 | "engines": { 1160 | "node": ">=8.10.0" 1161 | } 1162 | }, 1163 | "node_modules/require-directory": { 1164 | "version": "2.1.1", 1165 | "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", 1166 | "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", 1167 | "dev": true, 1168 | "engines": { 1169 | "node": ">=0.10.0" 1170 | } 1171 | }, 1172 | "node_modules/requires-port": { 1173 | "version": "1.0.0", 1174 | "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", 1175 | "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", 1176 | "dev": true 1177 | }, 1178 | "node_modules/safe-buffer": { 1179 | "version": "5.2.1", 1180 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 1181 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 1182 | "dev": true, 1183 | "funding": [ 1184 | { 1185 | "type": "github", 1186 | "url": "https://github.com/sponsors/feross" 1187 | }, 1188 | { 1189 | "type": "patreon", 1190 | "url": "https://www.patreon.com/feross" 1191 | }, 1192 | { 1193 | "type": "consulting", 1194 | "url": "https://feross.org/support" 1195 | } 1196 | ] 1197 | }, 1198 | "node_modules/safer-buffer": { 1199 | "version": "2.1.2", 1200 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 1201 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", 1202 | "dev": true 1203 | }, 1204 | "node_modules/saxes": { 1205 | "version": "5.0.1", 1206 | "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", 1207 | "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", 1208 | "dev": true, 1209 | "dependencies": { 1210 | "xmlchars": "^2.2.0" 1211 | }, 1212 | "engines": { 1213 | "node": ">=10" 1214 | } 1215 | }, 1216 | "node_modules/serialize-javascript": { 1217 | "version": "6.0.2", 1218 | "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", 1219 | "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", 1220 | "dev": true, 1221 | "dependencies": { 1222 | "randombytes": "^2.1.0" 1223 | } 1224 | }, 1225 | "node_modules/source-map": { 1226 | "version": "0.6.1", 1227 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", 1228 | "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", 1229 | "dev": true, 1230 | "optional": true, 1231 | "engines": { 1232 | "node": ">=0.10.0" 1233 | } 1234 | }, 1235 | "node_modules/string-width": { 1236 | "version": "4.2.3", 1237 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", 1238 | "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", 1239 | "dev": true, 1240 | "dependencies": { 1241 | "emoji-regex": "^8.0.0", 1242 | "is-fullwidth-code-point": "^3.0.0", 1243 | "strip-ansi": "^6.0.1" 1244 | }, 1245 | "engines": { 1246 | "node": ">=8" 1247 | } 1248 | }, 1249 | "node_modules/strip-ansi": { 1250 | "version": "6.0.1", 1251 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", 1252 | "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", 1253 | "dev": true, 1254 | "dependencies": { 1255 | "ansi-regex": "^5.0.1" 1256 | }, 1257 | "engines": { 1258 | "node": ">=8" 1259 | } 1260 | }, 1261 | "node_modules/strip-json-comments": { 1262 | "version": "3.1.1", 1263 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", 1264 | "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", 1265 | "dev": true, 1266 | "engines": { 1267 | "node": ">=8" 1268 | }, 1269 | "funding": { 1270 | "url": "https://github.com/sponsors/sindresorhus" 1271 | } 1272 | }, 1273 | "node_modules/supports-color": { 1274 | "version": "8.1.1", 1275 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", 1276 | "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", 1277 | "dev": true, 1278 | "dependencies": { 1279 | "has-flag": "^4.0.0" 1280 | }, 1281 | "engines": { 1282 | "node": ">=10" 1283 | }, 1284 | "funding": { 1285 | "url": "https://github.com/chalk/supports-color?sponsor=1" 1286 | } 1287 | }, 1288 | "node_modules/symbol-tree": { 1289 | "version": "3.2.4", 1290 | "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", 1291 | "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", 1292 | "dev": true 1293 | }, 1294 | "node_modules/to-regex-range": { 1295 | "version": "5.0.1", 1296 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 1297 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 1298 | "dev": true, 1299 | "dependencies": { 1300 | "is-number": "^7.0.0" 1301 | }, 1302 | "engines": { 1303 | "node": ">=8.0" 1304 | } 1305 | }, 1306 | "node_modules/tough-cookie": { 1307 | "version": "4.1.4", 1308 | "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", 1309 | "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", 1310 | "dev": true, 1311 | "dependencies": { 1312 | "psl": "^1.1.33", 1313 | "punycode": "^2.1.1", 1314 | "universalify": "^0.2.0", 1315 | "url-parse": "^1.5.3" 1316 | }, 1317 | "engines": { 1318 | "node": ">=6" 1319 | } 1320 | }, 1321 | "node_modules/tr46": { 1322 | "version": "2.1.0", 1323 | "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", 1324 | "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", 1325 | "dev": true, 1326 | "dependencies": { 1327 | "punycode": "^2.1.1" 1328 | }, 1329 | "engines": { 1330 | "node": ">=8" 1331 | } 1332 | }, 1333 | "node_modules/type-detect": { 1334 | "version": "4.0.8", 1335 | "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", 1336 | "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", 1337 | "dev": true, 1338 | "engines": { 1339 | "node": ">=4" 1340 | } 1341 | }, 1342 | "node_modules/universalify": { 1343 | "version": "0.2.0", 1344 | "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", 1345 | "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", 1346 | "dev": true, 1347 | "engines": { 1348 | "node": ">= 4.0.0" 1349 | } 1350 | }, 1351 | "node_modules/url-parse": { 1352 | "version": "1.5.10", 1353 | "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", 1354 | "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", 1355 | "dev": true, 1356 | "dependencies": { 1357 | "querystringify": "^2.1.1", 1358 | "requires-port": "^1.0.0" 1359 | } 1360 | }, 1361 | "node_modules/w3c-hr-time": { 1362 | "version": "1.0.2", 1363 | "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", 1364 | "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", 1365 | "deprecated": "Use your platform's native performance.now() and performance.timeOrigin.", 1366 | "dev": true, 1367 | "dependencies": { 1368 | "browser-process-hrtime": "^1.0.0" 1369 | } 1370 | }, 1371 | "node_modules/w3c-xmlserializer": { 1372 | "version": "2.0.0", 1373 | "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz", 1374 | "integrity": "sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==", 1375 | "dev": true, 1376 | "dependencies": { 1377 | "xml-name-validator": "^3.0.0" 1378 | }, 1379 | "engines": { 1380 | "node": ">=10" 1381 | } 1382 | }, 1383 | "node_modules/webidl-conversions": { 1384 | "version": "6.1.0", 1385 | "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", 1386 | "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==", 1387 | "dev": true, 1388 | "engines": { 1389 | "node": ">=10.4" 1390 | } 1391 | }, 1392 | "node_modules/whatwg-encoding": { 1393 | "version": "1.0.5", 1394 | "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", 1395 | "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", 1396 | "dev": true, 1397 | "dependencies": { 1398 | "iconv-lite": "0.4.24" 1399 | } 1400 | }, 1401 | "node_modules/whatwg-mimetype": { 1402 | "version": "2.3.0", 1403 | "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", 1404 | "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", 1405 | "dev": true 1406 | }, 1407 | "node_modules/whatwg-url": { 1408 | "version": "8.7.0", 1409 | "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz", 1410 | "integrity": "sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==", 1411 | "dev": true, 1412 | "dependencies": { 1413 | "lodash": "^4.7.0", 1414 | "tr46": "^2.1.0", 1415 | "webidl-conversions": "^6.1.0" 1416 | }, 1417 | "engines": { 1418 | "node": ">=10" 1419 | } 1420 | }, 1421 | "node_modules/workerpool": { 1422 | "version": "6.5.1", 1423 | "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", 1424 | "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", 1425 | "dev": true 1426 | }, 1427 | "node_modules/wrap-ansi": { 1428 | "version": "7.0.0", 1429 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", 1430 | "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", 1431 | "dev": true, 1432 | "dependencies": { 1433 | "ansi-styles": "^4.0.0", 1434 | "string-width": "^4.1.0", 1435 | "strip-ansi": "^6.0.0" 1436 | }, 1437 | "engines": { 1438 | "node": ">=10" 1439 | }, 1440 | "funding": { 1441 | "url": "https://github.com/chalk/wrap-ansi?sponsor=1" 1442 | } 1443 | }, 1444 | "node_modules/wrappy": { 1445 | "version": "1.0.2", 1446 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 1447 | "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", 1448 | "dev": true 1449 | }, 1450 | "node_modules/ws": { 1451 | "version": "7.5.10", 1452 | "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", 1453 | "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", 1454 | "dev": true, 1455 | "engines": { 1456 | "node": ">=8.3.0" 1457 | }, 1458 | "peerDependencies": { 1459 | "bufferutil": "^4.0.1", 1460 | "utf-8-validate": "^5.0.2" 1461 | }, 1462 | "peerDependenciesMeta": { 1463 | "bufferutil": { 1464 | "optional": true 1465 | }, 1466 | "utf-8-validate": { 1467 | "optional": true 1468 | } 1469 | } 1470 | }, 1471 | "node_modules/xml-name-validator": { 1472 | "version": "3.0.0", 1473 | "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", 1474 | "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", 1475 | "dev": true 1476 | }, 1477 | "node_modules/xmlchars": { 1478 | "version": "2.2.0", 1479 | "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", 1480 | "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", 1481 | "dev": true 1482 | }, 1483 | "node_modules/y18n": { 1484 | "version": "5.0.8", 1485 | "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", 1486 | "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", 1487 | "dev": true, 1488 | "engines": { 1489 | "node": ">=10" 1490 | } 1491 | }, 1492 | "node_modules/yargs": { 1493 | "version": "16.2.0", 1494 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", 1495 | "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", 1496 | "dev": true, 1497 | "dependencies": { 1498 | "cliui": "^7.0.2", 1499 | "escalade": "^3.1.1", 1500 | "get-caller-file": "^2.0.5", 1501 | "require-directory": "^2.1.1", 1502 | "string-width": "^4.2.0", 1503 | "y18n": "^5.0.5", 1504 | "yargs-parser": "^20.2.2" 1505 | }, 1506 | "engines": { 1507 | "node": ">=10" 1508 | } 1509 | }, 1510 | "node_modules/yargs-parser": { 1511 | "version": "20.2.9", 1512 | "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", 1513 | "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", 1514 | "dev": true, 1515 | "engines": { 1516 | "node": ">=10" 1517 | } 1518 | }, 1519 | "node_modules/yargs-unparser": { 1520 | "version": "2.0.0", 1521 | "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", 1522 | "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", 1523 | "dev": true, 1524 | "dependencies": { 1525 | "camelcase": "^6.0.0", 1526 | "decamelize": "^4.0.0", 1527 | "flat": "^5.0.2", 1528 | "is-plain-obj": "^2.1.0" 1529 | }, 1530 | "engines": { 1531 | "node": ">=10" 1532 | } 1533 | }, 1534 | "node_modules/yocto-queue": { 1535 | "version": "0.1.0", 1536 | "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", 1537 | "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", 1538 | "dev": true, 1539 | "engines": { 1540 | "node": ">=10" 1541 | }, 1542 | "funding": { 1543 | "url": "https://github.com/sponsors/sindresorhus" 1544 | } 1545 | } 1546 | } 1547 | } 1548 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": "John Firebaugh ", 3 | "name": "leaflet-osm", 4 | "description": "OpenStreetMap plugin for Leaflet", 5 | "version": "0.1.0", 6 | "repository": { 7 | "url": "" 8 | }, 9 | "main": "./leaflet-osm.js", 10 | "scripts": { 11 | "test": "mocha" 12 | }, 13 | "dependencies": { 14 | "leaflet": "0.6" 15 | }, 16 | "devDependencies": { 17 | "chai": "^4.2.0", 18 | "jsdom": "^16.2.2", 19 | "jsdom-global": "^3.0.2", 20 | "mocha": "^10.7.3" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /test/fixtures/area.json: -------------------------------------------------------------------------------- 1 | {"version":"0.6","generator":"OpenStreetMap server","copyright":"OpenStreetMap and contributors","attribution":"http://www.openstreetmap.org/copyright","license":"http://opendatacommons.org/licenses/odbl/1-0/","elements":[{"type":"node","id":1911003400,"lat":44.6641548,"lon":-73.0149544,"timestamp":"2012-09-12T04:59:23Z","version":1,"changeset":13078014,"user":"jfire","uid":67236},{"type":"node","id":1911003422,"lat":44.6639106,"lon":-73.0183662,"timestamp":"2012-09-12T04:59:23Z","version":1,"changeset":13078014,"user":"jfire","uid":67236},{"type":"node","id":1911003428,"lat":44.6639144,"lon":-73.0164457,"timestamp":"2012-09-12T04:59:24Z","version":1,"changeset":13078014,"user":"jfire","uid":67236},{"type":"node","id":1911003434,"lat":44.6632593,"lon":-73.0149372,"timestamp":"2012-09-12T04:59:24Z","version":1,"changeset":13078014,"user":"jfire","uid":67236},{"type":"node","id":1911003459,"lat":44.6642311,"lon":-73.0152709,"timestamp":"2012-09-12T04:59:24Z","version":1,"changeset":13078014,"user":"jfire","uid":67236},{"type":"node","id":1911003477,"lat":44.6639881,"lon":-73.0163749,"timestamp":"2012-09-12T04:59:24Z","version":1,"changeset":13078014,"user":"jfire","uid":67236},{"type":"node","id":1911003481,"lat":44.6640251,"lon":-73.0181462,"timestamp":"2012-09-12T04:59:25Z","version":1,"changeset":13078014,"user":"jfire","uid":67236},{"type":"node","id":1911003483,"lat":44.6640861,"lon":-73.0163599,"timestamp":"2012-09-12T04:59:25Z","version":1,"changeset":13078014,"user":"jfire","uid":67236},{"type":"node","id":1911003505,"lat":44.663365,"lon":-73.0184144,"timestamp":"2012-09-12T04:59:25Z","version":1,"changeset":13078014,"user":"jfire","uid":67236},{"type":"node","id":1911003534,"lat":44.6631742,"lon":-73.0151529,"timestamp":"2012-09-12T04:59:26Z","version":1,"changeset":13078014,"user":"jfire","uid":67236},{"type":"node","id":1911003542,"lat":44.6631857,"lon":-73.0149866,"timestamp":"2012-09-12T04:59:26Z","version":1,"changeset":13078014,"user":"jfire","uid":67236},{"type":"node","id":1911003614,"lat":44.6640251,"lon":-73.018275,"timestamp":"2012-09-12T04:59:27Z","version":1,"changeset":13078014,"user":"jfire","uid":67236},{"type":"node","id":1911003629,"lat":44.6639945,"lon":-73.0183447,"timestamp":"2012-09-12T04:59:27Z","version":1,"changeset":13078014,"user":"jfire","uid":67236},{"type":"node","id":1911003725,"lat":44.6633765,"lon":-73.0149061,"timestamp":"2012-09-12T04:59:29Z","version":1,"changeset":13078014,"user":"jfire","uid":67236},{"type":"way","id":180655479,"timestamp":"2012-09-12T04:59:32Z","version":1,"changeset":13078014,"user":"jfire","uid":67236,"nodes":[1911003422,1911003505,1911003534,1911003542,1911003434,1911003725,1911003400,1911003459,1911003483,1911003477,1911003428,1911003481,1911003614,1911003629,1911003422],"tags":{"leisure":"pitch"}}]} 2 | -------------------------------------------------------------------------------- /test/fixtures/area.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /test/fixtures/changeset.json: -------------------------------------------------------------------------------- 1 | {"version":"0.6","generator":"openstreetmap-cgimap 2.0.1 (3448772 spike-06.openstreetmap.org)","copyright":"OpenStreetMap and contributors","attribution":"http://www.openstreetmap.org/copyright","license":"http://opendatacommons.org/licenses/odbl/1-0/","changeset":{"id":1,"created_at":"2005-04-09T19:54:13Z","open":false,"comments_count":48,"changes_count":2,"closed_at":"2005-04-09T20:54:39Z","min_lat":51.5288506,"min_lon":-0.1465242,"max_lat":51.5288620,"max_lon":-0.1464925,"uid":1,"user":"Steve"}} -------------------------------------------------------------------------------- /test/fixtures/changeset.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /test/fixtures/node.json: -------------------------------------------------------------------------------- 1 | {"version":"0.6","generator":"OpenStreetMap server","copyright":"OpenStreetMap and contributors","attribution":"http://www.openstreetmap.org/copyright","license":"http://opendatacommons.org/licenses/odbl/1-0/","elements":[{"type":"node","id":356552551,"lat":44.6636172,"lon":-73.0132525,"timestamp":"2009-03-07T03:26:33Z","version":1,"changeset":747176,"user":"iandees","uid":4732,"tags":{"amenity":"school","ele":"114","gnis:county_id":"011","gnis:created":"10/29/1980","gnis:edited":"05/27/2008","gnis:feature_id":"1456383","gnis:state_id":"50","name":"Bellows Free Academy"}}]} -------------------------------------------------------------------------------- /test/fixtures/node.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/fixtures/way.json: -------------------------------------------------------------------------------- 1 | {"version":"0.6","generator":"OpenStreetMap server","copyright":"OpenStreetMap and contributors","attribution":"http://www.openstreetmap.org/copyright","license":"http://opendatacommons.org/licenses/odbl/1-0/","elements":[{"type":"node","id":204587613,"lat":44.665983,"lon":-72.920587,"timestamp":"2009-10-11T18:01:27Z","version":2,"changeset":2817006,"user":"woodpeck_fixbot","uid":147510},{"type":"node","id":204595896,"lat":44.665883,"lon":-72.923053,"timestamp":"2009-10-11T18:03:23Z","version":2,"changeset":2817006,"user":"woodpeck_fixbot","uid":147510},{"type":"node","id":204595901,"lat":44.66597,"lon":-72.922201,"timestamp":"2009-10-11T18:03:23Z","version":2,"changeset":2817006,"user":"woodpeck_fixbot","uid":147510},{"type":"node","id":204595904,"lat":44.665989,"lon":-72.921986,"timestamp":"2009-10-11T18:03:23Z","version":2,"changeset":2817006,"user":"woodpeck_fixbot","uid":147510},{"type":"node","id":204595911,"lat":44.666015,"lon":-72.921474,"timestamp":"2009-11-17T05:45:06Z","version":2,"changeset":3138486,"user":"woodpeck_fixbot","uid":147510},{"type":"node","id":204595915,"lat":44.666015,"lon":-72.921254,"timestamp":"2009-10-11T18:03:23Z","version":2,"changeset":2817006,"user":"woodpeck_fixbot","uid":147510},{"type":"node","id":204595919,"lat":44.666007,"lon":-72.921033,"timestamp":"2009-10-11T18:03:23Z","version":2,"changeset":2817006,"user":"woodpeck_fixbot","uid":147510},{"type":"node","id":204595923,"lat":44.665938,"lon":-72.920089,"timestamp":"2009-10-11T18:03:23Z","version":2,"changeset":2817006,"user":"woodpeck_fixbot","uid":147510},{"type":"node","id":204595927,"lat":44.665901,"lon":-72.919727,"timestamp":"2009-10-11T18:03:23Z","version":2,"changeset":2817006,"user":"woodpeck_fixbot","uid":147510},{"type":"node","id":204595932,"lat":44.665837,"lon":-72.919284,"timestamp":"2009-11-17T05:45:06Z","version":2,"changeset":3138486,"user":"woodpeck_fixbot","uid":147510},{"type":"node","id":204595935,"lat":44.665821,"lon":-72.91914,"timestamp":"2009-10-11T18:03:23Z","version":2,"changeset":2817006,"user":"woodpeck_fixbot","uid":147510},{"type":"node","id":204595939,"lat":44.66581,"lon":-72.918999,"timestamp":"2009-10-11T18:03:23Z","version":2,"changeset":2817006,"user":"woodpeck_fixbot","uid":147510},{"type":"node","id":204595943,"lat":44.665814,"lon":-72.918855,"timestamp":"2009-10-11T18:03:23Z","version":2,"changeset":2817006,"user":"woodpeck_fixbot","uid":147510},{"type":"node","id":204595947,"lat":44.665823,"lon":-72.918783,"timestamp":"2009-12-11T06:32:30Z","version":2,"changeset":3346870,"user":"woodpeck_fixbot","uid":147510},{"type":"node","id":204595950,"lat":44.665839,"lon":-72.91871,"timestamp":"2009-10-11T18:03:23Z","version":2,"changeset":2817006,"user":"woodpeck_fixbot","uid":147510},{"type":"node","id":204595953,"lat":44.66587,"lon":-72.918641,"timestamp":"2009-10-11T18:03:23Z","version":2,"changeset":2817006,"user":"woodpeck_fixbot","uid":147510},{"type":"node","id":204595955,"lat":44.665923,"lon":-72.918586,"timestamp":"2009-10-11T18:03:23Z","version":2,"changeset":2817006,"user":"woodpeck_fixbot","uid":147510},{"type":"node","id":204595957,"lat":44.665985,"lon":-72.918559,"timestamp":"2009-10-11T18:03:23Z","version":2,"changeset":2817006,"user":"woodpeck_fixbot","uid":147510},{"type":"node","id":204595961,"lat":44.666193,"lon":-72.918523,"timestamp":"2009-11-17T05:45:06Z","version":2,"changeset":3138486,"user":"woodpeck_fixbot","uid":147510},{"type":"node","id":204595963,"lat":44.666342,"lon":-72.918513,"timestamp":"2009-10-11T18:03:23Z","version":2,"changeset":2817006,"user":"woodpeck_fixbot","uid":147510},{"type":"way","id":19698713,"timestamp":"2008-01-03T05:24:43Z","version":1,"changeset":522559,"user":"DaveHansenTiger","uid":7168,"nodes":[204595896,204595901,204595904,204595911,204595915,204595919,204587613,204595923,204595927,204595932,204595935,204595939,204595943,204595947,204595950,204595953,204595955,204595957,204595961,204595963],"tags":{"name":"Oustinoff Rd","tiger:separated":"no","tiger:source":"tiger_import_dch_v0.6_20070830","tiger:tlid":"136533324:136533325","tiger:upload_uuid":"bulk_upload.pl-62def9fe-abee-42f3-ac1f-9d9f4b4ee78b","tiger:reviewed":"no","tiger:cfcc":"A41","tiger:county":"Franklin, VT","tiger:zip_left":"05444","tiger:zip_right":"05444","highway":"residential","tiger:name_base":"Oustinoff","tiger:name_type":"Rd"}}]} 2 | -------------------------------------------------------------------------------- /test/fixtures/way.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /test/osm_test.js: -------------------------------------------------------------------------------- 1 | require('jsdom-global')() 2 | 3 | var chai = require('chai'), 4 | jsdom = require("jsdom"), 5 | dom = new jsdom.JSDOM; 6 | 7 | global.window = dom.window; 8 | global.document = window.document; 9 | global.navigator = window.navigator; 10 | global.Document = window.Document; 11 | 12 | L = require('leaflet'); 13 | require('..'); 14 | 15 | chai.should(); 16 | 17 | describe("L.OSM.Mapnik", function () { 18 | it("has the appropriate URL", function () { 19 | new L.OSM.Mapnik()._url.should.eq('https://tile.openstreetmap.org/{z}/{x}/{y}.png'); 20 | }); 21 | }); 22 | 23 | describe("L.OSM.CyclOSM", function () { 24 | it("has the appropriate URL", function () { 25 | new L.OSM.CyclOSM()._url.should.eq('https://{s}.tile-cyclosm.openstreetmap.fr/cyclosm/{z}/{x}/{y}.png'); 26 | }); 27 | 28 | it("has the appropriate attribution", function () { 29 | new L.OSM.CyclOSM().getAttribution().should.contain('France'); 30 | }); 31 | }); 32 | 33 | describe("L.OSM.CycleMap", function () { 34 | it("has the appropriate URL", function () { 35 | new L.OSM.CycleMap()._url.should.eq('https://{s}.tile.thunderforest.com/cycle/{z}/{x}/{y}{r}.png?apikey={apikey}'); 36 | }); 37 | 38 | it("has the appropriate attribution", function () { 39 | new L.OSM.CycleMap().getAttribution().should.contain('Andy Allan'); 40 | }); 41 | }); 42 | 43 | describe("L.OSM.TransportMap", function () { 44 | it("has the appropriate URL", function () { 45 | new L.OSM.TransportMap()._url.should.eq('https://{s}.tile.thunderforest.com/transport/{z}/{x}/{y}{r}.png?apikey={apikey}'); 46 | }); 47 | 48 | it("has the appropriate attribution", function () { 49 | new L.OSM.TransportMap().getAttribution().should.contain('Andy Allan'); 50 | }); 51 | }); 52 | 53 | describe("L.OSM.OPNVKarte", function () { 54 | it("has the appropriate URL", function () { 55 | new L.OSM.OPNVKarte()._url.should.eq('https://tileserver.memomaps.de/tilegen/{z}/{x}/{y}.png'); 56 | }); 57 | 58 | it("has the appropriate attribution", function () { 59 | new L.OSM.OPNVKarte().getAttribution().should.contain('MeMoMaps'); 60 | }); 61 | }); 62 | 63 | describe("L.OSM.TracestrackTopo", function () { 64 | it("has the appropriate URL", function () { 65 | new L.OSM.TracestrackTopo()._url.should.eq('https://tile.tracestrack.com/topo__/{z}/{x}/{y}.webp?key={apikey}'); 66 | }); 67 | 68 | it("has the appropriate attribution", function () { 69 | new L.OSM.TracestrackTopo().getAttribution().should.contain('Tracestrack'); 70 | }); 71 | }); 72 | 73 | [ "xml", "json"].forEach(format => { 74 | 75 | describe(`L.OSM.DataLayer (${format})`, function () { 76 | function fixture(name) { 77 | var fs = require("fs"); 78 | var contents = fs.readFileSync(__dirname + "/fixtures/" + name + "." + format, "utf8"); 79 | if (format === "xml") { 80 | const parser = new window.DOMParser(); 81 | return parser.parseFromString(contents, "text/xml"); 82 | } 83 | else 84 | { 85 | return JSON.parse(contents); 86 | } 87 | } 88 | 89 | function layers(layerGroup) { 90 | var layers = []; 91 | layerGroup.eachLayer(function (layer) { 92 | layers.push(layer); 93 | }); 94 | return layers; 95 | } 96 | 97 | beforeEach(function () { 98 | this.map = L.map(document.createElement("div")); 99 | }); 100 | 101 | it("is can be added to the map", function () { 102 | (new L.OSM.DataLayer()).addTo(this.map); 103 | }); 104 | 105 | it("creates a Polyline for a way", function () { 106 | var osm = new L.OSM.DataLayer(fixture("way")); 107 | layers(osm).length.should.eq(1); 108 | layers(osm)[0].should.be.an.instanceof(L.Polyline); 109 | }); 110 | 111 | it("creates a Polygon for an area", function () { 112 | var osm = new L.OSM.DataLayer(fixture("area")); 113 | layers(osm).length.should.eq(1); 114 | layers(osm)[0].should.be.an.instanceof(L.Polygon); 115 | }); 116 | 117 | it("creates a CircleMarker for an interesting node", function () { 118 | var osm = new L.OSM.DataLayer(fixture("node")); 119 | layers(osm).length.should.eq(1); 120 | layers(osm)[0].should.be.an.instanceof(L.CircleMarker); 121 | }); 122 | 123 | it("creates a Rectangle for a changeset", function () { 124 | var osm = new L.OSM.DataLayer(fixture("changeset")); 125 | layers(osm).length.should.eq(1); 126 | layers(osm)[0].should.be.an.instanceof(L.Rectangle); 127 | }); 128 | 129 | it("sets the feature property on a layer", function () { 130 | var osm = new L.OSM.DataLayer(fixture("node")); 131 | layers(osm)[0].feature.should.have.property("type", "node"); 132 | layers(osm)[0].feature.should.have.property("id", "356552551"); 133 | }); 134 | 135 | it("sets a way's style", function () { 136 | var osm = new L.OSM.DataLayer(fixture("way"), {styles: {way: {color: "red"}}}); 137 | layers(osm)[0].options.should.have.property("color", "red"); 138 | }); 139 | 140 | it("sets an area's style", function () { 141 | var osm = new L.OSM.DataLayer(fixture("area"), {styles: {area: {color: "green"}}}); 142 | layers(osm)[0].options.should.have.property("color", "green"); 143 | }); 144 | 145 | it("sets a node's style", function () { 146 | var osm = new L.OSM.DataLayer(fixture("node"), {styles: {node: {color: "blue"}}}); 147 | layers(osm)[0].options.should.have.property("color", "blue"); 148 | }); 149 | 150 | describe("asynchronously", function() { 151 | function sleep(time = 0) { 152 | return new Promise(res => { 153 | setTimeout(() => res(), time); 154 | }); 155 | } 156 | 157 | it("can be added to the map", function () { 158 | (new L.OSM.DataLayer(null, {asynchronous: true})).addTo(this.map); 159 | }); 160 | 161 | it("creates a Polyline for a way", async function () { 162 | var osm = new L.OSM.DataLayer(fixture("way"), {asynchronous: true}); 163 | await sleep(1); 164 | layers(osm).length.should.eq(1); 165 | layers(osm)[0].should.be.an.instanceof(L.Polyline); 166 | }); 167 | 168 | it("creates a Polygon for an area", async function () { 169 | var osm = new L.OSM.DataLayer(fixture("area"), {asynchronous: true}); 170 | await sleep(1); 171 | layers(osm).length.should.eq(1); 172 | layers(osm)[0].should.be.an.instanceof(L.Polygon); 173 | }); 174 | 175 | it("creates a CircleMarker for an interesting node", async function () { 176 | var osm = new L.OSM.DataLayer(fixture("node"), {asynchronous: true}); 177 | await sleep(1); 178 | layers(osm).length.should.eq(1); 179 | layers(osm)[0].should.be.an.instanceof(L.CircleMarker); 180 | }); 181 | 182 | it("creates a Rectangle for a changeset", async function () { 183 | var osm = new L.OSM.DataLayer(fixture("changeset"), {asynchronous: true}); 184 | await sleep(1); 185 | layers(osm).length.should.eq(1); 186 | layers(osm)[0].should.be.an.instanceof(L.Rectangle); 187 | }); 188 | 189 | it("sets the feature property on a layer", async function () { 190 | var osm = new L.OSM.DataLayer(fixture("node"), {asynchronous: true}); 191 | await sleep(1); 192 | layers(osm)[0].feature.should.have.property("type", "node"); 193 | layers(osm)[0].feature.should.have.property("id", "356552551"); 194 | }); 195 | 196 | it("sets a way's style", async function () { 197 | var osm = new L.OSM.DataLayer(fixture("way"), {styles: {way: {color: "red"}}, asynchronous: true}); 198 | await sleep(1); 199 | layers(osm)[0].options.should.have.property("color", "red"); 200 | }); 201 | 202 | it("sets an area's style", async function () { 203 | var osm = new L.OSM.DataLayer(fixture("area"), {styles: {area: {color: "green"}}, asynchronous: true}); 204 | await sleep(1); 205 | layers(osm)[0].options.should.have.property("color", "green"); 206 | }); 207 | 208 | it("sets a node's style", async function () { 209 | var osm = new L.OSM.DataLayer(fixture("node"), {styles: {node: {color: "blue"}}, asynchronous: true}); 210 | await sleep(1); 211 | layers(osm)[0].options.should.have.property("color", "blue"); 212 | }); 213 | }); 214 | 215 | describe("#buildFeatures", function () { 216 | it("builds a node object", function () { 217 | var features = new L.OSM.DataLayer().buildFeatures(fixture("node")); 218 | features.length.should.eq(1); 219 | features[0].type.should.eq("node"); 220 | }); 221 | 222 | it("builds a way object", function () { 223 | var features = new L.OSM.DataLayer().buildFeatures(fixture("way")); 224 | features.length.should.eq(1); 225 | features[0].type.should.eq("way"); 226 | }); 227 | }); 228 | 229 | describe("#interestingNode", function () { 230 | var layer = new L.OSM.DataLayer(); 231 | 232 | it("returns true when the node is not in any ways", function () { 233 | layer.interestingNode({id: 1}, {}, {}).should.be.true; 234 | }); 235 | 236 | it("returns true when the node has an interesting tag", function () { 237 | var node = {id: 1, tags: {interesting: true}}; 238 | layer.interestingNode(node, {1: true}, {1: true}).should.be.true; 239 | }); 240 | 241 | it("returns false when the node is used in a way and has uninteresting tags", function () { 242 | var node = {id: 1, tags: {source: 'who cares?'}}; 243 | layer.interestingNode(node, {1: true}, {}).should.be.false; 244 | }); 245 | 246 | it("returns true when the node is used in a way and is used in a relation", function () { 247 | var node = {id: 1}; 248 | layer.interestingNode(node, {1: true}, {1: true}).should.be.true; 249 | }); 250 | }); 251 | }); 252 | }); --------------------------------------------------------------------------------