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/transform-scale/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.

66
frontend/node_modules/@turf/transform-scale/README.md generated vendored Normal file
View File

@@ -0,0 +1,66 @@
# @turf/transform-scale
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
## transformScale
Scale a GeoJSON from a given point by a factor of scaling (ex: factor=2 would make the GeoJSON 200% larger).
If a FeatureCollection is provided, the origin point will be calculated based on each individual Feature.
**Parameters**
- `geojson` **[GeoJSON][1]** GeoJSON to be scaled
- `factor` **[number][2]** of scaling, positive or negative values greater than 0
- `options` **[Object][3]** Optional parameters (optional, default `{}`)
- `options.origin` **([string][4] \| [Coord][5])** Point from which the scaling will occur (string options: sw/se/nw/ne/center/centroid) (optional, default `'centroid'`)
- `options.mutate` **[boolean][6]** allows GeoJSON input to be mutated (significant performance increase if true) (optional, default `false`)
**Examples**
```javascript
var poly = turf.polygon([[[0,29],[3.5,29],[2.5,32],[0,29]]]);
var scaledPoly = turf.transformScale(poly, 3);
//addToMap
var addToMap = [poly, scaledPoly];
scaledPoly.properties = {stroke: '#F00', 'stroke-width': 4};
```
Returns **[GeoJSON][1]** scaled GeoJSON
[1]: https://tools.ietf.org/html/rfc7946#section-3
[2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
[5]: https://tools.ietf.org/html/rfc7946#section-3.1.1
[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
<!-- 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/transform-scale
```
Or install the Turf module that includes it as a function:
```sh
$ npm install @turf/turf
```

144
frontend/node_modules/@turf/transform-scale/dist/es/index.js generated vendored Executable file
View File

@@ -0,0 +1,144 @@
import clone from '@turf/clone';
import center from '@turf/center';
import centroid from '@turf/centroid';
import turfBBox from '@turf/bbox';
import rhumbBearing from '@turf/rhumb-bearing';
import rhumbDistance from '@turf/rhumb-distance';
import rhumbDestination from '@turf/rhumb-destination';
import { featureEach, coordEach } from '@turf/meta';
import { isObject, point } from '@turf/helpers';
import { getType, getCoords, getCoord } from '@turf/invariant';
/**
* Scale a GeoJSON from a given point by a factor of scaling (ex: factor=2 would make the GeoJSON 200% larger).
* If a FeatureCollection is provided, the origin point will be calculated based on each individual Feature.
*
* @name transformScale
* @param {GeoJSON} geojson GeoJSON to be scaled
* @param {number} factor of scaling, positive or negative values greater than 0
* @param {Object} [options={}] Optional parameters
* @param {string|Coord} [options.origin='centroid'] Point from which the scaling will occur (string options: sw/se/nw/ne/center/centroid)
* @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance increase if true)
* @returns {GeoJSON} scaled GeoJSON
* @example
* var poly = turf.polygon([[[0,29],[3.5,29],[2.5,32],[0,29]]]);
* var scaledPoly = turf.transformScale(poly, 3);
*
* //addToMap
* var addToMap = [poly, scaledPoly];
* scaledPoly.properties = {stroke: '#F00', 'stroke-width': 4};
*/
function transformScale(geojson, factor, options) {
// Optional parameters
options = options || {};
if (!isObject(options)) throw new Error("options is invalid");
var origin = options.origin;
var mutate = options.mutate;
// Input validation
if (!geojson) throw new Error("geojson required");
if (typeof factor !== "number" || factor === 0)
throw new Error("invalid factor");
var originIsPoint = Array.isArray(origin) || typeof origin === "object";
// Clone geojson to avoid side effects
if (mutate !== true) geojson = clone(geojson);
// Scale each Feature separately
if (geojson.type === "FeatureCollection" && !originIsPoint) {
featureEach(geojson, function (feature, index) {
geojson.features[index] = scale(feature, factor, origin);
});
return geojson;
}
// Scale Feature/Geometry
return scale(geojson, factor, origin);
}
/**
* Scale Feature/Geometry
*
* @private
* @param {Feature|Geometry} feature GeoJSON Feature/Geometry
* @param {number} factor of scaling, positive or negative values greater than 0
* @param {string|Coord} [origin="centroid"] Point from which the scaling will occur (string options: sw/se/nw/ne/center/centroid)
* @returns {Feature|Geometry} scaled GeoJSON Feature/Geometry
*/
function scale(feature, factor, origin) {
// Default params
var isPoint = getType(feature) === "Point";
origin = defineOrigin(feature, origin);
// Shortcut no-scaling
if (factor === 1 || isPoint) return feature;
// Scale each coordinate
coordEach(feature, function (coord) {
var originalDistance = rhumbDistance(origin, coord);
var bearing = rhumbBearing(origin, coord);
var newDistance = originalDistance * factor;
var newCoord = getCoords(rhumbDestination(origin, newDistance, bearing));
coord[0] = newCoord[0];
coord[1] = newCoord[1];
if (coord.length === 3) coord[2] *= factor;
});
return feature;
}
/**
* Define Origin
*
* @private
* @param {GeoJSON} geojson GeoJSON
* @param {string|Coord} origin sw/se/nw/ne/center/centroid
* @returns {Feature<Point>} Point origin
*/
function defineOrigin(geojson, origin) {
// Default params
if (origin === undefined || origin === null) origin = "centroid";
// Input Coord
if (Array.isArray(origin) || typeof origin === "object")
return getCoord(origin);
// Define BBox
var bbox = geojson.bbox ? geojson.bbox : turfBBox(geojson);
var west = bbox[0];
var south = bbox[1];
var east = bbox[2];
var north = bbox[3];
switch (origin) {
case "sw":
case "southwest":
case "westsouth":
case "bottomleft":
return point([west, south]);
case "se":
case "southeast":
case "eastsouth":
case "bottomright":
return point([east, south]);
case "nw":
case "northwest":
case "westnorth":
case "topleft":
return point([west, north]);
case "ne":
case "northeast":
case "eastnorth":
case "topright":
return point([east, north]);
case "center":
return center(geojson);
case undefined:
case null:
case "centroid":
return centroid(geojson);
default:
throw new Error("invalid origin");
}
}
export default transformScale;

View File

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

157
frontend/node_modules/@turf/transform-scale/dist/js/index.js generated vendored Executable file
View File

@@ -0,0 +1,157 @@
'use strict';
var clone = require('@turf/clone');
var center = require('@turf/center');
var centroid = require('@turf/centroid');
var turfBBox = require('@turf/bbox');
var rhumbBearing = require('@turf/rhumb-bearing');
var rhumbDistance = require('@turf/rhumb-distance');
var rhumbDestination = require('@turf/rhumb-destination');
var meta = require('@turf/meta');
var helpers = require('@turf/helpers');
var invariant = require('@turf/invariant');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var clone__default = /*#__PURE__*/_interopDefaultLegacy(clone);
var center__default = /*#__PURE__*/_interopDefaultLegacy(center);
var centroid__default = /*#__PURE__*/_interopDefaultLegacy(centroid);
var turfBBox__default = /*#__PURE__*/_interopDefaultLegacy(turfBBox);
var rhumbBearing__default = /*#__PURE__*/_interopDefaultLegacy(rhumbBearing);
var rhumbDistance__default = /*#__PURE__*/_interopDefaultLegacy(rhumbDistance);
var rhumbDestination__default = /*#__PURE__*/_interopDefaultLegacy(rhumbDestination);
/**
* Scale a GeoJSON from a given point by a factor of scaling (ex: factor=2 would make the GeoJSON 200% larger).
* If a FeatureCollection is provided, the origin point will be calculated based on each individual Feature.
*
* @name transformScale
* @param {GeoJSON} geojson GeoJSON to be scaled
* @param {number} factor of scaling, positive or negative values greater than 0
* @param {Object} [options={}] Optional parameters
* @param {string|Coord} [options.origin='centroid'] Point from which the scaling will occur (string options: sw/se/nw/ne/center/centroid)
* @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance increase if true)
* @returns {GeoJSON} scaled GeoJSON
* @example
* var poly = turf.polygon([[[0,29],[3.5,29],[2.5,32],[0,29]]]);
* var scaledPoly = turf.transformScale(poly, 3);
*
* //addToMap
* var addToMap = [poly, scaledPoly];
* scaledPoly.properties = {stroke: '#F00', 'stroke-width': 4};
*/
function transformScale(geojson, factor, options) {
// Optional parameters
options = options || {};
if (!helpers.isObject(options)) throw new Error("options is invalid");
var origin = options.origin;
var mutate = options.mutate;
// Input validation
if (!geojson) throw new Error("geojson required");
if (typeof factor !== "number" || factor === 0)
throw new Error("invalid factor");
var originIsPoint = Array.isArray(origin) || typeof origin === "object";
// Clone geojson to avoid side effects
if (mutate !== true) geojson = clone__default['default'](geojson);
// Scale each Feature separately
if (geojson.type === "FeatureCollection" && !originIsPoint) {
meta.featureEach(geojson, function (feature, index) {
geojson.features[index] = scale(feature, factor, origin);
});
return geojson;
}
// Scale Feature/Geometry
return scale(geojson, factor, origin);
}
/**
* Scale Feature/Geometry
*
* @private
* @param {Feature|Geometry} feature GeoJSON Feature/Geometry
* @param {number} factor of scaling, positive or negative values greater than 0
* @param {string|Coord} [origin="centroid"] Point from which the scaling will occur (string options: sw/se/nw/ne/center/centroid)
* @returns {Feature|Geometry} scaled GeoJSON Feature/Geometry
*/
function scale(feature, factor, origin) {
// Default params
var isPoint = invariant.getType(feature) === "Point";
origin = defineOrigin(feature, origin);
// Shortcut no-scaling
if (factor === 1 || isPoint) return feature;
// Scale each coordinate
meta.coordEach(feature, function (coord) {
var originalDistance = rhumbDistance__default['default'](origin, coord);
var bearing = rhumbBearing__default['default'](origin, coord);
var newDistance = originalDistance * factor;
var newCoord = invariant.getCoords(rhumbDestination__default['default'](origin, newDistance, bearing));
coord[0] = newCoord[0];
coord[1] = newCoord[1];
if (coord.length === 3) coord[2] *= factor;
});
return feature;
}
/**
* Define Origin
*
* @private
* @param {GeoJSON} geojson GeoJSON
* @param {string|Coord} origin sw/se/nw/ne/center/centroid
* @returns {Feature<Point>} Point origin
*/
function defineOrigin(geojson, origin) {
// Default params
if (origin === undefined || origin === null) origin = "centroid";
// Input Coord
if (Array.isArray(origin) || typeof origin === "object")
return invariant.getCoord(origin);
// Define BBox
var bbox = geojson.bbox ? geojson.bbox : turfBBox__default['default'](geojson);
var west = bbox[0];
var south = bbox[1];
var east = bbox[2];
var north = bbox[3];
switch (origin) {
case "sw":
case "southwest":
case "westsouth":
case "bottomleft":
return helpers.point([west, south]);
case "se":
case "southeast":
case "eastsouth":
case "bottomright":
return helpers.point([east, south]);
case "nw":
case "northwest":
case "westnorth":
case "topleft":
return helpers.point([west, north]);
case "ne":
case "northeast":
case "eastnorth":
case "topright":
return helpers.point([east, north]);
case "center":
return center__default['default'](geojson);
case undefined:
case null:
case "centroid":
return centroid__default['default'](geojson);
default:
throw new Error("invalid origin");
}
}
module.exports = transformScale;
module.exports.default = transformScale;

13
frontend/node_modules/@turf/transform-scale/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,13 @@
import { Corners, Coord, AllGeoJSON } from "@turf/helpers";
/**
* http://turfjs.org/docs/#transformscale
*/
export default function transformScale<T extends AllGeoJSON>(
geojson: T,
factor: number,
options?: {
origin?: Corners | Coord;
mutate?: boolean;
}
): T;

View File

@@ -0,0 +1,80 @@
{
"name": "@turf/transform-scale",
"version": "6.5.0",
"description": "turf transform-scale module",
"author": "Turf Authors",
"contributors": [
"Stefano Borghi <@stebogit>",
"Denis Carriere <@DenisCarriere>"
],
"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",
"transform",
"transformation",
"scale",
"enlarge",
"contract",
"zoom-in",
"zoom-out"
],
"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",
"test:types": "tsc --esModuleInterop --noEmit types.ts"
},
"devDependencies": {
"@turf/bbox-polygon": "^6.5.0",
"@turf/hex-grid": "^6.5.0",
"@turf/truncate": "^6.5.0",
"benchmark": "*",
"load-json-file": "*",
"npm-run-all": "*",
"rollup": "*",
"tape": "*",
"write-json-file": "*"
},
"dependencies": {
"@turf/bbox": "^6.5.0",
"@turf/center": "^6.5.0",
"@turf/centroid": "^6.5.0",
"@turf/clone": "^6.5.0",
"@turf/helpers": "^6.5.0",
"@turf/invariant": "^6.5.0",
"@turf/meta": "^6.5.0",
"@turf/rhumb-bearing": "^6.5.0",
"@turf/rhumb-destination": "^6.5.0",
"@turf/rhumb-distance": "^6.5.0"
},
"gitHead": "5375941072b90d489389db22b43bfe809d5e451e"
}