@itwin/core-geometry 4.4.0-dev.8 → 4.5.0-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -1
- package/lib/cjs/Geometry.d.ts +17 -0
- package/lib/cjs/Geometry.d.ts.map +1 -1
- package/lib/cjs/Geometry.js +14 -0
- package/lib/cjs/Geometry.js.map +1 -1
- package/lib/cjs/core-geometry.d.ts +3 -2
- package/lib/cjs/core-geometry.d.ts.map +1 -1
- package/lib/cjs/core-geometry.js +3 -2
- package/lib/cjs/core-geometry.js.map +1 -1
- package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts +2 -2
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js +3 -3
- package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/cjs/curve/CurveExtendMode.d.ts +7 -6
- package/lib/cjs/curve/CurveExtendMode.d.ts.map +1 -1
- package/lib/cjs/curve/CurveExtendMode.js +7 -6
- package/lib/cjs/curve/CurveExtendMode.js.map +1 -1
- package/lib/cjs/curve/CurveLocationDetail.d.ts.map +1 -1
- package/lib/cjs/curve/CurveLocationDetail.js +23 -18
- package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
- package/lib/cjs/curve/LineSegment3d.d.ts +14 -4
- package/lib/cjs/curve/LineSegment3d.d.ts.map +1 -1
- package/lib/cjs/curve/LineSegment3d.js +107 -2
- package/lib/cjs/curve/LineSegment3d.js.map +1 -1
- package/lib/cjs/curve/LineString3d.d.ts +41 -8
- package/lib/cjs/curve/LineString3d.d.ts.map +1 -1
- package/lib/cjs/curve/LineString3d.js +53 -15
- package/lib/cjs/curve/LineString3d.js.map +1 -1
- package/lib/cjs/curve/Loop.js +1 -1
- package/lib/cjs/curve/Loop.js.map +1 -1
- package/lib/cjs/curve/Query/PlanarSubdivision.d.ts +2 -2
- package/lib/cjs/curve/Query/PlanarSubdivision.js +2 -2
- package/lib/cjs/curve/Query/PlanarSubdivision.js.map +1 -1
- package/lib/cjs/curve/RegionOps.d.ts +1 -2
- package/lib/cjs/curve/RegionOps.d.ts.map +1 -1
- package/lib/cjs/curve/RegionOps.js.map +1 -1
- package/lib/cjs/curve/RegionOpsClassificationSweeps.d.ts +5 -8
- package/lib/cjs/curve/RegionOpsClassificationSweeps.d.ts.map +1 -1
- package/lib/cjs/curve/RegionOpsClassificationSweeps.js +12 -12
- package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYArray.d.ts +2 -2
- package/lib/cjs/geometry3d/GrowableXYArray.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYArray.js +1 -1
- package/lib/cjs/geometry3d/GrowableXYArray.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYZArray.d.ts +2 -3
- package/lib/cjs/geometry3d/GrowableXYZArray.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYZArray.js +1 -1
- package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts +18 -1
- package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYZCollection.js +13 -0
- package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
- package/lib/cjs/geometry3d/PointHelpers.d.ts +1 -2
- package/lib/cjs/geometry3d/PointHelpers.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
- package/lib/cjs/geometry3d/PointStreaming.d.ts +1 -1
- package/lib/cjs/geometry3d/PointStreaming.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PointStreaming.js +3 -1
- package/lib/cjs/geometry3d/PointStreaming.js.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.d.ts +68 -1
- package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.js +152 -4
- package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
- package/lib/cjs/geometry3d/PolylineOps.d.ts +23 -1
- package/lib/cjs/geometry3d/PolylineOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolylineOps.js +73 -1
- package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
- package/lib/cjs/geometry3d/Range.d.ts +1 -1
- package/lib/cjs/geometry3d/Range.d.ts.map +1 -1
- package/lib/cjs/geometry3d/Range.js.map +1 -1
- package/lib/cjs/geometry3d/Transform.js +1 -1
- package/lib/cjs/geometry3d/Transform.js.map +1 -1
- package/lib/cjs/geometry3d/YawPitchRollAngles.d.ts +7 -5
- package/lib/cjs/geometry3d/YawPitchRollAngles.d.ts.map +1 -1
- package/lib/cjs/geometry3d/YawPitchRollAngles.js +8 -6
- package/lib/cjs/geometry3d/YawPitchRollAngles.js.map +1 -1
- package/lib/cjs/numerics/Polynomials.d.ts +13 -1
- package/lib/cjs/numerics/Polynomials.d.ts.map +1 -1
- package/lib/cjs/numerics/Polynomials.js +13 -1
- package/lib/cjs/numerics/Polynomials.js.map +1 -1
- package/lib/cjs/polyface/FacetLocationDetail.d.ts +28 -5
- package/lib/cjs/polyface/FacetLocationDetail.d.ts.map +1 -1
- package/lib/cjs/polyface/FacetLocationDetail.js +50 -15
- package/lib/cjs/polyface/FacetLocationDetail.js.map +1 -1
- package/lib/cjs/polyface/Polyface.d.ts +1 -1
- package/lib/cjs/polyface/Polyface.d.ts.map +1 -1
- package/lib/cjs/polyface/Polyface.js.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.d.ts +7 -3
- package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/cjs/polyface/PolyfaceQuery.js +23 -0
- package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/cjs/polyface/RangeTree/LineString3dRangeTreeContext.d.ts +52 -0
- package/lib/cjs/polyface/RangeTree/LineString3dRangeTreeContext.d.ts.map +1 -0
- package/lib/cjs/polyface/RangeTree/LineString3dRangeTreeContext.js +78 -0
- package/lib/cjs/polyface/RangeTree/LineString3dRangeTreeContext.js.map +1 -0
- package/lib/cjs/polyface/RangeTree/MinimumValueTester.d.ts +60 -0
- package/lib/cjs/polyface/RangeTree/MinimumValueTester.d.ts.map +1 -0
- package/lib/cjs/polyface/RangeTree/MinimumValueTester.js +96 -0
- package/lib/cjs/polyface/RangeTree/MinimumValueTester.js.map +1 -0
- package/lib/cjs/polyface/RangeTree/Point3dArrayRangeTreeContext.d.ts +57 -0
- package/lib/cjs/polyface/RangeTree/Point3dArrayRangeTreeContext.d.ts.map +1 -0
- package/lib/cjs/polyface/RangeTree/Point3dArrayRangeTreeContext.js +73 -0
- package/lib/cjs/polyface/RangeTree/Point3dArrayRangeTreeContext.js.map +1 -0
- package/lib/cjs/polyface/RangeTree/PolyfaceRangeTreeContext.d.ts +57 -0
- package/lib/cjs/polyface/RangeTree/PolyfaceRangeTreeContext.d.ts.map +1 -0
- package/lib/cjs/polyface/RangeTree/PolyfaceRangeTreeContext.js +84 -0
- package/lib/cjs/polyface/RangeTree/PolyfaceRangeTreeContext.js.map +1 -0
- package/lib/cjs/polyface/RangeTree/RangeTreeNode.d.ts +274 -0
- package/lib/cjs/polyface/RangeTree/RangeTreeNode.d.ts.map +1 -0
- package/lib/cjs/polyface/RangeTree/RangeTreeNode.js +505 -0
- package/lib/cjs/polyface/RangeTree/RangeTreeNode.js.map +1 -0
- package/lib/cjs/polyface/RangeTree/RangeTreeSearchHandlers.d.ts +204 -0
- package/lib/cjs/polyface/RangeTree/RangeTreeSearchHandlers.d.ts.map +1 -0
- package/lib/cjs/polyface/RangeTree/RangeTreeSearchHandlers.js +383 -0
- package/lib/cjs/polyface/RangeTree/RangeTreeSearchHandlers.js.map +1 -0
- package/lib/cjs/serialization/GeometrySamples.d.ts +36 -3
- package/lib/cjs/serialization/GeometrySamples.d.ts.map +1 -1
- package/lib/cjs/serialization/GeometrySamples.js +93 -4
- package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
- package/lib/cjs/solid/LinearSweep.d.ts +1 -1
- package/lib/cjs/solid/LinearSweep.js +1 -1
- package/lib/cjs/solid/LinearSweep.js.map +1 -1
- package/lib/cjs/solid/SweepContour.d.ts +2 -2
- package/lib/cjs/solid/SweepContour.d.ts.map +1 -1
- package/lib/cjs/solid/SweepContour.js.map +1 -1
- package/lib/cjs/topology/Graph.d.ts +5 -6
- package/lib/cjs/topology/Graph.d.ts.map +1 -1
- package/lib/cjs/topology/Graph.js +7 -6
- package/lib/cjs/topology/Graph.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.d.ts +4 -4
- package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.js +5 -5
- package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSearch.d.ts +108 -71
- package/lib/cjs/topology/HalfEdgeGraphSearch.d.ts.map +1 -1
- package/lib/cjs/topology/HalfEdgeGraphSearch.js +223 -109
- package/lib/cjs/topology/HalfEdgeGraphSearch.js.map +1 -1
- package/lib/cjs/topology/Merging.d.ts +1 -1
- package/lib/cjs/topology/Merging.d.ts.map +1 -1
- package/lib/cjs/topology/Merging.js.map +1 -1
- package/lib/cjs/topology/SignedDataSummary.d.ts +13 -13
- package/lib/cjs/topology/SignedDataSummary.d.ts.map +1 -1
- package/lib/cjs/topology/SignedDataSummary.js +3 -3
- package/lib/cjs/topology/SignedDataSummary.js.map +1 -1
- package/lib/cjs/topology/Triangulation.d.ts +1 -12
- package/lib/cjs/topology/Triangulation.d.ts.map +1 -1
- package/lib/cjs/topology/Triangulation.js.map +1 -1
- package/lib/cjs/topology/XYParitySearchContext.d.ts +27 -21
- package/lib/cjs/topology/XYParitySearchContext.d.ts.map +1 -1
- package/lib/cjs/topology/XYParitySearchContext.js +73 -71
- package/lib/cjs/topology/XYParitySearchContext.js.map +1 -1
- package/lib/esm/Geometry.d.ts +17 -0
- package/lib/esm/Geometry.d.ts.map +1 -1
- package/lib/esm/Geometry.js +14 -0
- package/lib/esm/Geometry.js.map +1 -1
- package/lib/esm/core-geometry.d.ts +3 -2
- package/lib/esm/core-geometry.d.ts.map +1 -1
- package/lib/esm/core-geometry.js +3 -2
- package/lib/esm/core-geometry.js.map +1 -1
- package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts +2 -2
- package/lib/esm/curve/CurveChainWithDistanceIndex.js +3 -3
- package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
- package/lib/esm/curve/CurveExtendMode.d.ts +7 -6
- package/lib/esm/curve/CurveExtendMode.d.ts.map +1 -1
- package/lib/esm/curve/CurveExtendMode.js +7 -6
- package/lib/esm/curve/CurveExtendMode.js.map +1 -1
- package/lib/esm/curve/CurveLocationDetail.d.ts.map +1 -1
- package/lib/esm/curve/CurveLocationDetail.js +23 -18
- package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
- package/lib/esm/curve/LineSegment3d.d.ts +14 -4
- package/lib/esm/curve/LineSegment3d.d.ts.map +1 -1
- package/lib/esm/curve/LineSegment3d.js +108 -3
- package/lib/esm/curve/LineSegment3d.js.map +1 -1
- package/lib/esm/curve/LineString3d.d.ts +41 -8
- package/lib/esm/curve/LineString3d.d.ts.map +1 -1
- package/lib/esm/curve/LineString3d.js +53 -15
- package/lib/esm/curve/LineString3d.js.map +1 -1
- package/lib/esm/curve/Loop.js +1 -1
- package/lib/esm/curve/Loop.js.map +1 -1
- package/lib/esm/curve/Query/PlanarSubdivision.d.ts +2 -2
- package/lib/esm/curve/Query/PlanarSubdivision.js +2 -2
- package/lib/esm/curve/Query/PlanarSubdivision.js.map +1 -1
- package/lib/esm/curve/RegionOps.d.ts +1 -2
- package/lib/esm/curve/RegionOps.d.ts.map +1 -1
- package/lib/esm/curve/RegionOps.js +1 -1
- package/lib/esm/curve/RegionOps.js.map +1 -1
- package/lib/esm/curve/RegionOpsClassificationSweeps.d.ts +5 -8
- package/lib/esm/curve/RegionOpsClassificationSweeps.d.ts.map +1 -1
- package/lib/esm/curve/RegionOpsClassificationSweeps.js +12 -12
- package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
- package/lib/esm/geometry3d/GrowableXYArray.d.ts +2 -2
- package/lib/esm/geometry3d/GrowableXYArray.d.ts.map +1 -1
- package/lib/esm/geometry3d/GrowableXYArray.js +1 -1
- package/lib/esm/geometry3d/GrowableXYArray.js.map +1 -1
- package/lib/esm/geometry3d/GrowableXYZArray.d.ts +2 -3
- package/lib/esm/geometry3d/GrowableXYZArray.d.ts.map +1 -1
- package/lib/esm/geometry3d/GrowableXYZArray.js +1 -1
- package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
- package/lib/esm/geometry3d/IndexedXYZCollection.d.ts +18 -1
- package/lib/esm/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
- package/lib/esm/geometry3d/IndexedXYZCollection.js +13 -0
- package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
- package/lib/esm/geometry3d/PointHelpers.d.ts +1 -2
- package/lib/esm/geometry3d/PointHelpers.d.ts.map +1 -1
- package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
- package/lib/esm/geometry3d/PointStreaming.d.ts +1 -1
- package/lib/esm/geometry3d/PointStreaming.d.ts.map +1 -1
- package/lib/esm/geometry3d/PointStreaming.js +3 -1
- package/lib/esm/geometry3d/PointStreaming.js.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.d.ts +68 -1
- package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.js +150 -3
- package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
- package/lib/esm/geometry3d/PolylineOps.d.ts +23 -1
- package/lib/esm/geometry3d/PolylineOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolylineOps.js +73 -1
- package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
- package/lib/esm/geometry3d/Range.d.ts +1 -1
- package/lib/esm/geometry3d/Range.d.ts.map +1 -1
- package/lib/esm/geometry3d/Range.js.map +1 -1
- package/lib/esm/geometry3d/Transform.js +1 -1
- package/lib/esm/geometry3d/Transform.js.map +1 -1
- package/lib/esm/geometry3d/YawPitchRollAngles.d.ts +7 -5
- package/lib/esm/geometry3d/YawPitchRollAngles.d.ts.map +1 -1
- package/lib/esm/geometry3d/YawPitchRollAngles.js +8 -6
- package/lib/esm/geometry3d/YawPitchRollAngles.js.map +1 -1
- package/lib/esm/numerics/Polynomials.d.ts +13 -1
- package/lib/esm/numerics/Polynomials.d.ts.map +1 -1
- package/lib/esm/numerics/Polynomials.js +13 -1
- package/lib/esm/numerics/Polynomials.js.map +1 -1
- package/lib/esm/polyface/FacetLocationDetail.d.ts +28 -5
- package/lib/esm/polyface/FacetLocationDetail.d.ts.map +1 -1
- package/lib/esm/polyface/FacetLocationDetail.js +48 -14
- package/lib/esm/polyface/FacetLocationDetail.js.map +1 -1
- package/lib/esm/polyface/Polyface.d.ts +1 -1
- package/lib/esm/polyface/Polyface.d.ts.map +1 -1
- package/lib/esm/polyface/Polyface.js.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.d.ts +7 -3
- package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
- package/lib/esm/polyface/PolyfaceQuery.js +23 -0
- package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
- package/lib/esm/polyface/RangeTree/LineString3dRangeTreeContext.d.ts +52 -0
- package/lib/esm/polyface/RangeTree/LineString3dRangeTreeContext.d.ts.map +1 -0
- package/lib/esm/polyface/RangeTree/LineString3dRangeTreeContext.js +74 -0
- package/lib/esm/polyface/RangeTree/LineString3dRangeTreeContext.js.map +1 -0
- package/lib/esm/polyface/RangeTree/MinimumValueTester.d.ts +60 -0
- package/lib/esm/polyface/RangeTree/MinimumValueTester.d.ts.map +1 -0
- package/lib/esm/polyface/RangeTree/MinimumValueTester.js +92 -0
- package/lib/esm/polyface/RangeTree/MinimumValueTester.js.map +1 -0
- package/lib/esm/polyface/RangeTree/Point3dArrayRangeTreeContext.d.ts +57 -0
- package/lib/esm/polyface/RangeTree/Point3dArrayRangeTreeContext.d.ts.map +1 -0
- package/lib/esm/polyface/RangeTree/Point3dArrayRangeTreeContext.js +69 -0
- package/lib/esm/polyface/RangeTree/Point3dArrayRangeTreeContext.js.map +1 -0
- package/lib/esm/polyface/RangeTree/PolyfaceRangeTreeContext.d.ts +57 -0
- package/lib/esm/polyface/RangeTree/PolyfaceRangeTreeContext.d.ts.map +1 -0
- package/lib/esm/polyface/RangeTree/PolyfaceRangeTreeContext.js +80 -0
- package/lib/esm/polyface/RangeTree/PolyfaceRangeTreeContext.js.map +1 -0
- package/lib/esm/polyface/RangeTree/RangeTreeNode.d.ts +274 -0
- package/lib/esm/polyface/RangeTree/RangeTreeNode.d.ts.map +1 -0
- package/lib/esm/polyface/RangeTree/RangeTreeNode.js +497 -0
- package/lib/esm/polyface/RangeTree/RangeTreeNode.js.map +1 -0
- package/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.d.ts +204 -0
- package/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.d.ts.map +1 -0
- package/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.js +374 -0
- package/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.js.map +1 -0
- package/lib/esm/serialization/GeometrySamples.d.ts +36 -3
- package/lib/esm/serialization/GeometrySamples.d.ts.map +1 -1
- package/lib/esm/serialization/GeometrySamples.js +93 -4
- package/lib/esm/serialization/GeometrySamples.js.map +1 -1
- package/lib/esm/solid/LinearSweep.d.ts +1 -1
- package/lib/esm/solid/LinearSweep.js +1 -1
- package/lib/esm/solid/LinearSweep.js.map +1 -1
- package/lib/esm/solid/SweepContour.d.ts +2 -2
- package/lib/esm/solid/SweepContour.d.ts.map +1 -1
- package/lib/esm/solid/SweepContour.js.map +1 -1
- package/lib/esm/topology/Graph.d.ts +5 -6
- package/lib/esm/topology/Graph.d.ts.map +1 -1
- package/lib/esm/topology/Graph.js +7 -6
- package/lib/esm/topology/Graph.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.d.ts +4 -4
- package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js +5 -5
- package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphSearch.d.ts +108 -71
- package/lib/esm/topology/HalfEdgeGraphSearch.d.ts.map +1 -1
- package/lib/esm/topology/HalfEdgeGraphSearch.js +223 -109
- package/lib/esm/topology/HalfEdgeGraphSearch.js.map +1 -1
- package/lib/esm/topology/Merging.d.ts +1 -1
- package/lib/esm/topology/Merging.d.ts.map +1 -1
- package/lib/esm/topology/Merging.js.map +1 -1
- package/lib/esm/topology/SignedDataSummary.d.ts +13 -13
- package/lib/esm/topology/SignedDataSummary.d.ts.map +1 -1
- package/lib/esm/topology/SignedDataSummary.js +3 -3
- package/lib/esm/topology/SignedDataSummary.js.map +1 -1
- package/lib/esm/topology/Triangulation.d.ts +1 -12
- package/lib/esm/topology/Triangulation.d.ts.map +1 -1
- package/lib/esm/topology/Triangulation.js.map +1 -1
- package/lib/esm/topology/XYParitySearchContext.d.ts +27 -21
- package/lib/esm/topology/XYParitySearchContext.d.ts.map +1 -1
- package/lib/esm/topology/XYParitySearchContext.js +73 -71
- package/lib/esm/topology/XYParitySearchContext.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PolyfaceRangeTreeContext.js","sourceRoot":"","sources":["../../../../src/polyface/RangeTree/PolyfaceRangeTreeContext.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,6CAA0C;AAI1C,0CAAwD;AACxD,oDAAiD;AACjD,mDAA8D;AAC9D,uEAA6I;AAE7I;;;;GAIG;AACH,MAAa,wBAAwB;IAkBnC,6DAA6D;IAC7D,YAAoB,aAAoC,EAAE,OAAwB,EAAE,eAAwB,KAA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C,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC;IACpG,CAAC;CACF;AApFD,4DAoFC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module RangeSearch\n */\n\nimport { Geometry } from \"../../Geometry\";\nimport { Point3d } from \"../../geometry3d/Point3dVector3d\";\nimport { Range3d } from \"../../geometry3d/Range\";\nimport { FacetLocationDetail, FacetLocationDetailPair } from \"../FacetLocationDetail\";\nimport { Polyface, PolyfaceVisitor } from \"../Polyface\";\nimport { PolyfaceQuery } from \"../PolyfaceQuery\";\nimport { RangeTreeNode, RangeTreeOps } from \"./RangeTreeNode\";\nimport { SingleTreeSearchHandlerForClosestPointOnPolyface, TwoTreeSearchHandlerForFacetFacetCloseApproach } from \"./RangeTreeSearchHandlers\";\n\n/**\n * Handler class for searching a range tree containing the facets of a polyface.\n * * Facilitates multiple searches for closest point and close approach calculations.\n * @public\n */\nexport class PolyfaceRangeTreeContext {\n /** Visitor for the polyface being searched */\n public visitor: PolyfaceVisitor;\n /** Whether all facets to visit are known to be convex. */\n public convexFacets: boolean;\n\n /** Diagnostic: number of range tests that have returned true. */\n public numRangeTestTrue: number;\n /** Diagnostic: number of range tests that have been returned false */\n public numRangeTestFalse: number;\n /** Diagnostic: number of facet tests. */\n public numFacetTest: number;\n /** Diagnostic: number of searches performed. */\n public numSearch: number;\n\n /** Range tree, whose appData are facet (read) indices */\n private _rangeTreeRoot: RangeTreeNode<number>;\n\n /** Constructor: capture inputs, initialize debug counters */\n private constructor(rangeTreeRoot: RangeTreeNode<number>, visitor: PolyfaceVisitor, convexFacets: boolean = false) {\n this.visitor = visitor;\n this.convexFacets = convexFacets;\n this._rangeTreeRoot = rangeTreeRoot;\n this.numRangeTestTrue = 0;\n this.numRangeTestFalse = 0;\n this.numFacetTest = 0;\n this.numSearch = 0;\n }\n /**\n * Create a range tree context for the Polyface facets.\n * * This is a very simple construction that splits \"right and left parts\" of the facet sequence.\n * * Facets with any recognizable \"left to right\" or \"top to bottom\" sequencing will have very effective search structures.\n * @param visitor access to facets, captured if PolyfaceVisitor\n * @param maxChildPerNode maximum children per range tree node (default 4)\n * @param maxAppDataPerLeaf maximum facet indices per leaf node (default 4)\n * @param convexFacets whether all facets are known to be convex (cf. [[PolyfaceQuery.areFacetsConvex]]) (default false)\n */\n public static createCapture(visitor: Polyface | PolyfaceVisitor, maxChildPerNode: number = 4, maxAppDataPerLeaf: number = 4, convexFacets: boolean = false): PolyfaceRangeTreeContext | undefined {\n if (visitor instanceof Polyface)\n return this.createCapture(visitor.createVisitor(0), maxChildPerNode, maxAppDataPerLeaf, convexFacets);\n const numFacet = PolyfaceQuery.visitorClientFacetCount(visitor);\n const rangeTreeRoot = RangeTreeOps.createByIndexSplits<number>(\n (index: number): Range3d => { visitor.moveToReadIndex(index); return visitor.range(); },\n (index: number): number => { return index; },\n numFacet,\n maxChildPerNode,\n maxAppDataPerLeaf,\n );\n return rangeTreeRoot ? new PolyfaceRangeTreeContext(rangeTreeRoot, visitor, convexFacets) : undefined;\n }\n /**\n * Search the range tree for closest facet(s) to spacePoint.\n * @param spacePoint point to test\n * @param maxDist collect points at no more than this distance from spacePoint. If undefined, return only the closest point.\n * @param searchFacetInterior whether to include facet interiors in search. Default is false: just consider facet boundaries.\n * @return closest point detail(s) with detail.a set to the distance from spacePoint to detail.point\n */\n public searchForClosestPoint(spacePoint: Point3d, maxDist?: number, searchFacetInterior: boolean = false): FacetLocationDetail | FacetLocationDetail[] | undefined {\n const handler = new SingleTreeSearchHandlerForClosestPointOnPolyface(spacePoint, this, maxDist, searchFacetInterior);\n this.numSearch++;\n const numFacet = PolyfaceQuery.visitorClientFacetCount(this.visitor);\n // seed the search with a few points -- this reduces early trips deep into early ranges that are far from spacePoint.\n const numTest = Geometry.clamp(Math.floor(numFacet / 20), 2, 7);\n const testStep = Math.floor(numFacet / numTest);\n handler.processAppData(0);\n handler.processAppData(numFacet - 1);\n for (let i = testStep; i + 1 < numFacet; i += testStep)\n handler.processAppData(i);\n this._rangeTreeRoot.searchTopDown(handler);\n return handler.searchState.savedItems.length <= 1 ? handler.getResult() : handler.getSavedItems();\n }\n /**\n * Search the range trees for closest approach(es) between the polyfaces.\n * @param contextA first polyface context\n * @param contextB second polyface context\n * @param maxDist collect close approaches separated by no more than this distance. If undefined, return only the closest approach.\n * @param searchFacetInterior whether to include facet interiors in search (`context.convexFacets` must be true for both contexts). Default is false: just consider facet boundaries.\n * @return closest approach detail pair(s), one per context, with detail.a set to the approach distance\n */\n public static searchForClosestApproach(contextA: PolyfaceRangeTreeContext, contextB: PolyfaceRangeTreeContext, maxDist?: number, searchFacetInterior: boolean = false): FacetLocationDetailPair | FacetLocationDetailPair[] | undefined {\n const handler = new TwoTreeSearchHandlerForFacetFacetCloseApproach(contextA, contextB, maxDist, searchFacetInterior);\n RangeTreeNode.searchTwoTreesTopDown(contextA._rangeTreeRoot, contextB._rangeTreeRoot, handler);\n return handler.searchState.savedItems.length <= 1 ? handler.getResult() : handler.getSavedItems();\n }\n}\n"]}
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module RangeSearch
|
|
3
|
+
*/
|
|
4
|
+
import { Range3d } from "../../geometry3d/Range";
|
|
5
|
+
/** Type name FlexData is shorthand for a member or parameter which can be:
|
|
6
|
+
* * undefined
|
|
7
|
+
* * an array of values of type T
|
|
8
|
+
* * a singleton of type T
|
|
9
|
+
*/
|
|
10
|
+
type FlexData<T> = undefined | T[] | T;
|
|
11
|
+
/**
|
|
12
|
+
* Type name IndexToType is shorthand for a member or parameter which can be:
|
|
13
|
+
* * an array of values of type T
|
|
14
|
+
* * a function from integers to type T.
|
|
15
|
+
*/
|
|
16
|
+
type IndexToType<T> = T[] | ((index: number) => T);
|
|
17
|
+
/**
|
|
18
|
+
* Abstract class for handler objects called during traversal of a single range tree.
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
export declare abstract class SingleTreeSearchHandler<AppDataType> {
|
|
22
|
+
/** Return true if appData within the range should be offered to `processAppData`. */
|
|
23
|
+
abstract isRangeActive(range: Range3d): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Called for a (single) child referenced by a tree.
|
|
26
|
+
* * This is only called when range checks on the path from root have been passed.
|
|
27
|
+
* @param item child (of type AppDataType) in the tree.
|
|
28
|
+
*/
|
|
29
|
+
abstract processAppData(item: AppDataType): void;
|
|
30
|
+
/**
|
|
31
|
+
* Query to see if the active search has been aborted.
|
|
32
|
+
* * Default implementation returns false so query runs to completion.
|
|
33
|
+
* * Search processes check this after range tests and child processing.
|
|
34
|
+
*/
|
|
35
|
+
isAborted(): boolean;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Abstract class for handler objects called during traversal of two range trees.
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
export declare abstract class TwoTreeSearchHandler<AppDataType> {
|
|
42
|
+
/** Return true if appData within the ranges should be offered to `processAppDataPair`. */
|
|
43
|
+
abstract isRangePairActive(leftRange: Range3d, rightRange: Range3d): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Called with AppDataType items from left tree and right tree.
|
|
46
|
+
* * This is only called when range tests have been passed.
|
|
47
|
+
* @param leftItem
|
|
48
|
+
* @param rightItem
|
|
49
|
+
*/
|
|
50
|
+
abstract processAppDataPair(leftItem: AppDataType, rightItem: AppDataType): void;
|
|
51
|
+
/**
|
|
52
|
+
* Query to see if the active search has been aborted.
|
|
53
|
+
* * Default implementation returns false so query runs to completion.
|
|
54
|
+
* * Search processes check this after range tests and child processing.
|
|
55
|
+
*/
|
|
56
|
+
isAborted(): boolean;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* This class refines the TwoTreeSearchHandler with an implementation of `isRangePairActive` appropriate for computing the minimum distance between trees.
|
|
60
|
+
* * The concrete class must implement `getCurrentDistance()` method to provide the best-so-far distance.
|
|
61
|
+
* * The implementation of `isRangePairActive` returns true if the distance between ranges is less than or equal to the `getCurrentDistance()` value.
|
|
62
|
+
* @internal
|
|
63
|
+
*/
|
|
64
|
+
export declare abstract class TwoTreeDistanceMinimizationSearchHandler<AppDataType> extends TwoTreeSearchHandler<AppDataType> {
|
|
65
|
+
/**
|
|
66
|
+
* Provides the allowable distance between ranges.
|
|
67
|
+
* * Range pairs with more than this distance separation are rejected.
|
|
68
|
+
* * The implementation may alter (probably reduce) the getCurrentDistance() value as the search progresses.
|
|
69
|
+
*/
|
|
70
|
+
abstract getCurrentDistance(): number;
|
|
71
|
+
/**
|
|
72
|
+
* Method called to decide whether to process subtrees and immediate child appData items from a left tree node and right tree node.
|
|
73
|
+
* @param leftRange range from a node in the left tree
|
|
74
|
+
* @param rightRange range from a node in the right tree.
|
|
75
|
+
* @returns true if the smallest distance from leftRange to rightRange is less than or equal to getCurrentDistance()
|
|
76
|
+
*/
|
|
77
|
+
isRangePairActive(leftRange: Range3d, rightRange: Range3d): boolean;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* * TREE STRUCTURE
|
|
81
|
+
* * A RangeTreeNode is part of a range tree.
|
|
82
|
+
* * TREE is used here in a strictly _structural_ sense, which has no broad promises about data members.
|
|
83
|
+
* * Each RangeNode points to 0, 1 or many children.
|
|
84
|
+
* * Each child has (but does not point back to) a single parent.
|
|
85
|
+
* * The overall tree has a single root.
|
|
86
|
+
* * Each node is effectively the root of the tree of its children.
|
|
87
|
+
* * NON-TREE DATA MEMBERS
|
|
88
|
+
* * Data members in each node (in addition to children) are
|
|
89
|
+
* * _range = the union of ranges below in the heap
|
|
90
|
+
* * _appData = application data associated with the node.
|
|
91
|
+
* * Construction methods may place multiple _appData items in each node.
|
|
92
|
+
* * In common use, only the leaves will have _appData. However, the class definitions allow _appData at all nodes, and search algorithms must include them.
|
|
93
|
+
* * CONSTRUCTION
|
|
94
|
+
* * The RangeTreeNode.createByIndexSplits method constructs the tree with simple right-left splits within an array of input items.
|
|
95
|
+
* * The appData is placed entirely in the leaves.
|
|
96
|
+
* * caller can specify:
|
|
97
|
+
* * the number of _appData items per leaf
|
|
98
|
+
* * the number of children per node within the tree.
|
|
99
|
+
* * "deep" trees (2 children per node and one appData per leaf) may have (compared to shallow trees with many children per node and many appData per leaf)
|
|
100
|
+
* * faster search because lower nodes have smaller ranges that will be skipped by search algorithms.
|
|
101
|
+
* * larger memory use because of more nodes
|
|
102
|
+
* * For future construction methods:
|
|
103
|
+
* * _appData "above the leaves" may allow nodes below to have smaller ranges, but add complexity to search.
|
|
104
|
+
* @internal
|
|
105
|
+
*/
|
|
106
|
+
export declare class RangeTreeNode<AppDataType> {
|
|
107
|
+
private _range;
|
|
108
|
+
private _appData;
|
|
109
|
+
private _children;
|
|
110
|
+
/** an id assigned sequentially as nodes are created. For debugging use only. */
|
|
111
|
+
private _id;
|
|
112
|
+
/**
|
|
113
|
+
* CONSTRUCTOR
|
|
114
|
+
* CAPTURE (not copy)
|
|
115
|
+
* * range = range for search algorithms
|
|
116
|
+
* * appData = application data relevant to this node.
|
|
117
|
+
* * children = child node reference(s).
|
|
118
|
+
*/
|
|
119
|
+
private constructor();
|
|
120
|
+
/** Simplest public create: capture the range, appData, and children. */
|
|
121
|
+
static createCapture<AppDataType>(range: Range3d, appData: FlexData<AppDataType>, children: FlexData<RangeTreeNode<AppDataType>>): RangeTreeNode<AppDataType>;
|
|
122
|
+
/** copy (not capture) from given data into the range in this RangeEntry */
|
|
123
|
+
setRange(data: Range3d): void;
|
|
124
|
+
/** return (a copy of) the range in this RangeEntry */
|
|
125
|
+
getRange(data?: Range3d): Range3d;
|
|
126
|
+
/** return (a reference to) the range in this RangeEntry */
|
|
127
|
+
getRangeRef(): Range3d;
|
|
128
|
+
/**
|
|
129
|
+
* Access a child by index.
|
|
130
|
+
* * If the child data is an array, this dereferences the array.
|
|
131
|
+
* * If the child data is a singleton, treat it as index 0.
|
|
132
|
+
* * return undefined if there are no children.
|
|
133
|
+
* @param index index of item to access.
|
|
134
|
+
*/
|
|
135
|
+
getChildByIndex(index: number): RangeTreeNode<AppDataType> | undefined;
|
|
136
|
+
/**
|
|
137
|
+
* * Access an appData by index.
|
|
138
|
+
* * If the appData data is an array, this dereferences the array.
|
|
139
|
+
* * If the appData data is a singleton, treat it as if it is at index 0 in an array
|
|
140
|
+
* * return undefined if there are no appData or for any index out of range.
|
|
141
|
+
* @param index index of item to access.
|
|
142
|
+
*/
|
|
143
|
+
getAppDataByIndex(index: number): AppDataType | undefined;
|
|
144
|
+
/** Access the children or child (does not clone). */
|
|
145
|
+
getAllChildren(): FlexData<RangeTreeNode<AppDataType>>;
|
|
146
|
+
/** Access the appData array or singleton (does not clone). */
|
|
147
|
+
getAllAppData(): FlexData<AppDataType>;
|
|
148
|
+
/**
|
|
149
|
+
* Count the direct children in this node of the tree.
|
|
150
|
+
* * This is not recursive. For a recursive count, use `RangeTreeOps.getRecursiveNodeCount`.
|
|
151
|
+
*/
|
|
152
|
+
getNumChildren(): number;
|
|
153
|
+
/**
|
|
154
|
+
* Count the appData items in this node of the tree.
|
|
155
|
+
* * This is not recursive. For a recursive count, use `RangeTreeOps.getRecursiveAppDataCount`.
|
|
156
|
+
*/
|
|
157
|
+
getNumAppData(): number;
|
|
158
|
+
/**
|
|
159
|
+
* Depth-first tree iteration, calling `announceNode` on each node.
|
|
160
|
+
* @param announceNode callback that returns true to recurse into children
|
|
161
|
+
*/
|
|
162
|
+
recurseIntoTree(announceNode: (node: RangeTreeNode<AppDataType>) => boolean): void;
|
|
163
|
+
/**
|
|
164
|
+
* Depth-first tree iteration via handler.
|
|
165
|
+
* * if handler decides the instance range is active, process appData, then recurse on children
|
|
166
|
+
* * if handler decides to abort after processing an appData, skip processing rest of appData and children
|
|
167
|
+
*/
|
|
168
|
+
searchTopDown(handler: SingleTreeSearchHandler<AppDataType>): void;
|
|
169
|
+
/**
|
|
170
|
+
* Apply the handler.processAppDataPair method to each pair of appData items from leftAppData and rightStack.
|
|
171
|
+
* @param leftAppData singleton or array with data "from left"
|
|
172
|
+
* @param rightStack stack of nodes to process from right path.
|
|
173
|
+
* @param reverseArgs true if the caller is exchanging the sense of left and right and this should be undone in the actual call to handler.processAppDataPair.
|
|
174
|
+
* @param handler search handler
|
|
175
|
+
*/
|
|
176
|
+
private static processAppDataAndAppDataStack;
|
|
177
|
+
/**
|
|
178
|
+
* Apply the handler.processAppDataPair method to each pair of appData items from leftAppData and rightAppData.
|
|
179
|
+
* @param leftAppData singleton or array with data "from left"
|
|
180
|
+
* @param rightAppData singleton or array with data "from right"
|
|
181
|
+
* @param reverseArgs true if the caller is exchanging the sense of left and right and this should be undone in the actual call to handler.processAppDataPair.
|
|
182
|
+
* @param handler search handler
|
|
183
|
+
*/
|
|
184
|
+
private static processAppDataAndAppData;
|
|
185
|
+
/**
|
|
186
|
+
* Push the tip node to stack(s).
|
|
187
|
+
* @param tip new node (to be pushed)
|
|
188
|
+
* @param fullPath complete path, which is always extended
|
|
189
|
+
* @param partialPath partial path, which is only extended if the tip has _appData.
|
|
190
|
+
*/
|
|
191
|
+
private static pushPaths;
|
|
192
|
+
/**
|
|
193
|
+
* Pop the tip node from stack(s).
|
|
194
|
+
* @param tip should match the fullPath tip.
|
|
195
|
+
* @param fullPath complete path, which is always popped
|
|
196
|
+
* @param partialPath partial path, which is only popped if the tip has _appData.
|
|
197
|
+
*/
|
|
198
|
+
private static popPaths;
|
|
199
|
+
/**
|
|
200
|
+
* Process nodes from left and right trees of dual search.
|
|
201
|
+
* * The separate stacks for nodes that have appData is for efficiency.
|
|
202
|
+
* * If data is entirely in the leaves (or just in a few nodes), the stacks will all be empty (or very small) and no time will be wasted looking up the stacks for appData to process with the other tip.
|
|
203
|
+
* @param leftTip tip node being explored on left
|
|
204
|
+
* @param leftStack stack of prior left nodes
|
|
205
|
+
* @param leftStackWithAppData stack of prior left nodes which have appData.
|
|
206
|
+
* @param rightTip tip node being explored on right.
|
|
207
|
+
* @param rightStack stack of prior right nodes.
|
|
208
|
+
* @param rightStackWithAppData stack of prior right nodes which have appData.
|
|
209
|
+
* @param handler search handler
|
|
210
|
+
*/
|
|
211
|
+
private static recursivePairSearch;
|
|
212
|
+
/**
|
|
213
|
+
* Recurse below the tip of leftTip, offering each level's appData to the appData of rightTip and rightStackWithAppData.
|
|
214
|
+
* @param leftTip tip node being explored on left. Its appData is not processed.
|
|
215
|
+
* @param rightTip tip node being explored on right. It has no children.
|
|
216
|
+
* @param rightStackWithAppData stack of prior right nodes which have appData.
|
|
217
|
+
* @param reverseArgs true if the caller is exchanging the sense of left and right
|
|
218
|
+
* @param handler search handler
|
|
219
|
+
*/
|
|
220
|
+
private static leftRecursivePairSearch;
|
|
221
|
+
/**
|
|
222
|
+
* Recursive search down two trees, with range tests and child processing under control of a handler.
|
|
223
|
+
* @param leftRoot root of left tree
|
|
224
|
+
* @param rightRoot root of right tree
|
|
225
|
+
* @param handler handler for range tests and child process
|
|
226
|
+
*/
|
|
227
|
+
static searchTwoTreesTopDown<AppDataType>(leftRoot: RangeTreeNode<AppDataType>, rightRoot: RangeTreeNode<AppDataType>, handler: TwoTreeSearchHandler<AppDataType>): void;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Utilities for various operations on RangeTree
|
|
231
|
+
* @internal
|
|
232
|
+
*/
|
|
233
|
+
export declare class RangeTreeOps {
|
|
234
|
+
/** Count nodes in this tree. */
|
|
235
|
+
static getRecursiveNodeCount<AppDataType>(root: RangeTreeNode<AppDataType>): number;
|
|
236
|
+
/** Count appData in this tree. */
|
|
237
|
+
static getRecursiveAppDataCount<AppDataType>(root: RangeTreeNode<AppDataType>): number;
|
|
238
|
+
/**
|
|
239
|
+
* Create a leaf referencing appData items indexed index0<=index<index1 and with combined range of the same indices
|
|
240
|
+
* @param ranges access to ranges
|
|
241
|
+
* @param appData access to AppDataType items
|
|
242
|
+
* @param index0 first index for block of items
|
|
243
|
+
* @param index1 upper limit index for block of items.
|
|
244
|
+
* @param arrayLength one more than the largest range/appData index
|
|
245
|
+
* @returns newly created node.
|
|
246
|
+
*/
|
|
247
|
+
private static createLeafInIndexRange;
|
|
248
|
+
/**
|
|
249
|
+
* Split the array entries appData[index0 <= i < index1] into blocks of at most maxChildPerNode * maxAppDataPerLeaf and assemble into a tree structure.
|
|
250
|
+
* @param ranges access to ranges
|
|
251
|
+
* @param appData access to AppDataType items
|
|
252
|
+
* @param index0 start index of the block to access
|
|
253
|
+
* @param index1 terminal index for the block (one after final)
|
|
254
|
+
* @param arrayLength one more than the largest range/appData index
|
|
255
|
+
* @param maxChildPerNode max number of child nodes in each interior node
|
|
256
|
+
* @param maxAppDataPerLeaf max number of appData items in each leaf.
|
|
257
|
+
* @returns
|
|
258
|
+
*/
|
|
259
|
+
private static createRecursiveByIndexSplits;
|
|
260
|
+
/**
|
|
261
|
+
* Create a range tree by simple left-right split of given ranges.
|
|
262
|
+
* * Leaves carry the inputs in left-to-right order.
|
|
263
|
+
* * Each leaf range is labeled by its corresponding object(s) in the appData array.
|
|
264
|
+
* @param ranges access to ranges.
|
|
265
|
+
* @param appData access to AppDataType items (for leaves).
|
|
266
|
+
* @param arrayLength one more than the largest range/appData index
|
|
267
|
+
* @param maxChildrenPerNode max number of child nodes allowed for each interior node.
|
|
268
|
+
* @param maxAppDataPerLeaf max number of appData items allowed in each leaf.
|
|
269
|
+
* @returns the root of the new tree, or undefined if array lengths differ or are zero.
|
|
270
|
+
*/
|
|
271
|
+
static createByIndexSplits<AppDataType>(ranges: IndexToType<Range3d>, appData: IndexToType<AppDataType>, arrayLength: number, maxChildrenPerNode?: number, maxAppDataPerLeaf?: number): RangeTreeNode<AppDataType> | undefined;
|
|
272
|
+
}
|
|
273
|
+
export {};
|
|
274
|
+
//# sourceMappingURL=RangeTreeNode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
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