Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@math.gl/polygon

Package Overview
Dependencies
Maintainers
3
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@math.gl/polygon - npm Package Compare versions

Comparing version 3.5.6 to 3.6.0-alpha.1

dist/cut-by-grid.d.ts

145

dist/es5/cut-by-grid.js

@@ -13,27 +13,22 @@ "use strict";

function cutPolylineByGrid(positions) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var _options$size = options.size,
size = _options$size === void 0 ? 2 : _options$size,
_options$broken = options.broken,
broken = _options$broken === void 0 ? false : _options$broken,
_options$gridResoluti = options.gridResolution,
gridResolution = _options$gridResoluti === void 0 ? 10 : _options$gridResoluti,
_options$gridOffset = options.gridOffset,
gridOffset = _options$gridOffset === void 0 ? [0, 0] : _options$gridOffset,
_options$startIndex = options.startIndex,
startIndex = _options$startIndex === void 0 ? 0 : _options$startIndex,
_options$endIndex = options.endIndex,
endIndex = _options$endIndex === void 0 ? positions.length : _options$endIndex;
var numPoints = (endIndex - startIndex) / size;
var part = [];
var result = [part];
var a = (0, _utils.getPointAtIndex)(positions, 0, size, startIndex);
var b;
var codeB;
var cell = getGridCell(a, gridResolution, gridOffset, []);
var scratchPoint = [];
function cutPolylineByGrid(positions, options) {
const {
size = 2,
broken = false,
gridResolution = 10,
gridOffset = [0, 0],
startIndex = 0,
endIndex = positions.length
} = options || {};
const numPoints = (endIndex - startIndex) / size;
let part = [];
const result = [part];
const a = (0, _utils.getPointAtIndex)(positions, 0, size, startIndex);
let b;
let codeB;
const cell = getGridCell(a, gridResolution, gridOffset, []);
const scratchPoint = [];
(0, _utils.push)(part, a);
for (var i = 1; i < numPoints; i++) {
for (let i = 1; i < numPoints; i++) {
b = (0, _utils.getPointAtIndex)(positions, i, size, startIndex, b);

@@ -44,3 +39,3 @@ codeB = (0, _lineclip.bitCode)(b, cell);

(0, _lineclip.intersect)(a, b, codeB, cell, scratchPoint);
var codeAlt = (0, _lineclip.bitCode)(scratchPoint, cell);
const codeAlt = (0, _lineclip.bitCode)(scratchPoint, cell);

@@ -72,7 +67,7 @@ if (codeAlt) {

var TYPE_INSIDE = 0;
var TYPE_BORDER = 1;
const TYPE_INSIDE = 0;
const TYPE_BORDER = 1;
function concatInPlace(arr1, arr2) {
for (var i = 0; i < arr2.length; i++) {
for (let i = 0; i < arr2.length; i++) {
arr1.push(arr2[i]);

@@ -84,5 +79,3 @@ }

function cutPolygonByGrid(positions, holeIndices) {
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
function cutPolygonByGrid(positions, holeIndices = null, options) {
if (!positions.length) {

@@ -92,12 +85,10 @@ return [];

var _options$size2 = options.size,
size = _options$size2 === void 0 ? 2 : _options$size2,
_options$gridResoluti2 = options.gridResolution,
gridResolution = _options$gridResoluti2 === void 0 ? 10 : _options$gridResoluti2,
_options$gridOffset2 = options.gridOffset,
gridOffset = _options$gridOffset2 === void 0 ? [0, 0] : _options$gridOffset2,
_options$edgeTypes = options.edgeTypes,
edgeTypes = _options$edgeTypes === void 0 ? false : _options$edgeTypes;
var result = [];
var queue = [{
const {
size = 2,
gridResolution = 10,
gridOffset = [0, 0],
edgeTypes = false
} = options || {};
const result = [];
const queue = [{
pos: positions,

@@ -107,18 +98,18 @@ types: edgeTypes && new Array(positions.length / size).fill(TYPE_BORDER),

}];
var bbox = [[], []];
var cell = [];
const bbox = [[], []];
let cell = [];
while (queue.length) {
var _queue$shift = queue.shift(),
pos = _queue$shift.pos,
types = _queue$shift.types,
holes = _queue$shift.holes;
const {
pos,
types,
holes
} = queue.shift();
getBoundingBox(pos, size, holes[0] || pos.length, bbox);
cell = getGridCell(bbox[0], gridResolution, gridOffset, cell);
var code = (0, _lineclip.bitCode)(bbox[1], cell);
const code = (0, _lineclip.bitCode)(bbox[1], cell);
if (code) {
var parts = bisectPolygon(pos, types, size, 0, holes[0] || pos.length, cell, code);
var polygonLow = {
let parts = bisectPolygon(pos, types, size, 0, holes[0] || pos.length, cell, code);
const polygonLow = {
pos: parts[0].pos,

@@ -128,3 +119,3 @@ types: parts[0].types,

};
var polygonHigh = {
const polygonHigh = {
pos: parts[1].pos,

@@ -136,3 +127,3 @@ types: parts[1].types,

for (var i = 0; i < holes.length; i++) {
for (let i = 0; i < holes.length; i++) {
parts = bisectPolygon(pos, types, size, holes[i], holes[i + 1] || pos.length, cell, code);

@@ -159,3 +150,3 @@

} else {
var polygon = {
const polygon = {
positions: pos

@@ -180,18 +171,18 @@ };

function bisectPolygon(positions, edgeTypes, size, startIndex, endIndex, bbox, edge) {
var numPoints = (endIndex - startIndex) / size;
var resultLow = [];
var resultHigh = [];
var typesLow = [];
var typesHigh = [];
var scratchPoint = [];
var p;
var side;
var type;
var prev = (0, _utils.getPointAtIndex)(positions, numPoints - 1, size, startIndex);
var prevSide = Math.sign(edge & 8 ? prev[1] - bbox[3] : prev[0] - bbox[2]);
var prevType = edgeTypes && edgeTypes[numPoints - 1];
var lowPointCount = 0;
var highPointCount = 0;
const numPoints = (endIndex - startIndex) / size;
const resultLow = [];
const resultHigh = [];
const typesLow = [];
const typesHigh = [];
const scratchPoint = [];
let p;
let side;
let type;
const prev = (0, _utils.getPointAtIndex)(positions, numPoints - 1, size, startIndex);
let prevSide = Math.sign(edge & 8 ? prev[1] - bbox[3] : prev[0] - bbox[2]);
let prevType = edgeTypes && edgeTypes[numPoints - 1];
let lowPointCount = 0;
let highPointCount = 0;
for (var i = 0; i < numPoints; i++) {
for (let i = 0; i < numPoints; i++) {
p = (0, _utils.getPointAtIndex)(positions, i, size, startIndex, p);

@@ -236,4 +227,4 @@ side = Math.sign(edge & 8 ? p[1] - bbox[3] : p[0] - bbox[2]);

function getGridCell(p, gridResolution, gridOffset, out) {
var left = Math.floor((p[0] - gridOffset[0]) / gridResolution) * gridResolution + gridOffset[0];
var bottom = Math.floor((p[1] - gridOffset[1]) / gridResolution) * gridResolution + gridOffset[1];
const left = Math.floor((p[0] - gridOffset[0]) / gridResolution) * gridResolution + gridOffset[0];
const bottom = Math.floor((p[1] - gridOffset[1]) / gridResolution) * gridResolution + gridOffset[1];
out[0] = left;

@@ -263,10 +254,10 @@ out[1] = bottom;

function getBoundingBox(positions, size, endIndex, out) {
var minX = Infinity;
var maxX = -Infinity;
var minY = Infinity;
var maxY = -Infinity;
let minX = Infinity;
let maxX = -Infinity;
let minY = Infinity;
let maxY = -Infinity;
for (var i = 0; i < endIndex; i += size) {
var x = positions[i];
var y = positions[i + 1];
for (let i = 0; i < endIndex; i += size) {
const x = positions[i];
const y = positions[i + 1];
minX = x < minX ? x : minX;

@@ -273,0 +264,0 @@ maxX = x > maxX ? x : maxX;

@@ -13,24 +13,15 @@ "use strict";

function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
const DEFAULT_MAX_LATITUDE = 85.051129;
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
var DEFAULT_MAX_LATITUDE = 85.051129;
function cutPolylineByMercatorBounds(positions) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var _options$size = options.size,
size = _options$size === void 0 ? 2 : _options$size,
_options$startIndex = options.startIndex,
startIndex = _options$startIndex === void 0 ? 0 : _options$startIndex,
_options$endIndex = options.endIndex,
endIndex = _options$endIndex === void 0 ? positions.length : _options$endIndex,
_options$normalize = options.normalize,
normalize = _options$normalize === void 0 ? true : _options$normalize;
var newPositions = positions.slice(startIndex, endIndex);
function cutPolylineByMercatorBounds(positions, options) {
const {
size = 2,
startIndex = 0,
endIndex = positions.length,
normalize = true
} = options || {};
const newPositions = positions.slice(startIndex, endIndex);
wrapLongitudesForShortestPath(newPositions, size, 0, endIndex - startIndex);
var parts = (0, _cutByGrid.cutPolylineByGrid)(newPositions, {
size: size,
const parts = (0, _cutByGrid.cutPolylineByGrid)(newPositions, {
size,
broken: true,

@@ -42,14 +33,4 @@ gridResolution: 360,

if (normalize) {
var _iterator = _createForOfIteratorHelper(parts),
_step;
try {
for (_iterator.s(); !(_step = _iterator.n()).done;) {
var part = _step.value;
shiftLongitudesIntoRange(part, size);
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
for (const part of parts) {
shiftLongitudesIntoRange(part, size);
}

@@ -61,31 +42,29 @@ }

function cutPolygonByMercatorBounds(positions, holeIndices) {
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
var _options$size2 = options.size,
size = _options$size2 === void 0 ? 2 : _options$size2,
_options$normalize2 = options.normalize,
normalize = _options$normalize2 === void 0 ? true : _options$normalize2,
_options$edgeTypes = options.edgeTypes,
edgeTypes = _options$edgeTypes === void 0 ? false : _options$edgeTypes;
function cutPolygonByMercatorBounds(positions, holeIndices = null, options) {
const {
size = 2,
normalize = true,
edgeTypes = false
} = options || {};
holeIndices = holeIndices || [];
var newPositions = [];
var newHoleIndices = [];
var srcStartIndex = 0;
var targetIndex = 0;
const newPositions = [];
const newHoleIndices = [];
let srcStartIndex = 0;
let targetIndex = 0;
for (var ringIndex = 0; ringIndex <= holeIndices.length; ringIndex++) {
var srcEndIndex = holeIndices[ringIndex] || positions.length;
var targetStartIndex = targetIndex;
var splitIndex = findSplitIndex(positions, size, srcStartIndex, srcEndIndex);
for (let ringIndex = 0; ringIndex <= holeIndices.length; ringIndex++) {
const srcEndIndex = holeIndices[ringIndex] || positions.length;
const targetStartIndex = targetIndex;
const splitIndex = findSplitIndex(positions, size, srcStartIndex, srcEndIndex);
for (var i = splitIndex; i < srcEndIndex; i++) {
for (let i = splitIndex; i < srcEndIndex; i++) {
newPositions[targetIndex++] = positions[i];
}
for (var _i = srcStartIndex; _i < splitIndex; _i++) {
newPositions[targetIndex++] = positions[_i];
for (let i = srcStartIndex; i < splitIndex; i++) {
newPositions[targetIndex++] = positions[i];
}
wrapLongitudesForShortestPath(newPositions, size, targetStartIndex, targetIndex);
insertPoleVertices(newPositions, size, targetStartIndex, targetIndex, options.maxLatitude);
insertPoleVertices(newPositions, size, targetStartIndex, targetIndex, options === null || options === void 0 ? void 0 : options.maxLatitude);
srcStartIndex = srcEndIndex;

@@ -96,22 +75,12 @@ newHoleIndices[ringIndex] = targetIndex;

newHoleIndices.pop();
var parts = (0, _cutByGrid.cutPolygonByGrid)(newPositions, newHoleIndices, {
size: size,
const parts = (0, _cutByGrid.cutPolygonByGrid)(newPositions, newHoleIndices, {
size,
gridResolution: 360,
gridOffset: [-180, -180],
edgeTypes: edgeTypes
edgeTypes
});
if (normalize) {
var _iterator2 = _createForOfIteratorHelper(parts),
_step2;
try {
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
var part = _step2.value;
shiftLongitudesIntoRange(part.positions, size);
}
} catch (err) {
_iterator2.e(err);
} finally {
_iterator2.f();
for (const part of parts) {
shiftLongitudesIntoRange(part.positions, size);
}

@@ -124,7 +93,7 @@ }

function findSplitIndex(positions, size, startIndex, endIndex) {
var maxLat = -1;
var pointIndex = -1;
let maxLat = -1;
let pointIndex = -1;
for (var i = startIndex + 1; i < endIndex; i += size) {
var lat = Math.abs(positions[i]);
for (let i = startIndex + 1; i < endIndex; i += size) {
const lat = Math.abs(positions[i]);

@@ -140,9 +109,8 @@ if (lat > maxLat) {

function insertPoleVertices(positions, size, startIndex, endIndex) {
var maxLatitude = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : DEFAULT_MAX_LATITUDE;
var firstLng = positions[startIndex];
var lastLng = positions[endIndex - size];
function insertPoleVertices(positions, size, startIndex, endIndex, maxLatitude = DEFAULT_MAX_LATITUDE) {
const firstLng = positions[startIndex];
const lastLng = positions[endIndex - size];
if (Math.abs(firstLng - lastLng) > 180) {
var p = (0, _utils.getPointAtIndex)(positions, 0, size, startIndex);
const p = (0, _utils.getPointAtIndex)(positions, 0, size, startIndex);
p[0] += Math.round((lastLng - firstLng) / 360) * 360;

@@ -158,8 +126,8 @@ (0, _utils.push)(positions, p);

function wrapLongitudesForShortestPath(positions, size, startIndex, endIndex) {
var prevLng = positions[0];
var lng;
let prevLng = positions[0];
let lng;
for (var i = startIndex; i < endIndex; i += size) {
for (let i = startIndex; i < endIndex; i += size) {
lng = positions[i];
var delta = lng - prevLng;
const delta = lng - prevLng;

@@ -175,6 +143,6 @@ if (delta > 180 || delta < -180) {

function shiftLongitudesIntoRange(positions, size) {
var refLng;
var pointCount = positions.length / size;
let refLng;
const pointCount = positions.length / size;
for (var i = 0; i < pointCount; i++) {
for (let i = 0; i < pointCount; i++) {
refLng = positions[i * size];

@@ -187,3 +155,3 @@

var delta = -Math.round(refLng / 360) * 360;
const delta = -Math.round(refLng / 360) * 360;

@@ -194,6 +162,6 @@ if (delta === 0) {

for (var _i2 = 0; _i2 < pointCount; _i2++) {
positions[_i2 * size] += delta;
for (let i = 0; i < pointCount; i++) {
positions[i * size] += delta;
}
}
//# sourceMappingURL=cut-by-mercator-bounds.js.map

@@ -10,25 +10,24 @@ "use strict";

function earcut(data, holeIndices, dim, areas) {
dim = dim || 2;
var hasHoles = holeIndices && holeIndices.length;
var outerLen = hasHoles ? holeIndices[0] * dim : data.length;
var outerNode = linkedList(data, 0, outerLen, dim, true, areas && areas[0]);
var triangles = [];
function earcut(positions, holeIndices, dim = 2, areas) {
const hasHoles = holeIndices && holeIndices.length;
const outerLen = hasHoles ? holeIndices[0] * dim : positions.length;
let outerNode = linkedList(positions, 0, outerLen, dim, true, areas && areas[0]);
const triangles = [];
if (!outerNode || outerNode.next === outerNode.prev) return triangles;
var invSize;
var maxX;
var maxY;
var minX;
var minY;
var x;
var y;
if (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim, areas);
let invSize;
let maxX;
let maxY;
let minX;
let minY;
let x;
let y;
if (hasHoles) outerNode = eliminateHoles(positions, holeIndices, outerNode, dim, areas);
if (data.length > 80 * dim) {
minX = maxX = data[0];
minY = maxY = data[1];
if (positions.length > 80 * dim) {
minX = maxX = positions[0];
minY = maxY = positions[1];
for (var i = dim; i < outerLen; i += dim) {
x = data[i];
y = data[i + 1];
for (let i = dim; i < outerLen; i += dim) {
x = positions[i];
y = positions[i + 1];
if (x < minX) minX = x;

@@ -49,9 +48,9 @@ if (y < minY) minY = y;

function linkedList(data, start, end, dim, clockwise, area) {
var i;
var last;
let i;
let last;
if (area === undefined) {
area = (0, _polygonUtils.getPolygonSignedArea)(data, {
start: start,
end: end,
start,
end,
size: dim

@@ -62,9 +61,5 @@ });

if (clockwise === area < 0) {
for (i = start; i < end; i += dim) {
last = insertNode(i, data[i], data[i + 1], last);
}
for (i = start; i < end; i += dim) last = insertNode(i, data[i], data[i + 1], last);
} else {
for (i = end - dim; i >= start; i -= dim) {
last = insertNode(i, data[i], data[i + 1], last);
}
for (i = end - dim; i >= start; i -= dim) last = insertNode(i, data[i], data[i + 1], last);
}

@@ -83,4 +78,4 @@

if (!end) end = start;
var p = start;
var again;
let p = start;
let again;

@@ -106,5 +101,5 @@ do {

if (!pass && invSize) indexCurve(ear, minX, minY, invSize);
var stop = ear;
var prev;
var next;
let stop = ear;
let prev;
let next;

@@ -143,7 +138,7 @@ while (ear.prev !== ear.next) {

function isEar(ear) {
var a = ear.prev;
var b = ear;
var c = ear.next;
const a = ear.prev;
const b = ear;
const c = ear.next;
if (area(a, b, c) >= 0) return false;
var p = ear.next.next;
let p = ear.next.next;

@@ -159,14 +154,14 @@ while (p !== ear.prev) {

function isEarHashed(ear, minX, minY, invSize) {
var a = ear.prev;
var b = ear;
var c = ear.next;
const a = ear.prev;
const b = ear;
const c = ear.next;
if (area(a, b, c) >= 0) return false;
var minTX = a.x < b.x ? a.x < c.x ? a.x : c.x : b.x < c.x ? b.x : c.x;
var minTY = a.y < b.y ? a.y < c.y ? a.y : c.y : b.y < c.y ? b.y : c.y;
var maxTX = a.x > b.x ? a.x > c.x ? a.x : c.x : b.x > c.x ? b.x : c.x;
var maxTY = a.y > b.y ? a.y > c.y ? a.y : c.y : b.y > c.y ? b.y : c.y;
var minZ = zOrder(minTX, minTY, minX, minY, invSize);
var maxZ = zOrder(maxTX, maxTY, minX, minY, invSize);
var p = ear.prevZ;
var n = ear.nextZ;
const minTX = a.x < b.x ? a.x < c.x ? a.x : c.x : b.x < c.x ? b.x : c.x;
const minTY = a.y < b.y ? a.y < c.y ? a.y : c.y : b.y < c.y ? b.y : c.y;
const maxTX = a.x > b.x ? a.x > c.x ? a.x : c.x : b.x > c.x ? b.x : c.x;
const maxTY = a.y > b.y ? a.y > c.y ? a.y : c.y : b.y > c.y ? b.y : c.y;
const minZ = zOrder(minTX, minTY, minX, minY, invSize);
const maxZ = zOrder(maxTX, maxTY, minX, minY, invSize);
let p = ear.prevZ;
let n = ear.nextZ;

@@ -194,7 +189,7 @@ while (p && p.z >= minZ && n && n.z <= maxZ) {

function cureLocalIntersections(start, triangles, dim) {
var p = start;
let p = start;
do {
var a = p.prev;
var b = p.next.next;
const a = p.prev;
const b = p.next.next;

@@ -217,10 +212,10 @@ if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) {

function splitEarcut(start, triangles, dim, minX, minY, invSize) {
var a = start;
let a = start;
do {
var b = a.next.next;
let b = a.next.next;
while (b !== a.prev) {
if (a.i !== b.i && isValidDiagonal(a, b)) {
var c = splitPolygon(a, b);
let c = splitPolygon(a, b);
a = filterPoints(a, a.next);

@@ -241,8 +236,8 @@ c = filterPoints(c, c.next);

function eliminateHoles(data, holeIndices, outerNode, dim, areas) {
var queue = [];
var i;
var len;
var start;
var end;
var list;
const queue = [];
let i;
let len;
let start;
let end;
let list;

@@ -275,3 +270,3 @@ for (i = 0, len = holeIndices.length; i < len; i++) {

if (outerNode) {
var b = splitPolygon(outerNode, hole);
const b = splitPolygon(outerNode, hole);
filterPoints(outerNode, outerNode.next);

@@ -283,11 +278,11 @@ filterPoints(b, b.next);

function findHoleBridge(hole, outerNode) {
var p = outerNode;
var hx = hole.x;
var hy = hole.y;
var qx = -Infinity;
var m;
let p = outerNode;
const hx = hole.x;
const hy = hole.y;
let qx = -Infinity;
let m;
do {
if (hy <= p.y && hy >= p.next.y && p.next.y !== p.y) {
var x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);
const x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);

@@ -311,7 +306,7 @@ if (x <= hx && x > qx) {

if (hx === qx) return m;
var stop = m;
var mx = m.x;
var my = m.y;
var tanMin = Infinity;
var tan;
const stop = m;
const mx = m.x;
const my = m.y;
let tanMin = Infinity;
let tan;
p = m;

@@ -340,3 +335,3 @@

function indexCurve(start, minX, minY, invSize) {
var p = start;
let p = start;

@@ -356,11 +351,11 @@ do {

function sortLinked(list) {
var e;
var i;
var inSize = 1;
var numMerges;
var p;
var pSize;
var q;
var qSize;
var tail;
let e;
let i;
let inSize = 1;
let numMerges;
let p;
let pSize;
let q;
let qSize;
let tail;

@@ -427,4 +422,4 @@ do {

function getLeftmost(start) {
var p = start;
var leftmost = start;
let p = start;
let leftmost = start;

@@ -456,6 +451,6 @@ do {

function intersects(p1, q1, p2, q2) {
var o1 = sign(area(p1, q1, p2));
var o2 = sign(area(p1, q1, q2));
var o3 = sign(area(p2, q2, p1));
var o4 = sign(area(p2, q2, q1));
const o1 = sign(area(p1, q1, p2));
const o2 = sign(area(p1, q1, q2));
const o3 = sign(area(p2, q2, p1));
const o4 = sign(area(p2, q2, q1));
if (o1 !== o2 && o3 !== o4) return true;

@@ -478,3 +473,3 @@ if (o1 === 0 && onSegment(p1, p2, q1)) return true;

function intersectsPolygon(a, b) {
var p = a;
let p = a;

@@ -494,6 +489,6 @@ do {

function middleInside(a, b) {
var p = a;
var inside = false;
var px = (a.x + b.x) / 2;
var py = (a.y + b.y) / 2;
let p = a;
let inside = false;
const px = (a.x + b.x) / 2;
const py = (a.y + b.y) / 2;

@@ -509,6 +504,6 @@ do {

function splitPolygon(a, b) {
var a2 = new Node(a.i, a.x, a.y);
var b2 = new Node(b.i, b.x, b.y);
var an = a.next;
var bp = b.prev;
const a2 = new Node(a.i, a.x, a.y);
const b2 = new Node(b.i, b.x, b.y);
const an = a.next;
const bp = b.prev;
a.next = b;

@@ -526,3 +521,3 @@ b.prev = a;

function insertNode(i, x, y, last) {
var p = new Node(i, x, y);
const p = new Node(i, x, y);

@@ -529,0 +524,0 @@ if (!last) {

@@ -10,3 +10,3 @@ "use strict";

enumerable: true,
get: function get() {
get: function () {
return _polygon.default;

@@ -17,3 +17,3 @@ }

enumerable: true,
get: function get() {
get: function () {
return _polygon.default;

@@ -24,3 +24,3 @@ }

enumerable: true,
get: function get() {
get: function () {
return _polygonUtils.getPolygonSignedArea;

@@ -31,3 +31,3 @@ }

enumerable: true,
get: function get() {
get: function () {
return _polygonUtils.getPolygonWindingDirection;

@@ -38,3 +38,3 @@ }

enumerable: true,
get: function get() {
get: function () {
return _polygonUtils.forEachSegmentInPolygon;

@@ -45,3 +45,3 @@ }

enumerable: true,
get: function get() {
get: function () {
return _polygonUtils.modifyPolygonWindingDirection;

@@ -52,3 +52,3 @@ }

enumerable: true,
get: function get() {
get: function () {
return _polygonUtils.WINDING;

@@ -59,3 +59,3 @@ }

enumerable: true,
get: function get() {
get: function () {
return _earcut.earcut;

@@ -66,3 +66,3 @@ }

enumerable: true,
get: function get() {
get: function () {
return _lineclip.clipPolygon;

@@ -73,3 +73,3 @@ }

enumerable: true,
get: function get() {
get: function () {
return _lineclip.clipPolyline;

@@ -80,3 +80,3 @@ }

enumerable: true,
get: function get() {
get: function () {
return _cutByGrid.cutPolygonByGrid;

@@ -87,3 +87,3 @@ }

enumerable: true,
get: function get() {
get: function () {
return _cutByGrid.cutPolylineByGrid;

@@ -94,3 +94,3 @@ }

enumerable: true,
get: function get() {
get: function () {
return _cutByMercatorBounds.cutPolylineByMercatorBounds;

@@ -101,3 +101,3 @@ }

enumerable: true,
get: function get() {
get: function () {
return _cutByMercatorBounds.cutPolygonByMercatorBounds;

@@ -104,0 +104,0 @@ }

@@ -13,20 +13,18 @@ "use strict";

function clipPolyline(positions, bbox) {
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
var _options$size = options.size,
size = _options$size === void 0 ? 2 : _options$size,
_options$startIndex = options.startIndex,
startIndex = _options$startIndex === void 0 ? 0 : _options$startIndex,
_options$endIndex = options.endIndex,
endIndex = _options$endIndex === void 0 ? positions.length : _options$endIndex;
var numPoints = (endIndex - startIndex) / size;
var result = [];
var part = [];
var a;
var b;
var codeA = -1;
var codeB;
var lastCode;
function clipPolyline(positions, bbox, options) {
const {
size = 2,
startIndex = 0,
endIndex = positions.length
} = options || {};
const numPoints = (endIndex - startIndex) / size;
const result = [];
let part = [];
let a;
let b;
let codeA = -1;
let codeB;
let lastCode;
for (var i = 1; i < numPoints; i++) {
for (let i = 1; i < numPoints; i++) {
a = (0, _utils.getPointAtIndex)(positions, i - 1, size, startIndex, a);

@@ -75,18 +73,18 @@ b = (0, _utils.getPointAtIndex)(positions, i, size, startIndex, b);

function clipPolygon(positions, bbox) {
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
var _options$size2 = options.size,
size = _options$size2 === void 0 ? 2 : _options$size2,
_options$endIndex2 = options.endIndex,
endIndex = _options$endIndex2 === void 0 ? positions.length : _options$endIndex2;
var _options$startIndex2 = options.startIndex,
startIndex = _options$startIndex2 === void 0 ? 0 : _options$startIndex2;
var numPoints = (endIndex - startIndex) / size;
var result;
var p;
var prev;
var inside;
var prevInside;
function clipPolygon(positions, bbox, options) {
const {
size = 2,
endIndex = positions.length
} = options || {};
let {
startIndex = 0
} = options || {};
let numPoints = (endIndex - startIndex) / size;
let result;
let p;
let prev;
let inside;
let prevInside;
for (var edge = 1; edge <= 8; edge *= 2) {
for (let edge = 1; edge <= 8; edge *= 2) {
result = [];

@@ -96,3 +94,3 @@ prev = (0, _utils.getPointAtIndex)(positions, numPoints - 1, size, startIndex, prev);

for (var i = 0; i < numPoints; i++) {
for (let i = 0; i < numPoints; i++) {
p = (0, _utils.getPointAtIndex)(positions, i, size, startIndex, p);

@@ -115,6 +113,5 @@ inside = !(bitCode(p, bbox) & edge);

function intersect(a, b, edge, bbox) {
var out = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
var t;
var snap;
function intersect(a, b, edge, bbox, out = []) {
let t;
let snap;

@@ -137,3 +134,3 @@ if (edge & 8) {

for (var i = 0; i < a.length; i++) {
for (let i = 0; i < a.length; i++) {
out[i] = (snap & 1) === i ? bbox[snap] : t * (b[i] - a[i]) + a[i];

@@ -146,3 +143,3 @@ }

function bitCode(p, bbox) {
var code = 0;
let code = 0;
if (p[0] < bbox[0]) code |= 1;else if (p[0] > bbox[2]) code |= 2;

@@ -149,0 +146,0 @@ if (p[1] < bbox[1]) code |= 4;else if (p[1] > bbox[3]) code |= 8;

@@ -18,12 +18,13 @@ "use strict";

var WINDING = {
CLOCKWISE: 1,
COUNTER_CLOCKWISE: -1
};
let WINDING;
exports.WINDING = WINDING;
function modifyPolygonWindingDirection(points, direction) {
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
var windingDirection = getPolygonWindingDirection(points, options);
(function (WINDING) {
WINDING[WINDING["CLOCKWISE"] = 1] = "CLOCKWISE";
WINDING[WINDING["COUNTER_CLOCKWISE"] = -1] = "COUNTER_CLOCKWISE";
})(WINDING || (exports.WINDING = WINDING = {}));
function modifyPolygonWindingDirection(points, direction, options = {}) {
const windingDirection = getPolygonWindingDirection(points, options);
if (windingDirection !== direction) {

@@ -37,17 +38,15 @@ reversePolygon(points, options);

function getPolygonWindingDirection(points) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
function getPolygonWindingDirection(points, options = {}) {
return Math.sign(getPolygonSignedArea(points, options));
}
function getPolygonSignedArea(points) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var _options$start = options.start,
start = _options$start === void 0 ? 0 : _options$start,
_options$end = options.end,
end = _options$end === void 0 ? points.length : _options$end;
var dim = options.size || 2;
var area = 0;
function getPolygonSignedArea(points, options = {}) {
const {
start = 0,
end = points.length
} = options;
const dim = options.size || 2;
let area = 0;
for (var i = start, j = end - dim; i < end; i += dim) {
for (let i = start, j = end - dim; i < end; i += dim) {
area += (points[i] - points[j]) * (points[i + 1] + points[j + 1]);

@@ -60,19 +59,17 @@ j = i;

function forEachSegmentInPolygon(points, visitor) {
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
var _options$start2 = options.start,
start = _options$start2 === void 0 ? 0 : _options$start2,
_options$end2 = options.end,
end = _options$end2 === void 0 ? points.length : _options$end2,
_options$size = options.size,
size = _options$size === void 0 ? 2 : _options$size,
isClosed = options.isClosed;
var numPoints = (end - start) / size;
function forEachSegmentInPolygon(points, visitor, options = {}) {
const {
start = 0,
end = points.length,
size = 2,
isClosed
} = options;
const numPoints = (end - start) / size;
for (var i = 0; i < numPoints - 1; ++i) {
for (let i = 0; i < numPoints - 1; ++i) {
visitor(points[start + i * size], points[start + i * size + 1], points[start + (i + 1) * size], points[start + (i + 1) * size + 1], i, i + 1);
}
var endPointIndex = start + (numPoints - 1) * size;
var isClosedEx = isClosed || (0, _core.equals)(points[start], points[endPointIndex]) && (0, _core.equals)(points[start + 1], points[endPointIndex + 1]);
const endPointIndex = start + (numPoints - 1) * size;
const isClosedEx = isClosed || (0, _core.equals)(points[start], points[endPointIndex]) && (0, _core.equals)(points[start + 1], points[endPointIndex + 1]);

@@ -85,17 +82,16 @@ if (!isClosedEx) {

function reversePolygon(points, options) {
var _options$start3 = options.start,
start = _options$start3 === void 0 ? 0 : _options$start3,
_options$end3 = options.end,
end = _options$end3 === void 0 ? points.length : _options$end3,
_options$size2 = options.size,
size = _options$size2 === void 0 ? 2 : _options$size2;
var numPoints = (end - start) / size;
var numSwaps = Math.floor(numPoints / 2);
const {
start = 0,
end = points.length,
size = 2
} = options;
const numPoints = (end - start) / size;
const numSwaps = Math.floor(numPoints / 2);
for (var i = 0; i < numSwaps; ++i) {
var b1 = start + i * size;
var b2 = start + (numPoints - 1 - i) * size;
for (let i = 0; i < numSwaps; ++i) {
const b1 = start + i * size;
const b2 = start + (numPoints - 1 - i) * size;
for (var j = 0; j < size; ++j) {
var tmp = points[b1 + j];
for (let j = 0; j < size; ++j) {
const tmp = points[b1 + j];
points[b1 + j] = points[b2 + j];

@@ -107,5 +103,4 @@ points[b2 + j] = tmp;

function modifyPolygonWindingDirectionPoints(points, direction) {
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
var currentDirection = getPolygonWindingDirectionPoints(points, options);
function modifyPolygonWindingDirectionPoints(points, direction, options = {}) {
const currentDirection = getPolygonWindingDirectionPoints(points, options);

@@ -120,16 +115,14 @@ if (currentDirection !== direction) {

function getPolygonWindingDirectionPoints(points) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
function getPolygonWindingDirectionPoints(points, options = {}) {
return Math.sign(getPolygonSignedAreaPoints(points, options));
}
function getPolygonSignedAreaPoints(points) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var _options$start4 = options.start,
start = _options$start4 === void 0 ? 0 : _options$start4,
_options$end4 = options.end,
end = _options$end4 === void 0 ? points.length : _options$end4;
var area = 0;
function getPolygonSignedAreaPoints(points, options = {}) {
const {
start = 0,
end = points.length
} = options;
let area = 0;
for (var i = start, j = end - 1; i < end; ++i) {
for (let i = start, j = end - 1; i < end; ++i) {
area += (points[i][0] - points[j][0]) * (points[i][1] + points[j][1]);

@@ -142,15 +135,14 @@ j = i;

function forEachSegmentInPolygonPoints(points, visitor) {
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
var _options$start5 = options.start,
start = _options$start5 === void 0 ? 0 : _options$start5,
_options$end5 = options.end,
end = _options$end5 === void 0 ? points.length : _options$end5,
isClosed = options.isClosed;
function forEachSegmentInPolygonPoints(points, visitor, options = {}) {
const {
start = 0,
end = points.length,
isClosed
} = options;
for (var i = start; i < end - 1; ++i) {
for (let i = start; i < end - 1; ++i) {
visitor(points[i], points[i + 1], i, i + 1);
}
var isClosedEx = isClosed || (0, _core.equals)(points[end - 1], points[0]);
const isClosedEx = isClosed || (0, _core.equals)(points[end - 1], points[0]);

@@ -157,0 +149,0 @@ if (!isClosedEx) {

@@ -10,6 +10,4 @@ "use strict";

var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
var _core = require("@math.gl/core");

@@ -19,6 +17,7 @@

var Polygon = function () {
function Polygon(points) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
(0, _classCallCheck2.default)(this, Polygon);
class Polygon {
constructor(points, options = {}) {
(0, _defineProperty2.default)(this, "points", void 0);
(0, _defineProperty2.default)(this, "isFlatArray", void 0);
(0, _defineProperty2.default)(this, "options", void 0);
this.points = points;

@@ -35,43 +34,36 @@ this.isFlatArray = !(0, _core.isArray)(points[0]);

(0, _createClass2.default)(Polygon, [{
key: "getSignedArea",
value: function getSignedArea() {
if (this.isFlatArray) return (0, _polygonUtils.getPolygonSignedArea)(this.points, this.options);
return (0, _polygonUtils.getPolygonSignedAreaPoints)(this.points, this.options);
getSignedArea() {
if (this.isFlatArray) return (0, _polygonUtils.getPolygonSignedArea)(this.points, this.options);
return (0, _polygonUtils.getPolygonSignedAreaPoints)(this.points, this.options);
}
getArea() {
return Math.abs(this.getSignedArea());
}
getWindingDirection() {
return Math.sign(this.getSignedArea());
}
forEachSegment(visitor) {
if (this.isFlatArray) {
(0, _polygonUtils.forEachSegmentInPolygon)(this.points, (x1, y1, x2, y2, i1, i2) => {
visitor([x1, y1], [x2, y2], i1, i2);
}, this.options);
} else {
(0, _polygonUtils.forEachSegmentInPolygonPoints)(this.points, visitor, this.options);
}
}, {
key: "getArea",
value: function getArea() {
return Math.abs(this.getSignedArea());
}
}, {
key: "getWindingDirection",
value: function getWindingDirection() {
return Math.sign(this.getSignedArea());
}
}, {
key: "forEachSegment",
value: function forEachSegment(visitor) {
if (this.isFlatArray) {
(0, _polygonUtils.forEachSegmentInPolygon)(this.points, function (x1, y1, x2, y2, i1, i2) {
visitor([x1, y1], [x2, y2], i1, i2);
}, this.options);
} else {
(0, _polygonUtils.forEachSegmentInPolygonPoints)(this.points, visitor, this.options);
}
}
}, {
key: "modifyWindingDirection",
value: function modifyWindingDirection(direction) {
if (this.isFlatArray) {
return (0, _polygonUtils.modifyPolygonWindingDirection)(this.points, direction, this.options);
}
}
return (0, _polygonUtils.modifyPolygonWindingDirectionPoints)(this.points, direction, this.options);
modifyWindingDirection(direction) {
if (this.isFlatArray) {
return (0, _polygonUtils.modifyPolygonWindingDirection)(this.points, direction, this.options);
}
}]);
return Polygon;
}();
return (0, _polygonUtils.modifyPolygonWindingDirectionPoints)(this.points, direction, this.options);
}
}
exports.default = Polygon;
//# sourceMappingURL=polygon.js.map

@@ -11,9 +11,9 @@ "use strict";

function push(target, source) {
var size = source.length;
var startIndex = target.length;
const size = source.length;
const startIndex = target.length;
if (startIndex > 0) {
var isDuplicate = true;
let isDuplicate = true;
for (var i = 0; i < size; i++) {
for (let i = 0; i < size; i++) {
if (target[startIndex - size + i] !== source[i]) {

@@ -30,4 +30,4 @@ isDuplicate = false;

for (var _i = 0; _i < size; _i++) {
target[startIndex + _i] = source[_i];
for (let i = 0; i < size; i++) {
target[startIndex + i] = source[i];
}

@@ -39,5 +39,5 @@

function copy(target, source) {
var size = source.length;
const size = source.length;
for (var i = 0; i < size; i++) {
for (let i = 0; i < size; i++) {
target[i] = source[i];

@@ -47,7 +47,6 @@ }

function getPointAtIndex(positions, index, size, offset) {
var out = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
var startI = offset + index * size;
function getPointAtIndex(positions, index, size, offset, out = []) {
const startI = offset + index * size;
for (var i = 0; i < size; i++) {
for (let i = 0; i < size; i++) {
out[i] = positions[startI + i];

@@ -54,0 +53,0 @@ }

import { bitCode, intersect } from './lineclip';
import { getPointAtIndex, copy, push } from './utils';
export function cutPolylineByGrid(positions, options = {}) {
export function cutPolylineByGrid(positions, options) {
const {

@@ -11,3 +11,3 @@ size = 2,

endIndex = positions.length
} = options;
} = options || {};
const numPoints = (endIndex - startIndex) / size;

@@ -66,3 +66,3 @@ let part = [];

export function cutPolygonByGrid(positions, holeIndices, options = {}) {
export function cutPolygonByGrid(positions, holeIndices = null, options) {
if (!positions.length) {

@@ -77,3 +77,3 @@ return [];

edgeTypes = false
} = options;
} = options || {};
const result = [];

@@ -80,0 +80,0 @@ const queue = [{

import { cutPolylineByGrid, cutPolygonByGrid } from './cut-by-grid';
import { getPointAtIndex, push } from './utils';
const DEFAULT_MAX_LATITUDE = 85.051129;
export function cutPolylineByMercatorBounds(positions, options = {}) {
export function cutPolylineByMercatorBounds(positions, options) {
const {

@@ -10,3 +10,3 @@ size = 2,

normalize = true
} = options;
} = options || {};
const newPositions = positions.slice(startIndex, endIndex);

@@ -29,3 +29,3 @@ wrapLongitudesForShortestPath(newPositions, size, 0, endIndex - startIndex);

}
export function cutPolygonByMercatorBounds(positions, holeIndices, options = {}) {
export function cutPolygonByMercatorBounds(positions, holeIndices = null, options) {
const {

@@ -35,3 +35,3 @@ size = 2,

edgeTypes = false
} = options;
} = options || {};
holeIndices = holeIndices || [];

@@ -57,3 +57,3 @@ const newPositions = [];

wrapLongitudesForShortestPath(newPositions, size, targetStartIndex, targetIndex);
insertPoleVertices(newPositions, size, targetStartIndex, targetIndex, options.maxLatitude);
insertPoleVertices(newPositions, size, targetStartIndex, targetIndex, options === null || options === void 0 ? void 0 : options.maxLatitude);
srcStartIndex = srcEndIndex;

@@ -60,0 +60,0 @@ newHoleIndices[ringIndex] = targetIndex;

import { getPolygonSignedArea } from './polygon-utils';
export function earcut(data, holeIndices, dim, areas) {
dim = dim || 2;
export function earcut(positions, holeIndices, dim = 2, areas) {
const hasHoles = holeIndices && holeIndices.length;
const outerLen = hasHoles ? holeIndices[0] * dim : data.length;
let outerNode = linkedList(data, 0, outerLen, dim, true, areas && areas[0]);
const outerLen = hasHoles ? holeIndices[0] * dim : positions.length;
let outerNode = linkedList(positions, 0, outerLen, dim, true, areas && areas[0]);
const triangles = [];

@@ -16,11 +15,11 @@ if (!outerNode || outerNode.next === outerNode.prev) return triangles;

let y;
if (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim, areas);
if (hasHoles) outerNode = eliminateHoles(positions, holeIndices, outerNode, dim, areas);
if (data.length > 80 * dim) {
minX = maxX = data[0];
minY = maxY = data[1];
if (positions.length > 80 * dim) {
minX = maxX = positions[0];
minY = maxY = positions[1];
for (let i = dim; i < outerLen; i += dim) {
x = data[i];
y = data[i + 1];
x = positions[i];
y = positions[i + 1];
if (x < minX) minX = x;

@@ -27,0 +26,0 @@ if (y < minY) minY = y;

import { push, copy, getPointAtIndex } from './utils';
export function clipPolyline(positions, bbox, options = {}) {
export function clipPolyline(positions, bbox, options) {
const {

@@ -7,3 +7,3 @@ size = 2,

endIndex = positions.length
} = options;
} = options || {};
const numPoints = (endIndex - startIndex) / size;

@@ -61,10 +61,10 @@ const result = [];

}
export function clipPolygon(positions, bbox, options = {}) {
export function clipPolygon(positions, bbox, options) {
const {
size = 2,
endIndex = positions.length
} = options;
} = options || {};
let {
startIndex = 0
} = options;
} = options || {};
let numPoints = (endIndex - startIndex) / size;

@@ -71,0 +71,0 @@ let result;

import { equals } from '@math.gl/core';
export const WINDING = {
CLOCKWISE: 1,
COUNTER_CLOCKWISE: -1
};
export let WINDING;
(function (WINDING) {
WINDING[WINDING["CLOCKWISE"] = 1] = "CLOCKWISE";
WINDING[WINDING["COUNTER_CLOCKWISE"] = -1] = "COUNTER_CLOCKWISE";
})(WINDING || (WINDING = {}));
export function modifyPolygonWindingDirection(points, direction, options = {}) {

@@ -7,0 +10,0 @@ const windingDirection = getPolygonWindingDirection(points, options);

@@ -0,1 +1,2 @@

import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import { isArray } from '@math.gl/core';

@@ -5,2 +6,8 @@ import { getPolygonSignedArea, forEachSegmentInPolygon, modifyPolygonWindingDirection, getPolygonSignedAreaPoints, forEachSegmentInPolygonPoints, modifyPolygonWindingDirectionPoints } from './polygon-utils';

constructor(points, options = {}) {
_defineProperty(this, "points", void 0);
_defineProperty(this, "isFlatArray", void 0);
_defineProperty(this, "options", void 0);
this.points = points;

@@ -7,0 +14,0 @@ this.isFlatArray = !isArray(points[0]);

@@ -8,3 +8,3 @@ {

},
"version": "3.5.6",
"version": "3.6.0-alpha.1",
"keywords": [

@@ -21,2 +21,3 @@ "webgl",

},
"types": "dist/index.d.ts",
"main": "dist/es5/index.js",

@@ -29,5 +30,5 @@ "module": "dist/esm/index.js",

"dependencies": {
"@math.gl/core": "3.5.6"
"@math.gl/core": "3.6.0-alpha.1"
},
"gitHead": "0e69c70ff2e6373fed84d303cbf8198a6972944f"
"gitHead": "45386981340895bf201c2ebb76257c9bbffd8ff6"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc