diff --git a/bin/index-3dtiles b/bin/index-3dtiles index ca056fe..26cab79 100755 --- a/bin/index-3dtiles +++ b/bin/index-3dtiles @@ -1,3 +1,3 @@ #!/usr/bin/env node -require("../dist/tsc/3dTiles/indexer.js"); +require("../build/3dTiles/indexer.js"); diff --git a/bin/index-kml-gltf b/bin/index-kml-gltf index e65f5a4..683bcf1 100755 --- a/bin/index-kml-gltf +++ b/bin/index-kml-gltf @@ -1,3 +1,3 @@ #!/usr/bin/env node -require("../dist/tsc/kml-gltf/indexer.js"); +require("../build/kml-gltf/indexer.js"); diff --git a/dist/tsc/3dTiles/b3dms.d.ts b/build/3dTiles/b3dms.d.ts similarity index 93% rename from dist/tsc/3dTiles/b3dms.d.ts rename to build/3dTiles/b3dms.d.ts index f05c736..9378dd7 100644 --- a/dist/tsc/3dTiles/b3dms.d.ts +++ b/build/3dTiles/b3dms.d.ts @@ -1,9 +1,9 @@ /// -export declare type FeatureTable = { +export type FeatureTable = { jsonFeatureTable: any; binaryFeatureTable: Buffer; }; -export declare type BatchTable = { +export type BatchTable = { jsonBatchTable: any; binaryBatchTable: Buffer; }; diff --git a/dist/tsc/3dTiles/b3dms.js b/build/3dTiles/b3dms.js similarity index 80% rename from dist/tsc/3dTiles/b3dms.js rename to build/3dTiles/b3dms.js index f469038..712b4a8 100644 --- a/dist/tsc/3dTiles/b3dms.js +++ b/build/3dTiles/b3dms.js @@ -1,10 +1,32 @@ "use strict"; // Various utility functions for working with B3DMs // See: https://github.com/CesiumGS/3d-tiles/blob/master/specification/TileFormats/Batched3DModel/README.md#feature-table +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; Object.defineProperty(exports, "__esModule", { value: true }); exports.readRtcCenter = exports.getFeatureTableGlobalProperty = exports.getBatchTableProperties = exports.getBatchTable = exports.getBinaryBatchTable = exports.getJSONBatchTable = exports.getFeatureTable = exports.getBinaryFeatureTable = exports.getJSONFeatureTable = exports.getGlb = void 0; -const tslib_1 = require("tslib"); -const binaryProperty = tslib_1.__importStar(require("./binaryProperty")); +const binaryProperty = __importStar(require("./binaryProperty")); function getGlb(b3dm) { const glbStart = getBodyStart() + getFeatureTableJSONByteLength(b3dm) + @@ -116,4 +138,3 @@ function getBatchTableJSONByteLength(b3dm) { function getBatchTableBinaryByteLength(b3dm) { return b3dm.readUInt32LE(24); } -//# sourceMappingURL=b3dms.js.map \ No newline at end of file diff --git a/dist/tsc/3dTiles/binaryProperty.d.ts b/build/3dTiles/binaryProperty.d.ts similarity index 67% rename from dist/tsc/3dTiles/binaryProperty.d.ts rename to build/3dTiles/binaryProperty.d.ts index 34cc84f..4227697 100644 --- a/dist/tsc/3dTiles/binaryProperty.d.ts +++ b/build/3dTiles/binaryProperty.d.ts @@ -1,9 +1,9 @@ -declare type BinaryProperty = { +type BinaryProperty = { byteOffset: number; componentType: number; type: BinaryPropertyType; }; -declare type BinaryPropertyType = "SCALAR" | "VEC2" | "VEC3" | "VEC4" | "MAT2" | "MAT3" | "MAT4"; +type BinaryPropertyType = "SCALAR" | "VEC2" | "VEC3" | "VEC4" | "MAT2" | "MAT3" | "MAT4"; export declare function parse(json: any): BinaryProperty; export declare function read(binaryProperty: BinaryProperty, binaryBody: Uint8Array, batchLength: number): any[]; export {}; diff --git a/dist/tsc/3dTiles/binaryProperty.js b/build/3dTiles/binaryProperty.js similarity index 89% rename from dist/tsc/3dTiles/binaryProperty.js rename to build/3dTiles/binaryProperty.js index a8fb91e..38c034d 100644 --- a/dist/tsc/3dTiles/binaryProperty.js +++ b/build/3dTiles/binaryProperty.js @@ -23,8 +23,8 @@ const ClassTypes = { }; const binaryPropertyTypes = Object.keys(ComponentsPerAttribute); function parse(json) { - Json_1.assertObject(json, "Object"); - Json_1.assertNumber(json.byteOffset, "byteOffset"); + (0, Json_1.assertObject)(json, "Object"); + (0, Json_1.assertNumber)(json.byteOffset, "byteOffset"); const type = parseBinaryPropertyType(json.type); const componentType = parseComponentType(json.componentType); return { @@ -35,7 +35,7 @@ function parse(json) { } exports.parse = parse; function parseBinaryPropertyType(json) { - Json_1.assertString(json, "type"); + (0, Json_1.assertString)(json, "type"); if (binaryPropertyTypes.includes(json)) return json; throw new Error(`Expected type to be ${binaryPropertyTypes.join("|")}, got ${json}`); @@ -43,7 +43,7 @@ function parseBinaryPropertyType(json) { function parseComponentType(json) { if (typeof json === "string") return cesium_1.ComponentDatatype.fromName(json); - Json_1.assertNumber(json, "componentType"); + (0, Json_1.assertNumber)(json, "componentType"); return json; } function read(binaryProperty, binaryBody, batchLength) { @@ -60,4 +60,3 @@ function read(binaryProperty, binaryBody, batchLength) { return values; } exports.read = read; -//# sourceMappingURL=binaryProperty.js.map \ No newline at end of file diff --git a/dist/tsc/3dTiles/indexer.d.ts b/build/3dTiles/indexer.d.ts similarity index 56% rename from dist/tsc/3dTiles/indexer.d.ts rename to build/3dTiles/indexer.d.ts index 4c5330f..e869505 100644 --- a/dist/tsc/3dTiles/indexer.d.ts +++ b/build/3dTiles/indexer.d.ts @@ -2,4 +2,4 @@ * Runs the indexer with the given arguments * @params argv An argument array */ -export default function runIndexer(argv: string[]): void; +export default function runIndexer(argv: string[]): Promise; diff --git a/dist/tsc/3dTiles/indexer.js b/build/3dTiles/indexer.js similarity index 65% rename from dist/tsc/3dTiles/indexer.js rename to build/3dTiles/indexer.js index ed20696..57286e2 100644 --- a/dist/tsc/3dTiles/indexer.js +++ b/build/3dTiles/indexer.js @@ -1,17 +1,39 @@ "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); const cesium_1 = require("cesium"); -const fse = tslib_1.__importStar(require("fs-extra")); -const path = tslib_1.__importStar(require("path")); +const fse = __importStar(require("fs-extra")); +const path = __importStar(require("path")); const Config_1 = require("../Config"); +const IndexBuilder_1 = require("../IndexBuilder"); const constants_1 = require("../constants"); -const gltfs = tslib_1.__importStar(require("../gltfs")); +const gltfs = __importStar(require("../gltfs")); const gltfs_1 = require("../gltfs"); -const IndexBuilder_1 = require("../IndexBuilder"); const utils_1 = require("../utils"); -const b3dms = tslib_1.__importStar(require("./b3dms")); -const tiles = tslib_1.__importStar(require("./tiles")); +const b3dms = __importStar(require("./b3dms")); +const tiles = __importStar(require("./tiles")); const USAGE = "USAGE: npx index-3dtiles "; /** * Generate an index for the given tileset. @@ -25,9 +47,9 @@ const USAGE = "USAGE: npx index-3dtiles < * Because we uniquify the features, if there are 2 LOD tiles for the same feature * has different properties we only index the properties of the highest LOD tile. */ -function index3dTileset(tileset, tilesetDir, indexesConfig, outDir) { - const indexBuilders = Object.entries(indexesConfig.indexes).map(([property, config]) => IndexBuilder_1.createIndexBuilder(property, config)); - const features = readTilesetFeatures(tileset, tilesetDir, indexesConfig); +async function index3dTileset(tileset, tilesetDir, indexesConfig, outDir) { + const indexBuilders = Object.entries(indexesConfig.indexes).map(([property, config]) => (0, IndexBuilder_1.createIndexBuilder)(property, config)); + const features = await readTilesetFeatures(tileset, tilesetDir, indexesConfig); const featuresCount = Object.entries(features).length; console.log(`\nUnique features found: ${featuresCount}`); console.log("Building indexes..."); @@ -35,11 +57,14 @@ function index3dTileset(tileset, tilesetDir, indexesConfig, outDir) { Object.entries(features).forEach(([idValue, { position, properties }]) => { const positionProperties = { // rounding to fewer decimal places significantly reduces the size of resultData file - latitude: utils_1.roundToNDecimalPlaces(cesium_1.Math.toDegrees(position.latitude), 5), - longitude: utils_1.roundToNDecimalPlaces(cesium_1.Math.toDegrees(position.longitude), 5), - height: utils_1.roundToNDecimalPlaces(position.height, 3), + latitude: (0, utils_1.roundToNDecimalPlaces)(cesium_1.Math.toDegrees(position.latitude), 5), + longitude: (0, utils_1.roundToNDecimalPlaces)(cesium_1.Math.toDegrees(position.longitude), 5), + height: (0, utils_1.roundToNDecimalPlaces)(position.height, 3), }; - const len = resultsData.push(Object.assign({ [indexesConfig.idProperty]: idValue }, positionProperties)); + const len = resultsData.push({ + [indexesConfig.idProperty]: idValue, + ...positionProperties, + }); const dataRowId = len - 1; indexBuilders.forEach((b) => { if (b.property in properties) { @@ -51,14 +76,14 @@ function index3dTileset(tileset, tilesetDir, indexesConfig, outDir) { }); }); console.log("Writing indexes..."); - const indexes = IndexBuilder_1.writeIndexes(indexBuilders, outDir); - const resultsDataUrl = IndexBuilder_1.writeResultsData(resultsData, outDir); + const indexes = (0, IndexBuilder_1.writeIndexes)(indexBuilders, outDir); + const resultsDataUrl = (0, IndexBuilder_1.writeResultsData)(resultsData, outDir); const indexRoot = { resultsDataUrl, idProperty: indexesConfig.idProperty, indexes, }; - IndexBuilder_1.writeIndexRoot(indexRoot, outDir); + (0, IndexBuilder_1.writeIndexRoot)(indexRoot, outDir); console.log(`Indexes written to ${outDir}/`); console.log("Done."); } @@ -69,19 +94,18 @@ function index3dTileset(tileset, tilesetDir, indexesConfig, outDir) { * @param indexesConfig The indexes config object * @returns An object containing {properties,position} for each feature in the tilset. The object is keyed by the idProperty for the feature. */ -function readTilesetFeatures(tileset, tilesetDir, indexesConfig) { +async function readTilesetFeatures(tileset, tilesetDir, indexesConfig) { const uniqueFeatures = {}; let featuresRead = 0; // The tileset can contain child tilesets. We add any child tilesets that we come // across to this queue so that they will be processed sequentially. const tilesetQueue = [tileset]; - for (tileset of tilesetQueue) { + for await (tileset of tilesetQueue) { // For each feature in each tile in the tileset // 1. read properties for the feature from the batch table // 2. compute position of the feature from the vertex data // Then generate a unique list of feature id -> {position, properties} value - tiles.forEachTile(tileset, ({ tile, computedTransform: tileTransform }) => { - var _a; + const promise = tiles.forEachTile(tileset, async ({ tile, computedTransform: tileTransform }) => { const tileUri = tiles.uri(tile); if (tileUri === undefined) { return; @@ -105,11 +129,11 @@ function readTilesetFeatures(tileset, tilesetDir, indexesConfig) { const batchTable = b3dms.getBatchTable(b3dm); const batchTableProperties = b3dms.getBatchTableProperties(batchTable, batchLength); let computedFeaturePositions = []; - const gltf = gltfs.parseGlb(b3dms.getGlb(b3dm)); + const gltf = await gltfs.parseGlb(b3dms.getGlb(b3dm)); if (gltf !== undefined) { - const rtcTransform = getRtcTransform(featureTable, gltf); const toZUpTransform = tiles.toZUpTransform(tileset); - computedFeaturePositions = (_a = gltfs_1.computeFeaturePositionsFromGltfVertices(gltf, tileTransform, rtcTransform, toZUpTransform)) !== null && _a !== void 0 ? _a : []; + computedFeaturePositions = + (0, gltfs_1.computeFeaturePositionsFromGltfVertices)(gltf, tileTransform, toZUpTransform) ?? []; } for (let batchId = 0; batchId < batchLength; batchId++) { const batchProperties = {}; @@ -125,30 +149,18 @@ function readTilesetFeatures(tileset, tilesetDir, indexesConfig) { properties: batchProperties, }; featuresRead += 1; - utils_1.logOnSameLine(`Features read: ${featuresRead}`); + (0, utils_1.logOnSameLine)(`Features read: ${featuresRead}`); } }); + await promise; } return uniqueFeatures; } -/** - * Returns an RTC_CENTER or CESIUM_RTC transformation matrix which ever exists. - * - */ -function getRtcTransform(featureTable, gltf) { - var _a, _b; - const b3dmRtcCenter = b3dms.readRtcCenter(featureTable); - const rtcCenter = b3dmRtcCenter !== null && b3dmRtcCenter !== void 0 ? b3dmRtcCenter : (_b = (_a = gltf.json.extensions) === null || _a === void 0 ? void 0 : _a.CESIUM_RTC) === null || _b === void 0 ? void 0 : _b.center; - const rtcTransform = rtcCenter - ? cesium_1.Matrix4.fromTranslation(cesium_1.Cartesian3.fromArray(rtcCenter)) - : cesium_1.Matrix4.IDENTITY.clone(); - return rtcTransform; -} /** * Runs the indexer with the given arguments * @params argv An argument array */ -function runIndexer(argv) { +async function runIndexer(argv) { const [tilesetFile, indexConfigFile, outDir] = argv.slice(2); let tileset; let indexesConfig; @@ -158,26 +170,25 @@ function runIndexer(argv) { catch (e) { console.error(`Failed to read tileset file "${tilesetFile}"`); console.error(e); - utils_1.printUsageAndExit(USAGE); + (0, utils_1.printUsageAndExit)(USAGE); } try { - indexesConfig = Config_1.parseIndexesConfig(JSON.parse(fse.readFileSync(indexConfigFile).toString())); + indexesConfig = (0, Config_1.parseIndexesConfig)(JSON.parse(fse.readFileSync(indexConfigFile).toString())); } catch (e) { console.error(`Failed to read index config file "${indexConfigFile}"`); console.error(e); - utils_1.printUsageAndExit(USAGE); + (0, utils_1.printUsageAndExit)(USAGE); return; } if (typeof outDir !== "string") { console.error(`Output directory not specified.`); - utils_1.printUsageAndExit(USAGE); + (0, utils_1.printUsageAndExit)(USAGE); } fse.mkdirpSync(outDir); const tilesetDir = path.dirname(tilesetFile); - index3dTileset(tileset, tilesetDir, indexesConfig, outDir); + await index3dTileset(tileset, tilesetDir, indexesConfig, outDir); } exports.default = runIndexer; // TODO: do not run, instead just export this function runIndexer(process.argv); -//# sourceMappingURL=indexer.js.map \ No newline at end of file diff --git a/dist/tsc/3dTiles/tiles.d.ts b/build/3dTiles/tiles.d.ts similarity index 87% rename from dist/tsc/3dTiles/tiles.d.ts rename to build/3dTiles/tiles.d.ts index a035cb3..96e9878 100644 --- a/dist/tsc/3dTiles/tiles.d.ts +++ b/build/3dTiles/tiles.d.ts @@ -1,11 +1,11 @@ import { Matrix4 } from "cesium"; -declare type Tileset = { +type Tileset = { root?: Tile; asset?: { gltfUpAxis?: number; }; }; -declare type Tile = { +type Tile = { content?: { uri?: string; url?: string; @@ -16,7 +16,7 @@ declare type Tile = { export declare function forEachTile(tileset: Tileset, iterFn: (value: { tile: Tile; computedTransform: Matrix4; -}) => void): void; +}) => Promise): Promise; export declare function uri(tile: Tile): string | undefined; export declare function toZUpTransform(tileset: Tileset): any; export {}; diff --git a/dist/tsc/3dTiles/tiles.js b/build/3dTiles/tiles.js similarity index 59% rename from dist/tsc/3dTiles/tiles.js rename to build/3dTiles/tiles.js index 2676679..88c825a 100644 --- a/dist/tsc/3dTiles/tiles.js +++ b/build/3dTiles/tiles.js @@ -2,32 +2,30 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.toZUpTransform = exports.uri = exports.forEachTile = void 0; const cesium_1 = require("cesium"); -function forEachTile(tileset, iterFn) { +async function forEachTile(tileset, iterFn) { const root = tileset.root; if (root === undefined) { return; } - const iterTile = (tile, parentTransform) => { + const iterTile = async (tile, parentTransform) => { const computedTransform = tile.transform !== undefined ? cesium_1.Matrix4.multiply(parentTransform, cesium_1.Matrix4.unpack(tile.transform), new cesium_1.Matrix4()) : parentTransform; - iterFn({ tile, computedTransform }); + await iterFn({ tile, computedTransform }); if (Array.isArray(tile.children)) { - tile.children.forEach((child) => iterTile(child, computedTransform)); + await Promise.all(tile.children.map((child) => iterTile(child, computedTransform))); } }; - iterTile(root, cesium_1.Matrix4.IDENTITY.clone()); + return iterTile(root, cesium_1.Matrix4.IDENTITY.clone()); } exports.forEachTile = forEachTile; function uri(tile) { - var _a, _b, _c; // older formats use url - return (_b = (_a = tile.content) === null || _a === void 0 ? void 0 : _a.uri) !== null && _b !== void 0 ? _b : (_c = tile.content) === null || _c === void 0 ? void 0 : _c.url; + return tile.content?.uri ?? tile.content?.url; } exports.uri = uri; function toZUpTransform(tileset) { - var _a, _b; - const upAxis = (_b = (_a = tileset.asset) === null || _a === void 0 ? void 0 : _a.gltfUpAxis) !== null && _b !== void 0 ? _b : cesium_1.Axis.Y; + const upAxis = tileset.asset?.gltfUpAxis ?? cesium_1.Axis.Y; const transform = upAxis === cesium_1.Axis.Y ? cesium_1.Axis.Y_UP_TO_Z_UP.clone() : upAxis === cesium_1.Axis.X @@ -36,4 +34,3 @@ function toZUpTransform(tileset) { return transform; } exports.toZUpTransform = toZUpTransform; -//# sourceMappingURL=tiles.js.map \ No newline at end of file diff --git a/dist/tsc/Config.d.ts b/build/Config.d.ts similarity index 72% rename from dist/tsc/Config.d.ts rename to build/Config.d.ts index 62547ee..8417aef 100644 --- a/dist/tsc/Config.d.ts +++ b/build/Config.d.ts @@ -1,9 +1,9 @@ import { IndexType } from "./Index"; -export declare type IndexesConfig = { +export type IndexesConfig = { idProperty: string; indexes: Record; }; -export declare type IndexConfig = { +export type IndexConfig = { type: IndexType; }; export declare function parseIndexesConfig(json: any): IndexesConfig; diff --git a/dist/tsc/Config.js b/build/Config.js similarity index 75% rename from dist/tsc/Config.js rename to build/Config.js index 639d34e..c1e3a77 100644 --- a/dist/tsc/Config.js +++ b/build/Config.js @@ -4,8 +4,8 @@ exports.parseIndexesConfig = void 0; const Index_1 = require("./Index"); const Json_1 = require("./Json"); function parseIndexesConfig(json) { - Json_1.assertObject(json, "IndexesConfig"); - Json_1.assertString(json.idProperty, "idProperty"); + (0, Json_1.assertObject)(json, "IndexesConfig"); + (0, Json_1.assertString)(json.idProperty, "idProperty"); const indexes = parseIndexes(json.indexes); return { idProperty: json.idProperty, @@ -14,22 +14,21 @@ function parseIndexesConfig(json) { } exports.parseIndexesConfig = parseIndexesConfig; function parseIndexes(json) { - Json_1.assertObject(json, "IndexesConfig.indexes"); + (0, Json_1.assertObject)(json, "IndexesConfig.indexes"); return Object.entries(json).reduce((indexes, [property, indexConfigJson]) => { indexes[property] = parseIndexConfig(indexConfigJson); return indexes; }, {}); } function parseIndexConfig(json) { - Json_1.assertObject(json, "IndexConfig"); + (0, Json_1.assertObject)(json, "IndexConfig"); return { type: parseIndexType(json.type), }; } function parseIndexType(json) { - Json_1.assertString(json, "IndexType"); + (0, Json_1.assertString)(json, "IndexType"); if (Index_1.indexTypes.includes(json)) return json; throw new Error(`Expected index type to be ${Index_1.indexTypes.join("|")}, got ${json}`); } -//# sourceMappingURL=Config.js.map \ No newline at end of file diff --git a/dist/tsc/Index.d.ts b/build/Index.d.ts similarity index 59% rename from dist/tsc/Index.d.ts rename to build/Index.d.ts index 9dc3f01..29a14c5 100644 --- a/dist/tsc/Index.d.ts +++ b/build/Index.d.ts @@ -3,28 +3,28 @@ export interface IndexRoot { idProperty: string; indexes: Record; } -export declare type Index = NumericIndex | EnumIndex | TextIndex; -export declare type IndexType = Index["type"]; +export type Index = NumericIndex | EnumIndex | TextIndex; +export type IndexType = Index["type"]; export declare const indexTypes: string[]; -export declare type NumericIndex = { +export type NumericIndex = { type: "numeric"; url: string; range: NumericRange; }; -export declare type NumericRange = { +export type NumericRange = { min: number; max: number; }; -export declare type EnumIndex = { +export type EnumIndex = { type: "enum"; values: Record; }; -export declare type EnumValue = { +export type EnumValue = { count: number; url: string; dataRowIds?: number[]; }; -export declare type TextIndex = { +export type TextIndex = { type: "text"; url: string; }; diff --git a/dist/tsc/Index.js b/build/Index.js similarity index 92% rename from dist/tsc/Index.js rename to build/Index.js index 9e9faf1..852d2b4 100644 --- a/dist/tsc/Index.js +++ b/build/Index.js @@ -9,4 +9,3 @@ const _indexTypes = { text: true, }; exports.indexTypes = Object.keys(_indexTypes); -//# sourceMappingURL=Index.js.map \ No newline at end of file diff --git a/dist/tsc/IndexBuilder.d.ts b/build/IndexBuilder.d.ts similarity index 91% rename from dist/tsc/IndexBuilder.d.ts rename to build/IndexBuilder.d.ts index dbe9fd6..2fbd131 100644 --- a/dist/tsc/IndexBuilder.d.ts +++ b/build/IndexBuilder.d.ts @@ -1,8 +1,8 @@ import MiniSearch from "minisearch"; import { Index, NumericIndex, EnumIndex, TextIndex, EnumValue, IndexRoot } from "./Index"; import { IndexConfig } from "./Config"; -export declare type IndexBuilder = NumericIndexBuilder | TextIndexBuilder | EnumIndexBuilder; -export declare type IndexDefinition = Omit; +export type IndexBuilder = NumericIndexBuilder | TextIndexBuilder | EnumIndexBuilder; +export type IndexDefinition = Omit; export declare class NumericIndexBuilder { readonly property: string; readonly config: IndexConfig; diff --git a/dist/tsc/IndexBuilder.js b/build/IndexBuilder.js similarity index 73% rename from dist/tsc/IndexBuilder.js rename to build/IndexBuilder.js index f80f4b5..241620e 100644 --- a/dist/tsc/IndexBuilder.js +++ b/build/IndexBuilder.js @@ -1,11 +1,36 @@ "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; Object.defineProperty(exports, "__esModule", { value: true }); exports.writeIndexRoot = exports.writeResultsData = exports.writeIndexes = exports.createIndexBuilder = exports.EnumIndexBuilder = exports.TextIndexBuilder = exports.NumericIndexBuilder = void 0; -const tslib_1 = require("tslib"); -const minisearch_1 = tslib_1.__importDefault(require("minisearch")); -const path = tslib_1.__importStar(require("path")); -const fse = tslib_1.__importStar(require("fs-extra")); -const writeCsv_1 = tslib_1.__importDefault(require("./writeCsv")); +const minisearch_1 = __importDefault(require("minisearch")); +const path = __importStar(require("path")); +const fse = __importStar(require("fs-extra")); +const writeCsv_1 = __importDefault(require("./writeCsv")); class NumericIndexBuilder { constructor(property, config) { this.property = property; @@ -28,7 +53,7 @@ class NumericIndexBuilder { this.idValuePairs.sort((a, b) => a.value - b.value); const fileName = `${fileId}.csv`; const filePath = path.join(outDir, fileName); - writeCsv_1.default(filePath, this.idValuePairs); + (0, writeCsv_1.default)(filePath, this.idValuePairs); return { type: "numeric", url: fileName, @@ -81,7 +106,7 @@ class EnumIndexBuilder { writeValueIndex(fileId, valueId, ids, outDir) { const fileName = `${fileId}-${valueId}.csv`; const filePath = path.join(outDir, fileName); - writeCsv_1.default(filePath, ids); + (0, writeCsv_1.default)(filePath, ids); return { count: ids.length, url: fileName, @@ -116,7 +141,7 @@ exports.writeIndexes = writeIndexes; function writeResultsData(data, outDir) { const fileName = "resultsData.csv"; const filePath = path.join(outDir, fileName); - writeCsv_1.default(filePath, data); + (0, writeCsv_1.default)(filePath, data); return fileName; } exports.writeResultsData = writeResultsData; @@ -129,4 +154,3 @@ function writeIndexRoot(indexRoot, outDir) { .write(JSON.stringify(indexRoot)); } exports.writeIndexRoot = writeIndexRoot; -//# sourceMappingURL=IndexBuilder.js.map \ No newline at end of file diff --git a/dist/tsc/Json.d.ts b/build/Json.d.ts similarity index 91% rename from dist/tsc/Json.d.ts rename to build/Json.d.ts index ca2fd7e..427f31f 100644 --- a/dist/tsc/Json.d.ts +++ b/build/Json.d.ts @@ -1,4 +1,4 @@ -declare type JsonValue = boolean | number | string | null | JsonArray | JsonObject; +type JsonValue = boolean | number | string | null | JsonArray | JsonObject; export interface JsonObject { [key: string]: JsonValue; } diff --git a/dist/tsc/Json.js b/build/Json.js similarity index 98% rename from dist/tsc/Json.js rename to build/Json.js index 0045d0c..db98ab0 100644 --- a/dist/tsc/Json.js +++ b/build/Json.js @@ -48,4 +48,3 @@ function throwUnexpectedError(expectedType, actualType, name) { const nameToBe = name ? ` ${name} to be` : ""; throw new Error(`Expected${nameToBe} ${expectedType}, got ${actualType}`); } -//# sourceMappingURL=Json.js.map \ No newline at end of file diff --git a/dist/tsc/constants.d.ts b/build/constants.d.ts similarity index 100% rename from dist/tsc/constants.d.ts rename to build/constants.d.ts diff --git a/dist/tsc/constants.js b/build/constants.js similarity index 88% rename from dist/tsc/constants.js rename to build/constants.js index d47153a..e1d5bb0 100644 --- a/dist/tsc/constants.js +++ b/build/constants.js @@ -4,4 +4,3 @@ exports.COMPUTED_HEIGHT_PROPERTY_NAME = void 0; // The name used for the computed feature height. Use this name in the index configuration to // index the computed height exports.COMPUTED_HEIGHT_PROPERTY_NAME = "height"; -//# sourceMappingURL=constants.js.map \ No newline at end of file diff --git a/build/gltfs.d.ts b/build/gltfs.d.ts new file mode 100644 index 0000000..a700fd1 --- /dev/null +++ b/build/gltfs.d.ts @@ -0,0 +1,25 @@ +/// +import { Accessor, Document } from "@gltf-transform/core"; +import { Cartographic, Matrix4 } from "cesium"; +export type Gltf = { + json: any; + buffers: Buffer[]; +}; +declare enum ComponentType { + UNSIGNED_BYTE = 5121, + SHORT = 5123, + FLOAT = 5126 +} +export declare function isValidComponentType(value: number): value is ComponentType; +export declare function asComponentType(value: number): ComponentType; +export declare function parseGlb(glb: Buffer): Promise; +export declare function parseGltf(gltfJson: any): Promise; +export declare function readValueAt(accessor: Accessor, n: number): number[]; +/** + * Compute position for each feature from the vertex data + * + * @returns An array of Cartographic positions one for each feature. The array + * can be indexed by the batchId for the feature. + */ +export declare function computeFeaturePositionsFromGltfVertices(gltf: Document, tileTransform: Matrix4, toZUpTransform: Matrix4): Cartographic[] | undefined; +export {}; diff --git a/build/gltfs.js b/build/gltfs.js new file mode 100644 index 0000000..e07a796 --- /dev/null +++ b/build/gltfs.js @@ -0,0 +1,137 @@ +"use strict"; +// Various utility functions for working with GLTFs +// See: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.computeFeaturePositionsFromGltfVertices = exports.readValueAt = exports.parseGltf = exports.parseGlb = exports.asComponentType = exports.isValidComponentType = void 0; +const _3d_tiles_tools_1 = require("3d-tiles-tools"); +const core_1 = require("@gltf-transform/core"); +const extensions_1 = require("@gltf-transform/extensions"); +const cesium_1 = require("cesium"); +const draco3dgltf_1 = __importDefault(require("draco3dgltf")); +// Add more types here as required from https://github.com/CesiumGS/cesium/blob/master/Source/Core/ComponentDatatype.js#L12 +var ComponentType; +(function (ComponentType) { + ComponentType[ComponentType["UNSIGNED_BYTE"] = 5121] = "UNSIGNED_BYTE"; + ComponentType[ComponentType["SHORT"] = 5123] = "SHORT"; + ComponentType[ComponentType["FLOAT"] = 5126] = "FLOAT"; +})(ComponentType || (ComponentType = {})); +function isValidComponentType(value) { + return value in ComponentType; +} +exports.isValidComponentType = isValidComponentType; +function asComponentType(value) { + if (isValidComponentType(value)) + return value; + throw new Error(`Unhandled component type: ${value}`); +} +exports.asComponentType = asComponentType; +async function parseGlb(glb) { + const io = new core_1.NodeIO(); + io.registerExtensions(extensions_1.ALL_EXTENSIONS) // pass through extensions we do not handle explicitly + .registerDependencies({ + "draco3d.decoder": await draco3dgltf_1.default.createDecoderModule(), + }); + // Replaces CESIUM_RTC by inserting new nodes that wrap existing nodes inside + // a transform + const modernGlb = await _3d_tiles_tools_1.GltfUtilities.replaceCesiumRtcExtension(glb); + const document = await io.readBinary(new Uint8Array(modernGlb)); + return document; +} +exports.parseGlb = parseGlb; +async function parseGltf(gltfJson) { + const io = new core_1.NodeIO(); + io.registerExtensions(extensions_1.ALL_EXTENSIONS) // pass through extensions we do not handle explicitly + .registerDependencies({ + "draco3d.decoder": await draco3dgltf_1.default.createDecoderModule(), + }); + const document = await io.readJSON(gltfJson); + return document; +} +exports.parseGltf = parseGltf; +function readValueAt(accessor, n) { + const elements = accessor.getElementSize(); + const start = n * elements; + const valueComponents = Array.from(accessor.getArray()?.slice(start, start + elements) ?? []); + return valueComponents; +} +exports.readValueAt = readValueAt; +/** + * Compute position for each feature from the vertex data + * + * @returns An array of Cartographic positions one for each feature. The array + * can be indexed by the batchId for the feature. + */ +function computeFeaturePositionsFromGltfVertices(gltf, tileTransform, toZUpTransform) { + const root = gltf.getRoot(); + const nodes = root.listNodes(); + const batchIdPositions = []; + nodes.forEach((node) => { + const mesh = node.getMesh(); + if (mesh === null) { + return; + } + const nodeMatrix = getCompoundMatrix(node); + const primitives = mesh.listPrimitives(); + // worldMatrix = tileTransform * toZUpTransform * nodeMatrix + const worldMatrix = cesium_1.Matrix4.IDENTITY.clone(); + cesium_1.Matrix4.multiplyTransformation(worldMatrix, tileTransform, worldMatrix); + cesium_1.Matrix4.multiplyTransformation(worldMatrix, toZUpTransform, worldMatrix); + cesium_1.Matrix4.multiplyTransformation(worldMatrix, nodeMatrix, worldMatrix); + primitives.forEach((primitive) => { + const attributes = primitive.listAttributes(); + const accessors = Object.fromEntries(primitive + .listSemantics() + .map((semantic, i) => [semantic, attributes[i]])); + if (accessors.POSITION === undefined) { + return; + } + const count = accessors.POSITION.getCount(); + for (let i = 0; i < count; i++) { + // If the gltf vertices are tagged with BATCHID, store the positions at + // the respective BATCHID. Otherwise store everything under a single + // BATCHID=0 + const [batchId] = accessors._BATCHID !== undefined + ? readValueAt(accessors._BATCHID, i) + : [0]; + const [x, y, z] = readValueAt(accessors.POSITION, i); + const localPosition = new cesium_1.Cartesian3(x, y, z); + const worldPosition = cesium_1.Matrix4.multiplyByPoint(worldMatrix, localPosition, new cesium_1.Cartesian3()); + const cartographic = cesium_1.Cartographic.fromCartesian(worldPosition); + batchIdPositions[batchId] = batchIdPositions[batchId] ?? []; + if (cartographic !== undefined) { + batchIdPositions[batchId].push(cartographic); + } + } + }); + }); + const featurePositions = batchIdPositions.map((positions) => { + // From all the positions for the feature + // 1. compute a center point + // 2. compute the feature height + const heights = positions.map((carto) => carto.height); + const maxHeight = Math.max(...heights); + const minHeight = Math.min(...heights); + const featureHeight = maxHeight - minHeight; + const rectangle = cesium_1.Rectangle.fromCartographicArray(positions); + const position = cesium_1.Rectangle.center(rectangle); + position.height = featureHeight; + return position; + }); + return featurePositions; +} +exports.computeFeaturePositionsFromGltfVertices = computeFeaturePositionsFromGltfVertices; +/** + * Get the compound matrix for the given node. + * This is the cumulative product of the matrices of the current node and all its parents. + */ +function getCompoundMatrix(node) { + const parentNode = node.getParentNode(); + const matrix = parentNode + ? getCompoundMatrix(parentNode) + : cesium_1.Matrix4.IDENTITY.clone(); + cesium_1.Matrix4.multiply(matrix, cesium_1.Matrix4.fromArray(node.getMatrix()), matrix); + return matrix; +} diff --git a/dist/tsc/kml-gltf/indexer.d.ts b/build/kml-gltf/indexer.d.ts similarity index 100% rename from dist/tsc/kml-gltf/indexer.d.ts rename to build/kml-gltf/indexer.d.ts diff --git a/dist/tsc/kml-gltf/indexer.js b/build/kml-gltf/indexer.js similarity index 54% rename from dist/tsc/kml-gltf/indexer.js rename to build/kml-gltf/indexer.js index 43b3bc6..29b32b3 100644 --- a/dist/tsc/kml-gltf/indexer.js +++ b/build/kml-gltf/indexer.js @@ -1,15 +1,42 @@ "use strict"; // See https://cesium.com/blog/2020/04/09/kml-collada-metadata/ for supported KML format +// +// Note: kml indexer hasn't been fully tested since the migration to gltf-transform, so expect errors when using it. +// Just enough fixes have been made to make the typescript compiler happy. +// +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); const cesium_1 = require("cesium"); -const fse = tslib_1.__importStar(require("fs-extra")); -const path = tslib_1.__importStar(require("path")); -const xml2json = tslib_1.__importStar(require("xml2json")); +const fse = __importStar(require("fs-extra")); +const path = __importStar(require("path")); +const xml2json = __importStar(require("xml2json")); const Config_1 = require("../Config"); +const IndexBuilder_1 = require("../IndexBuilder"); const constants_1 = require("../constants"); +const gltfs = __importStar(require("../gltfs")); const gltfs_1 = require("../gltfs"); -const IndexBuilder_1 = require("../IndexBuilder"); const utils_1 = require("../utils"); const USAGE = "USAGE: npx index-kml-gltf "; const kmlFileRe = /.*?\.kml$/; @@ -20,15 +47,14 @@ const kmlFileRe = /.*?\.kml$/; * */ function readFeatureProperties(kml) { - var _a; - const placeMark = kml === null || kml === void 0 ? void 0 : kml.Placemark; - const name = placeMark === null || placeMark === void 0 ? void 0 : placeMark.name; - const data = (_a = placeMark === null || placeMark === void 0 ? void 0 : placeMark.ExtendedData) === null || _a === void 0 ? void 0 : _a.Data; + const placeMark = kml?.Placemark; + const name = placeMark?.name; + const data = placeMark?.ExtendedData?.Data; if (typeof name !== "string" || Array.isArray(data) === false) { return; } const properties = { Name: name }; - data === null || data === void 0 ? void 0 : data.forEach((prop) => { + data?.forEach((prop) => { if (typeof prop.name === "string" && typeof prop.value === "string") { properties[prop.name] = prop.value; } @@ -36,12 +62,11 @@ function readFeatureProperties(kml) { return properties; } function readModel(kml) { - var _a, _b, _c, _d, _e, _f, _g, _h; - const gltfLink = (_c = (_b = (_a = kml === null || kml === void 0 ? void 0 : kml.Placemark) === null || _a === void 0 ? void 0 : _a.Model) === null || _b === void 0 ? void 0 : _b.Link) === null || _c === void 0 ? void 0 : _c.href; - const location = (_e = (_d = kml === null || kml === void 0 ? void 0 : kml.Placemark) === null || _d === void 0 ? void 0 : _d.Model) === null || _e === void 0 ? void 0 : _e.Location; - const longitude = parseFloat((_f = location === null || location === void 0 ? void 0 : location.longitude) !== null && _f !== void 0 ? _f : ""); - const latitude = parseFloat((_g = location === null || location === void 0 ? void 0 : location.latitude) !== null && _g !== void 0 ? _g : ""); - const altitude = parseFloat((_h = location === null || location === void 0 ? void 0 : location.altitude) !== null && _h !== void 0 ? _h : ""); + const gltfLink = kml?.Placemark?.Model?.Link?.href; + const location = kml?.Placemark?.Model?.Location; + const longitude = parseFloat(location?.longitude ?? ""); + const latitude = parseFloat(location?.latitude ?? ""); + const altitude = parseFloat(location?.altitude ?? ""); if (typeof gltfLink !== "string") return; if (isNaN(longitude) || isNaN(latitude) || isNaN(altitude)) @@ -52,34 +77,20 @@ function readModel(kml) { }; } function computeModelPosition(gltf, location) { - var _a; // Compute a lat, lon & feature height from the gltf vertices // this is mostly to get a precise feature height const gltfPosition = cesium_1.Cartographic.toCartesian(cesium_1.Cartographic.fromDegrees(location.longitude, location.latitude, location.altitude)); // The gltf will contain only one feature, so the 0th element will be its position - const modelPosition = (_a = gltfs_1.computeFeaturePositionsFromGltfVertices(gltf, cesium_1.Transforms.eastNorthUpToFixedFrame(gltfPosition), // gltf local coords to globe coords - cesium_1.Matrix4.IDENTITY.clone(), // rtc transform - there is none + const modelPosition = (0, gltfs_1.computeFeaturePositionsFromGltfVertices)(gltf, cesium_1.Transforms.eastNorthUpToFixedFrame(gltfPosition), // gltf local coords to globe coords cesium_1.Axis.Y_UP_TO_Z_UP.clone() // default gltf axis to cesium axis - )) === null || _a === void 0 ? void 0 : _a[0]; + )?.[0]; return modelPosition; } -function readGltf(gltfPath) { - const json = JSON.parse(fse.readFileSync(gltfPath).toString()); - if (Array.isArray(json.buffers) === false) { - return { json, buffers: [] }; - } - const buffers = json.buffers.map(({ uri }) => { - const bufferPath = path.resolve(path.dirname(gltfPath), uri); - const buffer = fse.readFileSync(bufferPath); - return buffer; - }); - return { json, buffers }; -} -function indexKmlFiles(kmlDir, kmlFiles, indexesConfig, outDir) { +async function indexKmlFiles(kmlDir, kmlFiles, indexesConfig, outDir) { const resultsData = []; - const indexBuilders = Object.entries(indexesConfig.indexes).map(([property, config]) => IndexBuilder_1.createIndexBuilder(property, config)); + const indexBuilders = Object.entries(indexesConfig.indexes).map(([property, config]) => (0, IndexBuilder_1.createIndexBuilder)(property, config)); let featuresRead = 0; - kmlFiles.forEach((file) => { + const promises = kmlFiles.map(async (file) => { if (kmlFileRe.test(file) === false) { return; } @@ -96,7 +107,7 @@ function indexKmlFiles(kmlDir, kmlFiles, indexesConfig, outDir) { return; } const gltfPath = path.resolve(path.dirname(kmlFile), model.gltfLink); - const gltf = readGltf(gltfPath); + const gltf = await gltfs.parseGltf(fse.readFileSync(gltfPath)); const position = computeModelPosition(gltf, model.location); if (position === undefined) { console.error(`Failed to compute position for model: ${model.gltfLink}`); @@ -104,12 +115,15 @@ function indexKmlFiles(kmlDir, kmlFiles, indexesConfig, outDir) { } const positionProperties = { // rounding to fewer decimal places significantly reduces the size of resultData file - latitude: utils_1.roundToNDecimalPlaces(cesium_1.Math.toDegrees(position.latitude), 5), - longitude: utils_1.roundToNDecimalPlaces(cesium_1.Math.toDegrees(position.longitude), 5), - height: utils_1.roundToNDecimalPlaces(position.height, 3), + latitude: (0, utils_1.roundToNDecimalPlaces)(cesium_1.Math.toDegrees(position.latitude), 5), + longitude: (0, utils_1.roundToNDecimalPlaces)(cesium_1.Math.toDegrees(position.longitude), 5), + height: (0, utils_1.roundToNDecimalPlaces)(position.height, 3), }; const idValue = properties.Name; - const dataRowId = resultsData.push(Object.assign({ [indexesConfig.idProperty]: idValue }, positionProperties)) - 1; + const dataRowId = resultsData.push({ + [indexesConfig.idProperty]: idValue, + ...positionProperties, + }) - 1; indexBuilders.forEach((b) => { if (b.property in properties) { b.addIndexValue(dataRowId, properties[b.property]); @@ -119,32 +133,33 @@ function indexKmlFiles(kmlDir, kmlFiles, indexesConfig, outDir) { } }); featuresRead += 1; - utils_1.logOnSameLine(`Features read: ${featuresRead}`); + (0, utils_1.logOnSameLine)(`Features read: ${featuresRead}`); }); + await Promise.all(promises); console.log(`\nUnique features found: ${featuresRead}`); console.log("Writing indexes..."); - const indexes = IndexBuilder_1.writeIndexes(indexBuilders, outDir); - const resultsDataUrl = IndexBuilder_1.writeResultsData(resultsData, outDir); + const indexes = (0, IndexBuilder_1.writeIndexes)(indexBuilders, outDir); + const resultsDataUrl = (0, IndexBuilder_1.writeResultsData)(resultsData, outDir); const indexRoot = { resultsDataUrl, idProperty: indexesConfig.idProperty, indexes, }; - IndexBuilder_1.writeIndexRoot(indexRoot, outDir); + (0, IndexBuilder_1.writeIndexRoot)(indexRoot, outDir); console.log(`Indexes written to ${outDir}/`); console.log("Done."); } -function runIndexer(argv) { +async function runIndexer(argv) { const [kmlDir, indexConfigFile, outDir] = argv.slice(2); let kmlFiles = []; let indexesConfig; try { - indexesConfig = Config_1.parseIndexesConfig(JSON.parse(fse.readFileSync(indexConfigFile).toString())); + indexesConfig = (0, Config_1.parseIndexesConfig)(JSON.parse(fse.readFileSync(indexConfigFile).toString())); } catch (e) { console.error(`Failed to read index config file "${indexConfigFile}"`); console.error(e); - utils_1.printUsageAndExit(USAGE); + (0, utils_1.printUsageAndExit)(USAGE); return; } try { @@ -153,10 +168,9 @@ function runIndexer(argv) { catch (e) { console.error(`Failed to list directory: ${kmlDir}`); console.error(e); - utils_1.printUsageAndExit(USAGE); + (0, utils_1.printUsageAndExit)(USAGE); } fse.mkdirpSync(outDir); - indexKmlFiles(kmlDir, kmlFiles, indexesConfig, outDir); + await indexKmlFiles(kmlDir, kmlFiles, indexesConfig, outDir); } runIndexer(process.argv); -//# sourceMappingURL=indexer.js.map \ No newline at end of file diff --git a/dist/tsc/utils.d.ts b/build/utils.d.ts similarity index 100% rename from dist/tsc/utils.d.ts rename to build/utils.d.ts diff --git a/dist/tsc/utils.js b/build/utils.js similarity index 92% rename from dist/tsc/utils.js rename to build/utils.js index 518a355..8fa4475 100644 --- a/dist/tsc/utils.js +++ b/build/utils.js @@ -20,9 +20,8 @@ exports.logOnSameLine = logOnSameLine; * Round value to n decimal places */ function roundToNDecimalPlaces(value, n) { - const multiplier = Math.pow(10, n); + const multiplier = 10 ** n; const roundedValue = Math.round(value * multiplier) / multiplier; return roundedValue; } exports.roundToNDecimalPlaces = roundToNDecimalPlaces; -//# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/dist/tsc/writeCsv.d.ts b/build/writeCsv.d.ts similarity index 100% rename from dist/tsc/writeCsv.d.ts rename to build/writeCsv.d.ts diff --git a/build/writeCsv.js b/build/writeCsv.js new file mode 100644 index 0000000..5a55046 --- /dev/null +++ b/build/writeCsv.js @@ -0,0 +1,34 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const papaparse_1 = __importDefault(require("papaparse")); +const fse = __importStar(require("fs-extra")); +function writeCsv(filePath, data) { + fse.createWriteStream(filePath).write(papaparse_1.default.unparse(data, { quotes: true })); +} +exports.default = writeCsv; diff --git a/dist/tsc/3dTiles/b3dms.js.map b/dist/tsc/3dTiles/b3dms.js.map deleted file mode 100644 index fb4ca59..0000000 --- a/dist/tsc/3dTiles/b3dms.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"b3dms.js","sourceRoot":"","sources":["../../../src/3dTiles/b3dms.ts"],"names":[],"mappings":";AAAA,mDAAmD;AACnD,yHAAyH;;;;AAEzH,yEAAmD;AAYnD,SAAgB,MAAM,CAAC,IAAY;IACjC,MAAM,QAAQ,GACZ,YAAY,EAAE;QACd,6BAA6B,CAAC,IAAI,CAAC;QACnC,+BAA+B,CAAC,IAAI,CAAC;QACrC,2BAA2B,CAAC,IAAI,CAAC;QACjC,6BAA6B,CAAC,IAAI,CAAC,CAAC;IACtC,OAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACjC,CAAC;AARD,wBAQC;AAED,SAAgB,mBAAmB,CAAC,IAAY;IAC9C,MAAM,KAAK,GAAG,YAAY,EAAE,CAAC;IAC7B,MAAM,GAAG,GAAG,KAAK,GAAG,6BAA6B,CAAC,IAAI,CAAC,CAAC;IACxD,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,GA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AAS,CAAC,UAAU,EACpB,SAAS,CAAC,UAAU,GAAG,aAAa,GAAG,eAAe,CACvD,CAAC;IACR,OAAO,aAAa,CAAC;AACvB,CAAC;AAnBD,sEAmBC;AAED,SAAgB,aAAa,CAC3B,YAA0B;IAE1B,MAAM,YAAY,GAAG,6BAA6B,CAChD,YAAY,EACZ,YAAY,EACZ,YAAY,CAAC,iBAAiB,EAC9B,CAAC,CACF,CAAC;IACF,IAAI,YAAY,KAAK,SAAS,EAAE;QAC9B,OAAO;KACR;IACD,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC;QAC/C,CAAC,CAAC,YAAY;QACd,CAAC,CAAC,YAAY,YAAY,MAAM;YAChC,CAAC,CAAC,IAAI,YAAY,CAAC,YAAY,CAAC;YAChC,CAAC,CAAC,SAAS,CAAC;IACd,OAAO,aAAa,CAAC;AACvB,CAAC;AAlBD,sCAkBC;AAED,SAAS,YAAY;IACnB,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,SAAS,6BAA6B,CAAC,IAAY;IACjD,OAAO,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;AAC/B,CAAC;AAED,SAAS,+BAA+B,CAAC,IAAY;IACnD,OAAO,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;AAC/B,CAAC;AAED,SAAS,2BAA2B,CAAC,IAAY;IAC/C,OAAO,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;AAC/B,CAAC;AAED,SAAS,6BAA6B,CAAC,IAAY;IACjD,OAAO,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;AAC/B,CAAC"} \ No newline at end of file diff --git a/dist/tsc/3dTiles/binaryProperty.js.map b/dist/tsc/3dTiles/binaryProperty.js.map deleted file mode 100644 index 79047e6..0000000 --- a/dist/tsc/3dTiles/binaryProperty.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"binaryProperty.js","sourceRoot":"","sources":["../../../src/3dTiles/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AAC,IAAS;IACnC,IAAI,OAAO,IAAI,KAAK,QAAQ;QAC1B,OAAQ,0BAAyB,CAAC,QAAQ,CAAC,IAAI,CAAW,CAAC;IAC7D,mBAAY,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;IACpC,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAgB,IAAI,CAClB,cAA8B,EAC9B,UAAsB,EACtB,WAAmB;IAEnB,MAAM,sBAAsB,GAAG,sBAAsB,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IAC3E,MAAM,UAAU,GAAI,0BAAyB,CAAC,qBAAqB,CACjE,cAAc,CAAC,aAAa,EAC5B,UAAU,CAAC,MAAM,EACjB,UAAU,CAAC,UAAU,GAAG,cAAc,CAAC,UAAU,EACjD,sBAAsB,GAAG,WAAW,CACrC,CAAC;IACF,MAAM,SAAS,GAAG,UAAU,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IAClD,MAAM,MAAM,GAAU,EAAE,CAAC;IACzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,EAAE,CAAC,EAAE,EAAE;QACpC,IAAI,SAAS,KAAK,SAAS;YAAE,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;;YACnD,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,GAAG,sBAAsB,CAAC,CAAC,CAAC;KAC5E;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAnBD,oBAmBC"} \ No newline at end of file diff --git a/dist/tsc/3dTiles/gltfs.d.ts b/dist/tsc/3dTiles/gltfs.d.ts deleted file mode 100644 index a0ab6b2..0000000 --- a/dist/tsc/3dTiles/gltfs.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -/// -import { Cartesian3, Cartographic, Matrix4 } from "cesium"; -export declare type Gltf = { - json: any; - buffers: Buffer[]; -}; -declare enum ComponentType { - UNSIGNED_BYTE = 5121, - SHORT = 5123, - FLOAT = 5126 -} -export declare function isValidComponentType(value: number): value is ComponentType; -export declare function asComponentType(value: number): ComponentType; -export declare function parseGlb(glb: Buffer): Gltf | undefined; -/** - * Get the nth value in the buffer described by an accessor with accessorId - */ -export declare function getBufferForValueAt(gltf: Gltf, accessorId: number, n: number): Buffer; -export declare function readValueAt(gltf: Gltf, accessorId: number, n: number): number[]; -export declare function getCartesian3FromVertex(vertex: Buffer): Cartesian3; -export declare function setVertexFromCartesian3(vertex: Buffer, position: Cartesian3): void; -export declare function sizeOfComponentType(componentType: ComponentType): number; -export declare function numberOfComponentsForType(accessorType: string): 1 | 3; -/** - * Compute position for each feature from the vertex data - * - * @returns An array of Cartographic positions one for each feature. The array - * can be indexed by the batchId for the feature. - */ -export declare function computeFeaturePositionsFromGltfVertices(gltf: Gltf, tileTransform: Matrix4, rtcTransform: Matrix4, toZUpTransform: Matrix4): Cartographic[] | undefined; -export {}; diff --git a/dist/tsc/3dTiles/gltfs.js b/dist/tsc/3dTiles/gltfs.js deleted file mode 100644 index 0096690..0000000 --- a/dist/tsc/3dTiles/gltfs.js +++ /dev/null @@ -1,210 +0,0 @@ -"use strict"; -// Various utility functions for working with GLTFs -// See: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md -Object.defineProperty(exports, "__esModule", { value: true }); -exports.computeFeaturePositionsFromGltfVertices = exports.numberOfComponentsForType = exports.sizeOfComponentType = exports.setVertexFromCartesian3 = exports.getCartesian3FromVertex = exports.readValueAt = exports.getBufferForValueAt = exports.parseGlb = exports.asComponentType = exports.isValidComponentType = void 0; -const cesium_1 = require("cesium"); -const sizeOfUint32 = 4; -const jsonChunkType = 0x4e4f534a; -const binaryChunkType = 0x004e4942; -// Add more types here as required from https://github.com/CesiumGS/cesium/blob/master/Source/Core/ComponentDatatype.js#L12 -var ComponentType; -(function (ComponentType) { - ComponentType[ComponentType["UNSIGNED_BYTE"] = 5121] = "UNSIGNED_BYTE"; - ComponentType[ComponentType["SHORT"] = 5123] = "SHORT"; - ComponentType[ComponentType["FLOAT"] = 5126] = "FLOAT"; -})(ComponentType || (ComponentType = {})); -function isValidComponentType(value) { - return value in ComponentType; -} -exports.isValidComponentType = isValidComponentType; -function asComponentType(value) { - if (isValidComponentType(value)) - return value; - throw new Error(`Unhandled component type: ${value}`); -} -exports.asComponentType = asComponentType; -function parseGlb(glb) { - if (glb.slice(0, 4).toString() !== "glTF") { - return; - } - const version = glb.readUInt32LE(4); - if (version === 2) { - return parseGlbVersion2(glb); - } - throw new Error(`Unhandled gltf version: ${version}`); -} -exports.parseGlb = parseGlb; -function parseGlbVersion2(glb) { - const length = readHeader(glb, 0, 12)[2]; - let byteOffset = 12; - let json; - let binaryBuffer = Buffer.from([]); - while (byteOffset < length) { - const [chunkLength, chunkType] = readHeader(glb, byteOffset, 2); - byteOffset += 8; - const chunkBuffer = glb.subarray(byteOffset, byteOffset + chunkLength); - byteOffset += chunkLength; - if (chunkType === jsonChunkType) { - json = JSON.parse(chunkBuffer.toString("utf-8")); - } - else if (chunkType === binaryChunkType) { - binaryBuffer = chunkBuffer; - } - } - return { json, buffers: [binaryBuffer] }; -} -function readHeader(glb, byteOffset, count) { - const header = []; - for (let i = 0; i < count; i++) { - header.push(glb.readUInt32LE(byteOffset + i * sizeOfUint32)); - } - return header; -} -/** - * Get the nth value in the buffer described by an accessor with accessorId - */ -function getBufferForValueAt(gltf, accessorId, n) { - var _a; - const accessor = gltf.json.accessors[accessorId]; - const bufferView = gltf.json.bufferViews[accessor.bufferView]; - const bufferId = bufferView.buffer; - const buffer = gltf.buffers[bufferId].slice(bufferView.byteOffset, bufferView.byteOffset + bufferView.byteLength); - const valueSize = sizeOfComponentType(accessor.componentType) * - numberOfComponentsForType(accessor.type); - // if no byteStride specified, the buffer is tightly packed - const byteStride = (_a = bufferView.byteStride) !== null && _a !== void 0 ? _a : valueSize; - const pos = accessor.byteOffset + n * byteStride; - const valueBuffer = buffer.slice(pos, pos + valueSize); - return valueBuffer; -} -exports.getBufferForValueAt = getBufferForValueAt; -function readValueAt(gltf, accessorId, n) { - const buffer = getBufferForValueAt(gltf, accessorId, n); - const accessor = gltf.json.accessors[accessorId]; - const numberOfComponents = numberOfComponentsForType(accessor.type); - const valueComponents = []; - const componentType = asComponentType(accessor.componentType); - for (let i = 0; i < numberOfComponents; i++) { - valueComponents[i] = readComponent(buffer, componentType, i); - } - return valueComponents; -} -exports.readValueAt = readValueAt; -function readComponent(valueBuffer, componentType, n) { - switch (componentType) { - case ComponentType.UNSIGNED_BYTE: - return valueBuffer.readUInt8(n * sizeOfComponentType(componentType)); - case ComponentType.SHORT: - return valueBuffer.readUInt16LE(n * sizeOfComponentType(componentType)); - case ComponentType.FLOAT: - return valueBuffer.readFloatLE(n * sizeOfComponentType(componentType)); - } -} -function getCartesian3FromVertex(vertex) { - const x = vertex.readFloatLE(0); - const y = vertex.readFloatLE(4); - const z = vertex.readFloatLE(8); - const position = new cesium_1.Cartesian3(x, y, z); - return position; -} -exports.getCartesian3FromVertex = getCartesian3FromVertex; -function setVertexFromCartesian3(vertex, position) { - vertex.writeFloatLE(position.x, 0); - vertex.writeFloatLE(position.y, 4); - vertex.writeFloatLE(position.z, 8); -} -exports.setVertexFromCartesian3 = setVertexFromCartesian3; -function sizeOfComponentType(componentType) { - switch (componentType) { - case ComponentType.UNSIGNED_BYTE: - return Uint8Array.BYTES_PER_ELEMENT; - case ComponentType.SHORT: - return Int16Array.BYTES_PER_ELEMENT; - case ComponentType.FLOAT: - return Float32Array.BYTES_PER_ELEMENT; - } -} -exports.sizeOfComponentType = sizeOfComponentType; -function numberOfComponentsForType(accessorType) { - switch (accessorType) { - case "VEC3": - return 3; - case "SCALAR": - return 1; - default: - throw new Error(`Unhandled accessor type: ${accessorType}`); - } -} -exports.numberOfComponentsForType = numberOfComponentsForType; -/** - * Compute position for each feature from the vertex data - * - * @returns An array of Cartographic positions one for each feature. The array - * can be indexed by the batchId for the feature. - */ -function computeFeaturePositionsFromGltfVertices(gltf, tileTransform, rtcTransform, toZUpTransform) { - const nodes = gltf === null || gltf === void 0 ? void 0 : gltf.json.nodes; - const meshes = gltf === null || gltf === void 0 ? void 0 : gltf.json.meshes; - const accessors = gltf === null || gltf === void 0 ? void 0 : gltf.json.accessors; - const bufferViews = gltf === null || gltf === void 0 ? void 0 : gltf.json.bufferViews; - if (!Array.isArray(nodes) || - !Array.isArray(meshes) || - !Array.isArray(accessors) || - !Array.isArray(bufferViews)) { - return; - } - const batchIdPositions = []; - nodes.forEach((node) => { - const mesh = meshes[node.mesh]; - const primitives = mesh.primitives; - const nodeMatrix = Array.isArray(node.matrix) - ? cesium_1.Matrix4.fromColumnMajorArray(node.matrix) - : cesium_1.Matrix4.IDENTITY.clone(); - const modelMatrix = cesium_1.Matrix4.IDENTITY.clone(); - cesium_1.Matrix4.multiplyTransformation(modelMatrix, tileTransform, modelMatrix); - cesium_1.Matrix4.multiplyTransformation(modelMatrix, rtcTransform, modelMatrix); - cesium_1.Matrix4.multiplyTransformation(modelMatrix, toZUpTransform, modelMatrix); - cesium_1.Matrix4.multiplyTransformation(modelMatrix, nodeMatrix, modelMatrix); - primitives.forEach((primitive) => { - var _a; - const attributes = primitive.attributes; - const _BATCHID = attributes._BATCHID; - const POSITION = attributes.POSITION; - if (POSITION === undefined) { - return; - } - const count = accessors[POSITION].count; - for (let i = 0; i < count; i++) { - // If the gltf vertices are tagged with BATCHID, store the positions at - // the respective BATCHID. Otherwise store everything under a single - // BATCHID=0 - const [batchId] = _BATCHID !== undefined ? readValueAt(gltf, _BATCHID, i) : [0]; - const [x, y, z] = readValueAt(gltf, POSITION, i); - const localPosition = new cesium_1.Cartesian3(x, y, z); - const worldPosition = cesium_1.Matrix4.multiplyByPoint(modelMatrix, localPosition, new cesium_1.Cartesian3()); - const cartographic = cesium_1.Cartographic.fromCartesian(worldPosition); - batchIdPositions[batchId] = (_a = batchIdPositions[batchId]) !== null && _a !== void 0 ? _a : []; - if (cartographic !== undefined) { - batchIdPositions[batchId].push(cartographic); - } - } - }); - }); - const featurePositions = batchIdPositions.map((positions) => { - // From all the positions for the feature - // 1. compute a center point - // 2. compute the feature height - const heights = positions.map((carto) => carto.height); - const maxHeight = Math.max(...heights); - const minHeight = Math.min(...heights); - const featureHeight = maxHeight - minHeight; - const rectangle = cesium_1.Rectangle.fromCartographicArray(positions); - const position = cesium_1.Rectangle.center(rectangle); - position.height = featureHeight; - return position; - }); - return featurePositions; -} -exports.computeFeaturePositionsFromGltfVertices = computeFeaturePositionsFromGltfVertices; -//# sourceMappingURL=gltfs.js.map \ No newline at end of file diff --git a/dist/tsc/3dTiles/gltfs.js.map b/dist/tsc/3dTiles/gltfs.js.map deleted file mode 100644 index 544f186..0000000 --- a/dist/tsc/3dTiles/gltfs.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"gltfs.js","sourceRoot":"","sources":["../../../src/3dTiles/gltfs.ts"],"names":[],"mappings":";AAAA,mDAAmD;AACnD,oFAAoF;;;AAEpF,mCAMgB;AAEhB,MAAM,YAAY,GAAG,CAAC,CAAC;AACvB,MAAM,aAAa,GAAG,UAAU,CAAC;AACjC,MAAM,eAAe,GAAG,UAAU,CAAC;AAInC,2HAA2H;AAC3H,IAAK,aAIJ;AAJD,WAAK,aAAa;IAChB,sEAAoB,CAAA;IACpB,sDAAY,CAAA;IACZ,sDAAY,CAAA;AACd,CAAC,EAJI,aAAa,KAAb,aAAa,QAIjB;AAED,SAAgB,oBAAoB,CAAC,KAAa;IAChD,OAAO,KAAK,IAAI,aAAa,CAAC;AAChC,CAAC;AAFD,oDAEC;AAED,SAAgB,eAAe,CAAC,KAAa;IAC3C,IAAI,oBAAoB,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAC9C,MAAM,IAAI,KAAK,CAAC,6BAA6B,KAAK,EAAE,CAAC,CAAC;AACxD,CAAC;AAHD,0CAGC;AAED,SAAgB,QAAQ,CAAC,GAAW;IAClC,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,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4BAA4B;QAC5B,gCAAgC;QAChC,MAAM,OAAO,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACvD,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC;QACvC,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC;QACvC,MAAM,aAAa,GAAG,SAAS,GAAG,SAAS,CAAC;QAC5C,MAAM,SAAS,GAAG,kBAAS,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAC;QAC7D,MAAM,QAAQ,GAAG,kBAAS,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAC7C,QAAQ,CAAC,MAAM,GAAG,aAAa,CAAC;QAChC,OAAO,QAAQ,CAAC;IAClB,CAAC,CAAC,CAAC;IAEH,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAjFD,0FAiFC"} \ No newline at end of file diff --git a/dist/tsc/3dTiles/indexer.js.map b/dist/tsc/3dTiles/indexer.js.map deleted file mode 100644 index f2e1ee1..0000000 --- a/dist/tsc/3dTiles/indexer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"indexer.js","sourceRoot":"","sources":["../../../src/3dTiles/indexer.ts"],"names":[],"mappings":";;;AAAA,mCAA+E;AAC/E,sDAAgC;AAChC,mDAA6B;AAC7B,sCAA8D;AAC9D,4CAA6D;AAC7D,wDAAkC;AAClC,oCAAyE;AAEzE,kDAKyB;AACzB,oCAIkB;AAClB,uDAAiC;AAEjC,uDAAiC;AAEjC,MAAM,KAAK,GACT,0FAA0F,CAAC;AAE7F;;;;;;;;;;;GAWG;AACH,SAAS,cAAc,CACrB,OAAY,EACZ,UAAkB,EAClB,aAA4B,EAC5B,MAAc;IAEd,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAClC,aAAa,CAAC,OAAO,CACtB,CAAC,GAAG,CAAC,C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AC,IAAI,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/tsc/3dTiles/tiles.js.map b/dist/tsc/3dTiles/tiles.js.map deleted file mode 100644 index f7b834f..0000000 --- a/dist/tsc/3dTiles/tiles.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tiles.js","sourceRoot":"","sources":["../../../src/3dTiles/tiles.ts"],"names":[],"mappings":";;;AAAA,mCAAuC;AAavC,SAAgB,WAAW,CACzB,OAAgB,EAChB,MAAmE;IAEnE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAC1B,IAAI,IAAI,KAAK,SAAS,EAAE;QACtB,OAAO;KACR;IAED,MAAM,QAAQ,GAAG,CAAC,IAAU,EAAE,eAAwB,EAAE,EAAE;QACxD,MAAM,iBAAiB,GACrB,IAAI,CAAC,SAAS,KAAK,SAAS;YAC1B,CAAC,CAAC,gBAAO,CAAC,QAAQ,CACd,eAAe,EACf,gBAAO,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,EAC9B,IAAI,gBAAO,EAAE,CACd;YACH,CAAC,CAAC,eAAe,CAAC;QACtB,MAAM,CAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC,CAAC;QACpC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;YAChC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC;SACtE;IACH,CAAC,CAAC;IAEF,QAAQ,CAAC,IAAI,EAAE,gBAAO,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;AAC3C,CAAC;AAzBD,kCAyBC;AAED,SAAgB,GAAG,CAAC,IAAU;;IAC5B,wBAAwB;IACxB,mBAAO,IAAI,CAAC,OAAO,0CAAE,GAAG,yCAAI,IAAI,CAAC,OAAO,0CAAE,GAAG,CAAC;AAChD,CAAC;AAHD,kBAGC;AAED,SAAgB,cAAc,CAAC,OAAgB;;IAC7C,MAAM,MAAM,eAAG,OAAO,CAAC,KAAK,0CAAE,UAAU,mCAAI,aAAI,CAAC,CAAC,CAAC;IACnD,MAAM,SAAS,GACb,MAAM,KAAK,aAAI,CAAC,CAAC;QACf,CAAC,CAAE,aAAY,CAAC,YAAY,CAAC,KAAK,EAAE;QACpC,CAAC,CAAC,MAAM,KAAK,aAAI,CAAC,CAAC;YACnB,CAAC,CAAE,aAAY,CAAC,YAAY,CAAC,KAAK,EAAE;YACpC,CAAC,CAAC,gBAAO,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;IAC/B,OAAO,SAAS,CAAC;AACnB,CAAC;AATD,wCASC"} \ No newline at end of file diff --git a/dist/tsc/Config.js.map b/dist/tsc/Config.js.map deleted file mode 100644 index 34c659c..0000000 --- a/dist/tsc/Config.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Config.js","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":";;;AAAA,mCAAgD;AAChD,iCAAoD;AAWpD,SAAgB,kBAAkB,CAAC,IAAS;IAC1C,mBAAY,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;IACpC,mBAAY,CAAC,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;IAE5C,MAAM,OAAO,GAAG,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3C,OAAO;QACL,UAAU,EAAE,IAAI,CAAC,UAAU;QAC3B,OAAO;KACR,CAAC;AACJ,CAAC;AATD,gDASC;AAED,SAAS,YAAY,CAAC,IAAS;IAC7B,mBAAY,CAAC,IAAI,EAAE,uBAAuB,CAAC,CAAC;IAC5C,OAAO,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,eAAe,CAAC,EAAE,EAAE;QAC1E,OAAO,CAAC,QAAQ,CAAC,GAAG,gBAAgB,CAAC,eAAe,CAAC,CAAC;QACtD,OAAO,OAAO,CAAC;IACjB,CAAC,EAAE,EAAiC,CAAC,CAAC;AACxC,CAAC;AAED,SAAS,gBAAgB,CAAC,IAAS;IACjC,mBAAY,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;IAClC,OAAO;QACL,IAAI,EAAE,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC;KAChC,CAAC;AACJ,CAAC;AAED,SAAS,cAAc,CAAC,IAAS;IAC/B,mBAAY,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IAChC,IAAI,kBAAU,CAAC,QAAQ,CAAC,IAAI,CAAC;QAAE,OAAO,IAAiB,CAAC;IACxD,MAAM,IAAI,KAAK,CACb,6BAA6B,kBAAU,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CACjE,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/dist/tsc/Index.js.map b/dist/tsc/Index.js.map deleted file mode 100644 index 0a25d37..0000000 --- a/dist/tsc/Index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Index.js","sourceRoot":"","sources":["../../src/Index.ts"],"names":[],"mappings":";AAAA,6GAA6G;AAC7G,4DAA4D;;;AAY5D,MAAM,WAAW,GAA+B;IAC9C,OAAO,EAAE,IAAI;IACb,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,IAAI;CACX,CAAC;AAEW,QAAA,UAAU,GAAa,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/tsc/IndexBuilder.js.map b/dist/tsc/IndexBuilder.js.map deleted file mode 100644 index e356c18..0000000 --- a/dist/tsc/IndexBuilder.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"IndexBuilder.js","sourceRoot":"","sources":["../../src/IndexBuilder.ts"],"names":[],"mappings":";;;;AAAA,oEAAoC;AACpC,mDAA6B;AAC7B,sDAAgC;AAShC,kEAAkC;AAWlC,MAAa,mBAA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AAM;YACT,OAAO,IAAI,gBAAgB,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;QACrD,KAAK,MAAM;YACT,OAAO,IAAI,gBAAgB,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;KACtD;AACH,CAAC;AAZD,gDAYC;AAED;;GAEG;AACH,SAAgB,YAAY,CAC1B,aAA6B,EAC7B,MAAc;IAEd,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE;QACjD,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACnD,OAAO,OAAO,CAAC;IACjB,CAAC,EAAE,EAA2B,CAAC,CAAC;AAClC,CAAC;AARD,oCAQC;AAED;;GAEG;AACH,SAAgB,gBAAgB,CAC9B,IAA2B,EAC3B,MAAc;IAEd,MAAM,QAAQ,GAAG,iBAAiB,CAAC;IACnC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC7C,kBAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IACzB,OAAO,QAAQ,CAAC;AAClB,CAAC;AARD,4CAQC;AAED;;GAEG;AACH,SAAgB,cAAc,CAAC,SAAoB,EAAE,MAAc;IACjE,GAAG;SACA,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;SACtD,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;AACtC,CAAC;AAJD,wCAIC"} \ No newline at end of file diff --git a/dist/tsc/Json.js.map b/dist/tsc/Json.js.map deleted file mode 100644 index c9095be..0000000 --- a/dist/tsc/Json.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Json.js","sourceRoot":"","sources":["../../src/Json.ts"],"names":[],"mappings":";;;AAQA,SAAgB,YAAY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AGC;AAED,SAAS,oBAAoB,CAC3B,YAAoB,EACpB,UAAkB,EAClB,IAAa;IAEb,MAAM,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9C,MAAM,IAAI,KAAK,CAAC,WAAW,QAAQ,IAAI,YAAY,SAAS,UAAU,EAAE,CAAC,CAAC;AAC5E,CAAC"} \ No newline at end of file diff --git a/dist/tsc/constants.js.map b/dist/tsc/constants.js.map deleted file mode 100644 index 572312d..0000000 --- a/dist/tsc/constants.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";;;AAAA,6FAA6F;AAC7F,4BAA4B;AACf,QAAA,6BAA6B,GAAG,QAAQ,CAAC"} \ No newline at end of file diff --git a/dist/tsc/gltfs.d.ts b/dist/tsc/gltfs.d.ts deleted file mode 100644 index 44df142..0000000 --- a/dist/tsc/gltfs.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -/// -import { Cartesian3, Cartographic, Matrix4 } from "cesium"; -export declare type Gltf = { - json: any; - buffers: Buffer[]; -}; -declare enum ComponentType { - UNSIGNED_BYTE = 5121, - SHORT = 5123, - FLOAT = 5126 -} -export declare function isValidComponentType(value: number): value is ComponentType; -export declare function asComponentType(value: number): ComponentType; -export declare function parseGlb(glb: Buffer): Gltf | undefined; -/** - * Get the nth value in the buffer described by an accessor with accessorId - */ -export declare function getBufferForValueAt(gltf: Gltf, accessorId: number, n: number): Buffer; -export declare function readValueAt(gltf: Gltf, accessorId: number, n: number): number[]; -export declare function getCartesian3FromVertex(vertex: Buffer): Cartesian3; -export declare function setVertexFromCartesian3(vertex: Buffer, position: Cartesian3): void; -export declare function sizeOfComponentType(componentType: ComponentType): number; -export declare function numberOfComponentsForType(accessorType: string): 3 | 1; -/** - * Compute position for each feature from the vertex data - * - * @returns An array of Cartographic positions one for each feature. The array - * can be indexed by the batchId for the feature. - */ -export declare function computeFeaturePositionsFromGltfVertices(gltf: Gltf, tileTransform: Matrix4, rtcTransform: Matrix4, toZUpTransform: Matrix4): Cartographic[] | undefined; -export {}; diff --git a/dist/tsc/gltfs.js b/dist/tsc/gltfs.js deleted file mode 100644 index 0096690..0000000 --- a/dist/tsc/gltfs.js +++ /dev/null @@ -1,210 +0,0 @@ -"use strict"; -// Various utility functions for working with GLTFs -// See: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md -Object.defineProperty(exports, "__esModule", { value: true }); -exports.computeFeaturePositionsFromGltfVertices = exports.numberOfComponentsForType = exports.sizeOfComponentType = exports.setVertexFromCartesian3 = exports.getCartesian3FromVertex = exports.readValueAt = exports.getBufferForValueAt = exports.parseGlb = exports.asComponentType = exports.isValidComponentType = void 0; -const cesium_1 = require("cesium"); -const sizeOfUint32 = 4; -const jsonChunkType = 0x4e4f534a; -const binaryChunkType = 0x004e4942; -// Add more types here as required from https://github.com/CesiumGS/cesium/blob/master/Source/Core/ComponentDatatype.js#L12 -var ComponentType; -(function (ComponentType) { - ComponentType[ComponentType["UNSIGNED_BYTE"] = 5121] = "UNSIGNED_BYTE"; - ComponentType[ComponentType["SHORT"] = 5123] = "SHORT"; - ComponentType[ComponentType["FLOAT"] = 5126] = "FLOAT"; -})(ComponentType || (ComponentType = {})); -function isValidComponentType(value) { - return value in ComponentType; -} -exports.isValidComponentType = isValidComponentType; -function asComponentType(value) { - if (isValidComponentType(value)) - return value; - throw new Error(`Unhandled component type: ${value}`); -} -exports.asComponentType = asComponentType; -function parseGlb(glb) { - if (glb.slice(0, 4).toString() !== "glTF") { - return; - } - const version = glb.readUInt32LE(4); - if (version === 2) { - return parseGlbVersion2(glb); - } - throw new Error(`Unhandled gltf version: ${version}`); -} -exports.parseGlb = parseGlb; -function parseGlbVersion2(glb) { - const length = readHeader(glb, 0, 12)[2]; - let byteOffset = 12; - let json; - let binaryBuffer = Buffer.from([]); - while (byteOffset < length) { - const [chunkLength, chunkType] = readHeader(glb, byteOffset, 2); - byteOffset += 8; - const chunkBuffer = glb.subarray(byteOffset, byteOffset + chunkLength); - byteOffset += chunkLength; - if (chunkType === jsonChunkType) { - json = JSON.parse(chunkBuffer.toString("utf-8")); - } - else if (chunkType === binaryChunkType) { - binaryBuffer = chunkBuffer; - } - } - return { json, buffers: [binaryBuffer] }; -} -function readHeader(glb, byteOffset, count) { - const header = []; - for (let i = 0; i < count; i++) { - header.push(glb.readUInt32LE(byteOffset + i * sizeOfUint32)); - } - return header; -} -/** - * Get the nth value in the buffer described by an accessor with accessorId - */ -function getBufferForValueAt(gltf, accessorId, n) { - var _a; - const accessor = gltf.json.accessors[accessorId]; - const bufferView = gltf.json.bufferViews[accessor.bufferView]; - const bufferId = bufferView.buffer; - const buffer = gltf.buffers[bufferId].slice(bufferView.byteOffset, bufferView.byteOffset + bufferView.byteLength); - const valueSize = sizeOfComponentType(accessor.componentType) * - numberOfComponentsForType(accessor.type); - // if no byteStride specified, the buffer is tightly packed - const byteStride = (_a = bufferView.byteStride) !== null && _a !== void 0 ? _a : valueSize; - const pos = accessor.byteOffset + n * byteStride; - const valueBuffer = buffer.slice(pos, pos + valueSize); - return valueBuffer; -} -exports.getBufferForValueAt = getBufferForValueAt; -function readValueAt(gltf, accessorId, n) { - const buffer = getBufferForValueAt(gltf, accessorId, n); - const accessor = gltf.json.accessors[accessorId]; - const numberOfComponents = numberOfComponentsForType(accessor.type); - const valueComponents = []; - const componentType = asComponentType(accessor.componentType); - for (let i = 0; i < numberOfComponents; i++) { - valueComponents[i] = readComponent(buffer, componentType, i); - } - return valueComponents; -} -exports.readValueAt = readValueAt; -function readComponent(valueBuffer, componentType, n) { - switch (componentType) { - case ComponentType.UNSIGNED_BYTE: - return valueBuffer.readUInt8(n * sizeOfComponentType(componentType)); - case ComponentType.SHORT: - return valueBuffer.readUInt16LE(n * sizeOfComponentType(componentType)); - case ComponentType.FLOAT: - return valueBuffer.readFloatLE(n * sizeOfComponentType(componentType)); - } -} -function getCartesian3FromVertex(vertex) { - const x = vertex.readFloatLE(0); - const y = vertex.readFloatLE(4); - const z = vertex.readFloatLE(8); - const position = new cesium_1.Cartesian3(x, y, z); - return position; -} -exports.getCartesian3FromVertex = getCartesian3FromVertex; -function setVertexFromCartesian3(vertex, position) { - vertex.writeFloatLE(position.x, 0); - vertex.writeFloatLE(position.y, 4); - vertex.writeFloatLE(position.z, 8); -} -exports.setVertexFromCartesian3 = setVertexFromCartesian3; -function sizeOfComponentType(componentType) { - switch (componentType) { - case ComponentType.UNSIGNED_BYTE: - return Uint8Array.BYTES_PER_ELEMENT; - case ComponentType.SHORT: - return Int16Array.BYTES_PER_ELEMENT; - case ComponentType.FLOAT: - return Float32Array.BYTES_PER_ELEMENT; - } -} -exports.sizeOfComponentType = sizeOfComponentType; -function numberOfComponentsForType(accessorType) { - switch (accessorType) { - case "VEC3": - return 3; - case "SCALAR": - return 1; - default: - throw new Error(`Unhandled accessor type: ${accessorType}`); - } -} -exports.numberOfComponentsForType = numberOfComponentsForType; -/** - * Compute position for each feature from the vertex data - * - * @returns An array of Cartographic positions one for each feature. The array - * can be indexed by the batchId for the feature. - */ -function computeFeaturePositionsFromGltfVertices(gltf, tileTransform, rtcTransform, toZUpTransform) { - const nodes = gltf === null || gltf === void 0 ? void 0 : gltf.json.nodes; - const meshes = gltf === null || gltf === void 0 ? void 0 : gltf.json.meshes; - const accessors = gltf === null || gltf === void 0 ? void 0 : gltf.json.accessors; - const bufferViews = gltf === null || gltf === void 0 ? void 0 : gltf.json.bufferViews; - if (!Array.isArray(nodes) || - !Array.isArray(meshes) || - !Array.isArray(accessors) || - !Array.isArray(bufferViews)) { - return; - } - const batchIdPositions = []; - nodes.forEach((node) => { - const mesh = meshes[node.mesh]; - const primitives = mesh.primitives; - const nodeMatrix = Array.isArray(node.matrix) - ? cesium_1.Matrix4.fromColumnMajorArray(node.matrix) - : cesium_1.Matrix4.IDENTITY.clone(); - const modelMatrix = cesium_1.Matrix4.IDENTITY.clone(); - cesium_1.Matrix4.multiplyTransformation(modelMatrix, tileTransform, modelMatrix); - cesium_1.Matrix4.multiplyTransformation(modelMatrix, rtcTransform, modelMatrix); - cesium_1.Matrix4.multiplyTransformation(modelMatrix, toZUpTransform, modelMatrix); - cesium_1.Matrix4.multiplyTransformation(modelMatrix, nodeMatrix, modelMatrix); - primitives.forEach((primitive) => { - var _a; - const attributes = primitive.attributes; - const _BATCHID = attributes._BATCHID; - const POSITION = attributes.POSITION; - if (POSITION === undefined) { - return; - } - const count = accessors[POSITION].count; - for (let i = 0; i < count; i++) { - // If the gltf vertices are tagged with BATCHID, store the positions at - // the respective BATCHID. Otherwise store everything under a single - // BATCHID=0 - const [batchId] = _BATCHID !== undefined ? readValueAt(gltf, _BATCHID, i) : [0]; - const [x, y, z] = readValueAt(gltf, POSITION, i); - const localPosition = new cesium_1.Cartesian3(x, y, z); - const worldPosition = cesium_1.Matrix4.multiplyByPoint(modelMatrix, localPosition, new cesium_1.Cartesian3()); - const cartographic = cesium_1.Cartographic.fromCartesian(worldPosition); - batchIdPositions[batchId] = (_a = batchIdPositions[batchId]) !== null && _a !== void 0 ? _a : []; - if (cartographic !== undefined) { - batchIdPositions[batchId].push(cartographic); - } - } - }); - }); - const featurePositions = batchIdPositions.map((positions) => { - // From all the positions for the feature - // 1. compute a center point - // 2. compute the feature height - const heights = positions.map((carto) => carto.height); - const maxHeight = Math.max(...heights); - const minHeight = Math.min(...heights); - const featureHeight = maxHeight - minHeight; - const rectangle = cesium_1.Rectangle.fromCartographicArray(positions); - const position = cesium_1.Rectangle.center(rectangle); - position.height = featureHeight; - return position; - }); - return featurePositions; -} -exports.computeFeaturePositionsFromGltfVertices = computeFeaturePositionsFromGltfVertices; -//# sourceMappingURL=gltfs.js.map \ No newline at end of file diff --git a/dist/tsc/gltfs.js.map b/dist/tsc/gltfs.js.map deleted file mode 100644 index 6abe468..0000000 --- a/dist/tsc/gltfs.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"gltfs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AChC,OAAO,QAAQ,CAAC;IAClB,CAAC,CAAC,CAAC;IAEH,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAjFD,0FAiFC"} \ No newline at end of file diff --git a/dist/tsc/kml-gltf/indexer.js.map b/dist/tsc/kml-gltf/indexer.js.map deleted file mode 100644 index 29d57a8..0000000 --- a/dist/tsc/kml-gltf/indexer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"indexer.js","sourceRoot":"","sources":["../../../src/kml-gltf/indexer.ts"],"names":[],"mappings":";AAAA,wFAAwF;;;AAExF,mCAMgB;AAChB,sDAAgC;AAChC,mDAA6B;AAC7B,2DAAqC;AACrC,sCAA8D;AAC9D,4CAA6D;AAC7D,oCAAyE;AAEzE,kDAKyB;AACzB,oCAIkB;AAElB,MAAM,KAAK,GACT,uFAAuF,CAAC;AAE1F,MAAM,SAAS,GAAG,WAAW,CAAC;AA0B9B;;;;;GAKG;AACH,SAAS,qBAAqB,CAAC,GAAQ;;IACrC,MAAM,SAAS,GAAG,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,SAAS,CAAC;IACjC,MAAM,IAAI,GAAG,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,IAAI,CAAC;IAC7B,MAAM,IAAI,SAAG,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,YAAY,0CAAE,IAAI,CAAC;IAE3C,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,KAAK,EAAE;QAC7D,OAAO;KACR;IAED,MAAM,UAAU,GAAsB,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACrD,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACrB,IAAI,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,EAAE;YACnE,UAAU,CAAC,IAAI,CAAC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/tsc/utils.js.map b/dist/tsc/utils.js.map deleted file mode 100644 index 19e038c..0000000 --- a/dist/tsc/utils.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";;;AAAA,SAAgB,iBAAiB,CAAC,KAAa;IAC7C,OAAO,CAAC,KAAK,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC;IAC9B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAHD,8CAGC;AAED;;GAEG;AACH,SAAgB,aAAa,CAAC,OAAe;IAC3C,mCAAmC;IACnC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAC5B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC3B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AAChC,CAAC;AALD,sCAKC;AAED;;GAEG;AACH,SAAgB,qBAAqB,CAAC,KAAa,EAAE,CAAS;IAC5D,MAAM,UAAU,GAAG,SAAA,EAAE,EAAI,CAAC,CAAA,CAAC;IAC3B,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,UAAU,CAAC,GAAG,UAAU,CAAC;IACjE,OAAO,YAAY,CAAC;AACtB,CAAC;AAJD,sDAIC"} \ No newline at end of file diff --git a/dist/tsc/writeCsv.js b/dist/tsc/writeCsv.js deleted file mode 100644 index b7ca8be..0000000 --- a/dist/tsc/writeCsv.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -const papaparse_1 = tslib_1.__importDefault(require("papaparse")); -const fse = tslib_1.__importStar(require("fs-extra")); -function writeCsv(filePath, data) { - fse.createWriteStream(filePath).write(papaparse_1.default.unparse(data, { quotes: true })); -} -exports.default = writeCsv; -//# sourceMappingURL=writeCsv.js.map \ No newline at end of file diff --git a/dist/tsc/writeCsv.js.map b/dist/tsc/writeCsv.js.map deleted file mode 100644 index 72b76c0..0000000 --- a/dist/tsc/writeCsv.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"writeCsv.js","sourceRoot":"","sources":["../../src/writeCsv.ts"],"names":[],"mappings":";;;AAAA,kEAA6B;AAC7B,sDAAgC;AAEhC,SAAwB,QAAQ,CAC9B,QAAgB,EAChB,IAAqC;IAErC,GAAG,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,mBAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AAC9E,CAAC;AALD,2BAKC"} \ No newline at end of file diff --git a/package.json b/package.json index ad26d00..0ce8398 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,12 @@ "/dist" ], "dependencies": { + "3d-tiles-tools": "^0.3.2", + "@gltf-transform/core": "^3.9.0", + "@gltf-transform/extensions": "^3.9.0", + "@types/draco3dgltf": "^1.4.3", "cesium": "^1.77.0", + "draco3dgltf": "^1.5.6", "fs-extra": "^9.0.1", "minisearch": "^3.0.2", "papaparse": "^5.3.0", @@ -28,11 +33,11 @@ }, "devDependencies": { "@types/fs-extra": "^9.0.5", + "@types/node": "^20.9.1", "@types/papaparse": "^5.2.4", "@types/xml2json": "^0.11.3", "prettier": "^2.2.1", - "ts-node": "^9.1.1", "tslint": "^6.1.3", - "typescript": "^4.1.3" + "typescript": "^5.2.2" } } diff --git a/src/3dTiles/indexer.ts b/src/3dTiles/indexer.ts index 1dec5bf..43e40d1 100644 --- a/src/3dTiles/indexer.ts +++ b/src/3dTiles/indexer.ts @@ -1,24 +1,23 @@ -import { Cartesian3, Cartographic, Math as CesiumMath, Matrix4 } from "cesium"; +import { Cartographic, Math as CesiumMath } from "cesium"; import * as fse from "fs-extra"; import * as path from "path"; import { IndexesConfig, parseIndexesConfig } from "../Config"; -import { COMPUTED_HEIGHT_PROPERTY_NAME } from "../constants"; -import * as gltfs from "../gltfs"; -import { computeFeaturePositionsFromGltfVertices, Gltf } from "../gltfs"; import { IndexRoot } from "../Index"; import { createIndexBuilder, - writeIndexes, writeIndexRoot, + writeIndexes, writeResultsData, } from "../IndexBuilder"; +import { COMPUTED_HEIGHT_PROPERTY_NAME } from "../constants"; +import * as gltfs from "../gltfs"; +import { computeFeaturePositionsFromGltfVertices } from "../gltfs"; import { logOnSameLine, printUsageAndExit, roundToNDecimalPlaces, } from "../utils"; import * as b3dms from "./b3dms"; -import { FeatureTable } from "./b3dms"; import * as tiles from "./tiles"; const USAGE = @@ -36,7 +35,7 @@ const USAGE = * Because we uniquify the features, if there are 2 LOD tiles for the same feature * has different properties we only index the properties of the highest LOD tile. */ -function index3dTileset( +async function index3dTileset( tileset: any, tilesetDir: string, indexesConfig: IndexesConfig, @@ -46,7 +45,11 @@ function index3dTileset( indexesConfig.indexes ).map(([property, config]) => createIndexBuilder(property, config)); - const features = readTilesetFeatures(tileset, tilesetDir, indexesConfig); + const features = await readTilesetFeatures( + tileset, + tilesetDir, + indexesConfig + ); const featuresCount = Object.entries(features).length; console.log(`\nUnique features found: ${featuresCount}`); @@ -99,11 +102,11 @@ function index3dTileset( * @param indexesConfig The indexes config object * @returns An object containing {properties,position} for each feature in the tilset. The object is keyed by the idProperty for the feature. */ -function readTilesetFeatures( +async function readTilesetFeatures( tileset: any, tilesetDir: string, indexesConfig: IndexesConfig -): Record { +): Promise> { const uniqueFeatures: Record< string, { position: Cartographic; properties: any } @@ -113,98 +116,88 @@ function readTilesetFeatures( // The tileset can contain child tilesets. We add any child tilesets that we come // across to this queue so that they will be processed sequentially. const tilesetQueue = [tileset]; - for (tileset of tilesetQueue) { + for await (tileset of tilesetQueue) { // For each feature in each tile in the tileset // 1. read properties for the feature from the batch table // 2. compute position of the feature from the vertex data // Then generate a unique list of feature id -> {position, properties} value - tiles.forEachTile(tileset, ({ tile, computedTransform: tileTransform }) => { - const tileUri = tiles.uri(tile); - if (tileUri === undefined) { - return; - } - - const contentPath = path.join(tilesetDir, tileUri); - if (contentPath.endsWith(".json")) { - // the content is another tileset json - // enqueue it so that it is processed at the end - const childTileset = JSON.parse( - fse.readFileSync(contentPath).toString() + const promise = tiles.forEachTile( + tileset, + async ({ tile, computedTransform: tileTransform }) => { + const tileUri = tiles.uri(tile); + if (tileUri === undefined) { + return; + } + + const contentPath = path.join(tilesetDir, tileUri); + if (contentPath.endsWith(".json")) { + // the content is another tileset json + // enqueue it so that it is processed at the end + const childTileset = JSON.parse( + fse.readFileSync(contentPath).toString() + ); + tilesetQueue.push(childTileset); + return; + } + // content is most likely b3dm (TODO: handle other types gracefully) + const b3dm = fse.readFileSync(contentPath); + const featureTable = b3dms.getFeatureTable(b3dm); + const batchLength = featureTable.jsonFeatureTable.BATCH_LENGTH; + + if (typeof batchLength !== "number") { + console.error(`Missing or invalid batchLength for tile ${tileUri}`); + return; + } + + const batchTable = b3dms.getBatchTable(b3dm); + const batchTableProperties = b3dms.getBatchTableProperties( + batchTable, + batchLength ); - tilesetQueue.push(childTileset); - return; - } - // content is most likely b3dm (TODO: handle other types gracefully) - const b3dm = fse.readFileSync(contentPath); - const featureTable = b3dms.getFeatureTable(b3dm); - const batchLength = featureTable.jsonFeatureTable.BATCH_LENGTH; - - if (typeof batchLength !== "number") { - console.error(`Missing or invalid batchLength for tile ${tileUri}`); - return; - } - const batchTable = b3dms.getBatchTable(b3dm); - const batchTableProperties = b3dms.getBatchTableProperties( - batchTable, - batchLength - ); - - let computedFeaturePositions: Cartographic[] = []; - const gltf = gltfs.parseGlb(b3dms.getGlb(b3dm)); - if (gltf !== undefined) { - const rtcTransform = getRtcTransform(featureTable, gltf); - const toZUpTransform = tiles.toZUpTransform(tileset); - computedFeaturePositions = - computeFeaturePositionsFromGltfVertices( - gltf, - tileTransform, - rtcTransform, - toZUpTransform - ) ?? []; + let computedFeaturePositions: Cartographic[] = []; + const gltf = await gltfs.parseGlb(b3dms.getGlb(b3dm)); + if (gltf !== undefined) { + const toZUpTransform = tiles.toZUpTransform(tileset); + computedFeaturePositions = + computeFeaturePositionsFromGltfVertices( + gltf, + tileTransform, + toZUpTransform + ) ?? []; + } + + for (let batchId = 0; batchId < batchLength; batchId++) { + const batchProperties: Record = {}; + Object.entries(batchTableProperties).forEach(([name, values]) => { + batchProperties[name] = Array.isArray(values) + ? values[batchId] + : null; + }); + const position = computedFeaturePositions[batchId]; + const idValue = batchProperties[indexesConfig.idProperty]; + uniqueFeatures[idValue] = { + position, + properties: batchProperties, + }; + + featuresRead += 1; + logOnSameLine(`Features read: ${featuresRead}`); + } } + ); - for (let batchId = 0; batchId < batchLength; batchId++) { - const batchProperties: Record = {}; - Object.entries(batchTableProperties).forEach(([name, values]) => { - batchProperties[name] = Array.isArray(values) - ? values[batchId] - : null; - }); - const position = computedFeaturePositions[batchId]; - const idValue = batchProperties[indexesConfig.idProperty]; - uniqueFeatures[idValue] = { - position, - properties: batchProperties, - }; - - featuresRead += 1; - logOnSameLine(`Features read: ${featuresRead}`); - } - }); + await promise; } return uniqueFeatures; } -/** - * Returns an RTC_CENTER or CESIUM_RTC transformation matrix which ever exists. - * - */ -function getRtcTransform(featureTable: FeatureTable, gltf: Gltf): Matrix4 { - const b3dmRtcCenter = b3dms.readRtcCenter(featureTable); - const rtcCenter = b3dmRtcCenter ?? gltf.json.extensions?.CESIUM_RTC?.center; - const rtcTransform = rtcCenter - ? Matrix4.fromTranslation(Cartesian3.fromArray(rtcCenter)) - : Matrix4.IDENTITY.clone(); - return rtcTransform; -} - /** * Runs the indexer with the given arguments * @params argv An argument array */ -export default function runIndexer(argv: string[]) { +export default async function runIndexer(argv: string[]) { const [tilesetFile, indexConfigFile, outDir] = argv.slice(2); let tileset: any; let indexesConfig: IndexesConfig; @@ -235,7 +228,7 @@ export default function runIndexer(argv: string[]) { fse.mkdirpSync(outDir); const tilesetDir = path.dirname(tilesetFile); - index3dTileset(tileset, tilesetDir, indexesConfig, outDir); + await index3dTileset(tileset, tilesetDir, indexesConfig, outDir); } // TODO: do not run, instead just export this function diff --git a/src/3dTiles/tiles.ts b/src/3dTiles/tiles.ts index 0015f85..5f1d89f 100644 --- a/src/3dTiles/tiles.ts +++ b/src/3dTiles/tiles.ts @@ -11,16 +11,19 @@ type Tile = { children?: Tile[]; }; -export function forEachTile( +export async function forEachTile( tileset: Tileset, - iterFn: (value: { tile: Tile; computedTransform: Matrix4 }) => void -) { + iterFn: (value: { tile: Tile; computedTransform: Matrix4 }) => Promise +): Promise { const root = tileset.root; if (root === undefined) { return; } - const iterTile = (tile: Tile, parentTransform: Matrix4) => { + const iterTile = async ( + tile: Tile, + parentTransform: Matrix4 + ): Promise => { const computedTransform = tile.transform !== undefined ? Matrix4.multiply( @@ -29,13 +32,15 @@ export function forEachTile( new Matrix4() ) : parentTransform; - iterFn({ tile, computedTransform }); + await iterFn({ tile, computedTransform }); if (Array.isArray(tile.children)) { - tile.children.forEach((child) => iterTile(child, computedTransform)); + await Promise.all( + tile.children.map((child) => iterTile(child, computedTransform)) + ); } }; - iterTile(root, Matrix4.IDENTITY.clone()); + return iterTile(root, Matrix4.IDENTITY.clone()); } export function uri(tile: Tile) { diff --git a/src/gltfs.ts b/src/gltfs.ts index b9b3efa..4edc637 100644 --- a/src/gltfs.ts +++ b/src/gltfs.ts @@ -1,11 +1,11 @@ // Various utility functions for working with GLTFs // See: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md +import { GltfUtilities } from "3d-tiles-tools"; +import { Accessor, Document, Node, NodeIO } from "@gltf-transform/core"; +import { ALL_EXTENSIONS } from "@gltf-transform/extensions"; import { Cartesian3, Cartographic, Matrix4, Rectangle } from "cesium"; - -const sizeOfUint32 = 4; -const jsonChunkType = 0x4e4f534a; -const binaryChunkType = 0x004e4942; +import draco3d from "draco3dgltf"; export type Gltf = { json: any; buffers: Buffer[] }; @@ -25,136 +25,38 @@ export function asComponentType(value: number) { throw new Error(`Unhandled component type: ${value}`); } -export function parseGlb(glb: Buffer): Gltf | undefined { - if (glb.slice(0, 4).toString() !== "glTF") { - return; - } - const version = glb.readUInt32LE(4); - if (version === 2) { - return parseGlbVersion2(glb); - } - throw new Error(`Unhandled gltf version: ${version}`); -} - -function parseGlbVersion2(glb: Buffer): Gltf { - const length = readHeader(glb, 0, 12)[2]; - let byteOffset = 12; - let json: any; - let binaryBuffer: Buffer = Buffer.from([]); - while (byteOffset < length) { - const [chunkLength, chunkType] = readHeader(glb, byteOffset, 2); - byteOffset += 8; - const chunkBuffer = glb.subarray(byteOffset, byteOffset + chunkLength); - byteOffset += chunkLength; - if (chunkType === jsonChunkType) { - json = JSON.parse(chunkBuffer.toString("utf-8")); - } else if (chunkType === binaryChunkType) { - binaryBuffer = chunkBuffer; - } - } - return { json, buffers: [binaryBuffer] }; +export async function parseGlb(glb: Buffer): Promise { + const io = new NodeIO(); + io.registerExtensions(ALL_EXTENSIONS) // pass through extensions we do not handle explicitly + .registerDependencies({ + "draco3d.decoder": await draco3d.createDecoderModule(), + }); + // Replaces CESIUM_RTC by inserting new nodes that wrap existing nodes inside + // a transform + const modernGlb = await GltfUtilities.replaceCesiumRtcExtension(glb); + const document = await io.readBinary(new Uint8Array(modernGlb)); + return document; } -function readHeader(glb: Buffer, byteOffset: number, count: number): number[] { - const header = []; - for (let i = 0; i < count; i++) { - header.push(glb.readUInt32LE(byteOffset + i * sizeOfUint32)); - } - return header; +export async function parseGltf(gltfJson: any): Promise { + const io = new NodeIO(); + io.registerExtensions(ALL_EXTENSIONS) // pass through extensions we do not handle explicitly + .registerDependencies({ + "draco3d.decoder": await draco3d.createDecoderModule(), + }); + const document = await io.readJSON(gltfJson); + return document; } -/** - * Get the nth value in the buffer described by an accessor with accessorId - */ -export function getBufferForValueAt(gltf: Gltf, accessorId: number, n: number) { - const accessor = gltf.json.accessors[accessorId]; - const bufferView = gltf.json.bufferViews[accessor.bufferView]; - const bufferId = bufferView.buffer; - const buffer = gltf.buffers[bufferId].slice( - bufferView.byteOffset, - bufferView.byteOffset + bufferView.byteLength +export function readValueAt(accessor: Accessor, n: number): number[] { + const elements = accessor.getElementSize(); + const start = n * elements; + const valueComponents = Array.from( + accessor.getArray()?.slice(start, start + elements) ?? [] ); - const valueSize = - sizeOfComponentType(accessor.componentType) * - numberOfComponentsForType(accessor.type); - - // if no byteStride specified, the buffer is tightly packed - const byteStride = bufferView.byteStride ?? valueSize; - const pos = accessor.byteOffset + n * byteStride; - const valueBuffer = buffer.slice(pos, pos + valueSize); - return valueBuffer; -} - -export function readValueAt( - gltf: Gltf, - accessorId: number, - n: number -): number[] { - const buffer = getBufferForValueAt(gltf, accessorId, n); - const accessor = gltf.json.accessors[accessorId]; - const numberOfComponents = numberOfComponentsForType(accessor.type); - const valueComponents = []; - const componentType = asComponentType(accessor.componentType); - for (let i = 0; i < numberOfComponents; i++) { - valueComponents[i] = readComponent(buffer, componentType, i); - } return valueComponents; } -function readComponent( - valueBuffer: Buffer, - componentType: ComponentType, - n: number -): number { - switch (componentType) { - case ComponentType.UNSIGNED_BYTE: - return valueBuffer.readUInt8(n * sizeOfComponentType(componentType)); - case ComponentType.SHORT: - return valueBuffer.readUInt16LE(n * sizeOfComponentType(componentType)); - case ComponentType.FLOAT: - return valueBuffer.readFloatLE(n * sizeOfComponentType(componentType)); - } -} - -export function getCartesian3FromVertex(vertex: Buffer): Cartesian3 { - const x = vertex.readFloatLE(0); - const y = vertex.readFloatLE(4); - const z = vertex.readFloatLE(8); - const position = new Cartesian3(x, y, z); - return position; -} - -export function setVertexFromCartesian3( - vertex: Buffer, - position: Cartesian3 -): void { - vertex.writeFloatLE(position.x, 0); - vertex.writeFloatLE(position.y, 4); - vertex.writeFloatLE(position.z, 8); -} - -export function sizeOfComponentType(componentType: ComponentType): number { - switch (componentType as ComponentType) { - case ComponentType.UNSIGNED_BYTE: - return Uint8Array.BYTES_PER_ELEMENT; - case ComponentType.SHORT: - return Int16Array.BYTES_PER_ELEMENT; - case ComponentType.FLOAT: - return Float32Array.BYTES_PER_ELEMENT; - } -} - -export function numberOfComponentsForType(accessorType: string) { - switch (accessorType) { - case "VEC3": - return 3; - case "SCALAR": - return 1; - default: - throw new Error(`Unhandled accessor type: ${accessorType}`); - } -} - /** * Compute position for each feature from the vertex data * @@ -162,59 +64,53 @@ export function numberOfComponentsForType(accessorType: string) { * can be indexed by the batchId for the feature. */ export function computeFeaturePositionsFromGltfVertices( - gltf: Gltf, + gltf: Document, tileTransform: Matrix4, - rtcTransform: Matrix4, toZUpTransform: Matrix4 ): Cartographic[] | undefined { - const nodes = gltf?.json.nodes; - const meshes = gltf?.json.meshes; - const accessors = gltf?.json.accessors; - const bufferViews = gltf?.json.bufferViews; - - if ( - !Array.isArray(nodes) || - !Array.isArray(meshes) || - !Array.isArray(accessors) || - !Array.isArray(bufferViews) - ) { - return; - } - + const root = gltf.getRoot(); + const nodes = root.listNodes(); const batchIdPositions: Cartographic[][] = []; nodes.forEach((node) => { - const mesh = meshes[node.mesh]; - const primitives = mesh.primitives; - const nodeMatrix = Array.isArray(node.matrix) - ? Matrix4.fromColumnMajorArray(node.matrix) - : Matrix4.IDENTITY.clone(); - - const modelMatrix = Matrix4.IDENTITY.clone(); - Matrix4.multiplyTransformation(modelMatrix, tileTransform, modelMatrix); - Matrix4.multiplyTransformation(modelMatrix, rtcTransform, modelMatrix); - Matrix4.multiplyTransformation(modelMatrix, toZUpTransform, modelMatrix); - Matrix4.multiplyTransformation(modelMatrix, nodeMatrix, modelMatrix); - - primitives.forEach((primitive: any) => { - const attributes = primitive.attributes; - const _BATCHID = attributes._BATCHID; - const POSITION = attributes.POSITION; - if (POSITION === undefined) { + const mesh = node.getMesh(); + if (mesh === null) { + return; + } + const nodeMatrix = getCompoundMatrix(node); + const primitives = mesh.listPrimitives(); + + // worldMatrix = tileTransform * toZUpTransform * nodeMatrix + const worldMatrix = Matrix4.IDENTITY.clone(); + Matrix4.multiplyTransformation(worldMatrix, tileTransform, worldMatrix); + Matrix4.multiplyTransformation(worldMatrix, toZUpTransform, worldMatrix); + Matrix4.multiplyTransformation(worldMatrix, nodeMatrix, worldMatrix); + + primitives.forEach((primitive) => { + const attributes = primitive.listAttributes(); + const accessors = Object.fromEntries( + primitive + .listSemantics() + .map((semantic, i) => [semantic, attributes[i]]) + ); + + if (accessors.POSITION === undefined) { return; } - const count = accessors[POSITION].count; + const count = accessors.POSITION.getCount(); for (let i = 0; i < count; i++) { // If the gltf vertices are tagged with BATCHID, store the positions at // the respective BATCHID. Otherwise store everything under a single // BATCHID=0 const [batchId] = - _BATCHID !== undefined ? readValueAt(gltf, _BATCHID, i) : [0]; - const [x, y, z] = readValueAt(gltf, POSITION, i); + accessors._BATCHID !== undefined + ? readValueAt(accessors._BATCHID, i) + : [0]; + const [x, y, z] = readValueAt(accessors.POSITION, i); const localPosition = new Cartesian3(x, y, z); const worldPosition = Matrix4.multiplyByPoint( - modelMatrix, + worldMatrix, localPosition, new Cartesian3() ); @@ -243,3 +139,16 @@ export function computeFeaturePositionsFromGltfVertices( return featurePositions; } + +/** + * Get the compound matrix for the given node. + * This is the cumulative product of the matrices of the current node and all its parents. + */ +function getCompoundMatrix(node: Node): Matrix4 { + const parentNode = node.getParentNode(); + const matrix = parentNode + ? getCompoundMatrix(parentNode) + : Matrix4.IDENTITY.clone(); + Matrix4.multiply(matrix, Matrix4.fromArray(node.getMatrix()), matrix); + return matrix; +} diff --git a/src/kml-gltf/indexer.ts b/src/kml-gltf/indexer.ts index e4656e7..7fb94b7 100644 --- a/src/kml-gltf/indexer.ts +++ b/src/kml-gltf/indexer.ts @@ -1,25 +1,25 @@ // See https://cesium.com/blog/2020/04/09/kml-collada-metadata/ for supported KML format +// +// Note: kml indexer hasn't been fully tested since the migration to gltf-transform, so expect errors when using it. +// Just enough fixes have been made to make the typescript compiler happy. +// -import { - Axis, - Cartographic, - Math as CesiumMath, - Matrix4, - Transforms, -} from "cesium"; +import { Document } from "@gltf-transform/core"; +import { Axis, Cartographic, Math as CesiumMath, Transforms } from "cesium"; import * as fse from "fs-extra"; import * as path from "path"; import * as xml2json from "xml2json"; import { IndexesConfig, parseIndexesConfig } from "../Config"; -import { COMPUTED_HEIGHT_PROPERTY_NAME } from "../constants"; -import { computeFeaturePositionsFromGltfVertices, Gltf } from "../gltfs"; import { IndexRoot } from "../Index"; import { createIndexBuilder, - writeIndexes, writeIndexRoot, + writeIndexes, writeResultsData, } from "../IndexBuilder"; +import { COMPUTED_HEIGHT_PROPERTY_NAME } from "../constants"; +import * as gltfs from "../gltfs"; +import { computeFeaturePositionsFromGltfVertices } from "../gltfs"; import { logOnSameLine, printUsageAndExit, @@ -96,7 +96,7 @@ function readModel(kml: Kml): Model | undefined { } function computeModelPosition( - gltf: Gltf, + gltf: Document, location: Model["location"] ): Cartographic | undefined { // Compute a lat, lon & feature height from the gltf vertices @@ -112,30 +112,12 @@ function computeModelPosition( const modelPosition = computeFeaturePositionsFromGltfVertices( gltf, Transforms.eastNorthUpToFixedFrame(gltfPosition), // gltf local coords to globe coords - Matrix4.IDENTITY.clone(), // rtc transform - there is none (Axis as any).Y_UP_TO_Z_UP.clone() // default gltf axis to cesium axis )?.[0]; return modelPosition; } -function readGltf(gltfPath: string): Gltf { - const json = JSON.parse(fse.readFileSync(gltfPath).toString()); - if (Array.isArray(json.buffers) === false) { - return { json, buffers: [] }; - } - - const buffers: Buffer[] = json.buffers.map( - ({ uri }: { uri: string }): Buffer => { - const bufferPath = path.resolve(path.dirname(gltfPath), uri); - const buffer = fse.readFileSync(bufferPath); - return buffer; - } - ); - - return { json, buffers }; -} - -function indexKmlFiles( +async function indexKmlFiles( kmlDir: string, kmlFiles: string[], indexesConfig: IndexesConfig, @@ -147,7 +129,7 @@ function indexKmlFiles( ).map(([property, config]) => createIndexBuilder(property, config)); let featuresRead = 0; - kmlFiles.forEach((file) => { + const promises = kmlFiles.map(async (file) => { if (kmlFileRe.test(file) === false) { return; } @@ -165,7 +147,7 @@ function indexKmlFiles( return; } const gltfPath = path.resolve(path.dirname(kmlFile), model.gltfLink); - const gltf = readGltf(gltfPath); + const gltf = await gltfs.parseGltf(fse.readFileSync(gltfPath)); const position = computeModelPosition(gltf, model.location); if (position === undefined) { console.error(`Failed to compute position for model: ${model.gltfLink}`); @@ -200,6 +182,8 @@ function indexKmlFiles( logOnSameLine(`Features read: ${featuresRead}`); }); + await Promise.all(promises); + console.log(`\nUnique features found: ${featuresRead}`); console.log("Writing indexes..."); const indexes = writeIndexes(indexBuilders, outDir); @@ -214,7 +198,7 @@ function indexKmlFiles( console.log("Done."); } -function runIndexer(argv: string[]) { +async function runIndexer(argv: string[]) { const [kmlDir, indexConfigFile, outDir] = argv.slice(2); let kmlFiles: string[] = []; @@ -240,7 +224,7 @@ function runIndexer(argv: string[]) { } fse.mkdirpSync(outDir); - indexKmlFiles(kmlDir, kmlFiles, indexesConfig, outDir); + await indexKmlFiles(kmlDir, kmlFiles, indexesConfig, outDir); } runIndexer(process.argv); diff --git a/tsconfig.json b/tsconfig.json index 6addec4..1482a4b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,27 +1,17 @@ { "compilerOptions": { - "target": "es6", + "esModuleInterop": true, + "target": "es2021", "module": "commonjs", "moduleResolution": "node", + "lib": ["es2021", "dom"], + "declaration": true, "strict": true, - "noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */, - "strictNullChecks": true /* Enable strict null checks. */, - "strictFunctionTypes": true /* Enable strict checking of function types. */, - "noUnusedLocals": true /* Report errors on unused locals. */, - "noUnusedParameters": true /* Report errors on unused parameters. */, - "noImplicitReturns": true /* Report error when not all code paths in function return a value. */, - "noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */, - "importHelpers": true, "skipLibCheck": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "experimentalDecorators": true, - "sourceMap": true, - "outDir": "./dist/tsc/", - "types": ["node"], - "lib": ["ES6"] + "allowJs": true, + + "outDir": "./build" }, - "include": ["src/**/*.ts"], - "exclude": ["node_modules", "**/*.test.ts"] + "include": ["./src", "./ThirdParty"] } diff --git a/yarn.lock b/yarn.lock index ee4bf80..b0011bd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,30 @@ # yarn lockfile v1 +"3d-tiles-tools@^0.3.2": + version "0.3.2" + resolved "https://registry.yarnpkg.com/3d-tiles-tools/-/3d-tiles-tools-0.3.2.tgz#ffc4084a4eb119265b5eb2d9482487261fbb665f" + integrity sha512-O7R6n6dEyQDoK8+sGBYxZC7ANI4C4V9Mtq/4ndTp6rj4Umfig2lepmrvV5yIhN3r/6gKNE//SeAuGgQtIT8z8w== + dependencies: + "@gltf-transform/core" "^3.2.1" + "@gltf-transform/extensions" "^3.2.1" + "@gltf-transform/functions" "^3.2.1" + archiver "^5.3.1" + better-sqlite3 "^8.0.1" + cesium "^1.103.0" + draco3d "^1.5.6" + draco3dgltf "^1.5.6" + gltf-pipeline "^4.1.0" + gltfpack "^0.19.1" + meshoptimizer "^0.19.0" + minimist "^1.2.7" + node-stream-zip "^1.15.0" + pino "^8.15.0" + pino-pretty "^10.2.0" + seedrandom "^3.0.5" + sharp "^0.32.1" + yargs "^17.5.1" + "@babel/code-frame@^7.0.0": version "7.12.11" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" @@ -23,6 +47,136 @@ chalk "^2.0.0" js-tokens "^4.0.0" +"@cesium/engine@^6.1.0": + version "6.1.0" + resolved "https://registry.yarnpkg.com/@cesium/engine/-/engine-6.1.0.tgz#5815ddd55363799798708cf7d2385256548e7ce7" + integrity sha512-gufv2rfvbPVA3foYrMP+8RBOpH9z8zq6PaHqFOSCmNlRDPDsoAhsjGAog+sjFz1ybFiQ2/DY84YB/2cjs+DYxw== + dependencies: + "@tweenjs/tween.js" "^21.0.0" + "@zip.js/zip.js" "2.4.x" + autolinker "^4.0.0" + bitmap-sdf "^1.0.3" + dompurify "^3.0.2" + draco3d "^1.5.1" + earcut "^2.2.4" + grapheme-splitter "^1.0.4" + jsep "^1.3.8" + kdbush "^4.0.1" + ktx-parse "^0.6.0" + lerc "^2.0.0" + mersenne-twister "^1.1.0" + meshoptimizer "^0.19.0" + pako "^2.0.4" + protobufjs "^7.1.0" + rbush "^3.0.1" + topojson-client "^3.1.0" + urijs "^1.19.7" + +"@cesium/widgets@^4.3.0": + version "4.3.0" + resolved "https://registry.yarnpkg.com/@cesium/widgets/-/widgets-4.3.0.tgz#d818362744c87ed63e534ff044d5d0e1fc61f95c" + integrity sha512-TZoJJJpv6Jp6bEl0t+nSQwGYvttp4RJbB6oYbtJPPqURz/JP/kYd+hAF+uV0DefRws3yl6waDDZ3Lrd09Ype4g== + dependencies: + "@cesium/engine" "^6.1.0" + nosleep.js "^0.12.0" + +"@gltf-transform/core@^3.2.1", "@gltf-transform/core@^3.9.0": + version "3.9.0" + resolved "https://registry.yarnpkg.com/@gltf-transform/core/-/core-3.9.0.tgz#c63d5d0a2cf2d00f2a5f8faa5c5c6c6187db06c2" + integrity sha512-sLIUFqPIx8ATPDRwC9G/TXh4C7Q+w9z7DzXVMiNNReSVsAemTmZACqwCYpDW4jkUm3pbmz5/h9I9HXokBHbJ2w== + dependencies: + property-graph "^1.3.1" + +"@gltf-transform/extensions@^3.2.1", "@gltf-transform/extensions@^3.9.0": + version "3.9.0" + resolved "https://registry.yarnpkg.com/@gltf-transform/extensions/-/extensions-3.9.0.tgz#a6c1c1da438b2262a97f5edb45ae2920d5198669" + integrity sha512-VOcnajpW9DtXrlRwYVgenkjrtKN6uwjvda9+BQ0ff5D298godMhGU6wP0KlSvfC4R+z8h7F4psaM76NyJKwnZw== + dependencies: + "@gltf-transform/core" "^3.9.0" + ktx-parse "^0.6.0" + +"@gltf-transform/functions@^3.2.1": + version "3.9.0" + resolved "https://registry.yarnpkg.com/@gltf-transform/functions/-/functions-3.9.0.tgz#ef505c6d91b64ff4090ff874b0f2e2fa6c30272c" + integrity sha512-ONdE1crpz9Xj3bI6u+xZhuNui2PC61fLQ9JCfyHZQ0G5IHhoDnTR50bo7/UOBo6vUcd6zeoEgplIcGpGlAq0Ug== + dependencies: + "@gltf-transform/core" "^3.9.0" + "@gltf-transform/extensions" "^3.9.0" + ktx-parse "^0.6.0" + ndarray "^1.0.19" + ndarray-lanczos "^0.3.0" + ndarray-pixels "^3.0.4" + +"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf" + integrity sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ== + +"@protobufjs/base64@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/base64/-/base64-1.1.2.tgz#4c85730e59b9a1f1f349047dbf24296034bb2735" + integrity sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg== + +"@protobufjs/codegen@^2.0.4": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@protobufjs/codegen/-/codegen-2.0.4.tgz#7ef37f0d010fb028ad1ad59722e506d9262815cb" + integrity sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg== + +"@protobufjs/eventemitter@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz#355cbc98bafad5978f9ed095f397621f1d066b70" + integrity sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q== + +"@protobufjs/fetch@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/fetch/-/fetch-1.1.0.tgz#ba99fb598614af65700c1619ff06d454b0d84c45" + integrity sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ== + dependencies: + "@protobufjs/aspromise" "^1.1.1" + "@protobufjs/inquire" "^1.1.0" + +"@protobufjs/float@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@protobufjs/float/-/float-1.0.2.tgz#5e9e1abdcb73fc0a7cb8b291df78c8cbd97b87d1" + integrity sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ== + +"@protobufjs/inquire@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/inquire/-/inquire-1.1.0.tgz#ff200e3e7cf2429e2dcafc1140828e8cc638f089" + integrity sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q== + +"@protobufjs/path@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/path/-/path-1.1.2.tgz#6cc2b20c5c9ad6ad0dccfd21ca7673d8d7fbf68d" + integrity sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA== + +"@protobufjs/pool@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/pool/-/pool-1.1.0.tgz#09fd15f2d6d3abfa9b65bc366506d6ad7846ff54" + integrity sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw== + +"@protobufjs/utf8@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" + integrity sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw== + +"@tweenjs/tween.js@^21.0.0": + version "21.0.0" + resolved "https://registry.yarnpkg.com/@tweenjs/tween.js/-/tween.js-21.0.0.tgz#73f993c2d1de37b78b4c1246163e20bc6ae3b75e" + integrity sha512-qVfOiFh0U8ZSkLgA6tf7kj2MciqRbSCWaJZRwftVO7UbtVDNsZAXpWXqvCDtIefvjC83UJB+vHTDOGm5ibXjEA== + +"@types/draco3d@*": + version "1.4.8" + resolved "https://registry.yarnpkg.com/@types/draco3d/-/draco3d-1.4.8.tgz#294c9a63f61537aed407f13b765065381f6668fa" + integrity sha512-hdA2gODc+1X5gG+buH8gMRnQdRTa3vep8+PyGFK9xDQmbdudobP//yXLK+C/SnjGLWHiER2QL+xWjq7qkFuivA== + +"@types/draco3dgltf@^1.4.3": + version "1.4.3" + resolved "https://registry.yarnpkg.com/@types/draco3dgltf/-/draco3dgltf-1.4.3.tgz#077c0523026c87706148e93ee31b0a5dc37ee408" + integrity sha512-JTY574f8xRI9+bOsDajeVSQ/gnIo0q3dt/MAJhNRKWJKdH2TAP3hld+lQ+eQnG9Eb6Ae493EiKi2oDZZpciQgw== + dependencies: + "@types/draco3d" "*" + "@types/fs-extra@^9.0.5": version "9.0.6" resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-9.0.6.tgz#488e56b77299899a608b8269719c1d133027a6ab" @@ -30,11 +184,23 @@ dependencies: "@types/node" "*" +"@types/ndarray@^1.0.11": + version "1.0.14" + resolved "https://registry.yarnpkg.com/@types/ndarray/-/ndarray-1.0.14.tgz#96b28c09a3587a76de380243f87bb7a2d63b4b23" + integrity sha512-oANmFZMnFQvb219SSBIhI1Ih/r4CvHDOzkWyJS/XRqkMrGH5/kaPSA1hQhdIBzouaE+5KpE/f5ylI9cujmckQg== + "@types/node@*": version "14.14.20" resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.20.tgz#f7974863edd21d1f8a494a73e8e2b3658615c340" integrity sha512-Y93R97Ouif9JEOWPIUyU+eyIdyRqQR0I8Ez1dzku4hDx34NWh4HbtIc3WNzwB1Y9ULvNGeu5B8h8bVL5cAk4/A== +"@types/node@>=13.7.0", "@types/node@^20.9.1": + version "20.9.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.9.1.tgz#9d578c610ce1e984adda087f685ace940954fe19" + integrity sha512-HhmzZh5LSJNS5O8jQKpJ/3ZcrrlG6L70hpGqMIAoM9YVD0YBRNWYsfwcXq8VnSjlNpCpgLzMXdiPo+dxcvSmiA== + dependencies: + undici-types "~5.26.4" + "@types/papaparse@^5.2.4": version "5.2.4" resolved "https://registry.yarnpkg.com/@types/papaparse/-/papaparse-5.2.4.tgz#6aa662b08df84fd1dc34db37860005e9127457f3" @@ -49,6 +215,23 @@ dependencies: "@types/node" "*" +"@zip.js/zip.js@2.4.x": + version "2.4.26" + resolved "https://registry.yarnpkg.com/@zip.js/zip.js/-/zip.js-2.4.26.tgz#b79bb2055dc6e185890ee01cdb710caba505d5b2" + integrity sha512-I9HBO3BHIxEMQmltmHM3iqUW6IHqi3gsL9wTSXvHTRpOrA6q2OxtR58EDSaOGjHhDVJ+wIOAxZyKq2x00AVmqw== + +abort-controller@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" + integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== + dependencies: + event-target-shim "^5.0.0" + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" @@ -56,10 +239,57 @@ ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" -arg@^4.1.0: - version "4.1.3" - resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" - integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== +ansi-styles@^4.0.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +archiver-utils@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/archiver-utils/-/archiver-utils-2.1.0.tgz#e8a460e94b693c3e3da182a098ca6285ba9249e2" + integrity sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw== + dependencies: + glob "^7.1.4" + graceful-fs "^4.2.0" + lazystream "^1.0.0" + lodash.defaults "^4.2.0" + lodash.difference "^4.5.0" + lodash.flatten "^4.4.0" + lodash.isplainobject "^4.0.6" + lodash.union "^4.6.0" + normalize-path "^3.0.0" + readable-stream "^2.0.0" + +archiver-utils@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/archiver-utils/-/archiver-utils-3.0.4.tgz#a0d201f1cf8fce7af3b5a05aea0a337329e96ec7" + integrity sha512-KVgf4XQVrTjhyWmx6cte4RxonPLR9onExufI1jhvw/MQ4BB6IsZD5gT8Lq+u/+pRkWna/6JoHpiQioaqFP5Rzw== + dependencies: + glob "^7.2.3" + graceful-fs "^4.2.0" + lazystream "^1.0.0" + lodash.defaults "^4.2.0" + lodash.difference "^4.5.0" + lodash.flatten "^4.4.0" + lodash.isplainobject "^4.0.6" + lodash.union "^4.6.0" + normalize-path "^3.0.0" + readable-stream "^3.6.0" + +archiver@^5.3.1: + version "5.3.2" + resolved "https://registry.yarnpkg.com/archiver/-/archiver-5.3.2.tgz#99991d5957e53bd0303a392979276ac4ddccf3b0" + integrity sha512-+25nxyyznAXF7Nef3y0EbBeqmGZgeN/BxHX29Rs39djAfaFalmQ89SE6CWyDCHzGL0yt/ycBtNOmGTW0FyGWNw== + dependencies: + archiver-utils "^2.1.0" + async "^3.2.4" + buffer-crc32 "^0.2.1" + readable-stream "^3.6.0" + readdir-glob "^1.1.2" + tar-stream "^2.2.0" + zip-stream "^4.1.0" argparse@^1.0.7: version "1.0.10" @@ -68,16 +298,51 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" +async@^3.2.4: + version "3.2.5" + resolved "https://registry.yarnpkg.com/async/-/async-3.2.5.tgz#ebd52a8fdaf7a2289a24df399f8d8485c8a46b66" + integrity sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg== + at-least-node@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== +atomic-sleep@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/atomic-sleep/-/atomic-sleep-1.0.0.tgz#eb85b77a601fc932cfe432c5acd364a9e2c9075b" + integrity sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ== + +autolinker@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/autolinker/-/autolinker-4.0.0.tgz#aa1f9a52786b727b0ecee8cd7d4a97e0e3ef59f1" + integrity sha512-fl5Kh6BmEEZx+IWBfEirnRUU5+cOiV0OK7PEt0RBKvJMJ8GaRseIOeDU3FKf4j3CE5HVefcjHmhYPOcaVt0bZw== + dependencies: + tslib "^2.3.0" + +b4a@^1.6.4: + version "1.6.4" + resolved "https://registry.yarnpkg.com/b4a/-/b4a-1.6.4.tgz#ef1c1422cae5ce6535ec191baeed7567443f36c9" + integrity sha512-fpWrvyVHEKyeEvbKZTVOeZF3VSKKWtJxFIxX/jaVPf+cLbGUSitjb49pHLqPV2BUNNZ0LcoeEGfE/YCpyDYHIw== + balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= +base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + +better-sqlite3@^8.0.1: + version "8.7.0" + resolved "https://registry.yarnpkg.com/better-sqlite3/-/better-sqlite3-8.7.0.tgz#bcc341856187b1d110a8a47234fa89c48c8ef538" + integrity sha512-99jZU4le+f3G6aIl6PmmV0cxUIWqKieHxsiF7G34CVFiE+/UabpYqkU0NJIkY/96mQKikHeBjtR27vFfs5JpEw== + dependencies: + bindings "^1.5.0" + prebuild-install "^7.1.1" + bindings@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" @@ -85,6 +350,25 @@ bindings@^1.5.0: dependencies: file-uri-to-path "1.0.0" +bitmap-sdf@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/bitmap-sdf/-/bitmap-sdf-1.0.4.tgz#e87b8b1d84ee846567cfbb29d60eedd34bca5b6f" + integrity sha512-1G3U4n5JE6RAiALMxu0p1XmeZkTeCwGKykzsLTCqVzfSDaN6S7fKnkIkfejogz+iwqBWc0UYAIKnKHNN7pSfDg== + +bl@^4.0.3: + version "4.1.0" + resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" + integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== + dependencies: + buffer "^5.5.0" + inherits "^2.0.4" + readable-stream "^3.4.0" + +bluebird@^3.7.2: + version "3.7.2" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" + integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -93,16 +377,47 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -buffer-from@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" - integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + +buffer-crc32@^0.2.1, buffer-crc32@^0.2.13: + version "0.2.13" + resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" + integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ== + +buffer@^5.5.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.1.13" + +buffer@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" + integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.2.1" builtin-modules@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= +cesium@^1.103.0, cesium@^1.86.1: + version "1.111.0" + resolved "https://registry.yarnpkg.com/cesium/-/cesium-1.111.0.tgz#33bb58c96be0425d7d87430a71949b78fa589e3e" + integrity sha512-wWtBa1KIMIJZR39U4Tv+CkJUeCfi83eVjCLxblYilD9zd4gb7vm3V9ytmJ0+v0sqk9RQws5JOg7Hobbs9ODTxQ== + dependencies: + "@cesium/engine" "^6.1.0" + "@cesium/widgets" "^4.3.0" + cesium@^1.77.0: version "1.77.0" resolved "https://registry.yarnpkg.com/cesium/-/cesium-1.77.0.tgz#c4e2b3c2906dd20f147fe55e57233750bd59b025" @@ -117,6 +432,20 @@ chalk@^2.0.0, chalk@^2.3.0: escape-string-regexp "^1.0.5" supports-color "^5.3.0" +chownr@^1.1.1: + version "1.1.4" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" + integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== + +cliui@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" + integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.1" + wrap-ansi "^7.0.0" + color-convert@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" @@ -124,31 +453,153 @@ color-convert@^1.9.0: dependencies: color-name "1.1.3" +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + color-name@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= -commander@^2.12.1: +color-name@^1.0.0, color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +color-string@^1.9.0: + version "1.9.1" + resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.9.1.tgz#4467f9146f036f855b764dfb5bf8582bf342c7a4" + integrity sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg== + dependencies: + color-name "^1.0.0" + simple-swizzle "^0.2.2" + +color@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/color/-/color-4.2.3.tgz#d781ecb5e57224ee43ea9627560107c0e0c6463a" + integrity sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A== + dependencies: + color-convert "^2.0.1" + color-string "^1.9.0" + +colorette@^2.0.7: + version "2.0.20" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" + integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== + +commander@2, commander@^2.12.1: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== +compress-commons@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/compress-commons/-/compress-commons-4.1.2.tgz#6542e59cb63e1f46a8b21b0e06f9a32e4c8b06df" + integrity sha512-D3uMHtGc/fcO1Gt1/L7i1e33VOvD4A9hfQLP+6ewd+BvG/gQ84Yh4oftEhAdjSMgBgwGL+jsppT7JYNpo6MHHg== + dependencies: + buffer-crc32 "^0.2.13" + crc32-stream "^4.0.2" + normalize-path "^3.0.0" + readable-stream "^3.6.0" + concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -create-require@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" - integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== +core-util-is@~1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" + integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== + +crc-32@^1.2.0: + version "1.2.2" + resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff" + integrity sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ== + +crc32-stream@^4.0.2: + version "4.0.3" + resolved "https://registry.yarnpkg.com/crc32-stream/-/crc32-stream-4.0.3.tgz#85dd677eb78fa7cad1ba17cc506a597d41fc6f33" + integrity sha512-NT7w2JVU7DFroFdYkeq8cywxrgjPHWkdX1wjpRQXPX5Asews3tA+Ght6lddQO5Mkumffp3X7GEqku3epj2toIw== + dependencies: + crc-32 "^1.2.0" + readable-stream "^3.4.0" + +cwise-compiler@^1.0.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/cwise-compiler/-/cwise-compiler-1.1.3.tgz#f4d667410e850d3a313a7d2db7b1e505bb034cc5" + integrity sha512-WXlK/m+Di8DMMcCjcWr4i+XzcQra9eCdXIJrgh4TUgh0pIS/yJduLxS9JgefsHJ/YVLdgPtXm9r62W92MvanEQ== + dependencies: + uniq "^1.0.0" + +dateformat@^4.6.3: + version "4.6.3" + resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-4.6.3.tgz#556fa6497e5217fedb78821424f8a1c22fa3f4b5" + integrity sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA== + +decompress-response@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc" + integrity sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ== + dependencies: + mimic-response "^3.1.0" + +deep-extend@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== + +detect-libc@^2.0.0, detect-libc@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.2.tgz#8ccf2ba9315350e1241b88d0ac3b0e1fbd99605d" + integrity sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw== diff@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== +dompurify@^3.0.2: + version "3.0.6" + resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-3.0.6.tgz#925ebd576d54a9531b5d76f0a5bef32548351dae" + integrity sha512-ilkD8YEnnGh1zJ240uJsW7AzE+2qpbOUYjacomn3AvJ6J4JhKGSZ2nh4wUIXPZrEPppaCLx5jFe8T89Rk8tQ7w== + +draco3d@^1.4.3, draco3d@^1.5.1, draco3d@^1.5.6: + version "1.5.6" + resolved "https://registry.yarnpkg.com/draco3d/-/draco3d-1.5.6.tgz#0d570a9792e3a3a9fafbfea065b692940441c626" + integrity sha512-+3NaRjWktb5r61ZFoDejlykPEFKT5N/LkbXsaddlw6xNSXBanUYpFc2AXXpbJDilPHazcSreU/DpQIaxfX0NfQ== + +draco3dgltf@^1.5.6: + version "1.5.6" + resolved "https://registry.yarnpkg.com/draco3dgltf/-/draco3dgltf-1.5.6.tgz#4bc4587238a506c8dca2713274c24dfccc2375c2" + integrity sha512-wCKFfJhRB2lkAV/dzlKs+EmHSoI3x8w4Z8yBpkzLIF9GAvjh6jk90jomC13k/DLVFTJSesm8LHg9ok6p3OVfVA== + +earcut@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/earcut/-/earcut-2.2.4.tgz#6d02fd4d68160c114825d06890a92ecaae60343a" + integrity sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +end-of-stream@^1.1.0, end-of-stream@^1.4.1: + version "1.4.4" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== + dependencies: + once "^1.4.0" + +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -159,11 +610,60 @@ esprima@^4.0.0: resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== +event-target-shim@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" + integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== + +events@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" + integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== + +expand-template@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-2.0.3.tgz#6e14b3fcee0f3a6340ecb57d2e8918692052a47c" + integrity sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg== + +fast-copy@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/fast-copy/-/fast-copy-3.0.1.tgz#9e89ef498b8c04c1cd76b33b8e14271658a732aa" + integrity sha512-Knr7NOtK3HWRYGtHoJrjkaWepqT8thIVGAwt0p0aUs1zqkAzXZV4vo9fFNwyb5fcqK1GKYFYxldQdIDVKhUAfA== + +fast-fifo@^1.1.0, fast-fifo@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/fast-fifo/-/fast-fifo-1.3.2.tgz#286e31de96eb96d38a97899815740ba2a4f3640c" + integrity sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ== + +fast-redact@^3.1.1: + version "3.3.0" + resolved "https://registry.yarnpkg.com/fast-redact/-/fast-redact-3.3.0.tgz#7c83ce3a7be4898241a46560d51de10f653f7634" + integrity sha512-6T5V1QK1u4oF+ATxs1lWUmlEk6P2T9HqJG3e2DnHOdVgZy2rFJBoEnrIedcTXlkAHU/zKC+7KETJ+KGGKwxgMQ== + +fast-safe-stringify@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz#c406a83b6e70d9e35ce3b30a81141df30aeba884" + integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA== + file-uri-to-path@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== +fs-constants@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" + integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== + +fs-extra@^11.0.0: + version "11.1.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.1.1.tgz#da69f7c39f3b002378b0954bb6ae7efdc0876e2d" + integrity sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs-extra@^9.0.1: version "9.0.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.0.1.tgz#910da0062437ba4c39fedd863f1675ccfefcb9fc" @@ -184,6 +684,16 @@ function-bind@^1.1.1: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +github-from-package@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce" + integrity sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw== + glob@^7.1.1: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" @@ -196,11 +706,57 @@ glob@^7.1.1: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^7.1.4, glob@^7.2.3: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^8.0.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" + integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^5.0.1" + once "^1.3.0" + +gltf-pipeline@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/gltf-pipeline/-/gltf-pipeline-4.1.0.tgz#bf522d67e00ef8286fbc273c3e14b572b398a4f3" + integrity sha512-QVxs+9Sv1AIP0FKtDXfKgxUVtm3YOeXfe9WFZz2duOenAjw4WBa/x+bohFQ0dvFikFZiV/pJ6MZSYEFOYC8hMA== + dependencies: + bluebird "^3.7.2" + cesium "^1.86.1" + draco3d "^1.4.3" + fs-extra "^11.0.0" + mime "^3.0.0" + object-hash "^3.0.0" + yargs "^17.2.1" + +gltfpack@^0.19.1: + version "0.19.1" + resolved "https://registry.yarnpkg.com/gltfpack/-/gltfpack-0.19.1.tgz#89ef122ed57a11fd9ad490f933c2c11d859e9bb6" + integrity sha512-6dARcu+pScrgGIKtNXnFuPAABeaARPOkwaNtmUVYEgRHAWH0VQ0c3nNKDR3lEzO+11zJSbdWZV6veTN+h8OaBg== + graceful-fs@^4.1.6, graceful-fs@^4.2.0: version "4.2.4" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== +grapheme-splitter@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" + integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== + has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -213,6 +769,14 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" +help-me@^4.0.1: + version "4.2.0" + resolved "https://registry.yarnpkg.com/help-me/-/help-me-4.2.0.tgz#50712bfd799ff1854ae1d312c36eafcea85b0563" + integrity sha512-TAOnTB8Tz5Dw8penUuzHVrKNKlCIbwwbHnXraNJxPwf8LRtE2HlM84RYuezMFcwOJmoYOCWVDyJ8TQGxn9PgxA== + dependencies: + glob "^8.0.0" + readable-stream "^3.6.0" + hoek@5.x.x: version "5.0.4" resolved "https://registry.yarnpkg.com/hoek/-/hoek-5.0.4.tgz#0f7fa270a1cafeb364a4b2ddfaa33f864e4157da" @@ -228,6 +792,11 @@ hoek@^4.2.1: resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.1.tgz#9634502aa12c445dd5a7c5734b572bb8738aacbb" integrity sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA== +ieee754@^1.1.13, ieee754@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -236,11 +805,31 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2: +inherits@2, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== +ini@~1.3.0: + version "1.3.8" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== + +iota-array@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/iota-array/-/iota-array-1.0.0.tgz#81ef57fe5d05814cd58c2483632a99c30a0e8087" + integrity sha512-pZ2xT+LOHckCatGQ3DcG/a+QuEqvoxqkiL7tvE8nn3uuu+f6i1TtpB5/FtWFbxUuVr5PZCx8KskuGatbJDXOWA== + +is-arrayish@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03" + integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ== + +is-buffer@^1.0.2: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== + is-core-module@^2.1.0: version "2.2.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a" @@ -248,6 +837,16 @@ is-core-module@^2.1.0: dependencies: has "^1.0.3" +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== + isemail@3.x.x: version "3.2.0" resolved "https://registry.yarnpkg.com/isemail/-/isemail-3.2.0.tgz#59310a021931a9fb06bbb51e155ce0b3f236832c" @@ -264,6 +863,11 @@ joi@^13.1.2: isemail "3.x.x" topo "3.x.x" +joycon@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/joycon/-/joycon-3.1.1.tgz#bce8596d6ae808f8b68168f5fc69280996894f03" + integrity sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw== + js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -277,6 +881,11 @@ js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" +jsep@^1.3.8: + version "1.3.8" + resolved "https://registry.yarnpkg.com/jsep/-/jsep-1.3.8.tgz#facb6eb908d085d71d950bd2b24b757c7b8a46d7" + integrity sha512-qofGylTGgYj9gZFsHuyWAN4jr35eJ66qJCK4eKDnldohuUoQFbU3iZn2zjvEbd9wOAhP9Wx5DsAAduTyE1PSWQ== + jsonfile@^6.0.1: version "6.1.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" @@ -286,10 +895,84 @@ jsonfile@^6.0.1: optionalDependencies: graceful-fs "^4.1.6" -make-error@^1.1.1: - version "1.3.6" - resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" - integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== +kdbush@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/kdbush/-/kdbush-4.0.2.tgz#2f7b7246328b4657dd122b6c7f025fbc2c868e39" + integrity sha512-WbCVYJ27Sz8zi9Q7Q0xHC+05iwkm3Znipc2XTlrnJbsHMYktW4hPhXUE8Ys1engBrvffoSCqbil1JQAa7clRpA== + +ktx-parse@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/ktx-parse/-/ktx-parse-0.6.0.tgz#69e12a511cf345546da27b5b046182f5f31f68f9" + integrity sha512-hYOJUI86N9+YPm0M3t8hVzW9t5FnFFibRalZCrqHs/qM2eNziqQzBtAaF0ErgkXm8F+5uE8CjPUYr32vWlXLkQ== + +lazystream@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.1.tgz#494c831062f1f9408251ec44db1cba29242a2638" + integrity sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw== + dependencies: + readable-stream "^2.0.5" + +lerc@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lerc/-/lerc-2.0.0.tgz#82feca29ea6202799a815ca38f7b66a370e8cf9b" + integrity sha512-7qo1Mq8ZNmaR4USHHm615nEW2lPeeWJ3bTyoqFbd35DLx0LUH7C6ptt5FDCTAlbIzs3+WKrk5SkJvw8AFDE2hg== + +lodash.defaults@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c" + integrity sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ== + +lodash.difference@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.difference/-/lodash.difference-4.5.0.tgz#9ccb4e505d486b91651345772885a2df27fd017c" + integrity sha512-dS2j+W26TQ7taQBGN8Lbbq04ssV3emRw4NY58WErlTO29pIqS0HmoT5aJ9+TUQ1N3G+JOZSji4eugsWwGp9yPA== + +lodash.flatten@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" + integrity sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g== + +lodash.isplainobject@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" + integrity sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA== + +lodash.union@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.union/-/lodash.union-4.6.0.tgz#48bb5088409f16f1821666641c44dd1aaae3cd88" + integrity sha512-c4pB2CdGrGdjMKYLA+XiRDO7Y0PRQbm/Gzg8qMj+QH+pFVAoTp5sBpO0odL3FjoPCGjK96p6qsP+yQoiLoOBcw== + +long@^5.0.0: + version "5.2.3" + resolved "https://registry.yarnpkg.com/long/-/long-5.2.3.tgz#a3ba97f3877cf1d778eccbcb048525ebb77499e1" + integrity sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q== + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +mersenne-twister@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mersenne-twister/-/mersenne-twister-1.1.0.tgz#f916618ee43d7179efcf641bec4531eb9670978a" + integrity sha512-mUYWsMKNrm4lfygPkL3OfGzOPTR2DBlTkBNHM//F6hGp8cLThY897crAlk3/Jo17LEOOjQUrNAx6DvgO77QJkA== + +meshoptimizer@^0.19.0: + version "0.19.0" + resolved "https://registry.yarnpkg.com/meshoptimizer/-/meshoptimizer-0.19.0.tgz#1669e6d788ad3ffd238a65184e478355642ca979" + integrity sha512-58qz5Qc/6Geu8Ib3bBWERE5R7pM5ErrJVo16fAtu6ryxVaE3VAtM/u2vurDxaq8AGZ3yWxuM/DnylTga5a4XCQ== + +mime@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-3.0.0.tgz#b374550dca3a0c18443b0c950a6a58f1931cf7a7" + integrity sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A== + +mimic-response@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" + integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== minimatch@^3.0.4: version "3.0.4" @@ -298,6 +981,25 @@ minimatch@^3.0.4: dependencies: brace-expansion "^1.1.7" +minimatch@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +minimatch@^5.0.1, minimatch@^5.1.0: + version "5.1.6" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" + integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== + dependencies: + brace-expansion "^2.0.1" + +minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.6, minimist@^1.2.7: + version "1.2.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" + integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== + minimist@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" @@ -308,6 +1010,11 @@ minisearch@^3.0.2: resolved "https://registry.yarnpkg.com/minisearch/-/minisearch-3.0.2.tgz#fa470114ffc7c4bcc0786b2adb7010d4b773bc32" integrity sha512-7rTrJEzovKNi5LSwiIr5aCfJNNo6Lk4O9HTVzjFTMdp+dSr6UisUnEqdwj4rBgNcAcaWW5ClpXnpgTurv8PGqA== +mkdirp-classic@^0.5.2, mkdirp-classic@^0.5.3: + version "0.5.3" + resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" + integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== + mkdirp@^0.5.3: version "0.5.5" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" @@ -320,6 +1027,56 @@ nan@^2.13.2: resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19" integrity sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ== +napi-build-utils@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806" + integrity sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg== + +ndarray-lanczos@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/ndarray-lanczos/-/ndarray-lanczos-0.3.0.tgz#590f3d22af281e4efd3f579ad4ea329dfe64afcc" + integrity sha512-5kBmmG3Zvyj77qxIAC4QFLKuYdDIBJwCG+DukT6jQHNa1Ft74/hPH1z5mbQXeHBt8yvGPBGVrr3wEOdJPYYZYg== + dependencies: + "@types/ndarray" "^1.0.11" + ndarray "^1.0.19" + +ndarray-ops@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/ndarray-ops/-/ndarray-ops-1.2.2.tgz#59e88d2c32a7eebcb1bc690fae141579557a614e" + integrity sha512-BppWAFRjMYF7N/r6Ie51q6D4fs0iiGmeXIACKY66fLpnwIui3Wc3CXiD/30mgLbDjPpSLrsqcp3Z62+IcHZsDw== + dependencies: + cwise-compiler "^1.0.0" + +ndarray-pixels@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/ndarray-pixels/-/ndarray-pixels-3.0.4.tgz#77fdc866c5bf19db7ed433130673ace3e5be56c1" + integrity sha512-CMDl8XqJB4YWcRJ1h7ogfxCNUQtnh9HbppIh/QYSwt6wyJvX3zs+ZnLCa8TyLUHWdDfc0Qy6Wev1SGdHYyK84Q== + dependencies: + "@types/ndarray" "^1.0.11" + ndarray "^1.0.19" + ndarray-ops "^1.2.2" + sharp "^0.32.1" + +ndarray@^1.0.19: + version "1.0.19" + resolved "https://registry.yarnpkg.com/ndarray/-/ndarray-1.0.19.tgz#6785b5f5dfa58b83e31ae5b2a058cfd1ab3f694e" + integrity sha512-B4JHA4vdyZU30ELBw3g7/p9bZupyew5a7tX1Y/gGeF2hafrPaQZhgrGQfsvgfYbgdFZjYwuEcnaobeM/WMW+HQ== + dependencies: + iota-array "^1.0.0" + is-buffer "^1.0.2" + +node-abi@^3.3.0: + version "3.51.0" + resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.51.0.tgz#970bf595ef5a26a271307f8a4befa02823d4e87d" + integrity sha512-SQkEP4hmNWjlniS5zdnfIXTk1x7Ome85RDzHlTbBtzE97Gfwz/Ipw4v/Ryk20DWIy3yCNVLVlGKApCnmvYoJbA== + dependencies: + semver "^7.3.5" + +node-addon-api@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-6.1.0.tgz#ac8470034e58e67d0c6f1204a18ae6995d9c0d76" + integrity sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA== + node-expat@^2.3.18: version "2.4.0" resolved "https://registry.yarnpkg.com/node-expat/-/node-expat-2.4.0.tgz#0d51626808b5912cf990b24b41244cfea14ee96b" @@ -328,13 +1085,43 @@ node-expat@^2.3.18: bindings "^1.5.0" nan "^2.13.2" -once@^1.3.0: +node-stream-zip@^1.15.0: + version "1.15.0" + resolved "https://registry.yarnpkg.com/node-stream-zip/-/node-stream-zip-1.15.0.tgz#158adb88ed8004c6c49a396b50a6a5de3bca33ea" + integrity sha512-LN4fydt9TqhZhThkZIVQnF9cwjU3qmUH9h78Mx/K7d3VvfRqqwthLwJEUOEL0QPZ0XQmNN7be5Ggit5+4dq3Bw== + +normalize-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +nosleep.js@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/nosleep.js/-/nosleep.js-0.12.0.tgz#a01fddab2c13af357d673928b1f40a9013a4dc08" + integrity sha512-9d1HbpKLh3sdWlhXMhU6MMH+wQzKkrgfRkYV0EBdvt99YJfj0ilCJrWRDYG2130Tm4GXbEoTCx5b34JSaP+HhA== + +object-hash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-3.0.0.tgz#73f97f753e7baffc0e2cc9d6e079079744ac82e9" + integrity sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw== + +on-exit-leak-free@^2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/on-exit-leak-free/-/on-exit-leak-free-2.1.2.tgz#fed195c9ebddb7d9e4c3842f93f281ac8dadd3b8" + integrity sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA== + +once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= dependencies: wrappy "1" +pako@^2.0.4: + version "2.1.0" + resolved "https://registry.yarnpkg.com/pako/-/pako-2.1.0.tgz#266cc37f98c7d883545d11335c00fbd4062c9a86" + integrity sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug== + papaparse@^5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/papaparse/-/papaparse-5.3.0.tgz#ab1702feb96e79ab4309652f36db9536563ad05a" @@ -350,16 +1137,212 @@ path-parse@^1.0.6: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== +pino-abstract-transport@^1.0.0, pino-abstract-transport@v1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/pino-abstract-transport/-/pino-abstract-transport-1.1.0.tgz#083d98f966262164504afb989bccd05f665937a8" + integrity sha512-lsleG3/2a/JIWUtf9Q5gUNErBqwIu1tUKTT3dUzaf5DySw9ra1wcqKjJjLX1VTY64Wk1eEOYsVGSaGfCK85ekA== + dependencies: + readable-stream "^4.0.0" + split2 "^4.0.0" + +pino-pretty@^10.2.0: + version "10.2.3" + resolved "https://registry.yarnpkg.com/pino-pretty/-/pino-pretty-10.2.3.tgz#db539c796a1421fd4d130734fa994f5a26027783" + integrity sha512-4jfIUc8TC1GPUfDyMSlW1STeORqkoxec71yhxIpLDQapUu8WOuoz2TTCoidrIssyz78LZC69whBMPIKCMbi3cw== + dependencies: + colorette "^2.0.7" + dateformat "^4.6.3" + fast-copy "^3.0.0" + fast-safe-stringify "^2.1.1" + help-me "^4.0.1" + joycon "^3.1.1" + minimist "^1.2.6" + on-exit-leak-free "^2.1.0" + pino-abstract-transport "^1.0.0" + pump "^3.0.0" + readable-stream "^4.0.0" + secure-json-parse "^2.4.0" + sonic-boom "^3.0.0" + strip-json-comments "^3.1.1" + +pino-std-serializers@^6.0.0: + version "6.2.2" + resolved "https://registry.yarnpkg.com/pino-std-serializers/-/pino-std-serializers-6.2.2.tgz#d9a9b5f2b9a402486a5fc4db0a737570a860aab3" + integrity sha512-cHjPPsE+vhj/tnhCy/wiMh3M3z3h/j15zHQX+S9GkTBgqJuTuJzYJ4gUyACLhDaJ7kk9ba9iRDmbH2tJU03OiA== + +pino@^8.15.0: + version "8.16.2" + resolved "https://registry.yarnpkg.com/pino/-/pino-8.16.2.tgz#7a906f2d9a8c5b4c57412c9ca95d6820bd2090cd" + integrity sha512-2advCDGVEvkKu9TTVSa/kWW7Z3htI/sBKEZpqiHk6ive0i/7f5b1rsU8jn0aimxqfnSz5bj/nOYkwhBUn5xxvg== + dependencies: + atomic-sleep "^1.0.0" + fast-redact "^3.1.1" + on-exit-leak-free "^2.1.0" + pino-abstract-transport v1.1.0 + pino-std-serializers "^6.0.0" + process-warning "^2.0.0" + quick-format-unescaped "^4.0.3" + real-require "^0.2.0" + safe-stable-stringify "^2.3.1" + sonic-boom "^3.7.0" + thread-stream "^2.0.0" + +prebuild-install@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-7.1.1.tgz#de97d5b34a70a0c81334fd24641f2a1702352e45" + integrity sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw== + dependencies: + detect-libc "^2.0.0" + expand-template "^2.0.3" + github-from-package "0.0.0" + minimist "^1.2.3" + mkdirp-classic "^0.5.3" + napi-build-utils "^1.0.1" + node-abi "^3.3.0" + pump "^3.0.0" + rc "^1.2.7" + simple-get "^4.0.0" + tar-fs "^2.0.0" + tunnel-agent "^0.6.0" + prettier@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5" integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q== +process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + +process-warning@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/process-warning/-/process-warning-2.3.0.tgz#02ccba12fd55c05879cb7ddab31b6a20af2fe4d9" + integrity sha512-N6mp1+2jpQr3oCFMz6SeHRGbv6Slb20bRhj4v3xR99HqNToAcOe1MFOp4tytyzOfJn+QtN8Rf7U/h2KAn4kC6g== + +process@^0.11.10: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== + +property-graph@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/property-graph/-/property-graph-1.3.1.tgz#25fb2c8040ba9b15f04cda90a443f3f844505293" + integrity sha512-gei3N/bHWJdCItJ4blnlGWd9iauEZI+JZYj/A0D177XSI01+QhiJGAVscYBhe3Yywow3A2QJzVtsO2P+UgrRRQ== + +protobufjs@^7.1.0: + version "7.2.5" + resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.2.5.tgz#45d5c57387a6d29a17aab6846dcc283f9b8e7f2d" + integrity sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A== + dependencies: + "@protobufjs/aspromise" "^1.1.2" + "@protobufjs/base64" "^1.1.2" + "@protobufjs/codegen" "^2.0.4" + "@protobufjs/eventemitter" "^1.1.0" + "@protobufjs/fetch" "^1.1.0" + "@protobufjs/float" "^1.0.2" + "@protobufjs/inquire" "^1.1.0" + "@protobufjs/path" "^1.1.2" + "@protobufjs/pool" "^1.1.0" + "@protobufjs/utf8" "^1.1.0" + "@types/node" ">=13.7.0" + long "^5.0.0" + +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + punycode@2.x.x: version "2.1.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== +queue-tick@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/queue-tick/-/queue-tick-1.0.1.tgz#f6f07ac82c1fd60f82e098b417a80e52f1f4c142" + integrity sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag== + +quick-format-unescaped@^4.0.3: + version "4.0.4" + resolved "https://registry.yarnpkg.com/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz#93ef6dd8d3453cbc7970dd614fad4c5954d6b5a7" + integrity sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg== + +quickselect@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/quickselect/-/quickselect-2.0.0.tgz#f19680a486a5eefb581303e023e98faaf25dd018" + integrity sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw== + +rbush@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/rbush/-/rbush-3.0.1.tgz#5fafa8a79b3b9afdfe5008403a720cc1de882ecf" + integrity sha512-XRaVO0YecOpEuIvbhbpTrZgoiI6xBlz6hnlr6EHhd+0x9ase6EmeN+hdwwUaJvLcsFFQ8iWVF1GAK1yB0BWi0w== + dependencies: + quickselect "^2.0.0" + +rc@^1.2.7: + version "1.2.8" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== + dependencies: + deep-extend "^0.6.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +readable-stream@^2.0.0, readable-stream@^2.0.5: + version "2.3.8" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" + integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0: + version "3.6.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" + integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +readable-stream@^4.0.0: + version "4.4.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-4.4.2.tgz#e6aced27ad3b9d726d8308515b9a1b98dc1b9d13" + integrity sha512-Lk/fICSyIhodxy1IDK2HazkeGjSmezAWX2egdtJnYhtzKEsBPJowlI6F6LPb5tqIQILrMbx22S5o3GuJavPusA== + dependencies: + abort-controller "^3.0.0" + buffer "^6.0.3" + events "^3.3.0" + process "^0.11.10" + string_decoder "^1.3.0" + +readdir-glob@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/readdir-glob/-/readdir-glob-1.1.3.tgz#c3d831f51f5e7bfa62fa2ffbe4b508c640f09584" + integrity sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA== + dependencies: + minimatch "^5.1.0" + +real-require@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/real-require/-/real-require-0.2.0.tgz#209632dea1810be2ae063a6ac084fee7e33fba78" + integrity sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg== + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + resolve@^1.3.2: version "1.19.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" @@ -368,29 +1351,143 @@ resolve@^1.3.2: is-core-module "^2.1.0" path-parse "^1.0.6" +safe-buffer@^5.0.1, safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +safe-stable-stringify@^2.3.1: + version "2.4.3" + resolved "https://registry.yarnpkg.com/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz#138c84b6f6edb3db5f8ef3ef7115b8f55ccbf886" + integrity sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g== + +secure-json-parse@^2.4.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/secure-json-parse/-/secure-json-parse-2.7.0.tgz#5a5f9cd6ae47df23dba3151edd06855d47e09862" + integrity sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw== + +seedrandom@^3.0.5: + version "3.0.5" + resolved "https://registry.yarnpkg.com/seedrandom/-/seedrandom-3.0.5.tgz#54edc85c95222525b0c7a6f6b3543d8e0b3aa0a7" + integrity sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg== + semver@^5.3.0: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== -source-map-support@^0.5.17: - version "0.5.19" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" - integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== +semver@^7.3.5, semver@^7.5.4: + version "7.5.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" + integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== + dependencies: + lru-cache "^6.0.0" + +sharp@^0.32.1: + version "0.32.6" + resolved "https://registry.yarnpkg.com/sharp/-/sharp-0.32.6.tgz#6ad30c0b7cd910df65d5f355f774aa4fce45732a" + integrity sha512-KyLTWwgcR9Oe4d9HwCwNM2l7+J0dUQwn/yf7S0EnTtb0eVS4RxO0eUSvxPtzT4F3SY+C4K6fqdv/DO27sJ/v/w== + dependencies: + color "^4.2.3" + detect-libc "^2.0.2" + node-addon-api "^6.1.0" + prebuild-install "^7.1.1" + semver "^7.5.4" + simple-get "^4.0.1" + tar-fs "^3.0.4" + tunnel-agent "^0.6.0" + +simple-concat@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" + integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== + +simple-get@^4.0.0, simple-get@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-4.0.1.tgz#4a39db549287c979d352112fa03fd99fd6bc3543" + integrity sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA== + dependencies: + decompress-response "^6.0.0" + once "^1.3.1" + simple-concat "^1.0.0" + +simple-swizzle@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a" + integrity sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg== + dependencies: + is-arrayish "^0.3.1" + +sonic-boom@^3.0.0, sonic-boom@^3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/sonic-boom/-/sonic-boom-3.7.0.tgz#b4b7b8049a912986f4a92c51d4660b721b11f2f2" + integrity sha512-IudtNvSqA/ObjN97tfgNmOKyDOs4dNcg4cUUsHDebqsgb8wGBBwb31LIgShNO8fye0dFI52X1+tFoKKI6Rq1Gg== dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" + atomic-sleep "^1.0.0" -source-map@^0.6.0: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== +split2@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/split2/-/split2-4.2.0.tgz#c9c5920904d148bab0b9f67145f245a86aadbfa4" + integrity sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg== sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= +streamx@^2.15.0: + version "2.15.5" + resolved "https://registry.yarnpkg.com/streamx/-/streamx-2.15.5.tgz#87bcef4dc7f0b883f9359671203344a4e004c7f1" + integrity sha512-9thPGMkKC2GctCzyCUjME3yR03x2xNo0GPKGkRw2UMYN+gqWa9uqpyNWhmsNCutU5zHmkUum0LsCRQTXUgUCAg== + dependencies: + fast-fifo "^1.1.0" + queue-tick "^1.0.1" + +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string_decoder@^1.1.1, string_decoder@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-json-comments@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== + supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -398,6 +1495,52 @@ supports-color@^5.3.0: dependencies: has-flag "^3.0.0" +tar-fs@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.1.tgz#489a15ab85f1f0befabb370b7de4f9eb5cbe8784" + integrity sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng== + dependencies: + chownr "^1.1.1" + mkdirp-classic "^0.5.2" + pump "^3.0.0" + tar-stream "^2.1.4" + +tar-fs@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-3.0.4.tgz#a21dc60a2d5d9f55e0089ccd78124f1d3771dbbf" + integrity sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w== + dependencies: + mkdirp-classic "^0.5.2" + pump "^3.0.0" + tar-stream "^3.1.5" + +tar-stream@^2.1.4, tar-stream@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287" + integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ== + dependencies: + bl "^4.0.3" + end-of-stream "^1.4.1" + fs-constants "^1.0.0" + inherits "^2.0.3" + readable-stream "^3.1.1" + +tar-stream@^3.1.5: + version "3.1.6" + resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-3.1.6.tgz#6520607b55a06f4a2e2e04db360ba7d338cc5bab" + integrity sha512-B/UyjYwPpMBv+PaFSWAmtYjwdrlEaZQEhMIBFNC5oEG8lpiW8XjcSdmEaClj28ArfKScKHs2nshz3k2le6crsg== + dependencies: + b4a "^1.6.4" + fast-fifo "^1.2.0" + streamx "^2.15.0" + +thread-stream@^2.0.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/thread-stream/-/thread-stream-2.4.1.tgz#6d588b14f0546e59d3f306614f044bc01ce43351" + integrity sha512-d/Ex2iWd1whipbT681JmTINKw0ZwOUBZm7+Gjs64DHuX34mmw8vJL2bFAaNacaW72zYiTJxSHi5abUuOi5nsfg== + dependencies: + real-require "^0.2.0" + topo@3.x.x: version "3.0.3" resolved "https://registry.yarnpkg.com/topo/-/topo-3.0.3.tgz#d5a67fb2e69307ebeeb08402ec2a2a6f5f7ad95c" @@ -405,23 +1548,23 @@ topo@3.x.x: dependencies: hoek "6.x.x" -ts-node@^9.1.1: - version "9.1.1" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-9.1.1.tgz#51a9a450a3e959401bda5f004a72d54b936d376d" - integrity sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg== +topojson-client@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/topojson-client/-/topojson-client-3.1.0.tgz#22e8b1ed08a2b922feeb4af6f53b6ef09a467b99" + integrity sha512-605uxS6bcYxGXw9qi62XyrV6Q3xwbndjachmNxu8HWTtVPxZfEJN9fd/SZS1Q54Sn2y0TMyMxFj/cJINqGHrKw== dependencies: - arg "^4.1.0" - create-require "^1.1.0" - diff "^4.0.1" - make-error "^1.1.1" - source-map-support "^0.5.17" - yn "3.1.1" + commander "2" tslib@^1.13.0, tslib@^1.8.1: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== +tslib@^2.3.0: + version "2.6.2" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" + integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== + tslint@^6.1.3: version "6.1.3" resolved "https://registry.yarnpkg.com/tslint/-/tslint-6.1.3.tgz#5c23b2eccc32487d5523bd3a470e9aa31789d904" @@ -448,10 +1591,27 @@ tsutils@^2.29.0: dependencies: tslib "^1.8.1" -typescript@^4.1.3: - version "4.1.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.3.tgz#519d582bd94cba0cf8934c7d8e8467e473f53bb7" - integrity sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg== +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w== + dependencies: + safe-buffer "^5.0.1" + +typescript@^5.2.2: + version "5.2.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78" + integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w== + +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== + +uniq@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" + integrity sha512-Gw+zz50YNKPDKXs+9d+aKAjVwpjNwqzvNpLigIruT4HA9lMZNdMqs9x07kKHB/L9WRzqp4+DlTU5s4wG2esdoA== universalify@^1.0.0: version "1.0.0" @@ -463,6 +1623,25 @@ universalify@^2.0.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== +urijs@^1.19.7: + version "1.19.11" + resolved "https://registry.yarnpkg.com/urijs/-/urijs-1.19.11.tgz#204b0d6b605ae80bea54bea39280cdb7c9f923cc" + integrity sha512-HXgFDgDommxn5/bIv0cnQZsPhHDA90NPHD6+c/v21U5+Sx5hoP8+dP9IZXBU1gIfvdRfhG8cel9QNPeionfcCQ== + +util-deprecate@^1.0.1, util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -477,7 +1656,39 @@ xml2json@^0.12.0: joi "^13.1.2" node-expat "^2.3.18" -yn@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" - integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yargs-parser@^21.1.1: + version "21.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== + +yargs@^17.2.1, yargs@^17.5.1: + version "17.7.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" + +zip-stream@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/zip-stream/-/zip-stream-4.1.1.tgz#1337fe974dbaffd2fa9a1ba09662a66932bd7135" + integrity sha512-9qv4rlDiopXg4E69k+vMHjNN63YFMe9sZMrdlvKnCjlCRWeCBswPPMPUfx+ipsAWq1LXHe70RcbaHdJJpS6hyQ== + dependencies: + archiver-utils "^3.0.4" + compress-commons "^4.1.2" + readable-stream "^3.6.0"