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/random/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.

129
frontend/node_modules/@turf/random/README.md generated vendored Normal file
View File

@@ -0,0 +1,129 @@
# @turf/random
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
## randomPosition
Returns a random position within a [box][1].
**Parameters**
- `bbox` **[Array][2]&lt;[number][3]>** a bounding box inside of which positions are placed. (optional, default `[-180,-90,180,90]`)
**Examples**
```javascript
var position = turf.randomPosition([-180, -90, 180, 90])
// => position
```
Returns **[Array][2]&lt;[number][3]>** Position [longitude, latitude]
## randomPoint
Returns a random [point][4].
**Parameters**
- `count` **[number][3]** how many geometries will be generated (optional, default `1`)
- `options` **[Object][5]** Optional parameters (optional, default `{}`)
- `options.bbox` **[Array][2]&lt;[number][3]>** a bounding box inside of which geometries are placed. (optional, default `[-180,-90,180,90]`)
**Examples**
```javascript
var points = turf.randomPoint(25, {bbox: [-180, -90, 180, 90]})
// => points
```
Returns **[FeatureCollection][6]&lt;[Point][7]>** GeoJSON FeatureCollection of points
## randomPolygon
Returns a random [polygon][8].
**Parameters**
- `count` **[number][3]** how many geometries will be generated (optional, default `1`)
- `options` **[Object][5]** Optional parameters (optional, default `{}`)
- `options.bbox` **[Array][2]&lt;[number][3]>** a bounding box inside of which geometries are placed. (optional, default `[-180,-90,180,90]`)
- `options.num_vertices` **[number][3]** is how many coordinates each LineString will contain. (optional, default `10`)
- `options.max_radial_length` **[number][3]** is the maximum number of decimal degrees latitude or longitude that a vertex can reach out of the center of the Polygon. (optional, default `10`)
**Examples**
```javascript
var polygons = turf.randomPolygon(25, {bbox: [-180, -90, 180, 90]})
// => polygons
```
Returns **[FeatureCollection][6]&lt;[Polygon][9]>** GeoJSON FeatureCollection of polygons
## randomLineString
Returns a random [linestring][10].
**Parameters**
- `count` **[number][3]** how many geometries will be generated (optional, default `1`)
- `options` **[Object][5]** Optional parameters (optional, default `{}`)
- `options.bbox` **[Array][2]&lt;[number][3]>** a bounding box inside of which geometries are placed. (optional, default `[-180,-90,180,90]`)
- `options.num_vertices` **[number][3]** is how many coordinates each LineString will contain. (optional, default `10`)
- `options.max_length` **[number][3]** is the maximum number of decimal degrees that a vertex can be from its predecessor (optional, default `0.0001`)
- `options.max_rotation` **[number][3]** is the maximum number of radians that a line segment can turn from the previous segment. (optional, default `Math.PI/8`)
**Examples**
```javascript
var lineStrings = turf.randomLineString(25, {bbox: [-180, -90, 180, 90]})
// => lineStrings
```
Returns **[FeatureCollection][6]&lt;[LineString][11]>** GeoJSON FeatureCollection of linestrings
[1]: bounding
[2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
[4]: point
[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
[6]: https://tools.ietf.org/html/rfc7946#section-3.3
[7]: https://tools.ietf.org/html/rfc7946#section-3.1.2
[8]: polygon
[9]: https://tools.ietf.org/html/rfc7946#section-3.1.6
[10]: linestring
[11]: https://tools.ietf.org/html/rfc7946#section-3.1.4
<!-- 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/random
```
Or install the Turf module that includes it as a function:
```sh
$ npm install @turf/turf
```

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

@@ -0,0 +1,188 @@
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
};
import { featureCollection, isNumber, isObject, lineString, point, polygon, } from "@turf/helpers";
/**
* Returns a random position within a {@link bounding box}.
*
* @name randomPosition
* @param {Array<number>} [bbox=[-180, -90, 180, 90]] a bounding box inside of which positions are placed.
* @returns {Array<number>} Position [longitude, latitude]
* @example
* var position = turf.randomPosition([-180, -90, 180, 90])
* // => position
*/
export function randomPosition(bbox) {
if (Array.isArray(bbox)) {
return coordInBBox(bbox);
}
if (bbox && bbox.bbox) {
return coordInBBox(bbox.bbox);
}
return [lon(), lat()];
}
/**
* Returns a random {@link point}.
*
* @name randomPoint
* @param {number} [count=1] how many geometries will be generated
* @param {Object} [options={}] Optional parameters
* @param {Array<number>} [options.bbox=[-180, -90, 180, 90]] a bounding box inside of which geometries are placed.
* @returns {FeatureCollection<Point>} GeoJSON FeatureCollection of points
* @example
* var points = turf.randomPoint(25, {bbox: [-180, -90, 180, 90]})
* // => points
*/
export function randomPoint(count, options) {
if (options === void 0) { options = {}; }
if (count === undefined || count === null) {
count = 1;
}
var features = [];
for (var i = 0; i < count; i++) {
features.push(point(randomPosition(options.bbox)));
}
return featureCollection(features);
}
/**
* Returns a random {@link polygon}.
*
* @name randomPolygon
* @param {number} [count=1] how many geometries will be generated
* @param {Object} [options={}] Optional parameters
* @param {Array<number>} [options.bbox=[-180, -90, 180, 90]] a bounding box inside of which geometries are placed.
* @param {number} [options.num_vertices=10] is how many coordinates each LineString will contain.
* @param {number} [options.max_radial_length=10] is the maximum number of decimal degrees latitude or longitude that a
* vertex can reach out of the center of the Polygon.
* @returns {FeatureCollection<Polygon>} GeoJSON FeatureCollection of polygons
* @example
* var polygons = turf.randomPolygon(25, {bbox: [-180, -90, 180, 90]})
* // => polygons
*/
export function randomPolygon(count, options) {
if (options === void 0) { options = {}; }
// Default param
if (count === undefined || count === null) {
count = 1;
}
if (!isNumber(options.num_vertices) || options.num_vertices === undefined) {
options.num_vertices = 10;
}
if (!isNumber(options.max_radial_length) ||
options.max_radial_length === undefined) {
options.max_radial_length = 10;
}
var features = [];
var _loop_1 = function (i) {
var vertices = [];
var circleOffsets = __spreadArrays(Array(options.num_vertices + 1)).map(Math.random);
// Sum Offsets
circleOffsets.forEach(function (cur, index, arr) {
arr[index] = index > 0 ? cur + arr[index - 1] : cur;
});
// scaleOffsets
circleOffsets.forEach(function (cur) {
cur = (cur * 2 * Math.PI) / circleOffsets[circleOffsets.length - 1];
var radialScaler = Math.random();
vertices.push([
radialScaler * (options.max_radial_length || 10) * Math.sin(cur),
radialScaler * (options.max_radial_length || 10) * Math.cos(cur),
]);
});
vertices[vertices.length - 1] = vertices[0]; // close the ring
// center the polygon around something
vertices = vertices.map(vertexToCoordinate(randomPosition(options.bbox)));
features.push(polygon([vertices]));
};
for (var i = 0; i < count; i++) {
_loop_1(i);
}
return featureCollection(features);
}
/**
* Returns a random {@link linestring}.
*
* @name randomLineString
* @param {number} [count=1] how many geometries will be generated
* @param {Object} [options={}] Optional parameters
* @param {Array<number>} [options.bbox=[-180, -90, 180, 90]] a bounding box inside of which geometries are placed.
* @param {number} [options.num_vertices=10] is how many coordinates each LineString will contain.
* @param {number} [options.max_length=0.0001] is the maximum number of decimal degrees that a
* vertex can be from its predecessor
* @param {number} [options.max_rotation=Math.PI / 8] is the maximum number of radians that a
* line segment can turn from the previous segment.
* @returns {FeatureCollection<LineString>} GeoJSON FeatureCollection of linestrings
* @example
* var lineStrings = turf.randomLineString(25, {bbox: [-180, -90, 180, 90]})
* // => lineStrings
*/
export function randomLineString(count, options) {
if (options === void 0) { options = {}; }
// Optional parameters
options = options || {};
if (!isObject(options)) {
throw new Error("options is invalid");
}
var bbox = options.bbox;
var num_vertices = options.num_vertices;
var max_length = options.max_length;
var max_rotation = options.max_rotation;
if (count === undefined || count === null) {
count = 1;
}
// Default parameters
if (!isNumber(num_vertices) ||
num_vertices === undefined ||
num_vertices < 2) {
num_vertices = 10;
}
if (!isNumber(max_length) || max_length === undefined) {
max_length = 0.0001;
}
if (!isNumber(max_rotation) || max_rotation === undefined) {
max_rotation = Math.PI / 8;
}
var features = [];
for (var i = 0; i < count; i++) {
var startingPoint = randomPosition(bbox);
var vertices = [startingPoint];
for (var j = 0; j < num_vertices - 1; j++) {
var priorAngle = j === 0
? Math.random() * 2 * Math.PI
: Math.tan((vertices[j][1] - vertices[j - 1][1]) /
(vertices[j][0] - vertices[j - 1][0]));
var angle = priorAngle + (Math.random() - 0.5) * max_rotation * 2;
var distance = Math.random() * max_length;
vertices.push([
vertices[j][0] + distance * Math.cos(angle),
vertices[j][1] + distance * Math.sin(angle),
]);
}
features.push(lineString(vertices));
}
return featureCollection(features);
}
function vertexToCoordinate(hub) {
return function (cur) {
return [cur[0] + hub[0], cur[1] + hub[1]];
};
}
function rnd() {
return Math.random() - 0.5;
}
function lon() {
return rnd() * 360;
}
function lat() {
return rnd() * 180;
}
function coordInBBox(bbox) {
return [
Math.random() * (bbox[2] - bbox[0]) + bbox[0],
Math.random() * (bbox[3] - bbox[1]) + bbox[1],
];
}

View File

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

72
frontend/node_modules/@turf/random/dist/js/index.d.ts generated vendored Executable file
View File

@@ -0,0 +1,72 @@
import { BBox, FeatureCollection, LineString, Point, Polygon, Position } from "@turf/helpers";
/**
* Returns a random position within a {@link bounding box}.
*
* @name randomPosition
* @param {Array<number>} [bbox=[-180, -90, 180, 90]] a bounding box inside of which positions are placed.
* @returns {Array<number>} Position [longitude, latitude]
* @example
* var position = turf.randomPosition([-180, -90, 180, 90])
* // => position
*/
export declare function randomPosition(bbox?: BBox | {
bbox: BBox;
}): Position;
/**
* Returns a random {@link point}.
*
* @name randomPoint
* @param {number} [count=1] how many geometries will be generated
* @param {Object} [options={}] Optional parameters
* @param {Array<number>} [options.bbox=[-180, -90, 180, 90]] a bounding box inside of which geometries are placed.
* @returns {FeatureCollection<Point>} GeoJSON FeatureCollection of points
* @example
* var points = turf.randomPoint(25, {bbox: [-180, -90, 180, 90]})
* // => points
*/
export declare function randomPoint(count?: number, options?: {
bbox?: BBox;
}): FeatureCollection<Point, any>;
/**
* Returns a random {@link polygon}.
*
* @name randomPolygon
* @param {number} [count=1] how many geometries will be generated
* @param {Object} [options={}] Optional parameters
* @param {Array<number>} [options.bbox=[-180, -90, 180, 90]] a bounding box inside of which geometries are placed.
* @param {number} [options.num_vertices=10] is how many coordinates each LineString will contain.
* @param {number} [options.max_radial_length=10] is the maximum number of decimal degrees latitude or longitude that a
* vertex can reach out of the center of the Polygon.
* @returns {FeatureCollection<Polygon>} GeoJSON FeatureCollection of polygons
* @example
* var polygons = turf.randomPolygon(25, {bbox: [-180, -90, 180, 90]})
* // => polygons
*/
export declare function randomPolygon(count?: number, options?: {
bbox?: BBox;
num_vertices?: number;
max_radial_length?: number;
}): FeatureCollection<Polygon, any>;
/**
* Returns a random {@link linestring}.
*
* @name randomLineString
* @param {number} [count=1] how many geometries will be generated
* @param {Object} [options={}] Optional parameters
* @param {Array<number>} [options.bbox=[-180, -90, 180, 90]] a bounding box inside of which geometries are placed.
* @param {number} [options.num_vertices=10] is how many coordinates each LineString will contain.
* @param {number} [options.max_length=0.0001] is the maximum number of decimal degrees that a
* vertex can be from its predecessor
* @param {number} [options.max_rotation=Math.PI / 8] is the maximum number of radians that a
* line segment can turn from the previous segment.
* @returns {FeatureCollection<LineString>} GeoJSON FeatureCollection of linestrings
* @example
* var lineStrings = turf.randomLineString(25, {bbox: [-180, -90, 180, 90]})
* // => lineStrings
*/
export declare function randomLineString(count?: number, options?: {
bbox?: BBox;
num_vertices?: number;
max_length?: number;
max_rotation?: number;
}): FeatureCollection<LineString, any>;

194
frontend/node_modules/@turf/random/dist/js/index.js generated vendored Executable file
View File

@@ -0,0 +1,194 @@
"use strict";
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
};
Object.defineProperty(exports, "__esModule", { value: true });
var helpers_1 = require("@turf/helpers");
/**
* Returns a random position within a {@link bounding box}.
*
* @name randomPosition
* @param {Array<number>} [bbox=[-180, -90, 180, 90]] a bounding box inside of which positions are placed.
* @returns {Array<number>} Position [longitude, latitude]
* @example
* var position = turf.randomPosition([-180, -90, 180, 90])
* // => position
*/
function randomPosition(bbox) {
if (Array.isArray(bbox)) {
return coordInBBox(bbox);
}
if (bbox && bbox.bbox) {
return coordInBBox(bbox.bbox);
}
return [lon(), lat()];
}
exports.randomPosition = randomPosition;
/**
* Returns a random {@link point}.
*
* @name randomPoint
* @param {number} [count=1] how many geometries will be generated
* @param {Object} [options={}] Optional parameters
* @param {Array<number>} [options.bbox=[-180, -90, 180, 90]] a bounding box inside of which geometries are placed.
* @returns {FeatureCollection<Point>} GeoJSON FeatureCollection of points
* @example
* var points = turf.randomPoint(25, {bbox: [-180, -90, 180, 90]})
* // => points
*/
function randomPoint(count, options) {
if (options === void 0) { options = {}; }
if (count === undefined || count === null) {
count = 1;
}
var features = [];
for (var i = 0; i < count; i++) {
features.push(helpers_1.point(randomPosition(options.bbox)));
}
return helpers_1.featureCollection(features);
}
exports.randomPoint = randomPoint;
/**
* Returns a random {@link polygon}.
*
* @name randomPolygon
* @param {number} [count=1] how many geometries will be generated
* @param {Object} [options={}] Optional parameters
* @param {Array<number>} [options.bbox=[-180, -90, 180, 90]] a bounding box inside of which geometries are placed.
* @param {number} [options.num_vertices=10] is how many coordinates each LineString will contain.
* @param {number} [options.max_radial_length=10] is the maximum number of decimal degrees latitude or longitude that a
* vertex can reach out of the center of the Polygon.
* @returns {FeatureCollection<Polygon>} GeoJSON FeatureCollection of polygons
* @example
* var polygons = turf.randomPolygon(25, {bbox: [-180, -90, 180, 90]})
* // => polygons
*/
function randomPolygon(count, options) {
if (options === void 0) { options = {}; }
// Default param
if (count === undefined || count === null) {
count = 1;
}
if (!helpers_1.isNumber(options.num_vertices) || options.num_vertices === undefined) {
options.num_vertices = 10;
}
if (!helpers_1.isNumber(options.max_radial_length) ||
options.max_radial_length === undefined) {
options.max_radial_length = 10;
}
var features = [];
var _loop_1 = function (i) {
var vertices = [];
var circleOffsets = __spreadArrays(Array(options.num_vertices + 1)).map(Math.random);
// Sum Offsets
circleOffsets.forEach(function (cur, index, arr) {
arr[index] = index > 0 ? cur + arr[index - 1] : cur;
});
// scaleOffsets
circleOffsets.forEach(function (cur) {
cur = (cur * 2 * Math.PI) / circleOffsets[circleOffsets.length - 1];
var radialScaler = Math.random();
vertices.push([
radialScaler * (options.max_radial_length || 10) * Math.sin(cur),
radialScaler * (options.max_radial_length || 10) * Math.cos(cur),
]);
});
vertices[vertices.length - 1] = vertices[0]; // close the ring
// center the polygon around something
vertices = vertices.map(vertexToCoordinate(randomPosition(options.bbox)));
features.push(helpers_1.polygon([vertices]));
};
for (var i = 0; i < count; i++) {
_loop_1(i);
}
return helpers_1.featureCollection(features);
}
exports.randomPolygon = randomPolygon;
/**
* Returns a random {@link linestring}.
*
* @name randomLineString
* @param {number} [count=1] how many geometries will be generated
* @param {Object} [options={}] Optional parameters
* @param {Array<number>} [options.bbox=[-180, -90, 180, 90]] a bounding box inside of which geometries are placed.
* @param {number} [options.num_vertices=10] is how many coordinates each LineString will contain.
* @param {number} [options.max_length=0.0001] is the maximum number of decimal degrees that a
* vertex can be from its predecessor
* @param {number} [options.max_rotation=Math.PI / 8] is the maximum number of radians that a
* line segment can turn from the previous segment.
* @returns {FeatureCollection<LineString>} GeoJSON FeatureCollection of linestrings
* @example
* var lineStrings = turf.randomLineString(25, {bbox: [-180, -90, 180, 90]})
* // => lineStrings
*/
function randomLineString(count, options) {
if (options === void 0) { options = {}; }
// Optional parameters
options = options || {};
if (!helpers_1.isObject(options)) {
throw new Error("options is invalid");
}
var bbox = options.bbox;
var num_vertices = options.num_vertices;
var max_length = options.max_length;
var max_rotation = options.max_rotation;
if (count === undefined || count === null) {
count = 1;
}
// Default parameters
if (!helpers_1.isNumber(num_vertices) ||
num_vertices === undefined ||
num_vertices < 2) {
num_vertices = 10;
}
if (!helpers_1.isNumber(max_length) || max_length === undefined) {
max_length = 0.0001;
}
if (!helpers_1.isNumber(max_rotation) || max_rotation === undefined) {
max_rotation = Math.PI / 8;
}
var features = [];
for (var i = 0; i < count; i++) {
var startingPoint = randomPosition(bbox);
var vertices = [startingPoint];
for (var j = 0; j < num_vertices - 1; j++) {
var priorAngle = j === 0
? Math.random() * 2 * Math.PI
: Math.tan((vertices[j][1] - vertices[j - 1][1]) /
(vertices[j][0] - vertices[j - 1][0]));
var angle = priorAngle + (Math.random() - 0.5) * max_rotation * 2;
var distance = Math.random() * max_length;
vertices.push([
vertices[j][0] + distance * Math.cos(angle),
vertices[j][1] + distance * Math.sin(angle),
]);
}
features.push(helpers_1.lineString(vertices));
}
return helpers_1.featureCollection(features);
}
exports.randomLineString = randomLineString;
function vertexToCoordinate(hub) {
return function (cur) {
return [cur[0] + hub[0], cur[1] + hub[1]];
};
}
function rnd() {
return Math.random() - 0.5;
}
function lon() {
return rnd() * 360;
}
function lat() {
return rnd() * 180;
}
function coordInBBox(bbox) {
return [
Math.random() * (bbox[2] - bbox[0]) + bbox[0],
Math.random() * (bbox[3] - bbox[1]) + bbox[1],
];
}

60
frontend/node_modules/@turf/random/package.json generated vendored Normal file
View File

@@ -0,0 +1,60 @@
{
"name": "@turf/random",
"version": "6.5.0",
"description": "turf random module",
"author": "Turf Authors",
"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",
"gis"
],
"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": "dist/js/index.d.ts",
"sideEffects": false,
"files": [
"dist"
],
"scripts": {
"bench": "ts-node bench.js",
"build": "npm-run-all build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc",
"docs": "node ../../scripts/generate-readmes",
"test": "npm-run-all test:*",
"test:tape": "ts-node -r esm test.js"
},
"devDependencies": {
"@types/tape": "*",
"benchmark": "*",
"glob": "*",
"npm-run-all": "*",
"tape": "*",
"ts-node": "*",
"tslint": "*",
"typescript": "*"
},
"dependencies": {
"@turf/helpers": "^6.5.0"
},
"gitHead": "5375941072b90d489389db22b43bfe809d5e451e"
}