all these changes

This commit is contained in:
Jake Kasper
2026-04-09 13:19:47 -05:00
parent e83a51a051
commit 65315f36d1
39102 changed files with 7932979 additions and 567 deletions

20
frontend/node_modules/@turf/tesselate/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2017 TurfJS
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

61
frontend/node_modules/@turf/tesselate/README.md generated vendored Normal file
View File

@@ -0,0 +1,61 @@
# @turf/tesselate
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
## tesselate
Tesselates a [Feature&lt;Polygon>][1] into a [FeatureCollection&lt;Polygon>][2] of triangles
using [earcut][3].
**Parameters**
- `poly` **[Feature][4]&lt;[Polygon][5]>** the polygon to tesselate
**Examples**
```javascript
var poly = turf.polygon([[[11, 0], [22, 4], [31, 0], [31, 11], [21, 15], [11, 11], [11, 0]]]);
var triangles = turf.tesselate(poly);
//addToMap
var addToMap = [poly, triangles]
```
Returns **[FeatureCollection][6]&lt;[Polygon][5]>** a geometrycollection feature
[1]: Feature<Polygon>
[2]: FeatureCollection<Polygon>
[3]: https://github.com/mapbox/earcut
[4]: https://tools.ietf.org/html/rfc7946#section-3.2
[5]: https://tools.ietf.org/html/rfc7946#section-3.1.6
[6]: https://tools.ietf.org/html/rfc7946#section-3.3
<!-- This file is automatically generated. Please don't edit it directly:
if you find an error, edit the source file (likely index.js), and re-run
./scripts/generate-readmes in the turf project. -->
---
This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.
### Installation
Install this module individually:
```sh
$ npm install @turf/tesselate
```
Or install the Turf module that includes it as a function:
```sh
$ npm install @turf/turf
```

79
frontend/node_modules/@turf/tesselate/dist/es/index.js generated vendored Executable file
View File

@@ -0,0 +1,79 @@
import earcut from 'earcut';
import { polygon } from '@turf/helpers';
/**
* Tesselates a {@link Feature<Polygon>} into a {@link FeatureCollection<Polygon>} of triangles
* using [earcut](https://github.com/mapbox/earcut).
*
* @name tesselate
* @param {Feature<Polygon>} poly the polygon to tesselate
* @returns {FeatureCollection<Polygon>} a geometrycollection feature
* @example
* var poly = turf.polygon([[[11, 0], [22, 4], [31, 0], [31, 11], [21, 15], [11, 11], [11, 0]]]);
* var triangles = turf.tesselate(poly);
*
* //addToMap
* var addToMap = [poly, triangles]
*/
function tesselate(poly) {
if (
!poly.geometry ||
(poly.geometry.type !== "Polygon" && poly.geometry.type !== "MultiPolygon")
) {
throw new Error("input must be a Polygon or MultiPolygon");
}
var fc = { type: "FeatureCollection", features: [] };
if (poly.geometry.type === "Polygon") {
fc.features = processPolygon(poly.geometry.coordinates);
} else {
poly.geometry.coordinates.forEach(function (coordinates) {
fc.features = fc.features.concat(processPolygon(coordinates));
});
}
return fc;
}
function processPolygon(coordinates) {
var data = flattenCoords(coordinates);
var dim = 2;
var result = earcut(data.vertices, data.holes, dim);
var features = [];
var vertices = [];
result.forEach(function (vert, i) {
var index = result[i];
vertices.push([data.vertices[index * dim], data.vertices[index * dim + 1]]);
});
for (var i = 0; i < vertices.length; i += 3) {
var coords = vertices.slice(i, i + 3);
coords.push(vertices[i]);
features.push(polygon([coords]));
}
return features;
}
function flattenCoords(data) {
var dim = data[0][0].length,
result = { vertices: [], holes: [], dimensions: dim },
holeIndex = 0;
for (var i = 0; i < data.length; i++) {
for (var j = 0; j < data[i].length; j++) {
for (var d = 0; d < dim; d++) result.vertices.push(data[i][j][d]);
}
if (i > 0) {
holeIndex += data[i - 1].length;
result.holes.push(holeIndex);
}
}
return result;
}
export default tesselate;

View File

@@ -0,0 +1 @@
{"type":"module"}

86
frontend/node_modules/@turf/tesselate/dist/js/index.js generated vendored Executable file
View File

@@ -0,0 +1,86 @@
'use strict';
var earcut = require('earcut');
var helpers = require('@turf/helpers');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var earcut__default = /*#__PURE__*/_interopDefaultLegacy(earcut);
/**
* Tesselates a {@link Feature<Polygon>} into a {@link FeatureCollection<Polygon>} of triangles
* using [earcut](https://github.com/mapbox/earcut).
*
* @name tesselate
* @param {Feature<Polygon>} poly the polygon to tesselate
* @returns {FeatureCollection<Polygon>} a geometrycollection feature
* @example
* var poly = turf.polygon([[[11, 0], [22, 4], [31, 0], [31, 11], [21, 15], [11, 11], [11, 0]]]);
* var triangles = turf.tesselate(poly);
*
* //addToMap
* var addToMap = [poly, triangles]
*/
function tesselate(poly) {
if (
!poly.geometry ||
(poly.geometry.type !== "Polygon" && poly.geometry.type !== "MultiPolygon")
) {
throw new Error("input must be a Polygon or MultiPolygon");
}
var fc = { type: "FeatureCollection", features: [] };
if (poly.geometry.type === "Polygon") {
fc.features = processPolygon(poly.geometry.coordinates);
} else {
poly.geometry.coordinates.forEach(function (coordinates) {
fc.features = fc.features.concat(processPolygon(coordinates));
});
}
return fc;
}
function processPolygon(coordinates) {
var data = flattenCoords(coordinates);
var dim = 2;
var result = earcut__default['default'](data.vertices, data.holes, dim);
var features = [];
var vertices = [];
result.forEach(function (vert, i) {
var index = result[i];
vertices.push([data.vertices[index * dim], data.vertices[index * dim + 1]]);
});
for (var i = 0; i < vertices.length; i += 3) {
var coords = vertices.slice(i, i + 3);
coords.push(vertices[i]);
features.push(helpers.polygon([coords]));
}
return features;
}
function flattenCoords(data) {
var dim = data[0][0].length,
result = { vertices: [], holes: [], dimensions: dim },
holeIndex = 0;
for (var i = 0; i < data.length; i++) {
for (var j = 0; j < data[i].length; j++) {
for (var d = 0; d < dim; d++) result.vertices.push(data[i][j][d]);
}
if (i > 0) {
holeIndex += data[i - 1].length;
result.holes.push(holeIndex);
}
}
return result;
}
module.exports = tesselate;
module.exports.default = tesselate;

6
frontend/node_modules/@turf/tesselate/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,6 @@
import { Feature, FeatureCollection, Polygon } from "@turf/helpers";
/**
* http://turfjs.org/docs/#tesselate
*/
export default function (polygon: Feature<Polygon>): FeatureCollection<Polygon>;

66
frontend/node_modules/@turf/tesselate/package.json generated vendored Normal file
View File

@@ -0,0 +1,66 @@
{
"name": "@turf/tesselate",
"version": "6.5.0",
"description": "turf tesselate module",
"author": "Turf Authors",
"contributors": [
"Abel Vázquez <@AbelVM>",
"Morgan Herlocker <@morganherlocker>",
"Tom MacWright <@tmcw>",
"Vladimir Agafonkin <@mourner>"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/Turfjs/turf/issues"
},
"homepage": "https://github.com/Turfjs/turf",
"repository": {
"type": "git",
"url": "git://github.com/Turfjs/turf.git"
},
"funding": "https://opencollective.com/turf",
"publishConfig": {
"access": "public"
},
"keywords": [
"turf",
"turfjs",
"tesselation",
"earcut",
"polygon",
"triangles"
],
"main": "dist/js/index.js",
"module": "dist/es/index.js",
"exports": {
"./package.json": "./package.json",
".": {
"import": "./dist/es/index.js",
"require": "./dist/js/index.js"
}
},
"types": "index.d.ts",
"sideEffects": false,
"files": [
"dist",
"index.d.ts"
],
"scripts": {
"bench": "node -r esm bench.js",
"build": "rollup -c ../../rollup.config.js && echo '{\"type\":\"module\"}' > dist/es/package.json",
"docs": "node ../../scripts/generate-readmes",
"test": "npm-run-all test:*",
"test:tape": "node -r esm test.js"
},
"devDependencies": {
"benchmark": "*",
"npm-run-all": "*",
"rollup": "*",
"tape": "*"
},
"dependencies": {
"@turf/helpers": "^6.5.0",
"earcut": "^2.0.0"
},
"gitHead": "5375941072b90d489389db22b43bfe809d5e451e"
}