@loaders.gl/core 5.0.0-beta.7 → 5.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/GEOARROW-README.md +6 -0
- package/SCAN-README.md +2 -2
- package/SCHEMA-UTILS-README.md +1 -1
- package/dist/arrow-geometry/binary-features.cjs +4 -1
- package/dist/arrow-geometry/binary-features.cjs.map +2 -2
- package/dist/arrow-geometry/binary-features.d.ts.map +1 -1
- package/dist/arrow-geometry/binary-features.js +1 -1
- package/dist/arrow-geometry/binary-features.js.map +1 -1
- package/dist/arrow-geometry/binary-geometry-to-wkb.cjs +2 -2
- package/dist/arrow-geometry/binary-geometry-to-wkb.cjs.map +2 -2
- package/dist/arrow-geometry/binary-geometry-to-wkb.js +1 -1
- package/dist/arrow-geometry/binary-geometry-to-wkb.js.map +1 -1
- package/dist/arrow-geometry/feature-collection-to-arrow.cjs.map +2 -2
- package/dist/arrow-geometry/feature-collection-to-arrow.d.ts +4 -3
- package/dist/arrow-geometry/feature-collection-to-arrow.d.ts.map +1 -1
- package/dist/arrow-geometry/feature-collection-to-arrow.js +1 -1
- package/dist/arrow-geometry/feature-collection-to-arrow.js.map +1 -1
- package/dist/arrow-geometry/feature-table.cjs +2 -6
- package/dist/arrow-geometry/feature-table.cjs.map +2 -2
- package/dist/arrow-geometry/feature-table.d.ts +6 -5
- package/dist/arrow-geometry/feature-table.d.ts.map +1 -1
- package/dist/arrow-geometry/feature-table.js +5 -9
- package/dist/arrow-geometry/feature-table.js.map +1 -1
- package/dist/arrow-geometry/geojson-table.cjs +295 -18
- package/dist/arrow-geometry/geojson-table.cjs.map +4 -4
- package/dist/arrow-geometry/geojson-table.d.ts +10 -3
- package/dist/arrow-geometry/geojson-table.d.ts.map +1 -1
- package/dist/arrow-geometry/geojson-table.js +23 -13
- package/dist/arrow-geometry/geojson-table.js.map +1 -1
- package/dist/arrow-geometry/geometry-codecs.cjs +6 -6
- package/dist/arrow-geometry/geometry-codecs.cjs.map +2 -2
- package/dist/arrow-geometry/geometry-codecs.js +1 -1
- package/dist/arrow-geometry/geometry-codecs.js.map +1 -1
- package/dist/arrow-geometry/geometry-to-wkt.cjs +2 -2
- package/dist/arrow-geometry/geometry-to-wkt.cjs.map +2 -2
- package/dist/arrow-geometry/geometry-to-wkt.js +1 -1
- package/dist/arrow-geometry/geometry-to-wkt.js.map +1 -1
- package/dist/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.cjs +3 -1
- package/dist/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.cjs.map +2 -2
- package/dist/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.js +3 -1
- package/dist/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.js.map +1 -1
- package/dist/arrow-geometry/wkb-arrow-utils.cjs +1 -5
- package/dist/arrow-geometry/wkb-arrow-utils.cjs.map +2 -2
- package/dist/arrow-geometry/wkb-arrow-utils.d.ts +7 -7
- package/dist/arrow-geometry/wkb-arrow-utils.d.ts.map +1 -1
- package/dist/arrow-geometry/wkb-arrow-utils.js +4 -8
- package/dist/arrow-geometry/wkb-arrow-utils.js.map +1 -1
- package/dist/arrow-geometry/wkb-builder.cjs +3 -3
- package/dist/arrow-geometry/wkb-builder.cjs.map +2 -2
- package/dist/arrow-geometry/wkb-builder.d.ts +1 -1
- package/dist/arrow-geometry/wkb-builder.d.ts.map +1 -1
- package/dist/arrow-geometry/wkb-builder.js +1 -1
- package/dist/arrow-geometry/wkb-builder.js.map +1 -1
- package/dist/arrow-geometry/wkb-statistics.cjs +2 -2
- package/dist/arrow-geometry/wkb-statistics.cjs.map +2 -2
- package/dist/arrow-geometry/wkb-statistics.js +1 -1
- package/dist/arrow-geometry/wkb-statistics.js.map +1 -1
- package/dist/arrow-worker-transport.cjs +59 -35
- package/dist/arrow-worker-transport.cjs.map +1 -1
- package/dist/arrow-worker-transport.d.ts +9 -7
- package/dist/arrow-worker-transport.d.ts.map +1 -1
- package/dist/arrow-worker-transport.js +59 -42
- package/dist/arrow-worker-transport.js.map +1 -1
- package/dist/cluster-source.cjs +274 -509
- package/dist/cluster-source.cjs.map +3 -3
- package/dist/dist.dev.js +478 -450
- package/dist/dist.min.js +3 -3
- package/dist/federated-table-scan-source.cjs +121 -485
- package/dist/federated-table-scan-source.cjs.map +3 -3
- package/dist/geoarrow/binary-polygon-to-geoarrow.cjs +2 -2
- package/dist/geoarrow/binary-polygon-to-geoarrow.cjs.map +2 -2
- package/dist/geoarrow/binary-polygon-to-geoarrow.d.ts +1 -1
- package/dist/geoarrow/binary-polygon-to-geoarrow.d.ts.map +1 -1
- package/dist/geoarrow/binary-polygon-to-geoarrow.js +1 -1
- package/dist/geoarrow/binary-polygon-to-geoarrow.js.map +1 -1
- package/dist/geoarrow/clustering/cluster-source.cjs +16 -19
- package/dist/geoarrow/clustering/cluster-source.cjs.map +2 -2
- package/dist/geoarrow/clustering/cluster-source.d.ts +3 -2
- package/dist/geoarrow/clustering/cluster-source.d.ts.map +1 -1
- package/dist/geoarrow/clustering/cluster-source.js +13 -18
- package/dist/geoarrow/clustering/cluster-source.js.map +1 -1
- package/dist/geoarrow/convert-table-to-geoarrow.cjs +5 -12
- package/dist/geoarrow/convert-table-to-geoarrow.cjs.map +2 -2
- package/dist/geoarrow/convert-table-to-geoarrow.d.ts +6 -6
- package/dist/geoarrow/convert-table-to-geoarrow.d.ts.map +1 -1
- package/dist/geoarrow/convert-table-to-geoarrow.js +8 -14
- package/dist/geoarrow/convert-table-to-geoarrow.js.map +1 -1
- package/dist/geoarrow/geo-column/geo-column.cjs.map +1 -1
- package/dist/geoarrow/geo-column/geo-column.d.ts +1 -1
- package/dist/geoarrow/geo-column/geo-column.d.ts.map +1 -1
- package/dist/geoarrow/geoarrow-bounds.cjs +7 -7
- package/dist/geoarrow/geoarrow-bounds.cjs.map +3 -3
- package/dist/geoarrow/geoarrow-bounds.js +3 -3
- package/dist/geoarrow/geoarrow-bounds.js.map +1 -1
- package/dist/geoarrow/geoarrow-capabilities.cjs +2 -2
- package/dist/geoarrow/geoarrow-capabilities.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-capabilities.js +1 -1
- package/dist/geoarrow/geoarrow-capabilities.js.map +1 -1
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.cjs +13 -15
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.cjs.map +3 -3
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.d.ts.map +1 -1
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.js +8 -11
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.js.map +1 -1
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.cjs +6 -4
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.d.ts +3 -3
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.d.ts.map +1 -1
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.js +9 -4
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.js.map +1 -1
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.cjs +5 -4
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.d.ts +3 -3
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.d.ts.map +1 -1
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.js +5 -4
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.js.map +1 -1
- package/dist/geoarrow/geoarrow-inspection.cjs +2 -2
- package/dist/geoarrow/geoarrow-inspection.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-inspection.js +1 -1
- package/dist/geoarrow/geoarrow-inspection.js.map +1 -1
- package/dist/geoarrow/geoarrow-stream.cjs +10 -11
- package/dist/geoarrow/geoarrow-stream.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-stream.d.ts +2 -2
- package/dist/geoarrow/geoarrow-stream.d.ts.map +1 -1
- package/dist/geoarrow/geoarrow-stream.js +9 -12
- package/dist/geoarrow/geoarrow-stream.js.map +1 -1
- package/dist/geoarrow/get-geoarrow-vertex-count.cjs +2 -2
- package/dist/geoarrow/get-geoarrow-vertex-count.cjs.map +2 -2
- package/dist/geoarrow/get-geoarrow-vertex-count.js +1 -1
- package/dist/geoarrow/get-geoarrow-vertex-count.js.map +1 -1
- package/dist/geoarrow/index.cjs +0 -3
- package/dist/geoarrow/index.cjs.map +2 -2
- package/dist/geoarrow/index.d.ts +0 -2
- package/dist/geoarrow/index.d.ts.map +1 -1
- package/dist/geoarrow/index.js +0 -1
- package/dist/geoarrow/index.js.map +1 -1
- package/dist/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.cjs.map +1 -1
- package/dist/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.js +3 -3
- package/dist/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.js.map +1 -1
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.cjs +8 -9
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.cjs.map +2 -2
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.d.ts.map +1 -1
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.js +5 -9
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.js.map +1 -1
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.cjs +2 -2
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.cjs.map +2 -2
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.d.ts +1 -1
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.d.ts.map +1 -1
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.js +1 -1
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.js.map +1 -1
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.cjs +4 -4
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.cjs.map +2 -2
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.js +1 -1
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.js.map +1 -1
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.cjs +3 -3
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.cjs.map +2 -2
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.js +1 -1
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.js.map +1 -1
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.cjs +3 -3
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.cjs.map +2 -2
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.js +1 -1
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.js.map +1 -1
- package/dist/geoarrow/lib/kernels/geoarrow-union.cjs +2 -2
- package/dist/geoarrow/lib/kernels/geoarrow-union.cjs.map +2 -2
- package/dist/geoarrow/lib/kernels/geoarrow-union.d.ts +1 -1
- package/dist/geoarrow/lib/kernels/geoarrow-union.d.ts.map +1 -1
- package/dist/geoarrow/lib/kernels/geoarrow-union.js +1 -1
- package/dist/geoarrow/lib/kernels/geoarrow-union.js.map +1 -1
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.cjs +0 -6
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.cjs.map +2 -2
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.d.ts +5 -3
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.d.ts.map +1 -1
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.js +0 -6
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.js.map +1 -1
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.cjs +3 -2
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.cjs.map +2 -2
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.d.ts +1 -1
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.d.ts.map +1 -1
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.js +3 -2
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.js.map +1 -1
- package/dist/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.cjs.map +1 -1
- package/dist/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.d.ts +1 -1
- package/dist/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.d.ts.map +1 -1
- package/dist/geoarrow/mesharrow/get-deck-binary-data.cjs.map +1 -1
- package/dist/geoarrow/mesharrow/get-deck-binary-data.d.ts +1 -1
- package/dist/geoarrow/mesharrow/get-deck-binary-data.d.ts.map +1 -1
- package/dist/geoarrow/mesharrow/mesh-accessors.cjs.map +1 -1
- package/dist/geoarrow/mesharrow/mesh-accessors.d.ts +1 -1
- package/dist/geoarrow/mesharrow/mesh-accessors.d.ts.map +1 -1
- package/dist/geoarrow/metadata/geoarrow-metadata.cjs +44 -2
- package/dist/geoarrow/metadata/geoarrow-metadata.cjs.map +4 -4
- package/dist/geoarrow/metadata/geoarrow-metadata.d.ts.map +1 -1
- package/dist/geoarrow/metadata/geoarrow-metadata.js +3 -4
- package/dist/geoarrow/metadata/geoarrow-metadata.js.map +1 -1
- package/dist/index.cjs +486 -410
- package/dist/index.cjs.map +3 -3
- package/dist/index.d.ts +2 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -5
- package/dist/index.js.map +1 -1
- package/dist/lib/api/create-data-source.d.ts +20 -9
- package/dist/lib/api/create-data-source.d.ts.map +1 -1
- package/dist/lib/api/create-data-source.js +55 -45
- package/dist/lib/api/create-data-source.js.map +1 -1
- package/dist/lib/api/encode.d.ts +1 -1
- package/dist/lib/api/encode.d.ts.map +1 -1
- package/dist/lib/api/encode.js +11 -2
- package/dist/lib/api/encode.js.map +1 -1
- package/dist/lib/api/load-in-batches.d.ts +3 -2
- package/dist/lib/api/load-in-batches.d.ts.map +1 -1
- package/dist/lib/api/load-in-batches.js.map +1 -1
- package/dist/lib/api/load-loader.d.ts +3 -3
- package/dist/lib/api/load-loader.d.ts.map +1 -1
- package/dist/lib/api/load-loader.js +15 -19
- package/dist/lib/api/load-loader.js.map +1 -1
- package/dist/lib/api/load.d.ts +7 -3
- package/dist/lib/api/load.d.ts.map +1 -1
- package/dist/lib/api/load.js +15 -67
- package/dist/lib/api/load.js.map +1 -1
- package/dist/lib/api/loader-options.d.ts +6 -0
- package/dist/lib/api/loader-options.d.ts.map +1 -1
- package/dist/lib/api/loader-options.js +48 -0
- package/dist/lib/api/loader-options.js.map +1 -1
- package/dist/lib/api/parse-file.d.ts +5 -3
- package/dist/lib/api/parse-file.d.ts.map +1 -1
- package/dist/lib/api/parse-file.js +8 -6
- package/dist/lib/api/parse-file.js.map +1 -1
- package/dist/lib/api/parse-in-batches.d.ts +5 -3
- package/dist/lib/api/parse-in-batches.d.ts.map +1 -1
- package/dist/lib/api/parse-in-batches.js +60 -9
- package/dist/lib/api/parse-in-batches.js.map +1 -1
- package/dist/lib/api/parse-sync.d.ts +5 -3
- package/dist/lib/api/parse-sync.d.ts.map +1 -1
- package/dist/lib/api/parse-sync.js +3 -4
- package/dist/lib/api/parse-sync.js.map +1 -1
- package/dist/lib/api/parse.d.ts +5 -3
- package/dist/lib/api/parse.d.ts.map +1 -1
- package/dist/lib/api/parse.js +22 -14
- package/dist/lib/api/parse.js.map +1 -1
- package/dist/lib/api/select-loader.d.ts +4 -2
- package/dist/lib/api/select-loader.d.ts.map +1 -1
- package/dist/lib/api/select-loader.js +47 -53
- package/dist/lib/api/select-loader.js.map +1 -1
- package/dist/lib/api/select-source.d.ts.map +1 -1
- package/dist/lib/api/select-source.js +1 -1
- package/dist/lib/api/select-source.js.map +1 -1
- package/dist/lib/init.js +1 -1
- package/dist/lib/init.js.map +1 -1
- package/dist/lib/loader-utils/get-fetch-function.js +2 -2
- package/dist/lib/loader-utils/get-fetch-function.js.map +1 -1
- package/dist/lib/loader-utils/loggers.d.ts +2 -37
- package/dist/lib/loader-utils/loggers.d.ts.map +1 -1
- package/dist/lib/loader-utils/loggers.js +2 -63
- package/dist/lib/loader-utils/loggers.js.map +1 -1
- package/dist/lib/loader-utils/native-arrow.d.ts +13 -0
- package/dist/lib/loader-utils/native-arrow.d.ts.map +1 -0
- package/dist/lib/loader-utils/native-arrow.js +66 -0
- package/dist/lib/loader-utils/native-arrow.js.map +1 -0
- package/dist/lib/loader-utils/option-defaults.d.ts +3 -2
- package/dist/lib/loader-utils/option-defaults.d.ts.map +1 -1
- package/dist/lib/loader-utils/option-defaults.js +9 -10
- package/dist/lib/loader-utils/option-defaults.js.map +1 -1
- package/dist/lib/loader-utils/option-utils.d.ts +0 -6
- package/dist/lib/loader-utils/option-utils.d.ts.map +1 -1
- package/dist/lib/loader-utils/option-utils.js +31 -114
- package/dist/lib/loader-utils/option-utils.js.map +1 -1
- package/dist/loader-utils/format-types.d.ts +3 -0
- package/dist/loader-utils/format-types.d.ts.map +1 -1
- package/dist/loader-utils/index.cjs +257 -88
- package/dist/loader-utils/index.cjs.map +3 -3
- package/dist/loader-utils/index.d.ts +9 -4
- package/dist/loader-utils/index.d.ts.map +1 -1
- package/dist/loader-utils/index.js +5 -3
- package/dist/loader-utils/index.js.map +1 -1
- package/dist/loader-utils/json-loader.js +1 -1
- package/dist/loader-utils/json-loader.js.map +1 -1
- package/dist/loader-utils/lib/log-utils/log.d.ts +23 -1
- package/dist/loader-utils/lib/log-utils/log.d.ts.map +1 -1
- package/dist/loader-utils/lib/log-utils/log.js +32 -1
- package/dist/loader-utils/lib/log-utils/log.js.map +1 -1
- package/dist/loader-utils/lib/pace-batch-iterator.d.ts +14 -0
- package/dist/loader-utils/lib/pace-batch-iterator.d.ts.map +1 -0
- package/dist/loader-utils/lib/pace-batch-iterator.js +51 -0
- package/dist/loader-utils/lib/pace-batch-iterator.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/request-credentials.js +1 -1
- package/dist/loader-utils/lib/request-utils/request-credentials.js.map +1 -1
- package/dist/loader-utils/lib/scan-utils/logical-table-query.d.ts +5 -0
- package/dist/loader-utils/lib/scan-utils/logical-table-query.d.ts.map +1 -1
- package/dist/loader-utils/lib/scan-utils/logical-table-query.js +13 -5
- package/dist/loader-utils/lib/scan-utils/logical-table-query.js.map +1 -1
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.d.ts +48 -3
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.d.ts.map +1 -1
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.js +12 -1
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.js.map +1 -1
- package/dist/loader-utils/lib/scan-utils/table-query.d.ts +22 -1
- package/dist/loader-utils/lib/scan-utils/table-query.d.ts.map +1 -1
- package/dist/loader-utils/lib/scan-utils/table-query.js +6 -0
- package/dist/loader-utils/lib/scan-utils/table-query.js.map +1 -1
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.d.ts +17 -11
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.d.ts.map +1 -1
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.js +53 -32
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.js.map +1 -1
- package/dist/loader-utils/lib/sources/data-source.d.ts.map +1 -1
- package/dist/loader-utils/lib/sources/data-source.js +3 -13
- package/dist/loader-utils/lib/sources/data-source.js.map +1 -1
- package/dist/loader-utils/lib/sources/image-source.d.ts +1 -1
- package/dist/loader-utils/lib/sources/table-source-collection.d.ts +2 -1
- package/dist/loader-utils/lib/sources/table-source-collection.d.ts.map +1 -1
- package/dist/loader-utils/lib/sources/tile-grid.d.ts +6 -1
- package/dist/loader-utils/lib/sources/tile-grid.d.ts.map +1 -1
- package/dist/loader-utils/lib/sources/tile-grid.js +32 -14
- package/dist/loader-utils/lib/sources/tile-grid.js.map +1 -1
- package/dist/loader-utils/lib/sources/utils/utils.js +1 -1
- package/dist/loader-utils/lib/sources/utils/utils.js.map +1 -1
- package/dist/loader-utils/lib/sources/vector-source.d.ts +4 -3
- package/dist/loader-utils/lib/sources/vector-source.d.ts.map +1 -1
- package/dist/loader-utils/lib/sources/vector-tile-source.d.ts +4 -3
- package/dist/loader-utils/lib/sources/vector-tile-source.d.ts.map +1 -1
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.d.ts.map +1 -1
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.js +26 -15
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.js.map +1 -1
- package/dist/loader-utils/loader-types.d.ts +114 -87
- package/dist/loader-utils/loader-types.d.ts.map +1 -1
- package/dist/loader-utils/loader-types.js.map +1 -1
- package/dist/loader-utils/source-types.d.ts +7 -5
- package/dist/loader-utils/source-types.d.ts.map +1 -1
- package/dist/loader-utils/source-types.js +9 -1
- package/dist/loader-utils/source-types.js.map +1 -1
- package/dist/loader-utils/tile-grid.cjs +21 -9
- package/dist/loader-utils/tile-grid.cjs.map +1 -1
- package/dist/null-loader.d.ts +0 -18
- package/dist/null-loader.d.ts.map +1 -1
- package/dist/null-loader.js +1 -19
- package/dist/null-loader.js.map +1 -1
- package/dist/null-worker-node.js +1 -1
- package/dist/null-worker.js +1 -1
- package/dist/polyfills/index.cjs +3 -2
- package/dist/polyfills/index.d.ts.map +1 -1
- package/dist/polyfills/index.js +2 -2
- package/dist/polyfills/index.js.map +1 -1
- package/dist/scan/arrow-execution/expressions.cjs +36 -12
- package/dist/scan/arrow-execution/expressions.cjs.map +3 -3
- package/dist/scan/arrow-execution/expressions.d.ts +7 -4
- package/dist/scan/arrow-execution/expressions.d.ts.map +1 -1
- package/dist/scan/arrow-execution/expressions.js +32 -6
- package/dist/scan/arrow-execution/expressions.js.map +1 -1
- package/dist/scan/arrow-execution/filter-arrow-table.cjs +3 -18
- package/dist/scan/arrow-execution/filter-arrow-table.cjs.map +2 -2
- package/dist/scan/arrow-execution/filter-arrow-table.d.ts.map +1 -1
- package/dist/scan/arrow-execution/filter-arrow-table.js +3 -9
- package/dist/scan/arrow-execution/filter-arrow-table.js.map +1 -1
- package/dist/scan/arrow-execution/portable-predicate-compatibility.cjs +41 -0
- package/dist/scan/arrow-execution/portable-predicate-compatibility.cjs.map +7 -0
- package/dist/scan/arrow-execution/portable-predicate-compatibility.d.ts +5 -0
- package/dist/scan/arrow-execution/portable-predicate-compatibility.d.ts.map +1 -0
- package/dist/scan/arrow-execution/portable-predicate-compatibility.js +23 -0
- package/dist/scan/arrow-execution/portable-predicate-compatibility.js.map +1 -0
- package/dist/scan/arrow-query-worker-entry.cjs +121 -0
- package/dist/scan/arrow-query-worker-entry.cjs.map +7 -0
- package/dist/scan/arrow-query-worker-entry.d.ts +2 -0
- package/dist/scan/arrow-query-worker-entry.d.ts.map +1 -0
- package/dist/scan/arrow-query-worker-entry.js +7 -0
- package/dist/scan/arrow-query-worker-entry.js.map +1 -0
- package/dist/scan/arrow-query-worker.cjs +197 -0
- package/dist/scan/arrow-query-worker.cjs.map +7 -0
- package/dist/scan/arrow-query-worker.d.ts +47 -0
- package/dist/scan/arrow-query-worker.d.ts.map +1 -0
- package/dist/scan/arrow-query-worker.js +101 -0
- package/dist/scan/arrow-query-worker.js.map +1 -0
- package/dist/scan/arrow-query.cjs +6 -2
- package/dist/scan/arrow-query.cjs.map +2 -2
- package/dist/scan/arrow-query.d.ts +3 -1
- package/dist/scan/arrow-query.d.ts.map +1 -1
- package/dist/scan/arrow-query.js +3 -1
- package/dist/scan/arrow-query.js.map +1 -1
- package/dist/scan/federated-table-scan-source.cjs +38 -39
- package/dist/scan/federated-table-scan-source.cjs.map +2 -2
- package/dist/scan/federated-table-scan-source.d.ts +5 -9
- package/dist/scan/federated-table-scan-source.d.ts.map +1 -1
- package/dist/scan/federated-table-scan-source.js +35 -36
- package/dist/scan/federated-table-scan-source.js.map +1 -1
- package/dist/scan/index.cjs +36 -12
- package/dist/scan/index.cjs.map +3 -3
- package/dist/scan/index.d.ts +11 -6
- package/dist/scan/index.d.ts.map +1 -1
- package/dist/scan/index.js +8 -5
- package/dist/scan/index.js.map +1 -1
- package/dist/scan/parse-sql-predicate.cjs +2 -2
- package/dist/scan/parse-sql-predicate.cjs.map +2 -2
- package/dist/scan/parse-sql-predicate.js +1 -1
- package/dist/scan/parse-sql-predicate.js.map +1 -1
- package/dist/scan/query-arrow-table-in-batches.cjs +60 -26
- package/dist/scan/query-arrow-table-in-batches.cjs.map +3 -3
- package/dist/scan/query-arrow-table-in-batches.d.ts +3 -3
- package/dist/scan/query-arrow-table-in-batches.d.ts.map +1 -1
- package/dist/scan/query-arrow-table-in-batches.js +52 -24
- package/dist/scan/query-arrow-table-in-batches.js.map +1 -1
- package/dist/{geoarrow/get-geoarrow-native-geometry.cjs → scan/query-arrow-table-math.cjs} +18 -8
- package/dist/scan/query-arrow-table-math.cjs.map +7 -0
- package/dist/scan/query-arrow-table-math.d.ts +5 -0
- package/dist/scan/query-arrow-table-math.d.ts.map +1 -0
- package/dist/scan/query-arrow-table-math.js +14 -0
- package/dist/scan/query-arrow-table-math.js.map +1 -0
- package/dist/scan/query-arrow-table.cjs +32 -62
- package/dist/scan/query-arrow-table.cjs.map +2 -2
- package/dist/scan/query-arrow-table.d.ts +13 -8
- package/dist/scan/query-arrow-table.d.ts.map +1 -1
- package/dist/scan/query-arrow-table.js +35 -67
- package/dist/scan/query-arrow-table.js.map +1 -1
- package/dist/scan/query-grouped-sql.cjs +66 -0
- package/dist/scan/query-grouped-sql.cjs.map +7 -0
- package/dist/scan/query-grouped-sql.d.ts +5 -0
- package/dist/scan/query-grouped-sql.d.ts.map +1 -0
- package/dist/scan/query-grouped-sql.js +58 -0
- package/dist/scan/query-grouped-sql.js.map +1 -0
- package/dist/scan/query-open-source.cjs +52 -0
- package/dist/scan/query-open-source.cjs.map +7 -0
- package/dist/scan/query-open-source.d.ts +4 -0
- package/dist/scan/query-open-source.d.ts.map +1 -0
- package/dist/scan/query-open-source.js +26 -0
- package/dist/scan/query-open-source.js.map +1 -0
- package/dist/scan/query-progressive.cjs +190 -0
- package/dist/scan/query-progressive.cjs.map +7 -0
- package/dist/scan/query-progressive.d.ts +41 -0
- package/dist/scan/query-progressive.d.ts.map +1 -0
- package/dist/scan/query-progressive.js +173 -0
- package/dist/scan/query-progressive.js.map +1 -0
- package/dist/scan/query-pushdown.cjs +140 -0
- package/dist/scan/query-pushdown.cjs.map +7 -0
- package/dist/scan/query-pushdown.d.ts +14 -0
- package/dist/scan/query-pushdown.d.ts.map +1 -0
- package/dist/scan/query-pushdown.js +133 -0
- package/dist/scan/query-pushdown.js.map +1 -0
- package/dist/scan/query-scales.cjs +195 -0
- package/dist/scan/query-scales.cjs.map +7 -0
- package/dist/scan/query-scales.d.ts +47 -0
- package/dist/scan/query-scales.d.ts.map +1 -0
- package/dist/scan/query-scales.js +201 -0
- package/dist/scan/query-scales.js.map +1 -0
- package/dist/scan/query.cjs +141 -92
- package/dist/scan/query.cjs.map +3 -3
- package/dist/scan/query.d.ts +37 -10
- package/dist/scan/query.d.ts.map +1 -1
- package/dist/scan/query.js +137 -96
- package/dist/scan/query.js.map +1 -1
- package/dist/scan/rows-to-arrow.cjs +1 -28
- package/dist/scan/rows-to-arrow.cjs.map +2 -2
- package/dist/scan/rows-to-arrow.d.ts +3 -3
- package/dist/scan/rows-to-arrow.d.ts.map +1 -1
- package/dist/scan/rows-to-arrow.js +2 -32
- package/dist/scan/rows-to-arrow.js.map +1 -1
- package/dist/scan/scan-engine.cjs +1 -1
- package/dist/scan/scan-engine.cjs.map +2 -2
- package/dist/scan/scan-engine.d.ts +5 -5
- package/dist/scan/scan-engine.d.ts.map +1 -1
- package/dist/scan/scan-engine.js +1 -1
- package/dist/scan/scan-engine.js.map +1 -1
- package/dist/scan/vector-table-scan-source.cjs +24 -17
- package/dist/scan/vector-table-scan-source.cjs.map +4 -4
- package/dist/scan/vector-table-scan-source.d.ts +8 -8
- package/dist/scan/vector-table-scan-source.d.ts.map +1 -1
- package/dist/scan/vector-table-scan-source.js +19 -17
- package/dist/scan/vector-table-scan-source.js.map +1 -1
- package/dist/schema/categories/category-mesh.d.ts +3 -10
- package/dist/schema/categories/category-mesh.d.ts.map +1 -1
- package/dist/schema/categories/category-mesh.js.map +1 -1
- package/dist/schema/categories/category-table.d.ts +2 -19
- package/dist/schema/categories/category-table.d.ts.map +1 -1
- package/dist/schema/float16.js +1 -1
- package/dist/schema/float16.js.map +1 -1
- package/dist/schema/geometry/arrow-binary-features.d.ts +1 -1
- package/dist/schema/geometry/arrow-binary-features.d.ts.map +1 -1
- package/dist/schema/geometry/geoarrow.d.ts +2 -2
- package/dist/schema/geometry/geoarrow.d.ts.map +1 -1
- package/dist/schema/index.cjs +14 -10
- package/dist/schema/index.cjs.map +2 -2
- package/dist/schema/index.d.ts +4 -4
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/index.js +2 -2
- package/dist/schema/index.js.map +1 -1
- package/dist/schema/types/batch.d.ts +0 -4
- package/dist/schema/types/batch.d.ts.map +1 -1
- package/dist/schema-utils/index.cjs +410 -626
- package/dist/schema-utils/index.cjs.map +3 -3
- package/dist/schema-utils/index.d.ts +6 -6
- package/dist/schema-utils/index.d.ts.map +1 -1
- package/dist/schema-utils/index.js +6 -5
- package/dist/schema-utils/index.js.map +1 -1
- package/dist/schema-utils/lib/arrow/arrow-metadata.d.ts +16 -0
- package/dist/schema-utils/lib/arrow/arrow-metadata.d.ts.map +1 -0
- package/dist/schema-utils/lib/arrow/arrow-metadata.js +109 -0
- package/dist/schema-utils/lib/arrow/arrow-metadata.js.map +1 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.d.ts +1 -1
- package/dist/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.d.ts.map +1 -1
- package/dist/schema-utils/lib/converters/convert.js +9 -2
- package/dist/schema-utils/lib/converters/convert.js.map +1 -1
- package/dist/schema-utils/lib/converters/types.d.ts +2 -0
- package/dist/schema-utils/lib/converters/types.d.ts.map +1 -1
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.d.ts +8 -12
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.js +8 -21
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.js.map +1 -1
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.d.ts +5 -4
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.d.ts.map +1 -1
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.js +18 -13
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.js.map +1 -1
- package/dist/schema-utils/lib/mesh/get-mesh-bounding-box.d.ts +14 -0
- package/dist/schema-utils/lib/mesh/get-mesh-bounding-box.d.ts.map +1 -0
- package/dist/schema-utils/lib/mesh/get-mesh-bounding-box.js +39 -0
- package/dist/schema-utils/lib/mesh/get-mesh-bounding-box.js.map +1 -0
- package/dist/schema-utils/lib/mesh/mesh-utils.d.ts +2 -14
- package/dist/schema-utils/lib/mesh/mesh-utils.d.ts.map +1 -1
- package/dist/schema-utils/lib/mesh/mesh-utils.js +1 -35
- package/dist/schema-utils/lib/mesh/mesh-utils.js.map +1 -1
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.d.ts.map +1 -1
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.js +6 -5
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.js.map +1 -1
- package/dist/schema-utils/lib/schema/data-type.js +1 -1
- package/dist/schema-utils/lib/schema/data-type.js.map +1 -1
- package/dist/schema-utils/lib/schema/deduce-table-schema.d.ts +2 -1
- package/dist/schema-utils/lib/schema/deduce-table-schema.d.ts.map +1 -1
- package/dist/schema-utils/lib/schema/deduce-table-schema.js +7 -3
- package/dist/schema-utils/lib/schema/deduce-table-schema.js.map +1 -1
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.d.ts +6 -5
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.js +6 -5
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.js.map +1 -1
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.d.ts +9 -9
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.js +13 -46
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.js.map +1 -1
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.d.ts +9 -20
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.js +61 -73
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.js.map +1 -1
- package/dist/schema-utils/lib/table/batches/convert-batches.d.ts +4 -3
- package/dist/schema-utils/lib/table/batches/convert-batches.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/batches/convert-batches.js +27 -9
- package/dist/schema-utils/lib/table/batches/convert-batches.js.map +1 -1
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.d.ts +6 -9
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.js +22 -15
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.js.map +1 -1
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.d.ts +4 -1
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.js +13 -9
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.js.map +1 -1
- package/dist/schema-utils/lib/table/query-arrow-table.d.ts +3 -3
- package/dist/schema-utils/lib/table/query-arrow-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/query-arrow-table.js +9 -23
- package/dist/schema-utils/lib/table/query-arrow-table.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.d.ts +9 -10
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.js +15 -76
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/convert-table.d.ts +6 -36
- package/dist/schema-utils/lib/table/tables/convert-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/convert-table.js +5 -42
- package/dist/schema-utils/lib/table/tables/convert-table.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/make-table.d.ts +3 -55
- package/dist/schema-utils/lib/table/tables/make-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/make-table.js +3 -59
- package/dist/schema-utils/lib/table/tables/make-table.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/row-utils.js +2 -2
- package/dist/schema-utils/lib/table/tables/row-utils.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-accessors.d.ts +18 -16
- package/dist/schema-utils/lib/table/tables/table-accessors.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-accessors.js +36 -39
- package/dist/schema-utils/lib/table/tables/table-accessors.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.d.ts +6 -5
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.js +2 -2
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.d.ts +1 -1
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.js +8 -5
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-types.d.ts +1 -3
- package/dist/schema-utils/lib/table/tables/table-types.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-types.js +0 -4
- package/dist/schema-utils/lib/table/tables/table-types.js.map +1 -1
- package/dist/vector-table-scan-source.cjs +241 -291
- package/dist/vector-table-scan-source.cjs.map +2 -2
- package/dist/wkt/index.cjs.map +1 -1
- package/dist/wkt/index.d.ts.map +1 -1
- package/dist/wkt/index.js.map +1 -1
- package/dist/worker-utils/index.cjs +51 -11
- package/dist/worker-utils/index.cjs.map +3 -3
- package/dist/worker-utils/lib/env-utils/version.js +1 -1
- package/dist/worker-utils/lib/env-utils/version.js.map +1 -1
- package/dist/worker-utils/lib/library-utils/library-utils.d.ts.map +1 -1
- package/dist/worker-utils/lib/library-utils/library-utils.js +2 -1
- package/dist/worker-utils/lib/library-utils/library-utils.js.map +1 -1
- package/dist/worker-utils/lib/npm-tag.d.ts.map +1 -1
- package/dist/worker-utils/lib/npm-tag.js.map +1 -1
- package/dist/worker-utils/lib/process-utils/child-process-proxy.d.ts.map +1 -1
- package/dist/worker-utils/lib/process-utils/child-process-proxy.js +8 -7
- package/dist/worker-utils/lib/process-utils/child-process-proxy.js.map +1 -1
- package/dist/worker-utils/lib/worker-api/get-worker-url.d.ts.map +1 -1
- package/dist/worker-utils/lib/worker-api/get-worker-url.js +5 -2
- package/dist/worker-utils/lib/worker-api/get-worker-url.js.map +1 -1
- package/dist/worker-utils/lib/worker-api/process-on-worker.d.ts +4 -1
- package/dist/worker-utils/lib/worker-api/process-on-worker.d.ts.map +1 -1
- package/dist/worker-utils/lib/worker-api/process-on-worker.js +2 -2
- package/dist/worker-utils/lib/worker-api/process-on-worker.js.map +1 -1
- package/dist/worker-utils/lib/worker-utils/get-loadable-worker-url.js +1 -6
- package/dist/worker-utils/lib/worker-utils/get-loadable-worker-url.js.map +1 -1
- package/dist/worker-utils/null-worker-node.js.map +1 -1
- package/dist/worker-utils/null-worker.js.map +1 -1
- package/package.json +102 -12
- package/src/arrow-geometry/binary-features.ts +4 -1
- package/src/arrow-geometry/binary-geometry-to-wkb.ts +1 -1
- package/src/arrow-geometry/feature-collection-to-arrow.ts +4 -3
- package/src/arrow-geometry/feature-table.ts +8 -17
- package/src/arrow-geometry/geojson-table.ts +32 -21
- package/src/arrow-geometry/geometry-codecs.ts +2 -2
- package/src/arrow-geometry/geometry-to-wkt.ts +2 -2
- package/src/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.ts +3 -1
- package/src/arrow-geometry/wkb-arrow-utils.ts +8 -12
- package/src/arrow-geometry/wkb-builder.ts +2 -2
- package/src/arrow-geometry/wkb-statistics.ts +2 -2
- package/src/arrow-worker-transport.ts +89 -50
- package/src/geoarrow/binary-polygon-to-geoarrow.ts +2 -2
- package/src/geoarrow/clustering/cluster-source.ts +20 -30
- package/src/geoarrow/convert-table-to-geoarrow.ts +14 -24
- package/src/geoarrow/geo-column/geo-column.ts +1 -1
- package/src/geoarrow/geoarrow-bounds.ts +3 -3
- package/src/geoarrow/geoarrow-capabilities.ts +1 -1
- package/src/geoarrow/geoarrow-converter/convert-geoarrow-geometry.ts +12 -15
- package/src/geoarrow/geoarrow-converter/convert-geoarrow.ts +14 -9
- package/src/geoarrow/geoarrow-converter/geoarrow-converter.ts +7 -6
- package/src/geoarrow/geoarrow-inspection.ts +2 -2
- package/src/geoarrow/geoarrow-stream.ts +15 -15
- package/src/geoarrow/get-geoarrow-vertex-count.ts +1 -1
- package/src/geoarrow/index.ts +0 -2
- package/src/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.ts +3 -3
- package/src/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.ts +8 -12
- package/src/geoarrow/lib/geoarrow/geoarrow-union-kind.ts +1 -1
- package/src/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.ts +1 -1
- package/src/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.ts +2 -2
- package/src/geoarrow/lib/kernels/encode-geoarrow-box.ts +1 -1
- package/src/geoarrow/lib/kernels/geoarrow-union.ts +1 -1
- package/src/geoarrow/lib/table-converters/convert-geoarrow-table.ts +11 -11
- package/src/geoarrow/mesharrow/arrow-fixed-size-list-utils.ts +4 -3
- package/src/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.ts +1 -1
- package/src/geoarrow/mesharrow/get-deck-binary-data.ts +1 -1
- package/src/geoarrow/mesharrow/mesh-accessors.ts +1 -1
- package/src/geoarrow/metadata/geoarrow-metadata.ts +3 -4
- package/src/index.ts +2 -6
- package/src/lib/api/create-data-source.ts +148 -58
- package/src/lib/api/encode.ts +14 -3
- package/src/lib/api/load-in-batches.ts +15 -7
- package/src/lib/api/load-loader.ts +22 -21
- package/src/lib/api/load.ts +51 -127
- package/src/lib/api/loader-options.ts +69 -0
- package/src/lib/api/parse-file.ts +32 -22
- package/src/lib/api/parse-in-batches.ts +121 -20
- package/src/lib/api/parse-sync.ts +30 -16
- package/src/lib/api/parse.ts +46 -29
- package/src/lib/api/select-loader.ts +54 -69
- package/src/lib/api/select-source.ts +7 -1
- package/src/lib/loader-utils/get-fetch-function.ts +2 -2
- package/src/lib/loader-utils/loggers.ts +2 -70
- package/src/lib/loader-utils/native-arrow.ts +83 -0
- package/src/lib/loader-utils/option-defaults.ts +9 -10
- package/src/lib/loader-utils/option-utils.ts +33 -122
- package/src/loader-utils/format-types.ts +4 -0
- package/src/loader-utils/index.ts +19 -3
- package/src/loader-utils/lib/log-utils/log.ts +36 -1
- package/src/loader-utils/lib/pace-batch-iterator.ts +66 -0
- package/src/loader-utils/lib/request-utils/request-credentials.ts +1 -1
- package/src/loader-utils/lib/scan-utils/logical-table-query.ts +18 -8
- package/src/loader-utils/lib/scan-utils/scan-query-metadata.ts +68 -6
- package/src/loader-utils/lib/scan-utils/table-query.ts +28 -1
- package/src/loader-utils/lib/scan-utils/table-scan-batch.ts +88 -56
- package/src/loader-utils/lib/sources/data-source.ts +3 -15
- package/src/loader-utils/lib/sources/image-source.ts +1 -1
- package/src/loader-utils/lib/sources/table-source-collection.ts +2 -1
- package/src/loader-utils/lib/sources/tile-grid.ts +34 -18
- package/src/loader-utils/lib/sources/utils/utils.ts +1 -1
- package/src/loader-utils/lib/sources/vector-source.ts +3 -3
- package/src/loader-utils/lib/sources/vector-tile-source.ts +4 -9
- package/src/loader-utils/lib/worker-loader-utils/parse-with-worker.ts +27 -18
- package/src/loader-utils/loader-types.ts +186 -107
- package/src/loader-utils/source-types.ts +17 -6
- package/src/null-loader.ts +1 -20
- package/src/polyfills/index.ts +3 -3
- package/src/scan/arrow-execution/expressions.ts +42 -7
- package/src/scan/arrow-execution/filter-arrow-table.ts +3 -18
- package/src/scan/arrow-execution/portable-predicate-compatibility.ts +27 -0
- package/src/scan/arrow-query-worker-entry.ts +8 -0
- package/src/scan/arrow-query-worker.ts +158 -0
- package/src/scan/arrow-query.ts +3 -1
- package/src/scan/federated-table-scan-source.ts +48 -59
- package/src/scan/index.ts +41 -11
- package/src/scan/parse-sql-predicate.ts +1 -1
- package/src/scan/query-arrow-table-in-batches.ts +62 -33
- package/src/scan/query-arrow-table-math.ts +23 -0
- package/src/scan/query-arrow-table.ts +62 -97
- package/src/scan/query-grouped-sql.ts +69 -0
- package/src/scan/query-open-source.ts +39 -0
- package/src/scan/query-progressive.ts +230 -0
- package/src/scan/query-pushdown.ts +184 -0
- package/src/scan/query-scales.ts +299 -0
- package/src/scan/query.ts +254 -127
- package/src/scan/rows-to-arrow.ts +3 -39
- package/src/scan/scan-engine.ts +7 -7
- package/src/scan/vector-table-scan-source.ts +25 -26
- package/src/schema/categories/category-mesh.ts +3 -11
- package/src/schema/categories/category-table.ts +2 -28
- package/src/schema/float16.ts +1 -1
- package/src/schema/geometry/arrow-binary-features.ts +1 -1
- package/src/schema/geometry/geoarrow.ts +2 -2
- package/src/schema/index.ts +4 -5
- package/src/schema/types/batch.ts +0 -5
- package/src/schema-utils/index.ts +20 -11
- package/src/schema-utils/lib/arrow/arrow-metadata.ts +139 -0
- package/src/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.ts +1 -1
- package/src/schema-utils/lib/converters/convert.ts +7 -2
- package/src/schema-utils/lib/converters/types.ts +2 -0
- package/src/schema-utils/lib/mesh/convert-mesh-to-table.ts +15 -43
- package/src/schema-utils/lib/mesh/convert-table-to-mesh.ts +19 -16
- package/src/schema-utils/lib/mesh/get-mesh-bounding-box.ts +52 -0
- package/src/schema-utils/lib/mesh/mesh-utils.ts +3 -49
- package/src/schema-utils/lib/mesh/point-cloud-tiler.ts +6 -5
- package/src/schema-utils/lib/schema/data-type.ts +1 -1
- package/src/schema-utils/lib/schema/deduce-table-schema.ts +8 -4
- package/src/schema-utils/lib/table/arrow-api/arrow-like-table.ts +10 -9
- package/src/schema-utils/lib/table/batch-builder/arrow-table-builder.ts +21 -51
- package/src/schema-utils/lib/table/batch-builder/table-batch-builder.ts +68 -83
- package/src/schema-utils/lib/table/batches/convert-batches.ts +38 -21
- package/src/schema-utils/lib/table/batches/make-arrow-batch-iterator.ts +29 -19
- package/src/schema-utils/lib/table/batches/make-table-from-batches.ts +26 -7
- package/src/schema-utils/lib/table/query-arrow-table.ts +14 -32
- package/src/schema-utils/lib/table/tables/convert-arrow-table.ts +29 -96
- package/src/schema-utils/lib/table/tables/convert-table.ts +11 -57
- package/src/schema-utils/lib/table/tables/make-table.ts +6 -70
- package/src/schema-utils/lib/table/tables/row-utils.ts +2 -2
- package/src/schema-utils/lib/table/tables/table-accessors.ts +60 -63
- package/src/schema-utils/lib/table/tables/table-converter/convert-tables.ts +12 -14
- package/src/schema-utils/lib/table/tables/table-converter/table-converter.ts +12 -9
- package/src/schema-utils/lib/table/tables/table-types.ts +1 -7
- package/src/wkt/index.ts +1 -1
- package/src/worker-utils/lib/library-utils/library-utils.ts +2 -1
- package/src/worker-utils/lib/npm-tag.ts +1 -1
- package/src/worker-utils/lib/process-utils/child-process-proxy.ts +8 -7
- package/src/worker-utils/lib/worker-api/get-worker-url.ts +4 -3
- package/src/worker-utils/lib/worker-api/process-on-worker.ts +7 -4
- package/src/worker-utils/lib/worker-utils/get-loadable-worker-url.ts +1 -6
- package/dist/arrow-geometry/native-geometry.cjs +0 -215
- package/dist/arrow-geometry/native-geometry.cjs.map +0 -7
- package/dist/arrow-geometry/native-geometry.d.ts +0 -41
- package/dist/arrow-geometry/native-geometry.d.ts.map +0 -1
- package/dist/arrow-geometry/native-geometry.js +0 -224
- package/dist/arrow-geometry/native-geometry.js.map +0 -1
- package/dist/geoarrow/get-geoarrow-native-geometry.cjs.map +0 -7
- package/dist/geoarrow/get-geoarrow-native-geometry.d.ts +0 -2
- package/dist/geoarrow/get-geoarrow-native-geometry.d.ts.map +0 -1
- package/dist/geoarrow/get-geoarrow-native-geometry.js +0 -5
- package/dist/geoarrow/get-geoarrow-native-geometry.js.map +0 -1
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.cjs +0 -290
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.cjs.map +0 -7
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.d.ts +0 -16
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.d.ts.map +0 -1
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.js +0 -334
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.js.map +0 -1
- package/dist/loader-utils/lib/file-provider/data-view-file.d.ts +0 -40
- package/dist/loader-utils/lib/file-provider/data-view-file.d.ts.map +0 -1
- package/dist/loader-utils/lib/file-provider/data-view-file.js +0 -68
- package/dist/loader-utils/lib/file-provider/data-view-file.js.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-handle-file.d.ts +0 -54
- package/dist/loader-utils/lib/file-provider/file-handle-file.d.ts.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-handle-file.js +0 -102
- package/dist/loader-utils/lib/file-provider/file-handle-file.js.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-provider-interface.d.ts +0 -45
- package/dist/loader-utils/lib/file-provider/file-provider-interface.d.ts.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-provider-interface.js +0 -13
- package/dist/loader-utils/lib/file-provider/file-provider-interface.js.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-provider.d.ts +0 -57
- package/dist/loader-utils/lib/file-provider/file-provider.d.ts.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-provider.js +0 -114
- package/dist/loader-utils/lib/file-provider/file-provider.js.map +0 -1
- package/dist/schema/deprecated/mesh-utils.d.ts +0 -12
- package/dist/schema/deprecated/mesh-utils.d.ts.map +0 -1
- package/dist/schema/deprecated/mesh-utils.js +0 -37
- package/dist/schema/deprecated/mesh-utils.js.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.d.ts +0 -10
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.js +0 -71
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.js.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.d.ts +0 -19
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.js +0 -64
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.js.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.d.ts +0 -20
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.js +0 -83
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.js.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.d.ts +0 -21
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.js +0 -86
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.js.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.d.ts +0 -24
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.js +0 -5
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.js.map +0 -1
- package/src/arrow-geometry/native-geometry.ts +0 -278
- package/src/geoarrow/get-geoarrow-native-geometry.ts +0 -8
- package/src/geoarrow/lib/kernels/encode-geoarrow-wkt.ts +0 -373
- package/src/loader-utils/lib/file-provider/data-view-file.ts +0 -83
- package/src/loader-utils/lib/file-provider/file-handle-file.ts +0 -114
- package/src/loader-utils/lib/file-provider/file-provider-interface.ts +0 -60
- package/src/loader-utils/lib/file-provider/file-provider.ts +0 -130
- package/src/schema/deprecated/mesh-utils.ts +0 -46
- package/src/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator-builders.ts.disabled +0 -190
- package/src/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.ts +0 -85
- package/src/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.ts +0 -82
- package/src/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.ts +0 -103
- package/src/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.ts +0 -108
- package/src/schema-utils/lib/table/batch-builder/table-batch-aggregator.ts +0 -28
package/dist/dist.dev.js
CHANGED
|
@@ -30,16 +30,17 @@ var __exports__ = (() => {
|
|
|
30
30
|
FetchError: () => FetchError,
|
|
31
31
|
JSONLoader: () => JSONLoader,
|
|
32
32
|
NullLoader: () => NullLoader,
|
|
33
|
-
NullWorkerLoader: () => NullWorkerLoader,
|
|
34
33
|
RequestScheduler: () => RequestScheduler,
|
|
35
34
|
_BrowserFileSystem: () => BrowserFileSystem,
|
|
36
35
|
_fetchProgress: () => fetchProgress,
|
|
37
36
|
_selectSource: () => selectSource,
|
|
38
37
|
_unregisterLoaders: () => _unregisterLoaders,
|
|
39
38
|
assert: () => assert,
|
|
39
|
+
compareLoaderOptions: () => compareLoaderOptions,
|
|
40
40
|
concatenateArrayBuffersAsync: () => concatenateArrayBuffersAsync,
|
|
41
41
|
coreApi: () => coreApi,
|
|
42
42
|
createDataSource: () => createDataSource,
|
|
43
|
+
createDataSourceSync: () => createDataSourceSync,
|
|
43
44
|
document: () => document_,
|
|
44
45
|
encode: () => encode,
|
|
45
46
|
encodeInBatches: () => encodeInBatches,
|
|
@@ -674,6 +675,35 @@ var __exports__ = (() => {
|
|
|
674
675
|
return log3;
|
|
675
676
|
}
|
|
676
677
|
var log2 = createLog();
|
|
678
|
+
var NullLog = class {
|
|
679
|
+
/** Discards debug messages. */
|
|
680
|
+
log() {
|
|
681
|
+
return ignoreMessage;
|
|
682
|
+
}
|
|
683
|
+
/** Discards informational messages. */
|
|
684
|
+
info() {
|
|
685
|
+
return ignoreMessage;
|
|
686
|
+
}
|
|
687
|
+
/** Discards messages marked to be emitted once. */
|
|
688
|
+
once() {
|
|
689
|
+
return ignoreMessage;
|
|
690
|
+
}
|
|
691
|
+
/** Discards warnings. */
|
|
692
|
+
warn() {
|
|
693
|
+
return ignoreMessage;
|
|
694
|
+
}
|
|
695
|
+
/** Discards errors. */
|
|
696
|
+
error() {
|
|
697
|
+
return ignoreMessage;
|
|
698
|
+
}
|
|
699
|
+
};
|
|
700
|
+
function ignoreMessage() {
|
|
701
|
+
}
|
|
702
|
+
var nullLog = new NullLog();
|
|
703
|
+
function getLoaderLog(options) {
|
|
704
|
+
const logger = options?.core?.log;
|
|
705
|
+
return logger === null ? nullLog : logger || log2;
|
|
706
|
+
}
|
|
677
707
|
|
|
678
708
|
// src/loader-utils/lib/javascript-utils/is-type.ts
|
|
679
709
|
var isBoolean = (value) => typeof value === "boolean";
|
|
@@ -3713,9 +3743,9 @@ var __exports__ = (() => {
|
|
|
3713
3743
|
return;
|
|
3714
3744
|
}
|
|
3715
3745
|
warnedWorkerVersionFallbacks2.add(workerId);
|
|
3716
|
-
|
|
3746
|
+
log2.warn(
|
|
3717
3747
|
`loaders.gl: ${worker.name} loader worker version is "latest" because __VERSION__ was not injected. Fetching ${url} from CDN.`
|
|
3718
|
-
);
|
|
3748
|
+
)();
|
|
3719
3749
|
}
|
|
3720
3750
|
|
|
3721
3751
|
// src/worker-utils/lib/worker-api/task-runtime.ts
|
|
@@ -3847,8 +3877,8 @@ var __exports__ = (() => {
|
|
|
3847
3877
|
};
|
|
3848
3878
|
}
|
|
3849
3879
|
function getParserOptions(options) {
|
|
3850
|
-
const { signal, onProgress,
|
|
3851
|
-
return getTransferListForWriter2(parserOptions);
|
|
3880
|
+
const { signal, onProgress, parserOptions, ...workerOptions } = options;
|
|
3881
|
+
return getTransferListForWriter2(parserOptions ?? workerOptions);
|
|
3852
3882
|
}
|
|
3853
3883
|
async function openSession(worker, options, context, jobContext) {
|
|
3854
3884
|
options.signal?.throwIfAborted();
|
|
@@ -4001,8 +4031,7 @@ var __exports__ = (() => {
|
|
|
4001
4031
|
(credential) => credential.type === "request" || "token" in credential && typeof credential.token === "function"
|
|
4002
4032
|
))
|
|
4003
4033
|
return false;
|
|
4004
|
-
if (loader.id === "shapefile" &&
|
|
4005
|
-
return false;
|
|
4034
|
+
if (loader.id === "shapefile" && typeof options?.core?.fetch === "function") return false;
|
|
4006
4035
|
const workerOptions = getWorkerOptions(options);
|
|
4007
4036
|
const nodeWorkers = workerOptions._nodeWorkers;
|
|
4008
4037
|
if (!isBrowser3 && !nodeWorkers) {
|
|
@@ -4157,7 +4186,13 @@ var __exports__ = (() => {
|
|
|
4157
4186
|
...portableOptions,
|
|
4158
4187
|
signal: void 0,
|
|
4159
4188
|
onProgress: void 0,
|
|
4160
|
-
...portableOptions.core ? {
|
|
4189
|
+
...portableOptions.core ? {
|
|
4190
|
+
core: {
|
|
4191
|
+
...portableOptions.core,
|
|
4192
|
+
authentications: void 0,
|
|
4193
|
+
log: isDisabledLog(portableOptions.core.log) ? null : void 0
|
|
4194
|
+
}
|
|
4195
|
+
} : {}
|
|
4161
4196
|
};
|
|
4162
4197
|
const serializedOptions = JSON.parse(
|
|
4163
4198
|
JSON.stringify(optionsToSerialize, (_key, value) => {
|
|
@@ -4168,17 +4203,17 @@ var __exports__ = (() => {
|
|
|
4168
4203
|
})
|
|
4169
4204
|
);
|
|
4170
4205
|
restoreBigIntOptions(optionsToSerialize, serializedOptions);
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
...serializedOptions
|
|
4174
|
-
};
|
|
4175
|
-
if (workerOptions.worker === "auto") {
|
|
4176
|
-
workerOptions.worker = true;
|
|
4206
|
+
if (serializedOptions.core?.worker === "auto") {
|
|
4207
|
+
serializedOptions.core.worker = true;
|
|
4177
4208
|
}
|
|
4178
4209
|
if (loader) {
|
|
4179
|
-
|
|
4210
|
+
serializedOptions._workerLoaderId = loader.id;
|
|
4180
4211
|
}
|
|
4181
|
-
return
|
|
4212
|
+
return {
|
|
4213
|
+
...serializedOptions,
|
|
4214
|
+
...serializedOptions.core,
|
|
4215
|
+
parserOptions: serializedOptions
|
|
4216
|
+
};
|
|
4182
4217
|
}
|
|
4183
4218
|
function restoreBigIntOptions(original, serialized) {
|
|
4184
4219
|
if (!serialized || typeof serialized !== "object") return;
|
|
@@ -4207,11 +4242,14 @@ var __exports__ = (() => {
|
|
|
4207
4242
|
}
|
|
4208
4243
|
function shouldParseCSVWithWorker(options) {
|
|
4209
4244
|
const csvOptions = options;
|
|
4210
|
-
return (csvOptions?.csv?.shape ?? csvOptions?.core?.shape) === "arrow
|
|
4245
|
+
return (csvOptions?.csv?.shape ?? csvOptions?.core?.shape) === "arrow";
|
|
4211
4246
|
}
|
|
4212
4247
|
function isLoaderWithWorkerResultDeserializer(loader) {
|
|
4213
4248
|
return typeof loader.deserializeWorkerResult === "function";
|
|
4214
4249
|
}
|
|
4250
|
+
function isDisabledLog(logger) {
|
|
4251
|
+
return logger === null || logger instanceof NullLog;
|
|
4252
|
+
}
|
|
4215
4253
|
|
|
4216
4254
|
// src/loader-utils/lib/worker-loader-utils/encode-with-worker.ts
|
|
4217
4255
|
function canEncodeWithWorker(writer, options) {
|
|
@@ -5311,9 +5349,50 @@ var __exports__ = (() => {
|
|
|
5311
5349
|
}
|
|
5312
5350
|
};
|
|
5313
5351
|
|
|
5314
|
-
// src/loader-utils/
|
|
5315
|
-
function
|
|
5316
|
-
|
|
5352
|
+
// src/loader-utils/lib/pace-batch-iterator.ts
|
|
5353
|
+
function validateBatchDeliveryRate(rate) {
|
|
5354
|
+
if (!Number.isFinite(rate) || rate < 0) {
|
|
5355
|
+
throw new RangeError("core.batchMaxRowsPerSecond must be a finite nonnegative number");
|
|
5356
|
+
}
|
|
5357
|
+
}
|
|
5358
|
+
async function* paceBatchIterator(batches, { batchMaxRowsPerSecond = 0, getRowCount, signal }) {
|
|
5359
|
+
validateBatchDeliveryRate(batchMaxRowsPerSecond);
|
|
5360
|
+
signal?.throwIfAborted();
|
|
5361
|
+
if (batchMaxRowsPerSecond === 0) {
|
|
5362
|
+
yield* batches;
|
|
5363
|
+
return;
|
|
5364
|
+
}
|
|
5365
|
+
let deadline = 0;
|
|
5366
|
+
for await (const batch of batches) {
|
|
5367
|
+
signal?.throwIfAborted();
|
|
5368
|
+
const rowCount = getRowCount(batch);
|
|
5369
|
+
if (rowCount !== void 0 && rowCount > 0) {
|
|
5370
|
+
let remaining = deadline - performance.now();
|
|
5371
|
+
while (remaining > 0) {
|
|
5372
|
+
await waitForBatch(Math.min(Math.ceil(remaining), 2 ** 31 - 1), signal);
|
|
5373
|
+
remaining = deadline - performance.now();
|
|
5374
|
+
}
|
|
5375
|
+
signal?.throwIfAborted();
|
|
5376
|
+
deadline = performance.now() + rowCount / batchMaxRowsPerSecond * 1e3;
|
|
5377
|
+
}
|
|
5378
|
+
yield batch;
|
|
5379
|
+
signal?.throwIfAborted();
|
|
5380
|
+
}
|
|
5381
|
+
}
|
|
5382
|
+
function waitForBatch(delay, signal) {
|
|
5383
|
+
signal?.throwIfAborted();
|
|
5384
|
+
return new Promise((resolve2, reject) => {
|
|
5385
|
+
const timer = setTimeout(() => {
|
|
5386
|
+
signal?.removeEventListener("abort", abort);
|
|
5387
|
+
resolve2();
|
|
5388
|
+
}, delay);
|
|
5389
|
+
function abort() {
|
|
5390
|
+
clearTimeout(timer);
|
|
5391
|
+
signal?.removeEventListener("abort", abort);
|
|
5392
|
+
reject(signal?.reason);
|
|
5393
|
+
}
|
|
5394
|
+
signal?.addEventListener("abort", abort, { once: true });
|
|
5395
|
+
});
|
|
5317
5396
|
}
|
|
5318
5397
|
|
|
5319
5398
|
// src/lib/fetch/fetch-error.ts
|
|
@@ -5532,72 +5611,6 @@ var __exports__ = (() => {
|
|
|
5532
5611
|
});
|
|
5533
5612
|
}
|
|
5534
5613
|
|
|
5535
|
-
// src/lib/loader-utils/loggers.ts
|
|
5536
|
-
var probeLog = new ProbeLog({ id: "loaders.gl" });
|
|
5537
|
-
var NullLog = class {
|
|
5538
|
-
/** Drops a log message. */
|
|
5539
|
-
log() {
|
|
5540
|
-
return () => {
|
|
5541
|
-
};
|
|
5542
|
-
}
|
|
5543
|
-
/** Drops an info message. */
|
|
5544
|
-
info() {
|
|
5545
|
-
return () => {
|
|
5546
|
-
};
|
|
5547
|
-
}
|
|
5548
|
-
/** Logs one message once; no-op for the null logger. */
|
|
5549
|
-
once() {
|
|
5550
|
-
return () => {
|
|
5551
|
-
};
|
|
5552
|
-
}
|
|
5553
|
-
/** Drops a warning message. */
|
|
5554
|
-
warn() {
|
|
5555
|
-
return () => {
|
|
5556
|
-
};
|
|
5557
|
-
}
|
|
5558
|
-
/** Drops an error message. */
|
|
5559
|
-
error() {
|
|
5560
|
-
return () => {
|
|
5561
|
-
};
|
|
5562
|
-
}
|
|
5563
|
-
};
|
|
5564
|
-
var ConsoleLog2 = class {
|
|
5565
|
-
/** Console-like object used for message output. */
|
|
5566
|
-
console;
|
|
5567
|
-
/** Messages already emitted through `once`. */
|
|
5568
|
-
onceMessages = /* @__PURE__ */ new Set();
|
|
5569
|
-
/** Creates a console-backed logger. */
|
|
5570
|
-
constructor() {
|
|
5571
|
-
this.console = console;
|
|
5572
|
-
}
|
|
5573
|
-
/** Logs a message to the console. */
|
|
5574
|
-
log(...args) {
|
|
5575
|
-
return this.console.log.bind(this.console, ...args);
|
|
5576
|
-
}
|
|
5577
|
-
/** Logs an informational message to the console. */
|
|
5578
|
-
info(...args) {
|
|
5579
|
-
return this.console.info.bind(this.console, ...args);
|
|
5580
|
-
}
|
|
5581
|
-
/** Logs one message once to the console. */
|
|
5582
|
-
once(...args) {
|
|
5583
|
-
const message = String(args[0]);
|
|
5584
|
-
if (this.onceMessages.has(message)) {
|
|
5585
|
-
return () => {
|
|
5586
|
-
};
|
|
5587
|
-
}
|
|
5588
|
-
this.onceMessages.add(message);
|
|
5589
|
-
return this.console.info.bind(this.console, ...args);
|
|
5590
|
-
}
|
|
5591
|
-
/** Logs a warning message to the console. */
|
|
5592
|
-
warn(...args) {
|
|
5593
|
-
return this.console.warn.bind(this.console, ...args);
|
|
5594
|
-
}
|
|
5595
|
-
/** Logs an error message to the console. */
|
|
5596
|
-
error(...args) {
|
|
5597
|
-
return this.console.error.bind(this.console, ...args);
|
|
5598
|
-
}
|
|
5599
|
-
};
|
|
5600
|
-
|
|
5601
5614
|
// src/lib/loader-utils/option-defaults.ts
|
|
5602
5615
|
var DEFAULT_LOADER_OPTIONS = {
|
|
5603
5616
|
searchParams: void 0,
|
|
@@ -5610,8 +5623,7 @@ var __exports__ = (() => {
|
|
|
5610
5623
|
ignoreRegisteredLoaders: void 0,
|
|
5611
5624
|
nothrow: false,
|
|
5612
5625
|
shape: void 0,
|
|
5613
|
-
log:
|
|
5614
|
-
// A probe.gl compatible (`log.log()()` syntax) that just logs to console
|
|
5626
|
+
log: log2,
|
|
5615
5627
|
useLocalLibraries: false,
|
|
5616
5628
|
subloaders: void 0,
|
|
5617
5629
|
CDN: "https://unpkg.com/@loaders.gl",
|
|
@@ -5629,18 +5641,17 @@ var __exports__ = (() => {
|
|
|
5629
5641
|
// By default do not support node workers
|
|
5630
5642
|
_workerType: "",
|
|
5631
5643
|
// 'test' to use locally generated workers
|
|
5632
|
-
limit: 0,
|
|
5633
|
-
_limitMB: 0,
|
|
5634
5644
|
batchSize: "auto",
|
|
5635
|
-
|
|
5645
|
+
batchMaxRowsPerSecond: 0,
|
|
5636
5646
|
metadata: false,
|
|
5637
5647
|
// TODO - currently only implemented for parseInBatches, adds initial metadata batch,
|
|
5638
5648
|
transforms: []
|
|
5639
5649
|
}
|
|
5640
5650
|
};
|
|
5641
5651
|
var REMOVED_LOADER_OPTIONS = {
|
|
5642
|
-
//
|
|
5652
|
+
// Removed top-level aliases
|
|
5643
5653
|
baseUri: "core.baseUrl",
|
|
5654
|
+
baseUrl: "core.baseUrl",
|
|
5644
5655
|
fetch: "core.fetch",
|
|
5645
5656
|
mimeType: "core.mimeType",
|
|
5646
5657
|
fallbackMimeType: "core.fallbackMimeType",
|
|
@@ -5650,17 +5661,17 @@ var __exports__ = (() => {
|
|
|
5650
5661
|
useLocalLibraries: "core.useLocalLibraries",
|
|
5651
5662
|
CDN: "core.CDN",
|
|
5652
5663
|
worker: "core.worker",
|
|
5664
|
+
workerThreshold: "core.workerThreshold",
|
|
5665
|
+
workerTransferBufferCopy: "core.workerTransferBufferCopy",
|
|
5653
5666
|
maxConcurrency: "core.maxConcurrency",
|
|
5654
5667
|
maxMobileConcurrency: "core.maxMobileConcurrency",
|
|
5655
5668
|
reuseWorkers: "core.reuseWorkers",
|
|
5656
|
-
_nodeWorkers: "core.
|
|
5669
|
+
_nodeWorkers: "core._nodeWorkers",
|
|
5657
5670
|
_workerType: "core._workerType",
|
|
5658
5671
|
_worker: "core._workerType",
|
|
5659
|
-
limit: "core.limit",
|
|
5660
|
-
_limitMB: "core._limitMB",
|
|
5661
5672
|
shape: "core.shape",
|
|
5662
5673
|
batchSize: "core.batchSize",
|
|
5663
|
-
batchDebounceMs: "core.
|
|
5674
|
+
batchDebounceMs: "(removed; use core.batchMaxRowsPerSecond)",
|
|
5664
5675
|
metadata: "core.metadata",
|
|
5665
5676
|
transforms: "core.transforms",
|
|
5666
5677
|
// Older deprecations
|
|
@@ -5682,33 +5693,54 @@ var __exports__ = (() => {
|
|
|
5682
5693
|
signal: "core.fetch.signal"
|
|
5683
5694
|
};
|
|
5684
5695
|
|
|
5696
|
+
// src/lib/loader-utils/native-arrow.ts
|
|
5697
|
+
function getShapeOptionKey(loader) {
|
|
5698
|
+
const keys = Object.keys(loader.options || {}).filter((key) => {
|
|
5699
|
+
const value = loader.options?.[key];
|
|
5700
|
+
return key !== "core" && value && typeof value === "object" && "shape" in value;
|
|
5701
|
+
});
|
|
5702
|
+
return keys.includes(loader.id) ? loader.id : keys.length === 1 ? keys[0] : void 0;
|
|
5703
|
+
}
|
|
5704
|
+
function usesNativeArrowBatches(loader, options) {
|
|
5705
|
+
const key = getShapeOptionKey(loader);
|
|
5706
|
+
const scopedOptions = key && options[key];
|
|
5707
|
+
if (!scopedOptions || typeof scopedOptions !== "object" || !("shape" in scopedOptions) || scopedOptions.shape !== "arrow") {
|
|
5708
|
+
return false;
|
|
5709
|
+
}
|
|
5710
|
+
if (options.core?.metadata) {
|
|
5711
|
+
throw new Error(
|
|
5712
|
+
'shape: "arrow" carries metadata in the Arrow schema and does not support core.metadata envelopes'
|
|
5713
|
+
);
|
|
5714
|
+
}
|
|
5715
|
+
return true;
|
|
5716
|
+
}
|
|
5717
|
+
async function* normalizeNativeArrowBatches(batches) {
|
|
5718
|
+
for await (const batch of batches) {
|
|
5719
|
+
const batchType = batch?.batchType;
|
|
5720
|
+
if (batchType === "metadata" || batchType === "partial-result" || batchType === "final-result") {
|
|
5721
|
+
continue;
|
|
5722
|
+
}
|
|
5723
|
+
if (isArrowRecordBatch(batch)) {
|
|
5724
|
+
yield batch;
|
|
5725
|
+
} else if (isArrowTable(batch)) {
|
|
5726
|
+
yield* batch.batches;
|
|
5727
|
+
} else {
|
|
5728
|
+
throw new Error('shape: "arrow" requires a native Arrow table or record batch');
|
|
5729
|
+
}
|
|
5730
|
+
}
|
|
5731
|
+
}
|
|
5732
|
+
function isArrowTable(value) {
|
|
5733
|
+
return Boolean(
|
|
5734
|
+
value && typeof value === "object" && "schema" in value && "batches" in value && Array.isArray(value.batches) && "numRows" in value && typeof value.numRows === "number" && "getChildAt" in value && typeof value.getChildAt === "function"
|
|
5735
|
+
);
|
|
5736
|
+
}
|
|
5737
|
+
function isArrowRecordBatch(value) {
|
|
5738
|
+
return Boolean(
|
|
5739
|
+
value && typeof value === "object" && value[/* @__PURE__ */ Symbol.for("apache-arrow/RecordBatch")] === true
|
|
5740
|
+
);
|
|
5741
|
+
}
|
|
5742
|
+
|
|
5685
5743
|
// src/lib/loader-utils/option-utils.ts
|
|
5686
|
-
var CORE_LOADER_OPTION_KEYS = [
|
|
5687
|
-
"baseUrl",
|
|
5688
|
-
"fetch",
|
|
5689
|
-
"mimeType",
|
|
5690
|
-
"fallbackMimeType",
|
|
5691
|
-
"ignoreRegisteredLoaders",
|
|
5692
|
-
"nothrow",
|
|
5693
|
-
"log",
|
|
5694
|
-
"useLocalLibraries",
|
|
5695
|
-
"CDN",
|
|
5696
|
-
"worker",
|
|
5697
|
-
"workerThreshold",
|
|
5698
|
-
"maxConcurrency",
|
|
5699
|
-
"maxMobileConcurrency",
|
|
5700
|
-
"reuseWorkers",
|
|
5701
|
-
"workerTransferBufferCopy",
|
|
5702
|
-
"_nodeWorkers",
|
|
5703
|
-
"_workerType",
|
|
5704
|
-
"limit",
|
|
5705
|
-
"_limitMB",
|
|
5706
|
-
"shape",
|
|
5707
|
-
"batchSize",
|
|
5708
|
-
"batchDebounceMs",
|
|
5709
|
-
"metadata",
|
|
5710
|
-
"transforms"
|
|
5711
|
-
];
|
|
5712
5744
|
function applySearchParamsToUrl(url, options) {
|
|
5713
5745
|
const searchParams = options?.searchParams;
|
|
5714
5746
|
if (!searchParams || Object.keys(searchParams).length === 0 || /^(?:data|blob):/i.test(url)) {
|
|
@@ -5744,12 +5776,15 @@ var __exports__ = (() => {
|
|
|
5744
5776
|
...DEFAULT_LOADER_OPTIONS,
|
|
5745
5777
|
core: { ...DEFAULT_LOADER_OPTIONS.core }
|
|
5746
5778
|
};
|
|
5747
|
-
return
|
|
5779
|
+
return cloneLoaderOptions(state.globalOptions);
|
|
5748
5780
|
}
|
|
5749
5781
|
function setGlobalOptions(options) {
|
|
5750
5782
|
const state = getGlobalLoaderState();
|
|
5751
5783
|
const globalOptions = getGlobalLoaderOptions();
|
|
5752
|
-
|
|
5784
|
+
validateOptions(options, []);
|
|
5785
|
+
validateWorkerThreshold(options);
|
|
5786
|
+
mergeNestedFields(globalOptions, options);
|
|
5787
|
+
state.globalOptions = globalOptions;
|
|
5753
5788
|
registerJSModules(options.modules);
|
|
5754
5789
|
}
|
|
5755
5790
|
function normalizeOptions(options, loader, loaders, url) {
|
|
@@ -5757,23 +5792,10 @@ var __exports__ = (() => {
|
|
|
5757
5792
|
loaders = Array.isArray(loaders) ? loaders : [loaders];
|
|
5758
5793
|
validateOptions(options, loaders);
|
|
5759
5794
|
validateWorkerThreshold(options);
|
|
5760
|
-
const normalizedOptions =
|
|
5795
|
+
const normalizedOptions = normalizeOptionsInternal(loader, options, url);
|
|
5761
5796
|
validateWorkerThreshold(normalizedOptions);
|
|
5762
5797
|
return normalizedOptions;
|
|
5763
5798
|
}
|
|
5764
|
-
function normalizeLoaderOptions(options) {
|
|
5765
|
-
const normalized = cloneLoaderOptions(options);
|
|
5766
|
-
moveDeprecatedTopLevelOptionsToCore(normalized);
|
|
5767
|
-
for (const key of CORE_LOADER_OPTION_KEYS) {
|
|
5768
|
-
if (normalized.core && normalized.core[key] !== void 0) {
|
|
5769
|
-
delete normalized[key];
|
|
5770
|
-
}
|
|
5771
|
-
}
|
|
5772
|
-
if (normalized.core && normalized.core._workerType !== void 0) {
|
|
5773
|
-
delete normalized._worker;
|
|
5774
|
-
}
|
|
5775
|
-
return normalized;
|
|
5776
|
-
}
|
|
5777
5799
|
function validateOptions(options, loaders) {
|
|
5778
5800
|
validateOptionsObject(options, null, DEFAULT_LOADER_OPTIONS, REMOVED_LOADER_OPTIONS, loaders);
|
|
5779
5801
|
for (const loader of loaders) {
|
|
@@ -5794,19 +5816,19 @@ var __exports__ = (() => {
|
|
|
5794
5816
|
const prefix = id ? `${id}.` : "";
|
|
5795
5817
|
for (const key in options) {
|
|
5796
5818
|
const isSubOptions = !id && isObject(options[key]);
|
|
5797
|
-
const
|
|
5819
|
+
const isLifecycleOption = !id && ["signal", "onProgress"].includes(key);
|
|
5798
5820
|
const isWorkerUrlOption = key === "workerUrl" && id;
|
|
5799
|
-
if (!(key in defaultOptions) && !
|
|
5821
|
+
if (!(key in defaultOptions) && !isLifecycleOption && !isWorkerUrlOption) {
|
|
5800
5822
|
if (key in deprecatedOptions) {
|
|
5801
|
-
if (
|
|
5802
|
-
|
|
5823
|
+
if (log2.level > 0) {
|
|
5824
|
+
log2.warn(
|
|
5803
5825
|
`${loaderName} loader option '${prefix}${key}' no longer supported, use '${deprecatedOptions[key]}'`
|
|
5804
5826
|
)();
|
|
5805
5827
|
}
|
|
5806
5828
|
} else if (!isSubOptions) {
|
|
5807
|
-
if (
|
|
5829
|
+
if (log2.level > 0) {
|
|
5808
5830
|
const suggestion = findSimilarOption(key, loaders);
|
|
5809
|
-
|
|
5831
|
+
log2.warn(
|
|
5810
5832
|
`${loaderName} loader option '${prefix}${key}' not recognized. ${suggestion}`
|
|
5811
5833
|
)();
|
|
5812
5834
|
}
|
|
@@ -5837,16 +5859,20 @@ var __exports__ = (() => {
|
|
|
5837
5859
|
if (loaderDefaultOptions.core) {
|
|
5838
5860
|
mergedOptions.core = { ...loaderDefaultOptions.core };
|
|
5839
5861
|
}
|
|
5840
|
-
|
|
5862
|
+
const shapeKey = loader.defaultShape && getShapeOptionKey(loader);
|
|
5863
|
+
if (shapeKey) {
|
|
5864
|
+
mergedOptions[shapeKey] = {
|
|
5865
|
+
...loaderDefaultOptions[shapeKey],
|
|
5866
|
+
shape: loader.defaultShape
|
|
5867
|
+
};
|
|
5868
|
+
}
|
|
5869
|
+
mergeNestedFields(mergedOptions, getGlobalLoaderOptions());
|
|
5870
|
+
mergeNestedFields(mergedOptions, options);
|
|
5871
|
+
applyCoreShapeDefault(mergedOptions, options, loader);
|
|
5841
5872
|
if (mergedOptions.core?.log === null) {
|
|
5842
|
-
mergedOptions.core = { ...mergedOptions.core, log:
|
|
5873
|
+
mergedOptions.core = { ...mergedOptions.core, log: getLoaderLog(mergedOptions) };
|
|
5843
5874
|
}
|
|
5844
|
-
mergeNestedFields(mergedOptions, normalizeLoaderOptions(getGlobalLoaderOptions()));
|
|
5845
|
-
const userOptions = normalizeLoaderOptions(options);
|
|
5846
|
-
mergeNestedFields(mergedOptions, userOptions);
|
|
5847
|
-
applyCoreShapeDefault(mergedOptions, userOptions, loader);
|
|
5848
5875
|
addUrlOptions(mergedOptions, url);
|
|
5849
|
-
addDeprecatedTopLevelOptions(mergedOptions);
|
|
5850
5876
|
return mergedOptions;
|
|
5851
5877
|
}
|
|
5852
5878
|
function applyCoreShapeDefault(mergedOptions, userOptions, loader) {
|
|
@@ -5854,20 +5880,24 @@ var __exports__ = (() => {
|
|
|
5854
5880
|
if (coreShape === void 0) {
|
|
5855
5881
|
return;
|
|
5856
5882
|
}
|
|
5857
|
-
const
|
|
5883
|
+
const shapeOptionKey = getShapeOptionKey(loader);
|
|
5884
|
+
if (!shapeOptionKey) {
|
|
5885
|
+
return;
|
|
5886
|
+
}
|
|
5887
|
+
const loaderScopedDefaults = loader.options?.[shapeOptionKey];
|
|
5858
5888
|
if (!isPureObject(loaderScopedDefaults) || !("shape" in loaderScopedDefaults)) {
|
|
5859
5889
|
return;
|
|
5860
5890
|
}
|
|
5861
|
-
const globalLoaderScopedOptions = getGlobalLoaderOptions()[
|
|
5891
|
+
const globalLoaderScopedOptions = getGlobalLoaderOptions()[shapeOptionKey];
|
|
5862
5892
|
if (isPureObject(globalLoaderScopedOptions) && "shape" in globalLoaderScopedOptions) {
|
|
5863
5893
|
return;
|
|
5864
5894
|
}
|
|
5865
|
-
const userLoaderScopedOptions = userOptions[
|
|
5895
|
+
const userLoaderScopedOptions = userOptions[shapeOptionKey];
|
|
5866
5896
|
if (isPureObject(userLoaderScopedOptions) && "shape" in userLoaderScopedOptions) {
|
|
5867
5897
|
return;
|
|
5868
5898
|
}
|
|
5869
|
-
const loaderScopedOptions = mergedOptions[
|
|
5870
|
-
mergedOptions[
|
|
5899
|
+
const loaderScopedOptions = mergedOptions[shapeOptionKey];
|
|
5900
|
+
mergedOptions[shapeOptionKey] = {
|
|
5871
5901
|
...isPureObject(loaderScopedOptions) ? loaderScopedOptions : {},
|
|
5872
5902
|
shape: coreShape
|
|
5873
5903
|
};
|
|
@@ -5904,41 +5934,50 @@ var __exports__ = (() => {
|
|
|
5904
5934
|
}
|
|
5905
5935
|
return clonedOptions;
|
|
5906
5936
|
}
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
|
|
5913
|
-
|
|
5914
|
-
|
|
5915
|
-
if (options[key] !== void 0) {
|
|
5916
|
-
options.core ||= {};
|
|
5917
|
-
const coreOptions = options.core;
|
|
5918
|
-
const coreRecord = coreOptions;
|
|
5919
|
-
if (coreRecord[key] === void 0) {
|
|
5920
|
-
coreRecord[key] = options[key];
|
|
5921
|
-
}
|
|
5922
|
-
}
|
|
5937
|
+
|
|
5938
|
+
// src/lib/api/loader-options.ts
|
|
5939
|
+
function compareLoaderOptions(left, right) {
|
|
5940
|
+
return Object.is(left, right) || compareOptionValues(left, right, /* @__PURE__ */ new WeakMap());
|
|
5941
|
+
}
|
|
5942
|
+
function compareOptionValues(left, right, visited) {
|
|
5943
|
+
if (Object.is(left, right)) {
|
|
5944
|
+
return true;
|
|
5923
5945
|
}
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
options.core ||= {};
|
|
5927
|
-
if (options.core._workerType === void 0) {
|
|
5928
|
-
options.core._workerType = workerTypeAlias;
|
|
5929
|
-
}
|
|
5946
|
+
if (!left || !right || typeof left !== "object" || typeof right !== "object") {
|
|
5947
|
+
return false;
|
|
5930
5948
|
}
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
if (!coreOptions) {
|
|
5935
|
-
return;
|
|
5949
|
+
const leftPrototype = Object.getPrototypeOf(left);
|
|
5950
|
+
if (leftPrototype !== Object.getPrototypeOf(right)) {
|
|
5951
|
+
return false;
|
|
5936
5952
|
}
|
|
5937
|
-
|
|
5938
|
-
if (
|
|
5939
|
-
|
|
5953
|
+
if (Array.isArray(left)) {
|
|
5954
|
+
if (!Array.isArray(right) || left.length !== right.length) {
|
|
5955
|
+
return false;
|
|
5940
5956
|
}
|
|
5957
|
+
} else if (leftPrototype !== Object.prototype && leftPrototype !== null) {
|
|
5958
|
+
return false;
|
|
5941
5959
|
}
|
|
5960
|
+
let rightValues = visited.get(left);
|
|
5961
|
+
if (rightValues?.has(right)) {
|
|
5962
|
+
return true;
|
|
5963
|
+
}
|
|
5964
|
+
if (!rightValues) {
|
|
5965
|
+
rightValues = /* @__PURE__ */ new WeakSet();
|
|
5966
|
+
visited.set(left, rightValues);
|
|
5967
|
+
}
|
|
5968
|
+
rightValues.add(right);
|
|
5969
|
+
const leftKeys = getEnumerableKeys(left);
|
|
5970
|
+
const rightKeys = getEnumerableKeys(right);
|
|
5971
|
+
const leftOptions = left;
|
|
5972
|
+
const rightOptions = right;
|
|
5973
|
+
return leftKeys.length === rightKeys.length && leftKeys.every(
|
|
5974
|
+
(key) => Object.prototype.propertyIsEnumerable.call(right, key) && compareOptionValues(leftOptions[key], rightOptions[key], visited)
|
|
5975
|
+
);
|
|
5976
|
+
}
|
|
5977
|
+
function getEnumerableKeys(value) {
|
|
5978
|
+
return Reflect.ownKeys(value).filter(
|
|
5979
|
+
(key) => Object.prototype.propertyIsEnumerable.call(value, key)
|
|
5980
|
+
);
|
|
5942
5981
|
}
|
|
5943
5982
|
|
|
5944
5983
|
// src/lib/loader-utils/normalize-loader.ts
|
|
@@ -5999,42 +6038,29 @@ var __exports__ = (() => {
|
|
|
5999
6038
|
|
|
6000
6039
|
// src/lib/api/select-loader.ts
|
|
6001
6040
|
var EXT_PATTERN = /\.([^.]+)$/;
|
|
6002
|
-
async function selectLoader(data, loaders = [], options, context) {
|
|
6041
|
+
async function selectLoader(data, loaders = [], options, context, operation = "parse") {
|
|
6003
6042
|
if (!validHTTPResponse(data)) {
|
|
6004
6043
|
return null;
|
|
6005
6044
|
}
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
if (data instanceof Response && mayContainText(data)) {
|
|
6009
|
-
const text = await data.clone().text();
|
|
6010
|
-
const textLoader = selectLoaderSync(
|
|
6011
|
-
text,
|
|
6012
|
-
loaders,
|
|
6013
|
-
{ ...normalizedOptions, core: { ...normalizedOptions.core, nothrow: true } },
|
|
6014
|
-
context
|
|
6015
|
-
);
|
|
6016
|
-
if (textLoader) {
|
|
6017
|
-
return textLoader;
|
|
6018
|
-
}
|
|
6019
|
-
}
|
|
6020
|
-
let loader = selectLoaderSync(
|
|
6021
|
-
data,
|
|
6022
|
-
loaders,
|
|
6023
|
-
{ ...normalizedOptions, core: { ...normalizedOptions.core, nothrow: true } },
|
|
6024
|
-
context
|
|
6025
|
-
);
|
|
6026
|
-
if (loader) {
|
|
6027
|
-
return loader;
|
|
6045
|
+
if (loaders && !Array.isArray(loaders)) {
|
|
6046
|
+
return normalizeLoader(loaders);
|
|
6028
6047
|
}
|
|
6029
|
-
|
|
6030
|
-
|
|
6031
|
-
|
|
6048
|
+
const text = data instanceof Response && mayContainText(data) ? await data.clone().text() : null;
|
|
6049
|
+
let initialBytes;
|
|
6050
|
+
async function matchCandidates(candidates) {
|
|
6051
|
+
normalizeLoaders(candidates);
|
|
6052
|
+
const loader2 = text !== null && selectLoaderInternal(text, candidates, options, context, operation) || selectLoaderInternal(data, candidates, options, context, operation);
|
|
6053
|
+
if (!loader2 && isBlob(data) && candidates.length) {
|
|
6054
|
+
initialBytes ??= await data.slice(0, 10).arrayBuffer();
|
|
6055
|
+
return selectLoaderInternal(initialBytes, candidates, options, context, operation);
|
|
6056
|
+
}
|
|
6057
|
+
return loader2;
|
|
6032
6058
|
}
|
|
6033
|
-
|
|
6034
|
-
|
|
6035
|
-
loader =
|
|
6059
|
+
let loader = await matchCandidates(loaders || []);
|
|
6060
|
+
if (!loader && !options?.core?.ignoreRegisteredLoaders) {
|
|
6061
|
+
loader = await matchCandidates(getRegisteredLoaders());
|
|
6036
6062
|
}
|
|
6037
|
-
if (!loader && !
|
|
6063
|
+
if (!loader && !options?.core?.nothrow) {
|
|
6038
6064
|
throw new Error(getNoValidLoaderMessage(data));
|
|
6039
6065
|
}
|
|
6040
6066
|
return loader;
|
|
@@ -6045,30 +6071,25 @@ var __exports__ = (() => {
|
|
|
6045
6071
|
mimeType && (mimeType.startsWith("text/") || mimeType === "application/json" || mimeType.endsWith("+json"))
|
|
6046
6072
|
);
|
|
6047
6073
|
}
|
|
6048
|
-
function selectLoaderSync(data, loaders = [], options, context) {
|
|
6074
|
+
function selectLoaderSync(data, loaders = [], options, context, operation = "parse") {
|
|
6049
6075
|
if (!validHTTPResponse(data)) {
|
|
6050
6076
|
return null;
|
|
6051
6077
|
}
|
|
6052
|
-
const normalizedOptions = normalizeLoaderOptions(options || {});
|
|
6053
|
-
normalizedOptions.core ||= {};
|
|
6054
6078
|
if (loaders && !Array.isArray(loaders)) {
|
|
6055
6079
|
return normalizeLoader(loaders);
|
|
6056
6080
|
}
|
|
6057
|
-
|
|
6058
|
-
|
|
6059
|
-
|
|
6060
|
-
|
|
6061
|
-
|
|
6062
|
-
candidateLoaders.push(...getRegisteredLoaders());
|
|
6081
|
+
const candidates = loaders || [];
|
|
6082
|
+
normalizeLoaders(candidates);
|
|
6083
|
+
let loader = selectLoaderInternal(data, candidates, options, context, operation);
|
|
6084
|
+
if (!loader && !options?.core?.ignoreRegisteredLoaders) {
|
|
6085
|
+
loader = selectLoaderInternal(data, getRegisteredLoaders(), options, context, operation);
|
|
6063
6086
|
}
|
|
6064
|
-
|
|
6065
|
-
const loader = selectLoaderInternal(data, candidateLoaders, normalizedOptions, context);
|
|
6066
|
-
if (!loader && !normalizedOptions.core.nothrow) {
|
|
6087
|
+
if (!loader && !options?.core?.nothrow) {
|
|
6067
6088
|
throw new Error(getNoValidLoaderMessage(data));
|
|
6068
6089
|
}
|
|
6069
6090
|
return loader;
|
|
6070
6091
|
}
|
|
6071
|
-
function selectLoaderInternal(data, loaders, options, context) {
|
|
6092
|
+
function selectLoaderInternal(data, loaders, options, context, operation = "parse") {
|
|
6072
6093
|
const url = getResourceUrl(data);
|
|
6073
6094
|
const type = getResourceMIMEType(data);
|
|
6074
6095
|
const testUrl = stripQueryString(url) || context?.url;
|
|
@@ -6083,20 +6104,27 @@ var __exports__ = (() => {
|
|
|
6083
6104
|
loader = findLoaderByMIMEType(loaders, options?.core?.mimeType);
|
|
6084
6105
|
reason = `match forced by supplied MIME type ${options?.core?.mimeType}`;
|
|
6085
6106
|
}
|
|
6086
|
-
loader
|
|
6087
|
-
|
|
6088
|
-
|
|
6107
|
+
if (!loader && operation === "source") {
|
|
6108
|
+
loader = findSourceLoaderByTestURL(loaders, testUrl);
|
|
6109
|
+
reason = loader ? `matched source url ${testUrl}` : "";
|
|
6110
|
+
}
|
|
6111
|
+
const fallbackLoaders = operation === "source" && testUrl ? loaders.filter((candidate) => !candidate.testURL) : loaders;
|
|
6112
|
+
loader = loader || findLoaderByUrl(fallbackLoaders, testUrl);
|
|
6089
6113
|
reason = reason || (loader ? `matched url ${testUrl}` : "");
|
|
6090
|
-
loader
|
|
6114
|
+
if (!loader && operation === "parse") {
|
|
6115
|
+
loader = findSourceLoaderByTestURL(loaders, testUrl);
|
|
6116
|
+
reason = loader ? `matched source url ${testUrl}` : "";
|
|
6117
|
+
}
|
|
6118
|
+
loader = loader || findLoaderByMIMEType(fallbackLoaders, type);
|
|
6091
6119
|
reason = reason || (loader ? `matched MIME type ${type}` : "");
|
|
6092
|
-
loader = loader || findLoaderByInitialBytes(
|
|
6120
|
+
loader = loader || findLoaderByInitialBytes(fallbackLoaders, data);
|
|
6093
6121
|
reason = reason || (loader ? `matched initial data ${getFirstCharacters(data)}` : "");
|
|
6094
6122
|
if (!loader && isBlob(data)) {
|
|
6095
6123
|
loader = findSourceLoaderByTestData(loaders, data);
|
|
6096
6124
|
reason = reason || (loader ? "matched source testData" : "");
|
|
6097
6125
|
}
|
|
6098
6126
|
if (options?.core?.fallbackMimeType) {
|
|
6099
|
-
loader = loader || findLoaderByMIMEType(
|
|
6127
|
+
loader = loader || findLoaderByMIMEType(fallbackLoaders, options?.core?.fallbackMimeType);
|
|
6100
6128
|
reason = reason || (loader ? `matched fallback MIME type ${type}` : "");
|
|
6101
6129
|
}
|
|
6102
6130
|
if (reason) {
|
|
@@ -6146,7 +6174,7 @@ var __exports__ = (() => {
|
|
|
6146
6174
|
}
|
|
6147
6175
|
function findSourceLoaderByType(loaders, type) {
|
|
6148
6176
|
for (const loader of loaders) {
|
|
6149
|
-
if (
|
|
6177
|
+
if ((loader.type ?? loader.id) === type) {
|
|
6150
6178
|
return loader;
|
|
6151
6179
|
}
|
|
6152
6180
|
}
|
|
@@ -6157,7 +6185,7 @@ var __exports__ = (() => {
|
|
|
6157
6185
|
return null;
|
|
6158
6186
|
}
|
|
6159
6187
|
for (const loader of loaders) {
|
|
6160
|
-
if (
|
|
6188
|
+
if (loader.testURL?.(url)) {
|
|
6161
6189
|
return loader;
|
|
6162
6190
|
}
|
|
6163
6191
|
}
|
|
@@ -6165,7 +6193,7 @@ var __exports__ = (() => {
|
|
|
6165
6193
|
}
|
|
6166
6194
|
function findSourceLoaderByTestData(loaders, data) {
|
|
6167
6195
|
for (const loader of loaders) {
|
|
6168
|
-
if (
|
|
6196
|
+
if (loader.testData) {
|
|
6169
6197
|
if (loader.testData?.(data)) {
|
|
6170
6198
|
return loader;
|
|
6171
6199
|
}
|
|
@@ -6497,7 +6525,7 @@ var __exports__ = (() => {
|
|
|
6497
6525
|
function getFetchFunction(options, context) {
|
|
6498
6526
|
const globalOptions = getGlobalLoaderOptions();
|
|
6499
6527
|
const loaderOptions = options || globalOptions;
|
|
6500
|
-
const fetchOption = loaderOptions.
|
|
6528
|
+
const fetchOption = loaderOptions.core?.fetch;
|
|
6501
6529
|
let fetchFunction;
|
|
6502
6530
|
if (typeof fetchOption === "function") {
|
|
6503
6531
|
fetchFunction = fetchOption;
|
|
@@ -6522,16 +6550,7 @@ var __exports__ = (() => {
|
|
|
6522
6550
|
var loaderImplementationPromises = /* @__PURE__ */ new Map();
|
|
6523
6551
|
var loaderImplementations = /* @__PURE__ */ new Map();
|
|
6524
6552
|
async function getLoaderImplementation(loader, options, url) {
|
|
6525
|
-
if (
|
|
6526
|
-
const source = loader.preload ? await loader.preload(url || "", options) : loader;
|
|
6527
|
-
if (!isSourceLoader(source)) {
|
|
6528
|
-
throw new Error(
|
|
6529
|
-
`${loader.id} source loader preload() did not return a runtime source loader`
|
|
6530
|
-
);
|
|
6531
|
-
}
|
|
6532
|
-
return source;
|
|
6533
|
-
}
|
|
6534
|
-
if (isLoaderWithParser(loader)) {
|
|
6553
|
+
if (isLoaderWithParser(loader) || !loader.preload && loader.createDataSourceSync) {
|
|
6535
6554
|
return loader;
|
|
6536
6555
|
}
|
|
6537
6556
|
const implementationCacheKey = getLoaderImplementationCacheKey(loader, options);
|
|
@@ -6565,37 +6584,39 @@ var __exports__ = (() => {
|
|
|
6565
6584
|
}
|
|
6566
6585
|
return await loaderImplementationPromise;
|
|
6567
6586
|
}
|
|
6568
|
-
function getLoaderImplementationSync(loader) {
|
|
6587
|
+
function getLoaderImplementationSync(loader, options) {
|
|
6569
6588
|
if (loader.subloaders && !preparedLoaders.has(loader)) {
|
|
6570
6589
|
const prepared = preparedDefaults.get(loader);
|
|
6571
6590
|
if (prepared) return prepared;
|
|
6572
6591
|
if (!isLoaderWithParser(loader)) return null;
|
|
6573
6592
|
}
|
|
6574
|
-
if (isLoaderWithParser(loader)) {
|
|
6593
|
+
if (isLoaderWithParser(loader) || !loader.preload && loader.createDataSourceSync) {
|
|
6575
6594
|
return loader;
|
|
6576
6595
|
}
|
|
6577
|
-
const implementationCacheKey = getLoaderImplementationCacheKey(loader);
|
|
6596
|
+
const implementationCacheKey = getLoaderImplementationCacheKey(loader, options);
|
|
6578
6597
|
return loaderImplementations.get(loader)?.get(implementationCacheKey) || null;
|
|
6579
6598
|
}
|
|
6580
6599
|
function isLoaderWithParser(loader) {
|
|
6581
6600
|
const candidate = loader;
|
|
6582
6601
|
return Boolean(
|
|
6583
|
-
candidate.parse || candidate.parseSync || candidate.parseInBatches || candidate.parseText || candidate.parseTextSync || candidate.parseFile || candidate.parseFileInBatches
|
|
6602
|
+
candidate.parse || candidate.parseBlob || candidate.parseUrl || candidate.parseSync || candidate.parseInBatches || candidate.parseText || candidate.parseTextSync || candidate.parseFile || candidate.parseFileInBatches
|
|
6584
6603
|
);
|
|
6585
6604
|
}
|
|
6586
6605
|
async function resolveLoaderImplementation(loader, options, url) {
|
|
6587
6606
|
if (loader.preload) {
|
|
6588
6607
|
const preloadedLoader = await loader.preload(url || "", options);
|
|
6589
|
-
if (isLoaderWithParser(preloadedLoader)) {
|
|
6608
|
+
if (preloadedLoader && (isLoaderWithParser(preloadedLoader) || preloadedLoader.createDataSourceSync)) {
|
|
6590
6609
|
return preloadedLoader;
|
|
6591
6610
|
}
|
|
6592
|
-
throw new Error(
|
|
6611
|
+
throw new Error(
|
|
6612
|
+
`${loader.id} loader preload() did not return a parser-bearing loader or a source factory`
|
|
6613
|
+
);
|
|
6593
6614
|
}
|
|
6594
6615
|
const implementationSpecifier = getLoaderImplementationSpecifier(loader, options);
|
|
6595
6616
|
return await importLoaderImplementation(implementationSpecifier, loader.id);
|
|
6596
6617
|
}
|
|
6597
6618
|
function getLoaderImplementationSpecifier(loader, options) {
|
|
6598
|
-
const workerType = options?.
|
|
6619
|
+
const workerType = options?.core?._workerType;
|
|
6599
6620
|
if (workerType === "test") {
|
|
6600
6621
|
const sourcePath = `modules/${loader.module}/src/${loader.id}-loader.ts`;
|
|
6601
6622
|
if (typeof window !== "undefined") {
|
|
@@ -6694,7 +6715,7 @@ var __exports__ = (() => {
|
|
|
6694
6715
|
prepared.worker = false;
|
|
6695
6716
|
for (const method of [
|
|
6696
6717
|
"parseBlob",
|
|
6697
|
-
"
|
|
6718
|
+
"createDataSourceSync",
|
|
6698
6719
|
"parse",
|
|
6699
6720
|
"parseSync",
|
|
6700
6721
|
"parseText",
|
|
@@ -6745,11 +6766,6 @@ var __exports__ = (() => {
|
|
|
6745
6766
|
if (!loader) {
|
|
6746
6767
|
return null;
|
|
6747
6768
|
}
|
|
6748
|
-
if (isSourceLoader(loader)) {
|
|
6749
|
-
throw new Error(
|
|
6750
|
-
`${loader.id} is a SourceLoader. Use load() to create a runtime source object instead of parseFile().`
|
|
6751
|
-
);
|
|
6752
|
-
}
|
|
6753
6769
|
const normalizedOptions = normalizeOptions(options, loader, candidateLoaders, url);
|
|
6754
6770
|
const authenticationLoader = !loader.getAuthentications && normalizedOptions.core?.credentials?.length ? await getLoaderImplementation(loader, normalizedOptions, url || context?.url) : loader;
|
|
6755
6771
|
const strictOptions = await resolveLoaderAuthenticationOptions(
|
|
@@ -6763,7 +6779,7 @@ var __exports__ = (() => {
|
|
|
6763
6779
|
strictOptions,
|
|
6764
6780
|
context || null
|
|
6765
6781
|
);
|
|
6766
|
-
return
|
|
6782
|
+
return parseFileWithLoader(loader, file, strictOptions, context);
|
|
6767
6783
|
}
|
|
6768
6784
|
async function parseFileWithLoader(loader, file, options, context) {
|
|
6769
6785
|
(options.signal || context.signal)?.throwIfAborted();
|
|
@@ -6771,7 +6787,9 @@ var __exports__ = (() => {
|
|
|
6771
6787
|
options = mergeOptions(loader.options, options);
|
|
6772
6788
|
const loaderWithParser = await getLoaderImplementation(loader, options, context.url);
|
|
6773
6789
|
if (loaderWithParser.parseFile) {
|
|
6774
|
-
|
|
6790
|
+
const output = loaderWithParser.prepareParseOutput?.(options);
|
|
6791
|
+
const result = await loaderWithParser.parseFile(file, output?.options ?? options, context);
|
|
6792
|
+
return output ? output.convert(result) : result;
|
|
6775
6793
|
}
|
|
6776
6794
|
const parseFunction = loaderWithParser.parse;
|
|
6777
6795
|
if (parseFunction) {
|
|
@@ -6782,6 +6800,9 @@ var __exports__ = (() => {
|
|
|
6782
6800
|
const data = await file.read(0n, length);
|
|
6783
6801
|
return await parse(data, loaderWithParser, options, context);
|
|
6784
6802
|
}
|
|
6803
|
+
if (loaderWithParser.createDataSourceSync) {
|
|
6804
|
+
throw new Error(`${loader.id} has no file parser. Use createDataSource() to open a source.`);
|
|
6805
|
+
}
|
|
6785
6806
|
throw new Error(`${loader.id} loader - no file parser found`);
|
|
6786
6807
|
}
|
|
6787
6808
|
|
|
@@ -6799,11 +6820,6 @@ var __exports__ = (() => {
|
|
|
6799
6820
|
if (!loader) {
|
|
6800
6821
|
return null;
|
|
6801
6822
|
}
|
|
6802
|
-
if (isSourceLoader(loader)) {
|
|
6803
|
-
throw new Error(
|
|
6804
|
-
`${loader.id} is a SourceLoader. Use load() to create a runtime source object instead of parseSync().`
|
|
6805
|
-
);
|
|
6806
|
-
}
|
|
6807
6823
|
const strictOptions = normalizeOptions(options, loader, candidateLoaders);
|
|
6808
6824
|
const url = getResourceUrl(data);
|
|
6809
6825
|
const parse2 = () => {
|
|
@@ -6835,6 +6851,11 @@ var __exports__ = (() => {
|
|
|
6835
6851
|
`${loader.name} loader: 'parseSync' requires a parser-bearing loader. Import the loader implementation directly, or call preload(loader) before parseSync(). ${context.url || ""}`
|
|
6836
6852
|
);
|
|
6837
6853
|
}
|
|
6854
|
+
if (loader.createDataSourceSync) {
|
|
6855
|
+
throw new Error(
|
|
6856
|
+
`${loader.id} has no synchronous parser. Use createDataSource() to open a source.`
|
|
6857
|
+
);
|
|
6858
|
+
}
|
|
6838
6859
|
throw new Error(
|
|
6839
6860
|
`${loader.name} loader: 'parseSync' not supported by this loader, use 'parse' instead. ${context.url || ""}`
|
|
6840
6861
|
);
|
|
@@ -6864,16 +6885,42 @@ var __exports__ = (() => {
|
|
|
6864
6885
|
url || "",
|
|
6865
6886
|
normalizedOptions
|
|
6866
6887
|
);
|
|
6888
|
+
const nativeArrow = usesNativeArrowBatches(loader, strictOptions);
|
|
6867
6889
|
context = getLoaderContext(
|
|
6868
6890
|
{ url, _parseInBatches: parseInBatches, _parse: parse, loaders: loaderArray },
|
|
6869
6891
|
strictOptions,
|
|
6870
6892
|
context || null
|
|
6871
6893
|
);
|
|
6872
6894
|
const loaderWithParser = await getLoaderImplementation(loader, strictOptions, context.url);
|
|
6873
|
-
|
|
6895
|
+
const batches = await parseWithLoaderInBatches(
|
|
6896
|
+
loader,
|
|
6897
|
+
loaderWithParser,
|
|
6898
|
+
data,
|
|
6899
|
+
strictOptions,
|
|
6900
|
+
context
|
|
6901
|
+
);
|
|
6902
|
+
return nativeArrow ? normalizeNativeArrowBatches(batches) : batches;
|
|
6874
6903
|
}
|
|
6875
6904
|
async function parseWithLoaderInBatches(originalLoader, loader, data, options, context) {
|
|
6876
|
-
const
|
|
6905
|
+
const { batchMaxRowsPerSecond = 0, batchSize } = options.core ?? {};
|
|
6906
|
+
validateBatchDeliveryRate(batchMaxRowsPerSecond);
|
|
6907
|
+
if (batchSize !== void 0 && batchSize !== "auto" && (!Number.isSafeInteger(batchSize) || batchSize < 1)) {
|
|
6908
|
+
throw new RangeError('core.batchSize must be a positive integer or "auto"');
|
|
6909
|
+
}
|
|
6910
|
+
const parserOptions = batchMaxRowsPerSecond ? { ...options, core: { ...options.core, batchMaxRowsPerSecond: 0 } } : options;
|
|
6911
|
+
const output = loader.parseInBatches ? loader.prepareParseBatchOutput?.(parserOptions) : null;
|
|
6912
|
+
const decoded = await parseToOutputIterator(
|
|
6913
|
+
loader,
|
|
6914
|
+
data,
|
|
6915
|
+
output?.options ?? parserOptions,
|
|
6916
|
+
context
|
|
6917
|
+
);
|
|
6918
|
+
const batches = output ? convertOutputBatches(decoded, output.convert) : decoded;
|
|
6919
|
+
const outputIterator = batchMaxRowsPerSecond ? paceBatchIterator(batches, {
|
|
6920
|
+
batchMaxRowsPerSecond,
|
|
6921
|
+
getRowCount: (batch) => getBatchRowCount(batch, loader.module),
|
|
6922
|
+
signal: options.signal ?? context.signal
|
|
6923
|
+
}) : batches;
|
|
6877
6924
|
if (!options?.core?.metadata) {
|
|
6878
6925
|
return outputIterator;
|
|
6879
6926
|
}
|
|
@@ -6894,6 +6941,11 @@ var __exports__ = (() => {
|
|
|
6894
6941
|
}
|
|
6895
6942
|
return makeMetadataBatchIterator(outputIterator);
|
|
6896
6943
|
}
|
|
6944
|
+
async function* convertOutputBatches(batches, convert) {
|
|
6945
|
+
for await (const batch of batches) {
|
|
6946
|
+
yield convert(batch);
|
|
6947
|
+
}
|
|
6948
|
+
}
|
|
6897
6949
|
async function parseToOutputIterator(loader, data, options, context) {
|
|
6898
6950
|
const inputIterator = await getAsyncIterableFromData(data, options);
|
|
6899
6951
|
const transformedIterator = await applyInputTransforms(
|
|
@@ -6917,6 +6969,10 @@ var __exports__ = (() => {
|
|
|
6917
6969
|
{ ...options, core: { ...options?.core, mimeType: loader.mimeTypes[0] } },
|
|
6918
6970
|
context
|
|
6919
6971
|
);
|
|
6972
|
+
if (isArrowTable(parsedData)) {
|
|
6973
|
+
yield* parsedData.batches;
|
|
6974
|
+
return;
|
|
6975
|
+
}
|
|
6920
6976
|
const batch = convertDataToBatch(parsedData, loader);
|
|
6921
6977
|
yield batch;
|
|
6922
6978
|
}
|
|
@@ -6943,8 +6999,6 @@ var __exports__ = (() => {
|
|
|
6943
6999
|
return Array.isArray(table.features);
|
|
6944
7000
|
case "columnar-table":
|
|
6945
7001
|
return Boolean(table.data && typeof table.data === "object");
|
|
6946
|
-
case "arrow-table":
|
|
6947
|
-
return Boolean(table.data && typeof table.data === "object" && "numRows" in table.data);
|
|
6948
7002
|
default:
|
|
6949
7003
|
return false;
|
|
6950
7004
|
}
|
|
@@ -6956,8 +7010,6 @@ var __exports__ = (() => {
|
|
|
6956
7010
|
return table.data.length;
|
|
6957
7011
|
case "geojson-table":
|
|
6958
7012
|
return table.features.length;
|
|
6959
|
-
case "arrow-table":
|
|
6960
|
-
return table.data.numRows;
|
|
6961
7013
|
case "columnar-table":
|
|
6962
7014
|
for (const column of Object.values(table.data)) {
|
|
6963
7015
|
return column.length || 0;
|
|
@@ -6972,37 +7024,16 @@ var __exports__ = (() => {
|
|
|
6972
7024
|
}
|
|
6973
7025
|
return iteratorChain;
|
|
6974
7026
|
}
|
|
6975
|
-
|
|
6976
|
-
|
|
6977
|
-
|
|
6978
|
-
|
|
6979
|
-
if (
|
|
6980
|
-
|
|
6981
|
-
options = loaders;
|
|
6982
|
-
loadersArray = void 0;
|
|
6983
|
-
} else {
|
|
6984
|
-
loadersArray = loaders;
|
|
6985
|
-
}
|
|
6986
|
-
if (!Array.isArray(files)) {
|
|
6987
|
-
return loadOneFileInBatches(files, loadersArray, options || {});
|
|
6988
|
-
}
|
|
6989
|
-
const promises = files.map((file) => loadOneFileInBatches(file, loadersArray, options || {}));
|
|
6990
|
-
return promises;
|
|
6991
|
-
}
|
|
6992
|
-
async function loadOneFileInBatches(file, loaders, options) {
|
|
6993
|
-
if (typeof file === "string") {
|
|
6994
|
-
const url = file;
|
|
6995
|
-
const loader = await selectLoader(url, loaders, {
|
|
6996
|
-
...options,
|
|
6997
|
-
core: { ...options.core, nothrow: true }
|
|
6998
|
-
});
|
|
6999
|
-
const authenticationLoader = loader && !loader.getAuthentications && options.core?.credentials?.length ? await getLoaderImplementation(loader, options, url) : loader;
|
|
7000
|
-
options = await resolveLoaderAuthenticationOptions(authenticationLoader, url, options);
|
|
7001
|
-
const fetch2 = getFetchFunction(options);
|
|
7002
|
-
const response = await fetch2(applySearchParamsToUrl(url, options));
|
|
7003
|
-
return Array.isArray(loaders) ? await parseInBatches(response, loaders, options) : await parseInBatches(response, loaders, options);
|
|
7027
|
+
function getBatchRowCount(batch, module) {
|
|
7028
|
+
if (!batch || typeof batch !== "object") return void 0;
|
|
7029
|
+
if (module === "geospatial" && Array.isArray(batch)) return batch.length;
|
|
7030
|
+
const result = batch;
|
|
7031
|
+
if (module === "traces" && result.table !== void 0 && result.table !== "spans" && result.table !== "slices") {
|
|
7032
|
+
return void 0;
|
|
7004
7033
|
}
|
|
7005
|
-
|
|
7034
|
+
if (result.batchType !== void 0 && result.batchType !== "data") return void 0;
|
|
7035
|
+
if (result.shape === "unknown") return void 0;
|
|
7036
|
+
return result.data?.numRows ?? result.numRows ?? result.header?.vertexCount ?? result.features?.length ?? result.length;
|
|
7006
7037
|
}
|
|
7007
7038
|
|
|
7008
7039
|
// src/lib/api/load.ts
|
|
@@ -7018,91 +7049,32 @@ var __exports__ = (() => {
|
|
|
7018
7049
|
resolvedOptions = options;
|
|
7019
7050
|
}
|
|
7020
7051
|
resolvedOptions ||= getGlobalLoaderOptions();
|
|
7021
|
-
if (!Array.isArray(resolvedLoaders) && isSourceLoader(resolvedLoaders)) {
|
|
7022
|
-
const sourceLoader = await resolveSourceLoader(resolvedLoaders, url, resolvedOptions);
|
|
7023
|
-
resolvedOptions = await resolveLoaderAuthenticationOptions(
|
|
7024
|
-
resolvedLoaders.getAuthentications ? resolvedLoaders : sourceLoader,
|
|
7025
|
-
typeof url === "string" ? url : "",
|
|
7026
|
-
resolvedOptions || {}
|
|
7027
|
-
);
|
|
7028
|
-
const runtimeCoreApi = {
|
|
7029
|
-
fetchFile,
|
|
7030
|
-
parse,
|
|
7031
|
-
parseFile,
|
|
7032
|
-
parseSync,
|
|
7033
|
-
parseInBatches,
|
|
7034
|
-
load,
|
|
7035
|
-
loadInBatches
|
|
7036
|
-
};
|
|
7037
|
-
return sourceLoader.createDataSource(
|
|
7038
|
-
url,
|
|
7039
|
-
resolvedOptions || {},
|
|
7040
|
-
runtimeCoreApi
|
|
7041
|
-
);
|
|
7042
|
-
}
|
|
7043
|
-
if (Array.isArray(resolvedLoaders) && resolvedLoaders.length === 1 && isSourceLoader(resolvedLoaders[0])) {
|
|
7044
|
-
const sourceLoader = await resolveSourceLoader(resolvedLoaders[0], url, resolvedOptions);
|
|
7045
|
-
resolvedOptions = await resolveLoaderAuthenticationOptions(
|
|
7046
|
-
resolvedLoaders[0].getAuthentications ? resolvedLoaders[0] : sourceLoader,
|
|
7047
|
-
typeof url === "string" ? url : "",
|
|
7048
|
-
resolvedOptions || {}
|
|
7049
|
-
);
|
|
7050
|
-
const runtimeCoreApi = {
|
|
7051
|
-
fetchFile,
|
|
7052
|
-
parse,
|
|
7053
|
-
parseFile,
|
|
7054
|
-
parseSync,
|
|
7055
|
-
parseInBatches,
|
|
7056
|
-
load,
|
|
7057
|
-
loadInBatches
|
|
7058
|
-
};
|
|
7059
|
-
return sourceLoader.createDataSource(
|
|
7060
|
-
url,
|
|
7061
|
-
resolvedOptions || {},
|
|
7062
|
-
runtimeCoreApi
|
|
7063
|
-
);
|
|
7064
|
-
}
|
|
7065
7052
|
if (typeof url === "string" || isBlob(url)) {
|
|
7066
7053
|
const selectedLoader = await selectLoader(url, resolvedLoaders, {
|
|
7067
7054
|
...resolvedOptions,
|
|
7068
7055
|
core: { ...resolvedOptions?.core, nothrow: true }
|
|
7069
7056
|
});
|
|
7070
|
-
|
|
7071
|
-
|
|
7072
|
-
resolvedOptions
|
|
7073
|
-
|
|
7074
|
-
|
|
7075
|
-
|
|
7076
|
-
|
|
7077
|
-
|
|
7078
|
-
url,
|
|
7079
|
-
resolvedOptions || {},
|
|
7080
|
-
{
|
|
7081
|
-
fetchFile,
|
|
7082
|
-
parse,
|
|
7083
|
-
parseFile,
|
|
7084
|
-
parseSync,
|
|
7085
|
-
parseInBatches,
|
|
7086
|
-
load,
|
|
7087
|
-
loadInBatches
|
|
7088
|
-
}
|
|
7057
|
+
const loaderImplementation = selectedLoader && (typeof url === "string" || selectedLoader.createDataSourceSync) ? await getLoaderImplementation(
|
|
7058
|
+
selectedLoader,
|
|
7059
|
+
resolvedOptions,
|
|
7060
|
+
typeof url === "string" ? url : void 0
|
|
7061
|
+
) : null;
|
|
7062
|
+
if (selectedLoader && loaderImplementation?.createDataSourceSync && !isLoaderWithParser(loaderImplementation)) {
|
|
7063
|
+
throw new Error(
|
|
7064
|
+
`${selectedLoader.id} creates sources. Use createDataSource() instead of load().`
|
|
7089
7065
|
);
|
|
7090
7066
|
}
|
|
7091
|
-
if (selectedLoader && typeof url === "string") {
|
|
7092
|
-
const loaderImplementation = await getLoaderImplementation(
|
|
7093
|
-
selectedLoader,
|
|
7094
|
-
resolvedOptions,
|
|
7095
|
-
url
|
|
7096
|
-
);
|
|
7067
|
+
if (selectedLoader && loaderImplementation && typeof url === "string") {
|
|
7097
7068
|
resolvedOptions = await resolveLoaderAuthenticationOptions(
|
|
7098
7069
|
selectedLoader.getAuthentications ? selectedLoader : loaderImplementation,
|
|
7099
7070
|
url,
|
|
7100
7071
|
resolvedOptions || {}
|
|
7101
7072
|
);
|
|
7102
|
-
const parseUrl = loaderImplementation
|
|
7073
|
+
const { parseUrl } = loaderImplementation;
|
|
7103
7074
|
if (parseUrl) {
|
|
7104
7075
|
const requestUrl = applySearchParamsToUrl(url, resolvedOptions);
|
|
7105
|
-
|
|
7076
|
+
const options2 = normalizeOptions(resolvedOptions, selectedLoader, [selectedLoader], url);
|
|
7077
|
+
return parseUrl(requestUrl, options2, context);
|
|
7106
7078
|
}
|
|
7107
7079
|
}
|
|
7108
7080
|
}
|
|
@@ -7116,8 +7088,7 @@ var __exports__ = (() => {
|
|
|
7116
7088
|
data = await fetch2(url);
|
|
7117
7089
|
}
|
|
7118
7090
|
if (typeof url === "string") {
|
|
7119
|
-
|
|
7120
|
-
if (!normalizedOptions.core?.baseUrl) {
|
|
7091
|
+
if (!resolvedOptions?.core?.baseUrl) {
|
|
7121
7092
|
resolvedOptions = {
|
|
7122
7093
|
...resolvedOptions,
|
|
7123
7094
|
core: {
|
|
@@ -7129,15 +7100,37 @@ var __exports__ = (() => {
|
|
|
7129
7100
|
}
|
|
7130
7101
|
return Array.isArray(resolvedLoaders) ? await parse(data, resolvedLoaders, resolvedOptions, context) : await parse(data, resolvedLoaders, resolvedOptions, context);
|
|
7131
7102
|
}
|
|
7132
|
-
|
|
7133
|
-
|
|
7134
|
-
|
|
7103
|
+
|
|
7104
|
+
// src/lib/api/load-in-batches.ts
|
|
7105
|
+
function loadInBatches(files, loaders, options, context) {
|
|
7106
|
+
let loadersArray;
|
|
7107
|
+
if (!Array.isArray(loaders) && !isLoaderObject(loaders)) {
|
|
7108
|
+
context = void 0;
|
|
7109
|
+
options = loaders;
|
|
7110
|
+
loadersArray = void 0;
|
|
7111
|
+
} else {
|
|
7112
|
+
loadersArray = loaders;
|
|
7135
7113
|
}
|
|
7136
|
-
|
|
7137
|
-
|
|
7138
|
-
throw new Error(`${loader.id} source loader preload() did not return a runtime source loader`);
|
|
7114
|
+
if (!Array.isArray(files)) {
|
|
7115
|
+
return loadOneFileInBatches(files, loadersArray, options || {});
|
|
7139
7116
|
}
|
|
7140
|
-
|
|
7117
|
+
const promises = files.map((file) => loadOneFileInBatches(file, loadersArray, options || {}));
|
|
7118
|
+
return promises;
|
|
7119
|
+
}
|
|
7120
|
+
async function loadOneFileInBatches(file, loaders, options) {
|
|
7121
|
+
if (typeof file === "string") {
|
|
7122
|
+
const url = file;
|
|
7123
|
+
const loader = await selectLoader(url, loaders, {
|
|
7124
|
+
...options,
|
|
7125
|
+
core: { ...options.core, nothrow: true }
|
|
7126
|
+
});
|
|
7127
|
+
const authenticationLoader = loader && !loader.getAuthentications && options.core?.credentials?.length ? await getLoaderImplementation(loader, options, url) : loader;
|
|
7128
|
+
options = await resolveLoaderAuthenticationOptions(authenticationLoader, url, options);
|
|
7129
|
+
const fetch2 = getFetchFunction(options);
|
|
7130
|
+
const response = await fetch2(applySearchParamsToUrl(url, options));
|
|
7131
|
+
return Array.isArray(loaders) ? await parseInBatches(response, loaders, options) : await parseInBatches(response, loaders, options);
|
|
7132
|
+
}
|
|
7133
|
+
return Array.isArray(loaders) ? await parseInBatches(file, loaders, options) : await parseInBatches(file, loaders, options);
|
|
7141
7134
|
}
|
|
7142
7135
|
|
|
7143
7136
|
// src/lib/api/core-api.ts
|
|
@@ -7215,11 +7208,6 @@ var __exports__ = (() => {
|
|
|
7215
7208
|
if (!loader) {
|
|
7216
7209
|
return null;
|
|
7217
7210
|
}
|
|
7218
|
-
if (isSourceLoader(loader)) {
|
|
7219
|
-
throw new Error(
|
|
7220
|
-
`${loader.id} is a SourceLoader. Use load() to create a runtime source object instead of parse().`
|
|
7221
|
-
);
|
|
7222
|
-
}
|
|
7223
7211
|
const normalizedOptions = normalizeOptions(options, loader, candidateLoaders, url);
|
|
7224
7212
|
const authenticationLoader = !loader.getAuthentications && normalizedOptions.core?.credentials?.length ? await getLoaderImplementation(loader, normalizedOptions, url || context?.url) : loader;
|
|
7225
7213
|
const strictOptions = await resolveLoaderAuthenticationOptions(
|
|
@@ -7233,7 +7221,7 @@ var __exports__ = (() => {
|
|
|
7233
7221
|
strictOptions,
|
|
7234
7222
|
context || null
|
|
7235
7223
|
);
|
|
7236
|
-
return
|
|
7224
|
+
return parseWithLoader(loader, data, strictOptions, context);
|
|
7237
7225
|
}
|
|
7238
7226
|
async function parseWithLoader(loader, data, options, context) {
|
|
7239
7227
|
(options.signal || context.signal)?.throwIfAborted();
|
|
@@ -7245,15 +7233,22 @@ var __exports__ = (() => {
|
|
|
7245
7233
|
context.response = { headers, ok, redirected, status, statusText, type, url };
|
|
7246
7234
|
}
|
|
7247
7235
|
const loaderWithParser = await getLoaderImplementation(loader, options, context.url);
|
|
7248
|
-
if (
|
|
7249
|
-
|
|
7250
|
-
return await parseWithWorker(loaderWithParser, data, options, context, parse);
|
|
7236
|
+
if (loaderWithParser.createDataSourceSync && !isLoaderWithParser(loaderWithParser)) {
|
|
7237
|
+
throw new Error(`${loader.id} creates sources. Use createDataSource() to open a source.`);
|
|
7251
7238
|
}
|
|
7252
|
-
|
|
7253
|
-
|
|
7239
|
+
const output = loaderWithParser.prepareParseOutput?.(options);
|
|
7240
|
+
const parseOptions = output?.options ?? options;
|
|
7241
|
+
let result;
|
|
7242
|
+
if (shouldParseWithWorker(loaderWithParser, data, parseOptions, context, loader)) {
|
|
7243
|
+
data = await getArrayBufferFromData(data, parseOptions);
|
|
7244
|
+
result = await parseWithWorker(loaderWithParser, data, parseOptions, context, parse);
|
|
7245
|
+
} else if (isBlob(data) && loaderWithParser.parseBlob) {
|
|
7246
|
+
result = await loaderWithParser.parseBlob(data, parseOptions, context);
|
|
7247
|
+
} else {
|
|
7248
|
+
data = await getArrayBufferOrStringFromData(data, loader, parseOptions);
|
|
7249
|
+
result = await parseWithLoaderImplementation(loaderWithParser, data, parseOptions, context);
|
|
7254
7250
|
}
|
|
7255
|
-
|
|
7256
|
-
return await parseWithLoaderImplementation(loaderWithParser, data, options, context);
|
|
7251
|
+
return output ? output.convert(result) : result;
|
|
7257
7252
|
}
|
|
7258
7253
|
async function parseWithLoaderImplementation(loader, data, options, context) {
|
|
7259
7254
|
if (loader.parseText && typeof data === "string") {
|
|
@@ -7270,6 +7265,9 @@ var __exports__ = (() => {
|
|
|
7270
7265
|
`${loader.name} loader: 'parse' not available on parser-bearing sync loader. Add an async 'parse' function to this loader, or call preload(loader) before parseSync(). ${context.url || ""}`
|
|
7271
7266
|
);
|
|
7272
7267
|
}
|
|
7268
|
+
if (loader.createDataSourceSync) {
|
|
7269
|
+
throw new Error(`${loader.id} creates sources. Use createDataSource() to open a source.`);
|
|
7270
|
+
}
|
|
7273
7271
|
throw new Error(`${loader.id} loader - no parser found and worker is disabled`);
|
|
7274
7272
|
}
|
|
7275
7273
|
|
|
@@ -7368,8 +7366,15 @@ var __exports__ = (() => {
|
|
|
7368
7366
|
}
|
|
7369
7367
|
function encodeInBatches(data, writer, options) {
|
|
7370
7368
|
if (writer.encodeInBatches) {
|
|
7371
|
-
|
|
7372
|
-
|
|
7369
|
+
let dataIterator;
|
|
7370
|
+
if (data && typeof data === "object") {
|
|
7371
|
+
if ("numRows" in data && "schema" in data) {
|
|
7372
|
+
dataIterator = [data];
|
|
7373
|
+
} else if (Symbol.iterator in data || Symbol.asyncIterator in data) {
|
|
7374
|
+
dataIterator = data;
|
|
7375
|
+
}
|
|
7376
|
+
}
|
|
7377
|
+
return writer.encodeInBatches(dataIterator ?? getIterator2(data), options);
|
|
7373
7378
|
}
|
|
7374
7379
|
throw new Error(`Writer ${writer.name} could not encode in batches`);
|
|
7375
7380
|
}
|
|
@@ -7403,49 +7408,81 @@ var __exports__ = (() => {
|
|
|
7403
7408
|
}
|
|
7404
7409
|
|
|
7405
7410
|
// src/lib/api/create-data-source.ts
|
|
7406
|
-
function createDataSource(data,
|
|
7407
|
-
|
|
7408
|
-
const
|
|
7409
|
-
const
|
|
7410
|
-
|
|
7411
|
-
|
|
7412
|
-
|
|
7413
|
-
|
|
7414
|
-
|
|
7415
|
-
|
|
7416
|
-
|
|
7417
|
-
|
|
7418
|
-
|
|
7411
|
+
async function createDataSource(data, loaders, options = {}) {
|
|
7412
|
+
options.signal?.throwIfAborted();
|
|
7413
|
+
const candidates = getCandidates(loaders, options);
|
|
7414
|
+
const loader = candidates.length === 1 ? candidates[0] : await selectLoader(
|
|
7415
|
+
data,
|
|
7416
|
+
candidates,
|
|
7417
|
+
getSelectionOptions(options),
|
|
7418
|
+
void 0,
|
|
7419
|
+
"source"
|
|
7420
|
+
);
|
|
7421
|
+
if (!loader) {
|
|
7422
|
+
throw new Error("No explicit source loader matches the input");
|
|
7423
|
+
}
|
|
7424
|
+
const url = typeof data === "string" ? data : "";
|
|
7425
|
+
const implementation = await preload(loader, options, url);
|
|
7426
|
+
options.signal?.throwIfAborted();
|
|
7427
|
+
const authenticatedOptions = await resolveLoaderAuthenticationOptions(
|
|
7428
|
+
loader.getAuthentications ? loader : implementation,
|
|
7429
|
+
url,
|
|
7430
|
+
options
|
|
7431
|
+
);
|
|
7432
|
+
options.signal?.throwIfAborted();
|
|
7433
|
+
return constructSource(implementation, data, authenticatedOptions);
|
|
7434
|
+
}
|
|
7435
|
+
function createDataSourceSync(data, loaders, options = {}) {
|
|
7436
|
+
const candidates = getCandidates(loaders, options);
|
|
7437
|
+
const loader = candidates.length === 1 ? candidates[0] : selectLoaderSync(
|
|
7438
|
+
data,
|
|
7439
|
+
candidates,
|
|
7440
|
+
getSelectionOptions(options),
|
|
7441
|
+
void 0,
|
|
7442
|
+
"source"
|
|
7443
|
+
);
|
|
7444
|
+
if (!loader) {
|
|
7445
|
+
throw new Error("No explicit source loader matches the input");
|
|
7446
|
+
}
|
|
7447
|
+
const implementation = getLoaderImplementationSync(loader, options);
|
|
7448
|
+
if (!implementation) {
|
|
7449
|
+
throw new Error(
|
|
7450
|
+
`${loader.id} has no synchronous source factory available. Call preload() first.`
|
|
7451
|
+
);
|
|
7452
|
+
}
|
|
7453
|
+
const authenticationLoader = loader.getAuthentications ? loader : implementation;
|
|
7454
|
+
const contributions = options.core?.credentials?.length ? authenticationLoader.getAuthentications?.(typeof data === "string" ? data : "", options) : void 0;
|
|
7419
7455
|
if (contributions && "then" in contributions) {
|
|
7420
7456
|
void contributions.catch(() => {
|
|
7421
7457
|
});
|
|
7422
|
-
throw new Error("Use
|
|
7458
|
+
throw new Error("Use createDataSource() with an asynchronous getAuthentications() hook.");
|
|
7423
7459
|
}
|
|
7424
7460
|
const authenticatedOptions = resolveAuthenticationOptions(
|
|
7425
7461
|
contributions?.length ? {
|
|
7426
|
-
...
|
|
7462
|
+
...options,
|
|
7427
7463
|
core: {
|
|
7428
|
-
...
|
|
7429
|
-
authentications: [
|
|
7430
|
-
...resolvedOptions.core?.authentications || [],
|
|
7431
|
-
...contributions || []
|
|
7432
|
-
]
|
|
7464
|
+
...options.core,
|
|
7465
|
+
authentications: [...options.core?.authentications || [], ...contributions]
|
|
7433
7466
|
}
|
|
7434
|
-
} :
|
|
7435
|
-
);
|
|
7436
|
-
return source.createDataSource(
|
|
7437
|
-
data,
|
|
7438
|
-
authenticatedOptions,
|
|
7439
|
-
coreApi
|
|
7467
|
+
} : options
|
|
7440
7468
|
);
|
|
7469
|
+
return constructSource(implementation, data, authenticatedOptions);
|
|
7441
7470
|
}
|
|
7442
|
-
function
|
|
7443
|
-
|
|
7444
|
-
|
|
7445
|
-
|
|
7446
|
-
|
|
7471
|
+
function getCandidates(loaders, options) {
|
|
7472
|
+
const candidates = Array.isArray(loaders) ? [...loaders] : [loaders];
|
|
7473
|
+
const type = options.core?.type || options.type;
|
|
7474
|
+
return candidates.length > 1 && type && type !== "auto" ? candidates.filter((loader) => (loader.type ?? loader.id) === type) : candidates;
|
|
7475
|
+
}
|
|
7476
|
+
function getSelectionOptions(options) {
|
|
7477
|
+
return { ...options, core: { ...options.core, ignoreRegisteredLoaders: true, nothrow: true } };
|
|
7478
|
+
}
|
|
7479
|
+
function constructSource(loader, data, options) {
|
|
7480
|
+
if (loader.createDataSourceSync) {
|
|
7481
|
+
return loader.createDataSourceSync(data, options, coreApi);
|
|
7447
7482
|
}
|
|
7448
|
-
|
|
7483
|
+
throw new Error(
|
|
7484
|
+
`${loader.id} has no synchronous source factory. Use createDataSource() to preload the loader.`
|
|
7485
|
+
);
|
|
7449
7486
|
}
|
|
7450
7487
|
|
|
7451
7488
|
// src/lib/api/select-source.ts
|
|
@@ -7453,16 +7490,22 @@ var __exports__ = (() => {
|
|
|
7453
7490
|
const type = options?.type || "auto";
|
|
7454
7491
|
let selectedSource = null;
|
|
7455
7492
|
if (type === "auto") {
|
|
7456
|
-
selectedSource = selectLoaderSync(
|
|
7493
|
+
selectedSource = selectLoaderSync(
|
|
7494
|
+
url,
|
|
7495
|
+
sources,
|
|
7496
|
+
{ core: { nothrow: true } },
|
|
7497
|
+
void 0,
|
|
7498
|
+
"source"
|
|
7499
|
+
);
|
|
7457
7500
|
} else {
|
|
7458
|
-
selectedSource =
|
|
7501
|
+
selectedSource = getSourceOfType(type, sources);
|
|
7459
7502
|
}
|
|
7460
7503
|
if (!selectedSource && !options?.nothrow) {
|
|
7461
7504
|
throw new Error("Not a valid image source type");
|
|
7462
7505
|
}
|
|
7463
7506
|
return selectedSource;
|
|
7464
7507
|
}
|
|
7465
|
-
function
|
|
7508
|
+
function getSourceOfType(type, sources) {
|
|
7466
7509
|
for (const service of sources) {
|
|
7467
7510
|
if (service.type === type) {
|
|
7468
7511
|
return service;
|
|
@@ -7511,21 +7554,6 @@ var __exports__ = (() => {
|
|
|
7511
7554
|
|
|
7512
7555
|
// src/null-loader.ts
|
|
7513
7556
|
var VERSION6 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
7514
|
-
var NullWorkerLoader = {
|
|
7515
|
-
dataType: null,
|
|
7516
|
-
batchType: null,
|
|
7517
|
-
name: "Null loader",
|
|
7518
|
-
id: "null",
|
|
7519
|
-
module: "core",
|
|
7520
|
-
version: VERSION6,
|
|
7521
|
-
worker: true,
|
|
7522
|
-
mimeTypes: ["application/x.empty"],
|
|
7523
|
-
extensions: ["null"],
|
|
7524
|
-
tests: [() => false],
|
|
7525
|
-
options: {
|
|
7526
|
-
null: {}
|
|
7527
|
-
}
|
|
7528
|
-
};
|
|
7529
7557
|
var NullLoader = {
|
|
7530
7558
|
dataType: null,
|
|
7531
7559
|
batchType: null,
|