@loaders.gl/core 5.0.0-alpha.9 → 5.0.0-beta.10
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 +97 -0
- package/LICENSE +2 -30
- package/README.md +8 -1
- package/SCAN-README.md +224 -0
- package/SCHEMA-README.md +9 -0
- package/SCHEMA-UTILS-README.md +11 -0
- package/THIRD-PARTY-NOTICES.md +39 -0
- package/dist/arrow-geometry/binary-features.cjs +318 -0
- package/dist/arrow-geometry/binary-features.cjs.map +7 -0
- package/dist/arrow-geometry/binary-features.d.ts +44 -0
- package/dist/arrow-geometry/binary-features.d.ts.map +1 -0
- package/dist/arrow-geometry/binary-features.js +300 -0
- package/dist/arrow-geometry/binary-features.js.map +1 -0
- package/dist/arrow-geometry/binary-geometry-to-wkb.cjs +199 -0
- package/dist/arrow-geometry/binary-geometry-to-wkb.cjs.map +7 -0
- package/dist/arrow-geometry/binary-geometry-to-wkb.d.ts +28 -0
- package/dist/arrow-geometry/binary-geometry-to-wkb.d.ts.map +1 -0
- package/dist/arrow-geometry/binary-geometry-to-wkb.js +170 -0
- package/dist/arrow-geometry/binary-geometry-to-wkb.js.map +1 -0
- package/dist/arrow-geometry/feature-collection-to-arrow.cjs +138 -0
- package/dist/arrow-geometry/feature-collection-to-arrow.cjs.map +7 -0
- package/dist/arrow-geometry/feature-collection-to-arrow.d.ts +23 -0
- package/dist/arrow-geometry/feature-collection-to-arrow.d.ts.map +1 -0
- package/dist/arrow-geometry/feature-collection-to-arrow.js +128 -0
- package/dist/arrow-geometry/feature-collection-to-arrow.js.map +1 -0
- package/dist/arrow-geometry/feature-table.cjs +702 -0
- package/dist/arrow-geometry/feature-table.cjs.map +7 -0
- package/dist/arrow-geometry/feature-table.d.ts +51 -0
- package/dist/arrow-geometry/feature-table.d.ts.map +1 -0
- package/dist/arrow-geometry/feature-table.js +692 -0
- package/dist/arrow-geometry/feature-table.js.map +1 -0
- package/dist/arrow-geometry/geoarrow-builder.cjs +575 -0
- package/dist/arrow-geometry/geoarrow-builder.cjs.map +7 -0
- package/dist/arrow-geometry/geoarrow-builder.d.ts +179 -0
- package/dist/arrow-geometry/geoarrow-builder.d.ts.map +1 -0
- package/dist/arrow-geometry/geoarrow-builder.js +545 -0
- package/dist/arrow-geometry/geoarrow-builder.js.map +1 -0
- package/dist/arrow-geometry/geoarrow-union-kind.cjs +59 -0
- package/dist/arrow-geometry/geoarrow-union-kind.cjs.map +7 -0
- package/dist/arrow-geometry/geoarrow-union-kind.d.ts +5 -0
- package/dist/arrow-geometry/geoarrow-union-kind.d.ts.map +1 -0
- package/dist/arrow-geometry/geoarrow-union-kind.js +42 -0
- package/dist/arrow-geometry/geoarrow-union-kind.js.map +1 -0
- package/dist/arrow-geometry/geojson-table.cjs +412 -0
- package/dist/arrow-geometry/geojson-table.cjs.map +7 -0
- package/dist/arrow-geometry/geojson-table.d.ts +18 -0
- package/dist/arrow-geometry/geojson-table.d.ts.map +1 -0
- package/dist/arrow-geometry/geojson-table.js +132 -0
- package/dist/arrow-geometry/geojson-table.js.map +1 -0
- package/dist/arrow-geometry/geometry-codecs.cjs +139 -0
- package/dist/arrow-geometry/geometry-codecs.cjs.map +7 -0
- package/dist/arrow-geometry/geometry-codecs.d.ts +31 -0
- package/dist/arrow-geometry/geometry-codecs.d.ts.map +1 -0
- package/dist/arrow-geometry/geometry-codecs.js +130 -0
- package/dist/arrow-geometry/geometry-codecs.js.map +1 -0
- package/dist/arrow-geometry/geometry-field.cjs +229 -0
- package/dist/arrow-geometry/geometry-field.cjs.map +7 -0
- package/dist/arrow-geometry/geometry-field.d.ts +116 -0
- package/dist/arrow-geometry/geometry-field.d.ts.map +1 -0
- package/dist/arrow-geometry/geometry-field.js +251 -0
- package/dist/arrow-geometry/geometry-field.js.map +1 -0
- package/dist/arrow-geometry/geometry-to-wkt.cjs +96 -0
- package/dist/arrow-geometry/geometry-to-wkt.cjs.map +7 -0
- package/dist/arrow-geometry/geometry-to-wkt.d.ts +13 -0
- package/dist/arrow-geometry/geometry-to-wkt.d.ts.map +1 -0
- package/dist/arrow-geometry/geometry-to-wkt.js +102 -0
- package/dist/arrow-geometry/geometry-to-wkt.js.map +1 -0
- package/dist/arrow-geometry/geometry-utils.cjs +46 -0
- package/dist/arrow-geometry/geometry-utils.cjs.map +7 -0
- package/dist/arrow-geometry/geometry-utils.d.ts +4 -0
- package/dist/arrow-geometry/geometry-utils.d.ts.map +1 -0
- package/dist/arrow-geometry/geometry-utils.js +25 -0
- package/dist/arrow-geometry/geometry-utils.js.map +1 -0
- package/dist/arrow-geometry/index.cjs +37 -0
- package/dist/arrow-geometry/index.cjs.map +7 -0
- package/dist/arrow-geometry/index.d.ts +4 -0
- package/dist/arrow-geometry/index.d.ts.map +1 -0
- package/dist/arrow-geometry/index.js +7 -0
- package/dist/arrow-geometry/index.js.map +1 -0
- package/dist/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.cjs +319 -0
- package/dist/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.cjs.map +7 -0
- package/dist/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.d.ts +38 -0
- package/dist/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.d.ts.map +1 -0
- package/dist/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.js +382 -0
- package/dist/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.js.map +1 -0
- package/dist/arrow-geometry/legacy-binary/convert-geojson-to-binary-features.cjs +44 -0
- package/dist/arrow-geometry/legacy-binary/convert-geojson-to-binary-features.cjs.map +7 -0
- package/dist/arrow-geometry/legacy-binary/convert-geojson-to-binary-features.d.ts +23 -0
- package/dist/arrow-geometry/legacy-binary/convert-geojson-to-binary-features.d.ts.map +1 -0
- package/dist/arrow-geometry/legacy-binary/convert-geojson-to-binary-features.js +25 -0
- package/dist/arrow-geometry/legacy-binary/convert-geojson-to-binary-features.js.map +1 -0
- package/dist/arrow-geometry/legacy-binary/convert-geojson-to-flat-geojson.cjs +112 -0
- package/dist/arrow-geometry/legacy-binary/convert-geojson-to-flat-geojson.cjs.map +7 -0
- package/dist/arrow-geometry/legacy-binary/convert-geojson-to-flat-geojson.d.ts +19 -0
- package/dist/arrow-geometry/legacy-binary/convert-geojson-to-flat-geojson.d.ts.map +1 -0
- package/dist/arrow-geometry/legacy-binary/convert-geojson-to-flat-geojson.js +128 -0
- package/dist/arrow-geometry/legacy-binary/convert-geojson-to-flat-geojson.js.map +1 -0
- package/dist/arrow-geometry/legacy-binary/flat-geojson-to-binary-types.cjs +19 -0
- package/dist/arrow-geometry/legacy-binary/flat-geojson-to-binary-types.cjs.map +7 -0
- package/dist/arrow-geometry/legacy-binary/flat-geojson-to-binary-types.d.ts +58 -0
- package/dist/arrow-geometry/legacy-binary/flat-geojson-to-binary-types.d.ts.map +1 -0
- package/dist/arrow-geometry/legacy-binary/flat-geojson-to-binary-types.js +5 -0
- package/dist/arrow-geometry/legacy-binary/flat-geojson-to-binary-types.js.map +1 -0
- package/dist/arrow-geometry/legacy-binary/geometry-info.cjs +113 -0
- package/dist/arrow-geometry/legacy-binary/geometry-info.cjs.map +7 -0
- package/dist/arrow-geometry/legacy-binary/geometry-info.d.ts +31 -0
- package/dist/arrow-geometry/legacy-binary/geometry-info.d.ts.map +1 -0
- package/dist/arrow-geometry/legacy-binary/geometry-info.js +96 -0
- package/dist/arrow-geometry/legacy-binary/geometry-info.js.map +1 -0
- package/dist/arrow-geometry/legacy-binary/transform-coordinates.cjs +69 -0
- package/dist/arrow-geometry/legacy-binary/transform-coordinates.cjs.map +7 -0
- package/dist/arrow-geometry/legacy-binary/transform-coordinates.d.ts +18 -0
- package/dist/arrow-geometry/legacy-binary/transform-coordinates.d.ts.map +1 -0
- package/dist/arrow-geometry/legacy-binary/transform-coordinates.js +57 -0
- package/dist/arrow-geometry/legacy-binary/transform-coordinates.js.map +1 -0
- package/dist/arrow-geometry/legacy-binary.cjs +47 -0
- package/dist/arrow-geometry/legacy-binary.cjs.map +7 -0
- package/dist/arrow-geometry/legacy-binary.d.ts +11 -0
- package/dist/arrow-geometry/legacy-binary.d.ts.map +1 -0
- package/dist/arrow-geometry/legacy-binary.js +14 -0
- package/dist/arrow-geometry/legacy-binary.js.map +1 -0
- package/dist/arrow-geometry/native-geometry.cjs +215 -0
- package/dist/arrow-geometry/native-geometry.cjs.map +7 -0
- package/dist/arrow-geometry/native-geometry.d.ts +41 -0
- package/dist/arrow-geometry/native-geometry.d.ts.map +1 -0
- package/dist/arrow-geometry/native-geometry.js +224 -0
- package/dist/arrow-geometry/native-geometry.js.map +1 -0
- package/dist/arrow-geometry/sampled-bounds.cjs +52 -0
- package/dist/arrow-geometry/sampled-bounds.cjs.map +7 -0
- package/dist/arrow-geometry/sampled-bounds.d.ts +11 -0
- package/dist/arrow-geometry/sampled-bounds.d.ts.map +1 -0
- package/dist/arrow-geometry/sampled-bounds.js +35 -0
- package/dist/arrow-geometry/sampled-bounds.js.map +1 -0
- package/dist/arrow-geometry/triangulate-wkb.cjs +722 -0
- package/dist/arrow-geometry/triangulate-wkb.cjs.map +7 -0
- package/dist/arrow-geometry/triangulate-wkb.d.ts +7 -0
- package/dist/arrow-geometry/triangulate-wkb.d.ts.map +1 -0
- package/dist/arrow-geometry/triangulate-wkb.js +938 -0
- package/dist/arrow-geometry/triangulate-wkb.js.map +1 -0
- package/dist/arrow-geometry/wkb-arrow-utils.cjs +142 -0
- package/dist/arrow-geometry/wkb-arrow-utils.cjs.map +7 -0
- package/dist/arrow-geometry/wkb-arrow-utils.d.ts +63 -0
- package/dist/arrow-geometry/wkb-arrow-utils.d.ts.map +1 -0
- package/dist/arrow-geometry/wkb-arrow-utils.js +129 -0
- package/dist/arrow-geometry/wkb-arrow-utils.js.map +1 -0
- package/dist/arrow-geometry/wkb-builder.cjs +167 -0
- package/dist/arrow-geometry/wkb-builder.cjs.map +7 -0
- package/dist/arrow-geometry/wkb-builder.d.ts +81 -0
- package/dist/arrow-geometry/wkb-builder.d.ts.map +1 -0
- package/dist/arrow-geometry/wkb-builder.js +156 -0
- package/dist/arrow-geometry/wkb-builder.js.map +1 -0
- package/dist/arrow-geometry/wkb-statistics.cjs +52 -0
- package/dist/arrow-geometry/wkb-statistics.cjs.map +7 -0
- package/dist/arrow-geometry/wkb-statistics.d.ts +34 -0
- package/dist/arrow-geometry/wkb-statistics.d.ts.map +1 -0
- package/dist/arrow-geometry/wkb-statistics.js +33 -0
- package/dist/arrow-geometry/wkb-statistics.js.map +1 -0
- package/dist/arrow-geometry/wkb-table.cjs +65 -0
- package/dist/arrow-geometry/wkb-table.cjs.map +7 -0
- package/dist/arrow-geometry/wkb-table.d.ts +6 -0
- package/dist/arrow-geometry/wkb-table.d.ts.map +1 -0
- package/dist/arrow-geometry/wkb-table.js +44 -0
- package/dist/arrow-geometry/wkb-table.js.map +1 -0
- package/dist/arrow-geometry/wkb-types.cjs +49 -0
- package/dist/arrow-geometry/wkb-types.cjs.map +7 -0
- package/dist/arrow-geometry/wkb-types.d.ts +17 -0
- package/dist/arrow-geometry/wkb-types.d.ts.map +1 -0
- package/dist/arrow-geometry/wkb-types.js +21 -0
- package/dist/arrow-geometry/wkb-types.js.map +1 -0
- package/dist/arrow-worker-transport.cjs +173 -0
- package/dist/arrow-worker-transport.cjs.map +6 -0
- package/dist/arrow-worker-transport.d.ts +15 -0
- package/dist/arrow-worker-transport.d.ts.map +1 -0
- package/dist/arrow-worker-transport.js +151 -0
- package/dist/arrow-worker-transport.js.map +1 -0
- package/dist/cluster-source.cjs +6874 -0
- package/dist/cluster-source.cjs.map +6 -0
- package/dist/cluster-source.d.ts +2 -0
- package/dist/cluster-source.d.ts.map +1 -0
- package/dist/cluster-source.js +2 -0
- package/dist/cluster-source.js.map +1 -0
- package/dist/constants/index.cjs +39 -0
- package/dist/constants/index.cjs.map +6 -0
- package/dist/constants/index.d.ts +17 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/constants/index.js +20 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/dist.dev.js +3474 -952
- package/dist/dist.min.js +3 -3
- package/dist/federated-table-scan-source.cjs +2447 -0
- package/dist/federated-table-scan-source.cjs.map +6 -0
- package/dist/federated-table-scan-source.d.ts +2 -0
- package/dist/federated-table-scan-source.d.ts.map +1 -0
- package/dist/federated-table-scan-source.js +2 -0
- package/dist/federated-table-scan-source.js.map +1 -0
- package/dist/geoarrow/binary-polygon-to-geoarrow.cjs +97 -0
- package/dist/geoarrow/binary-polygon-to-geoarrow.cjs.map +7 -0
- package/dist/geoarrow/binary-polygon-to-geoarrow.d.ts +22 -0
- package/dist/geoarrow/binary-polygon-to-geoarrow.d.ts.map +1 -0
- package/dist/geoarrow/binary-polygon-to-geoarrow.js +94 -0
- package/dist/geoarrow/binary-polygon-to-geoarrow.js.map +1 -0
- package/dist/geoarrow/clustering/cluster-index.cjs +365 -0
- package/dist/geoarrow/clustering/cluster-index.cjs.map +7 -0
- package/dist/geoarrow/clustering/cluster-index.d.ts +96 -0
- package/dist/geoarrow/clustering/cluster-index.d.ts.map +1 -0
- package/dist/geoarrow/clustering/cluster-index.js +374 -0
- package/dist/geoarrow/clustering/cluster-index.js.map +1 -0
- package/dist/geoarrow/clustering/cluster-source.cjs +203 -0
- package/dist/geoarrow/clustering/cluster-source.cjs.map +7 -0
- package/dist/geoarrow/clustering/cluster-source.d.ts +64 -0
- package/dist/geoarrow/clustering/cluster-source.d.ts.map +1 -0
- package/dist/geoarrow/clustering/cluster-source.js +197 -0
- package/dist/geoarrow/clustering/cluster-source.js.map +1 -0
- package/dist/geoarrow/clustering/get-representative-point.cjs +176 -0
- package/dist/geoarrow/clustering/get-representative-point.cjs.map +7 -0
- package/dist/geoarrow/clustering/get-representative-point.d.ts +14 -0
- package/dist/geoarrow/clustering/get-representative-point.d.ts.map +1 -0
- package/dist/geoarrow/clustering/get-representative-point.js +172 -0
- package/dist/geoarrow/clustering/get-representative-point.js.map +1 -0
- package/dist/geoarrow/compatibility.cjs +94 -0
- package/dist/geoarrow/compatibility.cjs.map +7 -0
- package/dist/geoarrow/compatibility.d.ts +19 -0
- package/dist/geoarrow/compatibility.d.ts.map +1 -0
- package/dist/geoarrow/compatibility.js +17 -0
- package/dist/geoarrow/compatibility.js.map +1 -0
- package/dist/geoarrow/convert-table-to-geoarrow.cjs +185 -0
- package/dist/geoarrow/convert-table-to-geoarrow.cjs.map +7 -0
- package/dist/geoarrow/convert-table-to-geoarrow.d.ts +36 -0
- package/dist/geoarrow/convert-table-to-geoarrow.d.ts.map +1 -0
- package/dist/geoarrow/convert-table-to-geoarrow.js +179 -0
- package/dist/geoarrow/convert-table-to-geoarrow.js.map +1 -0
- package/dist/geoarrow/deprecated.cjs +68 -0
- package/dist/geoarrow/deprecated.cjs.map +7 -0
- package/dist/geoarrow/deprecated.d.ts +34 -0
- package/dist/geoarrow/deprecated.d.ts.map +1 -0
- package/dist/geoarrow/deprecated.js +37 -0
- package/dist/geoarrow/deprecated.js.map +1 -0
- package/dist/geoarrow/geo-column/geo-column-info.cjs +19 -0
- package/dist/geoarrow/geo-column/geo-column-info.cjs.map +7 -0
- package/dist/geoarrow/geo-column/geo-column-info.d.ts +20 -0
- package/dist/geoarrow/geo-column/geo-column-info.d.ts.map +1 -0
- package/dist/geoarrow/geo-column/geo-column-info.js +75 -0
- package/dist/geoarrow/geo-column/geo-column-info.js.map +1 -0
- package/dist/geoarrow/geo-column/geo-column.cjs +19 -0
- package/dist/geoarrow/geo-column/geo-column.cjs.map +7 -0
- package/dist/geoarrow/geo-column/geo-column.d.ts +61 -0
- package/dist/geoarrow/geo-column/geo-column.d.ts.map +1 -0
- package/dist/geoarrow/geo-column/geo-column.js +5 -0
- package/dist/geoarrow/geo-column/geo-column.js.map +1 -0
- package/dist/geoarrow/geoarrow-bounds.cjs +133 -0
- package/dist/geoarrow/geoarrow-bounds.cjs.map +7 -0
- package/dist/geoarrow/geoarrow-bounds.d.ts +27 -0
- package/dist/geoarrow/geoarrow-bounds.d.ts.map +1 -0
- package/dist/geoarrow/geoarrow-bounds.js +136 -0
- package/dist/geoarrow/geoarrow-bounds.js.map +1 -0
- package/dist/geoarrow/geoarrow-builder.cjs +31 -0
- package/dist/geoarrow/geoarrow-builder.cjs.map +7 -0
- package/dist/geoarrow/geoarrow-builder.d.ts +3 -0
- package/dist/geoarrow/geoarrow-builder.d.ts.map +1 -0
- package/dist/geoarrow/geoarrow-builder.js +5 -0
- package/dist/geoarrow/geoarrow-builder.js.map +1 -0
- package/dist/geoarrow/geoarrow-capabilities.cjs +443 -0
- package/dist/geoarrow/geoarrow-capabilities.cjs.map +7 -0
- package/dist/geoarrow/geoarrow-capabilities.d.ts +62 -0
- package/dist/geoarrow/geoarrow-capabilities.d.ts.map +1 -0
- package/dist/geoarrow/geoarrow-capabilities.js +444 -0
- package/dist/geoarrow/geoarrow-capabilities.js.map +1 -0
- package/dist/geoarrow/geoarrow-conformance.cjs +151 -0
- package/dist/geoarrow/geoarrow-conformance.cjs.map +7 -0
- package/dist/geoarrow/geoarrow-conformance.d.ts +49 -0
- package/dist/geoarrow/geoarrow-conformance.d.ts.map +1 -0
- package/dist/geoarrow/geoarrow-conformance.js +129 -0
- package/dist/geoarrow/geoarrow-conformance.js.map +1 -0
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.cjs +1364 -0
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.cjs.map +7 -0
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.d.ts +66 -0
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.d.ts.map +1 -0
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.js +1481 -0
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.js.map +1 -0
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.cjs +58 -0
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.cjs.map +7 -0
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.d.ts +17 -0
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.d.ts.map +1 -0
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.js +43 -0
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.js.map +1 -0
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.cjs +95 -0
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.cjs.map +7 -0
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.d.ts +24 -0
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.d.ts.map +1 -0
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.js +70 -0
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.js.map +1 -0
- package/dist/geoarrow/geoarrow-converter/geoarrow-geometry-converter.cjs +71 -0
- package/dist/geoarrow/geoarrow-converter/geoarrow-geometry-converter.cjs.map +7 -0
- package/dist/geoarrow/geoarrow-converter/geoarrow-geometry-converter.d.ts +20 -0
- package/dist/geoarrow/geoarrow-converter/geoarrow-geometry-converter.d.ts.map +1 -0
- package/dist/geoarrow/geoarrow-converter/geoarrow-geometry-converter.js +47 -0
- package/dist/geoarrow/geoarrow-converter/geoarrow-geometry-converter.js.map +1 -0
- package/dist/geoarrow/geoarrow-functions.cjs +148 -0
- package/dist/geoarrow/geoarrow-functions.cjs.map +7 -0
- package/dist/geoarrow/geoarrow-functions.d.ts +127 -0
- package/dist/geoarrow/geoarrow-functions.d.ts.map +1 -0
- package/dist/geoarrow/geoarrow-functions.js +240 -0
- package/dist/geoarrow/geoarrow-functions.js.map +1 -0
- package/dist/geoarrow/geoarrow-inspection.cjs +238 -0
- package/dist/geoarrow/geoarrow-inspection.cjs.map +7 -0
- package/dist/geoarrow/geoarrow-inspection.d.ts +28 -0
- package/dist/geoarrow/geoarrow-inspection.d.ts.map +1 -0
- package/dist/geoarrow/geoarrow-inspection.js +249 -0
- package/dist/geoarrow/geoarrow-inspection.js.map +1 -0
- package/dist/geoarrow/geoarrow-layout.cjs +558 -0
- package/dist/geoarrow/geoarrow-layout.cjs.map +7 -0
- package/dist/geoarrow/geoarrow-layout.d.ts +95 -0
- package/dist/geoarrow/geoarrow-layout.d.ts.map +1 -0
- package/dist/geoarrow/geoarrow-layout.js +605 -0
- package/dist/geoarrow/geoarrow-layout.js.map +1 -0
- package/dist/geoarrow/geoarrow-resource-limits.cjs +78 -0
- package/dist/geoarrow/geoarrow-resource-limits.cjs.map +7 -0
- package/dist/geoarrow/geoarrow-resource-limits.d.ts +23 -0
- package/dist/geoarrow/geoarrow-resource-limits.d.ts.map +1 -0
- package/dist/geoarrow/geoarrow-resource-limits.js +70 -0
- package/dist/geoarrow/geoarrow-resource-limits.js.map +1 -0
- package/dist/geoarrow/geoarrow-spatial-index.cjs +199 -0
- package/dist/geoarrow/geoarrow-spatial-index.cjs.map +7 -0
- package/dist/geoarrow/geoarrow-spatial-index.d.ts +51 -0
- package/dist/geoarrow/geoarrow-spatial-index.d.ts.map +1 -0
- package/dist/geoarrow/geoarrow-spatial-index.js +194 -0
- package/dist/geoarrow/geoarrow-spatial-index.js.map +1 -0
- package/dist/geoarrow/geoarrow-stream.cjs +274 -0
- package/dist/geoarrow/geoarrow-stream.cjs.map +7 -0
- package/dist/geoarrow/geoarrow-stream.d.ts +22 -0
- package/dist/geoarrow/geoarrow-stream.d.ts.map +1 -0
- package/dist/geoarrow/geoarrow-stream.js +259 -0
- package/dist/geoarrow/geoarrow-stream.js.map +1 -0
- package/dist/geoarrow/geoarrow-types.cjs +19 -0
- package/dist/geoarrow/geoarrow-types.cjs.map +7 -0
- package/dist/geoarrow/geoarrow-types.d.ts +50 -0
- package/dist/geoarrow/geoarrow-types.d.ts.map +1 -0
- package/dist/geoarrow/geoarrow-types.js +5 -0
- package/dist/geoarrow/geoarrow-types.js.map +1 -0
- package/dist/geoarrow/get-geoarrow-geometry-info.cjs +110 -0
- package/dist/geoarrow/get-geoarrow-geometry-info.cjs.map +7 -0
- package/dist/geoarrow/get-geoarrow-geometry-info.d.ts +37 -0
- package/dist/geoarrow/get-geoarrow-geometry-info.d.ts.map +1 -0
- package/dist/geoarrow/get-geoarrow-geometry-info.js +114 -0
- package/dist/geoarrow/get-geoarrow-geometry-info.js.map +1 -0
- package/dist/geoarrow/get-geoarrow-native-geometry.cjs +31 -0
- package/dist/geoarrow/get-geoarrow-native-geometry.cjs.map +7 -0
- package/dist/geoarrow/get-geoarrow-native-geometry.d.ts +2 -0
- package/dist/geoarrow/get-geoarrow-native-geometry.d.ts.map +1 -0
- package/dist/geoarrow/get-geoarrow-native-geometry.js +5 -0
- package/dist/geoarrow/get-geoarrow-native-geometry.js.map +1 -0
- package/dist/geoarrow/get-geoarrow-vertex-count.cjs +177 -0
- package/dist/geoarrow/get-geoarrow-vertex-count.cjs.map +7 -0
- package/dist/geoarrow/get-geoarrow-vertex-count.d.ts +18 -0
- package/dist/geoarrow/get-geoarrow-vertex-count.d.ts.map +1 -0
- package/dist/geoarrow/get-geoarrow-vertex-count.js +181 -0
- package/dist/geoarrow/get-geoarrow-vertex-count.js.map +1 -0
- package/dist/geoarrow/index.cjs +252 -0
- package/dist/geoarrow/index.cjs.map +7 -0
- package/dist/geoarrow/index.d.ts +58 -0
- package/dist/geoarrow/index.d.ts.map +1 -0
- package/dist/geoarrow/index.js +40 -0
- package/dist/geoarrow/index.js.map +1 -0
- package/dist/geoarrow/lib/binary-geometry-api/binary-geometry-info.cjs +67 -0
- package/dist/geoarrow/lib/binary-geometry-api/binary-geometry-info.cjs.map +7 -0
- package/dist/geoarrow/lib/binary-geometry-api/binary-geometry-info.d.ts +21 -0
- package/dist/geoarrow/lib/binary-geometry-api/binary-geometry-info.d.ts.map +1 -0
- package/dist/geoarrow/lib/binary-geometry-api/binary-geometry-info.js +49 -0
- package/dist/geoarrow/lib/binary-geometry-api/binary-geometry-info.js.map +1 -0
- package/dist/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.cjs +450 -0
- package/dist/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.cjs.map +7 -0
- package/dist/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.d.ts +21 -0
- package/dist/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.d.ts.map +1 -0
- package/dist/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.js +405 -0
- package/dist/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.js.map +1 -0
- package/dist/geoarrow/lib/feature-collection-converters/convert-binary-features-to-geojson.cjs +117 -0
- package/dist/geoarrow/lib/feature-collection-converters/convert-binary-features-to-geojson.cjs.map +7 -0
- package/dist/geoarrow/lib/feature-collection-converters/convert-binary-features-to-geojson.d.ts +16 -0
- package/dist/geoarrow/lib/feature-collection-converters/convert-binary-features-to-geojson.d.ts.map +1 -0
- package/dist/geoarrow/lib/feature-collection-converters/convert-binary-features-to-geojson.js +116 -0
- package/dist/geoarrow/lib/feature-collection-converters/convert-binary-features-to-geojson.js.map +1 -0
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.cjs +1123 -0
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.cjs.map +7 -0
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.d.ts +86 -0
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.d.ts.map +1 -0
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.js +878 -0
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.js.map +1 -0
- package/dist/geoarrow/lib/feature-collection-converters/feature-collection-converter/convert-feature-collection.cjs +156 -0
- package/dist/geoarrow/lib/feature-collection-converters/feature-collection-converter/convert-feature-collection.cjs.map +7 -0
- package/dist/geoarrow/lib/feature-collection-converters/feature-collection-converter/convert-feature-collection.d.ts +26 -0
- package/dist/geoarrow/lib/feature-collection-converters/feature-collection-converter/convert-feature-collection.d.ts.map +1 -0
- package/dist/geoarrow/lib/feature-collection-converters/feature-collection-converter/convert-feature-collection.js +119 -0
- package/dist/geoarrow/lib/feature-collection-converters/feature-collection-converter/convert-feature-collection.js.map +1 -0
- package/dist/geoarrow/lib/feature-collection-converters/feature-collection-converter/feature-collection-converter.cjs +74 -0
- package/dist/geoarrow/lib/feature-collection-converters/feature-collection-converter/feature-collection-converter.cjs.map +7 -0
- package/dist/geoarrow/lib/feature-collection-converters/feature-collection-converter/feature-collection-converter.d.ts +32 -0
- package/dist/geoarrow/lib/feature-collection-converters/feature-collection-converter/feature-collection-converter.d.ts.map +1 -0
- package/dist/geoarrow/lib/feature-collection-converters/feature-collection-converter/feature-collection-converter.js +53 -0
- package/dist/geoarrow/lib/feature-collection-converters/feature-collection-converter/feature-collection-converter.js.map +1 -0
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.cjs +31 -0
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.cjs.map +7 -0
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.d.ts +2 -0
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.d.ts.map +1 -0
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.js +2 -0
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.js.map +1 -0
- package/dist/geoarrow/lib/geometry-converters/convert-binary-geometry-to-geojson.cjs +115 -0
- package/dist/geoarrow/lib/geometry-converters/convert-binary-geometry-to-geojson.cjs.map +7 -0
- package/dist/geoarrow/lib/geometry-converters/convert-binary-geometry-to-geojson.d.ts +4 -0
- package/dist/geoarrow/lib/geometry-converters/convert-binary-geometry-to-geojson.d.ts.map +1 -0
- package/dist/geoarrow/lib/geometry-converters/convert-binary-geometry-to-geojson.js +102 -0
- package/dist/geoarrow/lib/geometry-converters/convert-binary-geometry-to-geojson.js.map +1 -0
- package/dist/geoarrow/lib/geometry-converters/convert-geoarrow-to-geojson.cjs +158 -0
- package/dist/geoarrow/lib/geometry-converters/convert-geoarrow-to-geojson.cjs.map +7 -0
- package/dist/geoarrow/lib/geometry-converters/convert-geoarrow-to-geojson.d.ts +7 -0
- package/dist/geoarrow/lib/geometry-converters/convert-geoarrow-to-geojson.d.ts.map +1 -0
- package/dist/geoarrow/lib/geometry-converters/convert-geoarrow-to-geojson.js +139 -0
- package/dist/geoarrow/lib/geometry-converters/convert-geoarrow-to-geojson.js.map +1 -0
- package/dist/geoarrow/lib/geometry-converters/geometry-converter/geometry-converter.cjs +126 -0
- package/dist/geoarrow/lib/geometry-converters/geometry-converter/geometry-converter.cjs.map +7 -0
- package/dist/geoarrow/lib/geometry-converters/geometry-converter/geometry-converter.d.ts +10 -0
- package/dist/geoarrow/lib/geometry-converters/geometry-converter/geometry-converter.d.ts.map +1 -0
- package/dist/geoarrow/lib/geometry-converters/geometry-converter/geometry-converter.js +123 -0
- package/dist/geoarrow/lib/geometry-converters/geometry-converter/geometry-converter.js.map +1 -0
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.cjs +94 -0
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.cjs.map +7 -0
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.d.ts +8 -0
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.d.ts.map +1 -0
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.js +82 -0
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.js.map +1 -0
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.cjs +109 -0
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.cjs.map +7 -0
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.d.ts +37 -0
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.d.ts.map +1 -0
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.js +103 -0
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.js.map +1 -0
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/wkb-types.cjs +67 -0
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/wkb-types.cjs.map +7 -0
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/wkb-types.d.ts +64 -0
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/wkb-types.d.ts.map +1 -0
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/wkb-types.js +47 -0
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/wkb-types.js.map +1 -0
- package/dist/geoarrow/lib/geometry-predicates.cjs +133 -0
- package/dist/geoarrow/lib/geometry-predicates.cjs.map +7 -0
- package/dist/geoarrow/lib/geometry-predicates.d.ts +7 -0
- package/dist/geoarrow/lib/geometry-predicates.d.ts.map +1 -0
- package/dist/geoarrow/lib/geometry-predicates.js +138 -0
- package/dist/geoarrow/lib/geometry-predicates.js.map +1 -0
- package/dist/geoarrow/lib/kernels/decode-wkt-native.cjs +589 -0
- package/dist/geoarrow/lib/kernels/decode-wkt-native.cjs.map +7 -0
- package/dist/geoarrow/lib/kernels/decode-wkt-native.d.ts +48 -0
- package/dist/geoarrow/lib/kernels/decode-wkt-native.d.ts.map +1 -0
- package/dist/geoarrow/lib/kernels/decode-wkt-native.js +618 -0
- package/dist/geoarrow/lib/kernels/decode-wkt-native.js.map +1 -0
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.cjs +255 -0
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.cjs.map +7 -0
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.d.ts +12 -0
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.d.ts.map +1 -0
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.js +257 -0
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.js.map +1 -0
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.cjs +290 -0
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.cjs.map +7 -0
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.d.ts +16 -0
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.d.ts.map +1 -0
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.js +334 -0
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.js.map +1 -0
- package/dist/geoarrow/lib/kernels/geoarrow-union.cjs +102 -0
- package/dist/geoarrow/lib/kernels/geoarrow-union.cjs.map +7 -0
- package/dist/geoarrow/lib/kernels/geoarrow-union.d.ts +8 -0
- package/dist/geoarrow/lib/kernels/geoarrow-union.d.ts.map +1 -0
- package/dist/geoarrow/lib/kernels/geoarrow-union.js +90 -0
- package/dist/geoarrow/lib/kernels/geoarrow-union.js.map +1 -0
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.cjs +92 -0
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.cjs.map +7 -0
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.d.ts +8 -0
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.d.ts.map +1 -0
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.js +70 -0
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.js.map +1 -0
- package/dist/geoarrow/lib/table-converters/convert-wkb-table-to-geojson.cjs +34 -0
- package/dist/geoarrow/lib/table-converters/convert-wkb-table-to-geojson.cjs.map +7 -0
- package/dist/geoarrow/lib/table-converters/convert-wkb-table-to-geojson.d.ts +6 -0
- package/dist/geoarrow/lib/table-converters/convert-wkb-table-to-geojson.d.ts.map +1 -0
- package/dist/geoarrow/lib/table-converters/convert-wkb-table-to-geojson.js +11 -0
- package/dist/geoarrow/lib/table-converters/convert-wkb-table-to-geojson.js.map +1 -0
- package/dist/geoarrow/map-geoarrow-coordinates.cjs +228 -0
- package/dist/geoarrow/map-geoarrow-coordinates.cjs.map +7 -0
- package/dist/geoarrow/map-geoarrow-coordinates.d.ts +16 -0
- package/dist/geoarrow/map-geoarrow-coordinates.d.ts.map +1 -0
- package/dist/geoarrow/map-geoarrow-coordinates.js +182 -0
- package/dist/geoarrow/map-geoarrow-coordinates.js.map +1 -0
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.cjs +88 -0
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.cjs.map +7 -0
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.d.ts +11 -0
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.d.ts.map +1 -0
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.js +41 -0
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.js.map +1 -0
- package/dist/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.cjs +73 -0
- package/dist/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.cjs.map +7 -0
- package/dist/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.d.ts +11 -0
- package/dist/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.d.ts.map +1 -0
- package/dist/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.js +32 -0
- package/dist/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.js.map +1 -0
- package/dist/geoarrow/mesharrow/get-bounding-box.cjs +49 -0
- package/dist/geoarrow/mesharrow/get-bounding-box.cjs.map +7 -0
- package/dist/geoarrow/mesharrow/get-bounding-box.d.ts +5 -0
- package/dist/geoarrow/mesharrow/get-bounding-box.d.ts.map +1 -0
- package/dist/geoarrow/mesharrow/get-bounding-box.js +32 -0
- package/dist/geoarrow/mesharrow/get-bounding-box.js.map +1 -0
- package/dist/geoarrow/mesharrow/get-deck-binary-data.cjs +74 -0
- package/dist/geoarrow/mesharrow/get-deck-binary-data.cjs.map +7 -0
- package/dist/geoarrow/mesharrow/get-deck-binary-data.d.ts +13 -0
- package/dist/geoarrow/mesharrow/get-deck-binary-data.d.ts.map +1 -0
- package/dist/geoarrow/mesharrow/get-deck-binary-data.js +49 -0
- package/dist/geoarrow/mesharrow/get-deck-binary-data.js.map +1 -0
- package/dist/geoarrow/mesharrow/mesh-accessors.cjs +47 -0
- package/dist/geoarrow/mesharrow/mesh-accessors.cjs.map +7 -0
- package/dist/geoarrow/mesharrow/mesh-accessors.d.ts +8 -0
- package/dist/geoarrow/mesharrow/mesh-accessors.d.ts.map +1 -0
- package/dist/geoarrow/mesharrow/mesh-accessors.js +19 -0
- package/dist/geoarrow/mesharrow/mesh-accessors.js.map +1 -0
- package/dist/geoarrow/metadata/geoarrow-metadata.cjs +135 -0
- package/dist/geoarrow/metadata/geoarrow-metadata.cjs.map +7 -0
- package/dist/geoarrow/metadata/geoarrow-metadata.d.ts +15 -0
- package/dist/geoarrow/metadata/geoarrow-metadata.d.ts.map +1 -0
- package/dist/geoarrow/metadata/geoarrow-metadata.js +81 -0
- package/dist/geoarrow/metadata/geoarrow-metadata.js.map +1 -0
- package/dist/geoarrow/metadata/geoparquet-metadata-schema.cjs +90 -0
- package/dist/geoarrow/metadata/geoparquet-metadata-schema.cjs.map +7 -0
- package/dist/geoarrow/metadata/geoparquet-metadata-schema.d.ts +79 -0
- package/dist/geoarrow/metadata/geoparquet-metadata-schema.d.ts.map +1 -0
- package/dist/geoarrow/metadata/geoparquet-metadata-schema.js +70 -0
- package/dist/geoarrow/metadata/geoparquet-metadata-schema.js.map +1 -0
- package/dist/geoarrow/metadata/geoparquet-metadata.cjs +39 -0
- package/dist/geoarrow/metadata/geoparquet-metadata.cjs.map +7 -0
- package/dist/geoarrow/metadata/geoparquet-metadata.d.ts +3 -0
- package/dist/geoarrow/metadata/geoparquet-metadata.d.ts.map +1 -0
- package/dist/geoarrow/metadata/geoparquet-metadata.js +5 -0
- package/dist/geoarrow/metadata/geoparquet-metadata.js.map +1 -0
- package/dist/geoarrow/metadata/merge-geoarrow-metadata.cjs +244 -0
- package/dist/geoarrow/metadata/merge-geoarrow-metadata.cjs.map +7 -0
- package/dist/geoarrow/metadata/merge-geoarrow-metadata.d.ts +63 -0
- package/dist/geoarrow/metadata/merge-geoarrow-metadata.d.ts.map +1 -0
- package/dist/geoarrow/metadata/merge-geoarrow-metadata.js +243 -0
- package/dist/geoarrow/metadata/merge-geoarrow-metadata.js.map +1 -0
- package/dist/geoarrow/metadata/metadata-utils.cjs +33 -0
- package/dist/geoarrow/metadata/metadata-utils.cjs.map +7 -0
- package/dist/geoarrow/metadata/metadata-utils.d.ts +3 -0
- package/dist/geoarrow/metadata/metadata-utils.d.ts.map +1 -0
- package/dist/geoarrow/metadata/metadata-utils.js +5 -0
- package/dist/geoarrow/metadata/metadata-utils.js.map +1 -0
- package/dist/geoarrow/rewind-geoarrow.cjs +219 -0
- package/dist/geoarrow/rewind-geoarrow.cjs.map +7 -0
- package/dist/geoarrow/rewind-geoarrow.d.ts +23 -0
- package/dist/geoarrow/rewind-geoarrow.d.ts.map +1 -0
- package/dist/geoarrow/rewind-geoarrow.js +204 -0
- package/dist/geoarrow/rewind-geoarrow.js.map +1 -0
- package/dist/index.cjs +1047 -1400
- package/dist/index.cjs.map +3 -3
- package/dist/index.d.ts +11 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -12
- package/dist/index.js.map +1 -1
- package/dist/iterators/make-iterator/make-iterator.js +1 -1
- package/dist/iterators/make-iterator/make-iterator.js.map +1 -1
- package/dist/iterators/make-iterator/make-stream-iterator.js +1 -1
- package/dist/iterators/make-iterator/make-stream-iterator.js.map +1 -1
- package/dist/iterators/make-iterator/make-string-iterator.js +1 -1
- package/dist/iterators/make-iterator/make-string-iterator.js.map +1 -1
- package/dist/lib/api/core-api.d.ts +1 -1
- package/dist/lib/api/core-api.d.ts.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-table.d.ts +2 -2
- package/dist/lib/api/encode-table.d.ts.map +1 -1
- package/dist/lib/api/encode-table.js +1 -1
- package/dist/lib/api/encode-table.js.map +1 -1
- package/dist/lib/api/encode.d.ts +2 -2
- package/dist/lib/api/encode.d.ts.map +1 -1
- package/dist/lib/api/encode.js +13 -4
- 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 +1 -1
- package/dist/lib/api/load-in-batches.js.map +1 -1
- package/dist/lib/api/load-loader.d.ts +6 -4
- package/dist/lib/api/load-loader.d.ts.map +1 -1
- package/dist/lib/api/load-loader.js +118 -10
- 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 +17 -67
- package/dist/lib/api/load.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 +15 -8
- 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 +104 -12
- 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 +8 -6
- 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 +32 -19
- package/dist/lib/api/parse.js.map +1 -1
- package/dist/lib/api/preload.d.ts +6 -3
- package/dist/lib/api/preload.d.ts.map +1 -1
- package/dist/lib/api/preload.js +4 -5
- package/dist/lib/api/preload.js.map +1 -1
- package/dist/lib/api/register-loaders.d.ts +1 -1
- package/dist/lib/api/register-loaders.d.ts.map +1 -1
- package/dist/lib/api/select-loader.d.ts +5 -3
- 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 +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/common.d.ts +1 -1
- package/dist/lib/common.d.ts.map +1 -1
- package/dist/lib/fetch/fetch-file.js +2 -2
- package/dist/lib/fetch/fetch-file.js.map +1 -1
- package/dist/lib/filesystems/browser-filesystem.d.ts +1 -1
- package/dist/lib/filesystems/browser-filesystem.d.ts.map +1 -1
- package/dist/lib/filesystems/browser-filesystem.js +1 -1
- package/dist/lib/filesystems/browser-filesystem.js.map +1 -1
- package/dist/lib/init.js +2 -2
- package/dist/lib/init.js.map +1 -1
- package/dist/lib/loader-utils/get-data.d.ts +1 -1
- package/dist/lib/loader-utils/get-data.d.ts.map +1 -1
- package/dist/lib/loader-utils/get-data.js +1 -1
- package/dist/lib/loader-utils/get-data.js.map +1 -1
- package/dist/lib/loader-utils/get-fetch-function.d.ts +1 -1
- package/dist/lib/loader-utils/get-fetch-function.d.ts.map +1 -1
- package/dist/lib/loader-utils/get-fetch-function.js +6 -4
- package/dist/lib/loader-utils/get-fetch-function.js.map +1 -1
- package/dist/lib/loader-utils/loader-context.d.ts +1 -1
- package/dist/lib/loader-utils/loader-context.d.ts.map +1 -1
- package/dist/lib/loader-utils/loader-context.js +7 -1
- package/dist/lib/loader-utils/loader-context.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 +16 -0
- package/dist/lib/loader-utils/native-arrow.d.ts.map +1 -0
- package/dist/lib/loader-utils/native-arrow.js +84 -0
- package/dist/lib/loader-utils/native-arrow.js.map +1 -0
- package/dist/lib/loader-utils/normalize-loader.d.ts +1 -1
- package/dist/lib/loader-utils/normalize-loader.d.ts.map +1 -1
- package/dist/lib/loader-utils/normalize-loader.js +1 -1
- package/dist/lib/loader-utils/normalize-loader.js.map +1 -1
- package/dist/lib/loader-utils/option-defaults.d.ts +4 -3
- package/dist/lib/loader-utils/option-defaults.d.ts.map +1 -1
- package/dist/lib/loader-utils/option-defaults.js +12 -11
- package/dist/lib/loader-utils/option-defaults.js.map +1 -1
- package/dist/lib/loader-utils/option-utils.d.ts +1 -7
- 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/lib/utils/resource-utils.js +1 -1
- package/dist/lib/utils/resource-utils.js.map +1 -1
- package/dist/lib/utils/response-utils.js +1 -1
- package/dist/lib/utils/response-utils.js.map +1 -1
- package/dist/loader-utils/format-types.d.ts +35 -0
- package/dist/loader-utils/format-types.d.ts.map +1 -0
- package/dist/loader-utils/format-types.js +5 -0
- package/dist/loader-utils/format-types.js.map +1 -0
- package/dist/loader-utils/index.cjs +12318 -0
- package/dist/loader-utils/index.cjs.map +6 -0
- package/dist/loader-utils/index.d.ts +133 -0
- package/dist/loader-utils/index.d.ts.map +1 -0
- package/dist/loader-utils/index.js +96 -0
- package/dist/loader-utils/index.js.map +1 -0
- package/dist/loader-utils/json-loader.d.ts +27 -0
- package/dist/loader-utils/json-loader.d.ts.map +1 -0
- package/dist/loader-utils/json-loader.js +32 -0
- package/dist/loader-utils/json-loader.js.map +1 -0
- package/dist/loader-utils/lib/binary-utils/array-buffer-utils.d.ts +32 -0
- package/dist/loader-utils/lib/binary-utils/array-buffer-utils.d.ts.map +1 -0
- package/dist/loader-utils/lib/binary-utils/array-buffer-utils.js +88 -0
- package/dist/loader-utils/lib/binary-utils/array-buffer-utils.js.map +1 -0
- package/dist/loader-utils/lib/binary-utils/binary-chunk-reader.d.ts +67 -0
- package/dist/loader-utils/lib/binary-utils/binary-chunk-reader.d.ts.map +1 -0
- package/dist/loader-utils/lib/binary-utils/binary-chunk-reader.js +245 -0
- package/dist/loader-utils/lib/binary-utils/binary-chunk-reader.js.map +1 -0
- package/dist/loader-utils/lib/binary-utils/dataview-copy-utils.d.ts +43 -0
- package/dist/loader-utils/lib/binary-utils/dataview-copy-utils.d.ts.map +1 -0
- package/dist/loader-utils/lib/binary-utils/dataview-copy-utils.js +92 -0
- package/dist/loader-utils/lib/binary-utils/dataview-copy-utils.js.map +1 -0
- package/dist/loader-utils/lib/binary-utils/encode-array-buffer-to-base64.d.ts +3 -0
- package/dist/loader-utils/lib/binary-utils/encode-array-buffer-to-base64.d.ts.map +1 -0
- package/dist/loader-utils/lib/binary-utils/encode-array-buffer-to-base64.js +15 -0
- package/dist/loader-utils/lib/binary-utils/encode-array-buffer-to-base64.js.map +1 -0
- package/dist/loader-utils/lib/binary-utils/get-first-characters.d.ts +17 -0
- package/dist/loader-utils/lib/binary-utils/get-first-characters.d.ts.map +1 -0
- package/dist/loader-utils/lib/binary-utils/get-first-characters.js +43 -0
- package/dist/loader-utils/lib/binary-utils/get-first-characters.js.map +1 -0
- package/dist/loader-utils/lib/binary-utils/hex-transcoder.d.ts +15 -0
- package/dist/loader-utils/lib/binary-utils/hex-transcoder.d.ts.map +1 -0
- package/dist/loader-utils/lib/binary-utils/hex-transcoder.js +51 -0
- package/dist/loader-utils/lib/binary-utils/hex-transcoder.js.map +1 -0
- package/dist/loader-utils/lib/binary-utils/memory-conversion-utils.d.ts +20 -0
- package/dist/loader-utils/lib/binary-utils/memory-conversion-utils.d.ts.map +1 -0
- package/dist/loader-utils/lib/binary-utils/memory-conversion-utils.js +82 -0
- package/dist/loader-utils/lib/binary-utils/memory-conversion-utils.js.map +1 -0
- package/dist/loader-utils/lib/binary-utils/memory-copy-utils.d.ts +25 -0
- package/dist/loader-utils/lib/binary-utils/memory-copy-utils.d.ts.map +1 -0
- package/dist/loader-utils/lib/binary-utils/memory-copy-utils.js +59 -0
- package/dist/loader-utils/lib/binary-utils/memory-copy-utils.js.map +1 -0
- package/dist/loader-utils/lib/crs/crs-reprojection.d.ts +31 -0
- package/dist/loader-utils/lib/crs/crs-reprojection.d.ts.map +1 -0
- package/dist/loader-utils/lib/crs/crs-reprojection.js +20 -0
- package/dist/loader-utils/lib/crs/crs-reprojection.js.map +1 -0
- package/dist/loader-utils/lib/env-utils/assert.d.ts +6 -0
- package/dist/loader-utils/lib/env-utils/assert.d.ts.map +1 -0
- package/dist/loader-utils/lib/env-utils/assert.js +13 -0
- package/dist/loader-utils/lib/env-utils/assert.js.map +1 -0
- package/dist/loader-utils/lib/env-utils/globals.d.ts +15 -0
- package/dist/loader-utils/lib/env-utils/globals.d.ts.map +1 -0
- package/dist/loader-utils/lib/env-utils/globals.js +28 -0
- package/dist/loader-utils/lib/env-utils/globals.js.map +1 -0
- package/dist/loader-utils/lib/files/array-buffer-file.d.ts +21 -0
- package/dist/loader-utils/lib/files/array-buffer-file.d.ts.map +1 -0
- package/dist/loader-utils/lib/files/array-buffer-file.js +36 -0
- package/dist/loader-utils/lib/files/array-buffer-file.js.map +1 -0
- package/dist/loader-utils/lib/files/blob-file.d.ts +19 -0
- package/dist/loader-utils/lib/files/blob-file.d.ts.map +1 -0
- package/dist/loader-utils/lib/files/blob-file.js +39 -0
- package/dist/loader-utils/lib/files/blob-file.js.map +1 -0
- package/dist/loader-utils/lib/files/file.d.ts +33 -0
- package/dist/loader-utils/lib/files/file.d.ts.map +1 -0
- package/dist/loader-utils/lib/files/file.js +5 -0
- package/dist/loader-utils/lib/files/file.js.map +1 -0
- package/dist/loader-utils/lib/files/http-file-transport.d.ts +41 -0
- package/dist/loader-utils/lib/files/http-file-transport.d.ts.map +1 -0
- package/dist/loader-utils/lib/files/http-file-transport.js +334 -0
- package/dist/loader-utils/lib/files/http-file-transport.js.map +1 -0
- package/dist/loader-utils/lib/files/http-file-types.d.ts +51 -0
- package/dist/loader-utils/lib/files/http-file-types.d.ts.map +1 -0
- package/dist/loader-utils/lib/files/http-file-types.js +5 -0
- package/dist/loader-utils/lib/files/http-file-types.js.map +1 -0
- package/dist/loader-utils/lib/files/http-file.d.ts +55 -0
- package/dist/loader-utils/lib/files/http-file.d.ts.map +1 -0
- package/dist/loader-utils/lib/files/http-file.js +213 -0
- package/dist/loader-utils/lib/files/http-file.js.map +1 -0
- package/dist/loader-utils/lib/files/node-file-facade.d.ts +22 -0
- package/dist/loader-utils/lib/files/node-file-facade.d.ts.map +1 -0
- package/dist/loader-utils/lib/files/node-file-facade.js +45 -0
- package/dist/loader-utils/lib/files/node-file-facade.js.map +1 -0
- package/dist/loader-utils/lib/files/read-range-response.d.ts +3 -0
- package/dist/loader-utils/lib/files/read-range-response.d.ts.map +1 -0
- package/dist/loader-utils/lib/files/read-range-response.js +62 -0
- package/dist/loader-utils/lib/files/read-range-response.js.map +1 -0
- package/dist/loader-utils/lib/files/sources.d.ts +1 -0
- package/dist/loader-utils/lib/files/sources.d.ts.map +1 -0
- package/dist/loader-utils/lib/files/sources.js +155 -0
- package/dist/loader-utils/lib/files/sources.js.map +1 -0
- package/dist/loader-utils/lib/filesystems/filesystem.d.ts +33 -0
- package/dist/loader-utils/lib/filesystems/filesystem.d.ts.map +1 -0
- package/dist/loader-utils/lib/filesystems/filesystem.js +5 -0
- package/dist/loader-utils/lib/filesystems/filesystem.js.map +1 -0
- package/dist/loader-utils/lib/filesystems/node-filesystem-facade.d.ts +23 -0
- package/dist/loader-utils/lib/filesystems/node-filesystem-facade.d.ts.map +1 -0
- package/dist/loader-utils/lib/filesystems/node-filesystem-facade.js +48 -0
- package/dist/loader-utils/lib/filesystems/node-filesystem-facade.js.map +1 -0
- package/dist/loader-utils/lib/iterators/async-iteration.d.ts +20 -0
- package/dist/loader-utils/lib/iterators/async-iteration.d.ts.map +1 -0
- package/dist/loader-utils/lib/iterators/async-iteration.js +102 -0
- package/dist/loader-utils/lib/iterators/async-iteration.js.map +1 -0
- package/dist/loader-utils/lib/iterators/text-iterators.d.ts +19 -0
- package/dist/loader-utils/lib/iterators/text-iterators.d.ts.map +1 -0
- package/dist/loader-utils/lib/iterators/text-iterators.js +60 -0
- package/dist/loader-utils/lib/iterators/text-iterators.js.map +1 -0
- package/dist/loader-utils/lib/javascript-utils/is-type.d.ts +59 -0
- package/dist/loader-utils/lib/javascript-utils/is-type.d.ts.map +1 -0
- package/dist/loader-utils/lib/javascript-utils/is-type.js +68 -0
- package/dist/loader-utils/lib/javascript-utils/is-type.js.map +1 -0
- package/dist/loader-utils/lib/laz/laz-arithmetic-encoder.d.ts +118 -0
- package/dist/loader-utils/lib/laz/laz-arithmetic-encoder.d.ts.map +1 -0
- package/dist/loader-utils/lib/laz/laz-arithmetic-encoder.js +427 -0
- package/dist/loader-utils/lib/laz/laz-arithmetic-encoder.js.map +1 -0
- package/dist/loader-utils/lib/laz/laz-chunk-decoder.d.ts +204 -0
- package/dist/loader-utils/lib/laz/laz-chunk-decoder.d.ts.map +1 -0
- package/dist/loader-utils/lib/laz/laz-chunk-decoder.js +4226 -0
- package/dist/loader-utils/lib/laz/laz-chunk-decoder.js.map +1 -0
- package/dist/loader-utils/lib/laz/laz-chunk-encoder.d.ts +40 -0
- package/dist/loader-utils/lib/laz/laz-chunk-encoder.d.ts.map +1 -0
- package/dist/loader-utils/lib/laz/laz-chunk-encoder.js +1518 -0
- package/dist/loader-utils/lib/laz/laz-chunk-encoder.js.map +1 -0
- package/dist/loader-utils/lib/log-utils/log.d.ts +26 -0
- package/dist/loader-utils/lib/log-utils/log.d.ts.map +1 -0
- package/dist/loader-utils/lib/log-utils/log.js +52 -0
- package/dist/loader-utils/lib/log-utils/log.js.map +1 -0
- package/dist/loader-utils/lib/module-utils/initialize-wasm-module.d.ts +10 -0
- package/dist/loader-utils/lib/module-utils/initialize-wasm-module.d.ts.map +1 -0
- package/dist/loader-utils/lib/module-utils/initialize-wasm-module.js +44 -0
- package/dist/loader-utils/lib/module-utils/initialize-wasm-module.js.map +1 -0
- package/dist/loader-utils/lib/module-utils/js-module-utils.d.ts +18 -0
- package/dist/loader-utils/lib/module-utils/js-module-utils.d.ts.map +1 -0
- package/dist/loader-utils/lib/module-utils/js-module-utils.js +40 -0
- package/dist/loader-utils/lib/module-utils/js-module-utils.js.map +1 -0
- package/dist/loader-utils/lib/node/buffer.browser.d.ts +11 -0
- package/dist/loader-utils/lib/node/buffer.browser.d.ts.map +1 -0
- package/dist/loader-utils/lib/node/buffer.browser.js +20 -0
- package/dist/loader-utils/lib/node/buffer.browser.js.map +1 -0
- package/dist/loader-utils/lib/node/buffer.d.ts +11 -0
- package/dist/loader-utils/lib/node/buffer.d.ts.map +1 -0
- package/dist/loader-utils/lib/node/buffer.js +35 -0
- package/dist/loader-utils/lib/node/buffer.js.map +1 -0
- package/dist/loader-utils/lib/node/fs.browser.d.ts +2 -0
- package/dist/loader-utils/lib/node/fs.browser.d.ts.map +1 -0
- package/dist/loader-utils/lib/node/fs.browser.js +5 -0
- package/dist/loader-utils/lib/node/fs.browser.js.map +1 -0
- package/dist/loader-utils/lib/node/promisify.d.ts +13 -0
- package/dist/loader-utils/lib/node/promisify.d.ts.map +1 -0
- package/dist/loader-utils/lib/node/promisify.js +19 -0
- package/dist/loader-utils/lib/node/promisify.js.map +1 -0
- package/dist/loader-utils/lib/node/stream.browser.d.ts +2 -0
- package/dist/loader-utils/lib/node/stream.browser.d.ts.map +1 -0
- package/dist/loader-utils/lib/node/stream.browser.js +5 -0
- package/dist/loader-utils/lib/node/stream.browser.js.map +1 -0
- package/dist/loader-utils/lib/node/stream.d.ts +6 -0
- package/dist/loader-utils/lib/node/stream.d.ts.map +1 -0
- package/dist/loader-utils/lib/node/stream.js +8 -0
- package/dist/loader-utils/lib/node/stream.js.map +1 -0
- package/dist/loader-utils/lib/option-utils/merge-options.d.ts +12 -0
- package/dist/loader-utils/lib/option-utils/merge-options.d.ts.map +1 -0
- package/dist/loader-utils/lib/option-utils/merge-options.js +34 -0
- package/dist/loader-utils/lib/option-utils/merge-options.js.map +1 -0
- 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/parser-utils/parse-json.d.ts +5 -0
- package/dist/loader-utils/lib/parser-utils/parse-json.d.ts.map +1 -0
- package/dist/loader-utils/lib/parser-utils/parse-json.js +16 -0
- package/dist/loader-utils/lib/parser-utils/parse-json.js.map +1 -0
- package/dist/loader-utils/lib/path-utils/cached-uri-resolver.d.ts +35 -0
- package/dist/loader-utils/lib/path-utils/cached-uri-resolver.d.ts.map +1 -0
- package/dist/loader-utils/lib/path-utils/cached-uri-resolver.js +64 -0
- package/dist/loader-utils/lib/path-utils/cached-uri-resolver.js.map +1 -0
- package/dist/loader-utils/lib/path-utils/file-aliases.d.ts +17 -0
- package/dist/loader-utils/lib/path-utils/file-aliases.d.ts.map +1 -0
- package/dist/loader-utils/lib/path-utils/file-aliases.js +44 -0
- package/dist/loader-utils/lib/path-utils/file-aliases.js.map +1 -0
- package/dist/loader-utils/lib/path-utils/get-cwd.d.ts +3 -0
- package/dist/loader-utils/lib/path-utils/get-cwd.d.ts.map +1 -0
- package/dist/loader-utils/lib/path-utils/get-cwd.js +12 -0
- package/dist/loader-utils/lib/path-utils/get-cwd.js.map +1 -0
- package/dist/loader-utils/lib/path-utils/path.d.ts +24 -0
- package/dist/loader-utils/lib/path-utils/path.d.ts.map +1 -0
- package/dist/loader-utils/lib/path-utils/path.js +173 -0
- package/dist/loader-utils/lib/path-utils/path.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/abort-utils.d.ts +5 -0
- package/dist/loader-utils/lib/request-utils/abort-utils.d.ts.map +1 -0
- package/dist/loader-utils/lib/request-utils/abort-utils.js +59 -0
- package/dist/loader-utils/lib/request-utils/abort-utils.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/authentication.d.ts +56 -0
- package/dist/loader-utils/lib/request-utils/authentication.d.ts.map +1 -0
- package/dist/loader-utils/lib/request-utils/authentication.js +67 -0
- package/dist/loader-utils/lib/request-utils/authentication.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/parse-content-type.d.ts +7 -0
- package/dist/loader-utils/lib/request-utils/parse-content-type.d.ts.map +1 -0
- package/dist/loader-utils/lib/request-utils/parse-content-type.js +20 -0
- package/dist/loader-utils/lib/request-utils/parse-content-type.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/range-request-cache.d.ts +70 -0
- package/dist/loader-utils/lib/request-utils/range-request-cache.d.ts.map +1 -0
- package/dist/loader-utils/lib/request-utils/range-request-cache.js +203 -0
- package/dist/loader-utils/lib/request-utils/range-request-cache.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/range-request-scheduler.d.ts +201 -0
- package/dist/loader-utils/lib/request-utils/range-request-scheduler.d.ts.map +1 -0
- package/dist/loader-utils/lib/request-utils/range-request-scheduler.js +636 -0
- package/dist/loader-utils/lib/request-utils/range-request-scheduler.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/request-cache.d.ts +62 -0
- package/dist/loader-utils/lib/request-utils/request-cache.d.ts.map +1 -0
- package/dist/loader-utils/lib/request-utils/request-cache.js +236 -0
- package/dist/loader-utils/lib/request-utils/request-cache.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/request-credentials.d.ts +139 -0
- package/dist/loader-utils/lib/request-utils/request-credentials.d.ts.map +1 -0
- package/dist/loader-utils/lib/request-utils/request-credentials.js +373 -0
- package/dist/loader-utils/lib/request-utils/request-credentials.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/request-scheduler.d.ts +71 -0
- package/dist/loader-utils/lib/request-utils/request-scheduler.d.ts.map +1 -0
- package/dist/loader-utils/lib/request-utils/request-scheduler.js +174 -0
- package/dist/loader-utils/lib/request-utils/request-scheduler.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/columnar-predicate.d.ts +56 -0
- package/dist/loader-utils/lib/scan-utils/columnar-predicate.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/columnar-predicate.js +261 -0
- package/dist/loader-utils/lib/scan-utils/columnar-predicate.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/logical-table-query.d.ts +43 -0
- package/dist/loader-utils/lib/scan-utils/logical-table-query.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/logical-table-query.js +104 -0
- package/dist/loader-utils/lib/scan-utils/logical-table-query.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/point-cloud-query.d.ts +56 -0
- package/dist/loader-utils/lib/scan-utils/point-cloud-query.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/point-cloud-query.js +86 -0
- package/dist/loader-utils/lib/scan-utils/point-cloud-query.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/query-options.d.ts +39 -0
- package/dist/loader-utils/lib/scan-utils/query-options.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/query-options.js +5 -0
- package/dist/loader-utils/lib/scan-utils/query-options.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/raster-query.d.ts +36 -0
- package/dist/loader-utils/lib/scan-utils/raster-query.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/raster-query.js +49 -0
- package/dist/loader-utils/lib/scan-utils/raster-query.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/relational-query.d.ts +75 -0
- package/dist/loader-utils/lib/scan-utils/relational-query.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/relational-query.js +107 -0
- package/dist/loader-utils/lib/scan-utils/relational-query.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/scan-executor.d.ts +20 -0
- package/dist/loader-utils/lib/scan-utils/scan-executor.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/scan-executor.js +183 -0
- package/dist/loader-utils/lib/scan-utils/scan-executor.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/scan-fragments.d.ts +23 -0
- package/dist/loader-utils/lib/scan-utils/scan-fragments.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/scan-fragments.js +5 -0
- package/dist/loader-utils/lib/scan-utils/scan-fragments.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.d.ts +308 -0
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.js +107 -0
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/table-query-explain.d.ts +39 -0
- package/dist/loader-utils/lib/scan-utils/table-query-explain.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/table-query-explain.js +35 -0
- package/dist/loader-utils/lib/scan-utils/table-query-explain.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/table-query.d.ts +128 -0
- package/dist/loader-utils/lib/scan-utils/table-query.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/table-query.js +62 -0
- package/dist/loader-utils/lib/scan-utils/table-query.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.d.ts +33 -0
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.js +176 -0
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.js.map +1 -0
- package/dist/loader-utils/lib/sources/catalog-source.d.ts +36 -0
- package/dist/loader-utils/lib/sources/catalog-source.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/catalog-source.js +5 -0
- package/dist/loader-utils/lib/sources/catalog-source.js.map +1 -0
- package/dist/loader-utils/lib/sources/data-source-manager.d.ts +136 -0
- package/dist/loader-utils/lib/sources/data-source-manager.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/data-source-manager.js +376 -0
- package/dist/loader-utils/lib/sources/data-source-manager.js.map +1 -0
- package/dist/loader-utils/lib/sources/data-source.d.ts +83 -0
- package/dist/loader-utils/lib/sources/data-source.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/data-source.js +184 -0
- package/dist/loader-utils/lib/sources/data-source.js.map +1 -0
- package/dist/loader-utils/lib/sources/image-source.d.ts +55 -0
- package/dist/loader-utils/lib/sources/image-source.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/image-source.js +5 -0
- package/dist/loader-utils/lib/sources/image-source.js.map +1 -0
- package/dist/loader-utils/lib/sources/image-tile-source.d.ts +12 -0
- package/dist/loader-utils/lib/sources/image-tile-source.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/image-tile-source.js +5 -0
- package/dist/loader-utils/lib/sources/image-tile-source.js.map +1 -0
- package/dist/loader-utils/lib/sources/raster-coverage.d.ts +17 -0
- package/dist/loader-utils/lib/sources/raster-coverage.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/raster-coverage.js +62 -0
- package/dist/loader-utils/lib/sources/raster-coverage.js.map +1 -0
- package/dist/loader-utils/lib/sources/raster-region.d.ts +4 -0
- package/dist/loader-utils/lib/sources/raster-region.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/raster-region.js +22 -0
- package/dist/loader-utils/lib/sources/raster-region.js.map +1 -0
- package/dist/loader-utils/lib/sources/raster-sampling.d.ts +35 -0
- package/dist/loader-utils/lib/sources/raster-sampling.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/raster-sampling.js +152 -0
- package/dist/loader-utils/lib/sources/raster-sampling.js.map +1 -0
- package/dist/loader-utils/lib/sources/raster-source.d.ts +302 -0
- package/dist/loader-utils/lib/sources/raster-source.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/raster-source.js +20 -0
- package/dist/loader-utils/lib/sources/raster-source.js.map +1 -0
- package/dist/loader-utils/lib/sources/service-capabilities.d.ts +36 -0
- package/dist/loader-utils/lib/sources/service-capabilities.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/service-capabilities.js +5 -0
- package/dist/loader-utils/lib/sources/service-capabilities.js.map +1 -0
- package/dist/loader-utils/lib/sources/table-source-collection.d.ts +30 -0
- package/dist/loader-utils/lib/sources/table-source-collection.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/table-source-collection.js +5 -0
- package/dist/loader-utils/lib/sources/table-source-collection.js.map +1 -0
- package/dist/loader-utils/lib/sources/tile-grid.d.ts +89 -0
- package/dist/loader-utils/lib/sources/tile-grid.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/tile-grid.js +306 -0
- package/dist/loader-utils/lib/sources/tile-grid.js.map +1 -0
- package/dist/loader-utils/lib/sources/tile-source-adapter.d.ts +24 -0
- package/dist/loader-utils/lib/sources/tile-source-adapter.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/tile-source-adapter.js +105 -0
- package/dist/loader-utils/lib/sources/tile-source-adapter.js.map +1 -0
- package/dist/loader-utils/lib/sources/tile-source-utils.d.ts +6 -0
- package/dist/loader-utils/lib/sources/tile-source-utils.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/tile-source-utils.js +13 -0
- package/dist/loader-utils/lib/sources/tile-source-utils.js.map +1 -0
- package/dist/loader-utils/lib/sources/tile-source.d.ts +192 -0
- package/dist/loader-utils/lib/sources/tile-source.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/tile-source.js +5 -0
- package/dist/loader-utils/lib/sources/tile-source.js.map +1 -0
- package/dist/loader-utils/lib/sources/utils/image-type.d.ts +10 -0
- package/dist/loader-utils/lib/sources/utils/image-type.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/utils/image-type.js +5 -0
- package/dist/loader-utils/lib/sources/utils/image-type.js.map +1 -0
- package/dist/loader-utils/lib/sources/utils/utils.d.ts +13 -0
- package/dist/loader-utils/lib/sources/utils/utils.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/utils/utils.js +26 -0
- package/dist/loader-utils/lib/sources/utils/utils.js.map +1 -0
- package/dist/loader-utils/lib/sources/vector-source.d.ts +77 -0
- package/dist/loader-utils/lib/sources/vector-source.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/vector-source.js +5 -0
- package/dist/loader-utils/lib/sources/vector-source.js.map +1 -0
- package/dist/loader-utils/lib/sources/vector-tile-source.d.ts +16 -0
- package/dist/loader-utils/lib/sources/vector-tile-source.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/vector-tile-source.js +5 -0
- package/dist/loader-utils/lib/sources/vector-tile-source.js.map +1 -0
- package/dist/loader-utils/lib/sources/xyz-grid-options.d.ts +20 -0
- package/dist/loader-utils/lib/sources/xyz-grid-options.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/xyz-grid-options.js +65 -0
- package/dist/loader-utils/lib/sources/xyz-grid-options.js.map +1 -0
- package/dist/loader-utils/lib/sources/xyz-grid.d.ts +9 -0
- package/dist/loader-utils/lib/sources/xyz-grid.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/xyz-grid.js +67 -0
- package/dist/loader-utils/lib/sources/xyz-grid.js.map +1 -0
- package/dist/loader-utils/lib/worker-loader-utils/create-loader-worker.d.ts +25 -0
- package/dist/loader-utils/lib/worker-loader-utils/create-loader-worker.d.ts.map +1 -0
- package/dist/loader-utils/lib/worker-loader-utils/create-loader-worker.js +156 -0
- package/dist/loader-utils/lib/worker-loader-utils/create-loader-worker.js.map +1 -0
- package/dist/loader-utils/lib/worker-loader-utils/encode-with-worker.d.ts +8 -0
- package/dist/loader-utils/lib/worker-loader-utils/encode-with-worker.d.ts.map +1 -0
- package/dist/loader-utils/lib/worker-loader-utils/encode-with-worker.js +20 -0
- package/dist/loader-utils/lib/worker-loader-utils/encode-with-worker.js.map +1 -0
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.d.ts +47 -0
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.d.ts.map +1 -0
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.js +290 -0
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.js.map +1 -0
- package/dist/loader-utils/loader-types.d.ts +361 -0
- package/dist/loader-utils/loader-types.d.ts.map +1 -0
- package/dist/loader-utils/loader-types.js +33 -0
- package/dist/loader-utils/loader-types.js.map +1 -0
- package/dist/loader-utils/source-types.d.ts +44 -0
- package/dist/loader-utils/source-types.d.ts.map +1 -0
- package/dist/loader-utils/source-types.js +16 -0
- package/dist/loader-utils/source-types.js.map +1 -0
- package/dist/loader-utils/tile-grid.cjs +328 -0
- package/dist/loader-utils/tile-grid.cjs.map +6 -0
- package/dist/loader-utils/tile-grid.d.ts +5 -0
- package/dist/loader-utils/tile-grid.d.ts.map +1 -0
- package/dist/loader-utils/tile-grid.js +7 -0
- package/dist/loader-utils/tile-grid.js.map +1 -0
- package/dist/loader-utils/types.d.ts +24 -0
- package/dist/loader-utils/types.d.ts.map +1 -0
- package/dist/loader-utils/types.js +6 -0
- package/dist/loader-utils/types.js.map +1 -0
- package/dist/loader-utils/workers/json-worker.d.ts +2 -0
- package/dist/loader-utils/workers/json-worker.d.ts.map +1 -0
- package/dist/loader-utils/workers/json-worker.js +7 -0
- package/dist/loader-utils/workers/json-worker.js.map +1 -0
- package/dist/loader-utils/writer-types.d.ts +74 -0
- package/dist/loader-utils/writer-types.d.ts.map +1 -0
- package/dist/loader-utils/writer-types.js +5 -0
- package/dist/loader-utils/writer-types.js.map +1 -0
- package/dist/null-loader.d.ts +2 -20
- 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 +818 -90
- package/dist/null-worker.js +796 -85
- package/dist/polyfills/buffer/btoa.node.d.ts +3 -0
- package/dist/polyfills/buffer/btoa.node.d.ts.map +1 -0
- package/dist/polyfills/buffer/btoa.node.js +13 -0
- package/dist/polyfills/buffer/btoa.node.js.map +1 -0
- package/dist/polyfills/buffer/to-array-buffer.node.d.ts +2 -0
- package/dist/polyfills/buffer/to-array-buffer.node.d.ts.map +1 -0
- package/dist/polyfills/buffer/to-array-buffer.node.js +12 -0
- package/dist/polyfills/buffer/to-array-buffer.node.js.map +1 -0
- package/dist/polyfills/crypto/node-hash.d.ts +29 -0
- package/dist/polyfills/crypto/node-hash.d.ts.map +1 -0
- package/dist/polyfills/crypto/node-hash.js +63 -0
- package/dist/polyfills/crypto/node-hash.js.map +1 -0
- package/dist/polyfills/file/file-reader.d.ts +24 -0
- package/dist/polyfills/file/file-reader.d.ts.map +1 -0
- package/dist/polyfills/file/file-reader.js +51 -0
- package/dist/polyfills/file/file-reader.js.map +1 -0
- package/dist/polyfills/file/install-file-polyfills.d.ts +2 -0
- package/dist/polyfills/file/install-file-polyfills.d.ts.map +1 -0
- package/dist/polyfills/file/install-file-polyfills.js +12 -0
- package/dist/polyfills/file/install-file-polyfills.js.map +1 -0
- package/dist/polyfills/filesystems/fetch-node.d.ts +8 -0
- package/dist/polyfills/filesystems/fetch-node.d.ts.map +1 -0
- package/dist/polyfills/filesystems/fetch-node.js +88 -0
- package/dist/polyfills/filesystems/fetch-node.js.map +1 -0
- package/dist/polyfills/filesystems/node-file.d.ts +15 -0
- package/dist/polyfills/filesystems/node-file.d.ts.map +1 -0
- package/dist/polyfills/filesystems/node-file.js +138 -0
- package/dist/polyfills/filesystems/node-file.js.map +1 -0
- package/dist/polyfills/filesystems/node-filesystem.d.ts +19 -0
- package/dist/polyfills/filesystems/node-filesystem.d.ts.map +1 -0
- package/dist/polyfills/filesystems/node-filesystem.js +44 -0
- package/dist/polyfills/filesystems/node-filesystem.js.map +1 -0
- package/dist/polyfills/filesystems/stream-utils.node.d.ts +18 -0
- package/dist/polyfills/filesystems/stream-utils.node.d.ts.map +1 -0
- package/dist/polyfills/filesystems/stream-utils.node.js +67 -0
- package/dist/polyfills/filesystems/stream-utils.node.js.map +1 -0
- package/dist/polyfills/images/encode-image-node.d.ts +23 -0
- package/dist/polyfills/images/encode-image-node.d.ts.map +1 -0
- package/dist/polyfills/images/encode-image-node.js +23 -0
- package/dist/polyfills/images/encode-image-node.js.map +1 -0
- package/dist/polyfills/images/image-codecs-node.d.ts +4 -0
- package/dist/polyfills/images/image-codecs-node.d.ts.map +1 -0
- package/dist/polyfills/images/image-codecs-node.js +5 -0
- package/dist/polyfills/images/image-codecs-node.js.map +1 -0
- package/dist/polyfills/images/load-sharp.d.ts +3 -0
- package/dist/polyfills/images/load-sharp.d.ts.map +1 -0
- package/dist/polyfills/images/load-sharp.js +11 -0
- package/dist/polyfills/images/load-sharp.js.map +1 -0
- package/dist/polyfills/images/node-image-bitmap.d.ts +38 -0
- package/dist/polyfills/images/node-image-bitmap.d.ts.map +1 -0
- package/dist/polyfills/images/node-image-bitmap.js +64 -0
- package/dist/polyfills/images/node-image-bitmap.js.map +1 -0
- package/dist/polyfills/images/node-image-formats.d.ts +3 -0
- package/dist/polyfills/images/node-image-formats.d.ts.map +1 -0
- package/dist/polyfills/images/node-image-formats.js +12 -0
- package/dist/polyfills/images/node-image-formats.js.map +1 -0
- package/dist/polyfills/images/parse-image-node.d.ts +19 -0
- package/dist/polyfills/images/parse-image-node.d.ts.map +1 -0
- package/dist/polyfills/images/parse-image-node.js +24 -0
- package/dist/polyfills/images/parse-image-node.js.map +1 -0
- package/dist/polyfills/index.browser.d.ts +8 -0
- package/dist/polyfills/index.browser.d.ts.map +1 -0
- package/dist/polyfills/index.browser.js +18 -0
- package/dist/polyfills/index.browser.js.map +1 -0
- package/dist/polyfills/index.cjs +2220 -0
- package/dist/polyfills/index.cjs.map +6 -0
- package/dist/polyfills/index.d.ts +16 -0
- package/dist/polyfills/index.d.ts.map +1 -0
- package/dist/polyfills/index.js +92 -0
- package/dist/polyfills/index.js.map +1 -0
- package/dist/polyfills/libs/encoding-indexes-asian.d.ts +10 -0
- package/dist/polyfills/libs/encoding-indexes-asian.d.ts.map +1 -0
- package/dist/polyfills/libs/encoding-indexes-asian.js +14 -0
- package/dist/polyfills/libs/encoding-indexes-asian.js.map +1 -0
- package/dist/polyfills/load-library/require-utils.node.d.ts +19 -0
- package/dist/polyfills/load-library/require-utils.node.d.ts.map +1 -0
- package/dist/polyfills/load-library/require-utils.node.js +88 -0
- package/dist/polyfills/load-library/require-utils.node.js.map +1 -0
- package/dist/polyfills/streams/make-node-stream.d.ts +6 -0
- package/dist/polyfills/streams/make-node-stream.d.ts.map +1 -0
- package/dist/polyfills/streams/make-node-stream.js +53 -0
- package/dist/polyfills/streams/make-node-stream.js.map +1 -0
- package/dist/polyfills/text-encoder/encoding-indexes.d.ts +31 -0
- package/dist/polyfills/text-encoder/encoding-indexes.d.ts.map +1 -0
- package/dist/polyfills/text-encoder/encoding-indexes.js +35 -0
- package/dist/polyfills/text-encoder/encoding-indexes.js.map +1 -0
- package/dist/polyfills/text-encoder/text-encoder.d.ts +15 -0
- package/dist/polyfills/text-encoder/text-encoder.d.ts.map +1 -0
- package/dist/polyfills/text-encoder/text-encoder.js +2778 -0
- package/dist/polyfills/text-encoder/text-encoder.js.map +1 -0
- package/dist/polyfills/utils/assert.d.ts +2 -0
- package/dist/polyfills/utils/assert.d.ts.map +1 -0
- package/dist/polyfills/utils/assert.js +9 -0
- package/dist/polyfills/utils/assert.js.map +1 -0
- package/dist/polyfills/utils/buffer-utils.d.ts +5 -0
- package/dist/polyfills/utils/buffer-utils.d.ts.map +1 -0
- package/dist/polyfills/utils/buffer-utils.js +34 -0
- package/dist/polyfills/utils/buffer-utils.js.map +1 -0
- package/dist/polyfills/utils/filesystem-types.d.ts +10 -0
- package/dist/polyfills/utils/filesystem-types.d.ts.map +1 -0
- package/dist/polyfills/utils/filesystem-types.js +5 -0
- package/dist/polyfills/utils/filesystem-types.js.map +1 -0
- package/dist/polyfills/utils/is-browser.d.ts +2 -0
- package/dist/polyfills/utils/is-browser.d.ts.map +1 -0
- package/dist/polyfills/utils/is-browser.js +8 -0
- package/dist/polyfills/utils/is-browser.js.map +1 -0
- package/dist/polyfills/utils/path-utils.d.ts +7 -0
- package/dist/polyfills/utils/path-utils.d.ts.map +1 -0
- package/dist/polyfills/utils/path-utils.js +28 -0
- package/dist/polyfills/utils/path-utils.js.map +1 -0
- package/dist/scan/arrow-execution/expressions.cjs +134 -0
- package/dist/scan/arrow-execution/expressions.cjs.map +7 -0
- package/dist/scan/arrow-execution/expressions.d.ts +11 -0
- package/dist/scan/arrow-execution/expressions.d.ts.map +1 -0
- package/dist/scan/arrow-execution/expressions.js +86 -0
- package/dist/scan/arrow-execution/expressions.js.map +1 -0
- package/dist/scan/arrow-execution/filter-arrow-table.cjs +255 -0
- package/dist/scan/arrow-execution/filter-arrow-table.cjs.map +7 -0
- package/dist/scan/arrow-execution/filter-arrow-table.d.ts +18 -0
- package/dist/scan/arrow-execution/filter-arrow-table.d.ts.map +1 -0
- package/dist/scan/arrow-execution/filter-arrow-table.js +224 -0
- package/dist/scan/arrow-execution/filter-arrow-table.js.map +1 -0
- package/dist/scan/arrow-execution/project-arrow-table.cjs +70 -0
- package/dist/scan/arrow-execution/project-arrow-table.cjs.map +7 -0
- package/dist/scan/arrow-execution/project-arrow-table.d.ts +8 -0
- package/dist/scan/arrow-execution/project-arrow-table.d.ts.map +1 -0
- package/dist/scan/arrow-execution/project-arrow-table.js +39 -0
- package/dist/scan/arrow-execution/project-arrow-table.js.map +1 -0
- package/dist/scan/arrow-execution.cjs +34 -0
- package/dist/scan/arrow-execution.cjs.map +7 -0
- package/dist/scan/arrow-execution.d.ts +4 -0
- package/dist/scan/arrow-execution.d.ts.map +1 -0
- package/dist/scan/arrow-execution.js +6 -0
- package/dist/scan/arrow-execution.js.map +1 -0
- package/dist/scan/arrow-query.cjs +38 -0
- package/dist/scan/arrow-query.cjs.map +7 -0
- package/dist/scan/arrow-query.d.ts +5 -0
- package/dist/scan/arrow-query.d.ts.map +1 -0
- package/dist/scan/arrow-query.js +6 -0
- package/dist/scan/arrow-query.js.map +1 -0
- package/dist/scan/bind-sql-predicate.cjs +36 -0
- package/dist/scan/bind-sql-predicate.cjs.map +7 -0
- package/dist/scan/bind-sql-predicate.d.ts +4 -0
- package/dist/scan/bind-sql-predicate.d.ts.map +1 -0
- package/dist/scan/bind-sql-predicate.js +11 -0
- package/dist/scan/bind-sql-predicate.js.map +1 -0
- package/dist/scan/catalog-query-source.cjs +122 -0
- package/dist/scan/catalog-query-source.cjs.map +7 -0
- package/dist/scan/catalog-query-source.d.ts +6 -0
- package/dist/scan/catalog-query-source.d.ts.map +1 -0
- package/dist/scan/catalog-query-source.js +115 -0
- package/dist/scan/catalog-query-source.js.map +1 -0
- package/dist/scan/federated-table-scan-source.cjs +719 -0
- package/dist/scan/federated-table-scan-source.cjs.map +7 -0
- package/dist/scan/federated-table-scan-source.d.ts +112 -0
- package/dist/scan/federated-table-scan-source.d.ts.map +1 -0
- package/dist/scan/federated-table-scan-source.js +691 -0
- package/dist/scan/federated-table-scan-source.js.map +1 -0
- package/dist/scan/index.cjs +291 -0
- package/dist/scan/index.cjs.map +7 -0
- package/dist/scan/index.d.ts +30 -0
- package/dist/scan/index.d.ts.map +1 -0
- package/dist/scan/index.js +22 -0
- package/dist/scan/index.js.map +1 -0
- package/dist/scan/parse-sql-predicate.cjs +37 -0
- package/dist/scan/parse-sql-predicate.cjs.map +7 -0
- package/dist/scan/parse-sql-predicate.d.ts +7 -0
- package/dist/scan/parse-sql-predicate.d.ts.map +1 -0
- package/dist/scan/parse-sql-predicate.js +13 -0
- package/dist/scan/parse-sql-predicate.js.map +1 -0
- package/dist/scan/query-arrow-table-in-batches.cjs +75 -0
- package/dist/scan/query-arrow-table-in-batches.cjs.map +7 -0
- package/dist/scan/query-arrow-table-in-batches.d.ts +8 -0
- package/dist/scan/query-arrow-table-in-batches.d.ts.map +1 -0
- package/dist/scan/query-arrow-table-in-batches.js +54 -0
- package/dist/scan/query-arrow-table-in-batches.js.map +1 -0
- package/dist/scan/query-arrow-table.cjs +496 -0
- package/dist/scan/query-arrow-table.cjs.map +7 -0
- package/dist/scan/query-arrow-table.d.ts +50 -0
- package/dist/scan/query-arrow-table.d.ts.map +1 -0
- package/dist/scan/query-arrow-table.js +503 -0
- package/dist/scan/query-arrow-table.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 +39 -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 +136 -0
- package/dist/scan/query-pushdown.js.map +1 -0
- package/dist/scan/query.cjs +381 -0
- package/dist/scan/query.cjs.map +7 -0
- package/dist/scan/query.d.ts +64 -0
- package/dist/scan/query.d.ts.map +1 -0
- package/dist/scan/query.js +419 -0
- package/dist/scan/query.js.map +1 -0
- package/dist/scan/resolve-query-source.cjs +59 -0
- package/dist/scan/resolve-query-source.cjs.map +7 -0
- package/dist/scan/resolve-query-source.d.ts +6 -0
- package/dist/scan/resolve-query-source.d.ts.map +1 -0
- package/dist/scan/resolve-query-source.js +37 -0
- package/dist/scan/resolve-query-source.js.map +1 -0
- package/dist/scan/rows-to-arrow.cjs +44 -0
- package/dist/scan/rows-to-arrow.cjs.map +7 -0
- package/dist/scan/rows-to-arrow.d.ts +4 -0
- package/dist/scan/rows-to-arrow.d.ts.map +1 -0
- package/dist/scan/rows-to-arrow.js +9 -0
- package/dist/scan/rows-to-arrow.js.map +1 -0
- package/dist/scan/scan-engine.cjs +66 -0
- package/dist/scan/scan-engine.cjs.map +7 -0
- package/dist/scan/scan-engine.d.ts +45 -0
- package/dist/scan/scan-engine.d.ts.map +1 -0
- package/dist/scan/scan-engine.js +51 -0
- package/dist/scan/scan-engine.js.map +1 -0
- package/dist/scan/scan-query.cjs +19 -0
- package/dist/scan/scan-query.cjs.map +7 -0
- package/dist/scan/scan-query.d.ts +24 -0
- package/dist/scan/scan-query.d.ts.map +1 -0
- package/dist/scan/scan-query.js +5 -0
- package/dist/scan/scan-query.js.map +1 -0
- package/dist/scan/sql-catalog.cjs +110 -0
- package/dist/scan/sql-catalog.cjs.map +7 -0
- package/dist/scan/sql-catalog.d.ts +47 -0
- package/dist/scan/sql-catalog.d.ts.map +1 -0
- package/dist/scan/sql-catalog.js +97 -0
- package/dist/scan/sql-catalog.js.map +1 -0
- package/dist/scan/sql-predicate-schema.cjs +237 -0
- package/dist/scan/sql-predicate-schema.cjs.map +7 -0
- package/dist/scan/sql-predicate-schema.d.ts +156 -0
- package/dist/scan/sql-predicate-schema.d.ts.map +1 -0
- package/dist/scan/sql-predicate-schema.js +226 -0
- package/dist/scan/sql-predicate-schema.js.map +1 -0
- package/dist/scan/sql-predicate-types.cjs +34 -0
- package/dist/scan/sql-predicate-types.cjs.map +7 -0
- package/dist/scan/sql-predicate-types.d.ts +45 -0
- package/dist/scan/sql-predicate-types.d.ts.map +1 -0
- package/dist/scan/sql-predicate-types.js +9 -0
- package/dist/scan/sql-predicate-types.js.map +1 -0
- package/dist/scan/sql-predicate-zod.cjs +61 -0
- package/dist/scan/sql-predicate-zod.cjs.map +7 -0
- package/dist/scan/sql-predicate-zod.d.ts +11 -0
- package/dist/scan/sql-predicate-zod.d.ts.map +1 -0
- package/dist/scan/sql-predicate-zod.js +45 -0
- package/dist/scan/sql-predicate-zod.js.map +1 -0
- package/dist/scan/sql-predicate.cjs +44 -0
- package/dist/scan/sql-predicate.cjs.map +7 -0
- package/dist/scan/sql-predicate.d.ts +6 -0
- package/dist/scan/sql-predicate.d.ts.map +1 -0
- package/dist/scan/sql-predicate.js +8 -0
- package/dist/scan/sql-predicate.js.map +1 -0
- package/dist/scan/table-query-capabilities.cjs +52 -0
- package/dist/scan/table-query-capabilities.cjs.map +7 -0
- package/dist/scan/table-query-capabilities.d.ts +6 -0
- package/dist/scan/table-query-capabilities.d.ts.map +1 -0
- package/dist/scan/table-query-capabilities.js +26 -0
- package/dist/scan/table-query-capabilities.js.map +1 -0
- package/dist/scan/table-query.cjs +56 -0
- package/dist/scan/table-query.cjs.map +7 -0
- package/dist/scan/table-query.d.ts +32 -0
- package/dist/scan/table-query.d.ts.map +1 -0
- package/dist/scan/table-query.js +30 -0
- package/dist/scan/table-query.js.map +1 -0
- package/dist/scan/vector-table-scan-source.cjs +228 -0
- package/dist/scan/vector-table-scan-source.cjs.map +7 -0
- package/dist/scan/vector-table-scan-source.d.ts +94 -0
- package/dist/scan/vector-table-scan-source.d.ts.map +1 -0
- package/dist/scan/vector-table-scan-source.js +224 -0
- package/dist/scan/vector-table-scan-source.js.map +1 -0
- package/dist/schema/categories/category-gis.d.ts +7 -0
- package/dist/schema/categories/category-gis.d.ts.map +1 -0
- package/dist/schema/categories/category-gis.js +5 -0
- package/dist/schema/categories/category-gis.js.map +1 -0
- package/dist/schema/categories/category-image.d.ts +18 -0
- package/dist/schema/categories/category-image.d.ts.map +1 -0
- package/dist/schema/categories/category-image.js +5 -0
- package/dist/schema/categories/category-image.js.map +1 -0
- package/dist/schema/categories/category-mesh.d.ts +99 -0
- package/dist/schema/categories/category-mesh.d.ts.map +1 -0
- package/dist/schema/categories/category-mesh.js +14 -0
- package/dist/schema/categories/category-mesh.js.map +1 -0
- package/dist/schema/categories/category-table.d.ts +106 -0
- package/dist/schema/categories/category-table.d.ts.map +1 -0
- package/dist/schema/categories/category-table.js +5 -0
- package/dist/schema/categories/category-table.js.map +1 -0
- package/dist/schema/categories/category-texture.d.ts +115 -0
- package/dist/schema/categories/category-texture.d.ts.map +1 -0
- package/dist/schema/categories/category-texture.js +5 -0
- package/dist/schema/categories/category-texture.js.map +1 -0
- package/dist/schema/float16.d.ts +19 -0
- package/dist/schema/float16.d.ts.map +1 -0
- package/dist/schema/float16.js +90 -0
- package/dist/schema/float16.js.map +1 -0
- package/dist/schema/geoarrow-metadata.schema.json +117 -0
- package/dist/schema/geometry/arrow-binary-features.d.ts +45 -0
- package/dist/schema/geometry/arrow-binary-features.d.ts.map +1 -0
- package/dist/schema/geometry/arrow-binary-features.js +5 -0
- package/dist/schema/geometry/arrow-binary-features.js.map +1 -0
- package/dist/schema/geometry/binary-features.d.ts +30 -0
- package/dist/schema/geometry/binary-features.d.ts.map +1 -0
- package/dist/schema/geometry/binary-features.js +5 -0
- package/dist/schema/geometry/binary-features.js.map +1 -0
- package/dist/schema/geometry/binary-geometries.d.ts +33 -0
- package/dist/schema/geometry/binary-geometries.d.ts.map +1 -0
- package/dist/schema/geometry/binary-geometries.js +5 -0
- package/dist/schema/geometry/binary-geometries.js.map +1 -0
- package/dist/schema/geometry/flat-geometries.d.ts +61 -0
- package/dist/schema/geometry/flat-geometries.d.ts.map +1 -0
- package/dist/schema/geometry/flat-geometries.js +5 -0
- package/dist/schema/geometry/flat-geometries.js.map +1 -0
- package/dist/schema/geometry/geoarrow.d.ts +66 -0
- package/dist/schema/geometry/geoarrow.d.ts.map +1 -0
- package/dist/schema/geometry/geoarrow.js +5 -0
- package/dist/schema/geometry/geoarrow.js.map +1 -0
- package/dist/schema/geoparquet.schema.json +222 -0
- package/dist/schema/geospatial-metadata-zod-schema.cjs +154 -0
- package/dist/schema/geospatial-metadata-zod-schema.cjs.map +6 -0
- package/dist/schema/geospatial-metadata-zod-schema.d.ts +44 -0
- package/dist/schema/geospatial-metadata-zod-schema.d.ts.map +1 -0
- package/dist/schema/geospatial-metadata-zod-schema.js +151 -0
- package/dist/schema/geospatial-metadata-zod-schema.js.map +1 -0
- package/dist/schema/index.cjs +263 -0
- package/dist/schema/index.cjs.map +6 -0
- package/dist/schema/index.d.ts +21 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/index.js +9 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/schema/metadata.d.ts +40 -0
- package/dist/schema/metadata.d.ts.map +1 -0
- package/dist/schema/metadata.js +86 -0
- package/dist/schema/metadata.js.map +1 -0
- package/dist/schema/types/batch.d.ts +37 -0
- package/dist/schema/types/batch.d.ts.map +1 -0
- package/dist/schema/types/batch.js +5 -0
- package/dist/schema/types/batch.js.map +1 -0
- package/dist/schema/types/schema.d.ts +70 -0
- package/dist/schema/types/schema.d.ts.map +1 -0
- package/dist/schema/types/schema.js +5 -0
- package/dist/schema/types/schema.js.map +1 -0
- package/dist/schema/types/types.d.ts +16 -0
- package/dist/schema/types/types.d.ts.map +1 -0
- package/dist/schema/types/types.js +6 -0
- package/dist/schema/types/types.js.map +1 -0
- package/dist/schema-utils/deprecated.d.ts +24 -0
- package/dist/schema-utils/deprecated.d.ts.map +1 -0
- package/dist/schema-utils/deprecated.js +27 -0
- package/dist/schema-utils/deprecated.js.map +1 -0
- package/dist/schema-utils/index.cjs +3289 -0
- package/dist/schema-utils/index.cjs.map +6 -0
- package/dist/schema-utils/index.d.ts +39 -0
- package/dist/schema-utils/index.d.ts.map +1 -0
- package/dist/schema-utils/index.js +79 -0
- package/dist/schema-utils/index.js.map +1 -0
- package/dist/schema-utils/lib/arrow/arrow-metadata.d.ts +17 -0
- package/dist/schema-utils/lib/arrow/arrow-metadata.d.ts.map +1 -0
- package/dist/schema-utils/lib/arrow/arrow-metadata.js +106 -0
- package/dist/schema-utils/lib/arrow/arrow-metadata.js.map +1 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-fixed-size-list-utils.d.ts +11 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-fixed-size-list-utils.d.ts.map +1 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-fixed-size-list-utils.js +45 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-fixed-size-list-utils.js.map +1 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.d.ts +11 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.d.ts.map +1 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.js +33 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.js.map +1 -0
- package/dist/schema-utils/lib/converters/convert.d.ts +10 -0
- package/dist/schema-utils/lib/converters/convert.d.ts.map +1 -0
- package/dist/schema-utils/lib/converters/convert.js +105 -0
- package/dist/schema-utils/lib/converters/convert.js.map +1 -0
- package/dist/schema-utils/lib/converters/converters.d.ts +3 -0
- package/dist/schema-utils/lib/converters/converters.d.ts.map +1 -0
- package/dist/schema-utils/lib/converters/converters.js +5 -0
- package/dist/schema-utils/lib/converters/converters.js.map +1 -0
- package/dist/schema-utils/lib/converters/types.d.ts +37 -0
- package/dist/schema-utils/lib/converters/types.d.ts.map +1 -0
- package/dist/schema-utils/lib/converters/types.js +5 -0
- package/dist/schema-utils/lib/converters/types.js.map +1 -0
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.d.ts +45 -0
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.d.ts.map +1 -0
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.js +187 -0
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.js.map +1 -0
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.d.ts +15 -0
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.d.ts.map +1 -0
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.js +224 -0
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.js.map +1 -0
- package/dist/schema-utils/lib/mesh/deduce-mesh-schema.d.ts +23 -0
- package/dist/schema-utils/lib/mesh/deduce-mesh-schema.d.ts.map +1 -0
- package/dist/schema-utils/lib/mesh/deduce-mesh-schema.js +72 -0
- package/dist/schema-utils/lib/mesh/deduce-mesh-schema.js.map +1 -0
- 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 +11 -0
- package/dist/schema-utils/lib/mesh/mesh-utils.d.ts.map +1 -0
- package/dist/schema-utils/lib/mesh/mesh-utils.js +20 -0
- package/dist/schema-utils/lib/mesh/mesh-utils.js.map +1 -0
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.d.ts +98 -0
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.d.ts.map +1 -0
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.js +408 -0
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.js.map +1 -0
- package/dist/schema-utils/lib/schema/convert-arrow-schema.d.ts +39 -0
- package/dist/schema-utils/lib/schema/convert-arrow-schema.d.ts.map +1 -0
- package/dist/schema-utils/lib/schema/convert-arrow-schema.js +441 -0
- package/dist/schema-utils/lib/schema/convert-arrow-schema.js.map +1 -0
- package/dist/schema-utils/lib/schema/data-type.d.ts +16 -0
- package/dist/schema-utils/lib/schema/data-type.d.ts.map +1 -0
- package/dist/schema-utils/lib/schema/data-type.js +102 -0
- package/dist/schema-utils/lib/schema/data-type.js.map +1 -0
- package/dist/schema-utils/lib/schema/deduce-table-schema.d.ts +14 -0
- package/dist/schema-utils/lib/schema/deduce-table-schema.d.ts.map +1 -0
- package/dist/schema-utils/lib/schema/deduce-table-schema.js +103 -0
- package/dist/schema-utils/lib/schema/deduce-table-schema.js.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-field.d.ts +19 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-field.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-field.js +37 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-field.js.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-interface.d.ts +43 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-interface.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-interface.js +5 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-interface.js.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-schema.d.ts +12 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-schema.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-schema.js +82 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-schema.js.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.d.ts +28 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.js +64 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.js.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-type.d.ts +177 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-type.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-type.js +441 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-type.js.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/enum.d.ts +92 -0
- package/dist/schema-utils/lib/table/arrow-api/enum.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/enum.js +98 -0
- package/dist/schema-utils/lib/table/arrow-api/enum.js.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/get-type-info.d.ts +13 -0
- package/dist/schema-utils/lib/table/arrow-api/get-type-info.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/get-type-info.js +28 -0
- package/dist/schema-utils/lib/table/arrow-api/get-type-info.js.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/index.d.ts +6 -0
- package/dist/schema-utils/lib/table/arrow-api/index.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/index.js +8 -0
- package/dist/schema-utils/lib/table/arrow-api/index.js.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.d.ts +28 -0
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.js +71 -0
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.js.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.d.ts +41 -0
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.js +137 -0
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.js.map +1 -0
- package/dist/schema-utils/lib/table/batches/convert-batches.d.ts +11 -0
- package/dist/schema-utils/lib/table/batches/convert-batches.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batches/convert-batches.js +67 -0
- package/dist/schema-utils/lib/table/batches/convert-batches.js.map +1 -0
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.d.ts +14 -0
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.js +72 -0
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.js.map +1 -0
- package/dist/schema-utils/lib/table/batches/make-table-batch-iterator.d.ts +15 -0
- package/dist/schema-utils/lib/table/batches/make-table-batch-iterator.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batches/make-table-batch-iterator.js +22 -0
- package/dist/schema-utils/lib/table/batches/make-table-batch-iterator.js.map +1 -0
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.d.ts +12 -0
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.js +87 -0
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.js.map +1 -0
- package/dist/schema-utils/lib/table/query-arrow-table.d.ts +23 -0
- package/dist/schema-utils/lib/table/query-arrow-table.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/query-arrow-table.js +59 -0
- package/dist/schema-utils/lib/table/query-arrow-table.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/convert-arrow-table-wrapper.d.ts +27 -0
- package/dist/schema-utils/lib/table/tables/convert-arrow-table-wrapper.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/convert-arrow-table-wrapper.js +23 -0
- package/dist/schema-utils/lib/table/tables/convert-arrow-table-wrapper.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.d.ts +26 -0
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.js +140 -0
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/convert-table.d.ts +13 -0
- package/dist/schema-utils/lib/table/tables/convert-table.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/convert-table.js +85 -0
- package/dist/schema-utils/lib/table/tables/convert-table.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/make-table.d.ts +15 -0
- package/dist/schema-utils/lib/table/tables/make-table.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/make-table.js +46 -0
- package/dist/schema-utils/lib/table/tables/make-table.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/row-utils.d.ts +15 -0
- package/dist/schema-utils/lib/table/tables/row-utils.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/row-utils.js +50 -0
- package/dist/schema-utils/lib/table/tables/row-utils.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-accessors.d.ts +70 -0
- package/dist/schema-utils/lib/table/tables/table-accessors.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-accessors.js +363 -0
- package/dist/schema-utils/lib/table/tables/table-accessors.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-column.d.ts +7 -0
- package/dist/schema-utils/lib/table/tables/table-column.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-column.js +40 -0
- package/dist/schema-utils/lib/table/tables/table-column.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.d.ts +10 -0
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.js +19 -0
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.d.ts +16 -0
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.js +48 -0
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-types.d.ts +12 -0
- package/dist/schema-utils/lib/table/tables/table-types.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-types.js +24 -0
- package/dist/schema-utils/lib/table/tables/table-types.js.map +1 -0
- package/dist/schema-utils/lib/utils/assert.d.ts +2 -0
- package/dist/schema-utils/lib/utils/assert.d.ts.map +1 -0
- package/dist/schema-utils/lib/utils/assert.js +12 -0
- package/dist/schema-utils/lib/utils/assert.js.map +1 -0
- package/dist/schema-utils/lib/utils/async-queue.d.ts +18 -0
- package/dist/schema-utils/lib/utils/async-queue.d.ts.map +1 -0
- package/dist/schema-utils/lib/utils/async-queue.js +96 -0
- package/dist/schema-utils/lib/utils/async-queue.js.map +1 -0
- package/dist/schema-utils/types/types.d.ts +15 -0
- package/dist/schema-utils/types/types.d.ts.map +1 -0
- package/dist/schema-utils/types/types.js +5 -0
- package/dist/schema-utils/types/types.js.map +1 -0
- package/dist/vector-table-scan-source.cjs +1760 -0
- package/dist/vector-table-scan-source.cjs.map +6 -0
- package/dist/vector-table-scan-source.d.ts +2 -0
- package/dist/vector-table-scan-source.d.ts.map +1 -0
- package/dist/vector-table-scan-source.js +2 -0
- package/dist/vector-table-scan-source.js.map +1 -0
- package/dist/wkt/index.cjs +44 -0
- package/dist/wkt/index.cjs.map +7 -0
- package/dist/wkt/index.d.ts +3 -0
- package/dist/wkt/index.d.ts.map +1 -0
- package/dist/wkt/index.js +6 -0
- package/dist/wkt/index.js.map +1 -0
- package/dist/wkt/twkb/convert-geometry-to-twkb.cjs +211 -0
- package/dist/wkt/twkb/convert-geometry-to-twkb.cjs.map +7 -0
- package/dist/wkt/twkb/convert-geometry-to-twkb.d.ts +6 -0
- package/dist/wkt/twkb/convert-geometry-to-twkb.d.ts.map +1 -0
- package/dist/wkt/twkb/convert-geometry-to-twkb.js +204 -0
- package/dist/wkt/twkb/convert-geometry-to-twkb.js.map +1 -0
- package/dist/wkt/twkb/convert-twkb-to-geometry.cjs +251 -0
- package/dist/wkt/twkb/convert-twkb-to-geometry.cjs.map +7 -0
- package/dist/wkt/twkb/convert-twkb-to-geometry.d.ts +10 -0
- package/dist/wkt/twkb/convert-twkb-to-geometry.d.ts.map +1 -0
- package/dist/wkt/twkb/convert-twkb-to-geometry.js +261 -0
- package/dist/wkt/twkb/convert-twkb-to-geometry.js.map +1 -0
- package/dist/wkt/twkb/index.cjs +36 -0
- package/dist/wkt/twkb/index.cjs.map +7 -0
- package/dist/wkt/twkb/index.d.ts +3 -0
- package/dist/wkt/twkb/index.d.ts.map +1 -0
- package/dist/wkt/twkb/index.js +6 -0
- package/dist/wkt/twkb/index.js.map +1 -0
- package/dist/wkt/twkb/twkb-io.cjs +102 -0
- package/dist/wkt/twkb/twkb-io.cjs.map +7 -0
- package/dist/wkt/twkb/twkb-io.d.ts +33 -0
- package/dist/wkt/twkb/twkb-io.d.ts.map +1 -0
- package/dist/wkt/twkb/twkb-io.js +78 -0
- package/dist/wkt/twkb/twkb-io.js.map +1 -0
- package/dist/wkt/twkb/twkb-types.cjs +40 -0
- package/dist/wkt/twkb/twkb-types.cjs.map +7 -0
- package/dist/wkt/twkb/twkb-types.d.ts +11 -0
- package/dist/wkt/twkb/twkb-types.d.ts.map +1 -0
- package/dist/wkt/twkb/twkb-types.js +15 -0
- package/dist/wkt/twkb/twkb-types.js.map +1 -0
- package/dist/worker-utils/index.cjs +789 -0
- package/dist/worker-utils/index.cjs.map +6 -0
- package/dist/worker-utils/index.d.ts +16 -0
- package/dist/worker-utils/index.d.ts.map +1 -0
- package/dist/worker-utils/index.js +31 -0
- package/dist/worker-utils/index.js.map +1 -0
- package/dist/worker-utils/lib/env-utils/assert.d.ts +3 -0
- package/dist/worker-utils/lib/env-utils/assert.d.ts.map +1 -0
- package/dist/worker-utils/lib/env-utils/assert.js +13 -0
- package/dist/worker-utils/lib/env-utils/assert.js.map +1 -0
- package/dist/worker-utils/lib/env-utils/globals.d.ts +22 -0
- package/dist/worker-utils/lib/env-utils/globals.d.ts.map +1 -0
- package/dist/worker-utils/lib/env-utils/globals.js +30 -0
- package/dist/worker-utils/lib/env-utils/globals.js.map +1 -0
- package/dist/worker-utils/lib/env-utils/version.d.ts +3 -0
- package/dist/worker-utils/lib/env-utils/version.d.ts.map +1 -0
- package/dist/worker-utils/lib/env-utils/version.js +14 -0
- package/dist/worker-utils/lib/env-utils/version.js.map +1 -0
- package/dist/worker-utils/lib/library-utils/library-utils.d.ts +42 -0
- package/dist/worker-utils/lib/library-utils/library-utils.d.ts.map +1 -0
- package/dist/worker-utils/lib/library-utils/library-utils.js +249 -0
- package/dist/worker-utils/lib/library-utils/library-utils.js.map +1 -0
- package/dist/worker-utils/lib/node/worker_threads-browser.d.ts +14 -0
- package/dist/worker-utils/lib/node/worker_threads-browser.d.ts.map +1 -0
- package/dist/worker-utils/lib/node/worker_threads-browser.js +22 -0
- package/dist/worker-utils/lib/node/worker_threads-browser.js.map +1 -0
- package/dist/worker-utils/lib/node/worker_threads.d.ts +15 -0
- package/dist/worker-utils/lib/node/worker_threads.d.ts.map +1 -0
- package/dist/worker-utils/lib/node/worker_threads.js +16 -0
- package/dist/worker-utils/lib/node/worker_threads.js.map +1 -0
- package/dist/worker-utils/lib/npm-tag.d.ts +2 -0
- package/dist/worker-utils/lib/npm-tag.d.ts.map +1 -0
- package/dist/worker-utils/lib/npm-tag.js +5 -0
- package/dist/worker-utils/lib/npm-tag.js.map +1 -0
- package/dist/worker-utils/lib/process-utils/child-process-proxy.browser.d.ts +8 -0
- package/dist/worker-utils/lib/process-utils/child-process-proxy.browser.d.ts.map +1 -0
- package/dist/worker-utils/lib/process-utils/child-process-proxy.browser.js +18 -0
- package/dist/worker-utils/lib/process-utils/child-process-proxy.browser.js.map +1 -0
- package/dist/worker-utils/lib/process-utils/child-process-proxy.d.ts +45 -0
- package/dist/worker-utils/lib/process-utils/child-process-proxy.d.ts.map +1 -0
- package/dist/worker-utils/lib/process-utils/child-process-proxy.js +124 -0
- package/dist/worker-utils/lib/process-utils/child-process-proxy.js.map +1 -0
- package/dist/worker-utils/lib/process-utils/process-utils.d.ts +2 -0
- package/dist/worker-utils/lib/process-utils/process-utils.d.ts.map +1 -0
- package/dist/worker-utils/lib/process-utils/process-utils.js +32 -0
- package/dist/worker-utils/lib/process-utils/process-utils.js.map +1 -0
- package/dist/worker-utils/lib/worker-api/create-worker.d.ts +7 -0
- package/dist/worker-utils/lib/worker-api/create-worker.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-api/create-worker.js +91 -0
- package/dist/worker-utils/lib/worker-api/create-worker.js.map +1 -0
- package/dist/worker-utils/lib/worker-api/get-worker-url.d.ts +29 -0
- package/dist/worker-utils/lib/worker-api/get-worker-url.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-api/get-worker-url.js +102 -0
- package/dist/worker-utils/lib/worker-api/get-worker-url.js.map +1 -0
- package/dist/worker-utils/lib/worker-api/process-on-worker.d.ts +22 -0
- package/dist/worker-utils/lib/worker-api/process-on-worker.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-api/process-on-worker.js +251 -0
- package/dist/worker-utils/lib/worker-api/process-on-worker.js.map +1 -0
- package/dist/worker-utils/lib/worker-api/task-runtime.d.ts +36 -0
- package/dist/worker-utils/lib/worker-api/task-runtime.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-api/task-runtime.js +23 -0
- package/dist/worker-utils/lib/worker-api/task-runtime.js.map +1 -0
- package/dist/worker-utils/lib/worker-api/validate-worker-version.d.ts +9 -0
- package/dist/worker-utils/lib/worker-api/validate-worker-version.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-api/validate-worker-version.js +35 -0
- package/dist/worker-utils/lib/worker-api/validate-worker-version.js.map +1 -0
- package/dist/worker-utils/lib/worker-utils/get-loadable-worker-url.d.ts +14 -0
- package/dist/worker-utils/lib/worker-utils/get-loadable-worker-url.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-utils/get-loadable-worker-url.js +67 -0
- package/dist/worker-utils/lib/worker-utils/get-loadable-worker-url.js.map +1 -0
- package/dist/worker-utils/lib/worker-utils/get-transfer-list.d.ts +16 -0
- package/dist/worker-utils/lib/worker-utils/get-transfer-list.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-utils/get-transfer-list.js +88 -0
- package/dist/worker-utils/lib/worker-utils/get-transfer-list.js.map +1 -0
- package/dist/worker-utils/lib/worker-utils/remove-nontransferable-options.d.ts +6 -0
- package/dist/worker-utils/lib/worker-utils/remove-nontransferable-options.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-utils/remove-nontransferable-options.js +27 -0
- package/dist/worker-utils/lib/worker-utils/remove-nontransferable-options.js.map +1 -0
- package/dist/worker-utils/null-worker-node.js +1072 -0
- package/dist/worker-utils/null-worker-node.js.map +7 -0
- package/dist/worker-utils/null-worker.js +1022 -0
- package/dist/worker-utils/null-worker.js.map +7 -0
- package/dist/worker-utils/types.d.ts +83 -0
- package/dist/worker-utils/types.d.ts.map +1 -0
- package/dist/worker-utils/types.js +5 -0
- package/dist/worker-utils/types.js.map +1 -0
- package/dist/worker-utils/workers/null-worker.d.ts +2 -0
- package/dist/worker-utils/workers/null-worker.d.ts.map +1 -0
- package/dist/worker-utils/workers/null-worker.js +17 -0
- package/dist/worker-utils/workers/null-worker.js.map +1 -0
- package/dist/workers/null-worker-node.js +1 -1
- package/dist/workers/null-worker-node.js.map +1 -1
- package/dist/workers/null-worker.js +1 -1
- package/dist/workers/null-worker.js.map +1 -1
- package/package.json +442 -13
- package/src/arrow-geometry/binary-features.ts +399 -0
- package/src/arrow-geometry/binary-geometry-to-wkb.ts +245 -0
- package/src/arrow-geometry/feature-collection-to-arrow.ts +162 -0
- package/src/arrow-geometry/feature-table.ts +940 -0
- package/src/arrow-geometry/geoarrow-builder.ts +862 -0
- package/src/arrow-geometry/geoarrow-union-kind.ts +47 -0
- package/src/arrow-geometry/geojson-table.ts +167 -0
- package/src/arrow-geometry/geometry-codecs.ts +186 -0
- package/src/arrow-geometry/geometry-field.ts +349 -0
- package/src/arrow-geometry/geometry-to-wkt.ts +121 -0
- package/src/arrow-geometry/geometry-utils.ts +29 -0
- package/src/arrow-geometry/index.ts +33 -0
- package/src/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.ts +583 -0
- package/src/arrow-geometry/legacy-binary/convert-geojson-to-binary-features.ts +45 -0
- package/src/arrow-geometry/legacy-binary/convert-geojson-to-flat-geojson.ts +177 -0
- package/src/arrow-geometry/legacy-binary/flat-geojson-to-binary-types.ts +62 -0
- package/src/arrow-geometry/legacy-binary/geometry-info.ts +129 -0
- package/src/arrow-geometry/legacy-binary/transform-coordinates.ts +72 -0
- package/src/arrow-geometry/legacy-binary.ts +24 -0
- package/src/arrow-geometry/native-geometry.ts +278 -0
- package/src/arrow-geometry/sampled-bounds.ts +46 -0
- package/src/arrow-geometry/triangulate-wkb.ts +1133 -0
- package/src/arrow-geometry/wkb-arrow-utils.ts +202 -0
- package/src/arrow-geometry/wkb-builder.ts +223 -0
- package/src/arrow-geometry/wkb-statistics.ts +70 -0
- package/src/arrow-geometry/wkb-table.ts +62 -0
- package/src/arrow-geometry/wkb-types.ts +21 -0
- package/src/arrow-worker-transport.ts +225 -0
- package/src/cluster-source.ts +1 -0
- package/src/constants/index.ts +23 -0
- package/src/federated-table-scan-source.ts +1 -0
- package/src/geoarrow/binary-polygon-to-geoarrow.ts +120 -0
- package/src/geoarrow/clustering/cluster-index.ts +510 -0
- package/src/geoarrow/clustering/cluster-source.ts +278 -0
- package/src/geoarrow/clustering/get-representative-point.ts +192 -0
- package/src/geoarrow/compatibility.ts +65 -0
- package/src/geoarrow/convert-table-to-geoarrow.ts +258 -0
- package/src/geoarrow/deprecated.ts +73 -0
- package/src/geoarrow/geo-column/geo-column-info.ts +114 -0
- package/src/geoarrow/geo-column/geo-column.ts +85 -0
- package/src/geoarrow/geoarrow-bounds.ts +176 -0
- package/src/geoarrow/geoarrow-builder.ts +21 -0
- package/src/geoarrow/geoarrow-capabilities.ts +581 -0
- package/src/geoarrow/geoarrow-conformance.ts +177 -0
- package/src/geoarrow/geoarrow-converter/convert-geoarrow-geometry.ts +2168 -0
- package/src/geoarrow/geoarrow-converter/convert-geoarrow.ts +80 -0
- package/src/geoarrow/geoarrow-converter/geoarrow-converter.ts +108 -0
- package/src/geoarrow/geoarrow-converter/geoarrow-geometry-converter.ts +66 -0
- package/src/geoarrow/geoarrow-functions.ts +293 -0
- package/src/geoarrow/geoarrow-inspection.ts +296 -0
- package/src/geoarrow/geoarrow-layout.ts +844 -0
- package/src/geoarrow/geoarrow-resource-limits.ts +94 -0
- package/src/geoarrow/geoarrow-spatial-index.ts +251 -0
- package/src/geoarrow/geoarrow-stream.ts +377 -0
- package/src/geoarrow/geoarrow-types.ts +91 -0
- package/src/geoarrow/get-geo-column-from-geoarrow.ts.disabled +251 -0
- package/src/geoarrow/get-geoarrow-geometry-info.ts +147 -0
- package/src/geoarrow/get-geoarrow-native-geometry.ts +8 -0
- package/src/geoarrow/get-geoarrow-vertex-count.ts +225 -0
- package/src/geoarrow/index.ts +260 -0
- package/src/geoarrow/lib/binary-geometry-api/binary-geometry-info.ts +75 -0
- package/src/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.ts +576 -0
- package/src/geoarrow/lib/feature-collection-converters/convert-binary-features-to-geojson.ts +152 -0
- package/src/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.ts +1591 -0
- package/src/geoarrow/lib/feature-collection-converters/feature-collection-converter/convert-feature-collection.ts +212 -0
- package/src/geoarrow/lib/feature-collection-converters/feature-collection-converter/feature-collection-converter.ts +96 -0
- package/src/geoarrow/lib/geoarrow/geoarrow-union-kind.ts +4 -0
- package/src/geoarrow/lib/geometry-converters/convert-binary-geometry-to-geojson.ts +154 -0
- package/src/geoarrow/lib/geometry-converters/convert-geoarrow-to-geojson.ts +195 -0
- package/src/geoarrow/lib/geometry-converters/geometry-converter/geometry-converter.ts +143 -0
- package/src/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.ts +86 -0
- package/src/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.ts +116 -0
- package/src/geoarrow/lib/geometry-converters/wkb/helpers/wkb-types.ts +82 -0
- package/src/geoarrow/lib/geometry-predicates.ts +170 -0
- package/src/geoarrow/lib/kernels/decode-wkt-native.ts +752 -0
- package/src/geoarrow/lib/kernels/encode-geoarrow-box.ts +303 -0
- package/src/geoarrow/lib/kernels/encode-geoarrow-wkt.ts +373 -0
- package/src/geoarrow/lib/kernels/geoarrow-union.ts +97 -0
- package/src/geoarrow/lib/table-converters/convert-geoarrow-table.ts +118 -0
- package/src/geoarrow/lib/table-converters/convert-wkb-table-to-geojson.ts +16 -0
- package/src/geoarrow/map-geoarrow-coordinates.ts +282 -0
- package/src/geoarrow/mesharrow/arrow-fixed-size-list-utils.ts +63 -0
- package/src/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.ts +47 -0
- package/src/geoarrow/mesharrow/get-bounding-box.ts +37 -0
- package/src/geoarrow/mesharrow/get-deck-binary-data.ts +70 -0
- package/src/geoarrow/mesharrow/mesh-accessors.ts +27 -0
- package/src/geoarrow/metadata/geoarrow-metadata.ts +90 -0
- package/src/geoarrow/metadata/geoparquet-metadata-schema.ts +71 -0
- package/src/geoarrow/metadata/geoparquet-metadata.ts +16 -0
- package/src/geoarrow/metadata/merge-geoarrow-metadata.ts +357 -0
- package/src/geoarrow/metadata/metadata-utils.ts +6 -0
- package/src/geoarrow/rewind-geoarrow.ts +268 -0
- package/src/index.ts +11 -15
- package/src/iterators/make-iterator/make-iterator.ts +1 -1
- package/src/iterators/make-iterator/make-stream-iterator.ts +1 -1
- package/src/iterators/make-iterator/make-string-iterator.ts +1 -1
- package/src/lib/api/core-api.ts +1 -1
- package/src/lib/api/create-data-source.ts +149 -59
- package/src/lib/api/encode-table.ts +2 -2
- package/src/lib/api/encode.ts +17 -6
- package/src/lib/api/load-in-batches.ts +17 -9
- package/src/lib/api/load-loader.ts +166 -11
- package/src/lib/api/load.ts +63 -129
- package/src/lib/api/parse-file.ts +46 -25
- package/src/lib/api/parse-in-batches.ts +171 -28
- package/src/lib/api/parse-sync.ts +38 -20
- package/src/lib/api/parse.ts +59 -36
- package/src/lib/api/preload.ts +27 -7
- package/src/lib/api/register-loaders.ts +1 -1
- package/src/lib/api/select-loader.ts +57 -72
- package/src/lib/api/select-source.ts +8 -2
- package/src/lib/common.ts +1 -1
- package/src/lib/fetch/fetch-file.ts +2 -2
- package/src/lib/filesystems/browser-filesystem.ts +2 -2
- package/src/lib/init.ts +1 -1
- package/src/lib/loader-utils/get-data.ts +2 -2
- package/src/lib/loader-utils/get-fetch-function.ts +8 -6
- package/src/lib/loader-utils/loader-context.ts +8 -2
- package/src/lib/loader-utils/loggers.ts +2 -70
- package/src/lib/loader-utils/native-arrow.ts +109 -0
- package/src/lib/loader-utils/normalize-loader.ts +2 -2
- package/src/lib/loader-utils/option-defaults.ts +13 -12
- package/src/lib/loader-utils/option-utils.ts +34 -123
- package/src/lib/utils/resource-utils.ts +1 -1
- package/src/lib/utils/response-utils.ts +1 -1
- package/src/loader-utils/format-types.ts +53 -0
- package/src/loader-utils/index.ts +575 -0
- package/src/loader-utils/json-loader.ts +39 -0
- package/src/loader-utils/lib/binary-utils/array-buffer-utils.ts +114 -0
- package/src/loader-utils/lib/binary-utils/binary-chunk-reader.ts +297 -0
- package/src/loader-utils/lib/binary-utils/dataview-copy-utils.ts +121 -0
- package/src/loader-utils/lib/binary-utils/encode-array-buffer-to-base64.ts +17 -0
- package/src/loader-utils/lib/binary-utils/get-first-characters.ts +46 -0
- package/src/loader-utils/lib/binary-utils/hex-transcoder.ts +54 -0
- package/src/loader-utils/lib/binary-utils/memory-conversion-utils.ts +105 -0
- package/src/loader-utils/lib/binary-utils/memory-copy-utils.ts +69 -0
- package/src/loader-utils/lib/crs/crs-reprojection.ts +52 -0
- package/src/loader-utils/lib/env-utils/assert.ts +13 -0
- package/src/loader-utils/lib/env-utils/globals.ts +36 -0
- package/src/loader-utils/lib/files/array-buffer-file.ts +46 -0
- package/src/loader-utils/lib/files/blob-file.ts +45 -0
- package/src/loader-utils/lib/files/file.ts +39 -0
- package/src/loader-utils/lib/files/http-file-transport.ts +496 -0
- package/src/loader-utils/lib/files/http-file-types.ts +62 -0
- package/src/loader-utils/lib/files/http-file.ts +267 -0
- package/src/loader-utils/lib/files/node-file-facade.ts +57 -0
- package/src/loader-utils/lib/files/read-range-response.ts +66 -0
- package/src/loader-utils/lib/files/sources.ts +154 -0
- package/src/loader-utils/lib/filesystems/filesystem.ts +40 -0
- package/src/loader-utils/lib/filesystems/node-filesystem-facade.ts +65 -0
- package/src/loader-utils/lib/iterators/async-iteration.ts +136 -0
- package/src/loader-utils/lib/iterators/text-iterators.ts +76 -0
- package/src/loader-utils/lib/javascript-utils/is-type.ts +130 -0
- package/src/loader-utils/lib/laz/LASZIP-LICENSE +202 -0
- package/src/loader-utils/lib/laz/LASZIP-NOTICE +6 -0
- package/src/loader-utils/lib/laz/laz-arithmetic-encoder.ts +446 -0
- package/src/loader-utils/lib/laz/laz-chunk-decoder.ts +5251 -0
- package/src/loader-utils/lib/laz/laz-chunk-encoder.ts +1909 -0
- package/src/loader-utils/lib/log-utils/log.ts +63 -0
- package/src/loader-utils/lib/module-utils/initialize-wasm-module.ts +51 -0
- package/src/loader-utils/lib/module-utils/js-module-utils.ts +44 -0
- package/src/loader-utils/lib/node/buffer.browser.ts +22 -0
- package/src/loader-utils/lib/node/buffer.ts +40 -0
- package/src/loader-utils/lib/node/fs.browser.ts +5 -0
- package/src/loader-utils/lib/node/promisify.ts +72 -0
- package/src/loader-utils/lib/node/stream.browser.ts +5 -0
- package/src/loader-utils/lib/node/stream.ts +12 -0
- package/src/loader-utils/lib/option-utils/merge-options.ts +50 -0
- package/src/loader-utils/lib/pace-batch-iterator.ts +66 -0
- package/src/loader-utils/lib/parser-utils/parse-json.ts +16 -0
- package/src/loader-utils/lib/path-utils/cached-uri-resolver.ts +69 -0
- package/src/loader-utils/lib/path-utils/file-aliases.ts +49 -0
- package/src/loader-utils/lib/path-utils/get-cwd.ts +12 -0
- package/src/loader-utils/lib/path-utils/path.ts +173 -0
- package/src/loader-utils/lib/request-utils/abort-utils.ts +64 -0
- package/src/loader-utils/lib/request-utils/authentication.ts +134 -0
- package/src/loader-utils/lib/request-utils/parse-content-type.ts +22 -0
- package/src/loader-utils/lib/request-utils/range-request-cache.ts +279 -0
- package/src/loader-utils/lib/request-utils/range-request-scheduler.ts +899 -0
- package/src/loader-utils/lib/request-utils/request-cache.ts +296 -0
- package/src/loader-utils/lib/request-utils/request-credentials.ts +574 -0
- package/src/loader-utils/lib/request-utils/request-scheduler.ts +230 -0
- package/src/loader-utils/lib/scan-utils/columnar-predicate.ts +397 -0
- package/src/loader-utils/lib/scan-utils/logical-table-query.ts +174 -0
- package/src/loader-utils/lib/scan-utils/point-cloud-query.ts +176 -0
- package/src/loader-utils/lib/scan-utils/query-options.ts +44 -0
- package/src/loader-utils/lib/scan-utils/raster-query.ts +82 -0
- package/src/loader-utils/lib/scan-utils/relational-query.ts +188 -0
- package/src/loader-utils/lib/scan-utils/scan-executor.ts +208 -0
- package/src/loader-utils/lib/scan-utils/scan-fragments.ts +33 -0
- package/src/loader-utils/lib/scan-utils/scan-query-metadata.ts +491 -0
- package/src/loader-utils/lib/scan-utils/table-query-explain.ts +88 -0
- package/src/loader-utils/lib/scan-utils/table-query.ts +231 -0
- package/src/loader-utils/lib/scan-utils/table-scan-batch.ts +225 -0
- package/src/loader-utils/lib/sources/catalog-source.ts +42 -0
- package/src/loader-utils/lib/sources/data-source-manager.ts +569 -0
- package/src/loader-utils/lib/sources/data-source.ts +277 -0
- package/src/loader-utils/lib/sources/image-source.ts +66 -0
- package/src/loader-utils/lib/sources/image-tile-source.ts +22 -0
- package/src/loader-utils/lib/sources/raster-coverage.ts +92 -0
- package/src/loader-utils/lib/sources/raster-region.ts +35 -0
- package/src/loader-utils/lib/sources/raster-sampling.ts +213 -0
- package/src/loader-utils/lib/sources/raster-source.ts +344 -0
- package/src/loader-utils/lib/sources/service-capabilities.ts +50 -0
- package/src/loader-utils/lib/sources/table-source-collection.ts +38 -0
- package/src/loader-utils/lib/sources/tile-grid.ts +414 -0
- package/src/loader-utils/lib/sources/tile-source-adapter.ts +117 -0
- package/src/loader-utils/lib/sources/tile-source-utils.ts +19 -0
- package/src/loader-utils/lib/sources/tile-source.ts +200 -0
- package/src/loader-utils/lib/sources/utils/image-type.ts +14 -0
- package/src/loader-utils/lib/sources/utils/utils.ts +31 -0
- package/src/loader-utils/lib/sources/vector-source.ts +89 -0
- package/src/loader-utils/lib/sources/vector-tile-source.ts +30 -0
- package/src/loader-utils/lib/sources/xyz-grid-options.ts +90 -0
- package/src/loader-utils/lib/sources/xyz-grid.ts +88 -0
- package/src/loader-utils/lib/worker-loader-utils/create-loader-worker.ts +256 -0
- package/src/loader-utils/lib/worker-loader-utils/encode-with-worker.ts +27 -0
- package/src/loader-utils/lib/worker-loader-utils/parse-with-worker.ts +409 -0
- package/src/loader-utils/loader-types.ts +624 -0
- package/src/loader-utils/source-types.ts +87 -0
- package/src/loader-utils/tile-grid.ts +8 -0
- package/src/loader-utils/types.ts +83 -0
- package/src/loader-utils/workers/json-worker.ts +8 -0
- package/src/loader-utils/writer-types.ts +107 -0
- package/src/null-loader.ts +2 -21
- package/src/polyfills/README.md +16 -0
- package/src/polyfills/buffer/btoa.node.ts +15 -0
- package/src/polyfills/buffer/to-array-buffer.node.ts +12 -0
- package/src/polyfills/crypto/node-hash.ts +78 -0
- package/src/polyfills/file/file-reader.ts +59 -0
- package/src/polyfills/file/install-file-polyfills.ts +14 -0
- package/src/polyfills/filesystems/fetch-node.ts +98 -0
- package/src/polyfills/filesystems/node-file.ts +169 -0
- package/src/polyfills/filesystems/node-filesystem.ts +54 -0
- package/src/polyfills/filesystems/stream-utils.node.ts +81 -0
- package/src/polyfills/images/encode-image-node.ts +52 -0
- package/src/polyfills/images/image-codecs-node.ts +5 -0
- package/src/polyfills/images/load-sharp.ts +13 -0
- package/src/polyfills/images/node-image-bitmap.ts +81 -0
- package/src/polyfills/images/node-image-formats.ts +12 -0
- package/src/polyfills/images/parse-image-node.ts +45 -0
- package/src/polyfills/index.browser.ts +23 -0
- package/src/polyfills/index.ts +132 -0
- package/src/polyfills/libs/encoding-indexes-asian.js +15 -0
- package/src/polyfills/load-library/require-utils.node.ts +108 -0
- package/src/polyfills/streams/make-node-stream.ts +61 -0
- package/src/polyfills/text-encoder/encoding-indexes.ts +36 -0
- package/src/polyfills/text-encoder/text-encoder.ts +3085 -0
- package/src/polyfills/utils/assert.ts +9 -0
- package/src/polyfills/utils/buffer-utils.ts +40 -0
- package/src/polyfills/utils/filesystem-types.ts +13 -0
- package/src/polyfills/utils/is-browser.ts +8 -0
- package/src/polyfills/utils/path-utils.ts +31 -0
- package/src/polyfills/wip/fetch-browser/fetch-file.browser.d.ts +34 -0
- package/src/scan/arrow-execution/expressions.ts +116 -0
- package/src/scan/arrow-execution/filter-arrow-table.ts +298 -0
- package/src/scan/arrow-execution/project-arrow-table.ts +53 -0
- package/src/scan/arrow-execution.ts +7 -0
- package/src/scan/arrow-query.ts +20 -0
- package/src/scan/bind-sql-predicate.ts +21 -0
- package/src/scan/catalog-query-source.ts +132 -0
- package/src/scan/federated-table-scan-source.ts +988 -0
- package/src/scan/index.ts +166 -0
- package/src/scan/parse-sql-predicate.ts +28 -0
- package/src/scan/query-arrow-table-in-batches.ts +55 -0
- package/src/scan/query-arrow-table.ts +656 -0
- package/src/scan/query-open-source.ts +39 -0
- package/src/scan/query-progressive.ts +229 -0
- package/src/scan/query-pushdown.ts +184 -0
- package/src/scan/query.ts +597 -0
- package/src/scan/resolve-query-source.ts +47 -0
- package/src/scan/rows-to-arrow.ts +9 -0
- package/src/scan/scan-engine.ts +96 -0
- package/src/scan/scan-query.ts +27 -0
- package/src/scan/sql-catalog.ts +167 -0
- package/src/scan/sql-predicate-schema.ts +251 -0
- package/src/scan/sql-predicate-types.ts +87 -0
- package/src/scan/sql-predicate-zod.ts +52 -0
- package/src/scan/sql-predicate.ts +28 -0
- package/src/scan/table-query-capabilities.ts +29 -0
- package/src/scan/table-query.ts +84 -0
- package/src/scan/vector-table-scan-source.ts +300 -0
- package/src/schema/categories/category-gis.ts +63 -0
- package/src/schema/categories/category-image.ts +23 -0
- package/src/schema/categories/category-mesh.ts +138 -0
- package/src/schema/categories/category-table.ts +125 -0
- package/src/schema/categories/category-texture.ts +259 -0
- package/src/schema/float16.ts +111 -0
- package/src/schema/geometry/arrow-binary-features.ts +54 -0
- package/src/schema/geometry/binary-features.ts +43 -0
- package/src/schema/geometry/binary-geometries.ts +45 -0
- package/src/schema/geometry/flat-geometries.ts +72 -0
- package/src/schema/geometry/geoarrow.ts +105 -0
- package/src/schema/geospatial-metadata-zod-schema.ts +163 -0
- package/src/schema/index.ts +170 -0
- package/src/schema/metadata.ts +115 -0
- package/src/schema/types/batch.ts +47 -0
- package/src/schema/types/schema.ts +86 -0
- package/src/schema/types/types.ts +52 -0
- package/src/schema-utils/deprecated.ts +53 -0
- package/src/schema-utils/index.ts +180 -0
- package/src/schema-utils/lib/arrow/arrow-metadata.ts +136 -0
- package/src/schema-utils/lib/arrow-utils/arrow-fixed-size-list-utils.ts +78 -0
- package/src/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.ts +48 -0
- package/src/schema-utils/lib/converters/convert.ts +147 -0
- package/src/schema-utils/lib/converters/converters.ts +6 -0
- package/src/schema-utils/lib/converters/types.ts +46 -0
- package/src/schema-utils/lib/mesh/convert-mesh-to-table.ts +309 -0
- package/src/schema-utils/lib/mesh/convert-table-to-mesh.ts +263 -0
- package/src/schema-utils/lib/mesh/deduce-mesh-schema.ts +85 -0
- package/src/schema-utils/lib/mesh/get-mesh-bounding-box.ts +52 -0
- package/src/schema-utils/lib/mesh/mesh-utils.ts +27 -0
- package/src/schema-utils/lib/mesh/point-cloud-tiler.ts +495 -0
- package/src/schema-utils/lib/schema/convert-arrow-schema.ts +552 -0
- package/src/schema-utils/lib/schema/data-type.ts +122 -0
- package/src/schema-utils/lib/schema/deduce-table-schema.ts +121 -0
- package/src/schema-utils/lib/table/arrow-api/arrow-like-field.ts +53 -0
- package/src/schema-utils/lib/table/arrow-api/arrow-like-interface.ts +84 -0
- package/src/schema-utils/lib/table/arrow-api/arrow-like-schema.ts +101 -0
- package/src/schema-utils/lib/table/arrow-api/arrow-like-table.ts +85 -0
- package/src/schema-utils/lib/table/arrow-api/arrow-like-type.ts +500 -0
- package/src/schema-utils/lib/table/arrow-api/enum.ts +99 -0
- package/src/schema-utils/lib/table/arrow-api/get-type-info.ts +38 -0
- package/src/schema-utils/lib/table/arrow-api/index.ts +50 -0
- package/src/schema-utils/lib/table/batch-builder/arrow-table-builder.ts +93 -0
- package/src/schema-utils/lib/table/batch-builder/table-batch-builder.ts +170 -0
- package/src/schema-utils/lib/table/batches/convert-batches.ts +103 -0
- package/src/schema-utils/lib/table/batches/make-arrow-batch-iterator.ts +95 -0
- package/src/schema-utils/lib/table/batches/make-table-batch-iterator.ts +25 -0
- package/src/schema-utils/lib/table/batches/make-table-from-batches.ts +125 -0
- package/src/schema-utils/lib/table/query-arrow-table.ts +112 -0
- package/src/schema-utils/lib/table/tables/convert-arrow-table-wrapper.ts +54 -0
- package/src/schema-utils/lib/table/tables/convert-arrow-table.ts +193 -0
- package/src/schema-utils/lib/table/tables/convert-table.ts +106 -0
- package/src/schema-utils/lib/table/tables/make-table.ts +63 -0
- package/src/schema-utils/lib/table/tables/row-utils.ts +59 -0
- package/src/schema-utils/lib/table/tables/table-accessors.ts +435 -0
- package/src/schema-utils/lib/table/tables/table-column.ts +49 -0
- package/src/schema-utils/lib/table/tables/table-converter/convert-tables.ts +33 -0
- package/src/schema-utils/lib/table/tables/table-converter/table-converter.ts +60 -0
- package/src/schema-utils/lib/table/tables/table-types.ts +37 -0
- package/src/schema-utils/lib/utils/assert.ts +12 -0
- package/src/schema-utils/lib/utils/async-queue.ts +109 -0
- package/src/schema-utils/types/types.ts +45 -0
- package/src/vector-table-scan-source.ts +1 -0
- package/src/wkt/index.ts +11 -0
- package/src/wkt/twkb/convert-geometry-to-twkb.ts +317 -0
- package/src/wkt/twkb/convert-twkb-to-geometry.ts +373 -0
- package/src/wkt/twkb/index.ts +6 -0
- package/src/wkt/twkb/twkb-io.ts +85 -0
- package/src/wkt/twkb/twkb-types.ts +14 -0
- package/src/worker-utils/index.ts +66 -0
- package/src/worker-utils/lib/env-utils/assert.ts +14 -0
- package/src/worker-utils/lib/env-utils/globals.ts +40 -0
- package/src/worker-utils/lib/env-utils/version.ts +18 -0
- package/src/worker-utils/lib/library-utils/library-utils.ts +304 -0
- package/src/worker-utils/lib/node/worker_threads-browser.ts +34 -0
- package/src/worker-utils/lib/node/worker_threads.ts +58 -0
- package/src/worker-utils/lib/npm-tag.ts +5 -0
- package/src/worker-utils/lib/process-utils/child-process-proxy.browser.ts +23 -0
- package/src/worker-utils/lib/process-utils/child-process-proxy.ts +166 -0
- package/src/worker-utils/lib/process-utils/process-utils.ts +34 -0
- package/src/worker-utils/lib/worker-api/create-worker.ts +106 -0
- package/src/worker-utils/lib/worker-api/get-worker-url.ts +129 -0
- package/src/worker-utils/lib/worker-api/process-on-worker.ts +312 -0
- package/src/worker-utils/lib/worker-api/task-runtime.ts +66 -0
- package/src/worker-utils/lib/worker-api/validate-worker-version.ts +44 -0
- package/src/worker-utils/lib/worker-utils/get-loadable-worker-url.ts +76 -0
- package/src/worker-utils/lib/worker-utils/get-transfer-list.ts +95 -0
- package/src/worker-utils/lib/worker-utils/remove-nontransferable-options.ts +27 -0
- package/src/worker-utils/types.ts +113 -0
- package/src/worker-utils/workers/null-worker.ts +20 -0
- package/src/workers/null-worker-node.ts +1 -1
- package/src/workers/null-worker.ts +1 -1
- package/third-party-licenses/Apache-2.0 +73 -0
- package/third-party-licenses/fetch-LICENSE +20 -0
- package/third-party-licenses/fetch-progress-LICENSE +21 -0
- package/third-party-licenses/path-resolve-LICENSE +21 -0
- package/third-party-licenses/retained-MIT-LICENSE +23 -0
- package/third-party-licenses/text-encoding-LICENSE +29 -0
- package/third-party-licenses/wkx-LICENSE +20 -0
package/dist/index.cjs
CHANGED
|
@@ -23,7 +23,6 @@ __export(index_exports, {
|
|
|
23
23
|
FetchError: () => FetchError,
|
|
24
24
|
JSONLoader: () => JSONLoader,
|
|
25
25
|
NullLoader: () => NullLoader,
|
|
26
|
-
NullWorkerLoader: () => NullWorkerLoader,
|
|
27
26
|
RequestScheduler: () => RequestScheduler,
|
|
28
27
|
_BrowserFileSystem: () => BrowserFileSystem,
|
|
29
28
|
_fetchProgress: () => fetchProgress,
|
|
@@ -33,6 +32,7 @@ __export(index_exports, {
|
|
|
33
32
|
concatenateArrayBuffersAsync: () => concatenateArrayBuffersAsync,
|
|
34
33
|
coreApi: () => coreApi,
|
|
35
34
|
createDataSource: () => createDataSource,
|
|
35
|
+
createDataSourceSync: () => createDataSourceSync,
|
|
36
36
|
document: () => document_,
|
|
37
37
|
encode: () => encode,
|
|
38
38
|
encodeInBatches: () => encodeInBatches,
|
|
@@ -84,14 +84,14 @@ __export(index_exports, {
|
|
|
84
84
|
});
|
|
85
85
|
module.exports = __toCommonJS(index_exports);
|
|
86
86
|
|
|
87
|
-
//
|
|
87
|
+
// src/loader-utils/lib/env-utils/assert.ts
|
|
88
88
|
function assert(condition, message) {
|
|
89
89
|
if (!condition) {
|
|
90
90
|
throw new Error(message || "loader assertion failed.");
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
//
|
|
94
|
+
// src/loader-utils/lib/env-utils/globals.ts
|
|
95
95
|
var globals = {
|
|
96
96
|
self: typeof self !== "undefined" && self,
|
|
97
97
|
window: typeof window !== "undefined" && window,
|
|
@@ -110,22 +110,52 @@ var isWorker = typeof importScripts === "function";
|
|
|
110
110
|
var matches = typeof process !== "undefined" && process.version && /v([0-9]*)/.exec(process.version);
|
|
111
111
|
var nodeVersion = matches && parseFloat(matches[1]) || 0;
|
|
112
112
|
|
|
113
|
-
//
|
|
114
|
-
var import_log = require("
|
|
113
|
+
// src/loader-utils/lib/log-utils/log.ts
|
|
114
|
+
var import_log = require("probe.gl/log");
|
|
115
115
|
var VERSION = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
116
116
|
var version = VERSION[0] >= "0" && VERSION[0] <= "9" ? `v${VERSION}` : "";
|
|
117
117
|
function createLog() {
|
|
118
|
-
const
|
|
118
|
+
const log3 = new import_log.Log({ id: "loaders.gl" });
|
|
119
119
|
globalThis.loaders ||= {};
|
|
120
|
-
globalThis.loaders.log =
|
|
120
|
+
globalThis.loaders.log = log3;
|
|
121
121
|
globalThis.loaders.version = version;
|
|
122
122
|
globalThis.probe ||= {};
|
|
123
|
-
globalThis.probe.loaders =
|
|
124
|
-
return
|
|
123
|
+
globalThis.probe.loaders = log3;
|
|
124
|
+
return log3;
|
|
125
125
|
}
|
|
126
126
|
var log = createLog();
|
|
127
|
+
var NullLog = class {
|
|
128
|
+
/** Discards debug messages. */
|
|
129
|
+
log() {
|
|
130
|
+
return ignoreMessage;
|
|
131
|
+
}
|
|
132
|
+
/** Discards informational messages. */
|
|
133
|
+
info() {
|
|
134
|
+
return ignoreMessage;
|
|
135
|
+
}
|
|
136
|
+
/** Discards messages marked to be emitted once. */
|
|
137
|
+
once() {
|
|
138
|
+
return ignoreMessage;
|
|
139
|
+
}
|
|
140
|
+
/** Discards warnings. */
|
|
141
|
+
warn() {
|
|
142
|
+
return ignoreMessage;
|
|
143
|
+
}
|
|
144
|
+
/** Discards errors. */
|
|
145
|
+
error() {
|
|
146
|
+
return ignoreMessage;
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
function ignoreMessage() {
|
|
150
|
+
}
|
|
151
|
+
var nullLog = new NullLog();
|
|
152
|
+
function getLoaderLog(options) {
|
|
153
|
+
var _a;
|
|
154
|
+
const logger = (_a = options == null ? void 0 : options.core) == null ? void 0 : _a.log;
|
|
155
|
+
return logger === null ? nullLog : logger || log;
|
|
156
|
+
}
|
|
127
157
|
|
|
128
|
-
//
|
|
158
|
+
// src/loader-utils/lib/javascript-utils/is-type.ts
|
|
129
159
|
var isBoolean = (value) => typeof value === "boolean";
|
|
130
160
|
var isFunction = (value) => typeof value === "function";
|
|
131
161
|
var isObject = (value) => value !== null && typeof value === "object";
|
|
@@ -145,7 +175,7 @@ var isReadableNodeStream = (value) => isObject(value) && isFunction(value.read)
|
|
|
145
175
|
var isReadableStream = (value) => isReadableDOMStream(value) || isReadableNodeStream(value);
|
|
146
176
|
var isWritableStream = (value) => isWritableDOMStream(value) || isWritableNodeStream(value);
|
|
147
177
|
|
|
148
|
-
//
|
|
178
|
+
// src/loader-utils/lib/option-utils/merge-options.ts
|
|
149
179
|
function mergeOptions(baseOptions, newOptions) {
|
|
150
180
|
return mergeOptionsRecursively(baseOptions || {}, newOptions);
|
|
151
181
|
}
|
|
@@ -168,39 +198,36 @@ function mergeOptionsRecursively(baseOptions, newOptions, level = 0) {
|
|
|
168
198
|
return options;
|
|
169
199
|
}
|
|
170
200
|
|
|
171
|
-
//
|
|
201
|
+
// src/loader-utils/lib/module-utils/js-module-utils.ts
|
|
172
202
|
function registerJSModules(modules) {
|
|
173
203
|
globalThis.loaders ||= {};
|
|
174
204
|
globalThis.loaders.modules ||= {};
|
|
175
205
|
Object.assign(globalThis.loaders.modules, modules);
|
|
176
206
|
}
|
|
177
207
|
|
|
178
|
-
//
|
|
179
|
-
var
|
|
208
|
+
// src/constants/index.ts
|
|
209
|
+
var LOADERS_GL_FIXTURE_BRANCH = "master";
|
|
210
|
+
var LOADERS_GL_RAW_FIXTURE_URL = `https://raw.githubusercontent.com/visgl/loaders.gl/${LOADERS_GL_FIXTURE_BRANCH}/`;
|
|
211
|
+
var LOADERS_GL_REDIRECTING_FIXTURE_URL = `https://github.com/visgl/loaders.gl/raw/${LOADERS_GL_FIXTURE_BRANCH}/`;
|
|
212
|
+
var NPM_TAG = "beta";
|
|
180
213
|
|
|
181
|
-
//
|
|
214
|
+
// src/worker-utils/lib/env-utils/version.ts
|
|
182
215
|
function getVersion() {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
globalThis._loadersgl_.version = NPM_TAG;
|
|
188
|
-
} else {
|
|
189
|
-
globalThis._loadersgl_.version = __VERSION__;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
return globalThis._loadersgl_.version;
|
|
216
|
+
const version3 = typeof __VERSION__ === "undefined" ? NPM_TAG : __VERSION__;
|
|
217
|
+
globalThis._loadersgl_ = globalThis._loadersgl_ || {};
|
|
218
|
+
globalThis._loadersgl_.version ||= version3;
|
|
219
|
+
return version3;
|
|
193
220
|
}
|
|
194
221
|
var VERSION2 = getVersion();
|
|
195
222
|
|
|
196
|
-
//
|
|
223
|
+
// src/worker-utils/lib/env-utils/assert.ts
|
|
197
224
|
function assert2(condition, message) {
|
|
198
225
|
if (!condition) {
|
|
199
226
|
throw new Error(message || "loaders.gl assertion failed.");
|
|
200
227
|
}
|
|
201
228
|
}
|
|
202
229
|
|
|
203
|
-
//
|
|
230
|
+
// src/worker-utils/lib/env-utils/globals.ts
|
|
204
231
|
var globals2 = {
|
|
205
232
|
self: typeof self !== "undefined" && self,
|
|
206
233
|
window: typeof window !== "undefined" && window,
|
|
@@ -219,131 +246,72 @@ var isMobile = typeof window !== "undefined" && typeof window.orientation !== "u
|
|
|
219
246
|
var matches2 = typeof process !== "undefined" && process.version && /v([0-9]*)/.exec(process.version);
|
|
220
247
|
var nodeVersion2 = matches2 && parseFloat(matches2[1]) || 0;
|
|
221
248
|
|
|
222
|
-
//
|
|
223
|
-
var
|
|
224
|
-
name;
|
|
225
|
-
workerThread;
|
|
226
|
-
isRunning = true;
|
|
227
|
-
/** Promise that resolves when Job is done */
|
|
228
|
-
result;
|
|
229
|
-
_resolve = () => {
|
|
230
|
-
};
|
|
231
|
-
_reject = () => {
|
|
232
|
-
};
|
|
233
|
-
constructor(jobName, workerThread) {
|
|
234
|
-
this.name = jobName;
|
|
235
|
-
this.workerThread = workerThread;
|
|
236
|
-
this.result = new Promise((resolve2, reject) => {
|
|
237
|
-
this._resolve = resolve2;
|
|
238
|
-
this._reject = reject;
|
|
239
|
-
});
|
|
240
|
-
}
|
|
241
|
-
/**
|
|
242
|
-
* Send a message to the job's worker thread
|
|
243
|
-
* @param data any data structure, ideally consisting mostly of transferrable objects
|
|
244
|
-
*/
|
|
245
|
-
postMessage(type, payload) {
|
|
246
|
-
this.workerThread.postMessage({
|
|
247
|
-
source: "loaders.gl",
|
|
248
|
-
// Lets worker ignore unrelated messages
|
|
249
|
-
type,
|
|
250
|
-
payload
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
/**
|
|
254
|
-
* Call to resolve the `result` Promise with the supplied value
|
|
255
|
-
*/
|
|
256
|
-
done(value) {
|
|
257
|
-
if (!this.isRunning) {
|
|
258
|
-
return;
|
|
259
|
-
}
|
|
260
|
-
this.isRunning = false;
|
|
261
|
-
this._resolve(value);
|
|
262
|
-
}
|
|
263
|
-
/**
|
|
264
|
-
* Call to reject the `result` Promise with the supplied error
|
|
265
|
-
*/
|
|
266
|
-
error(error) {
|
|
267
|
-
if (!this.isRunning) {
|
|
268
|
-
return;
|
|
269
|
-
}
|
|
270
|
-
this.isRunning = false;
|
|
271
|
-
this._reject(error);
|
|
272
|
-
}
|
|
273
|
-
/**
|
|
274
|
-
* Terminates the worker executing this job and rejects its result.
|
|
275
|
-
* @param reason Abort reason supplied by the caller, or a cross-runtime `AbortError`.
|
|
276
|
-
*/
|
|
277
|
-
abort(reason) {
|
|
278
|
-
if (!this.isRunning) {
|
|
279
|
-
return;
|
|
280
|
-
}
|
|
281
|
-
const error = reason ?? createAbortError(`Worker job "${this.name}" was aborted`);
|
|
282
|
-
this.workerThread.destroy();
|
|
283
|
-
this.error(error);
|
|
284
|
-
}
|
|
285
|
-
};
|
|
286
|
-
function createAbortError(message) {
|
|
287
|
-
const error = new Error(message);
|
|
288
|
-
error.name = "AbortError";
|
|
289
|
-
return error;
|
|
290
|
-
}
|
|
249
|
+
// src/worker-utils/lib/worker-api/process-on-worker.ts
|
|
250
|
+
var import_tasks2 = require("@math.gl/tasks");
|
|
291
251
|
|
|
292
|
-
//
|
|
293
|
-
var
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
252
|
+
// src/worker-utils/lib/worker-api/get-worker-url.ts
|
|
253
|
+
var warnedWorkerVersionFallbacks = /* @__PURE__ */ new Set();
|
|
254
|
+
function getCustomWorkerURL(worker, options = {}) {
|
|
255
|
+
var _a, _b;
|
|
256
|
+
const workerFile = isBrowser2 ? worker.workerFile || `${worker.id}-worker.js` : worker.workerNode || `${worker.id}-worker-node.js`;
|
|
257
|
+
let url = getConfiguredWorkerURL(worker, options);
|
|
258
|
+
const workerType = options._workerType || ((_a = options == null ? void 0 : options.core) == null ? void 0 : _a._workerType);
|
|
259
|
+
if (!url && workerType === "test") {
|
|
260
|
+
if (isBrowser2) {
|
|
261
|
+
url = `modules/${worker.module}/dist/${workerFile}`;
|
|
262
|
+
} else {
|
|
263
|
+
const workerSourceDirectory = worker.module === "core" && ((_b = worker.workerNode) == null ? void 0 : _b.startsWith("worker-utils/")) ? "worker-utils/workers" : "workers";
|
|
264
|
+
const workerSourceNode = worker.workerSourceNode || `${workerSourceDirectory}/${worker.id}-worker-node.ts`;
|
|
265
|
+
url = `modules/${worker.module}/src/${workerSourceNode}`;
|
|
301
266
|
}
|
|
302
267
|
}
|
|
303
|
-
|
|
304
|
-
|
|
268
|
+
return url || null;
|
|
269
|
+
}
|
|
270
|
+
function getConfiguredWorkerURL(worker, options = {}) {
|
|
271
|
+
const workerOptions = options[worker.id] || {};
|
|
272
|
+
return workerOptions.workerUrl || (worker.id === "compression" ? options.workerUrl : null) || null;
|
|
273
|
+
}
|
|
274
|
+
function getWorkerURL(worker, options = {}) {
|
|
275
|
+
const customWorkerUrl = getCustomWorkerURL(worker, options);
|
|
276
|
+
const descriptorWorkerUrl = typeof worker.worker === "string" ? worker.worker : null;
|
|
277
|
+
const url = customWorkerUrl || descriptorWorkerUrl || getDefaultWorkerURL(worker, true);
|
|
278
|
+
assert2(url);
|
|
279
|
+
return url;
|
|
280
|
+
}
|
|
281
|
+
function getDefaultWorkerURL(worker, warn = false) {
|
|
282
|
+
const workerFile = isBrowser2 ? worker.workerFile || `${worker.id}-worker.js` : worker.workerNode || `${worker.id}-worker-node.js`;
|
|
283
|
+
let version3 = worker.version;
|
|
284
|
+
if (version3 === "latest") {
|
|
285
|
+
version3 = NPM_TAG;
|
|
305
286
|
}
|
|
306
|
-
};
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
function getLoadableWorkerURL(props) {
|
|
311
|
-
assert2(props.source && !props.url || !props.source && props.url);
|
|
312
|
-
let workerURL = workerURLCache.get(props.source || props.url);
|
|
313
|
-
if (!workerURL) {
|
|
314
|
-
if (props.url) {
|
|
315
|
-
workerURL = getLoadableWorkerURLFromURL(props.url);
|
|
316
|
-
workerURLCache.set(props.url, workerURL);
|
|
317
|
-
}
|
|
318
|
-
if (props.source) {
|
|
319
|
-
workerURL = getLoadableWorkerURLFromSource(props.source);
|
|
320
|
-
workerURLCache.set(props.source, workerURL);
|
|
321
|
-
}
|
|
287
|
+
const versionTag = version3 ? `@${version3}` : "";
|
|
288
|
+
const url = `https://unpkg.com/@loaders.gl/${worker.module}${versionTag}/dist/${workerFile}`;
|
|
289
|
+
if (warn) {
|
|
290
|
+
warnIfUsingNpmTagFallback(worker, url);
|
|
322
291
|
}
|
|
323
|
-
|
|
324
|
-
return workerURL;
|
|
292
|
+
return url;
|
|
325
293
|
}
|
|
326
|
-
function
|
|
327
|
-
if (
|
|
328
|
-
return
|
|
294
|
+
function warnIfUsingNpmTagFallback(worker, url) {
|
|
295
|
+
if (worker.version !== "latest") {
|
|
296
|
+
return;
|
|
329
297
|
}
|
|
330
|
-
const
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
298
|
+
const workerId = `${worker.module}:${worker.id}`;
|
|
299
|
+
if (warnedWorkerVersionFallbacks.has(workerId)) {
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
warnedWorkerVersionFallbacks.add(workerId);
|
|
303
|
+
log.warn(
|
|
304
|
+
`loaders.gl: ${worker.name} loader worker version is "latest" because __VERSION__ was not injected. Fetching ${url} from CDN.`
|
|
305
|
+
)();
|
|
336
306
|
}
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
throw error;
|
|
343
|
-
}`;
|
|
307
|
+
|
|
308
|
+
// src/worker-utils/lib/worker-api/task-runtime.ts
|
|
309
|
+
var import_tasks = require("@math.gl/tasks");
|
|
310
|
+
function normalizeTaskProgress(progress) {
|
|
311
|
+
return { ...progress, phase: progress.phase ?? "process", unit: progress.unit ?? "items" };
|
|
344
312
|
}
|
|
345
313
|
|
|
346
|
-
//
|
|
314
|
+
// src/worker-utils/lib/worker-utils/get-transfer-list.ts
|
|
347
315
|
function getTransferList(object, recursive = true, transfers) {
|
|
348
316
|
const transfersSet = transfers || /* @__PURE__ */ new Set();
|
|
349
317
|
if (!object) {
|
|
@@ -383,7 +351,7 @@ function getTransferListForWriter(object) {
|
|
|
383
351
|
}
|
|
384
352
|
const clone = Object.assign({}, object);
|
|
385
353
|
Object.keys(clone).forEach((key) => {
|
|
386
|
-
if (typeof object[key] === "object" && !ArrayBuffer.isView(object[key]) && !(object[key] instanceof Array)) {
|
|
354
|
+
if (object[key] !== null && typeof object[key] === "object" && !ArrayBuffer.isView(object[key]) && !(object[key] instanceof Array)) {
|
|
387
355
|
clone[key] = getTransferListForWriter(object[key]);
|
|
388
356
|
} else if (typeof clone[key] === "function" || clone[key] instanceof RegExp) {
|
|
389
357
|
clone[key] = {};
|
|
@@ -394,782 +362,227 @@ function getTransferListForWriter(object) {
|
|
|
394
362
|
return clone;
|
|
395
363
|
}
|
|
396
364
|
|
|
397
|
-
//
|
|
398
|
-
var
|
|
399
|
-
|
|
400
|
-
var
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
/** Creates a browser Worker directly. */
|
|
407
|
-
loadWorker;
|
|
408
|
-
terminated = false;
|
|
409
|
-
worker;
|
|
410
|
-
onMessage;
|
|
411
|
-
onError;
|
|
412
|
-
_loadableURL = "";
|
|
413
|
-
/** Checks if workers are supported on this platform */
|
|
414
|
-
static isSupported() {
|
|
415
|
-
return typeof Worker !== "undefined" && isBrowser2 || typeof NodeWorker !== "undefined" && !isBrowser2;
|
|
416
|
-
}
|
|
417
|
-
constructor(props) {
|
|
418
|
-
const { name, source, url, getUrl, loadWorker } = props;
|
|
419
|
-
assert2(source || url || getUrl || loadWorker);
|
|
420
|
-
this.name = name;
|
|
421
|
-
this.source = source;
|
|
422
|
-
this.url = url;
|
|
423
|
-
this.getUrl = getUrl;
|
|
424
|
-
this.loadWorker = loadWorker;
|
|
425
|
-
this.onMessage = NOOP;
|
|
426
|
-
this.onError = (error) => console.log(error);
|
|
427
|
-
this.worker = isBrowser2 ? this._createBrowserWorker() : this._createNodeWorker();
|
|
428
|
-
}
|
|
429
|
-
/**
|
|
430
|
-
* Terminate this worker thread
|
|
431
|
-
* @note Can free up significant memory
|
|
432
|
-
*/
|
|
433
|
-
destroy() {
|
|
434
|
-
this.onMessage = NOOP;
|
|
435
|
-
this.onError = NOOP;
|
|
436
|
-
this.worker.terminate();
|
|
437
|
-
this.terminated = true;
|
|
438
|
-
}
|
|
439
|
-
/** Keeps this worker from preventing Node.js process exit while idle. */
|
|
440
|
-
unref() {
|
|
441
|
-
if (!isBrowser2 && typeof this.worker.unref === "function") {
|
|
442
|
-
this.worker.unref();
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
/** Keeps this worker alive while it is actively processing a job. */
|
|
446
|
-
ref() {
|
|
447
|
-
if (!isBrowser2 && typeof this.worker.ref === "function") {
|
|
448
|
-
this.worker.ref();
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
get isRunning() {
|
|
452
|
-
return Boolean(this.onMessage);
|
|
453
|
-
}
|
|
454
|
-
/**
|
|
455
|
-
* Send a message to this worker thread
|
|
456
|
-
* @param data any data structure, ideally consisting mostly of transferrable objects
|
|
457
|
-
* @param transferList If not supplied, calculated automatically by traversing data
|
|
458
|
-
*/
|
|
459
|
-
postMessage(data, transferList) {
|
|
460
|
-
transferList = transferList || getTransferList(data);
|
|
461
|
-
this.worker.postMessage(data, transferList);
|
|
462
|
-
}
|
|
463
|
-
// PRIVATE
|
|
464
|
-
/**
|
|
465
|
-
* Generate a standard Error from an ErrorEvent
|
|
466
|
-
* @param event
|
|
467
|
-
*/
|
|
468
|
-
_getErrorFromErrorEvent(event) {
|
|
469
|
-
let message = "Failed to load ";
|
|
470
|
-
message += `worker ${this.name} from ${this.url || "built-in worker factory"}. `;
|
|
471
|
-
if (event.message) {
|
|
472
|
-
message += `${event.message} in `;
|
|
473
|
-
}
|
|
474
|
-
if (event.lineno) {
|
|
475
|
-
message += `:${event.lineno}:${event.colno}`;
|
|
476
|
-
}
|
|
477
|
-
return new Error(message);
|
|
478
|
-
}
|
|
479
|
-
/**
|
|
480
|
-
* Creates a worker thread on the browser
|
|
481
|
-
*/
|
|
482
|
-
_createBrowserWorker() {
|
|
483
|
-
var _a;
|
|
484
|
-
if (this.loadWorker) {
|
|
485
|
-
try {
|
|
486
|
-
const worker2 = this.loadWorker();
|
|
487
|
-
if (worker2) {
|
|
488
|
-
return this._initializeBrowserWorker(worker2);
|
|
489
|
-
}
|
|
490
|
-
} catch (error) {
|
|
491
|
-
if (!this.source && !this.url && !this.getUrl) {
|
|
492
|
-
throw error;
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
const url = this.url || ((_a = this.getUrl) == null ? void 0 : _a.call(this));
|
|
497
|
-
this._loadableURL = getLoadableWorkerURL({ source: this.source, url });
|
|
498
|
-
const worker = new Worker(this._loadableURL, { name: this.name });
|
|
499
|
-
return this._initializeBrowserWorker(worker);
|
|
500
|
-
}
|
|
501
|
-
/** Attaches protocol handlers to a browser worker. */
|
|
502
|
-
_initializeBrowserWorker(worker) {
|
|
503
|
-
worker.onmessage = (event) => {
|
|
504
|
-
if (!event.data) {
|
|
505
|
-
this.onError(new Error("No data received"));
|
|
506
|
-
} else {
|
|
507
|
-
this.onMessage(event.data);
|
|
508
|
-
}
|
|
509
|
-
};
|
|
510
|
-
worker.onerror = (error) => {
|
|
511
|
-
this.onError(this._getErrorFromErrorEvent(error));
|
|
512
|
-
this.terminated = true;
|
|
513
|
-
};
|
|
514
|
-
worker.onmessageerror = (event) => console.error(event);
|
|
515
|
-
return worker;
|
|
516
|
-
}
|
|
517
|
-
/**
|
|
518
|
-
* Creates a worker thread in node.js
|
|
519
|
-
* @todo https://nodejs.org/api/async_hooks.html#async-resource-worker-pool
|
|
520
|
-
*/
|
|
521
|
-
_createNodeWorker() {
|
|
522
|
-
let worker;
|
|
523
|
-
if (this.url) {
|
|
524
|
-
const absolute = this.url.includes(":/") || this.url.startsWith("/");
|
|
525
|
-
const url = absolute ? this.url : `./${this.url}`;
|
|
526
|
-
const workerUrl = url.startsWith("file:") ? new URL(url) : url;
|
|
527
|
-
const type = this.url.endsWith(".ts") || this.url.endsWith(".mjs") ? "module" : "commonjs";
|
|
528
|
-
worker = new NodeWorker(workerUrl, { eval: false, type });
|
|
529
|
-
} else if (this.source) {
|
|
530
|
-
worker = new NodeWorker(this.source, { eval: true });
|
|
531
|
-
} else {
|
|
532
|
-
throw new Error("no worker");
|
|
533
|
-
}
|
|
534
|
-
worker.on("message", (data) => {
|
|
535
|
-
this.onMessage(data);
|
|
536
|
-
});
|
|
537
|
-
worker.on("error", (error) => {
|
|
538
|
-
this.onError(error);
|
|
539
|
-
});
|
|
540
|
-
worker.on("exit", (_code) => {
|
|
541
|
-
});
|
|
542
|
-
return worker;
|
|
543
|
-
}
|
|
544
|
-
};
|
|
545
|
-
|
|
546
|
-
// ../worker-utils/src/lib/worker-farm/worker-pool.ts
|
|
547
|
-
var WorkerPool = class {
|
|
548
|
-
name = "unnamed";
|
|
549
|
-
source;
|
|
550
|
-
// | Function;
|
|
551
|
-
url;
|
|
552
|
-
/** Lazily resolves a classic worker fallback URL. */
|
|
553
|
-
getUrl;
|
|
554
|
-
/** Creates a browser Worker directly. */
|
|
555
|
-
loadWorker;
|
|
556
|
-
maxConcurrency = 1;
|
|
557
|
-
maxMobileConcurrency = 1;
|
|
558
|
-
onDebug = () => {
|
|
559
|
-
};
|
|
560
|
-
reuseWorkers = true;
|
|
561
|
-
props = {};
|
|
562
|
-
jobQueue = [];
|
|
563
|
-
idleQueue = [];
|
|
564
|
-
activeJobs = /* @__PURE__ */ new Set();
|
|
565
|
-
count = 0;
|
|
566
|
-
isDestroyed = false;
|
|
567
|
-
/** Checks if workers are supported on this platform */
|
|
568
|
-
static isSupported() {
|
|
569
|
-
return WorkerThread.isSupported();
|
|
570
|
-
}
|
|
571
|
-
/**
|
|
572
|
-
* @param processor - worker function
|
|
573
|
-
* @param maxConcurrency - max count of workers
|
|
574
|
-
*/
|
|
575
|
-
constructor(props) {
|
|
576
|
-
this.source = props.source;
|
|
577
|
-
this.url = props.url;
|
|
578
|
-
this.getUrl = props.getUrl;
|
|
579
|
-
this.loadWorker = props.loadWorker;
|
|
580
|
-
this.setProps(props);
|
|
581
|
-
}
|
|
582
|
-
/**
|
|
583
|
-
* Terminates all workers in the pool and aborts active jobs.
|
|
584
|
-
* @param reason Optional error delivered to active jobs.
|
|
585
|
-
* @note Can free up significant memory
|
|
586
|
-
*/
|
|
587
|
-
destroy(reason = new Error("Worker pool was destroyed")) {
|
|
588
|
-
this.activeJobs.forEach((job) => job.abort(reason));
|
|
589
|
-
const queuedJobs = this.jobQueue.splice(0);
|
|
590
|
-
queuedJobs.forEach((queuedJob) => queuedJob.onReject(reason));
|
|
591
|
-
this.idleQueue.forEach((worker) => worker.destroy());
|
|
592
|
-
this.isDestroyed = true;
|
|
593
|
-
}
|
|
594
|
-
setProps(props) {
|
|
595
|
-
this.props = { ...this.props, ...props };
|
|
596
|
-
if (props.name !== void 0) {
|
|
597
|
-
this.name = props.name;
|
|
598
|
-
}
|
|
599
|
-
if (props.maxConcurrency !== void 0) {
|
|
600
|
-
this.maxConcurrency = props.maxConcurrency;
|
|
601
|
-
}
|
|
602
|
-
if (props.maxMobileConcurrency !== void 0) {
|
|
603
|
-
this.maxMobileConcurrency = props.maxMobileConcurrency;
|
|
604
|
-
}
|
|
605
|
-
if (props.reuseWorkers !== void 0) {
|
|
606
|
-
this.reuseWorkers = props.reuseWorkers;
|
|
607
|
-
}
|
|
608
|
-
if (props.onDebug !== void 0) {
|
|
609
|
-
this.onDebug = props.onDebug;
|
|
610
|
-
}
|
|
611
|
-
}
|
|
612
|
-
async startJob(name, onMessage2 = (job, type, data) => job.done(data), onError = (job, error) => job.error(error)) {
|
|
613
|
-
if (this.isDestroyed) {
|
|
614
|
-
return Promise.reject(new Error("Worker pool was destroyed"));
|
|
615
|
-
}
|
|
616
|
-
const startPromise = new Promise((onStart, onReject) => {
|
|
617
|
-
this.jobQueue.push({ name, onMessage: onMessage2, onError, onStart, onReject });
|
|
618
|
-
return this;
|
|
619
|
-
});
|
|
620
|
-
this._startQueuedJob();
|
|
621
|
-
return await startPromise;
|
|
622
|
-
}
|
|
623
|
-
// PRIVATE
|
|
624
|
-
/**
|
|
625
|
-
* Starts first queued job if worker is available or can be created
|
|
626
|
-
* Called when job is started and whenever a worker returns to the idleQueue
|
|
627
|
-
*/
|
|
628
|
-
async _startQueuedJob() {
|
|
629
|
-
if (!this.jobQueue.length) {
|
|
630
|
-
return;
|
|
631
|
-
}
|
|
632
|
-
const workerThread = this._getAvailableWorker();
|
|
633
|
-
if (!workerThread) {
|
|
634
|
-
return;
|
|
635
|
-
}
|
|
636
|
-
const queuedJob = this.jobQueue.shift();
|
|
637
|
-
if (queuedJob) {
|
|
638
|
-
this.onDebug({
|
|
639
|
-
message: "Starting job",
|
|
640
|
-
name: queuedJob.name,
|
|
641
|
-
workerThread,
|
|
642
|
-
backlog: this.jobQueue.length
|
|
643
|
-
});
|
|
644
|
-
const job = new WorkerJob(queuedJob.name, workerThread);
|
|
645
|
-
this.activeJobs.add(job);
|
|
646
|
-
workerThread.ref();
|
|
647
|
-
workerThread.onMessage = (data) => queuedJob.onMessage(job, data.type, data.payload);
|
|
648
|
-
workerThread.onError = (error) => queuedJob.onError(job, error);
|
|
649
|
-
queuedJob.onStart(job);
|
|
650
|
-
try {
|
|
651
|
-
await job.result;
|
|
652
|
-
} catch {
|
|
653
|
-
} finally {
|
|
654
|
-
this.activeJobs.delete(job);
|
|
655
|
-
this.returnWorkerToQueue(workerThread);
|
|
656
|
-
}
|
|
657
|
-
}
|
|
658
|
-
}
|
|
659
|
-
/**
|
|
660
|
-
* Returns a worker to the idle queue
|
|
661
|
-
* Destroys the worker if
|
|
662
|
-
* - pool is destroyed
|
|
663
|
-
* - if this pool doesn't reuse workers
|
|
664
|
-
* - if maxConcurrency has been lowered
|
|
665
|
-
* @param worker
|
|
666
|
-
*/
|
|
667
|
-
returnWorkerToQueue(worker) {
|
|
668
|
-
const shouldDestroyWorker = (
|
|
669
|
-
// Aborted jobs terminate their worker immediately.
|
|
670
|
-
worker.terminated || // If the pool is destroyed, there is no reason to keep the worker around
|
|
671
|
-
this.isDestroyed || // If the app has disabled worker reuse, any completed workers should be destroyed
|
|
672
|
-
!this.reuseWorkers || // If concurrency has been lowered, this worker might be surplus to requirements
|
|
673
|
-
this.count > this._getMaxConcurrency()
|
|
674
|
-
);
|
|
675
|
-
if (shouldDestroyWorker) {
|
|
676
|
-
if (!worker.terminated) {
|
|
677
|
-
worker.destroy();
|
|
678
|
-
}
|
|
679
|
-
this.count--;
|
|
680
|
-
} else {
|
|
681
|
-
worker.unref();
|
|
682
|
-
this.idleQueue.push(worker);
|
|
683
|
-
}
|
|
684
|
-
if (!this.isDestroyed) {
|
|
685
|
-
this._startQueuedJob();
|
|
686
|
-
}
|
|
687
|
-
}
|
|
688
|
-
/**
|
|
689
|
-
* Returns idle worker or creates new worker if maxConcurrency has not been reached
|
|
690
|
-
*/
|
|
691
|
-
_getAvailableWorker() {
|
|
692
|
-
if (this.idleQueue.length > 0) {
|
|
693
|
-
return this.idleQueue.shift() || null;
|
|
694
|
-
}
|
|
695
|
-
if (this.count < this._getMaxConcurrency()) {
|
|
696
|
-
this.count++;
|
|
697
|
-
const name = `${this.name.toLowerCase()} (#${this.count} of ${this.maxConcurrency})`;
|
|
698
|
-
return new WorkerThread({
|
|
699
|
-
name,
|
|
700
|
-
source: this.source,
|
|
701
|
-
url: this.url,
|
|
702
|
-
getUrl: this.getUrl,
|
|
703
|
-
loadWorker: this.loadWorker
|
|
704
|
-
});
|
|
705
|
-
}
|
|
706
|
-
return null;
|
|
707
|
-
}
|
|
708
|
-
_getMaxConcurrency() {
|
|
709
|
-
return isMobile ? this.maxMobileConcurrency : this.maxConcurrency;
|
|
710
|
-
}
|
|
711
|
-
};
|
|
712
|
-
|
|
713
|
-
// ../worker-utils/src/lib/worker-farm/worker-farm.ts
|
|
714
|
-
var DEFAULT_PROPS = {
|
|
715
|
-
maxConcurrency: 3,
|
|
716
|
-
maxMobileConcurrency: 1,
|
|
717
|
-
reuseWorkers: true,
|
|
718
|
-
onDebug: () => {
|
|
719
|
-
}
|
|
720
|
-
};
|
|
721
|
-
var loadWorkerIds = /* @__PURE__ */ new WeakMap();
|
|
722
|
-
var nextLoadWorkerId = 1;
|
|
723
|
-
var WorkerFarm = class _WorkerFarm {
|
|
724
|
-
props;
|
|
725
|
-
workerPools = /* @__PURE__ */ new Map();
|
|
726
|
-
// singleton
|
|
727
|
-
static _workerFarm;
|
|
728
|
-
/** Checks if workers are supported on this platform */
|
|
729
|
-
static isSupported() {
|
|
730
|
-
return WorkerThread.isSupported();
|
|
731
|
-
}
|
|
732
|
-
/** Get the singleton instance of the global worker farm */
|
|
733
|
-
static getWorkerFarm(props = {}) {
|
|
734
|
-
_WorkerFarm._workerFarm = _WorkerFarm._workerFarm || new _WorkerFarm({});
|
|
735
|
-
_WorkerFarm._workerFarm.setProps(props);
|
|
736
|
-
return _WorkerFarm._workerFarm;
|
|
737
|
-
}
|
|
738
|
-
/** get global instance with WorkerFarm.getWorkerFarm() */
|
|
739
|
-
constructor(props) {
|
|
740
|
-
this.props = { ...DEFAULT_PROPS };
|
|
741
|
-
this.setProps(props);
|
|
742
|
-
this.workerPools = /* @__PURE__ */ new Map();
|
|
743
|
-
}
|
|
744
|
-
/**
|
|
745
|
-
* Terminate all workers in the farm and abort active jobs.
|
|
746
|
-
* @param reason Optional error delivered to active jobs.
|
|
747
|
-
* @note Can free up significant memory
|
|
748
|
-
*/
|
|
749
|
-
destroy(reason) {
|
|
750
|
-
for (const workerPool of this.workerPools.values()) {
|
|
751
|
-
workerPool.destroy(reason);
|
|
752
|
-
}
|
|
753
|
-
this.workerPools = /* @__PURE__ */ new Map();
|
|
754
|
-
}
|
|
755
|
-
/**
|
|
756
|
-
* Set props used when initializing worker pools
|
|
757
|
-
* @param props
|
|
758
|
-
*/
|
|
759
|
-
setProps(props) {
|
|
760
|
-
this.props = { ...this.props, ...props };
|
|
761
|
-
for (const workerPool of this.workerPools.values()) {
|
|
762
|
-
workerPool.setProps(this._getWorkerPoolProps());
|
|
763
|
-
}
|
|
764
|
-
}
|
|
765
|
-
/**
|
|
766
|
-
* Returns a worker pool for the specified worker
|
|
767
|
-
* @param options Worker target used to identify and initialize the pool.
|
|
768
|
-
* @param options.name Worker name used as the base pool identity.
|
|
769
|
-
* @param options.url Worker script URL.
|
|
770
|
-
* @param options.source Inline worker source.
|
|
771
|
-
* @param options.loadWorker Built-in browser worker factory.
|
|
772
|
-
* @example
|
|
773
|
-
* const job = WorkerFarm.getWorkerFarm().getWorkerPool({name, url}).startJob(...);
|
|
774
|
-
*/
|
|
775
|
-
getWorkerPool(options) {
|
|
776
|
-
const { name, source, url, getUrl, loadWorker } = options;
|
|
777
|
-
const workerPoolKey = getWorkerPoolKey(options);
|
|
778
|
-
let workerPool = this.workerPools.get(workerPoolKey);
|
|
779
|
-
if (!workerPool) {
|
|
780
|
-
workerPool = new WorkerPool({
|
|
781
|
-
name,
|
|
782
|
-
source,
|
|
783
|
-
url,
|
|
784
|
-
getUrl,
|
|
785
|
-
loadWorker
|
|
786
|
-
});
|
|
787
|
-
workerPool.setProps(this._getWorkerPoolProps());
|
|
788
|
-
this.workerPools.set(workerPoolKey, workerPool);
|
|
789
|
-
}
|
|
790
|
-
return workerPool;
|
|
791
|
-
}
|
|
792
|
-
_getWorkerPoolProps() {
|
|
793
|
-
return {
|
|
794
|
-
maxConcurrency: this.props.maxConcurrency,
|
|
795
|
-
maxMobileConcurrency: this.props.maxMobileConcurrency,
|
|
796
|
-
reuseWorkers: this.props.reuseWorkers,
|
|
797
|
-
onDebug: this.props.onDebug
|
|
798
|
-
};
|
|
799
|
-
}
|
|
800
|
-
};
|
|
801
|
-
function getWorkerPoolKey(options) {
|
|
802
|
-
const { name, source, url, urlKey, loadWorker } = options;
|
|
803
|
-
const sourceKey = source ? `source:${source}` : "";
|
|
804
|
-
const urlKeyPart = url || urlKey ? `url:${url || urlKey}` : "";
|
|
805
|
-
const loadWorkerKey = loadWorker ? `loadWorker:${getLoadWorkerId(loadWorker)}` : "";
|
|
806
|
-
return [name, sourceKey, urlKeyPart, loadWorkerKey].filter(Boolean).join("|");
|
|
365
|
+
// src/worker-utils/lib/worker-api/process-on-worker.ts
|
|
366
|
+
var runners = /* @__PURE__ */ new WeakMap();
|
|
367
|
+
var activeRunners = /* @__PURE__ */ new Set();
|
|
368
|
+
var moduleWorkerUrls = /* @__PURE__ */ new Map();
|
|
369
|
+
function canProcessOnWorker(worker, options = {}) {
|
|
370
|
+
const supported = isBrowser2 ? typeof Worker !== "undefined" : Boolean(options._nodeWorkers);
|
|
371
|
+
return Boolean(
|
|
372
|
+
supported && options.worker && (worker.worker || worker.loadWorker || getConfiguredWorkerURL(worker, options))
|
|
373
|
+
);
|
|
807
374
|
}
|
|
808
|
-
function
|
|
809
|
-
|
|
810
|
-
if (
|
|
811
|
-
|
|
812
|
-
loadWorkerIds.set(loadWorker, loadWorkerId);
|
|
813
|
-
}
|
|
814
|
-
return loadWorkerId;
|
|
375
|
+
function canProcessOnWorkerInBatches(worker, options = {}) {
|
|
376
|
+
if (!canProcessOnWorker(worker, options)) return false;
|
|
377
|
+
if (options.workerInBatches !== void 0) return options.workerInBatches;
|
|
378
|
+
return Boolean(worker.workerInBatches && !getConfiguredWorkerURL(worker, options));
|
|
815
379
|
}
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
this._settlers = [];
|
|
825
|
-
this._closed = false;
|
|
826
|
-
}
|
|
827
|
-
/** Return an async iterator for this queue */
|
|
828
|
-
[Symbol.asyncIterator]() {
|
|
829
|
-
return this;
|
|
830
|
-
}
|
|
831
|
-
/** Push a new value - the async iterator will yield a promise resolved to this value */
|
|
832
|
-
push(value) {
|
|
833
|
-
return this.enqueue(value);
|
|
834
|
-
}
|
|
835
|
-
/**
|
|
836
|
-
* Push a new value - the async iterator will yield a promise resolved to this value
|
|
837
|
-
* Add an error - the async iterator will yield a promise rejected with this value
|
|
838
|
-
*/
|
|
839
|
-
enqueue(value) {
|
|
840
|
-
if (this._closed) {
|
|
841
|
-
throw new Error("Closed");
|
|
842
|
-
}
|
|
843
|
-
if (this._settlers.length > 0) {
|
|
844
|
-
if (this._values.length > 0) {
|
|
845
|
-
throw new Error("Illegal internal state");
|
|
846
|
-
}
|
|
847
|
-
const settler = this._settlers.shift();
|
|
848
|
-
if (value instanceof Error) {
|
|
849
|
-
settler.reject(value);
|
|
850
|
-
} else {
|
|
851
|
-
settler.resolve({ value });
|
|
852
|
-
}
|
|
853
|
-
} else {
|
|
854
|
-
this._values.push(value);
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
/** Indicate that we not waiting for more values - The async iterator will be done */
|
|
858
|
-
close() {
|
|
859
|
-
while (this._settlers.length > 0) {
|
|
860
|
-
const settler = this._settlers.shift();
|
|
861
|
-
settler.resolve({ done: true });
|
|
862
|
-
}
|
|
863
|
-
this._closed = true;
|
|
864
|
-
}
|
|
865
|
-
// ITERATOR IMPLEMENTATION
|
|
866
|
-
/** @returns a Promise for an IteratorResult */
|
|
867
|
-
next() {
|
|
868
|
-
if (this._values.length > 0) {
|
|
869
|
-
const value = this._values.shift();
|
|
870
|
-
if (value instanceof Error) {
|
|
871
|
-
return Promise.reject(value);
|
|
872
|
-
}
|
|
873
|
-
return Promise.resolve({ done: false, value });
|
|
874
|
-
}
|
|
875
|
-
if (this._closed) {
|
|
876
|
-
if (this._settlers.length > 0) {
|
|
877
|
-
throw new Error("Illegal internal state");
|
|
380
|
+
async function processOnWorker(worker, data, options = {}, context = {}, jobContext = {}) {
|
|
381
|
+
const session = await openSession(worker, options, context, jobContext);
|
|
382
|
+
try {
|
|
383
|
+
const result = await session.handle.runTask(
|
|
384
|
+
{ value: data },
|
|
385
|
+
{
|
|
386
|
+
...getControls(options),
|
|
387
|
+
options: getParserOptions(options)
|
|
878
388
|
}
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
});
|
|
389
|
+
);
|
|
390
|
+
return result.value;
|
|
391
|
+
} finally {
|
|
392
|
+
await session.close();
|
|
884
393
|
}
|
|
885
|
-
};
|
|
886
|
-
|
|
887
|
-
// ../worker-utils/src/lib/worker-api/get-worker-url.ts
|
|
888
|
-
var warnedWorkerVersionFallbacks = /* @__PURE__ */ new Set();
|
|
889
|
-
function getWorkerName(worker) {
|
|
890
|
-
const warning = worker.version !== VERSION2 ? ` (worker-utils@${VERSION2})` : "";
|
|
891
|
-
return `${worker.name}@${worker.version}${warning}`;
|
|
892
394
|
}
|
|
893
|
-
function
|
|
395
|
+
async function* processOnWorkerInBatches(worker, input, options = {}, context = {}, jobContext = {}) {
|
|
894
396
|
var _a;
|
|
895
|
-
const
|
|
896
|
-
|
|
897
|
-
let url = workerOptions.workerUrl;
|
|
898
|
-
if (!url && worker.id === "compression") {
|
|
899
|
-
url = options.workerUrl;
|
|
900
|
-
}
|
|
901
|
-
const workerType = options._workerType || ((_a = options == null ? void 0 : options.core) == null ? void 0 : _a._workerType);
|
|
902
|
-
if (!url && workerType === "test") {
|
|
903
|
-
if (isBrowser2) {
|
|
904
|
-
url = `modules/${worker.module}/dist/${workerFile}`;
|
|
905
|
-
} else {
|
|
906
|
-
url = `modules/${worker.module}/src/workers/${worker.id}-worker-node.ts`;
|
|
907
|
-
}
|
|
908
|
-
}
|
|
909
|
-
return url || null;
|
|
910
|
-
}
|
|
911
|
-
function getWorkerURL(worker, options = {}) {
|
|
912
|
-
const customWorkerUrl = getCustomWorkerURL(worker, options);
|
|
913
|
-
const descriptorWorkerUrl = typeof worker.worker === "string" ? worker.worker : null;
|
|
914
|
-
const url = customWorkerUrl || descriptorWorkerUrl || getDefaultWorkerURL(worker, true);
|
|
915
|
-
assert2(url);
|
|
916
|
-
return url;
|
|
917
|
-
}
|
|
918
|
-
function getDefaultWorkerURL(worker, warn = false) {
|
|
919
|
-
const workerFile = isBrowser2 ? worker.workerFile || `${worker.id}-worker.js` : worker.workerNode || `${worker.id}-worker-node.js`;
|
|
920
|
-
let version2 = worker.version;
|
|
921
|
-
if (version2 === "latest") {
|
|
922
|
-
version2 = NPM_TAG;
|
|
923
|
-
}
|
|
924
|
-
const versionTag = version2 ? `@${version2}` : "";
|
|
925
|
-
const url = `https://unpkg.com/@loaders.gl/${worker.module}${versionTag}/dist/${workerFile}`;
|
|
926
|
-
if (warn) {
|
|
927
|
-
warnIfUsingNpmTagFallback(worker, url);
|
|
928
|
-
}
|
|
929
|
-
return url;
|
|
930
|
-
}
|
|
931
|
-
function warnIfUsingNpmTagFallback(worker, url) {
|
|
932
|
-
if (worker.version !== "latest") {
|
|
933
|
-
return;
|
|
934
|
-
}
|
|
935
|
-
const workerId = `${worker.module}:${worker.id}`;
|
|
936
|
-
if (warnedWorkerVersionFallbacks.has(workerId)) {
|
|
937
|
-
return;
|
|
938
|
-
}
|
|
939
|
-
warnedWorkerVersionFallbacks.add(workerId);
|
|
940
|
-
console.warn(
|
|
941
|
-
`loaders.gl: ${worker.name} loader worker version is "latest" because __VERSION__ was not injected. Fetching ${url} from CDN.`
|
|
942
|
-
);
|
|
943
|
-
}
|
|
944
|
-
|
|
945
|
-
// ../worker-utils/src/lib/worker-api/process-on-worker.ts
|
|
946
|
-
function canProcessOnWorker(worker, options) {
|
|
947
|
-
if (!WorkerFarm.isSupported()) {
|
|
948
|
-
return false;
|
|
949
|
-
}
|
|
950
|
-
const workerOptions = options == null ? void 0 : options[worker.id];
|
|
951
|
-
return Boolean(
|
|
952
|
-
(worker.worker || worker.loadWorker || (workerOptions == null ? void 0 : workerOptions.workerUrl)) && (options == null ? void 0 : options.worker)
|
|
953
|
-
);
|
|
954
|
-
}
|
|
955
|
-
async function processOnWorker(worker, data, options = {}, context = {}, jobContext = {}) {
|
|
956
|
-
var _a, _b, _c;
|
|
957
|
-
throwIfAborted(options.signal);
|
|
958
|
-
const name = getWorkerName(worker);
|
|
959
|
-
const workerFarm = WorkerFarm.getWorkerFarm(options);
|
|
960
|
-
const workerPool = workerFarm.getWorkerPool(getWorkerPoolTarget(worker, options, name));
|
|
961
|
-
const jobName = options.jobName || worker.name;
|
|
962
|
-
const job = await workerPool.startJob(
|
|
963
|
-
jobName,
|
|
964
|
-
// eslint-disable-next-line
|
|
965
|
-
onMessage.bind(null, context)
|
|
966
|
-
);
|
|
967
|
-
const abortJob = () => job.abort(getAbortReason(options.signal));
|
|
968
|
-
(_a = options.signal) == null ? void 0 : _a.addEventListener("abort", abortJob, { once: true });
|
|
969
|
-
if ((_b = options.signal) == null ? void 0 : _b.aborted) {
|
|
970
|
-
abortJob();
|
|
971
|
-
}
|
|
397
|
+
const taskInput = wrapInput(input);
|
|
398
|
+
let session;
|
|
972
399
|
try {
|
|
973
|
-
|
|
974
|
-
const
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
options: transferableOptions,
|
|
980
|
-
context: transferableContext
|
|
981
|
-
});
|
|
982
|
-
}
|
|
983
|
-
const result = await job.result;
|
|
984
|
-
return result.result;
|
|
400
|
+
session = await openSession(worker, options, context, jobContext);
|
|
401
|
+
for await (const result of session.handle.runTaskInBatches(taskInput, {
|
|
402
|
+
...getControls(options),
|
|
403
|
+
options: getParserOptions(options)
|
|
404
|
+
}))
|
|
405
|
+
yield result.value;
|
|
985
406
|
} finally {
|
|
986
|
-
(
|
|
407
|
+
const closingInput = (_a = taskInput.return) == null ? void 0 : _a.call(taskInput);
|
|
408
|
+
void (closingInput == null ? void 0 : closingInput.catch(() => {
|
|
409
|
+
}));
|
|
410
|
+
await (session == null ? void 0 : session.close());
|
|
987
411
|
}
|
|
988
412
|
}
|
|
989
|
-
function
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
const
|
|
996
|
-
const
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
const batchJobFailed = new Error("Worker batch job failed");
|
|
1004
|
-
const finishOutput = () => {
|
|
1005
|
-
if (!outputFinished) {
|
|
1006
|
-
outputFinished = true;
|
|
1007
|
-
outputBatches.close();
|
|
413
|
+
function getTask(worker, options) {
|
|
414
|
+
var _a;
|
|
415
|
+
if (options.source || ((_a = options.core) == null ? void 0 : _a.source))
|
|
416
|
+
throw new Error(
|
|
417
|
+
"Inline legacy worker source is unsupported; use a TaskRunner worker URL or factory"
|
|
418
|
+
);
|
|
419
|
+
const create = !getCustomWorkerURL(worker, options) && isBrowser2 ? worker.loadWorker : void 0;
|
|
420
|
+
const url = getWorkerURL(worker, options);
|
|
421
|
+
return {
|
|
422
|
+
id: `${worker.module}:${worker.id}`,
|
|
423
|
+
initialize: (state) => state,
|
|
424
|
+
worker: {
|
|
425
|
+
...create ? { create: () => create() ?? createModuleWorker(url) } : { url },
|
|
426
|
+
capabilities: { atomic: true, streaming: true }
|
|
1008
427
|
}
|
|
1009
428
|
};
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
429
|
+
}
|
|
430
|
+
function getControls(options) {
|
|
431
|
+
return {
|
|
432
|
+
execution: "worker",
|
|
433
|
+
signal: options.signal,
|
|
434
|
+
inputOwnership: options.inputOwnership ?? "transfer",
|
|
435
|
+
outputOwnership: options.outputOwnership ?? "transfer",
|
|
436
|
+
onProgress: options.onProgress ? (progress) => {
|
|
437
|
+
var _a;
|
|
438
|
+
return (_a = options.onProgress) == null ? void 0 : _a.call(options, normalizeTaskProgress(progress));
|
|
439
|
+
} : void 0
|
|
1016
440
|
};
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
441
|
+
}
|
|
442
|
+
function getParserOptions(options) {
|
|
443
|
+
const { signal, onProgress, parserOptions, ...workerOptions } = options;
|
|
444
|
+
return getTransferListForWriter(parserOptions ?? workerOptions);
|
|
445
|
+
}
|
|
446
|
+
async function openSession(worker, options, context, jobContext) {
|
|
447
|
+
var _a, _b;
|
|
448
|
+
(_a = options.signal) == null ? void 0 : _a.throwIfAborted();
|
|
449
|
+
const task = getTask(worker, options);
|
|
450
|
+
let state = runners.get(worker);
|
|
451
|
+
if (!state) {
|
|
452
|
+
state = {
|
|
453
|
+
runner: new import_tasks2.TaskRunner({
|
|
454
|
+
maxConcurrency: isMobile ? options.maxMobileConcurrency ?? 1 : options.maxConcurrency ?? 3
|
|
455
|
+
}),
|
|
456
|
+
requests: 0
|
|
457
|
+
};
|
|
458
|
+
runners.set(worker, state);
|
|
459
|
+
}
|
|
460
|
+
const runnerState = state;
|
|
461
|
+
const channel = context.process ? new MessageChannel() : void 0;
|
|
462
|
+
const callbackController = new AbortController();
|
|
463
|
+
let channelClosed = false;
|
|
464
|
+
const abortCallbacks = () => {
|
|
465
|
+
var _a2;
|
|
466
|
+
return callbackController.abort((_a2 = options.signal) == null ? void 0 : _a2.reason);
|
|
467
|
+
};
|
|
468
|
+
(_b = options.signal) == null ? void 0 : _b.addEventListener("abort", abortCallbacks, { once: true });
|
|
469
|
+
const closeChannel = () => {
|
|
470
|
+
var _a2;
|
|
471
|
+
channelClosed = true;
|
|
472
|
+
(_a2 = options.signal) == null ? void 0 : _a2.removeEventListener("abort", abortCallbacks);
|
|
473
|
+
callbackController.abort();
|
|
474
|
+
channel == null ? void 0 : channel.port1.close();
|
|
475
|
+
channel == null ? void 0 : channel.port2.close();
|
|
476
|
+
};
|
|
477
|
+
if (channel) {
|
|
478
|
+
channel.port1.onmessage = async ({ data }) => {
|
|
479
|
+
try {
|
|
480
|
+
const value = await context.process(
|
|
481
|
+
data.input,
|
|
482
|
+
data.options,
|
|
483
|
+
{
|
|
484
|
+
signal: callbackController.signal,
|
|
485
|
+
throwIfAborted: () => callbackController.signal.throwIfAborted()
|
|
486
|
+
},
|
|
487
|
+
data.context
|
|
488
|
+
);
|
|
489
|
+
if (!channelClosed && !callbackController.signal.aborted)
|
|
490
|
+
channel.port1.postMessage({ identifier: data.identifier, value }, getTransferList(value));
|
|
491
|
+
} catch (error) {
|
|
492
|
+
if (channelClosed || callbackController.signal.aborted) return;
|
|
493
|
+
channel.port1.postMessage({
|
|
494
|
+
identifier: data.identifier,
|
|
495
|
+
error: {
|
|
496
|
+
name: error instanceof Error ? error.name : "Error",
|
|
497
|
+
message: error instanceof Error ? error.message : String(error)
|
|
498
|
+
}
|
|
499
|
+
});
|
|
1057
500
|
}
|
|
1058
|
-
}
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
501
|
+
};
|
|
502
|
+
channel.port1.start();
|
|
503
|
+
}
|
|
504
|
+
runnerState.requests++;
|
|
505
|
+
activeRunners.add(runnerState);
|
|
506
|
+
let released = false;
|
|
507
|
+
const releaseRunner = () => {
|
|
508
|
+
if (released) return;
|
|
509
|
+
released = true;
|
|
510
|
+
runnerState.requests--;
|
|
511
|
+
if (!runnerState.requests) activeRunners.delete(runnerState);
|
|
512
|
+
};
|
|
513
|
+
let handle;
|
|
1066
514
|
try {
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
}
|
|
515
|
+
handle = await runnerState.runner.initializeTask(
|
|
516
|
+
task,
|
|
517
|
+
{
|
|
518
|
+
context: structuredClone(jobContext),
|
|
519
|
+
...channel ? { port: channel.port2 } : {}
|
|
520
|
+
},
|
|
521
|
+
// The callback port is setup state, independent of the caller's payload ownership.
|
|
522
|
+
{ ...getControls(options), inputOwnership: "transfer" }
|
|
523
|
+
);
|
|
524
|
+
} catch (error) {
|
|
525
|
+
releaseRunner();
|
|
526
|
+
closeChannel();
|
|
527
|
+
throw error;
|
|
528
|
+
}
|
|
529
|
+
return {
|
|
530
|
+
handle,
|
|
531
|
+
/** Releases the worker and callback channel on success, failure, and early stream return. */
|
|
532
|
+
async close() {
|
|
533
|
+
try {
|
|
534
|
+
await handle.close();
|
|
535
|
+
} finally {
|
|
536
|
+
closeChannel();
|
|
537
|
+
releaseRunner();
|
|
538
|
+
}
|
|
1073
539
|
}
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
540
|
+
};
|
|
541
|
+
}
|
|
542
|
+
function wrapInput(input) {
|
|
543
|
+
const iterator = Symbol.asyncIterator in input ? input[Symbol.asyncIterator]() : input[Symbol.iterator]();
|
|
544
|
+
let inputClosed = false;
|
|
545
|
+
return {
|
|
546
|
+
[Symbol.asyncIterator]() {
|
|
547
|
+
return this;
|
|
548
|
+
},
|
|
549
|
+
async next() {
|
|
550
|
+
if (inputClosed) return { done: true, value: void 0 };
|
|
551
|
+
const next = await iterator.next();
|
|
552
|
+
if (next.done || inputClosed) {
|
|
553
|
+
inputClosed = true;
|
|
554
|
+
return { done: true, value: void 0 };
|
|
1080
555
|
}
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
556
|
+
return { done: false, value: { value: next.value } };
|
|
557
|
+
},
|
|
558
|
+
async return() {
|
|
559
|
+
var _a;
|
|
560
|
+
if (!inputClosed) {
|
|
561
|
+
inputClosed = true;
|
|
562
|
+
await ((_a = iterator.return) == null ? void 0 : _a.call(iterator));
|
|
1084
563
|
}
|
|
1085
|
-
|
|
1086
|
-
}
|
|
1087
|
-
await job.result;
|
|
1088
|
-
} finally {
|
|
1089
|
-
(_c = options.signal) == null ? void 0 : _c.removeEventListener("abort", abortJob);
|
|
1090
|
-
if (job.isRunning) {
|
|
1091
|
-
job.abort(createAbortError2("Worker batch iterator was closed"));
|
|
1092
|
-
}
|
|
1093
|
-
if (!inputFinished) {
|
|
1094
|
-
closeInputIterator(inputIterator);
|
|
564
|
+
return { done: true, value: void 0 };
|
|
1095
565
|
}
|
|
1096
|
-
}
|
|
1097
|
-
}
|
|
1098
|
-
function throwIfAborted(signal) {
|
|
1099
|
-
if (!(signal == null ? void 0 : signal.aborted)) {
|
|
1100
|
-
return;
|
|
1101
|
-
}
|
|
1102
|
-
throw getAbortReason(signal);
|
|
1103
|
-
}
|
|
1104
|
-
function getAbortReason(signal) {
|
|
1105
|
-
return (signal == null ? void 0 : signal.reason) ?? createAbortError2("Worker job was aborted");
|
|
1106
|
-
}
|
|
1107
|
-
function createAbortError2(message) {
|
|
1108
|
-
const error = new Error(message);
|
|
1109
|
-
error.name = "AbortError";
|
|
1110
|
-
return error;
|
|
1111
|
-
}
|
|
1112
|
-
function getAsyncIterator(input) {
|
|
1113
|
-
if (Symbol.asyncIterator in input) {
|
|
1114
|
-
return input[Symbol.asyncIterator]();
|
|
1115
|
-
}
|
|
1116
|
-
return (async function* iterateSynchronously() {
|
|
1117
|
-
yield* input;
|
|
1118
|
-
})();
|
|
566
|
+
};
|
|
1119
567
|
}
|
|
1120
|
-
function
|
|
568
|
+
function createModuleWorker(url) {
|
|
1121
569
|
var _a;
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
return { name, url: customWorkerUrl };
|
|
1134
|
-
}
|
|
1135
|
-
if (isBrowser2 && worker.loadWorker) {
|
|
1136
|
-
return {
|
|
1137
|
-
name,
|
|
1138
|
-
loadWorker: worker.loadWorker,
|
|
1139
|
-
getUrl: () => getWorkerURL(worker, options),
|
|
1140
|
-
urlKey: getDefaultWorkerURL(worker)
|
|
1141
|
-
};
|
|
1142
|
-
}
|
|
1143
|
-
return { name, url: getWorkerURL(worker, options) };
|
|
1144
|
-
}
|
|
1145
|
-
async function onMessage(context, job, type, payload) {
|
|
1146
|
-
switch (type) {
|
|
1147
|
-
case "done":
|
|
1148
|
-
job.done(payload);
|
|
1149
|
-
break;
|
|
1150
|
-
case "error":
|
|
1151
|
-
job.error(new Error(payload.error));
|
|
1152
|
-
break;
|
|
1153
|
-
case "process":
|
|
1154
|
-
const { id, input, options } = payload;
|
|
1155
|
-
try {
|
|
1156
|
-
if (!context.process) {
|
|
1157
|
-
job.postMessage("error", { id, error: "Worker not set up to process on main thread" });
|
|
1158
|
-
return;
|
|
1159
|
-
}
|
|
1160
|
-
const result = await context.process(input, options, void 0, payload.context || {});
|
|
1161
|
-
job.postMessage("done", { id, result });
|
|
1162
|
-
} catch (error) {
|
|
1163
|
-
const message = error instanceof Error ? error.message : "unknown error";
|
|
1164
|
-
job.postMessage("error", { id, error: message });
|
|
1165
|
-
}
|
|
1166
|
-
break;
|
|
1167
|
-
default:
|
|
1168
|
-
console.warn(`process-on-worker: unknown message ${type}`);
|
|
570
|
+
const resolved = new URL(url, ((_a = globalThis.document) == null ? void 0 : _a.baseURI) ?? globalThis.location.href);
|
|
571
|
+
let workerUrl = resolved.href;
|
|
572
|
+
if (/^https?:$/.test(resolved.protocol) && resolved.origin !== globalThis.location.origin) {
|
|
573
|
+
let shimUrl = moduleWorkerUrls.get(resolved.href);
|
|
574
|
+
if (!shimUrl) {
|
|
575
|
+
shimUrl = URL.createObjectURL(
|
|
576
|
+
new Blob([`import ${JSON.stringify(resolved.href)};`], { type: "application/javascript" })
|
|
577
|
+
);
|
|
578
|
+
moduleWorkerUrls.set(resolved.href, shimUrl);
|
|
579
|
+
}
|
|
580
|
+
workerUrl = shimUrl;
|
|
1169
581
|
}
|
|
582
|
+
return new Worker(workerUrl, { type: "module" });
|
|
1170
583
|
}
|
|
1171
584
|
|
|
1172
|
-
//
|
|
585
|
+
// src/worker-utils/lib/worker-api/validate-worker-version.ts
|
|
1173
586
|
function validateWorkerVersion(worker, coreVersion = VERSION2) {
|
|
1174
587
|
assert2(worker, "no worker provided");
|
|
1175
588
|
const workerVersion = worker.version;
|
|
@@ -1179,26 +592,36 @@ function validateWorkerVersion(worker, coreVersion = VERSION2) {
|
|
|
1179
592
|
return true;
|
|
1180
593
|
}
|
|
1181
594
|
|
|
1182
|
-
//
|
|
595
|
+
// src/loader-utils/lib/worker-loader-utils/parse-with-worker.ts
|
|
1183
596
|
function canParseWithWorker(loader, options) {
|
|
1184
|
-
var _a, _b, _c;
|
|
1185
|
-
|
|
597
|
+
var _a, _b, _c, _d, _e;
|
|
598
|
+
const workerUrl = (_a = options == null ? void 0 : options[loader.id]) == null ? void 0 : _a.workerUrl;
|
|
599
|
+
if (((_b = options == null ? void 0 : options.core) == null ? void 0 : _b.worker) === false || !(loader.worker || loader.loadWorker || workerUrl))
|
|
600
|
+
return false;
|
|
601
|
+
if ((_d = (_c = options == null ? void 0 : options.core) == null ? void 0 : _c.credentials) == null ? void 0 : _d.some(
|
|
1186
602
|
(credential) => credential.type === "request" || "token" in credential && typeof credential.token === "function"
|
|
1187
603
|
))
|
|
1188
604
|
return false;
|
|
605
|
+
if (loader.id === "shapefile" && typeof ((_e = options == null ? void 0 : options.core) == null ? void 0 : _e.fetch) === "function") return false;
|
|
1189
606
|
const workerOptions = getWorkerOptions(options);
|
|
1190
607
|
const nodeWorkers = workerOptions._nodeWorkers;
|
|
1191
608
|
if (!isBrowser2 && !nodeWorkers) {
|
|
1192
609
|
return false;
|
|
1193
610
|
}
|
|
1194
|
-
if (loader.id === "las" && (((_c = options == null ? void 0 : options.las) == null ? void 0 : _c.shape) ?? "arrow-table") === "arrow-table") {
|
|
1195
|
-
return false;
|
|
1196
|
-
}
|
|
1197
611
|
if (loader.id === "csv" && !shouldParseCSVWithWorker(options)) {
|
|
1198
612
|
return false;
|
|
1199
613
|
}
|
|
1200
614
|
return Boolean(canProcessOnWorker(loader, workerOptions));
|
|
1201
615
|
}
|
|
616
|
+
function canParseWithWorkerInBatches(loader, options) {
|
|
617
|
+
const parquetOptions = options == null ? void 0 : options.parquet;
|
|
618
|
+
if (loader.id === "parquet" && typeof (parquetOptions == null ? void 0 : parquetOptions.keyRetriever) === "function") {
|
|
619
|
+
return false;
|
|
620
|
+
}
|
|
621
|
+
return Boolean(
|
|
622
|
+
loader.workerInBatches && canParseWithWorker(loader, options) && canProcessOnWorkerInBatches(loader, getWorkerOptions(options))
|
|
623
|
+
);
|
|
624
|
+
}
|
|
1202
625
|
function shouldParseWithWorker(loader, data, options, context, estimateLoader = loader) {
|
|
1203
626
|
var _a, _b;
|
|
1204
627
|
if (!canParseWithWorker(loader, options)) {
|
|
@@ -1218,22 +641,32 @@ function shouldParseWithWorker(loader, data, options, context, estimateLoader =
|
|
|
1218
641
|
}
|
|
1219
642
|
}
|
|
1220
643
|
async function parseWithWorker(loader, data, options, context, parseOnMainThread, signal) {
|
|
1221
|
-
const workerSignal = signal || getWorkerAbortSignal(options);
|
|
644
|
+
const workerSignal = signal || getWorkerAbortSignal(options) || (context == null ? void 0 : context.signal);
|
|
1222
645
|
const result = await processOnWorker(
|
|
1223
646
|
loader,
|
|
1224
647
|
data,
|
|
1225
|
-
{ ...getWorkerOptions(options, loader), signal: workerSignal },
|
|
1226
648
|
{
|
|
1227
|
-
|
|
649
|
+
...getWorkerOptions(options, loader),
|
|
650
|
+
signal: workerSignal,
|
|
651
|
+
onProgress: (options == null ? void 0 : options.onProgress) || (context == null ? void 0 : context.reportProgress)
|
|
652
|
+
},
|
|
653
|
+
{
|
|
654
|
+
process: async (input, processOptions, workerContext, parseContext) => {
|
|
1228
655
|
if (!parseOnMainThread) {
|
|
1229
656
|
throw new Error("Worker not set up to parse on main thread");
|
|
1230
657
|
}
|
|
1231
|
-
const
|
|
658
|
+
const { _loaderIds, _loaderIsArray, ...workerParseContext } = parseContext || {};
|
|
659
|
+
const mainThreadContext = context || parseContext || (workerContext == null ? void 0 : workerContext.signal) ? {
|
|
660
|
+
...context,
|
|
661
|
+
...workerParseContext,
|
|
662
|
+
signal: (workerContext == null ? void 0 : workerContext.signal) ?? (context == null ? void 0 : context.signal)
|
|
663
|
+
} : void 0;
|
|
1232
664
|
return await callParseOnMainThread(
|
|
1233
665
|
parseOnMainThread,
|
|
1234
666
|
input,
|
|
1235
667
|
processOptions,
|
|
1236
|
-
mainThreadContext
|
|
668
|
+
mainThreadContext,
|
|
669
|
+
resolveWorkerLoaders(loader, _loaderIds, _loaderIsArray, context, options)
|
|
1237
670
|
);
|
|
1238
671
|
}
|
|
1239
672
|
},
|
|
@@ -1242,22 +675,32 @@ async function parseWithWorker(loader, data, options, context, parseOnMainThread
|
|
|
1242
675
|
return isLoaderWithWorkerResultDeserializer(loader) ? loader.deserializeWorkerResult(result, options, context) : result;
|
|
1243
676
|
}
|
|
1244
677
|
async function* parseWithWorkerInBatches(loader, inputIterator, options, context, parseOnMainThread, signal) {
|
|
1245
|
-
const workerSignal = signal || getWorkerAbortSignal(options);
|
|
678
|
+
const workerSignal = signal || getWorkerAbortSignal(options) || (context == null ? void 0 : context.signal);
|
|
1246
679
|
const outputIterator = processOnWorkerInBatches(
|
|
1247
680
|
loader,
|
|
1248
681
|
inputIterator,
|
|
1249
|
-
{ ...getWorkerOptions(options), signal: workerSignal },
|
|
1250
682
|
{
|
|
1251
|
-
|
|
683
|
+
...getWorkerOptions(options, loader),
|
|
684
|
+
signal: workerSignal,
|
|
685
|
+
onProgress: (options == null ? void 0 : options.onProgress) || (context == null ? void 0 : context.reportProgress)
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
process: async (input, processOptions, workerContext, parseContext) => {
|
|
1252
689
|
if (!parseOnMainThread) {
|
|
1253
690
|
throw new Error("Worker not set up to parse on main thread");
|
|
1254
691
|
}
|
|
1255
|
-
const
|
|
692
|
+
const { _loaderIds, _loaderIsArray, ...workerParseContext } = parseContext || {};
|
|
693
|
+
const mainThreadContext = context || parseContext || (workerContext == null ? void 0 : workerContext.signal) ? {
|
|
694
|
+
...context,
|
|
695
|
+
...workerParseContext,
|
|
696
|
+
signal: (workerContext == null ? void 0 : workerContext.signal) ?? (context == null ? void 0 : context.signal)
|
|
697
|
+
} : void 0;
|
|
1256
698
|
return await callParseOnMainThread(
|
|
1257
699
|
parseOnMainThread,
|
|
1258
700
|
input,
|
|
1259
701
|
processOptions,
|
|
1260
|
-
mainThreadContext
|
|
702
|
+
mainThreadContext,
|
|
703
|
+
resolveWorkerLoaders(loader, _loaderIds, _loaderIsArray, context, options)
|
|
1261
704
|
);
|
|
1262
705
|
}
|
|
1263
706
|
},
|
|
@@ -1269,68 +712,136 @@ async function* parseWithWorkerInBatches(loader, inputIterator, options, context
|
|
|
1269
712
|
}
|
|
1270
713
|
function getWorkerAbortSignal(options) {
|
|
1271
714
|
var _a;
|
|
715
|
+
if (options == null ? void 0 : options.signal) return options.signal;
|
|
1272
716
|
const parquetSignal = (_a = options == null ? void 0 : options.parquet) == null ? void 0 : _a.signal;
|
|
1273
717
|
if (typeof AbortSignal !== "undefined" && parquetSignal instanceof AbortSignal) {
|
|
1274
718
|
return parquetSignal;
|
|
1275
719
|
}
|
|
1276
720
|
return void 0;
|
|
1277
721
|
}
|
|
1278
|
-
function callParseOnMainThread(parseOnMainThread, input, options, context) {
|
|
1279
|
-
if (parseOnMainThread.length <= 2) {
|
|
722
|
+
function callParseOnMainThread(parseOnMainThread, input, options, context, loaders) {
|
|
723
|
+
if (!loaders && parseOnMainThread.length <= 2) {
|
|
1280
724
|
return parseOnMainThread(input, options);
|
|
1281
725
|
}
|
|
1282
|
-
return parseOnMainThread(input,
|
|
726
|
+
return parseOnMainThread(input, loaders, options, context);
|
|
727
|
+
}
|
|
728
|
+
function resolveWorkerLoaders(loader, loaderIds, loaderIsArray, context, options) {
|
|
729
|
+
if (!loaderIds) return void 0;
|
|
730
|
+
const availableLoaders = /* @__PURE__ */ new Map();
|
|
731
|
+
const visitedLoaders = /* @__PURE__ */ new Set();
|
|
732
|
+
for (const candidate of [loader, ...(context == null ? void 0 : context.loaders) || []]) {
|
|
733
|
+
visitLoader(candidate);
|
|
734
|
+
}
|
|
735
|
+
const selectedLoaders = loaderIds.map((loaderId) => {
|
|
736
|
+
const selectedLoader = availableLoaders.get(loaderId);
|
|
737
|
+
if (!selectedLoader) {
|
|
738
|
+
throw new Error(
|
|
739
|
+
`Worker requested unknown loader "${loaderId}". Declare it in loader.subloaders or pass it in context.loaders.`
|
|
740
|
+
);
|
|
741
|
+
}
|
|
742
|
+
return selectedLoader;
|
|
743
|
+
});
|
|
744
|
+
return loaderIsArray ? selectedLoaders : selectedLoaders[0];
|
|
745
|
+
function visitLoader(candidate) {
|
|
746
|
+
var _a, _b;
|
|
747
|
+
if (visitedLoaders.has(candidate)) return;
|
|
748
|
+
visitedLoaders.add(candidate);
|
|
749
|
+
availableLoaders.set(candidate.id, candidate);
|
|
750
|
+
for (const [name, dependency] of Object.entries(candidate.subloaders || {})) {
|
|
751
|
+
const replacement = ((_b = (_a = options == null ? void 0 : options.core) == null ? void 0 : _a.subloaders) == null ? void 0 : _b[name]) || dependency;
|
|
752
|
+
visitLoader(replacement);
|
|
753
|
+
availableLoaders.set(dependency.id, replacement);
|
|
754
|
+
}
|
|
755
|
+
}
|
|
1283
756
|
}
|
|
1284
757
|
function getWorkerOptions(options = {}, loader) {
|
|
758
|
+
var _a, _b;
|
|
759
|
+
const portableOptions = ((_a = loader == null ? void 0 : loader.serializeWorkerOptions) == null ? void 0 : _a.call(loader, options)) || options;
|
|
760
|
+
const optionsToSerialize = {
|
|
761
|
+
...portableOptions,
|
|
762
|
+
signal: void 0,
|
|
763
|
+
onProgress: void 0,
|
|
764
|
+
...portableOptions.core ? {
|
|
765
|
+
core: {
|
|
766
|
+
...portableOptions.core,
|
|
767
|
+
authentications: void 0,
|
|
768
|
+
log: isDisabledLog(portableOptions.core.log) ? null : void 0
|
|
769
|
+
}
|
|
770
|
+
} : {}
|
|
771
|
+
};
|
|
1285
772
|
const serializedOptions = JSON.parse(
|
|
1286
|
-
JSON.stringify({
|
|
1287
|
-
|
|
1288
|
-
|
|
773
|
+
JSON.stringify(optionsToSerialize, (_key, value) => {
|
|
774
|
+
if (typeof Headers !== "undefined" && value instanceof Headers)
|
|
775
|
+
return Object.fromEntries(value.entries());
|
|
776
|
+
if (typeof AbortSignal !== "undefined" && value instanceof AbortSignal) return void 0;
|
|
777
|
+
return typeof value === "bigint" ? null : value;
|
|
1289
778
|
})
|
|
1290
779
|
);
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
};
|
|
1295
|
-
if (workerOptions.worker === "auto") {
|
|
1296
|
-
workerOptions.worker = true;
|
|
780
|
+
restoreBigIntOptions(optionsToSerialize, serializedOptions);
|
|
781
|
+
if (((_b = serializedOptions.core) == null ? void 0 : _b.worker) === "auto") {
|
|
782
|
+
serializedOptions.core.worker = true;
|
|
1297
783
|
}
|
|
1298
784
|
if (loader) {
|
|
1299
|
-
|
|
785
|
+
serializedOptions._workerLoaderId = loader.id;
|
|
786
|
+
}
|
|
787
|
+
return {
|
|
788
|
+
...serializedOptions,
|
|
789
|
+
...serializedOptions.core,
|
|
790
|
+
parserOptions: serializedOptions
|
|
791
|
+
};
|
|
792
|
+
}
|
|
793
|
+
function restoreBigIntOptions(original, serialized) {
|
|
794
|
+
if (!serialized || typeof serialized !== "object") return;
|
|
795
|
+
for (const key of Object.keys(serialized)) {
|
|
796
|
+
const value = original == null ? void 0 : original[key];
|
|
797
|
+
if (typeof value === "bigint") serialized[key] = value;
|
|
798
|
+
else restoreBigIntOptions(value, serialized[key]);
|
|
1300
799
|
}
|
|
1301
|
-
return workerOptions;
|
|
1302
800
|
}
|
|
1303
801
|
function getSerializableLoaderContext(context) {
|
|
1304
802
|
if (!context) {
|
|
1305
803
|
return {};
|
|
1306
804
|
}
|
|
1307
|
-
const {
|
|
805
|
+
const {
|
|
806
|
+
fetch: fetch2,
|
|
807
|
+
loaders,
|
|
808
|
+
coreApi: coreApi2,
|
|
809
|
+
signal,
|
|
810
|
+
reportProgress,
|
|
811
|
+
_parse,
|
|
812
|
+
_parseSync,
|
|
813
|
+
_parseInBatches,
|
|
814
|
+
...serializableContext
|
|
815
|
+
} = context;
|
|
1308
816
|
return JSON.parse(JSON.stringify(serializableContext));
|
|
1309
817
|
}
|
|
1310
818
|
function shouldParseCSVWithWorker(options) {
|
|
1311
819
|
var _a, _b;
|
|
1312
820
|
const csvOptions = options;
|
|
1313
|
-
return (((_a = csvOptions == null ? void 0 : csvOptions.csv) == null ? void 0 : _a.shape) ?? ((_b = csvOptions == null ? void 0 : csvOptions.core) == null ? void 0 : _b.shape)) === "arrow
|
|
821
|
+
return (((_a = csvOptions == null ? void 0 : csvOptions.csv) == null ? void 0 : _a.shape) ?? ((_b = csvOptions == null ? void 0 : csvOptions.core) == null ? void 0 : _b.shape)) === "arrow";
|
|
1314
822
|
}
|
|
1315
823
|
function isLoaderWithWorkerResultDeserializer(loader) {
|
|
1316
824
|
return typeof loader.deserializeWorkerResult === "function";
|
|
1317
825
|
}
|
|
826
|
+
function isDisabledLog(logger) {
|
|
827
|
+
return logger === null || logger instanceof NullLog;
|
|
828
|
+
}
|
|
1318
829
|
|
|
1319
|
-
//
|
|
830
|
+
// src/loader-utils/lib/worker-loader-utils/encode-with-worker.ts
|
|
1320
831
|
function canEncodeWithWorker(writer, options) {
|
|
1321
832
|
var _a, _b;
|
|
1322
|
-
if (!WorkerFarm.isSupported()) {
|
|
1323
|
-
return false;
|
|
1324
|
-
}
|
|
1325
833
|
const nodeWorkers = (options == null ? void 0 : options._nodeWorkers) ?? ((_a = options == null ? void 0 : options.core) == null ? void 0 : _a._nodeWorkers);
|
|
1326
834
|
const useWorkers = (options == null ? void 0 : options.worker) ?? ((_b = options == null ? void 0 : options.core) == null ? void 0 : _b.worker);
|
|
1327
835
|
if (!isBrowser && !nodeWorkers) {
|
|
1328
836
|
return false;
|
|
1329
837
|
}
|
|
1330
|
-
return
|
|
838
|
+
return canProcessOnWorker(
|
|
839
|
+
{ ...writer, options: writer.options || {} },
|
|
840
|
+
{ worker: Boolean(useWorkers), _nodeWorkers: Boolean(nodeWorkers) }
|
|
841
|
+
);
|
|
1331
842
|
}
|
|
1332
843
|
|
|
1333
|
-
//
|
|
844
|
+
// src/loader-utils/lib/binary-utils/array-buffer-utils.ts
|
|
1334
845
|
function compareArrayBuffers(arrayBuffer1, arrayBuffer2, byteLength) {
|
|
1335
846
|
byteLength = byteLength || arrayBuffer1.byteLength;
|
|
1336
847
|
if (arrayBuffer1.byteLength < byteLength || arrayBuffer2.byteLength < byteLength) {
|
|
@@ -1362,7 +873,7 @@ function concatenateArrayBuffersFromArray(sources) {
|
|
|
1362
873
|
return result.buffer;
|
|
1363
874
|
}
|
|
1364
875
|
|
|
1365
|
-
//
|
|
876
|
+
// src/loader-utils/lib/binary-utils/encode-array-buffer-to-base64.ts
|
|
1366
877
|
function encodeArrayBufferToBase64(arrayBuffer) {
|
|
1367
878
|
const bytes = new Uint8Array(arrayBuffer);
|
|
1368
879
|
const encodedChunks = [];
|
|
@@ -1375,7 +886,7 @@ function encodeArrayBufferToBase64(arrayBuffer) {
|
|
|
1375
886
|
return encodedChunks.join("");
|
|
1376
887
|
}
|
|
1377
888
|
|
|
1378
|
-
//
|
|
889
|
+
// src/loader-utils/lib/iterators/text-iterators.ts
|
|
1379
890
|
async function* makeTextDecoderIterator(arrayBufferIterator, options = {}) {
|
|
1380
891
|
const textDecoder = new TextDecoder(void 0, options);
|
|
1381
892
|
for await (const arrayBuffer of arrayBufferIterator) {
|
|
@@ -1413,7 +924,7 @@ async function* makeNumberedLineIterator(lineIterator) {
|
|
|
1413
924
|
}
|
|
1414
925
|
}
|
|
1415
926
|
|
|
1416
|
-
//
|
|
927
|
+
// src/loader-utils/lib/iterators/async-iteration.ts
|
|
1417
928
|
async function forEach(iterable, visitor) {
|
|
1418
929
|
const iterator = toAsyncIterator(iterable);
|
|
1419
930
|
while (true) {
|
|
@@ -1483,14 +994,14 @@ function iteratorToAsyncIterator(iterator) {
|
|
|
1483
994
|
};
|
|
1484
995
|
}
|
|
1485
996
|
|
|
1486
|
-
//
|
|
1487
|
-
var import_stats = require("
|
|
997
|
+
// src/loader-utils/lib/request-utils/request-scheduler.ts
|
|
998
|
+
var import_stats = require("probe.gl/stats");
|
|
1488
999
|
var STAT_QUEUED_REQUESTS = "Queued Requests";
|
|
1489
1000
|
var STAT_ACTIVE_REQUESTS = "Active Requests";
|
|
1490
1001
|
var STAT_CANCELLED_REQUESTS = "Cancelled Requests";
|
|
1491
1002
|
var STAT_QUEUED_REQUESTS_EVER = "Queued Requests Ever";
|
|
1492
1003
|
var STAT_ACTIVE_REQUESTS_EVER = "Active Requests Ever";
|
|
1493
|
-
var
|
|
1004
|
+
var DEFAULT_PROPS = {
|
|
1494
1005
|
id: "request-scheduler",
|
|
1495
1006
|
/** Specifies if the request scheduler should throttle incoming requests, mainly for comparative testing. */
|
|
1496
1007
|
throttleRequests: true,
|
|
@@ -1512,7 +1023,7 @@ var RequestScheduler = class {
|
|
|
1512
1023
|
/** Pending arrival debounce or next-tick refill; only new arrivals replace this timer. */
|
|
1513
1024
|
updateTimer = null;
|
|
1514
1025
|
constructor(props = {}) {
|
|
1515
|
-
this.props = { ...
|
|
1026
|
+
this.props = { ...DEFAULT_PROPS, ...props };
|
|
1516
1027
|
this.stats = new import_stats.Stats({ id: this.props.id });
|
|
1517
1028
|
this.stats.get(STAT_QUEUED_REQUESTS);
|
|
1518
1029
|
this.stats.get(STAT_ACTIVE_REQUESTS);
|
|
@@ -1639,7 +1150,7 @@ var RequestScheduler = class {
|
|
|
1639
1150
|
}
|
|
1640
1151
|
};
|
|
1641
1152
|
|
|
1642
|
-
//
|
|
1153
|
+
// src/loader-utils/lib/request-utils/authentication.ts
|
|
1643
1154
|
function resolveCredentials(credentials, authentications = []) {
|
|
1644
1155
|
if (credentials.every(isAuthentication)) return credentials;
|
|
1645
1156
|
return credentials.map((credential, index) => {
|
|
@@ -1691,7 +1202,7 @@ function isAuthentication(credential) {
|
|
|
1691
1202
|
return (credential.type === "header" || credential.type === "query-parameter") && typeof credential.name === "string" && (typeof credential.token === "string" || typeof credential.token === "function") && Array.isArray(credential.refreshStatusCodes);
|
|
1692
1203
|
}
|
|
1693
1204
|
|
|
1694
|
-
//
|
|
1205
|
+
// src/loader-utils/lib/request-utils/request-credentials.ts
|
|
1695
1206
|
var AUTHENTICATED_FETCH = /* @__PURE__ */ Symbol("loaders.gl.authenticated-fetch");
|
|
1696
1207
|
var refreshPromises = /* @__PURE__ */ new WeakMap();
|
|
1697
1208
|
function createAuthenticatedFetch(options) {
|
|
@@ -1723,26 +1234,28 @@ function createAuthenticatedFetch(options) {
|
|
|
1723
1234
|
);
|
|
1724
1235
|
for (const credential of requestCredentials) normalizeRequestOrigins(credential.origins);
|
|
1725
1236
|
const authenticatedFetch = async (url, requestOptions = {}) => {
|
|
1726
|
-
var _a, _b, _c, _d;
|
|
1237
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
1727
1238
|
requestOptions = mergeFetchOptions(fetchOptions, requestOptions);
|
|
1728
|
-
|
|
1239
|
+
(_a = requestOptions.signal) == null ? void 0 : _a.throwIfAborted();
|
|
1729
1240
|
if (!credentials.length) return baseFetch(url, requestOptions);
|
|
1730
1241
|
const resolvedURL = parseHTTPURL(url);
|
|
1731
1242
|
const authorization = resolvedURL ? await authorizeRequest(resolvedURL, requestOptions, tokenCredentials) : { url, options: requestOptions, credentials: [] };
|
|
1732
1243
|
const signedRequest = await authenticateRequest(authorization, requestCredentials, "request");
|
|
1733
1244
|
const response = await baseFetch(signedRequest.url, signedRequest.options);
|
|
1734
|
-
const refreshableCredentials =
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1245
|
+
const refreshableCredentials = [];
|
|
1246
|
+
for (const resolvedCredential of authorization.credentials) {
|
|
1247
|
+
const { credential } = resolvedCredential;
|
|
1248
|
+
if (typeof credential.token === "function" && (isReplayableRequest(requestOptions) || ((_b = credential.canReplayRequest) == null ? void 0 : _b.call(credential, url, requestOptions))) && (isReplayableRequest(signedRequest.options) || ((_c = credential.canReplayRequest) == null ? void 0 : _c.call(credential, signedRequest.url, signedRequest.options))) && (credential.refreshStatusCodes.includes(response.status) || await ((_d = credential.shouldRefresh) == null ? void 0 : _d.call(credential, response))))
|
|
1249
|
+
refreshableCredentials.push(resolvedCredential);
|
|
1250
|
+
}
|
|
1251
|
+
const shouldRetrySignature = isReplayableRequest(requestOptions) && isReplayableRequest(signedRequest.options) && signedRequest.credentials.some(
|
|
1738
1252
|
(credential) => {
|
|
1739
1253
|
var _a2;
|
|
1740
1254
|
return (_a2 = credential.refreshStatusCodes) == null ? void 0 : _a2.includes(response.status);
|
|
1741
1255
|
}
|
|
1742
1256
|
);
|
|
1743
|
-
if (!refreshableCredentials.length && !shouldRetrySignature
|
|
1744
|
-
|
|
1745
|
-
if ((_b = requestOptions.signal) == null ? void 0 : _b.aborted) throw createAbortError3();
|
|
1257
|
+
if (!refreshableCredentials.length && !shouldRetrySignature) return response;
|
|
1258
|
+
(_e = requestOptions.signal) == null ? void 0 : _e.throwIfAborted();
|
|
1746
1259
|
const refreshedTokens = /* @__PURE__ */ new Map();
|
|
1747
1260
|
await Promise.all(
|
|
1748
1261
|
refreshableCredentials.map(async ({ credential }) => {
|
|
@@ -1751,9 +1264,9 @@ function createAuthenticatedFetch(options) {
|
|
|
1751
1264
|
})
|
|
1752
1265
|
);
|
|
1753
1266
|
if (!refreshedTokens.size && !shouldRetrySignature) return response;
|
|
1754
|
-
await ((
|
|
1267
|
+
await ((_f = response.body) == null ? void 0 : _f.cancel().catch(() => {
|
|
1755
1268
|
}));
|
|
1756
|
-
|
|
1269
|
+
(_g = requestOptions.signal) == null ? void 0 : _g.throwIfAborted();
|
|
1757
1270
|
const replayAuthorization = resolvedURL ? await authorizeRequest(
|
|
1758
1271
|
resolvedURL,
|
|
1759
1272
|
requestOptions,
|
|
@@ -1794,7 +1307,7 @@ async function authenticateRequest(request, credentials, reason, response) {
|
|
|
1794
1307
|
for (const credential of credentials) {
|
|
1795
1308
|
const origin = getRequestOrigin(request.url);
|
|
1796
1309
|
if (!origin || !normalizeRequestOrigins(credential.origins).includes(origin)) continue;
|
|
1797
|
-
|
|
1310
|
+
signal == null ? void 0 : signal.throwIfAborted();
|
|
1798
1311
|
const authenticatedRequest = await credential.authenticate({
|
|
1799
1312
|
url: request.url,
|
|
1800
1313
|
options: { ...request.options, headers: new Headers(request.options.headers) },
|
|
@@ -1810,7 +1323,7 @@ async function authenticateRequest(request, credentials, reason, response) {
|
|
|
1810
1323
|
};
|
|
1811
1324
|
appliedCredentials.push(credential);
|
|
1812
1325
|
}
|
|
1813
|
-
|
|
1326
|
+
signal == null ? void 0 : signal.throwIfAborted();
|
|
1814
1327
|
return { ...request, credentials: appliedCredentials };
|
|
1815
1328
|
}
|
|
1816
1329
|
function getRequestOrigin(url) {
|
|
@@ -1900,11 +1413,8 @@ function isReplayableRequest(options) {
|
|
|
1900
1413
|
if (!["GET", "HEAD", "OPTIONS", "PUT", "DELETE"].includes(method)) return false;
|
|
1901
1414
|
return !(options.body && typeof ReadableStream !== "undefined" && options.body instanceof ReadableStream);
|
|
1902
1415
|
}
|
|
1903
|
-
function createAbortError3() {
|
|
1904
|
-
return new DOMException("The operation was aborted.", "AbortError");
|
|
1905
|
-
}
|
|
1906
1416
|
|
|
1907
|
-
//
|
|
1417
|
+
// src/loader-utils/lib/path-utils/file-aliases.ts
|
|
1908
1418
|
var pathPrefix = "";
|
|
1909
1419
|
var fileAliases = {};
|
|
1910
1420
|
function setPathPrefix(prefix) {
|
|
@@ -1926,7 +1436,7 @@ function resolvePath(filename2) {
|
|
|
1926
1436
|
return filename2;
|
|
1927
1437
|
}
|
|
1928
1438
|
|
|
1929
|
-
//
|
|
1439
|
+
// src/loader-utils/lib/path-utils/path.ts
|
|
1930
1440
|
var path_exports = {};
|
|
1931
1441
|
__export(path_exports, {
|
|
1932
1442
|
dirname: () => dirname,
|
|
@@ -1935,17 +1445,17 @@ __export(path_exports, {
|
|
|
1935
1445
|
resolve: () => resolve
|
|
1936
1446
|
});
|
|
1937
1447
|
|
|
1938
|
-
//
|
|
1448
|
+
// src/loader-utils/lib/path-utils/get-cwd.ts
|
|
1939
1449
|
function getCWD() {
|
|
1940
1450
|
var _a;
|
|
1941
1451
|
if (typeof process !== "undefined" && typeof process.cwd !== "undefined") {
|
|
1942
1452
|
return process.cwd();
|
|
1943
1453
|
}
|
|
1944
|
-
const pathname = (_a =
|
|
1454
|
+
const pathname = (_a = globalThis.location) == null ? void 0 : _a.pathname;
|
|
1945
1455
|
return (pathname == null ? void 0 : pathname.slice(0, pathname.lastIndexOf("/") + 1)) || "";
|
|
1946
1456
|
}
|
|
1947
1457
|
|
|
1948
|
-
//
|
|
1458
|
+
// src/loader-utils/lib/path-utils/path.ts
|
|
1949
1459
|
function filename(url) {
|
|
1950
1460
|
const slashIndex = url ? url.lastIndexOf("/") : -1;
|
|
1951
1461
|
return slashIndex >= 0 ? url.substr(slashIndex + 1) : url;
|
|
@@ -2070,7 +1580,7 @@ function normalizeStringPosix(path, allowAboveRoot) {
|
|
|
2070
1580
|
return res;
|
|
2071
1581
|
}
|
|
2072
1582
|
|
|
2073
|
-
//
|
|
1583
|
+
// src/loader-utils/json-loader.ts
|
|
2074
1584
|
var VERSION3 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
2075
1585
|
var JSONLoader = {
|
|
2076
1586
|
dataType: null,
|
|
@@ -2093,12 +1603,12 @@ function parseTextSync(text) {
|
|
|
2093
1603
|
return JSON.parse(text);
|
|
2094
1604
|
}
|
|
2095
1605
|
|
|
2096
|
-
//
|
|
1606
|
+
// src/loader-utils/lib/node/buffer.browser.ts
|
|
2097
1607
|
function toArrayBuffer(buffer) {
|
|
2098
1608
|
return buffer;
|
|
2099
1609
|
}
|
|
2100
1610
|
|
|
2101
|
-
//
|
|
1611
|
+
// src/loader-utils/lib/binary-utils/memory-conversion-utils.ts
|
|
2102
1612
|
function isBuffer(value) {
|
|
2103
1613
|
return value && typeof value === "object" && value.isBuffer;
|
|
2104
1614
|
}
|
|
@@ -2155,7 +1665,7 @@ function toArrayBufferView(data) {
|
|
|
2155
1665
|
return new Uint8Array(data);
|
|
2156
1666
|
}
|
|
2157
1667
|
|
|
2158
|
-
//
|
|
1668
|
+
// src/loader-utils/lib/files/blob-file.ts
|
|
2159
1669
|
var BlobFile = class {
|
|
2160
1670
|
handle;
|
|
2161
1671
|
size;
|
|
@@ -2188,7 +1698,7 @@ var BlobFile = class {
|
|
|
2188
1698
|
}
|
|
2189
1699
|
};
|
|
2190
1700
|
|
|
2191
|
-
//
|
|
1701
|
+
// src/loader-utils/lib/files/node-file-facade.ts
|
|
2192
1702
|
var NOT_IMPLEMENTED = new Error("Not implemented");
|
|
2193
1703
|
var NodeFileFacade = class {
|
|
2194
1704
|
handle;
|
|
@@ -2203,7 +1713,9 @@ var NodeFileFacade = class {
|
|
|
2203
1713
|
if (isBrowser) {
|
|
2204
1714
|
throw new Error("Can't instantiate NodeFile in browser.");
|
|
2205
1715
|
}
|
|
2206
|
-
throw new Error(
|
|
1716
|
+
throw new Error(
|
|
1717
|
+
"Can't instantiate NodeFile. Make sure to import @loaders.gl/core/polyfills first."
|
|
1718
|
+
);
|
|
2207
1719
|
}
|
|
2208
1720
|
/** Read data */
|
|
2209
1721
|
async read(start, length) {
|
|
@@ -2230,9 +1742,50 @@ var NodeFileFacade = class {
|
|
|
2230
1742
|
}
|
|
2231
1743
|
};
|
|
2232
1744
|
|
|
2233
|
-
//
|
|
2234
|
-
function
|
|
2235
|
-
|
|
1745
|
+
// src/loader-utils/lib/pace-batch-iterator.ts
|
|
1746
|
+
function validateBatchDeliveryRate(rate) {
|
|
1747
|
+
if (!Number.isFinite(rate) || rate < 0) {
|
|
1748
|
+
throw new RangeError("core.batchMaxRowsPerSecond must be a finite nonnegative number");
|
|
1749
|
+
}
|
|
1750
|
+
}
|
|
1751
|
+
async function* paceBatchIterator(batches, { batchMaxRowsPerSecond = 0, getRowCount, signal }) {
|
|
1752
|
+
validateBatchDeliveryRate(batchMaxRowsPerSecond);
|
|
1753
|
+
signal == null ? void 0 : signal.throwIfAborted();
|
|
1754
|
+
if (batchMaxRowsPerSecond === 0) {
|
|
1755
|
+
yield* batches;
|
|
1756
|
+
return;
|
|
1757
|
+
}
|
|
1758
|
+
let deadline = 0;
|
|
1759
|
+
for await (const batch of batches) {
|
|
1760
|
+
signal == null ? void 0 : signal.throwIfAborted();
|
|
1761
|
+
const rowCount = getRowCount(batch);
|
|
1762
|
+
if (rowCount !== void 0 && rowCount > 0) {
|
|
1763
|
+
let remaining = deadline - performance.now();
|
|
1764
|
+
while (remaining > 0) {
|
|
1765
|
+
await waitForBatch(Math.min(Math.ceil(remaining), 2 ** 31 - 1), signal);
|
|
1766
|
+
remaining = deadline - performance.now();
|
|
1767
|
+
}
|
|
1768
|
+
signal == null ? void 0 : signal.throwIfAborted();
|
|
1769
|
+
deadline = performance.now() + rowCount / batchMaxRowsPerSecond * 1e3;
|
|
1770
|
+
}
|
|
1771
|
+
yield batch;
|
|
1772
|
+
signal == null ? void 0 : signal.throwIfAborted();
|
|
1773
|
+
}
|
|
1774
|
+
}
|
|
1775
|
+
function waitForBatch(delay, signal) {
|
|
1776
|
+
signal == null ? void 0 : signal.throwIfAborted();
|
|
1777
|
+
return new Promise((resolve2, reject) => {
|
|
1778
|
+
const timer = setTimeout(() => {
|
|
1779
|
+
signal == null ? void 0 : signal.removeEventListener("abort", abort);
|
|
1780
|
+
resolve2();
|
|
1781
|
+
}, delay);
|
|
1782
|
+
function abort() {
|
|
1783
|
+
clearTimeout(timer);
|
|
1784
|
+
signal == null ? void 0 : signal.removeEventListener("abort", abort);
|
|
1785
|
+
reject(signal == null ? void 0 : signal.reason);
|
|
1786
|
+
}
|
|
1787
|
+
signal == null ? void 0 : signal.addEventListener("abort", abort, { once: true });
|
|
1788
|
+
});
|
|
2236
1789
|
}
|
|
2237
1790
|
|
|
2238
1791
|
// dist/lib/fetch/fetch-error.js
|
|
@@ -2459,71 +2012,47 @@ async function readBlob(blob) {
|
|
|
2459
2012
|
}
|
|
2460
2013
|
|
|
2461
2014
|
// dist/lib/loader-utils/loggers.js
|
|
2462
|
-
var
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2015
|
+
var import_log6 = require("probe.gl/log");
|
|
2016
|
+
|
|
2017
|
+
// dist/loader-utils/lib/log-utils/log.js
|
|
2018
|
+
var import_log5 = require("probe.gl/log");
|
|
2019
|
+
var VERSION4 = true ? "5.0.0-beta.10" : "latest";
|
|
2020
|
+
var version2 = VERSION4[0] >= "0" && VERSION4[0] <= "9" ? `v${VERSION4}` : "";
|
|
2021
|
+
function createLog2() {
|
|
2022
|
+
const log3 = new import_log5.Log({ id: "loaders.gl" });
|
|
2023
|
+
globalThis.loaders ||= {};
|
|
2024
|
+
globalThis.loaders.log = log3;
|
|
2025
|
+
globalThis.loaders.version = version2;
|
|
2026
|
+
globalThis.probe ||= {};
|
|
2027
|
+
globalThis.probe.loaders = log3;
|
|
2028
|
+
return log3;
|
|
2029
|
+
}
|
|
2030
|
+
var log2 = createLog2();
|
|
2031
|
+
var NullLog2 = class {
|
|
2032
|
+
/** Discards debug messages. */
|
|
2466
2033
|
log() {
|
|
2467
|
-
return
|
|
2468
|
-
};
|
|
2034
|
+
return ignoreMessage2;
|
|
2469
2035
|
}
|
|
2470
|
-
/**
|
|
2036
|
+
/** Discards informational messages. */
|
|
2471
2037
|
info() {
|
|
2472
|
-
return
|
|
2473
|
-
};
|
|
2038
|
+
return ignoreMessage2;
|
|
2474
2039
|
}
|
|
2475
|
-
/**
|
|
2040
|
+
/** Discards messages marked to be emitted once. */
|
|
2476
2041
|
once() {
|
|
2477
|
-
return
|
|
2478
|
-
};
|
|
2042
|
+
return ignoreMessage2;
|
|
2479
2043
|
}
|
|
2480
|
-
/**
|
|
2044
|
+
/** Discards warnings. */
|
|
2481
2045
|
warn() {
|
|
2482
|
-
return
|
|
2483
|
-
};
|
|
2046
|
+
return ignoreMessage2;
|
|
2484
2047
|
}
|
|
2485
|
-
/**
|
|
2048
|
+
/** Discards errors. */
|
|
2486
2049
|
error() {
|
|
2487
|
-
return
|
|
2488
|
-
};
|
|
2489
|
-
}
|
|
2490
|
-
};
|
|
2491
|
-
var ConsoleLog = class {
|
|
2492
|
-
/** Console-like object used for message output. */
|
|
2493
|
-
console;
|
|
2494
|
-
/** Messages already emitted through `once`. */
|
|
2495
|
-
onceMessages = /* @__PURE__ */ new Set();
|
|
2496
|
-
/** Creates a console-backed logger. */
|
|
2497
|
-
constructor() {
|
|
2498
|
-
this.console = console;
|
|
2499
|
-
}
|
|
2500
|
-
/** Logs a message to the console. */
|
|
2501
|
-
log(...args) {
|
|
2502
|
-
return this.console.log.bind(this.console, ...args);
|
|
2503
|
-
}
|
|
2504
|
-
/** Logs an informational message to the console. */
|
|
2505
|
-
info(...args) {
|
|
2506
|
-
return this.console.info.bind(this.console, ...args);
|
|
2507
|
-
}
|
|
2508
|
-
/** Logs one message once to the console. */
|
|
2509
|
-
once(...args) {
|
|
2510
|
-
const message = String(args[0]);
|
|
2511
|
-
if (this.onceMessages.has(message)) {
|
|
2512
|
-
return () => {
|
|
2513
|
-
};
|
|
2514
|
-
}
|
|
2515
|
-
this.onceMessages.add(message);
|
|
2516
|
-
return this.console.info.bind(this.console, ...args);
|
|
2517
|
-
}
|
|
2518
|
-
/** Logs a warning message to the console. */
|
|
2519
|
-
warn(...args) {
|
|
2520
|
-
return this.console.warn.bind(this.console, ...args);
|
|
2521
|
-
}
|
|
2522
|
-
/** Logs an error message to the console. */
|
|
2523
|
-
error(...args) {
|
|
2524
|
-
return this.console.error.bind(this.console, ...args);
|
|
2050
|
+
return ignoreMessage2;
|
|
2525
2051
|
}
|
|
2526
2052
|
};
|
|
2053
|
+
function ignoreMessage2() {
|
|
2054
|
+
}
|
|
2055
|
+
var nullLog2 = new NullLog2();
|
|
2527
2056
|
|
|
2528
2057
|
// dist/lib/loader-utils/option-defaults.js
|
|
2529
2058
|
var DEFAULT_LOADER_OPTIONS = {
|
|
@@ -2537,13 +2066,14 @@ var DEFAULT_LOADER_OPTIONS = {
|
|
|
2537
2066
|
ignoreRegisteredLoaders: void 0,
|
|
2538
2067
|
nothrow: false,
|
|
2539
2068
|
shape: void 0,
|
|
2540
|
-
log:
|
|
2541
|
-
// A probe.gl compatible (`log.log()()` syntax) that just logs to console
|
|
2069
|
+
log: log2,
|
|
2542
2070
|
useLocalLibraries: false,
|
|
2071
|
+
subloaders: void 0,
|
|
2543
2072
|
CDN: "https://unpkg.com/@loaders.gl",
|
|
2544
2073
|
worker: true,
|
|
2545
2074
|
// By default, use worker if provided by loader.
|
|
2546
2075
|
workerThreshold: 0.1,
|
|
2076
|
+
workerInBatches: void 0,
|
|
2547
2077
|
maxConcurrency: 3,
|
|
2548
2078
|
// How many worker instances should be created for each loader.
|
|
2549
2079
|
maxMobileConcurrency: 1,
|
|
@@ -2554,18 +2084,17 @@ var DEFAULT_LOADER_OPTIONS = {
|
|
|
2554
2084
|
// By default do not support node workers
|
|
2555
2085
|
_workerType: "",
|
|
2556
2086
|
// 'test' to use locally generated workers
|
|
2557
|
-
limit: 0,
|
|
2558
|
-
_limitMB: 0,
|
|
2559
2087
|
batchSize: "auto",
|
|
2560
|
-
|
|
2088
|
+
batchMaxRowsPerSecond: 0,
|
|
2561
2089
|
metadata: false,
|
|
2562
2090
|
// TODO - currently only implemented for parseInBatches, adds initial metadata batch,
|
|
2563
2091
|
transforms: []
|
|
2564
2092
|
}
|
|
2565
2093
|
};
|
|
2566
2094
|
var REMOVED_LOADER_OPTIONS = {
|
|
2567
|
-
//
|
|
2095
|
+
// Removed top-level aliases
|
|
2568
2096
|
baseUri: "core.baseUrl",
|
|
2097
|
+
baseUrl: "core.baseUrl",
|
|
2569
2098
|
fetch: "core.fetch",
|
|
2570
2099
|
mimeType: "core.mimeType",
|
|
2571
2100
|
fallbackMimeType: "core.fallbackMimeType",
|
|
@@ -2575,17 +2104,17 @@ var REMOVED_LOADER_OPTIONS = {
|
|
|
2575
2104
|
useLocalLibraries: "core.useLocalLibraries",
|
|
2576
2105
|
CDN: "core.CDN",
|
|
2577
2106
|
worker: "core.worker",
|
|
2107
|
+
workerThreshold: "core.workerThreshold",
|
|
2108
|
+
workerTransferBufferCopy: "core.workerTransferBufferCopy",
|
|
2578
2109
|
maxConcurrency: "core.maxConcurrency",
|
|
2579
2110
|
maxMobileConcurrency: "core.maxMobileConcurrency",
|
|
2580
2111
|
reuseWorkers: "core.reuseWorkers",
|
|
2581
|
-
_nodeWorkers: "core.
|
|
2112
|
+
_nodeWorkers: "core._nodeWorkers",
|
|
2582
2113
|
_workerType: "core._workerType",
|
|
2583
2114
|
_worker: "core._workerType",
|
|
2584
|
-
limit: "core.limit",
|
|
2585
|
-
_limitMB: "core._limitMB",
|
|
2586
2115
|
shape: "core.shape",
|
|
2587
2116
|
batchSize: "core.batchSize",
|
|
2588
|
-
batchDebounceMs: "core.
|
|
2117
|
+
batchDebounceMs: "(removed; use core.batchMaxRowsPerSecond)",
|
|
2589
2118
|
metadata: "core.metadata",
|
|
2590
2119
|
transforms: "core.transforms",
|
|
2591
2120
|
// Older deprecations
|
|
@@ -2607,33 +2136,66 @@ var REMOVED_LOADER_OPTIONS = {
|
|
|
2607
2136
|
signal: "core.fetch.signal"
|
|
2608
2137
|
};
|
|
2609
2138
|
|
|
2139
|
+
// dist/lib/loader-utils/native-arrow.js
|
|
2140
|
+
function getShapeOptionKey(loader) {
|
|
2141
|
+
const keys = Object.keys(loader.options || {}).filter((key) => {
|
|
2142
|
+
var _a;
|
|
2143
|
+
const value = (_a = loader.options) == null ? void 0 : _a[key];
|
|
2144
|
+
return key !== "core" && value && typeof value === "object" && "shape" in value;
|
|
2145
|
+
});
|
|
2146
|
+
return keys.includes(loader.id) ? loader.id : keys.length === 1 ? keys[0] : void 0;
|
|
2147
|
+
}
|
|
2148
|
+
function getNativeArrowOptions(loader, options, inBatches = false) {
|
|
2149
|
+
var _a, _b;
|
|
2150
|
+
const key = getShapeOptionKey(loader);
|
|
2151
|
+
const scopedOptions = key && options[key];
|
|
2152
|
+
if (loader.supportsNativeArrow && scopedOptions && typeof scopedOptions === "object" && "shape" in scopedOptions && scopedOptions.shape === "arrow-table") {
|
|
2153
|
+
throw new Error('This loader uses shape: "arrow" for native Arrow output');
|
|
2154
|
+
}
|
|
2155
|
+
if (!scopedOptions || typeof scopedOptions !== "object" || !("shape" in scopedOptions) || scopedOptions.shape !== "arrow") {
|
|
2156
|
+
return null;
|
|
2157
|
+
}
|
|
2158
|
+
if (inBatches && ((_a = options.core) == null ? void 0 : _a.metadata)) {
|
|
2159
|
+
throw new Error('shape: "arrow" carries metadata in the Arrow schema and does not support core.metadata envelopes');
|
|
2160
|
+
}
|
|
2161
|
+
if (loader.supportsNativeArrow)
|
|
2162
|
+
return options;
|
|
2163
|
+
return {
|
|
2164
|
+
...options,
|
|
2165
|
+
core: { ...options.core, ...((_b = options.core) == null ? void 0 : _b.shape) === "arrow" ? { shape: "arrow-table" } : {} },
|
|
2166
|
+
[key]: { ...scopedOptions, shape: "arrow-table" }
|
|
2167
|
+
};
|
|
2168
|
+
}
|
|
2169
|
+
function unwrapArrowTable(result, nativeParser) {
|
|
2170
|
+
var _a;
|
|
2171
|
+
const table = result;
|
|
2172
|
+
if ((table == null ? void 0 : table.shape) === "arrow-table" && Array.isArray((_a = table.data) == null ? void 0 : _a.batches))
|
|
2173
|
+
return table.data;
|
|
2174
|
+
if (nativeParser || isNativeArrowTable(result))
|
|
2175
|
+
return result;
|
|
2176
|
+
throw new Error('shape: "arrow" requires a loader that supports "arrow-table" output');
|
|
2177
|
+
}
|
|
2178
|
+
async function* unwrapArrowBatches(batches) {
|
|
2179
|
+
for await (const batch of batches) {
|
|
2180
|
+
const batchType = batch == null ? void 0 : batch.batchType;
|
|
2181
|
+
if (batchType === "metadata" || batchType === "partial-result" || batchType === "final-result") {
|
|
2182
|
+
continue;
|
|
2183
|
+
}
|
|
2184
|
+
if (isNativeArrowRecordBatch(batch)) {
|
|
2185
|
+
yield batch;
|
|
2186
|
+
} else {
|
|
2187
|
+
yield* unwrapArrowTable(batch).batches;
|
|
2188
|
+
}
|
|
2189
|
+
}
|
|
2190
|
+
}
|
|
2191
|
+
function isNativeArrowTable(value) {
|
|
2192
|
+
return Boolean(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");
|
|
2193
|
+
}
|
|
2194
|
+
function isNativeArrowRecordBatch(value) {
|
|
2195
|
+
return Boolean(value && typeof value === "object" && value[/* @__PURE__ */ Symbol.for("apache-arrow/RecordBatch")] === true);
|
|
2196
|
+
}
|
|
2197
|
+
|
|
2610
2198
|
// dist/lib/loader-utils/option-utils.js
|
|
2611
|
-
var CORE_LOADER_OPTION_KEYS = [
|
|
2612
|
-
"baseUrl",
|
|
2613
|
-
"fetch",
|
|
2614
|
-
"mimeType",
|
|
2615
|
-
"fallbackMimeType",
|
|
2616
|
-
"ignoreRegisteredLoaders",
|
|
2617
|
-
"nothrow",
|
|
2618
|
-
"log",
|
|
2619
|
-
"useLocalLibraries",
|
|
2620
|
-
"CDN",
|
|
2621
|
-
"worker",
|
|
2622
|
-
"workerThreshold",
|
|
2623
|
-
"maxConcurrency",
|
|
2624
|
-
"maxMobileConcurrency",
|
|
2625
|
-
"reuseWorkers",
|
|
2626
|
-
"workerTransferBufferCopy",
|
|
2627
|
-
"_nodeWorkers",
|
|
2628
|
-
"_workerType",
|
|
2629
|
-
"limit",
|
|
2630
|
-
"_limitMB",
|
|
2631
|
-
"shape",
|
|
2632
|
-
"batchSize",
|
|
2633
|
-
"batchDebounceMs",
|
|
2634
|
-
"metadata",
|
|
2635
|
-
"transforms"
|
|
2636
|
-
];
|
|
2637
2199
|
function applySearchParamsToUrl(url, options) {
|
|
2638
2200
|
const searchParams = options == null ? void 0 : options.searchParams;
|
|
2639
2201
|
if (!searchParams || Object.keys(searchParams).length === 0 || /^(?:data|blob):/i.test(url)) {
|
|
@@ -2669,12 +2231,15 @@ function getGlobalLoaderOptions() {
|
|
|
2669
2231
|
...DEFAULT_LOADER_OPTIONS,
|
|
2670
2232
|
core: { ...DEFAULT_LOADER_OPTIONS.core }
|
|
2671
2233
|
};
|
|
2672
|
-
return
|
|
2234
|
+
return cloneLoaderOptions(state.globalOptions);
|
|
2673
2235
|
}
|
|
2674
2236
|
function setGlobalOptions(options) {
|
|
2675
2237
|
const state = getGlobalLoaderState();
|
|
2676
2238
|
const globalOptions = getGlobalLoaderOptions();
|
|
2677
|
-
|
|
2239
|
+
validateOptions(options, []);
|
|
2240
|
+
validateWorkerThreshold(options);
|
|
2241
|
+
mergeNestedFields(globalOptions, options);
|
|
2242
|
+
state.globalOptions = globalOptions;
|
|
2678
2243
|
registerJSModules(options.modules);
|
|
2679
2244
|
}
|
|
2680
2245
|
function normalizeOptions(options, loader, loaders, url) {
|
|
@@ -2682,23 +2247,10 @@ function normalizeOptions(options, loader, loaders, url) {
|
|
|
2682
2247
|
loaders = Array.isArray(loaders) ? loaders : [loaders];
|
|
2683
2248
|
validateOptions(options, loaders);
|
|
2684
2249
|
validateWorkerThreshold(options);
|
|
2685
|
-
const normalizedOptions =
|
|
2250
|
+
const normalizedOptions = normalizeOptionsInternal(loader, options, url);
|
|
2686
2251
|
validateWorkerThreshold(normalizedOptions);
|
|
2687
2252
|
return normalizedOptions;
|
|
2688
2253
|
}
|
|
2689
|
-
function normalizeLoaderOptions(options) {
|
|
2690
|
-
const normalized = cloneLoaderOptions(options);
|
|
2691
|
-
moveDeprecatedTopLevelOptionsToCore(normalized);
|
|
2692
|
-
for (const key of CORE_LOADER_OPTION_KEYS) {
|
|
2693
|
-
if (normalized.core && normalized.core[key] !== void 0) {
|
|
2694
|
-
delete normalized[key];
|
|
2695
|
-
}
|
|
2696
|
-
}
|
|
2697
|
-
if (normalized.core && normalized.core._workerType !== void 0) {
|
|
2698
|
-
delete normalized._worker;
|
|
2699
|
-
}
|
|
2700
|
-
return normalized;
|
|
2701
|
-
}
|
|
2702
2254
|
function validateOptions(options, loaders) {
|
|
2703
2255
|
validateOptionsObject(options, null, DEFAULT_LOADER_OPTIONS, REMOVED_LOADER_OPTIONS, loaders);
|
|
2704
2256
|
for (const loader of loaders) {
|
|
@@ -2720,17 +2272,17 @@ function validateOptionsObject(options, id, defaultOptions, deprecatedOptions, l
|
|
|
2720
2272
|
const prefix = id ? `${id}.` : "";
|
|
2721
2273
|
for (const key in options) {
|
|
2722
2274
|
const isSubOptions = !id && isObject(options[key]);
|
|
2723
|
-
const
|
|
2275
|
+
const isLifecycleOption = !id && ["signal", "onProgress"].includes(key);
|
|
2724
2276
|
const isWorkerUrlOption = key === "workerUrl" && id;
|
|
2725
|
-
if (!(key in defaultOptions) && !
|
|
2277
|
+
if (!(key in defaultOptions) && !isLifecycleOption && !isWorkerUrlOption) {
|
|
2726
2278
|
if (key in deprecatedOptions) {
|
|
2727
|
-
if (
|
|
2728
|
-
|
|
2279
|
+
if (log2.level > 0) {
|
|
2280
|
+
log2.warn(`${loaderName} loader option '${prefix}${key}' no longer supported, use '${deprecatedOptions[key]}'`)();
|
|
2729
2281
|
}
|
|
2730
2282
|
} else if (!isSubOptions) {
|
|
2731
|
-
if (
|
|
2283
|
+
if (log2.level > 0) {
|
|
2732
2284
|
const suggestion = findSimilarOption(key, loaders);
|
|
2733
|
-
|
|
2285
|
+
log2.warn(`${loaderName} loader option '${prefix}${key}' not recognized. ${suggestion}`)();
|
|
2734
2286
|
}
|
|
2735
2287
|
}
|
|
2736
2288
|
}
|
|
@@ -2760,16 +2312,20 @@ function normalizeOptionsInternal(loader, options, url) {
|
|
|
2760
2312
|
if (loaderDefaultOptions.core) {
|
|
2761
2313
|
mergedOptions.core = { ...loaderDefaultOptions.core };
|
|
2762
2314
|
}
|
|
2763
|
-
|
|
2315
|
+
const shapeKey = loader.defaultShape && getShapeOptionKey(loader);
|
|
2316
|
+
if (shapeKey) {
|
|
2317
|
+
mergedOptions[shapeKey] = {
|
|
2318
|
+
...loaderDefaultOptions[shapeKey],
|
|
2319
|
+
shape: loader.defaultShape
|
|
2320
|
+
};
|
|
2321
|
+
}
|
|
2322
|
+
mergeNestedFields(mergedOptions, getGlobalLoaderOptions());
|
|
2323
|
+
mergeNestedFields(mergedOptions, options);
|
|
2324
|
+
applyCoreShapeDefault(mergedOptions, options, loader);
|
|
2764
2325
|
if (((_a = mergedOptions.core) == null ? void 0 : _a.log) === null) {
|
|
2765
|
-
mergedOptions.core = { ...mergedOptions.core, log:
|
|
2326
|
+
mergedOptions.core = { ...mergedOptions.core, log: getLoaderLog(mergedOptions) };
|
|
2766
2327
|
}
|
|
2767
|
-
mergeNestedFields(mergedOptions, normalizeLoaderOptions(getGlobalLoaderOptions()));
|
|
2768
|
-
const userOptions = normalizeLoaderOptions(options);
|
|
2769
|
-
mergeNestedFields(mergedOptions, userOptions);
|
|
2770
|
-
applyCoreShapeDefault(mergedOptions, userOptions, loader);
|
|
2771
2328
|
addUrlOptions(mergedOptions, url);
|
|
2772
|
-
addDeprecatedTopLevelOptions(mergedOptions);
|
|
2773
2329
|
return mergedOptions;
|
|
2774
2330
|
}
|
|
2775
2331
|
function applyCoreShapeDefault(mergedOptions, userOptions, loader) {
|
|
@@ -2778,20 +2334,24 @@ function applyCoreShapeDefault(mergedOptions, userOptions, loader) {
|
|
|
2778
2334
|
if (coreShape === void 0) {
|
|
2779
2335
|
return;
|
|
2780
2336
|
}
|
|
2781
|
-
const
|
|
2337
|
+
const shapeOptionKey = getShapeOptionKey(loader);
|
|
2338
|
+
if (!shapeOptionKey) {
|
|
2339
|
+
return;
|
|
2340
|
+
}
|
|
2341
|
+
const loaderScopedDefaults = (_b = loader.options) == null ? void 0 : _b[shapeOptionKey];
|
|
2782
2342
|
if (!isPureObject(loaderScopedDefaults) || !("shape" in loaderScopedDefaults)) {
|
|
2783
2343
|
return;
|
|
2784
2344
|
}
|
|
2785
|
-
const globalLoaderScopedOptions = getGlobalLoaderOptions()[
|
|
2345
|
+
const globalLoaderScopedOptions = getGlobalLoaderOptions()[shapeOptionKey];
|
|
2786
2346
|
if (isPureObject(globalLoaderScopedOptions) && "shape" in globalLoaderScopedOptions) {
|
|
2787
2347
|
return;
|
|
2788
2348
|
}
|
|
2789
|
-
const userLoaderScopedOptions = userOptions[
|
|
2349
|
+
const userLoaderScopedOptions = userOptions[shapeOptionKey];
|
|
2790
2350
|
if (isPureObject(userLoaderScopedOptions) && "shape" in userLoaderScopedOptions) {
|
|
2791
2351
|
return;
|
|
2792
2352
|
}
|
|
2793
|
-
const loaderScopedOptions = mergedOptions[
|
|
2794
|
-
mergedOptions[
|
|
2353
|
+
const loaderScopedOptions = mergedOptions[shapeOptionKey];
|
|
2354
|
+
mergedOptions[shapeOptionKey] = {
|
|
2795
2355
|
...isPureObject(loaderScopedOptions) ? loaderScopedOptions : {},
|
|
2796
2356
|
shape: coreShape
|
|
2797
2357
|
};
|
|
@@ -2829,42 +2389,6 @@ function cloneLoaderOptions(options) {
|
|
|
2829
2389
|
}
|
|
2830
2390
|
return clonedOptions;
|
|
2831
2391
|
}
|
|
2832
|
-
function moveDeprecatedTopLevelOptionsToCore(options) {
|
|
2833
|
-
if (options.baseUri !== void 0) {
|
|
2834
|
-
options.core ||= {};
|
|
2835
|
-
if (options.core.baseUrl === void 0) {
|
|
2836
|
-
options.core.baseUrl = options.baseUri;
|
|
2837
|
-
}
|
|
2838
|
-
}
|
|
2839
|
-
for (const key of CORE_LOADER_OPTION_KEYS) {
|
|
2840
|
-
if (options[key] !== void 0) {
|
|
2841
|
-
options.core ||= {};
|
|
2842
|
-
const coreOptions = options.core;
|
|
2843
|
-
const coreRecord = coreOptions;
|
|
2844
|
-
if (coreRecord[key] === void 0) {
|
|
2845
|
-
coreRecord[key] = options[key];
|
|
2846
|
-
}
|
|
2847
|
-
}
|
|
2848
|
-
}
|
|
2849
|
-
const workerTypeAlias = options._worker;
|
|
2850
|
-
if (workerTypeAlias !== void 0) {
|
|
2851
|
-
options.core ||= {};
|
|
2852
|
-
if (options.core._workerType === void 0) {
|
|
2853
|
-
options.core._workerType = workerTypeAlias;
|
|
2854
|
-
}
|
|
2855
|
-
}
|
|
2856
|
-
}
|
|
2857
|
-
function addDeprecatedTopLevelOptions(options) {
|
|
2858
|
-
const coreOptions = options.core;
|
|
2859
|
-
if (!coreOptions) {
|
|
2860
|
-
return;
|
|
2861
|
-
}
|
|
2862
|
-
for (const key of CORE_LOADER_OPTION_KEYS) {
|
|
2863
|
-
if (coreOptions[key] !== void 0) {
|
|
2864
|
-
options[key] = coreOptions[key];
|
|
2865
|
-
}
|
|
2866
|
-
}
|
|
2867
|
-
}
|
|
2868
2392
|
|
|
2869
2393
|
// dist/lib/loader-utils/normalize-loader.js
|
|
2870
2394
|
function isLoaderObject(loader) {
|
|
@@ -2924,32 +2448,30 @@ function _unregisterLoaders() {
|
|
|
2924
2448
|
|
|
2925
2449
|
// dist/lib/api/select-loader.js
|
|
2926
2450
|
var EXT_PATTERN = /\.([^.]+)$/;
|
|
2927
|
-
async function selectLoader(data, loaders = [], options, context) {
|
|
2451
|
+
async function selectLoader(data, loaders = [], options, context, operation = "parse") {
|
|
2452
|
+
var _a, _b;
|
|
2928
2453
|
if (!validHTTPResponse(data)) {
|
|
2929
2454
|
return null;
|
|
2930
2455
|
}
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
if (data instanceof Response && mayContainText(data)) {
|
|
2934
|
-
const text = await data.clone().text();
|
|
2935
|
-
const textLoader = selectLoaderSync(text, loaders, { ...normalizedOptions, core: { ...normalizedOptions.core, nothrow: true } }, context);
|
|
2936
|
-
if (textLoader) {
|
|
2937
|
-
return textLoader;
|
|
2938
|
-
}
|
|
2939
|
-
}
|
|
2940
|
-
let loader = selectLoaderSync(data, loaders, { ...normalizedOptions, core: { ...normalizedOptions.core, nothrow: true } }, context);
|
|
2941
|
-
if (loader) {
|
|
2942
|
-
return loader;
|
|
2456
|
+
if (loaders && !Array.isArray(loaders)) {
|
|
2457
|
+
return normalizeLoader(loaders);
|
|
2943
2458
|
}
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2459
|
+
const text = data instanceof Response && mayContainText(data) ? await data.clone().text() : null;
|
|
2460
|
+
let initialBytes;
|
|
2461
|
+
async function matchCandidates(candidates) {
|
|
2462
|
+
normalizeLoaders(candidates);
|
|
2463
|
+
const loader2 = text !== null && selectLoaderInternal(text, candidates, options, context, operation) || selectLoaderInternal(data, candidates, options, context, operation);
|
|
2464
|
+
if (!loader2 && isBlob(data) && candidates.length) {
|
|
2465
|
+
initialBytes ??= await data.slice(0, 10).arrayBuffer();
|
|
2466
|
+
return selectLoaderInternal(initialBytes, candidates, options, context, operation);
|
|
2467
|
+
}
|
|
2468
|
+
return loader2;
|
|
2947
2469
|
}
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
loader =
|
|
2470
|
+
let loader = await matchCandidates(loaders || []);
|
|
2471
|
+
if (!loader && !((_a = options == null ? void 0 : options.core) == null ? void 0 : _a.ignoreRegisteredLoaders)) {
|
|
2472
|
+
loader = await matchCandidates(getRegisteredLoaders());
|
|
2951
2473
|
}
|
|
2952
|
-
if (!loader && !
|
|
2474
|
+
if (!loader && !((_b = options == null ? void 0 : options.core) == null ? void 0 : _b.nothrow)) {
|
|
2953
2475
|
throw new Error(getNoValidLoaderMessage(data));
|
|
2954
2476
|
}
|
|
2955
2477
|
return loader;
|
|
@@ -2958,30 +2480,26 @@ function mayContainText(response) {
|
|
|
2958
2480
|
const mimeType = getResourceMIMEType(response);
|
|
2959
2481
|
return Boolean(mimeType && (mimeType.startsWith("text/") || mimeType === "application/json" || mimeType.endsWith("+json")));
|
|
2960
2482
|
}
|
|
2961
|
-
function selectLoaderSync(data, loaders = [], options, context) {
|
|
2483
|
+
function selectLoaderSync(data, loaders = [], options, context, operation = "parse") {
|
|
2484
|
+
var _a, _b;
|
|
2962
2485
|
if (!validHTTPResponse(data)) {
|
|
2963
2486
|
return null;
|
|
2964
2487
|
}
|
|
2965
|
-
const normalizedOptions = normalizeLoaderOptions(options || {});
|
|
2966
|
-
normalizedOptions.core ||= {};
|
|
2967
2488
|
if (loaders && !Array.isArray(loaders)) {
|
|
2968
2489
|
return normalizeLoader(loaders);
|
|
2969
2490
|
}
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
candidateLoaders.push(...getRegisteredLoaders());
|
|
2491
|
+
const candidates = loaders || [];
|
|
2492
|
+
normalizeLoaders(candidates);
|
|
2493
|
+
let loader = selectLoaderInternal(data, candidates, options, context, operation);
|
|
2494
|
+
if (!loader && !((_a = options == null ? void 0 : options.core) == null ? void 0 : _a.ignoreRegisteredLoaders)) {
|
|
2495
|
+
loader = selectLoaderInternal(data, getRegisteredLoaders(), options, context, operation);
|
|
2976
2496
|
}
|
|
2977
|
-
|
|
2978
|
-
const loader = selectLoaderInternal(data, candidateLoaders, normalizedOptions, context);
|
|
2979
|
-
if (!loader && !normalizedOptions.core.nothrow) {
|
|
2497
|
+
if (!loader && !((_b = options == null ? void 0 : options.core) == null ? void 0 : _b.nothrow)) {
|
|
2980
2498
|
throw new Error(getNoValidLoaderMessage(data));
|
|
2981
2499
|
}
|
|
2982
2500
|
return loader;
|
|
2983
2501
|
}
|
|
2984
|
-
function selectLoaderInternal(data, loaders, options, context) {
|
|
2502
|
+
function selectLoaderInternal(data, loaders, options, context, operation = "parse") {
|
|
2985
2503
|
var _a, _b, _c, _d, _e;
|
|
2986
2504
|
const url = getResourceUrl(data);
|
|
2987
2505
|
const type = getResourceMIMEType(data);
|
|
@@ -2997,20 +2515,27 @@ function selectLoaderInternal(data, loaders, options, context) {
|
|
|
2997
2515
|
loader = findLoaderByMIMEType(loaders, (_b = options == null ? void 0 : options.core) == null ? void 0 : _b.mimeType);
|
|
2998
2516
|
reason = `match forced by supplied MIME type ${(_c = options == null ? void 0 : options.core) == null ? void 0 : _c.mimeType}`;
|
|
2999
2517
|
}
|
|
3000
|
-
loader
|
|
3001
|
-
|
|
3002
|
-
|
|
2518
|
+
if (!loader && operation === "source") {
|
|
2519
|
+
loader = findSourceLoaderByTestURL(loaders, testUrl);
|
|
2520
|
+
reason = loader ? `matched source url ${testUrl}` : "";
|
|
2521
|
+
}
|
|
2522
|
+
const fallbackLoaders = operation === "source" && testUrl ? loaders.filter((candidate) => !candidate.testURL) : loaders;
|
|
2523
|
+
loader = loader || findLoaderByUrl(fallbackLoaders, testUrl);
|
|
3003
2524
|
reason = reason || (loader ? `matched url ${testUrl}` : "");
|
|
3004
|
-
loader
|
|
2525
|
+
if (!loader && operation === "parse") {
|
|
2526
|
+
loader = findSourceLoaderByTestURL(loaders, testUrl);
|
|
2527
|
+
reason = loader ? `matched source url ${testUrl}` : "";
|
|
2528
|
+
}
|
|
2529
|
+
loader = loader || findLoaderByMIMEType(fallbackLoaders, type);
|
|
3005
2530
|
reason = reason || (loader ? `matched MIME type ${type}` : "");
|
|
3006
|
-
loader = loader || findLoaderByInitialBytes(
|
|
2531
|
+
loader = loader || findLoaderByInitialBytes(fallbackLoaders, data);
|
|
3007
2532
|
reason = reason || (loader ? `matched initial data ${getFirstCharacters(data)}` : "");
|
|
3008
2533
|
if (!loader && isBlob(data)) {
|
|
3009
2534
|
loader = findSourceLoaderByTestData(loaders, data);
|
|
3010
2535
|
reason = reason || (loader ? "matched source testData" : "");
|
|
3011
2536
|
}
|
|
3012
2537
|
if ((_d = options == null ? void 0 : options.core) == null ? void 0 : _d.fallbackMimeType) {
|
|
3013
|
-
loader = loader || findLoaderByMIMEType(
|
|
2538
|
+
loader = loader || findLoaderByMIMEType(fallbackLoaders, (_e = options == null ? void 0 : options.core) == null ? void 0 : _e.fallbackMimeType);
|
|
3014
2539
|
reason = reason || (loader ? `matched fallback MIME type ${type}` : "");
|
|
3015
2540
|
}
|
|
3016
2541
|
if (reason) {
|
|
@@ -3060,18 +2585,19 @@ function findLoaderByExtension(loaders, extension) {
|
|
|
3060
2585
|
}
|
|
3061
2586
|
function findSourceLoaderByType(loaders, type) {
|
|
3062
2587
|
for (const loader of loaders) {
|
|
3063
|
-
if (
|
|
2588
|
+
if ((loader.type ?? loader.id) === type) {
|
|
3064
2589
|
return loader;
|
|
3065
2590
|
}
|
|
3066
2591
|
}
|
|
3067
2592
|
return null;
|
|
3068
2593
|
}
|
|
3069
2594
|
function findSourceLoaderByTestURL(loaders, url) {
|
|
2595
|
+
var _a;
|
|
3070
2596
|
if (!url) {
|
|
3071
2597
|
return null;
|
|
3072
2598
|
}
|
|
3073
2599
|
for (const loader of loaders) {
|
|
3074
|
-
if (
|
|
2600
|
+
if ((_a = loader.testURL) == null ? void 0 : _a.call(loader, url)) {
|
|
3075
2601
|
return loader;
|
|
3076
2602
|
}
|
|
3077
2603
|
}
|
|
@@ -3080,7 +2606,7 @@ function findSourceLoaderByTestURL(loaders, url) {
|
|
|
3080
2606
|
function findSourceLoaderByTestData(loaders, data) {
|
|
3081
2607
|
var _a;
|
|
3082
2608
|
for (const loader of loaders) {
|
|
3083
|
-
if (
|
|
2609
|
+
if (loader.testData) {
|
|
3084
2610
|
if ((_a = loader.testData) == null ? void 0 : _a.call(loader, data)) {
|
|
3085
2611
|
return loader;
|
|
3086
2612
|
}
|
|
@@ -3414,7 +2940,7 @@ function getFetchFunction(options, context) {
|
|
|
3414
2940
|
var _a, _b, _c;
|
|
3415
2941
|
const globalOptions = getGlobalLoaderOptions();
|
|
3416
2942
|
const loaderOptions = options || globalOptions;
|
|
3417
|
-
const fetchOption =
|
|
2943
|
+
const fetchOption = (_a = loaderOptions.core) == null ? void 0 : _a.fetch;
|
|
3418
2944
|
let fetchFunction;
|
|
3419
2945
|
if (typeof fetchOption === "function") {
|
|
3420
2946
|
fetchFunction = fetchOption;
|
|
@@ -3425,11 +2951,13 @@ function getFetchFunction(options, context) {
|
|
|
3425
2951
|
} else {
|
|
3426
2952
|
fetchFunction = fetchFile;
|
|
3427
2953
|
}
|
|
2954
|
+
const signal = loaderOptions.signal || (context == null ? void 0 : context.signal);
|
|
2955
|
+
const requestOptions = isObject(fetchOption) ? fetchOption : void 0;
|
|
3428
2956
|
return createAuthenticatedFetch({
|
|
3429
2957
|
fetch: fetchFunction,
|
|
3430
2958
|
credentials: ((_b = loaderOptions.core) == null ? void 0 : _b.credentials) || [],
|
|
3431
2959
|
authentications: (_c = loaderOptions.core) == null ? void 0 : _c.authentications,
|
|
3432
|
-
fetchOptions:
|
|
2960
|
+
fetchOptions: signal ? { ...requestOptions, signal } : requestOptions
|
|
3433
2961
|
});
|
|
3434
2962
|
}
|
|
3435
2963
|
|
|
@@ -3438,7 +2966,7 @@ var loaderImplementationPromises = /* @__PURE__ */ new Map();
|
|
|
3438
2966
|
var loaderImplementations = /* @__PURE__ */ new Map();
|
|
3439
2967
|
async function getLoaderImplementation(loader, options, url) {
|
|
3440
2968
|
var _a;
|
|
3441
|
-
if (isLoaderWithParser(loader)) {
|
|
2969
|
+
if (isLoaderWithParser(loader) || !loader.preload && loader.createDataSourceSync) {
|
|
3442
2970
|
return loader;
|
|
3443
2971
|
}
|
|
3444
2972
|
const implementationCacheKey = getLoaderImplementationCacheKey(loader, options);
|
|
@@ -3472,32 +3000,39 @@ async function getLoaderImplementation(loader, options, url) {
|
|
|
3472
3000
|
}
|
|
3473
3001
|
return await loaderImplementationPromise;
|
|
3474
3002
|
}
|
|
3475
|
-
function getLoaderImplementationSync(loader) {
|
|
3003
|
+
function getLoaderImplementationSync(loader, options) {
|
|
3476
3004
|
var _a;
|
|
3477
|
-
if (
|
|
3005
|
+
if (loader.subloaders && !preparedLoaders.has(loader)) {
|
|
3006
|
+
const prepared = preparedDefaults.get(loader);
|
|
3007
|
+
if (prepared)
|
|
3008
|
+
return prepared;
|
|
3009
|
+
if (!isLoaderWithParser(loader))
|
|
3010
|
+
return null;
|
|
3011
|
+
}
|
|
3012
|
+
if (isLoaderWithParser(loader) || !loader.preload && loader.createDataSourceSync) {
|
|
3478
3013
|
return loader;
|
|
3479
3014
|
}
|
|
3480
|
-
const implementationCacheKey = getLoaderImplementationCacheKey(loader);
|
|
3015
|
+
const implementationCacheKey = getLoaderImplementationCacheKey(loader, options);
|
|
3481
3016
|
return ((_a = loaderImplementations.get(loader)) == null ? void 0 : _a.get(implementationCacheKey)) || null;
|
|
3482
3017
|
}
|
|
3483
3018
|
function isLoaderWithParser(loader) {
|
|
3484
3019
|
const candidate = loader;
|
|
3485
|
-
return Boolean(candidate.parse || candidate.parseSync || candidate.parseInBatches || candidate.parseText || candidate.parseTextSync || candidate.parseFile || candidate.parseFileInBatches);
|
|
3020
|
+
return Boolean(candidate.parse || candidate.parseBlob || candidate.parseUrl || candidate.parseSync || candidate.parseInBatches || candidate.parseText || candidate.parseTextSync || candidate.parseFile || candidate.parseFileInBatches);
|
|
3486
3021
|
}
|
|
3487
3022
|
async function resolveLoaderImplementation(loader, options, url) {
|
|
3488
3023
|
if (loader.preload) {
|
|
3489
3024
|
const preloadedLoader = await loader.preload(url || "", options);
|
|
3490
|
-
if (isLoaderWithParser(preloadedLoader)) {
|
|
3025
|
+
if (preloadedLoader && (isLoaderWithParser(preloadedLoader) || preloadedLoader.createDataSourceSync)) {
|
|
3491
3026
|
return preloadedLoader;
|
|
3492
3027
|
}
|
|
3493
|
-
throw new Error(`${loader.id} loader preload() did not return a parser-bearing loader`);
|
|
3028
|
+
throw new Error(`${loader.id} loader preload() did not return a parser-bearing loader or a source factory`);
|
|
3494
3029
|
}
|
|
3495
3030
|
const implementationSpecifier = getLoaderImplementationSpecifier(loader, options);
|
|
3496
3031
|
return await importLoaderImplementation(implementationSpecifier, loader.id);
|
|
3497
3032
|
}
|
|
3498
3033
|
function getLoaderImplementationSpecifier(loader, options) {
|
|
3499
3034
|
var _a;
|
|
3500
|
-
const workerType = (
|
|
3035
|
+
const workerType = (_a = options == null ? void 0 : options.core) == null ? void 0 : _a._workerType;
|
|
3501
3036
|
if (workerType === "test") {
|
|
3502
3037
|
const sourcePath = `modules/${loader.module}/src/${loader.id}-loader.ts`;
|
|
3503
3038
|
if (typeof window !== "undefined") {
|
|
@@ -3529,16 +3064,104 @@ async function importLoaderImplementation(implementationSpecifier, loaderId) {
|
|
|
3529
3064
|
}
|
|
3530
3065
|
throw new Error(`Could not find parser implementation for ${loaderId} in ${implementationSpecifier}`);
|
|
3531
3066
|
}
|
|
3067
|
+
var preparedLoaders = /* @__PURE__ */ new WeakSet();
|
|
3068
|
+
var preparedDefaults = /* @__PURE__ */ new WeakMap();
|
|
3069
|
+
var subloaderPreparations = /* @__PURE__ */ new WeakMap();
|
|
3070
|
+
async function preloadLoaderDependencies(loader, options, url) {
|
|
3071
|
+
if (preparedLoaders.has(loader))
|
|
3072
|
+
return await getLoaderImplementation(loader, options, url);
|
|
3073
|
+
validateSubloaderGraph(loader, options);
|
|
3074
|
+
return await prepareLoaderDependencies(loader, options, url);
|
|
3075
|
+
}
|
|
3076
|
+
async function prepareLoaderDependencies(loader, options, url) {
|
|
3077
|
+
if (!options) {
|
|
3078
|
+
const cached = subloaderPreparations.get(loader);
|
|
3079
|
+
if (cached)
|
|
3080
|
+
return await cached;
|
|
3081
|
+
}
|
|
3082
|
+
const preparation = bindSubloaders(loader, options, url);
|
|
3083
|
+
if (!options) {
|
|
3084
|
+
subloaderPreparations.set(loader, preparation);
|
|
3085
|
+
void preparation.catch(() => subloaderPreparations.delete(loader));
|
|
3086
|
+
}
|
|
3087
|
+
const prepared = await preparation;
|
|
3088
|
+
if (!options)
|
|
3089
|
+
preparedDefaults.set(loader, prepared);
|
|
3090
|
+
return prepared;
|
|
3091
|
+
}
|
|
3092
|
+
function getSubloaders(loader, options) {
|
|
3093
|
+
var _a;
|
|
3094
|
+
const overrides = ((_a = options == null ? void 0 : options.core) == null ? void 0 : _a.subloaders) || {};
|
|
3095
|
+
return Object.fromEntries(Object.entries(loader.subloaders || {}).map(([name, dependency]) => [
|
|
3096
|
+
name,
|
|
3097
|
+
Object.hasOwn(overrides, name) ? overrides[name] : dependency
|
|
3098
|
+
]));
|
|
3099
|
+
}
|
|
3100
|
+
function validateSubloaderGraph(loader, options) {
|
|
3101
|
+
visitLoader(loader, []);
|
|
3102
|
+
function visitLoader(currentLoader, ancestors) {
|
|
3103
|
+
if (ancestors.includes(currentLoader)) {
|
|
3104
|
+
throw new Error(`Subloader cycle: ${[...ancestors, currentLoader].map((value) => value.id).join(" -> ")}`);
|
|
3105
|
+
}
|
|
3106
|
+
for (const dependency of Object.values(getSubloaders(currentLoader, options))) {
|
|
3107
|
+
visitLoader(dependency, [...ancestors, currentLoader]);
|
|
3108
|
+
}
|
|
3109
|
+
}
|
|
3110
|
+
}
|
|
3111
|
+
async function bindSubloaders(loader, options, url) {
|
|
3112
|
+
const [implementation, entries] = await Promise.all([
|
|
3113
|
+
getLoaderImplementation(loader, options, url),
|
|
3114
|
+
Promise.all(Object.entries(getSubloaders(loader, options)).map(async ([name, dependency]) => [name, await prepareLoaderDependencies(dependency, options, url)]))
|
|
3115
|
+
]);
|
|
3116
|
+
const subloaders = Object.fromEntries(entries);
|
|
3117
|
+
const defaultOptions = mergeOptions(implementation.options, options || {});
|
|
3118
|
+
defaultOptions.core = { ...defaultOptions.core, worker: false };
|
|
3119
|
+
const prepared = { ...implementation, options: defaultOptions, subloaders };
|
|
3120
|
+
delete prepared.preload;
|
|
3121
|
+
prepared.worker = false;
|
|
3122
|
+
for (const method of [
|
|
3123
|
+
"parseBlob",
|
|
3124
|
+
"createDataSourceSync",
|
|
3125
|
+
"parse",
|
|
3126
|
+
"parseSync",
|
|
3127
|
+
"parseText",
|
|
3128
|
+
"parseTextSync",
|
|
3129
|
+
"parseInBatches",
|
|
3130
|
+
"parseFile",
|
|
3131
|
+
"parseFileInBatches",
|
|
3132
|
+
"parseUrl"
|
|
3133
|
+
]) {
|
|
3134
|
+
const parser = implementation[method];
|
|
3135
|
+
if (typeof parser === "function") {
|
|
3136
|
+
prepared[method] = (data, parseOptions, context) => {
|
|
3137
|
+
var _a, _b;
|
|
3138
|
+
const forwardedOptions = mergeOptions(options, parseOptions || {});
|
|
3139
|
+
return parser.call(implementation, data, {
|
|
3140
|
+
...forwardedOptions,
|
|
3141
|
+
core: {
|
|
3142
|
+
...forwardedOptions.core,
|
|
3143
|
+
subloaders: ((_a = options == null ? void 0 : options.core) == null ? void 0 : _a.subloaders) || ((_b = parseOptions == null ? void 0 : parseOptions.core) == null ? void 0 : _b.subloaders),
|
|
3144
|
+
worker: false
|
|
3145
|
+
},
|
|
3146
|
+
[loader.id]: { ...forwardedOptions[loader.id], subloaders }
|
|
3147
|
+
}, context);
|
|
3148
|
+
};
|
|
3149
|
+
}
|
|
3150
|
+
}
|
|
3151
|
+
preparedLoaders.add(prepared);
|
|
3152
|
+
return prepared;
|
|
3153
|
+
}
|
|
3532
3154
|
|
|
3533
3155
|
// dist/lib/api/parse-file.js
|
|
3534
3156
|
async function parseFile(file, loaders, options, context) {
|
|
3535
|
-
var _a, _b;
|
|
3157
|
+
var _a, _b, _c;
|
|
3536
3158
|
if (loaders && !Array.isArray(loaders) && !isLoaderObject(loaders)) {
|
|
3537
3159
|
context = void 0;
|
|
3538
3160
|
options = loaders;
|
|
3539
3161
|
loaders = void 0;
|
|
3540
3162
|
}
|
|
3541
3163
|
options = options || {};
|
|
3164
|
+
(_a = options.signal || (context == null ? void 0 : context.signal)) == null ? void 0 : _a.throwIfAborted();
|
|
3542
3165
|
const url = file.url || "";
|
|
3543
3166
|
const typedLoaders = loaders;
|
|
3544
3167
|
const candidateLoaders = getLoadersFromContext(typedLoaders, context);
|
|
@@ -3546,26 +3169,29 @@ async function parseFile(file, loaders, options, context) {
|
|
|
3546
3169
|
if (!loader) {
|
|
3547
3170
|
return null;
|
|
3548
3171
|
}
|
|
3549
|
-
if (isSourceLoader(loader)) {
|
|
3550
|
-
throw new Error(`${loader.id} is a SourceLoader. Use load() to create a runtime source object instead of parseFile().`);
|
|
3551
|
-
}
|
|
3552
3172
|
const normalizedOptions = normalizeOptions(options, loader, candidateLoaders, url);
|
|
3553
|
-
const authenticationLoader = !loader.getAuthentications && ((
|
|
3173
|
+
const authenticationLoader = !loader.getAuthentications && ((_c = (_b = normalizedOptions.core) == null ? void 0 : _b.credentials) == null ? void 0 : _c.length) ? await getLoaderImplementation(loader, normalizedOptions, url || (context == null ? void 0 : context.url)) : loader;
|
|
3554
3174
|
const strictOptions = await resolveLoaderAuthenticationOptions(authenticationLoader, url, normalizedOptions);
|
|
3175
|
+
const nativeArrowOptions = getNativeArrowOptions(loader, strictOptions, false);
|
|
3555
3176
|
context = getLoaderContext(
|
|
3556
3177
|
// @ts-expect-error candidateLoaders may be a single forced loader
|
|
3557
3178
|
{ url, _parse: parse, loaders: candidateLoaders },
|
|
3558
|
-
strictOptions,
|
|
3179
|
+
nativeArrowOptions || strictOptions,
|
|
3559
3180
|
context || null
|
|
3560
3181
|
);
|
|
3561
|
-
|
|
3182
|
+
const result = await parseFileWithLoader(loader, file, nativeArrowOptions || strictOptions, context);
|
|
3183
|
+
return nativeArrowOptions ? unwrapArrowTable(result) : result;
|
|
3562
3184
|
}
|
|
3563
3185
|
async function parseFileWithLoader(loader, file, options, context) {
|
|
3186
|
+
var _a, _b;
|
|
3187
|
+
(_a = options.signal || context.signal) == null ? void 0 : _a.throwIfAborted();
|
|
3564
3188
|
validateWorkerVersion(loader);
|
|
3565
3189
|
options = mergeOptions(loader.options, options);
|
|
3566
3190
|
const loaderWithParser = await getLoaderImplementation(loader, options, context.url);
|
|
3567
3191
|
if (loaderWithParser.parseFile) {
|
|
3568
|
-
|
|
3192
|
+
const output = (_b = loaderWithParser.prepareParseOutput) == null ? void 0 : _b.call(loaderWithParser, options);
|
|
3193
|
+
const result = await loaderWithParser.parseFile(file, (output == null ? void 0 : output.options) ?? options, context);
|
|
3194
|
+
return output ? output.convert(result) : result;
|
|
3569
3195
|
}
|
|
3570
3196
|
const parseFunction = loaderWithParser.parse;
|
|
3571
3197
|
if (parseFunction) {
|
|
@@ -3576,6 +3202,9 @@ async function parseFileWithLoader(loader, file, options, context) {
|
|
|
3576
3202
|
const data = await file.read(0n, length);
|
|
3577
3203
|
return await parse(data, loaderWithParser, options, context);
|
|
3578
3204
|
}
|
|
3205
|
+
if (loaderWithParser.createDataSourceSync) {
|
|
3206
|
+
throw new Error(`${loader.id} has no file parser. Use createDataSource() to open a source.`);
|
|
3207
|
+
}
|
|
3579
3208
|
throw new Error(`${loader.id} loader - no file parser found`);
|
|
3580
3209
|
}
|
|
3581
3210
|
|
|
@@ -3593,17 +3222,16 @@ function parseSync(data, loaders, options, context) {
|
|
|
3593
3222
|
if (!loader) {
|
|
3594
3223
|
return null;
|
|
3595
3224
|
}
|
|
3596
|
-
if (isSourceLoader(loader)) {
|
|
3597
|
-
throw new Error(`${loader.id} is a SourceLoader. Use load() to create a runtime source object instead of parseSync().`);
|
|
3598
|
-
}
|
|
3599
3225
|
const strictOptions = normalizeOptions(options, loader, candidateLoaders);
|
|
3600
3226
|
const url = getResourceUrl(data);
|
|
3601
3227
|
const parse2 = () => {
|
|
3602
3228
|
throw new Error("parseSync called parse (which is async");
|
|
3603
3229
|
};
|
|
3604
|
-
|
|
3230
|
+
const nativeArrowOptions = getNativeArrowOptions(loader, strictOptions, false);
|
|
3231
|
+
context = getLoaderContext({ url, _parseSync: parse2, _parse: parse2, loaders }, nativeArrowOptions || strictOptions, context || null);
|
|
3605
3232
|
const loaderWithParser = getLoaderImplementationSync(loader);
|
|
3606
|
-
|
|
3233
|
+
const result = parseWithLoaderSync(loaderWithParser || loader, data, nativeArrowOptions || strictOptions, context);
|
|
3234
|
+
return nativeArrowOptions ? unwrapArrowTable(result, loader.supportsNativeArrow) : result;
|
|
3607
3235
|
}
|
|
3608
3236
|
function parseWithLoaderSync(loader, data, options, context) {
|
|
3609
3237
|
data = getArrayBufferOrStringFromDataSync(data, loader, options);
|
|
@@ -3616,79 +3244,56 @@ function parseWithLoaderSync(loader, data, options, context) {
|
|
|
3616
3244
|
if (loader.preload) {
|
|
3617
3245
|
throw new Error(`${loader.name} loader: 'parseSync' requires a parser-bearing loader. Import the loader implementation directly, or call preload(loader) before parseSync(). ${context.url || ""}`);
|
|
3618
3246
|
}
|
|
3619
|
-
|
|
3620
|
-
}
|
|
3621
|
-
|
|
3622
|
-
// ../schema-utils/src/lib/table/tables/table-accessors.ts
|
|
3623
|
-
function isTable(table) {
|
|
3624
|
-
var _a;
|
|
3625
|
-
const shape = typeof table === "object" && (table == null ? void 0 : table.shape);
|
|
3626
|
-
switch (shape) {
|
|
3627
|
-
case "array-row-table":
|
|
3628
|
-
case "object-row-table":
|
|
3629
|
-
return Array.isArray(table.data);
|
|
3630
|
-
case "geojson-table":
|
|
3631
|
-
return Array.isArray(table.features);
|
|
3632
|
-
case "columnar-table":
|
|
3633
|
-
return Boolean(table.data && typeof table.data === "object");
|
|
3634
|
-
case "arrow-table":
|
|
3635
|
-
return Boolean(((_a = table == null ? void 0 : table.data) == null ? void 0 : _a.numRows) !== void 0);
|
|
3636
|
-
default:
|
|
3637
|
-
return false;
|
|
3638
|
-
}
|
|
3639
|
-
}
|
|
3640
|
-
function getTableLength(table) {
|
|
3641
|
-
switch (table.shape) {
|
|
3642
|
-
case "array-row-table":
|
|
3643
|
-
case "object-row-table":
|
|
3644
|
-
return table.data.length;
|
|
3645
|
-
case "geojson-table":
|
|
3646
|
-
return table.features.length;
|
|
3647
|
-
case "arrow-table":
|
|
3648
|
-
const arrowTable = table.data;
|
|
3649
|
-
return arrowTable.numRows;
|
|
3650
|
-
case "columnar-table":
|
|
3651
|
-
for (const column of Object.values(table.data)) {
|
|
3652
|
-
return column.length || 0;
|
|
3653
|
-
}
|
|
3654
|
-
return 0;
|
|
3655
|
-
default:
|
|
3656
|
-
throw new Error("table");
|
|
3247
|
+
if (loader.createDataSourceSync) {
|
|
3248
|
+
throw new Error(`${loader.id} has no synchronous parser. Use createDataSource() to open a source.`);
|
|
3657
3249
|
}
|
|
3658
|
-
}
|
|
3659
|
-
|
|
3660
|
-
// ../schema-utils/src/lib/table/batches/make-table-batch-iterator.ts
|
|
3661
|
-
function makeBatchFromTable(table) {
|
|
3662
|
-
return { ...table, length: getTableLength(table), batchType: "data" };
|
|
3250
|
+
throw new Error(`${loader.name} loader: 'parseSync' not supported by this loader, use 'parse' instead. ${context.url || ""}`);
|
|
3663
3251
|
}
|
|
3664
3252
|
|
|
3665
3253
|
// dist/lib/api/parse-in-batches.js
|
|
3666
3254
|
async function parseInBatches(data, loaders, options, context) {
|
|
3667
|
-
var _a, _b;
|
|
3255
|
+
var _a, _b, _c, _d;
|
|
3668
3256
|
const loaderArray = Array.isArray(loaders) ? loaders : void 0;
|
|
3669
3257
|
if (!Array.isArray(loaders) && !isLoaderObject(loaders)) {
|
|
3670
3258
|
context = void 0;
|
|
3671
3259
|
options = loaders;
|
|
3672
3260
|
loaders = void 0;
|
|
3673
3261
|
}
|
|
3262
|
+
(_a = (options == null ? void 0 : options.signal) || (context == null ? void 0 : context.signal)) == null ? void 0 : _a.throwIfAborted();
|
|
3674
3263
|
data = await data;
|
|
3675
3264
|
options = options || {};
|
|
3265
|
+
(_b = options.signal || (context == null ? void 0 : context.signal)) == null ? void 0 : _b.throwIfAborted();
|
|
3676
3266
|
const url = getResourceUrl(data);
|
|
3677
3267
|
const loader = await selectLoader(data, loaders, options);
|
|
3678
3268
|
if (!loader) {
|
|
3679
3269
|
return [];
|
|
3680
3270
|
}
|
|
3681
3271
|
const normalizedOptions = normalizeOptions(options, loader, loaderArray, url);
|
|
3682
|
-
const authenticationLoader = !loader.getAuthentications && ((
|
|
3272
|
+
const authenticationLoader = !loader.getAuthentications && ((_d = (_c = normalizedOptions.core) == null ? void 0 : _c.credentials) == null ? void 0 : _d.length) ? await getLoaderImplementation(loader, normalizedOptions, url || (context == null ? void 0 : context.url)) : loader;
|
|
3683
3273
|
const strictOptions = await resolveLoaderAuthenticationOptions(authenticationLoader, url || "", normalizedOptions);
|
|
3684
|
-
|
|
3274
|
+
const nativeArrowOptions = getNativeArrowOptions(loader, strictOptions, true);
|
|
3275
|
+
context = getLoaderContext({ url, _parseInBatches: parseInBatches, _parse: parse, loaders: loaderArray }, nativeArrowOptions || strictOptions, context || null);
|
|
3685
3276
|
const loaderWithParser = await getLoaderImplementation(loader, strictOptions, context.url);
|
|
3686
|
-
|
|
3277
|
+
const batches = await parseWithLoaderInBatches(loader, loaderWithParser, data, nativeArrowOptions || strictOptions, context);
|
|
3278
|
+
return nativeArrowOptions ? unwrapArrowBatches(batches) : batches;
|
|
3687
3279
|
}
|
|
3688
3280
|
async function parseWithLoaderInBatches(originalLoader, loader, data, options, context) {
|
|
3689
|
-
var _a;
|
|
3690
|
-
const
|
|
3691
|
-
|
|
3281
|
+
var _a, _b;
|
|
3282
|
+
const { batchMaxRowsPerSecond = 0, batchSize } = options.core ?? {};
|
|
3283
|
+
validateBatchDeliveryRate(batchMaxRowsPerSecond);
|
|
3284
|
+
if (batchSize !== void 0 && batchSize !== "auto" && (!Number.isSafeInteger(batchSize) || batchSize < 1)) {
|
|
3285
|
+
throw new RangeError('core.batchSize must be a positive integer or "auto"');
|
|
3286
|
+
}
|
|
3287
|
+
const parserOptions = batchMaxRowsPerSecond ? { ...options, core: { ...options.core, batchMaxRowsPerSecond: 0 } } : options;
|
|
3288
|
+
const output = loader.parseInBatches ? (_a = loader.prepareParseBatchOutput) == null ? void 0 : _a.call(loader, parserOptions) : null;
|
|
3289
|
+
const decoded = await parseToOutputIterator(loader, data, (output == null ? void 0 : output.options) ?? parserOptions, context);
|
|
3290
|
+
const batches = output ? convertOutputBatches(decoded, output.convert) : decoded;
|
|
3291
|
+
const outputIterator = batchMaxRowsPerSecond ? paceBatchIterator(batches, {
|
|
3292
|
+
batchMaxRowsPerSecond,
|
|
3293
|
+
getRowCount: (batch) => getBatchRowCount(batch, loader.module),
|
|
3294
|
+
signal: options.signal ?? context.signal
|
|
3295
|
+
}) : batches;
|
|
3296
|
+
if (!((_b = options == null ? void 0 : options.core) == null ? void 0 : _b.metadata)) {
|
|
3692
3297
|
return outputIterator;
|
|
3693
3298
|
}
|
|
3694
3299
|
const metadataBatch = {
|
|
@@ -3708,12 +3313,17 @@ async function parseWithLoaderInBatches(originalLoader, loader, data, options, c
|
|
|
3708
3313
|
}
|
|
3709
3314
|
return makeMetadataBatchIterator(outputIterator);
|
|
3710
3315
|
}
|
|
3316
|
+
async function* convertOutputBatches(batches, convert) {
|
|
3317
|
+
for await (const batch of batches) {
|
|
3318
|
+
yield convert(batch);
|
|
3319
|
+
}
|
|
3320
|
+
}
|
|
3711
3321
|
async function parseToOutputIterator(loader, data, options, context) {
|
|
3712
3322
|
var _a;
|
|
3713
3323
|
const inputIterator = await getAsyncIterableFromData(data, options);
|
|
3714
3324
|
const transformedIterator = await applyInputTransforms(inputIterator, ((_a = options == null ? void 0 : options.core) == null ? void 0 : _a.transforms) || []);
|
|
3715
3325
|
if (loader.parseInBatches) {
|
|
3716
|
-
if (
|
|
3326
|
+
if (canParseWithWorkerInBatches(loader, options)) {
|
|
3717
3327
|
return parseWithWorkerInBatches(loader, transformedIterator, options, context, parse);
|
|
3718
3328
|
}
|
|
3719
3329
|
return loader.parseInBatches(transformedIterator, options, context);
|
|
@@ -3729,11 +3339,15 @@ async function* parseChunkInBatches(transformedIterator, loader, options, contex
|
|
|
3729
3339
|
{ ...options, core: { ...options == null ? void 0 : options.core, mimeType: loader.mimeTypes[0] } },
|
|
3730
3340
|
context
|
|
3731
3341
|
);
|
|
3342
|
+
if (isNativeArrowTable(parsedData)) {
|
|
3343
|
+
yield* parsedData.batches;
|
|
3344
|
+
return;
|
|
3345
|
+
}
|
|
3732
3346
|
const batch = convertDataToBatch(parsedData, loader);
|
|
3733
3347
|
yield batch;
|
|
3734
3348
|
}
|
|
3735
3349
|
function convertDataToBatch(parsedData, loader) {
|
|
3736
|
-
const batch = isTable(parsedData) ?
|
|
3350
|
+
const batch = isTable(parsedData) ? { ...parsedData, length: getTableLength(parsedData), batchType: "data" } : {
|
|
3737
3351
|
shape: "unknown",
|
|
3738
3352
|
batchType: "data",
|
|
3739
3353
|
data: parsedData,
|
|
@@ -3742,6 +3356,41 @@ function convertDataToBatch(parsedData, loader) {
|
|
|
3742
3356
|
batch.mimeType = loader.mimeTypes[0];
|
|
3743
3357
|
return batch;
|
|
3744
3358
|
}
|
|
3359
|
+
function isTable(value) {
|
|
3360
|
+
if (!value || typeof value !== "object" || !("shape" in value)) {
|
|
3361
|
+
return false;
|
|
3362
|
+
}
|
|
3363
|
+
const table = value;
|
|
3364
|
+
switch (table.shape) {
|
|
3365
|
+
case "array-row-table":
|
|
3366
|
+
case "object-row-table":
|
|
3367
|
+
return Array.isArray(table.data);
|
|
3368
|
+
case "geojson-table":
|
|
3369
|
+
return Array.isArray(table.features);
|
|
3370
|
+
case "columnar-table":
|
|
3371
|
+
return Boolean(table.data && typeof table.data === "object");
|
|
3372
|
+
case "arrow-table":
|
|
3373
|
+
return Boolean(table.data && typeof table.data === "object" && "numRows" in table.data);
|
|
3374
|
+
default:
|
|
3375
|
+
return false;
|
|
3376
|
+
}
|
|
3377
|
+
}
|
|
3378
|
+
function getTableLength(table) {
|
|
3379
|
+
switch (table.shape) {
|
|
3380
|
+
case "array-row-table":
|
|
3381
|
+
case "object-row-table":
|
|
3382
|
+
return table.data.length;
|
|
3383
|
+
case "geojson-table":
|
|
3384
|
+
return table.features.length;
|
|
3385
|
+
case "arrow-table":
|
|
3386
|
+
return table.data.numRows;
|
|
3387
|
+
case "columnar-table":
|
|
3388
|
+
for (const column of Object.values(table.data)) {
|
|
3389
|
+
return column.length || 0;
|
|
3390
|
+
}
|
|
3391
|
+
return 0;
|
|
3392
|
+
}
|
|
3393
|
+
}
|
|
3745
3394
|
async function applyInputTransforms(inputIterator, transforms = []) {
|
|
3746
3395
|
let iteratorChain = inputIterator;
|
|
3747
3396
|
for await (const transformBatches of transforms) {
|
|
@@ -3749,38 +3398,21 @@ async function applyInputTransforms(inputIterator, transforms = []) {
|
|
|
3749
3398
|
}
|
|
3750
3399
|
return iteratorChain;
|
|
3751
3400
|
}
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
if (
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
loadersArray = loaders;
|
|
3762
|
-
}
|
|
3763
|
-
if (!Array.isArray(files)) {
|
|
3764
|
-
return loadOneFileInBatches(files, loadersArray, options || {});
|
|
3765
|
-
}
|
|
3766
|
-
const promises = files.map((file) => loadOneFileInBatches(file, loadersArray, options || {}));
|
|
3767
|
-
return promises;
|
|
3768
|
-
}
|
|
3769
|
-
async function loadOneFileInBatches(file, loaders, options) {
|
|
3770
|
-
var _a, _b;
|
|
3771
|
-
if (typeof file === "string") {
|
|
3772
|
-
const url = file;
|
|
3773
|
-
const loader = await selectLoader(url, loaders, {
|
|
3774
|
-
...options,
|
|
3775
|
-
core: { ...options.core, nothrow: true }
|
|
3776
|
-
});
|
|
3777
|
-
const authenticationLoader = loader && !loader.getAuthentications && ((_b = (_a = options.core) == null ? void 0 : _a.credentials) == null ? void 0 : _b.length) ? await getLoaderImplementation(loader, options, url) : loader;
|
|
3778
|
-
options = await resolveLoaderAuthenticationOptions(authenticationLoader, url, options);
|
|
3779
|
-
const fetch2 = getFetchFunction(options);
|
|
3780
|
-
const response = await fetch2(applySearchParamsToUrl(url, options));
|
|
3781
|
-
return Array.isArray(loaders) ? await parseInBatches(response, loaders, options) : await parseInBatches(response, loaders, options);
|
|
3401
|
+
function getBatchRowCount(batch, module2) {
|
|
3402
|
+
var _a, _b, _c;
|
|
3403
|
+
if (!batch || typeof batch !== "object")
|
|
3404
|
+
return void 0;
|
|
3405
|
+
if (module2 === "geospatial" && Array.isArray(batch))
|
|
3406
|
+
return batch.length;
|
|
3407
|
+
const result = batch;
|
|
3408
|
+
if (module2 === "traces" && result.table !== void 0 && result.table !== "spans" && result.table !== "slices") {
|
|
3409
|
+
return void 0;
|
|
3782
3410
|
}
|
|
3783
|
-
|
|
3411
|
+
if (result.batchType !== void 0 && result.batchType !== "data")
|
|
3412
|
+
return void 0;
|
|
3413
|
+
if (result.shape === "unknown")
|
|
3414
|
+
return void 0;
|
|
3415
|
+
return ((_a = result.data) == null ? void 0 : _a.numRows) ?? result.numRows ?? ((_b = result.header) == null ? void 0 : _b.vertexCount) ?? ((_c = result.features) == null ? void 0 : _c.length) ?? result.length;
|
|
3784
3416
|
}
|
|
3785
3417
|
|
|
3786
3418
|
// dist/lib/api/load.js
|
|
@@ -3797,59 +3429,23 @@ async function load(url, loaders, options, context) {
|
|
|
3797
3429
|
resolvedOptions = options;
|
|
3798
3430
|
}
|
|
3799
3431
|
resolvedOptions ||= getGlobalLoaderOptions();
|
|
3800
|
-
if (!Array.isArray(resolvedLoaders) && isSourceLoader(resolvedLoaders)) {
|
|
3801
|
-
const sourceLoader = await resolveSourceLoader(resolvedLoaders, url, resolvedOptions);
|
|
3802
|
-
resolvedOptions = await resolveLoaderAuthenticationOptions(resolvedLoaders.getAuthentications ? resolvedLoaders : sourceLoader, typeof url === "string" ? url : "", resolvedOptions || {});
|
|
3803
|
-
const runtimeCoreApi = {
|
|
3804
|
-
fetchFile,
|
|
3805
|
-
parse,
|
|
3806
|
-
parseFile,
|
|
3807
|
-
parseSync,
|
|
3808
|
-
parseInBatches,
|
|
3809
|
-
load,
|
|
3810
|
-
loadInBatches
|
|
3811
|
-
};
|
|
3812
|
-
return sourceLoader.createDataSource(url, resolvedOptions || {}, runtimeCoreApi);
|
|
3813
|
-
}
|
|
3814
|
-
if (Array.isArray(resolvedLoaders) && resolvedLoaders.length === 1 && isSourceLoader(resolvedLoaders[0])) {
|
|
3815
|
-
const sourceLoader = await resolveSourceLoader(resolvedLoaders[0], url, resolvedOptions);
|
|
3816
|
-
resolvedOptions = await resolveLoaderAuthenticationOptions(resolvedLoaders[0].getAuthentications ? resolvedLoaders[0] : sourceLoader, typeof url === "string" ? url : "", resolvedOptions || {});
|
|
3817
|
-
const runtimeCoreApi = {
|
|
3818
|
-
fetchFile,
|
|
3819
|
-
parse,
|
|
3820
|
-
parseFile,
|
|
3821
|
-
parseSync,
|
|
3822
|
-
parseInBatches,
|
|
3823
|
-
load,
|
|
3824
|
-
loadInBatches
|
|
3825
|
-
};
|
|
3826
|
-
return sourceLoader.createDataSource(url, resolvedOptions || {}, runtimeCoreApi);
|
|
3827
|
-
}
|
|
3828
3432
|
if (typeof url === "string" || isBlob(url)) {
|
|
3829
3433
|
const selectedLoader = await selectLoader(url, resolvedLoaders, {
|
|
3830
3434
|
...resolvedOptions,
|
|
3831
3435
|
core: { ...resolvedOptions == null ? void 0 : resolvedOptions.core, nothrow: true }
|
|
3832
3436
|
});
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
return sourceLoader.createDataSource(url, resolvedOptions || {}, {
|
|
3837
|
-
fetchFile,
|
|
3838
|
-
parse,
|
|
3839
|
-
parseFile,
|
|
3840
|
-
parseSync,
|
|
3841
|
-
parseInBatches,
|
|
3842
|
-
load,
|
|
3843
|
-
loadInBatches
|
|
3844
|
-
});
|
|
3437
|
+
const loaderImplementation = selectedLoader && (typeof url === "string" || selectedLoader.createDataSourceSync) ? await getLoaderImplementation(selectedLoader, resolvedOptions, typeof url === "string" ? url : void 0) : null;
|
|
3438
|
+
if (selectedLoader && (loaderImplementation == null ? void 0 : loaderImplementation.createDataSourceSync) && !isLoaderWithParser(loaderImplementation)) {
|
|
3439
|
+
throw new Error(`${selectedLoader.id} creates sources. Use createDataSource() instead of load().`);
|
|
3845
3440
|
}
|
|
3846
|
-
if (selectedLoader && typeof url === "string") {
|
|
3847
|
-
const loaderImplementation = await getLoaderImplementation(selectedLoader, resolvedOptions, url);
|
|
3441
|
+
if (selectedLoader && loaderImplementation && typeof url === "string") {
|
|
3848
3442
|
resolvedOptions = await resolveLoaderAuthenticationOptions(selectedLoader.getAuthentications ? selectedLoader : loaderImplementation, url, resolvedOptions || {});
|
|
3849
|
-
const parseUrl = loaderImplementation
|
|
3443
|
+
const { parseUrl } = loaderImplementation;
|
|
3850
3444
|
if (parseUrl) {
|
|
3851
3445
|
const requestUrl = applySearchParamsToUrl(url, resolvedOptions);
|
|
3852
|
-
|
|
3446
|
+
const nativeOptions = getNativeArrowOptions(selectedLoader, normalizeOptions(resolvedOptions, selectedLoader, [selectedLoader], url));
|
|
3447
|
+
const result = await parseUrl(requestUrl, nativeOptions || resolvedOptions, context);
|
|
3448
|
+
return nativeOptions ? unwrapArrowTable(result) : result;
|
|
3853
3449
|
}
|
|
3854
3450
|
}
|
|
3855
3451
|
}
|
|
@@ -3864,8 +3460,7 @@ async function load(url, loaders, options, context) {
|
|
|
3864
3460
|
data = await fetch2(url);
|
|
3865
3461
|
}
|
|
3866
3462
|
if (typeof url === "string") {
|
|
3867
|
-
|
|
3868
|
-
if (!((_a = normalizedOptions.core) == null ? void 0 : _a.baseUrl)) {
|
|
3463
|
+
if (!((_a = resolvedOptions == null ? void 0 : resolvedOptions.core) == null ? void 0 : _a.baseUrl)) {
|
|
3869
3464
|
resolvedOptions = {
|
|
3870
3465
|
...resolvedOptions,
|
|
3871
3466
|
core: {
|
|
@@ -3877,15 +3472,38 @@ async function load(url, loaders, options, context) {
|
|
|
3877
3472
|
}
|
|
3878
3473
|
return Array.isArray(resolvedLoaders) ? await parse(data, resolvedLoaders, resolvedOptions, context) : await parse(data, resolvedLoaders, resolvedOptions, context);
|
|
3879
3474
|
}
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3475
|
+
|
|
3476
|
+
// dist/lib/api/load-in-batches.js
|
|
3477
|
+
function loadInBatches(files, loaders, options, context) {
|
|
3478
|
+
let loadersArray;
|
|
3479
|
+
if (!Array.isArray(loaders) && !isLoaderObject(loaders)) {
|
|
3480
|
+
context = void 0;
|
|
3481
|
+
options = loaders;
|
|
3482
|
+
loadersArray = void 0;
|
|
3483
|
+
} else {
|
|
3484
|
+
loadersArray = loaders;
|
|
3883
3485
|
}
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3486
|
+
if (!Array.isArray(files)) {
|
|
3487
|
+
return loadOneFileInBatches(files, loadersArray, options || {});
|
|
3488
|
+
}
|
|
3489
|
+
const promises = files.map((file) => loadOneFileInBatches(file, loadersArray, options || {}));
|
|
3490
|
+
return promises;
|
|
3491
|
+
}
|
|
3492
|
+
async function loadOneFileInBatches(file, loaders, options) {
|
|
3493
|
+
var _a, _b;
|
|
3494
|
+
if (typeof file === "string") {
|
|
3495
|
+
const url = file;
|
|
3496
|
+
const loader = await selectLoader(url, loaders, {
|
|
3497
|
+
...options,
|
|
3498
|
+
core: { ...options.core, nothrow: true }
|
|
3499
|
+
});
|
|
3500
|
+
const authenticationLoader = loader && !loader.getAuthentications && ((_b = (_a = options.core) == null ? void 0 : _a.credentials) == null ? void 0 : _b.length) ? await getLoaderImplementation(loader, options, url) : loader;
|
|
3501
|
+
options = await resolveLoaderAuthenticationOptions(authenticationLoader, url, options);
|
|
3502
|
+
const fetch2 = getFetchFunction(options);
|
|
3503
|
+
const response = await fetch2(applySearchParamsToUrl(url, options));
|
|
3504
|
+
return Array.isArray(loaders) ? await parseInBatches(response, loaders, options) : await parseInBatches(response, loaders, options);
|
|
3887
3505
|
}
|
|
3888
|
-
return
|
|
3506
|
+
return Array.isArray(loaders) ? await parseInBatches(file, loaders, options) : await parseInBatches(file, loaders, options);
|
|
3889
3507
|
}
|
|
3890
3508
|
|
|
3891
3509
|
// dist/lib/api/core-api.js
|
|
@@ -3904,11 +3522,17 @@ function getLoaderContext(context, options, parentContext) {
|
|
|
3904
3522
|
if (parentContext) {
|
|
3905
3523
|
return {
|
|
3906
3524
|
...parentContext,
|
|
3525
|
+
signal: options.signal || parentContext.signal,
|
|
3526
|
+
reportProgress: options.onProgress || parentContext.reportProgress,
|
|
3527
|
+
coreApi: parentContext.coreApi || context.coreApi || coreApi,
|
|
3528
|
+
_parse: parentContext._parse || context._parse,
|
|
3907
3529
|
fetch: getFetchFunction(options, parentContext)
|
|
3908
3530
|
};
|
|
3909
3531
|
}
|
|
3910
3532
|
const newContext = {
|
|
3911
3533
|
...context,
|
|
3534
|
+
signal: options.signal || context.signal,
|
|
3535
|
+
reportProgress: options.onProgress || context.reportProgress,
|
|
3912
3536
|
fetch: getFetchFunction(options, context),
|
|
3913
3537
|
coreApi: context.coreApi || coreApi
|
|
3914
3538
|
};
|
|
@@ -3941,14 +3565,16 @@ function getLoadersFromContext(loaders, context) {
|
|
|
3941
3565
|
|
|
3942
3566
|
// dist/lib/api/parse.js
|
|
3943
3567
|
async function parse(data, loaders, options, context) {
|
|
3944
|
-
var _a, _b;
|
|
3568
|
+
var _a, _b, _c, _d;
|
|
3945
3569
|
if (loaders && !Array.isArray(loaders) && !isLoaderObject(loaders)) {
|
|
3946
3570
|
context = void 0;
|
|
3947
3571
|
options = loaders;
|
|
3948
3572
|
loaders = void 0;
|
|
3949
3573
|
}
|
|
3574
|
+
(_a = (options == null ? void 0 : options.signal) || (context == null ? void 0 : context.signal)) == null ? void 0 : _a.throwIfAborted();
|
|
3950
3575
|
data = await data;
|
|
3951
3576
|
options = options || {};
|
|
3577
|
+
(_b = options.signal || (context == null ? void 0 : context.signal)) == null ? void 0 : _b.throwIfAborted();
|
|
3952
3578
|
const url = getResourceUrl(data);
|
|
3953
3579
|
const typedLoaders = loaders;
|
|
3954
3580
|
const candidateLoaders = getLoadersFromContext(typedLoaders, context);
|
|
@@ -3956,21 +3582,22 @@ async function parse(data, loaders, options, context) {
|
|
|
3956
3582
|
if (!loader) {
|
|
3957
3583
|
return null;
|
|
3958
3584
|
}
|
|
3959
|
-
if (isSourceLoader(loader)) {
|
|
3960
|
-
throw new Error(`${loader.id} is a SourceLoader. Use load() to create a runtime source object instead of parse().`);
|
|
3961
|
-
}
|
|
3962
3585
|
const normalizedOptions = normalizeOptions(options, loader, candidateLoaders, url);
|
|
3963
|
-
const authenticationLoader = !loader.getAuthentications && ((
|
|
3586
|
+
const authenticationLoader = !loader.getAuthentications && ((_d = (_c = normalizedOptions.core) == null ? void 0 : _c.credentials) == null ? void 0 : _d.length) ? await getLoaderImplementation(loader, normalizedOptions, url || (context == null ? void 0 : context.url)) : loader;
|
|
3964
3587
|
const strictOptions = await resolveLoaderAuthenticationOptions(authenticationLoader, url || "", normalizedOptions);
|
|
3588
|
+
const nativeArrowOptions = getNativeArrowOptions(loader, strictOptions, false);
|
|
3965
3589
|
context = getLoaderContext(
|
|
3966
3590
|
// @ts-expect-error
|
|
3967
3591
|
{ url, _parse: parse, loaders: candidateLoaders },
|
|
3968
|
-
strictOptions,
|
|
3592
|
+
nativeArrowOptions || strictOptions,
|
|
3969
3593
|
context || null
|
|
3970
3594
|
);
|
|
3971
|
-
|
|
3595
|
+
const result = await parseWithLoader(loader, data, nativeArrowOptions || strictOptions, context);
|
|
3596
|
+
return nativeArrowOptions ? unwrapArrowTable(result, loader.supportsNativeArrow) : result;
|
|
3972
3597
|
}
|
|
3973
3598
|
async function parseWithLoader(loader, data, options, context) {
|
|
3599
|
+
var _a, _b;
|
|
3600
|
+
(_a = options.signal || context.signal) == null ? void 0 : _a.throwIfAborted();
|
|
3974
3601
|
validateWorkerVersion(loader);
|
|
3975
3602
|
options = mergeOptions(loader.options, options);
|
|
3976
3603
|
if (isResponse(data)) {
|
|
@@ -3979,15 +3606,22 @@ async function parseWithLoader(loader, data, options, context) {
|
|
|
3979
3606
|
context.response = { headers, ok, redirected, status, statusText, type, url };
|
|
3980
3607
|
}
|
|
3981
3608
|
const loaderWithParser = await getLoaderImplementation(loader, options, context.url);
|
|
3982
|
-
if (
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3609
|
+
if (loaderWithParser.createDataSourceSync && !isLoaderWithParser(loaderWithParser)) {
|
|
3610
|
+
throw new Error(`${loader.id} creates sources. Use createDataSource() to open a source.`);
|
|
3611
|
+
}
|
|
3612
|
+
const output = (_b = loaderWithParser.prepareParseOutput) == null ? void 0 : _b.call(loaderWithParser, options);
|
|
3613
|
+
const parseOptions = (output == null ? void 0 : output.options) ?? options;
|
|
3614
|
+
let result;
|
|
3615
|
+
if (shouldParseWithWorker(loaderWithParser, data, parseOptions, context, loader)) {
|
|
3616
|
+
data = await getArrayBufferFromData(data, parseOptions);
|
|
3617
|
+
result = await parseWithWorker(loaderWithParser, data, parseOptions, context, parse);
|
|
3618
|
+
} else if (isBlob(data) && loaderWithParser.parseBlob) {
|
|
3619
|
+
result = await loaderWithParser.parseBlob(data, parseOptions, context);
|
|
3620
|
+
} else {
|
|
3621
|
+
data = await getArrayBufferOrStringFromData(data, loader, parseOptions);
|
|
3622
|
+
result = await parseWithLoaderImplementation(loaderWithParser, data, parseOptions, context);
|
|
3988
3623
|
}
|
|
3989
|
-
|
|
3990
|
-
return await parseWithLoaderImplementation(loaderWithParser, data, options, context);
|
|
3624
|
+
return output ? output.convert(result) : result;
|
|
3991
3625
|
}
|
|
3992
3626
|
async function parseWithLoaderImplementation(loader, data, options, context) {
|
|
3993
3627
|
if (loader.parseText && typeof data === "string") {
|
|
@@ -4002,12 +3636,15 @@ async function parseWithLoaderImplementation(loader, data, options, context) {
|
|
|
4002
3636
|
if (loader.parseSync) {
|
|
4003
3637
|
throw new Error(`${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 || ""}`);
|
|
4004
3638
|
}
|
|
3639
|
+
if (loader.createDataSourceSync) {
|
|
3640
|
+
throw new Error(`${loader.id} creates sources. Use createDataSource() to open a source.`);
|
|
3641
|
+
}
|
|
4005
3642
|
throw new Error(`${loader.id} loader - no parser found and worker is disabled`);
|
|
4006
3643
|
}
|
|
4007
3644
|
|
|
4008
3645
|
// dist/lib/api/preload.js
|
|
4009
3646
|
async function preload(loader, options, url) {
|
|
4010
|
-
return await getLoaderImplementation(loader, options, url);
|
|
3647
|
+
return loader.subloaders ? await preloadLoaderDependencies(loader, options, url) : await getLoaderImplementation(loader, options, url);
|
|
4011
3648
|
}
|
|
4012
3649
|
function preloadSync(loader) {
|
|
4013
3650
|
return getLoaderImplementationSync(loader);
|
|
@@ -4100,8 +3737,15 @@ function encodeTextSync(data, writer, options) {
|
|
|
4100
3737
|
}
|
|
4101
3738
|
function encodeInBatches(data, writer, options) {
|
|
4102
3739
|
if (writer.encodeInBatches) {
|
|
4103
|
-
|
|
4104
|
-
|
|
3740
|
+
let dataIterator;
|
|
3741
|
+
if (data && typeof data === "object") {
|
|
3742
|
+
if ("numRows" in data && "schema" in data) {
|
|
3743
|
+
dataIterator = [data];
|
|
3744
|
+
} else if (Symbol.iterator in data || Symbol.asyncIterator in data) {
|
|
3745
|
+
dataIterator = data;
|
|
3746
|
+
}
|
|
3747
|
+
}
|
|
3748
|
+
return writer.encodeInBatches(dataIterator ?? getIterator2(data), options);
|
|
4105
3749
|
}
|
|
4106
3750
|
throw new Error(`Writer ${writer.name} could not encode in batches`);
|
|
4107
3751
|
}
|
|
@@ -4135,44 +3779,62 @@ function getTemporaryFilename(filename2) {
|
|
|
4135
3779
|
}
|
|
4136
3780
|
|
|
4137
3781
|
// dist/lib/api/create-data-source.js
|
|
4138
|
-
function createDataSource(data,
|
|
4139
|
-
var _a, _b, _c
|
|
4140
|
-
|
|
4141
|
-
const
|
|
4142
|
-
const
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
3782
|
+
async function createDataSource(data, loaders, options = {}) {
|
|
3783
|
+
var _a, _b, _c;
|
|
3784
|
+
(_a = options.signal) == null ? void 0 : _a.throwIfAborted();
|
|
3785
|
+
const candidates = getCandidates(loaders, options);
|
|
3786
|
+
const loader = candidates.length === 1 ? candidates[0] : await selectLoader(data, candidates, getSelectionOptions(options), void 0, "source");
|
|
3787
|
+
if (!loader) {
|
|
3788
|
+
throw new Error("No explicit source loader matches the input");
|
|
3789
|
+
}
|
|
3790
|
+
const url = typeof data === "string" ? data : "";
|
|
3791
|
+
const implementation = await preload(loader, options, url);
|
|
3792
|
+
(_b = options.signal) == null ? void 0 : _b.throwIfAborted();
|
|
3793
|
+
const authenticatedOptions = await resolveLoaderAuthenticationOptions(loader.getAuthentications ? loader : implementation, url, options);
|
|
3794
|
+
(_c = options.signal) == null ? void 0 : _c.throwIfAborted();
|
|
3795
|
+
return constructSource(implementation, data, authenticatedOptions);
|
|
3796
|
+
}
|
|
3797
|
+
function createDataSourceSync(data, loaders, options = {}) {
|
|
3798
|
+
var _a, _b, _c, _d;
|
|
3799
|
+
const candidates = getCandidates(loaders, options);
|
|
3800
|
+
const loader = candidates.length === 1 ? candidates[0] : selectLoaderSync(data, candidates, getSelectionOptions(options), void 0, "source");
|
|
3801
|
+
if (!loader) {
|
|
3802
|
+
throw new Error("No explicit source loader matches the input");
|
|
3803
|
+
}
|
|
3804
|
+
const implementation = getLoaderImplementationSync(loader, options);
|
|
3805
|
+
if (!implementation) {
|
|
3806
|
+
throw new Error(`${loader.id} has no synchronous source factory available. Call preload() first.`);
|
|
3807
|
+
}
|
|
3808
|
+
const authenticationLoader = loader.getAuthentications ? loader : implementation;
|
|
3809
|
+
const contributions = ((_b = (_a = options.core) == null ? void 0 : _a.credentials) == null ? void 0 : _b.length) ? (_c = authenticationLoader.getAuthentications) == null ? void 0 : _c.call(authenticationLoader, typeof data === "string" ? data : "", options) : void 0;
|
|
4152
3810
|
if (contributions && "then" in contributions) {
|
|
4153
3811
|
void contributions.catch(() => {
|
|
4154
3812
|
});
|
|
4155
|
-
throw new Error("Use
|
|
3813
|
+
throw new Error("Use createDataSource() with an asynchronous getAuthentications() hook.");
|
|
4156
3814
|
}
|
|
4157
3815
|
const authenticatedOptions = resolveAuthenticationOptions((contributions == null ? void 0 : contributions.length) ? {
|
|
4158
|
-
...
|
|
3816
|
+
...options,
|
|
4159
3817
|
core: {
|
|
4160
|
-
...
|
|
4161
|
-
authentications: [
|
|
4162
|
-
...((_e = resolvedOptions.core) == null ? void 0 : _e.authentications) || [],
|
|
4163
|
-
...contributions || []
|
|
4164
|
-
]
|
|
3818
|
+
...options.core,
|
|
3819
|
+
authentications: [...((_d = options.core) == null ? void 0 : _d.authentications) || [], ...contributions]
|
|
4165
3820
|
}
|
|
4166
|
-
} :
|
|
4167
|
-
return
|
|
3821
|
+
} : options);
|
|
3822
|
+
return constructSource(implementation, data, authenticatedOptions);
|
|
4168
3823
|
}
|
|
4169
|
-
function
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
3824
|
+
function getCandidates(loaders, options) {
|
|
3825
|
+
var _a;
|
|
3826
|
+
const candidates = Array.isArray(loaders) ? [...loaders] : [loaders];
|
|
3827
|
+
const type = ((_a = options.core) == null ? void 0 : _a.type) || options.type;
|
|
3828
|
+
return candidates.length > 1 && type && type !== "auto" ? candidates.filter((loader) => (loader.type ?? loader.id) === type) : candidates;
|
|
3829
|
+
}
|
|
3830
|
+
function getSelectionOptions(options) {
|
|
3831
|
+
return { ...options, core: { ...options.core, ignoreRegisteredLoaders: true, nothrow: true } };
|
|
3832
|
+
}
|
|
3833
|
+
function constructSource(loader, data, options) {
|
|
3834
|
+
if (loader.createDataSourceSync) {
|
|
3835
|
+
return loader.createDataSourceSync(data, options, coreApi);
|
|
4174
3836
|
}
|
|
4175
|
-
|
|
3837
|
+
throw new Error(`${loader.id} has no synchronous source factory. Use createDataSource() to preload the loader.`);
|
|
4176
3838
|
}
|
|
4177
3839
|
|
|
4178
3840
|
// dist/lib/api/select-source.js
|
|
@@ -4180,16 +3842,16 @@ function selectSource(url, sources, options) {
|
|
|
4180
3842
|
const type = (options == null ? void 0 : options.type) || "auto";
|
|
4181
3843
|
let selectedSource = null;
|
|
4182
3844
|
if (type === "auto") {
|
|
4183
|
-
selectedSource = selectLoaderSync(url, sources, { core: { nothrow: true } });
|
|
3845
|
+
selectedSource = selectLoaderSync(url, sources, { core: { nothrow: true } }, void 0, "source");
|
|
4184
3846
|
} else {
|
|
4185
|
-
selectedSource =
|
|
3847
|
+
selectedSource = getSourceOfType(type, sources);
|
|
4186
3848
|
}
|
|
4187
3849
|
if (!selectedSource && !(options == null ? void 0 : options.nothrow)) {
|
|
4188
3850
|
throw new Error("Not a valid image source type");
|
|
4189
3851
|
}
|
|
4190
3852
|
return selectedSource;
|
|
4191
3853
|
}
|
|
4192
|
-
function
|
|
3854
|
+
function getSourceOfType(type, sources) {
|
|
4193
3855
|
for (const service of sources) {
|
|
4194
3856
|
if (service.type === type) {
|
|
4195
3857
|
return service;
|
|
@@ -4238,29 +3900,14 @@ function makeStream(source, options) {
|
|
|
4238
3900
|
}
|
|
4239
3901
|
|
|
4240
3902
|
// dist/null-loader.js
|
|
4241
|
-
var
|
|
4242
|
-
var NullWorkerLoader = {
|
|
4243
|
-
dataType: null,
|
|
4244
|
-
batchType: null,
|
|
4245
|
-
name: "Null loader",
|
|
4246
|
-
id: "null",
|
|
4247
|
-
module: "core",
|
|
4248
|
-
version: VERSION4,
|
|
4249
|
-
worker: true,
|
|
4250
|
-
mimeTypes: ["application/x.empty"],
|
|
4251
|
-
extensions: ["null"],
|
|
4252
|
-
tests: [() => false],
|
|
4253
|
-
options: {
|
|
4254
|
-
null: {}
|
|
4255
|
-
}
|
|
4256
|
-
};
|
|
3903
|
+
var VERSION5 = true ? "5.0.0-beta.10" : "latest";
|
|
4257
3904
|
var NullLoader = {
|
|
4258
3905
|
dataType: null,
|
|
4259
3906
|
batchType: null,
|
|
4260
3907
|
name: "Null loader",
|
|
4261
3908
|
id: "null",
|
|
4262
3909
|
module: "core",
|
|
4263
|
-
version:
|
|
3910
|
+
version: VERSION5,
|
|
4264
3911
|
mimeTypes: ["application/x.empty"],
|
|
4265
3912
|
extensions: ["null"],
|
|
4266
3913
|
parse: async (arrayBuffer, options, context) => parseSync2(arrayBuffer, options || {}, context),
|