@loaders.gl/loader-utils 4.0.0-beta.7 → 4.0.0-beta.8
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/LICENSE +7 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/binary-utils/get-first-characters.d.ts.map +1 -1
- package/dist/lib/binary-utils/get-first-characters.js.map +1 -1
- package/dist/lib/binary-utils/memory-conversion-utils.d.ts.map +1 -1
- package/dist/lib/binary-utils/memory-conversion-utils.js.map +1 -1
- package/dist/lib/file-provider/file-handle-file.d.ts.map +1 -1
- package/dist/lib/file-provider/file-handle-file.js.map +1 -1
- package/dist/lib/files/blob-file.d.ts.map +1 -1
- package/dist/lib/files/blob-file.js.map +1 -1
- package/dist/lib/files/file.d.ts.map +1 -1
- package/dist/lib/files/file.js.map +1 -1
- package/dist/lib/files/http-file.d.ts.map +1 -1
- package/dist/lib/files/http-file.js.map +1 -1
- package/dist/lib/files/node-file-facade.d.ts.map +1 -1
- package/dist/lib/files/node-file-facade.js.map +1 -1
- package/dist/lib/filesystems/filesystem.d.ts.map +1 -1
- package/dist/lib/filesystems/filesystem.js.map +1 -1
- package/dist/lib/filesystems/node-filesystem-facade.d.ts.map +1 -1
- package/dist/lib/filesystems/node-filesystem-facade.js.map +1 -1
- package/dist/lib/node/buffer.browser.d.ts.map +1 -1
- package/dist/lib/node/buffer.browser.js.map +1 -1
- package/dist/lib/node/buffer.d.ts.map +1 -1
- package/dist/lib/node/buffer.js.map +1 -1
- package/dist/lib/node/stream.d.ts.map +1 -1
- package/dist/lib/node/stream.js.map +1 -1
- package/dist/lib/option-utils/merge-loader-options.d.ts.map +1 -1
- package/dist/lib/option-utils/merge-loader-options.js.map +1 -1
- package/dist/lib/sources/data-source.d.ts.map +1 -1
- package/dist/lib/sources/data-source.js.map +1 -1
- package/dist/lib/sources/image-source.d.ts.map +1 -1
- package/dist/lib/sources/image-source.js.map +1 -1
- package/dist/lib/sources/image-tile-source.d.ts.map +1 -1
- package/dist/lib/sources/image-tile-source.js.map +1 -1
- package/dist/lib/sources/tile-source.d.ts.map +1 -1
- package/dist/lib/sources/tile-source.js.map +1 -1
- package/dist/lib/sources/utils/utils.d.ts.map +1 -1
- package/dist/lib/sources/utils/utils.js.map +1 -1
- package/dist/lib/sources/vector-tile-source.d.ts.map +1 -1
- package/dist/lib/sources/vector-tile-source.js.map +1 -1
- package/dist/loader-types.d.ts.map +1 -1
- package/dist/loader-types.js.map +1 -1
- package/dist/service-types.d.ts.map +1 -1
- package/dist/service-types.js.map +1 -1
- package/dist/writer-types.d.ts.map +1 -1
- package/dist/writer-types.js.map +1 -1
- package/package.json +3 -3
- package/src/index.ts +1 -0
- package/src/lib/binary-utils/get-first-characters.ts +1 -0
- package/src/lib/binary-utils/memory-conversion-utils.ts +1 -0
- package/src/lib/file-provider/file-handle-file.ts +1 -0
- package/src/lib/files/blob-file.ts +1 -0
- package/src/lib/files/file.ts +1 -0
- package/src/lib/files/http-file.ts +1 -0
- package/src/lib/files/node-file-facade.ts +1 -0
- package/src/lib/filesystems/filesystem.ts +1 -0
- package/src/lib/filesystems/node-filesystem-facade.ts +1 -0
- package/src/lib/node/buffer.browser.ts +1 -0
- package/src/lib/node/buffer.ts +1 -0
- package/src/lib/node/stream.ts +1 -0
- package/src/lib/option-utils/merge-loader-options.ts +1 -0
- package/src/lib/sources/data-source.ts +1 -0
- package/src/lib/sources/image-source.ts +1 -0
- package/src/lib/sources/image-tile-source.ts +1 -0
- package/src/lib/sources/tile-source.ts +1 -0
- package/src/lib/sources/utils/utils.ts +1 -0
- package/src/lib/sources/vector-tile-source.ts +1 -0
- package/src/loader-types.ts +1 -0
- package/src/service-types.ts +1 -0
- package/src/writer-types.ts +1 -0
package/LICENSE
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
This software includes parts of PhiloGL (https://github.com/philogb/philogl)
|
|
4
|
-
under MIT license. PhiloGL parts Copyright © 2013 Sencha Labs.
|
|
1
|
+
loaders.gl is licensed under the MIT license
|
|
5
2
|
|
|
6
|
-
|
|
3
|
+
Copyright (c) vis.gl contributors
|
|
7
4
|
|
|
8
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -23,8 +20,12 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
23
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
24
21
|
THE SOFTWARE.
|
|
25
22
|
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
Copyright (c) 2015 Uber Technologies, Inc.
|
|
26
26
|
|
|
27
|
-
loaders.gl includes certain files from Cesium (https://github.com/AnalyticalGraphicsInc/cesium)
|
|
27
|
+
loaders.gl includes certain files from Cesium (https://github.com/AnalyticalGraphicsInc/cesium)
|
|
28
|
+
under the Apache 2 License (found in the submodule: modules/3d-tiles):)
|
|
28
29
|
|
|
29
30
|
Copyright 2011-2018 CesiumJS Contributors
|
|
30
31
|
|
|
@@ -38,4 +39,3 @@ distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
38
39
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
39
40
|
See the License for the specific language governing permissions and limitations under the License.
|
|
40
41
|
|
|
41
|
-
Cesium-derived code can be found in the submodule: modules/3d-tiles
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,YAAY,EAEV,QAAQ,EACR,YAAY,EACZ,iBAAiB,EAEjB,UAAU,EACV,aAAa,EACb,qBAAqB,EACrB,wBAAwB,EACxB,W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AC,MAAM,iBAAiB,CAAC;AAE7C,YAAY,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAC,UAAU,EAAC,MAAM,2BAA2B,CAAC;AAErD,YAAY,EAAC,SAAS,EAAC,MAAM,gCAAgC,CAAC;AAC9D,YAAY,EAAC,gBAAgB,EAAE,mBAAmB,EAAC,MAAM,4BAA4B,CAAC;AACtF,YAAY,EAAC,kBAAkB,EAAC,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAC,WAAW,EAAC,MAAM,4BAA4B,CAAC;AAEvD,YAAY,EACV,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,2BAA2B,CAAC;AACnC,YAAY,EAAC,UAAU,EAAC,MAAM,2BAA2B,CAAC;AAE1D,YAAY,EAAC,eAAe,EAAC,MAAM,iCAAiC,CAAC;AAErE,YAAY,EAAC,gBAAgB,EAAC,MAAM,kCAAkC,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["parseFromContext","parseSyncFromContext","parseInBatchesFromContext","assert","isBrowser","isWorker","nodeVersion","self","window","global","document","mergeLoaderOptions","createLoaderWorker","parseWithWorker","canParseWithWorker","canEncodeWithWorker","parseJSON","sliceArrayBuffer","concatenateArrayBuffers","concatenateTypedArrays","compareArrayBuffers","padToNBytes","copyToArray","copyArrayBuffer","padStringToByteAlignment","copyStringToDataView","copyBinaryToDataView","copyPaddedArrayBufferToDataView","copyPaddedStringToDataView","getFirstCharacters","getMagicString","makeTextEncoderIterator","makeTextDecoderIterator","makeLineIterator","makeNumberedLineIterator","forEach","concatenateArrayBuffersAsync","default","RequestScheduler","setPathPrefix","getPathPrefix","resolvePath","addAliases","_addAliases","JSONLoader","isBuffer","toBuffer","toArrayBuffer","promisify1","promisify2","path","stream","BlobFile","HttpFile","NodeFileFacade","NodeFile","NodeFileSystemFacade","NodeFilesystem","isFileProvider","FileHandleFile","DataViewFile","DataSource","ImageSource"],"sources":["../src/index.ts"],"sourcesContent":["// loaders.gl, MIT license\n\n// TYPES\n\nexport type {\n // misc\n DataType,\n SyncDataType,\n BatchableDataType,\n // numeric array types\n TypedArray,\n BigTypedArray,\n TypedArrayConstructor,\n BigTypedArrayConstructor,\n NumberArray,\n NumericArray,\n // fetch\n FetchLike\n} from './types';\n\n// loaders\n\nexport type {\n Loader,\n LoaderWithParser,\n LoaderContext,\n LoaderOptions,\n LoaderOptionsType,\n LoaderReturnType,\n LoaderBatchType\n} from './loader-types';\n\nexport {parseFromContext, parseSyncFromContext, parseInBatchesFromContext} from './loader-types';\n\n// writers\n\nexport type {Writer, WriterOptions, WriterOptionsType} from './writer-types';\n\n// GENERAL UTILS\nexport {assert} from './lib/env-utils/assert';\nexport {\n isBrowser,\n isWorker,\n nodeVersion,\n self,\n window,\n global,\n document\n} from './lib/env-utils/globals';\n\nexport {mergeLoaderOptions} from './lib/option-utils/merge-loader-options';\n\n// LOADERS.GL-SPECIFIC WORKER UTILS\nexport {createLoaderWorker} from './lib/worker-loader-utils/create-loader-worker';\nexport {parseWithWorker, canParseWithWorker} from './lib/worker-loader-utils/parse-with-worker';\nexport {canEncodeWithWorker} from './lib/worker-loader-utils/encode-with-worker';\n\n// PARSER UTILS\nexport {parseJSON} from './lib/parser-utils/parse-json';\n\n// MEMORY COPY UTILS\nexport {\n sliceArrayBuffer,\n concatenateArrayBuffers,\n concatenateTypedArrays,\n compareArrayBuffers\n} from './lib/binary-utils/array-buffer-utils';\nexport {padToNBytes, copyToArray, copyArrayBuffer} from './lib/binary-utils/memory-copy-utils';\nexport {\n padStringToByteAlignment,\n copyStringToDataView,\n copyBinaryToDataView,\n copyPaddedArrayBufferToDataView,\n copyPaddedStringToDataView\n} from './lib/binary-utils/dataview-copy-utils';\nexport {getFirstCharacters, getMagicString} from './lib/binary-utils/get-first-characters';\n\n// ITERATOR UTILS\nexport {\n makeTextEncoderIterator,\n makeTextDecoderIterator,\n makeLineIterator,\n makeNumberedLineIterator\n} from './lib/iterators/text-iterators';\nexport {forEach, concatenateArrayBuffersAsync} from './lib/iterators/async-iteration';\n\n// REQUEST UTILS\nexport {default as RequestScheduler} from './lib/request-utils/request-scheduler';\n\n// PATH HELPERS\nexport {setPathPrefix, getPathPrefix, resolvePath} from './lib/path-utils/file-aliases';\nexport {addAliases as _addAliases} from './lib/path-utils/file-aliases';\n\n// MICRO LOADERS\nexport {JSONLoader} from './json-loader';\n\n// NODE support\n\n// Node.js emulation (can be used in browser)\n\n// Avoid direct use of `Buffer` which pulls in 50KB polyfill\nexport {isBuffer, toBuffer, toArrayBuffer} from './lib/binary-utils/memory-conversion-utils';\n\n// Note.js wrappers (can be safely imported, but not used in browser)\n\n// Use instead of importing 'util' to avoid node dependencies\nexport {promisify1, promisify2} from './lib/node/promisify';\n\n// `path` replacement (avoids bundling big path polyfill)\nimport * as path from './lib/path-utils/path';\nexport {path};\n\n// Use instead of importing 'stream' to avoid node dependencies`\nimport * as stream from './lib/node/stream';\nexport {stream};\n\n// EXPERIMENTAL: FILE SYSTEMS\n\nexport type {ReadableFile, WritableFile, Stat} from './lib/files/file';\nexport {BlobFile} from './lib/files/blob-file';\nexport {HttpFile} from './lib/files/http-file';\nexport {NodeFileFacade as NodeFile} from './lib/files/node-file-facade';\n\nexport type {FileSystem, RandomAccessFileSystem} from './lib/filesystems/filesystem';\nexport {NodeFileSystemFacade as NodeFilesystem} from './lib/filesystems/node-filesystem-facade';\n\n// TODO - replace with ReadableFile\nexport type {FileProvider} from './lib/file-provider/file-provider';\nexport {isFileProvider} from './lib/file-provider/file-provider';\nexport {FileHandleFile} from './lib/file-provider/file-handle-file';\nexport {DataViewFile} from './lib/file-provider/data-view-file';\n\n// EXPERIMENTAL: DATA SOURCES\nexport type {Service} from './service-types';\n\nexport type {DataSourceProps} from './lib/sources/data-source';\nexport {DataSource} from './lib/sources/data-source';\n\nexport type {ImageType} from './lib/sources/utils/image-type';\nexport type {ImageSourceProps, ImageSourceMetadata} from './lib/sources/image-source';\nexport type {GetImageParameters} from './lib/sources/image-source';\nexport {ImageSource} from './lib/sources/image-source';\n\nexport type {\n TileSourceProps,\n TileSourceMetadata,\n GetTileParameters,\n TileLoadParameters\n} from './lib/sources/tile-source';\nexport type {TileSource} from './lib/sources/tile-source';\n\nexport type {ImageTileSource} from './lib/sources/image-tile-source';\n\nexport type {VectorTileSource} from './lib/sources/vector-tile-source';\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["parseFromContext","parseSyncFromContext","parseInBatchesFromContext","assert","isBrowser","isWorker","nodeVersion","self","window","global","document","mergeLoaderOptions","createLoaderWorker","parseWithWorker","canParseWithWorker","canEncodeWithWorker","parseJSON","sliceArrayBuffer","concatenateArrayBuffers","concatenateTypedArrays","compareArrayBuffers","padToNBytes","copyToArray","copyArrayBuffer","padStringToByteAlignment","copyStringToDataView","copyBinaryToDataView","copyPaddedArrayBufferToDataView","copyPaddedStringToDataView","getFirstCharacters","getMagicString","makeTextEncoderIterator","makeTextDecoderIterator","makeLineIterator","makeNumberedLineIterator","forEach","concatenateArrayBuffersAsync","default","RequestScheduler","setPathPrefix","getPathPrefix","resolvePath","addAliases","_addAliases","JSONLoader","isBuffer","toBuffer","toArrayBuffer","promisify1","promisify2","path","stream","BlobFile","HttpFile","NodeFileFacade","NodeFile","NodeFileSystemFacade","NodeFilesystem","isFileProvider","FileHandleFile","DataViewFile","DataSource","ImageSource"],"sources":["../src/index.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\n\n// TYPES\n\nexport type {\n // misc\n DataType,\n SyncDataType,\n BatchableDataType,\n // numeric array types\n TypedArray,\n BigTypedArray,\n TypedArrayConstructor,\n BigTypedArrayConstructor,\n NumberArray,\n NumericArray,\n // fetch\n FetchLike\n} from './types';\n\n// loaders\n\nexport type {\n Loader,\n LoaderWithParser,\n LoaderContext,\n LoaderOptions,\n LoaderOptionsType,\n LoaderReturnType,\n LoaderBatchType\n} from './loader-types';\n\nexport {parseFromContext, parseSyncFromContext, parseInBatchesFromContext} from './loader-types';\n\n// writers\n\nexport type {Writer, WriterOptions, WriterOptionsType} from './writer-types';\n\n// GENERAL UTILS\nexport {assert} from './lib/env-utils/assert';\nexport {\n isBrowser,\n isWorker,\n nodeVersion,\n self,\n window,\n global,\n document\n} from './lib/env-utils/globals';\n\nexport {mergeLoaderOptions} from './lib/option-utils/merge-loader-options';\n\n// LOADERS.GL-SPECIFIC WORKER UTILS\nexport {createLoaderWorker} from './lib/worker-loader-utils/create-loader-worker';\nexport {parseWithWorker, canParseWithWorker} from './lib/worker-loader-utils/parse-with-worker';\nexport {canEncodeWithWorker} from './lib/worker-loader-utils/encode-with-worker';\n\n// PARSER UTILS\nexport {parseJSON} from './lib/parser-utils/parse-json';\n\n// MEMORY COPY UTILS\nexport {\n sliceArrayBuffer,\n concatenateArrayBuffers,\n concatenateTypedArrays,\n compareArrayBuffers\n} from './lib/binary-utils/array-buffer-utils';\nexport {padToNBytes, copyToArray, copyArrayBuffer} from './lib/binary-utils/memory-copy-utils';\nexport {\n padStringToByteAlignment,\n copyStringToDataView,\n copyBinaryToDataView,\n copyPaddedArrayBufferToDataView,\n copyPaddedStringToDataView\n} from './lib/binary-utils/dataview-copy-utils';\nexport {getFirstCharacters, getMagicString} from './lib/binary-utils/get-first-characters';\n\n// ITERATOR UTILS\nexport {\n makeTextEncoderIterator,\n makeTextDecoderIterator,\n makeLineIterator,\n makeNumberedLineIterator\n} from './lib/iterators/text-iterators';\nexport {forEach, concatenateArrayBuffersAsync} from './lib/iterators/async-iteration';\n\n// REQUEST UTILS\nexport {default as RequestScheduler} from './lib/request-utils/request-scheduler';\n\n// PATH HELPERS\nexport {setPathPrefix, getPathPrefix, resolvePath} from './lib/path-utils/file-aliases';\nexport {addAliases as _addAliases} from './lib/path-utils/file-aliases';\n\n// MICRO LOADERS\nexport {JSONLoader} from './json-loader';\n\n// NODE support\n\n// Node.js emulation (can be used in browser)\n\n// Avoid direct use of `Buffer` which pulls in 50KB polyfill\nexport {isBuffer, toBuffer, toArrayBuffer} from './lib/binary-utils/memory-conversion-utils';\n\n// Note.js wrappers (can be safely imported, but not used in browser)\n\n// Use instead of importing 'util' to avoid node dependencies\nexport {promisify1, promisify2} from './lib/node/promisify';\n\n// `path` replacement (avoids bundling big path polyfill)\nimport * as path from './lib/path-utils/path';\nexport {path};\n\n// Use instead of importing 'stream' to avoid node dependencies`\nimport * as stream from './lib/node/stream';\nexport {stream};\n\n// EXPERIMENTAL: FILE SYSTEMS\n\nexport type {ReadableFile, WritableFile, Stat} from './lib/files/file';\nexport {BlobFile} from './lib/files/blob-file';\nexport {HttpFile} from './lib/files/http-file';\nexport {NodeFileFacade as NodeFile} from './lib/files/node-file-facade';\n\nexport type {FileSystem, RandomAccessFileSystem} from './lib/filesystems/filesystem';\nexport {NodeFileSystemFacade as NodeFilesystem} from './lib/filesystems/node-filesystem-facade';\n\n// TODO - replace with ReadableFile\nexport type {FileProvider} from './lib/file-provider/file-provider';\nexport {isFileProvider} from './lib/file-provider/file-provider';\nexport {FileHandleFile} from './lib/file-provider/file-handle-file';\nexport {DataViewFile} from './lib/file-provider/data-view-file';\n\n// EXPERIMENTAL: DATA SOURCES\nexport type {Service} from './service-types';\n\nexport type {DataSourceProps} from './lib/sources/data-source';\nexport {DataSource} from './lib/sources/data-source';\n\nexport type {ImageType} from './lib/sources/utils/image-type';\nexport type {ImageSourceProps, ImageSourceMetadata} from './lib/sources/image-source';\nexport type {GetImageParameters} from './lib/sources/image-source';\nexport {ImageSource} from './lib/sources/image-source';\n\nexport type {\n TileSourceProps,\n TileSourceMetadata,\n GetTileParameters,\n TileLoadParameters\n} from './lib/sources/tile-source';\nexport type {TileSource} from './lib/sources/tile-source';\n\nexport type {ImageTileSource} from './lib/sources/image-tile-source';\n\nexport type {VectorTileSource} from './lib/sources/vector-tile-source';\n"],"mappings":"SAiCQA,gBAAgB,EAAEC,oBAAoB,EAAEC,yBAAyB;AAAA,SAOjEC,MAAM;AAAA,SAEZC,SAAS,EACTC,QAAQ,EACRC,WAAW,EACXC,IAAI,EACJC,MAAM,EACNC,MAAM,EACNC,QAAQ;AAAA,SAGFC,kBAAkB;AAAA,SAGlBC,kBAAkB;AAAA,SAClBC,eAAe,EAAEC,kBAAkB;AAAA,SACnCC,mBAAmB;AAAA,SAGnBC,SAAS;AAAA,SAIfC,gBAAgB,EAChBC,uBAAuB,EACvBC,sBAAsB,EACtBC,mBAAmB;AAAA,SAEbC,WAAW,EAAEC,WAAW,EAAEC,eAAe;AAAA,SAE/CC,wBAAwB,EACxBC,oBAAoB,EACpBC,oBAAoB,EACpBC,+BAA+B,EAC/BC,0BAA0B;AAAA,SAEpBC,kBAAkB,EAAEC,cAAc;AAAA,SAIxCC,uBAAuB,EACvBC,uBAAuB,EACvBC,gBAAgB,EAChBC,wBAAwB;AAAA,SAElBC,OAAO,EAAEC,4BAA4B;AAAA,SAGrCC,OAAO,IAAIC,gBAAgB;AAAA,SAG3BC,aAAa,EAAEC,aAAa,EAAEC,WAAW;AAAA,SACzCC,UAAU,IAAIC,WAAW;AAAA,SAGzBC,UAAU;AAAA,SAOVC,QAAQ,EAAEC,QAAQ,EAAEC,aAAa;AAAA,SAKjCC,UAAU,EAAEC,UAAU;AAAA,OAGvB,KAAKC,IAAI;AAChB,SAAQA,IAAI;AAAE,OAGP,KAAKC,MAAM;AAClB,SAAQA,MAAM;AAAE,SAKRC,QAAQ;AAAA,SACRC,QAAQ;AAAA,SACRC,cAAc,IAAIC,QAAQ;AAAA,SAG1BC,oBAAoB,IAAIC,cAAc;AAAA,SAItCC,cAAc;AAAA,SACdC,cAAc;AAAA,SACdC,YAAY;AAAA,SAMZC,UAAU;AAAA,SAKVC,WAAW"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-first-characters.d.ts","sourceRoot":"","sources":["../../../src/lib/binary-utils/get-first-characters.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-first-characters.d.ts","sourceRoot":"","sources":["../../../src/lib/binary-utils/get-first-characters.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,EAAE,MAAM,GAAE,MAAU,GAAG,MAAM,CAWzF;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,GACb,MAAM,CAUR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-first-characters.js","names":["getFirstCharacters","data","length","arguments","undefined","slice","ArrayBuffer","isView","getMagicString","buffer","byteOffset","arrayBuffer","byteLength","dataView","DataView","magic","i","String","fromCharCode","getUint8"],"sources":["../../../src/lib/binary-utils/get-first-characters.ts"],"sourcesContent":["// loaders.gl, MIT license\n\n/**\n * Get the first characters from a binary file (interpret the first bytes as an ASCII string)\n * @param data\n * @param length\n * @returns\n */\nexport function getFirstCharacters(data: string | ArrayBuffer, length: number = 5): string {\n if (typeof data === 'string') {\n return data.slice(0, length);\n } else if (ArrayBuffer.isView(data)) {\n // Typed Arrays can have offsets into underlying buffer\n return getMagicString(data.buffer, data.byteOffset, length);\n } else if (data instanceof ArrayBuffer) {\n const byteOffset = 0;\n return getMagicString(data, byteOffset, length);\n }\n return '';\n}\n\n/**\n * Gets a magic string from a \"file\"\n * Typically used to check or detect file format\n * @param arrayBuffer\n * @param byteOffset\n * @param length\n * @returns\n */\nexport function getMagicString(\n arrayBuffer: ArrayBuffer,\n byteOffset: number,\n length: number\n): string {\n if (arrayBuffer.byteLength <= byteOffset + length) {\n return '';\n }\n const dataView = new DataView(arrayBuffer);\n let magic = '';\n for (let i = 0; i < length; i++) {\n magic += String.fromCharCode(dataView.getUint8(byteOffset + i));\n }\n return magic;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-first-characters.js","names":["getFirstCharacters","data","length","arguments","undefined","slice","ArrayBuffer","isView","getMagicString","buffer","byteOffset","arrayBuffer","byteLength","dataView","DataView","magic","i","String","fromCharCode","getUint8"],"sources":["../../../src/lib/binary-utils/get-first-characters.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\n\n/**\n * Get the first characters from a binary file (interpret the first bytes as an ASCII string)\n * @param data\n * @param length\n * @returns\n */\nexport function getFirstCharacters(data: string | ArrayBuffer, length: number = 5): string {\n if (typeof data === 'string') {\n return data.slice(0, length);\n } else if (ArrayBuffer.isView(data)) {\n // Typed Arrays can have offsets into underlying buffer\n return getMagicString(data.buffer, data.byteOffset, length);\n } else if (data instanceof ArrayBuffer) {\n const byteOffset = 0;\n return getMagicString(data, byteOffset, length);\n }\n return '';\n}\n\n/**\n * Gets a magic string from a \"file\"\n * Typically used to check or detect file format\n * @param arrayBuffer\n * @param byteOffset\n * @param length\n * @returns\n */\nexport function getMagicString(\n arrayBuffer: ArrayBuffer,\n byteOffset: number,\n length: number\n): string {\n if (arrayBuffer.byteLength <= byteOffset + length) {\n return '';\n }\n const dataView = new DataView(arrayBuffer);\n let magic = '';\n for (let i = 0; i < length; i++) {\n magic += String.fromCharCode(dataView.getUint8(byteOffset + i));\n }\n return magic;\n}\n"],"mappings":"AASA,OAAO,SAASA,kBAAkBA,CAACC,IAA0B,EAA8B;EAAA,IAA5BC,MAAc,GAAAC,SAAA,CAAAD,MAAA,QAAAC,SAAA,QAAAC,SAAA,GAAAD,SAAA,MAAG,CAAC;EAC/E,IAAI,OAAOF,IAAI,KAAK,QAAQ,EAAE;IAC5B,OAAOA,IAAI,CAACI,KAAK,CAAC,CAAC,EAAEH,MAAM,CAAC;EAC9B,CAAC,MAAM,IAAII,WAAW,CAACC,MAAM,CAACN,IAAI,CAAC,EAAE;IAEnC,OAAOO,cAAc,CAACP,IAAI,CAACQ,MAAM,EAAER,IAAI,CAACS,UAAU,EAAER,MAAM,CAAC;EAC7D,CAAC,MAAM,IAAID,IAAI,YAAYK,WAAW,EAAE;IACtC,MAAMI,UAAU,GAAG,CAAC;IACpB,OAAOF,cAAc,CAACP,IAAI,EAAES,UAAU,EAAER,MAAM,CAAC;EACjD;EACA,OAAO,EAAE;AACX;AAUA,OAAO,SAASM,cAAcA,CAC5BG,WAAwB,EACxBD,UAAkB,EAClBR,MAAc,EACN;EACR,IAAIS,WAAW,CAACC,UAAU,IAAIF,UAAU,GAAGR,MAAM,EAAE;IACjD,OAAO,EAAE;EACX;EACA,MAAMW,QAAQ,GAAG,IAAIC,QAAQ,CAACH,WAAW,CAAC;EAC1C,IAAII,KAAK,GAAG,EAAE;EACd,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGd,MAAM,EAAEc,CAAC,EAAE,EAAE;IAC/BD,KAAK,IAAIE,MAAM,CAACC,YAAY,CAACL,QAAQ,CAACM,QAAQ,CAACT,UAAU,GAAGM,CAAC,CAAC,CAAC;EACjE;EACA,OAAOD,KAAK;AACd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-conversion-utils.d.ts","sourceRoot":"","sources":["../../../src/lib/binary-utils/memory-conversion-utils.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"memory-conversion-utils.d.ts","sourceRoot":"","sources":["../../../src/lib/binary-utils/memory-conversion-utils.ts"],"names":[],"mappings":";AAKA;;GAEG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAE5C;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,GAAG,GAAG,MAAM,CAE1C;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,GAAG,WAAW,CA8BxD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-conversion-utils.js","names":["node","isBuffer","value","toBuffer","data","toArrayBuffer","ArrayBuffer","isView","byteOffset","byteLength","buffer","slice","text","uint8Array","TextEncoder","encode","_toArrayBuffer","Error"],"sources":["../../../src/lib/binary-utils/memory-conversion-utils.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport * as node from '../node/buffer';\n\n/**\n * Check for Node.js `Buffer` (without triggering bundler to include Buffer polyfill on browser)\n */\nexport function isBuffer(value: any): boolean {\n return value && typeof value === 'object' && value.isBuffer;\n}\n\n/**\n * Converts to Node.js `Buffer` (without triggering bundler to include Buffer polyfill on browser)\n * @todo better data type\n */\nexport function toBuffer(data: any): Buffer {\n return node.toBuffer ? node.toBuffer(data) : data;\n}\n\n/**\n * Convert an object to an array buffer\n */\nexport function toArrayBuffer(data: unknown): ArrayBuffer {\n // Note: Should be called first, Buffers can trigger other detections below\n if (isBuffer(data)) {\n return node.toArrayBuffer(data);\n }\n\n if (data instanceof ArrayBuffer) {\n return data;\n }\n\n // Careful - Node Buffers look like Uint8Arrays (keep after isBuffer)\n if (ArrayBuffer.isView(data)) {\n if (data.byteOffset === 0 && data.byteLength === data.buffer.byteLength) {\n return data.buffer;\n }\n return data.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength);\n }\n\n if (typeof data === 'string') {\n const text = data;\n const uint8Array = new TextEncoder().encode(text);\n return uint8Array.buffer;\n }\n\n // HACK to support Blob polyfill\n if (data && typeof data === 'object' && (data as any)._toArrayBuffer) {\n return (data as any)._toArrayBuffer();\n }\n\n throw new Error('toArrayBuffer');\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"memory-conversion-utils.js","names":["node","isBuffer","value","toBuffer","data","toArrayBuffer","ArrayBuffer","isView","byteOffset","byteLength","buffer","slice","text","uint8Array","TextEncoder","encode","_toArrayBuffer","Error"],"sources":["../../../src/lib/binary-utils/memory-conversion-utils.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\n\nimport * as node from '../node/buffer';\n\n/**\n * Check for Node.js `Buffer` (without triggering bundler to include Buffer polyfill on browser)\n */\nexport function isBuffer(value: any): boolean {\n return value && typeof value === 'object' && value.isBuffer;\n}\n\n/**\n * Converts to Node.js `Buffer` (without triggering bundler to include Buffer polyfill on browser)\n * @todo better data type\n */\nexport function toBuffer(data: any): Buffer {\n return node.toBuffer ? node.toBuffer(data) : data;\n}\n\n/**\n * Convert an object to an array buffer\n */\nexport function toArrayBuffer(data: unknown): ArrayBuffer {\n // Note: Should be called first, Buffers can trigger other detections below\n if (isBuffer(data)) {\n return node.toArrayBuffer(data);\n }\n\n if (data instanceof ArrayBuffer) {\n return data;\n }\n\n // Careful - Node Buffers look like Uint8Arrays (keep after isBuffer)\n if (ArrayBuffer.isView(data)) {\n if (data.byteOffset === 0 && data.byteLength === data.buffer.byteLength) {\n return data.buffer;\n }\n return data.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength);\n }\n\n if (typeof data === 'string') {\n const text = data;\n const uint8Array = new TextEncoder().encode(text);\n return uint8Array.buffer;\n }\n\n // HACK to support Blob polyfill\n if (data && typeof data === 'object' && (data as any)._toArrayBuffer) {\n return (data as any)._toArrayBuffer();\n }\n\n throw new Error('toArrayBuffer');\n}\n"],"mappings":"OAGO,KAAKA,IAAI;AAKhB,OAAO,SAASC,QAAQA,CAACC,KAAU,EAAW;EAC5C,OAAOA,KAAK,IAAI,OAAOA,KAAK,KAAK,QAAQ,IAAIA,KAAK,CAACD,QAAQ;AAC7D;AAMA,OAAO,SAASE,QAAQA,CAACC,IAAS,EAAU;EAC1C,OAAOJ,IAAI,CAACG,QAAQ,GAAGH,IAAI,CAACG,QAAQ,CAACC,IAAI,CAAC,GAAGA,IAAI;AACnD;AAKA,OAAO,SAASC,aAAaA,CAACD,IAAa,EAAe;EAExD,IAAIH,QAAQ,CAACG,IAAI,CAAC,EAAE;IAClB,OAAOJ,IAAI,CAACK,aAAa,CAACD,IAAI,CAAC;EACjC;EAEA,IAAIA,IAAI,YAAYE,WAAW,EAAE;IAC/B,OAAOF,IAAI;EACb;EAGA,IAAIE,WAAW,CAACC,MAAM,CAACH,IAAI,CAAC,EAAE;IAC5B,IAAIA,IAAI,CAACI,UAAU,KAAK,CAAC,IAAIJ,IAAI,CAACK,UAAU,KAAKL,IAAI,CAACM,MAAM,CAACD,UAAU,EAAE;MACvE,OAAOL,IAAI,CAACM,MAAM;IACpB;IACA,OAAON,IAAI,CAACM,MAAM,CAACC,KAAK,CAACP,IAAI,CAACI,UAAU,EAAEJ,IAAI,CAACI,UAAU,GAAGJ,IAAI,CAACK,UAAU,CAAC;EAC9E;EAEA,IAAI,OAAOL,IAAI,KAAK,QAAQ,EAAE;IAC5B,MAAMQ,IAAI,GAAGR,IAAI;IACjB,MAAMS,UAAU,GAAG,IAAIC,WAAW,CAAC,CAAC,CAACC,MAAM,CAACH,IAAI,CAAC;IACjD,OAAOC,UAAU,CAACH,MAAM;EAC1B;EAGA,IAAIN,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,IAAKA,IAAI,CAASY,cAAc,EAAE;IACpE,OAAQZ,IAAI,CAASY,cAAc,CAAC,CAAC;EACvC;EAEA,MAAM,IAAIC,KAAK,CAAC,eAAe,CAAC;AAClC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-handle-file.d.ts","sourceRoot":"","sources":["../../../src/lib/file-provider/file-handle-file.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"file-handle-file.d.ts","sourceRoot":"","sources":["../../../src/lib/file-provider/file-handle-file.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAG7C;;;GAGG;AACH,qBAAa,cAAe,YAAW,YAAY;IACjD,iDAAiD;IACjD,OAAO,CAAC,IAAI,CAAW;IAEvB,+BAA+B;IAC/B,OAAO,CAAC,IAAI,CAAS;IAErB,kCAAkC;gBACtB,IAAI,EAAE,MAAM;IAKxB,iBAAiB;IACX,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAI9B;;;OAGG;IACG,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IASxD;;;OAGG;IACG,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IASzD;;;OAGG;IACG,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IASzD;;;OAGG;IACG,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAS5D;;;;OAIG;IACG,KAAK,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IASzE;;OAEG;IACH,IAAI,MAAM,IAAI,MAAM,CAEnB;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-handle-file.js","names":["NodeFileFacade","NodeFile","FileHandleFile","constructor","path","file","size","bigsize","destroy","close","getUint8","offset","arrayBuffer","read","val","Uint8Array","at","undefined","Error","getUint16","Uint16Array","getUint32","Uint32Array","getBigUint64","BigInt64Array","slice","startOffset","endOffset","bigLength","Number","MAX_SAFE_INTEGER","length"],"sources":["../../../src/lib/file-provider/file-handle-file.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport {FileProvider} from './file-provider';\nimport {NodeFileFacade as NodeFile} from '../files/node-file-facade';\n\n/**\n * Provides file data using node fs library\n * @deprecated - will be replaced with ReadableFile\n */\nexport class FileHandleFile implements FileProvider {\n /** The FileHandle from which data is provided */\n private file: NodeFile;\n\n /** The file length in bytes */\n private size: bigint;\n\n /** Create a new FileHandleFile */\n constructor(path: string) {\n this.file = new NodeFile(path, 'r');\n this.size = this.file.bigsize;\n }\n\n /** Close file */\n async destroy(): Promise<void> {\n await this.file.close();\n }\n\n /**\n * Gets an unsigned 8-bit integer at the specified byte offset from the start of the file.\n * @param offset The offset, in bytes, from the start of the file where to read the data.\n */\n async getUint8(offset: number | bigint): Promise<number> {\n const arrayBuffer = await this.file.read(offset, 1);\n const val = new Uint8Array(arrayBuffer).at(0);\n if (val === undefined) {\n throw new Error('something went wrong');\n }\n return val;\n }\n\n /**\n * Gets an unsigned 16-bit integer at the specified byte offset from the start of the file.\n * @param offset The offset, in bytes, from the start of the file where to read the data.\n */\n async getUint16(offset: number | bigint): Promise<number> {\n const arrayBuffer = await this.file.read(offset, 2);\n const val = new Uint16Array(arrayBuffer).at(0);\n if (val === undefined) {\n throw new Error('something went wrong');\n }\n return val;\n }\n\n /**\n * Gets an unsigned 32-bit integer at the specified byte offset from the start of the file.\n * @param offset The offset, in bytes, from the start of the file where to read the data.\n */\n async getUint32(offset: number | bigint): Promise<number> {\n const arrayBuffer = await this.file.read(offset, 4);\n const val = new Uint32Array(arrayBuffer).at(0);\n if (val === undefined) {\n throw new Error('something went wrong');\n }\n return val;\n }\n\n /**\n * Gets an unsigned 32-bit integer at the specified byte offset from the start of the file.\n * @param offset The offset, in bytes, from the start of the file where to read the data.\n */\n async getBigUint64(offset: number | bigint): Promise<bigint> {\n const arrayBuffer = await this.file.read(offset, 8);\n const val = new BigInt64Array(arrayBuffer).at(0);\n if (val === undefined) {\n throw new Error('something went wrong');\n }\n return val;\n }\n\n /**\n * returns an ArrayBuffer whose contents are a copy of this file bytes from startOffset, inclusive, up to endOffset, exclusive.\n * @param startOffset The offset, in byte, from the start of the file where to start reading the data.\n * @param endOffset The offset, in bytes, from the start of the file where to end reading the data.\n */\n async slice(startOffset: bigint, endOffset: bigint): Promise<ArrayBuffer> {\n const bigLength = endOffset - startOffset;\n if (bigLength > Number.MAX_SAFE_INTEGER) {\n throw new Error('too big slice');\n }\n const length = Number(bigLength);\n return await this.file.read(startOffset, length);\n }\n\n /**\n * the length (in bytes) of the data.\n */\n get length(): bigint {\n return this.size;\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"file-handle-file.js","names":["NodeFileFacade","NodeFile","FileHandleFile","constructor","path","file","size","bigsize","destroy","close","getUint8","offset","arrayBuffer","read","val","Uint8Array","at","undefined","Error","getUint16","Uint16Array","getUint32","Uint32Array","getBigUint64","BigInt64Array","slice","startOffset","endOffset","bigLength","Number","MAX_SAFE_INTEGER","length"],"sources":["../../../src/lib/file-provider/file-handle-file.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\n\nimport {FileProvider} from './file-provider';\nimport {NodeFileFacade as NodeFile} from '../files/node-file-facade';\n\n/**\n * Provides file data using node fs library\n * @deprecated - will be replaced with ReadableFile\n */\nexport class FileHandleFile implements FileProvider {\n /** The FileHandle from which data is provided */\n private file: NodeFile;\n\n /** The file length in bytes */\n private size: bigint;\n\n /** Create a new FileHandleFile */\n constructor(path: string) {\n this.file = new NodeFile(path, 'r');\n this.size = this.file.bigsize;\n }\n\n /** Close file */\n async destroy(): Promise<void> {\n await this.file.close();\n }\n\n /**\n * Gets an unsigned 8-bit integer at the specified byte offset from the start of the file.\n * @param offset The offset, in bytes, from the start of the file where to read the data.\n */\n async getUint8(offset: number | bigint): Promise<number> {\n const arrayBuffer = await this.file.read(offset, 1);\n const val = new Uint8Array(arrayBuffer).at(0);\n if (val === undefined) {\n throw new Error('something went wrong');\n }\n return val;\n }\n\n /**\n * Gets an unsigned 16-bit integer at the specified byte offset from the start of the file.\n * @param offset The offset, in bytes, from the start of the file where to read the data.\n */\n async getUint16(offset: number | bigint): Promise<number> {\n const arrayBuffer = await this.file.read(offset, 2);\n const val = new Uint16Array(arrayBuffer).at(0);\n if (val === undefined) {\n throw new Error('something went wrong');\n }\n return val;\n }\n\n /**\n * Gets an unsigned 32-bit integer at the specified byte offset from the start of the file.\n * @param offset The offset, in bytes, from the start of the file where to read the data.\n */\n async getUint32(offset: number | bigint): Promise<number> {\n const arrayBuffer = await this.file.read(offset, 4);\n const val = new Uint32Array(arrayBuffer).at(0);\n if (val === undefined) {\n throw new Error('something went wrong');\n }\n return val;\n }\n\n /**\n * Gets an unsigned 32-bit integer at the specified byte offset from the start of the file.\n * @param offset The offset, in bytes, from the start of the file where to read the data.\n */\n async getBigUint64(offset: number | bigint): Promise<bigint> {\n const arrayBuffer = await this.file.read(offset, 8);\n const val = new BigInt64Array(arrayBuffer).at(0);\n if (val === undefined) {\n throw new Error('something went wrong');\n }\n return val;\n }\n\n /**\n * returns an ArrayBuffer whose contents are a copy of this file bytes from startOffset, inclusive, up to endOffset, exclusive.\n * @param startOffset The offset, in byte, from the start of the file where to start reading the data.\n * @param endOffset The offset, in bytes, from the start of the file where to end reading the data.\n */\n async slice(startOffset: bigint, endOffset: bigint): Promise<ArrayBuffer> {\n const bigLength = endOffset - startOffset;\n if (bigLength > Number.MAX_SAFE_INTEGER) {\n throw new Error('too big slice');\n }\n const length = Number(bigLength);\n return await this.file.read(startOffset, length);\n }\n\n /**\n * the length (in bytes) of the data.\n */\n get length(): bigint {\n return this.size;\n }\n}\n"],"mappings":"SAIQA,cAAc,IAAIC,QAAQ;AAMlC,OAAO,MAAMC,cAAc,CAAyB;EAQlDC,WAAWA,CAACC,IAAY,EAAE;IAAA,KANlBC,IAAI;IAAA,KAGJC,IAAI;IAIV,IAAI,CAACD,IAAI,GAAG,IAAIJ,QAAQ,CAACG,IAAI,EAAE,GAAG,CAAC;IACnC,IAAI,CAACE,IAAI,GAAG,IAAI,CAACD,IAAI,CAACE,OAAO;EAC/B;EAGA,MAAMC,OAAOA,CAAA,EAAkB;IAC7B,MAAM,IAAI,CAACH,IAAI,CAACI,KAAK,CAAC,CAAC;EACzB;EAMA,MAAMC,QAAQA,CAACC,MAAuB,EAAmB;IACvD,MAAMC,WAAW,GAAG,MAAM,IAAI,CAACP,IAAI,CAACQ,IAAI,CAACF,MAAM,EAAE,CAAC,CAAC;IACnD,MAAMG,GAAG,GAAG,IAAIC,UAAU,CAACH,WAAW,CAAC,CAACI,EAAE,CAAC,CAAC,CAAC;IAC7C,IAAIF,GAAG,KAAKG,SAAS,EAAE;MACrB,MAAM,IAAIC,KAAK,CAAC,sBAAsB,CAAC;IACzC;IACA,OAAOJ,GAAG;EACZ;EAMA,MAAMK,SAASA,CA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SAAS,CAAC;IAChC,OAAO,MAAM,IAAI,CAACvB,IAAI,CAACQ,IAAI,CAACa,WAAW,EAAEK,MAAM,CAAC;EAClD;EAKA,IAAIA,MAAMA,CAAA,EAAW;IACnB,OAAO,IAAI,CAACzB,IAAI;EAClB;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blob-file.d.ts","sourceRoot":"","sources":["../../../src/lib/files/blob-file.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"blob-file.d.ts","sourceRoot":"","sources":["../../../src/lib/files/blob-file.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,YAAY,EAAC,MAAM,QAAQ,CAAC;AAEpC,qBAAa,QAAS,YAAW,YAAY;IAC3C,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;gBAET,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,WAAW;IAOrC,KAAK;IAEL,IAAI;;;;;IAQJ,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;CAIhE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blob-file.js","names":["BlobFile","constructor","blob","handle","size","bigsize","url","ArrayBuffer","Blob","byteLength","BigInt","File","name","close","stat","isDirectory","read","start","length","arrayBuffer","slice"],"sources":["../../../src/lib/files/blob-file.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport {ReadableFile} from './file';\n\nexport class BlobFile implements ReadableFile {\n readonly handle: Blob;\n readonly size: number;\n readonly bigsize: bigint;\n readonly url: string;\n\n constructor(blob: Blob | File | ArrayBuffer) {\n this.handle = blob instanceof ArrayBuffer ? new Blob([blob]) : blob;\n this.size = blob instanceof ArrayBuffer ? blob.byteLength : blob.size;\n this.bigsize = BigInt(this.size);\n this.url = blob instanceof File ? blob.name : '';\n }\n\n async close() {}\n\n async stat() {\n return {\n size: this.handle.size,\n bigsize: BigInt(this.handle.size),\n isDirectory: false\n };\n }\n\n async read(start: number, length: number): Promise<ArrayBuffer> {\n const arrayBuffer = await this.handle.slice(start, start + length).arrayBuffer();\n return arrayBuffer;\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"blob-file.js","names":["BlobFile","constructor","blob","handle","size","bigsize","url","ArrayBuffer","Blob","byteLength","BigInt","File","name","close","stat","isDirectory","read","start","length","arrayBuffer","slice"],"sources":["../../../src/lib/files/blob-file.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\n\nimport {ReadableFile} from './file';\n\nexport class BlobFile implements ReadableFile {\n readonly handle: Blob;\n readonly size: number;\n readonly bigsize: bigint;\n readonly url: string;\n\n constructor(blob: Blob | File | ArrayBuffer) {\n this.handle = blob instanceof ArrayBuffer ? new Blob([blob]) : blob;\n this.size = blob instanceof ArrayBuffer ? blob.byteLength : blob.size;\n this.bigsize = BigInt(this.size);\n this.url = blob instanceof File ? blob.name : '';\n }\n\n async close() {}\n\n async stat() {\n return {\n size: this.handle.size,\n bigsize: BigInt(this.handle.size),\n isDirectory: false\n };\n }\n\n async read(start: number, length: number): Promise<ArrayBuffer> {\n const arrayBuffer = await this.handle.slice(start, start + length).arrayBuffer();\n return arrayBuffer;\n }\n}\n"],"mappings":"AAKA,OAAO,MAAMA,QAAQ,CAAyB;EAM5CC,WAAWA,CAACC,IAA+B,EAAE;IAAA,KALpCC,MAAM;IAAA,KACNC,IAAI;IAAA,KACJC,OAAO;IAAA,KACPC,GAAG;IAGV,IAAI,CAACH,MAAM,GAAGD,IAAI,YAAYK,WAAW,GAAG,IAAIC,IAAI,CAAC,CAACN,IAAI,CAAC,CAAC,GAAGA,IAAI;IACnE,IAAI,CAACE,IAAI,GAAGF,IAAI,YAAYK,WAAW,GAAGL,IAAI,CAACO,UAAU,GAAGP,IAAI,CAACE,IAAI;IACrE,IAAI,CAACC,OAAO,GAAGK,MAAM,CAAC,IAAI,CAACN,IAAI,CAAC;IAChC,IAAI,CAACE,GAAG,GAAGJ,IAAI,YAAYS,IAAI,GAAGT,IAAI,CAACU,IAAI,GAAG,EAAE;EAClD;EAEA,MAAMC,KAAKA,CAAA,EAAG,CAAC;EAEf,MAAMC,IAAIA,CAAA,EAAG;IACX,OAAO;MACLV,IAAI,EAAE,IAAI,CAACD,MAAM,CAACC,IAAI;MACtBC,OAAO,EAAEK,MAAM,CAAC,IAAI,CAACP,MAAM,CAACC,IAAI,CAAC;MACjCW,WAAW,EAAE;IACf,CAAC;EACH;EAEA,MAAMC,IAAIA,CAACC,KAAa,EAAEC,MAAc,EAAwB;IAC9D,MAAMC,WAAW,GAAG,MAAM,IAAI,CAAChB,MAAM,CAACiB,KAAK,CAACH,KAAK,EAAEA,KAAK,GAAGC,MAAM,CAAC,CAACC,WAAW,CAAC,CAAC;IAChF,OAAOA,WAAW;EACpB;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../../src/lib/files/file.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../../src/lib/files/file.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,IAAI,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,WAAW,YAAY;IAC3B,qEAAqE;IACrE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,4CAA4C;IAC5C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,4CAA4C;IAC5C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,wBAAwB;IACxB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAErB,gBAAgB;IAChB,IAAI,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IACrE,gBAAgB;IAChB,UAAU,CAAC,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC9F,iCAAiC;IACjC,IAAI,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,qBAAqB;IACrB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,kEAAkE;IAClE,KAAK,EAAE,CAAC,WAAW,EAAE,WAAW,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAChG,qCAAqC;IACrC,IAAI,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,qBAAqB;IACrB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file.js","names":[],"sources":["../../../src/lib/files/file.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nexport type Stat = {\n size: number;\n bigsize: bigint;\n isDirectory: boolean;\n};\n\nexport interface ReadableFile {\n /** The underlying file handle (Blob, Node.js file descriptor etc) */\n readonly handle: unknown;\n /** Length of file in bytes, if available */\n readonly size: number;\n /** Length of file in bytes, if available */\n readonly bigsize: bigint;\n /** Url, if available */\n readonly url: string;\n\n /** Read data */\n read(start?: number | bigint, length?: number): Promise<ArrayBuffer>;\n /** Read data */\n fetchRange?(offset: number | bigint, length: number, signal?: AbortSignal): Promise<Response>;\n /** Get information about file */\n stat?(): Promise<Stat>;\n /** Close the file */\n close(): Promise<void>;\n}\n\nexport interface WritableFile {\n handle: unknown;\n /** Write to file. The number of bytes written will be returned */\n write: (arrayBuffer: ArrayBuffer, offset?: number | bigint, length?: number) => Promise<number>;\n /** Get information about the file */\n stat?(): Promise<Stat>;\n /** Close the file */\n close(): Promise<void>;\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"file.js","names":[],"sources":["../../../src/lib/files/file.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\n\nexport type Stat = {\n size: number;\n bigsize: bigint;\n isDirectory: boolean;\n};\n\nexport interface ReadableFile {\n /** The underlying file handle (Blob, Node.js file descriptor etc) */\n readonly handle: unknown;\n /** Length of file in bytes, if available */\n readonly size: number;\n /** Length of file in bytes, if available */\n readonly bigsize: bigint;\n /** Url, if available */\n readonly url: string;\n\n /** Read data */\n read(start?: number | bigint, length?: number): Promise<ArrayBuffer>;\n /** Read data */\n fetchRange?(offset: number | bigint, length: number, signal?: AbortSignal): Promise<Response>;\n /** Get information about file */\n stat?(): Promise<Stat>;\n /** Close the file */\n close(): Promise<void>;\n}\n\nexport interface WritableFile {\n handle: unknown;\n /** Write to file. The number of bytes written will be returned */\n write: (arrayBuffer: ArrayBuffer, offset?: number | bigint, length?: number) => Promise<number>;\n /** Get information about the file */\n stat?(): Promise<Stat>;\n /** Close the file */\n close(): Promise<void>;\n}\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-file.d.ts","sourceRoot":"","sources":["../../../src/lib/files/http-file.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"http-file.d.ts","sourceRoot":"","sources":["../../../src/lib/files/http-file.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,YAAY,EAAE,IAAI,EAAC,MAAM,QAAQ,CAAC;AAE1C,qBAAa,QAAS,YAAW,YAAY;IAC3C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAK;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAM;IAC9B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;gBAET,GAAG,EAAE,MAAM;IAKjB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAEtB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAarB,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAMzE;;;;;;;OAOG;IAEG,UAAU,CACd,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,QAAQ,CAAC;CAsErB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-file.js","names":["HttpFile","constructor","url","handle","size","bigsize","close","stat","response","fetch","method","ok","Error","parseInt","headers","get","BigInt","isDirectory","read","offset","length","fetchRange","arrayBuffer","signal","nOffset","Number","nLength","controller","AbortController","Range","status","contentLength","abort","contentRange","startsWith","actualLength","substr"],"sources":["../../../src/lib/files/http-file.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport {ReadableFile, Stat} from './file';\n\nexport class HttpFile implements ReadableFile {\n readonly handle: string;\n readonly size: number = 0;\n readonly bigsize: bigint = 0n;\n readonly url: string;\n\n constructor(url: string) {\n this.handle = url;\n this.url = url;\n }\n\n async close(): Promise<void> {}\n\n async stat(): Promise<Stat> {\n const response = await fetch(this.handle, {method: 'HEAD'});\n if (!response.ok) {\n throw new Error(`Failed to fetch HEAD ${this.handle}`);\n }\n const size = parseInt(response.headers.get('Content-Length') || '0');\n return {\n size,\n bigsize: BigInt(size),\n isDirectory: false\n };\n }\n\n async read(offset: number | bigint, length: number): Promise<ArrayBuffer> {\n const response = await this.fetchRange(offset, length);\n const arrayBuffer = await response.arrayBuffer();\n return arrayBuffer;\n }\n\n /**\n *\n * @param offset\n * @param length\n * @param signal\n * @returns\n * @see https://github.com/protomaps/PMTiles\n */\n // eslint-disable-next-line complexity\n async fetchRange(\n offset: number | bigint,\n length: number,\n signal?: AbortSignal\n ): Promise<Response> {\n const nOffset = Number(offset);\n const nLength = Number(length);\n\n let controller: AbortController | undefined;\n if (!signal) {\n // ToDO why is it so important to abort in case 200?\n // TODO check this works or assert 206\n controller = new AbortController();\n signal = controller.signal;\n }\n\n const url = this.handle;\n let response = await fetch(url, {\n signal,\n headers: {Range: `bytes=${nOffset}-${nOffset + nLength - 1}`}\n });\n\n switch (response.status) {\n case 206: // Partial Content success\n // This is the expected success code for a range request\n break;\n\n case 200:\n // some well-behaved backends, e.g. DigitalOcean CDN, respond with 200 instead of 206\n // but we also need to detect no support for Byte Serving which is returning the whole file\n const contentLength = response.headers.get('Content-Length');\n if (!contentLength || Number(contentLength) > length) {\n if (controller) {\n controller.abort();\n }\n throw Error(\n 'content-length header missing or exceeding request. Server must support HTTP Byte Serving.'\n );\n }\n\n // @eslint-disable-next-line no-fallthrough\n case 416: // \"Range Not Satisfiable\"\n // some HTTP servers don't accept ranges beyond the end of the resource.\n // Retry with the exact length\n // TODO: can return 416 with offset > 0 if content changed, which will have a blank etag.\n // See https://github.com/protomaps/PMTiles/issues/90\n if (offset === 0) {\n const contentRange = response.headers.get('Content-Range');\n if (!contentRange || !contentRange.startsWith('bytes *')) {\n throw Error('Missing content-length on 416 response');\n }\n const actualLength = Number(contentRange.substr(8));\n response = await fetch(this.url, {\n signal,\n headers: {Range: `bytes=0-${actualLength - 1}`}\n });\n }\n break;\n\n default:\n if (response.status >= 300) {\n throw Error(`Bad response code: ${response.status}`);\n }\n }\n\n return response;\n // const data = await response.arrayBuffer();\n // return {\n // data,\n // etag: response.headers.get('ETag') || undefined,\n // cacheControl: response.headers.get('Cache-Control') || undefined,\n // expires: response.headers.get('Expires') || undefined\n // };\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"http-file.js","names":["HttpFile","constructor","url","handle","size","bigsize","close","stat","response","fetch","method","ok","Error","parseInt","headers","get","BigInt","isDirectory","read","offset","length","fetchRange","arrayBuffer","signal","nOffset","Number","nLength","controller","AbortController","Range","status","contentLength","abort","contentRange","startsWith","actualLength","substr"],"sources":["../../../src/lib/files/http-file.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\n\nimport {ReadableFile, Stat} from './file';\n\nexport class HttpFile implements ReadableFile {\n readonly handle: string;\n readonly size: number = 0;\n readonly bigsize: bigint = 0n;\n readonly url: string;\n\n constructor(url: string) {\n this.handle = url;\n this.url = url;\n }\n\n async close(): Promise<void> {}\n\n async stat(): Promise<Stat> {\n const response = await fetch(this.handle, {method: 'HEAD'});\n if (!response.ok) {\n throw new Error(`Failed to fetch HEAD ${this.handle}`);\n }\n const size = parseInt(response.headers.get('Content-Length') || '0');\n return {\n size,\n bigsize: BigInt(size),\n isDirectory: false\n };\n }\n\n async read(offset: number | bigint, length: number): Promise<ArrayBuffer> {\n const response = await this.fetchRange(offset, length);\n const arrayBuffer = await response.arrayBuffer();\n return arrayBuffer;\n }\n\n /**\n *\n * @param offset\n * @param length\n * @param signal\n * @returns\n * @see https://github.com/protomaps/PMTiles\n */\n // eslint-disable-next-line complexity\n async fetchRange(\n offset: number | bigint,\n length: number,\n signal?: AbortSignal\n ): Promise<Response> {\n const nOffset = Number(offset);\n const nLength = Number(length);\n\n let controller: AbortController | undefined;\n if (!signal) {\n // ToDO why is it so important to abort in case 200?\n // TODO check this works or assert 206\n controller = new AbortController();\n signal = controller.signal;\n }\n\n const url = this.handle;\n let response = await fetch(url, {\n signal,\n headers: {Range: `bytes=${nOffset}-${nOffset + nLength - 1}`}\n });\n\n switch (response.status) {\n case 206: // Partial Content success\n // This is the expected success code for a range request\n break;\n\n case 200:\n // some well-behaved backends, e.g. DigitalOcean CDN, respond with 200 instead of 206\n // but we also need to detect no support for Byte Serving which is returning the whole file\n const contentLength = response.headers.get('Content-Length');\n if (!contentLength || Number(contentLength) > length) {\n if (controller) {\n controller.abort();\n }\n throw Error(\n 'content-length header missing or exceeding request. Server must support HTTP Byte Serving.'\n );\n }\n\n // @eslint-disable-next-line no-fallthrough\n case 416: // \"Range Not Satisfiable\"\n // some HTTP servers don't accept ranges beyond the end of the resource.\n // Retry with the exact length\n // TODO: can return 416 with offset > 0 if content changed, which will have a blank etag.\n // See https://github.com/protomaps/PMTiles/issues/90\n if (offset === 0) {\n const contentRange = response.headers.get('Content-Range');\n if (!contentRange || !contentRange.startsWith('bytes *')) {\n throw Error('Missing content-length on 416 response');\n }\n const actualLength = Number(contentRange.substr(8));\n response = await fetch(this.url, {\n signal,\n headers: {Range: `bytes=0-${actualLength - 1}`}\n });\n }\n break;\n\n default:\n if (response.status >= 300) {\n throw Error(`Bad response code: ${response.status}`);\n }\n }\n\n return response;\n // const data = await response.arrayBuffer();\n // return {\n // data,\n // etag: response.headers.get('ETag') || undefined,\n // cacheControl: response.headers.get('Cache-Control') || undefined,\n // expires: response.headers.get('Expires') || undefined\n // };\n }\n}\n"],"mappings":"AAKA,OAAO,MAAMA,QAAQ,CAAyB;EAM5CC,WAAWA,CAACC,GAAW,EAAE;IAAA,KALhBC,MAAM;IAAA,KACNC,IAAI,GAAW,CAAC;IAAA,KAChBC,OAAO,GAAW,EAAE;IAAA,KACpBH,GAAG;IAGV,IAAI,CAACC,MAAM,GAAGD,GAAG;IACjB,IAAI,CAACA,GAAG,GAAGA,GAAG;EAChB;EAEA,MAAMI,KAAKA,CAAA,EAAkB,CAAC;EAE9B,MAAMC,IAAIA,CAAA,EAAkB;IAC1B,MAAMC,QAAQ,GAAG,MAAMC,KAAK,CAAC,IAAI,CAACN,MAAM,EAAE;MAACO,MAAM,EAAE;IAAM,CAAC,CAAC;IAC3D,IAAI,CAACF,QAAQ,CAACG,EAAE,EAAE;MAChB,MAAM,IAAIC,KAAK,CAAE,wBAAuB,IAAI,CAACT,MAAO,EAAC,CAAC;IACxD;IACA,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AE;YACdA,UAAU,CAACK,KAAK,CAAC,CAAC;UACpB;UACA,MAAMpB,KAAK,CACT,4FACF,CAAC;QACH;MAGF,KAAK,GAAG;QAKN,IAAIO,MAAM,KAAK,CAAC,EAAE;UAChB,MAAMc,YAAY,GAAGzB,QAAQ,CAACM,OAAO,CAACC,GAAG,CAAC,eAAe,CAAC;UAC1D,IAAI,CAACkB,YAAY,IAAI,CAACA,YAAY,CAACC,UAAU,CAAC,SAAS,CAAC,EAAE;YACxD,MAAMtB,KAAK,CAAC,wCAAwC,CAAC;UACvD;UACA,MAAMuB,YAAY,GAAGV,MAAM,CAACQ,YAAY,CAACG,MAAM,CAAC,CAAC,CAAC,CAAC;UACnD5B,QAAQ,GAAG,MAAMC,KAAK,CAAC,IAAI,CAACP,GAAG,EAAE;YAC/BqB,MAAM;YACNT,OAAO,EAAE;cAACe,KAAK,EAAG,WAAUM,YAAY,GAAG,CAAE;YAAC;UAChD,CAAC,CAAC;QACJ;QACA;MAEF;QACE,IAAI3B,QAAQ,CAACsB,MAAM,IAAI,GAAG,EAAE;UAC1B,MAAMlB,KAAK,CAAE,sBAAqBJ,QAAQ,CAACsB,MAAO,EAAC,CAAC;QACtD;IACJ;IAEA,OAAOtB,QAAQ;EAQjB;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-file-facade.d.ts","sourceRoot":"","sources":["../../../src/lib/files/node-file-facade.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"node-file-facade.d.ts","sourceRoot":"","sources":["../../../src/lib/files/node-file-facade.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,YAAY,EAAE,YAAY,EAAE,IAAI,EAAC,MAAM,QAAQ,CAAC;AAIxD,kFAAkF;AAClF,qBAAa,cAAe,YAAW,YAAY,EAAE,YAAY;IAC/D,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,MAAM,CAAK;IACjB,OAAO,EAAE,MAAM,CAAM;IACrB,GAAG,EAAE,MAAM,CAAM;gBAEL,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI,EAAE,IAAI,CAAC,EAAE,MAAM;IAUhE,gBAAgB;IACV,IAAI,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAGhF,kEAAkE;IAC5D,KAAK,CAAC,WAAW,EAAE,WAAW,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAG1G,iCAAiC;IAC3B,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAG3B,qBAAqB;IACf,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAC7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-file-facade.js","names":["isBrowser","NOT_IMPLEMENTED","Error","NodeFileFacade","constructor","url","flags","mode","_globalThis$loaders","handle","size","bigsize","globalThis","loaders","NodeFile","read","start","end","write","arrayBuffer","offset","length","stat","close"],"sources":["../../../src/lib/files/node-file-facade.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport {isBrowser} from '../env-utils/globals';\nimport {ReadableFile, WritableFile, Stat} from './file';\n\nconst NOT_IMPLEMENTED = new Error('Not implemented');\n\n/** This class is a facade that gets replaced with an actual NodeFile instance */\nexport class NodeFileFacade implements ReadableFile, WritableFile {\n handle: unknown;\n size: number = 0;\n bigsize: bigint = 0n;\n url: string = '';\n\n constructor(url: string, flags?: 'r' | 'w' | 'wx', mode?: number) {\n // Return the actual implementation instance\n if (globalThis.loaders?.NodeFile) {\n return new globalThis.loaders.NodeFile(url, flags, mode);\n }\n if (isBrowser) {\n throw new Error('Can\\'t instantiate NodeFile in browser.');\n }\n throw new Error('Can\\'t instantiate NodeFile. Make sure to import @loaders.gl/polyfills first.');\n }\n /** Read data */\n async read(start?: number | bigint, end?: number | bigint): Promise<ArrayBuffer> {\n throw NOT_IMPLEMENTED;\n }\n /** Write to file. The number of bytes written will be returned */\n async write(arrayBuffer: ArrayBuffer, offset?: number | bigint, length?: number | bigint): Promise<number> {\n throw NOT_IMPLEMENTED;\n }\n /** Get information about file */\n async stat(): Promise<Stat> {\n throw NOT_IMPLEMENTED;\n }\n /** Close the file */\n async close(): Promise<void> {}\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"node-file-facade.js","names":["isBrowser","NOT_IMPLEMENTED","Error","NodeFileFacade","constructor","url","flags","mode","_globalThis$loaders","handle","size","bigsize","globalThis","loaders","NodeFile","read","start","end","write","arrayBuffer","offset","length","stat","close"],"sources":["../../../src/lib/files/node-file-facade.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\n\nimport {isBrowser} from '../env-utils/globals';\nimport {ReadableFile, WritableFile, Stat} from './file';\n\nconst NOT_IMPLEMENTED = new Error('Not implemented');\n\n/** This class is a facade that gets replaced with an actual NodeFile instance */\nexport class NodeFileFacade implements ReadableFile, WritableFile {\n handle: unknown;\n size: number = 0;\n bigsize: bigint = 0n;\n url: string = '';\n\n constructor(url: string, flags?: 'r' | 'w' | 'wx', mode?: number) {\n // Return the actual implementation instance\n if (globalThis.loaders?.NodeFile) {\n return new globalThis.loaders.NodeFile(url, flags, mode);\n }\n if (isBrowser) {\n throw new Error('Can\\'t instantiate NodeFile in browser.');\n }\n throw new Error('Can\\'t instantiate NodeFile. Make sure to import @loaders.gl/polyfills first.');\n }\n /** Read data */\n async read(start?: number | bigint, end?: number | bigint): Promise<ArrayBuffer> {\n throw NOT_IMPLEMENTED;\n }\n /** Write to file. The number of bytes written will be returned */\n async write(arrayBuffer: ArrayBuffer, offset?: number | bigint, length?: number | bigint): Promise<number> {\n throw NOT_IMPLEMENTED;\n }\n /** Get information about file */\n async stat(): Promise<Stat> {\n throw NOT_IMPLEMENTED;\n }\n /** Close the file */\n async close(): Promise<void> {}\n}\n"],"mappings":"SAGQA,SAAS;AAGjB,MAAMC,eAAe,GAAG,IAAIC,KAAK,CAAC,iBAAiB,CAAC;AAGpD,OAAO,MAAMC,cAAc,CAAuC;EAMhEC,WAAWA,CAACC,GAAW,EAAEC,KAAwB,EAAEC,IAAa,EAAE;IAAA,IAAAC,mBAAA;IAAA,KALlEC,MAAM;IAAA,KACNC,IAAI,GAAW,CAAC;IAAA,KAChBC,OAAO,GAAW,EAAE;IAAA,KACpBN,GAAG,GAAW,EAAE;IAId,KAAAG,mBAAA,GAAII,UAAU,CAACC,OAAO,cAAAL,mBAAA,eAAlBA,mBAAA,CAAoBM,QAAQ,EAAE;MAChC,OAAO,IAAIF,UAAU,CAACC,OAAO,CAACC,QAAQ,CAACT,GAAG,EAAEC,KAAK,EAAEC,IAAI,CAAC;IAC1D;IACA,IAAIP,SAAS,EAAE;MACb,MAAM,IAAIE,KAAK,CAAC,yCAAyC,CAAC;IAC5D;IACA,MAAM,IAAIA,KAAK,CAAC,+EAA+E,CAAC;EAClG;EAEA,MAAMa,IAAIA,CAACC,KAAuB,EAAEC,GAAqB,EAAwB;IAC/E,MAAMhB,eAAe;EACvB;EAEA,MAAMiB,KAAKA,CAACC,WAAwB,EAAEC,MAAwB,EAAEC,MAAwB,EAAmB;IACzG,MAAMpB,eAAe;EACvB;EAEA,MAAMqB,IAAIA,CAAA,EAAkB;IAC1B,MAAMrB,eAAe;EACvB;EAEA,MAAMsB,KAAKA,CAAA,EAAkB,CAAC;AAChC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filesystem.d.ts","sourceRoot":"","sources":["../../../src/lib/filesystems/filesystem.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"filesystem.d.ts","sourceRoot":"","sources":["../../../src/lib/filesystems/filesystem.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,YAAY,EAAE,YAAY,EAAC,MAAM,eAAe,CAAC;AAEzD;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,mDAAmD;IACnD,OAAO,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAC,SAAS,CAAC,EAAE,OAAO,CAAA;KAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAE9E,6DAA6D;IAC7D,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,CAAC,CAAC;IAElE,0CAA0C;IAC1C,MAAM,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAErC,yEAAyE;IACzE,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;CAC/D;AAED;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,UAAU;IACxD,8BAA8B;IAC9B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAE3B,8BAA8B;IAC9B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAE3B,2BAA2B;IAC3B,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAEnE,2BAA2B;IAC3B,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,GAAG,GAAG,IAAI,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;CAC1F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filesystem.js","names":[],"sources":["../../../src/lib/filesystems/filesystem.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport {ReadableFile, WritableFile} from '../files/file';\n\n/**\n * A FileSystem interface can encapsulate various file sources,\n * a FileList, a Node.js filesystem, a ZipFile, a GoogleDrive etc.\n */\nexport interface FileSystem {\n /** Return a list of file names in a \"directory\" */\n readdir(dirname?: string, options?: {recursive?: boolean}): Promise<string[]>;\n\n /** Gets information from a local file from the filesystem */\n stat(filename: string, options?: object): Promise<{size: number}>;\n\n /** Removes a file from the file system */\n unlink?(path: string): Promise<void>;\n\n /** Fetches the full contents of a file from the filesystem (or a URL) */\n fetch(path: string, options?: RequestInit): Promise<Response>;\n}\n\n/**\n * A random access file system, open readable and/or writable files\n */\nexport interface RandomAccessFileSystem extends FileSystem {\n /** Can open readable files */\n readonly readable: boolean;\n\n /** Can open writable files */\n readonly writable: boolean;\n\n /** Open a readable file */\n openReadableFile(path: string, flags?: 'r'): Promise<ReadableFile>;\n\n /** Open a writable file */\n openWritableFile(path: string, flags?: 'w' | 'wx', mode?: number): Promise<WritableFile>;\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"filesystem.js","names":[],"sources":["../../../src/lib/filesystems/filesystem.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\n\nimport {ReadableFile, WritableFile} from '../files/file';\n\n/**\n * A FileSystem interface can encapsulate various file sources,\n * a FileList, a Node.js filesystem, a ZipFile, a GoogleDrive etc.\n */\nexport interface FileSystem {\n /** Return a list of file names in a \"directory\" */\n readdir(dirname?: string, options?: {recursive?: boolean}): Promise<string[]>;\n\n /** Gets information from a local file from the filesystem */\n stat(filename: string, options?: object): Promise<{size: number}>;\n\n /** Removes a file from the file system */\n unlink?(path: string): Promise<void>;\n\n /** Fetches the full contents of a file from the filesystem (or a URL) */\n fetch(path: string, options?: RequestInit): Promise<Response>;\n}\n\n/**\n * A random access file system, open readable and/or writable files\n */\nexport interface RandomAccessFileSystem extends FileSystem {\n /** Can open readable files */\n readonly readable: boolean;\n\n /** Can open writable files */\n readonly writable: boolean;\n\n /** Open a readable file */\n openReadableFile(path: string, flags?: 'r'): Promise<ReadableFile>;\n\n /** Open a writable file */\n openWritableFile(path: string, flags?: 'w' | 'wx', mode?: number): Promise<WritableFile>;\n}\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-filesystem-facade.d.ts","sourceRoot":"","sources":["../../../src/lib/filesystems/node-filesystem-facade.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"node-filesystem-facade.d.ts","sourceRoot":"","sources":["../../../src/lib/filesystems/node-filesystem-facade.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,IAAI,EAAC,MAAM,eAAe,CAAC;AACnC,OAAO,EAAC,cAAc,IAAI,QAAQ,EAAC,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAC,sBAAsB,EAAC,MAAM,cAAc,CAAC;AAIpD;;;;;GAKG;AACH,qBAAa,oBAAqB,YAAW,sBAAsB;gBAErD,OAAO,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAC;IAgBzC,QAAQ,CAAC,QAAQ,QAAQ;IACzB,QAAQ,CAAC,QAAQ,QAAQ;IAEnB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,KAAA,GAAG,OAAO,CAAC,QAAQ,CAAC;IAKxD,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,KAAA,EAAE,IAAI,KAAA,GAAG,OAAO,CAAC,QAAQ,CAAC;IAM9D,OAAO,CAAC,OAAO,SAAM,EAAE,OAAO,CAAC,EAAE,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAIvD,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAI/C,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAInC,KAAK,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC;CAGzE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-filesystem-facade.js","names":["isBrowser","NOT_IMPLEMENTED","Error","NodeFileSystemFacade","constructor","options","_globalThis$loaders","readable","writable","globalThis","loaders","NodeFileSystem","openReadableFile","path","flags","openWritableFile","mode","readdir","dirname","arguments","length","undefined","stat","unlink","fetch"],"sources":["../../../src/lib/filesystems/node-filesystem-facade.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport {isBrowser} from '../env-utils/globals';\nimport {Stat} from '../files/file';\nimport {NodeFileFacade as NodeFile} from '../files/node-file-facade';\nimport {RandomAccessFileSystem} from './filesystem';\n\nconst NOT_IMPLEMENTED = new Error('Not implemented');\n\n/**\n * FileSystem pass-through for Node.js\n * Compatible with BrowserFileSystem.\n * @note Dummy implementation, not used (constructor returns a real NodeFileSystem instance)\n * @param options\n */\nexport class NodeFileSystemFacade implements RandomAccessFileSystem {\n // implements FileSystem\n constructor(options: {[key: string]: any}) {\n if (globalThis.loaders?.NodeFileSystem) {\n return new globalThis.loaders.NodeFileSystem(options);\n }\n if (isBrowser) {\n throw new Error('Can\\'t instantiate NodeFileSystem in browser.');\n }\n throw new Error(\n 'Can\\'t instantiate NodeFileSystem. Make sure to import @loaders.gl/polyfills first.'\n );\n }\n\n // DUMMY IMPLEMENTATION, not used (constructor returns a real NodeFileSystem instance)\n\n // implements RandomAccessReadFileSystem\n\n readonly readable = true;\n readonly writable = true;\n\n async openReadableFile(path: string, flags): Promise<NodeFile> {\n throw NOT_IMPLEMENTED;\n }\n\n // implements RandomAccessWriteFileSystem\n async openWritableFile(path: string, flags, mode): Promise<NodeFile> {\n throw NOT_IMPLEMENTED;\n }\n\n // Implements file system\n\n async readdir(dirname = '.', options?: {}): Promise<string[]> {\n throw NOT_IMPLEMENTED;\n }\n\n async stat(path: string, options?: {}): Promise<Stat> {\n throw NOT_IMPLEMENTED;\n }\n\n async unlink(path: string): Promise<void> {\n throw NOT_IMPLEMENTED;\n }\n\n async fetch(path: RequestInfo, options?: RequestInit): Promise<Response> {\n throw NOT_IMPLEMENTED;\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"node-filesystem-facade.js","names":["isBrowser","NOT_IMPLEMENTED","Error","NodeFileSystemFacade","constructor","options","_globalThis$loaders","readable","writable","globalThis","loaders","NodeFileSystem","openReadableFile","path","flags","openWritableFile","mode","readdir","dirname","arguments","length","undefined","stat","unlink","fetch"],"sources":["../../../src/lib/filesystems/node-filesystem-facade.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\n\nimport {isBrowser} from '../env-utils/globals';\nimport {Stat} from '../files/file';\nimport {NodeFileFacade as NodeFile} from '../files/node-file-facade';\nimport {RandomAccessFileSystem} from './filesystem';\n\nconst NOT_IMPLEMENTED = new Error('Not implemented');\n\n/**\n * FileSystem pass-through for Node.js\n * Compatible with BrowserFileSystem.\n * @note Dummy implementation, not used (constructor returns a real NodeFileSystem instance)\n * @param options\n */\nexport class NodeFileSystemFacade implements RandomAccessFileSystem {\n // implements FileSystem\n constructor(options: {[key: string]: any}) {\n if (globalThis.loaders?.NodeFileSystem) {\n return new globalThis.loaders.NodeFileSystem(options);\n }\n if (isBrowser) {\n throw new Error('Can\\'t instantiate NodeFileSystem in browser.');\n }\n throw new Error(\n 'Can\\'t instantiate NodeFileSystem. Make sure to import @loaders.gl/polyfills first.'\n );\n }\n\n // DUMMY IMPLEMENTATION, not used (constructor returns a real NodeFileSystem instance)\n\n // implements RandomAccessReadFileSystem\n\n readonly readable = true;\n readonly writable = true;\n\n async openReadableFile(path: string, flags): Promise<NodeFile> {\n throw NOT_IMPLEMENTED;\n }\n\n // implements RandomAccessWriteFileSystem\n async openWritableFile(path: string, flags, mode): Promise<NodeFile> {\n throw NOT_IMPLEMENTED;\n }\n\n // Implements file system\n\n async readdir(dirname = '.', options?: {}): Promise<string[]> {\n throw NOT_IMPLEMENTED;\n }\n\n async stat(path: string, options?: {}): Promise<Stat> {\n throw NOT_IMPLEMENTED;\n }\n\n async unlink(path: string): Promise<void> {\n throw NOT_IMPLEMENTED;\n }\n\n async fetch(path: RequestInfo, options?: RequestInit): Promise<Response> {\n throw NOT_IMPLEMENTED;\n }\n}\n"],"mappings":"SAGQA,SAAS;AAKjB,MAAMC,eAAe,GAAG,IAAIC,KAAK,CAAC,iBAAiB,CAAC;AAQpD,OAAO,MAAMC,oBAAoB,CAAmC;EAElEC,WAAWA,CAACC,OAA6B,EAAE;IAAA,IAAAC,mBAAA;IAAA,KAgBlCC,QAAQ,GAAG,IAAI;IAAA,KACfC,QAAQ,GAAG,IAAI;IAhBtB,KAAAF,mBAAA,GAAIG,UAAU,CAACC,OAAO,cAAAJ,mBAAA,eAAlBA,mBAAA,CAAoBK,cAAc,EAAE;MACtC,OAAO,IAAIF,UAAU,CAACC,OAAO,CAACC,cAAc,CAACN,OAAO,CAAC;IACvD;IACA,IAAIL,SAAS,EAAE;MACb,MAAM,IAAIE,KAAK,CAAC,+CAA+C,CAAC;IAClE;IACA,MAAM,IAAIA,KAAK,CACb,qFACF,CAAC;EACH;EASA,MAAMU,gBAAgBA,CAACC,IAAY,EAAEC,KAAK,EAAqB;IAC7D,MAAMb,eAAe;EACvB;EAGA,MAAMc,gBAAgBA,CAACF,IAAY,EAAEC,KAAK,EAAEE,IAAI,EAAqB;IACnE,MAAMf,eAAe;EACvB;EAIA,MAAMgB,OAAOA,CAAA,EAAiD;IAAA,IAAhDC,OAAO,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,GAAG;IAAA,IAAEd,OAAY,GAAAc,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;IACvC,MAAMpB,eAAe;EACvB;EAEA,MAAMqB,IAAIA,CAACT,IAAY,EAAER,OAAY,EAAiB;IACpD,MAAMJ,eAAe;EACvB;EAEA,MAAMsB,MAAMA,CAACV,IAAY,EAAiB;IACxC,MAAMZ,eAAe;EACvB;EAEA,MAAMuB,KAAKA,CAACX,IAAiB,EAAER,OAAqB,EAAqB;IACvE,MAAMJ,eAAe;EACvB;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buffer.browser.d.ts","sourceRoot":"","sources":["../../../src/lib/node/buffer.browser.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"buffer.browser.d.ts","sourceRoot":"","sources":["../../../src/lib/node/buffer.browser.ts"],"names":[],"mappings":";AAMA;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,KAAA,OAEnC;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,UAAU,EAAE,WAAW,GAAG,MAAM,GAAG,MAAM,CAEjE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buffer.browser.js","names":["toArrayBuffer","buffer","toBuffer","binaryData","Error"],"sources":["../../../src/lib/node/buffer.browser.ts"],"sourcesContent":["// loaders.gl, MIT license\n\n// Isolates Buffer references to ensure they are only bundled under Node.js (avoids big webpack polyfill)\n// this file is selected by the package.json \"browser\" field).\n\n/**\n * Convert Buffer to ArrayBuffer\n * Converts Node.js `Buffer` to `ArrayBuffer` (without triggering bundler to include Buffer polyfill on browser)\n * @todo better data type\n */\nexport function toArrayBuffer(buffer) {\n return buffer;\n}\n\n/**\n * Convert (copy) ArrayBuffer to Buffer\n */\nexport function toBuffer(binaryData: ArrayBuffer | Buffer): Buffer {\n throw new Error('Buffer not supported in browser');\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"buffer.browser.js","names":["toArrayBuffer","buffer","toBuffer","binaryData","Error"],"sources":["../../../src/lib/node/buffer.browser.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\n\n// Isolates Buffer references to ensure they are only bundled under Node.js (avoids big webpack polyfill)\n// this file is selected by the package.json \"browser\" field).\n\n/**\n * Convert Buffer to ArrayBuffer\n * Converts Node.js `Buffer` to `ArrayBuffer` (without triggering bundler to include Buffer polyfill on browser)\n * @todo better data type\n */\nexport function toArrayBuffer(buffer) {\n return buffer;\n}\n\n/**\n * Convert (copy) ArrayBuffer to Buffer\n */\nexport function toBuffer(binaryData: ArrayBuffer | Buffer): Buffer {\n throw new Error('Buffer not supported in browser');\n}\n"],"mappings":"AAWA,OAAO,SAASA,aAAaA,CAACC,MAAM,EAAE;EACpC,OAAOA,MAAM;AACf;AAKA,OAAO,SAASC,QAAQA,CAACC,UAAgC,EAAU;EACjE,MAAM,IAAIC,KAAK,CAAC,iCAAiC,CAAC;AACpD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buffer.d.ts","sourceRoot":"","sources":["../../../src/lib/node/buffer.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"buffer.d.ts","sourceRoot":"","sources":["../../../src/lib/node/buffer.ts"],"names":[],"mappings":";AAMA;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,KAAA,OAOnC;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,UAAU,EAAE,WAAW,GAAG,MAAM,GAAG,MAAM,CAcjE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buffer.js","names":["toArrayBuffer","buffer","Buffer","isBuffer","typedArray","Uint8Array","byteOffset","length","slice","toBuffer","binaryData","ArrayBuffer","isView","from","Error"],"sources":["../../../src/lib/node/buffer.ts"],"sourcesContent":["// loaders.gl, MIT license\n\n// Isolates Buffer references to ensure they are only bundled under Node.js (avoids big webpack polyfill)\n// this file is selected by the package.json \"browser\" field).\n\n/**\n * Convert Buffer to ArrayBuffer\n * Converts Node.js `Buffer` to `ArrayBuffer` (without triggering bundler to include Buffer polyfill on browser)\n * @todo better data type\n */\nexport function toArrayBuffer(buffer) {\n // TODO - per docs we should just be able to call buffer.buffer, but there are issues\n if (Buffer.isBuffer(buffer)) {\n const typedArray = new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.length);\n return typedArray.slice().buffer;\n }\n return buffer;\n}\n\n/**\n * Convert (copy) ArrayBuffer to Buffer\n */\nexport function toBuffer(binaryData: ArrayBuffer | Buffer): Buffer {\n if (Buffer.isBuffer(binaryData)) {\n return binaryData;\n }\n\n if (ArrayBuffer.isView(binaryData)) {\n binaryData = binaryData.buffer;\n }\n\n if (typeof Buffer !== 'undefined' && binaryData instanceof ArrayBuffer) {\n return Buffer.from(binaryData);\n }\n\n throw new Error('toBuffer');\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"buffer.js","names":["toArrayBuffer","buffer","Buffer","isBuffer","typedArray","Uint8Array","byteOffset","length","slice","toBuffer","binaryData","ArrayBuffer","isView","from","Error"],"sources":["../../../src/lib/node/buffer.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\n\n// Isolates Buffer references to ensure they are only bundled under Node.js (avoids big webpack polyfill)\n// this file is selected by the package.json \"browser\" field).\n\n/**\n * Convert Buffer to ArrayBuffer\n * Converts Node.js `Buffer` to `ArrayBuffer` (without triggering bundler to include Buffer polyfill on browser)\n * @todo better data type\n */\nexport function toArrayBuffer(buffer) {\n // TODO - per docs we should just be able to call buffer.buffer, but there are issues\n if (Buffer.isBuffer(buffer)) {\n const typedArray = new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.length);\n return typedArray.slice().buffer;\n }\n return buffer;\n}\n\n/**\n * Convert (copy) ArrayBuffer to Buffer\n */\nexport function toBuffer(binaryData: ArrayBuffer | Buffer): Buffer {\n if (Buffer.isBuffer(binaryData)) {\n return binaryData;\n }\n\n if (ArrayBuffer.isView(binaryData)) {\n binaryData = binaryData.buffer;\n }\n\n if (typeof Buffer !== 'undefined' && binaryData instanceof ArrayBuffer) {\n return Buffer.from(binaryData);\n }\n\n throw new Error('toBuffer');\n}\n"],"mappings":"AAWA,OAAO,SAASA,aAAaA,CAACC,MAAM,EAAE;EAEpC,IAAIC,MAAM,CAACC,QAAQ,CAACF,MAAM,CAAC,EAAE;IAC3B,MAAMG,UAAU,GAAG,IAAIC,UAAU,CAACJ,MAAM,CAACA,MAAM,EAAEA,MAAM,CAACK,UAAU,EAAEL,MAAM,CAACM,MAAM,CAAC;IAClF,OAAOH,UAAU,CAACI,KAAK,CAAC,CAAC,CAACP,MAAM;EAClC;EACA,OAAOA,MAAM;AACf;AAKA,OAAO,SAASQ,QAAQA,CAACC,UAAgC,EAAU;EACjE,IAAIR,MAAM,CAACC,QAAQ,CAACO,UAAU,CAAC,EAAE;IAC/B,OAAOA,UAAU;EACnB;EAEA,IAAIC,WAAW,CAACC,MAAM,CAACF,UAAU,CAAC,EAAE;IAClCA,UAAU,GAAGA,UAAU,CAACT,MAAM;EAChC;EAEA,IAAI,OAAOC,MAAM,KAAK,WAAW,IAAIQ,UAAU,YAAYC,WAAW,EAAE;IACtE,OAAOT,MAAM,CAACW,IAAI,CAACH,UAAU,CAAC;EAChC;EAEA,MAAM,IAAII,KAAK,CAAC,UAAU,CAAC;AAC7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../../../src/lib/node/stream.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../../../src/lib/node/stream.ts"],"names":[],"mappings":";AAGA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,YAAY,EAAC,QAAQ,EAAC,MAAM,QAAQ,CAAC;AAErC,wCAAwC;AACxC,eAAO,MAAM,SAAS,yBAAmB,CAAC;AAE1C,eAAO,MAAM,WAAW,SAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stream.js","names":["stream","Transform","isSupported","Boolean"],"sources":["../../../src/lib/node/stream.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport * as stream from 'stream';\n\nexport type {Writable} from 'stream';\n\n/** Wrapper for Node.js stream method */\nexport const Transform = stream.Transform;\n\nexport const isSupported = Boolean(stream);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"stream.js","names":["stream","Transform","isSupported","Boolean"],"sources":["../../../src/lib/node/stream.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\n\nimport * as stream from 'stream';\n\nexport type {Writable} from 'stream';\n\n/** Wrapper for Node.js stream method */\nexport const Transform = stream.Transform;\n\nexport const isSupported = Boolean(stream);\n"],"mappings":"AAGA,OAAO,KAAKA,MAAM,MAAM,QAAQ;AAKhC,OAAO,MAAMC,SAAS,GAAGD,MAAM,CAACC,SAAS;AAEzC,OAAO,MAAMC,WAAW,GAAGC,OAAO,CAACH,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merge-loader-options.d.ts","sourceRoot":"","sources":["../../../src/lib/option-utils/merge-loader-options.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"merge-loader-options.d.ts","sourceRoot":"","sources":["../../../src/lib/option-utils/merge-loader-options.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,aAAa,EAAC,MAAM,oBAAoB,CAAC;AAEjD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,SAAS,aAAa,EAC9D,WAAW,EAAE,OAAO,GAAG,SAAS,EAChC,UAAU,EAAE,OAAO,GAClB,OAAO,CAET"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merge-loader-options.js","names":["mergeLoaderOptions","baseOptions","newOptions","mergeOptionsRecursively","options","key","newValue","Object","entries","Array","isArray"],"sources":["../../../src/lib/option-utils/merge-loader-options.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport {LoaderOptions} from '../../loader-types';\n\n/**\n *\n * @param baseOptions Can be undefined, in which case a fresh options object will be minted\n * @param newOptions\n * @returns\n */\nexport function mergeLoaderOptions<Options extends LoaderOptions>(\n baseOptions: Options | undefined,\n newOptions: Options\n): Options {\n return mergeOptionsRecursively(baseOptions || {}, newOptions) as Options;\n}\n\nfunction mergeOptionsRecursively(\n baseOptions: Record<string, unknown>,\n newOptions: Record<string, unknown>\n): Record<string, unknown> {\n const options = {...baseOptions};\n for (const [key, newValue] of Object.entries(newOptions)) {\n if (newValue && typeof newValue === 'object' && !Array.isArray(newValue)) {\n options[key] = mergeOptionsRecursively(\n (options[key] as Record<string, unknown>) || {},\n newOptions[key] as Record<string, unknown>\n );\n // Object.assign(options[key] as object, newOptions[key]);\n } else {\n options[key] = newOptions[key];\n }\n }\n return options as Record<string, unknown>;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"merge-loader-options.js","names":["mergeLoaderOptions","baseOptions","newOptions","mergeOptionsRecursively","options","key","newValue","Object","entries","Array","isArray"],"sources":["../../../src/lib/option-utils/merge-loader-options.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\n\nimport {LoaderOptions} from '../../loader-types';\n\n/**\n *\n * @param baseOptions Can be undefined, in which case a fresh options object will be minted\n * @param newOptions\n * @returns\n */\nexport function mergeLoaderOptions<Options extends LoaderOptions>(\n baseOptions: Options | undefined,\n newOptions: Options\n): Options {\n return mergeOptionsRecursively(baseOptions || {}, newOptions) as Options;\n}\n\nfunction mergeOptionsRecursively(\n baseOptions: Record<string, unknown>,\n newOptions: Record<string, unknown>\n): Record<string, unknown> {\n const options = {...baseOptions};\n for (const [key, newValue] of Object.entries(newOptions)) {\n if (newValue && typeof newValue === 'object' && !Array.isArray(newValue)) {\n options[key] = mergeOptionsRecursively(\n (options[key] as Record<string, unknown>) || {},\n newOptions[key] as Record<string, unknown>\n );\n // Object.assign(options[key] as object, newOptions[key]);\n } else {\n options[key] = newOptions[key];\n }\n }\n return options as Record<string, unknown>;\n}\n"],"mappings":"AAWA,OAAO,SAASA,kBAAkBA,CAChCC,WAAgC,EAChCC,UAAmB,EACV;EACT,OAAOC,uBAAuB,CAACF,WAAW,IAAI,CAAC,CAAC,EAAEC,UAAU,CAAC;AAC/D;AAEA,SAASC,uBAAuBA,CAC9BF,WAAoC,EACpCC,UAAmC,EACV;EACzB,MAAME,OAAO,GAAG;IAAC,GAAGH;EAAW,CAAC;EAChC,KAAK,MAAM,CAACI,GAAG,EAAEC,QAAQ,CAAC,IAAIC,MAAM,CAACC,OAAO,CAACN,UAAU,CAAC,EAAE;IACxD,IAAII,QAAQ,IAAI,OAAOA,QAAQ,KAAK,QAAQ,IAAI,CAACG,KAAK,CAACC,OAAO,CAACJ,QAAQ,CAAC,EAAE;MACxEF,OAAO,CAACC,GAAG,CAAC,GAAGF,uBAAuB,CACnCC,OAAO,CAACC,GAAG,CAAC,IAAgC,CAAC,CAAC,EAC/CH,UAAU,CAACG,GAAG,CAChB,CAAC;IAEH,CAAC,MAAM;MACLD,OAAO,CAACC,GAAG,CAAC,GAAGH,UAAU,CAACG,GAAG,CAAC;IAChC;EACF;EACA,OAAOD,OAAO;AAChB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-source.d.ts","sourceRoot":"","sources":["../../../src/lib/sources/data-source.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"data-source.d.ts","sourceRoot":"","sources":["../../../src/lib/sources/data-source.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAE5D,6CAA6C;AAC7C,MAAM,MAAM,eAAe,GAAG;IAC5B,kGAAkG;IAClG,WAAW,CAAC,EAAE,aAAa,CAAC;CAC7B,CAAC;AAEF,qCAAqC;AACrC,8BAAsB,UAAU,CAAC,MAAM,SAAS,eAAe,GAAG,eAAe;IAC/E,gEAAgE;IAChE,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IACjE,8DAA8D;IAC9D,WAAW,EAAE,aAAa,CAAC;IAC3B,aAAa,EAAE,OAAO,CAAQ;IAE9B,KAAK,EAAE,MAAM,CAAC;gBAEF,KAAK,EAAE,MAAM;IAMzB,QAAQ,CAAC,KAAK,EAAE,MAAM;IAMtB,0DAA0D;IAC1D,eAAe,IAAI,IAAI;IAIvB;;;OAGG;IACH,eAAe,CAAC,KAAK,GAAE,OAAc;CAOtC;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,CAAC,EAAE,aAAa,SAKvC,MAAM,iBAAiB,WAAW,uBAWlD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-source.js","names":["DataSource","constructor","props","fetch","loadOptions","_needsRefresh","getFetchFunction","setProps","Object","assign","setNeedsRefresh","getNeedsRefresh","clear","arguments","length","undefined","needsRefresh","options","fetchFunction","url","fetchOptions"],"sources":["../../../src/lib/sources/data-source.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport type {LoaderOptions} from '@loaders.gl/loader-utils';\n\n/** Common properties for all data sources */\nexport type DataSourceProps = {\n /** LoaderOptions provide an option to override `fetch`. Will also be passed to any sub loaders */\n loadOptions?: LoaderOptions;\n};\n\n/** base class of all data sources */\nexport abstract class DataSource<PropsT extends DataSourceProps = DataSourceProps> {\n /** A resolved fetch function extracted from loadOptions prop */\n fetch: (url: string, options?: RequestInit) => Promise<Response>;\n /** The actual load options, if calling a loaders.gl loader */\n loadOptions: LoaderOptions;\n _needsRefresh: boolean = true;\n\n props: PropsT;\n\n constructor(props: PropsT) {\n this.props = {...props};\n this.loadOptions = {...props.loadOptions};\n this.fetch = getFetchFunction(this.loadOptions);\n }\n\n setProps(props: PropsT) {\n this.props = Object.assign(this.props, props);\n // TODO - add a shallow compare to avoid setting refresh if no change?\n this.setNeedsRefresh();\n }\n\n /** Mark this data source as needing a refresh (redraw) */\n setNeedsRefresh(): void {\n this._needsRefresh = true;\n }\n\n /**\n * Does this data source need refreshing?\n * @note The specifics of the refresh mechanism depends on type of data source\n */\n getNeedsRefresh(clear: boolean = true) {\n const needsRefresh = this._needsRefresh;\n if (clear) {\n this._needsRefresh = false;\n }\n return needsRefresh;\n }\n}\n\n/**\n * Gets the current fetch function from options\n * @todo - move to loader-utils module\n * @todo - use in core module counterpart\n * @param options\n * @param context\n */\nexport function getFetchFunction(options?: LoaderOptions) {\n const fetchFunction = options?.fetch;\n\n // options.fetch can be a function\n if (fetchFunction && typeof fetchFunction === 'function') {\n return (url: string, fetchOptions?: RequestInit) => fetchFunction(url, fetchOptions);\n }\n\n // options.fetch can be an options object, use global fetch with those options\n const fetchOptions = options?.fetch;\n if (fetchOptions && typeof fetchOptions !== 'function') {\n return (url) => fetch(url, fetchOptions);\n }\n\n // else return the global fetch function\n return (url) => fetch(url);\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"data-source.js","names":["DataSource","constructor","props","fetch","loadOptions","_needsRefresh","getFetchFunction","setProps","Object","assign","setNeedsRefresh","getNeedsRefresh","clear","arguments","length","undefined","needsRefresh","options","fetchFunction","url","fetchOptions"],"sources":["../../../src/lib/sources/data-source.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\n\nimport type {LoaderOptions} from '@loaders.gl/loader-utils';\n\n/** Common properties for all data sources */\nexport type DataSourceProps = {\n /** LoaderOptions provide an option to override `fetch`. Will also be passed to any sub loaders */\n loadOptions?: LoaderOptions;\n};\n\n/** base class of all data sources */\nexport abstract class DataSource<PropsT extends DataSourceProps = DataSourceProps> {\n /** A resolved fetch function extracted from loadOptions prop */\n fetch: (url: string, options?: RequestInit) => Promise<Response>;\n /** The actual load options, if calling a loaders.gl loader */\n loadOptions: LoaderOptions;\n _needsRefresh: boolean = true;\n\n props: PropsT;\n\n constructor(props: PropsT) {\n this.props = {...props};\n this.loadOptions = {...props.loadOptions};\n this.fetch = getFetchFunction(this.loadOptions);\n }\n\n setProps(props: PropsT) {\n this.props = Object.assign(this.props, props);\n // TODO - add a shallow compare to avoid setting refresh if no change?\n this.setNeedsRefresh();\n }\n\n /** Mark this data source as needing a refresh (redraw) */\n setNeedsRefresh(): void {\n this._needsRefresh = true;\n }\n\n /**\n * Does this data source need refreshing?\n * @note The specifics of the refresh mechanism depends on type of data source\n */\n getNeedsRefresh(clear: boolean = true) {\n const needsRefresh = this._needsRefresh;\n if (clear) {\n this._needsRefresh = false;\n }\n return needsRefresh;\n }\n}\n\n/**\n * Gets the current fetch function from options\n * @todo - move to loader-utils module\n * @todo - use in core module counterpart\n * @param options\n * @param context\n */\nexport function getFetchFunction(options?: LoaderOptions) {\n const fetchFunction = options?.fetch;\n\n // options.fetch can be a function\n if (fetchFunction && typeof fetchFunction === 'function') {\n return (url: string, fetchOptions?: RequestInit) => fetchFunction(url, fetchOptions);\n }\n\n // options.fetch can be an options object, use global fetch with those options\n const fetchOptions = options?.fetch;\n if (fetchOptions && typeof fetchOptions !== 'function') {\n return (url) => fetch(url, fetchOptions);\n }\n\n // else return the global fetch function\n return (url) => fetch(url);\n}\n"],"mappings":"AAYA,OAAO,MAAeA,UAAU,CAAmD;EASjFC,WAAWA,CAACC,KAAa,EAAE;IAAA,KAP3BC,KAAK;IAAA,KAELC,WAAW;IAAA,KACXC,aAAa,GAAY,IAAI;IAAA,KAE7BH,KAAK;IAGH,IAAI,CAACA,KAAK,GAAG;MAAC,GAAGA;IAAK,CAAC;IACvB,IAAI,CAACE,WAAW,GAAG;MAAC,GAAGF,KAAK,CAACE;IAAW,CAAC;IACzC,IAAI,CAACD,KAAK,GAAGG,gBAAgB,CAAC,IAAI,CAACF,WAAW,CAAC;EACjD;EAEAG,QAAQA,CAACL,KAAa,EAAE;IACtB,IAAI,CAACA,KAAK,GAAGM,MAAM,CAACC,MAAM,CAAC,IAAI,CAACP,KAAK,EAAEA,KAAK,CAAC;IAE7C,IAAI,CAACQ,eAAe,CAAC,CAAC;EACxB;EAGAA,eAAeA,CAAA,EAAS;IACtB,IAAI,CAACL,aAAa,GAAG,IAAI;EAC3B;EAMAM,eAAeA,CAAA,EAAwB;IAAA,IAAvBC,KAAc,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;IACnC,MAAMG,YAAY,GAAG,IAAI,CAACX,aAAa;IACvC,IAAIO,KAAK,EAAE;MACT,IAAI,CAACP,aAAa,GAAG,KAAK;IAC5B;IACA,OAAOW,YAAY;EACrB;AACF;AASA,OAAO,SAASV,gBAAgBA,CAACW,OAAuB,EAAE;EACxD,MAAMC,aAAa,GAAGD,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEd,KAAK;EAGpC,IAAIe,aAAa,IAAI,OAAOA,aAAa,KAAK,UAAU,EAAE;IACxD,OAAO,CAACC,GAAW,EAAEC,YAA0B,KAAKF,aAAa,CAACC,GAAG,EAAEC,YAAY,CAAC;EACtF;EAGA,MAAMA,YAAY,GAAGH,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEd,KAAK;EACnC,IAAIiB,YAAY,IAAI,OAAOA,YAAY,KAAK,UAAU,EAAE;IACtD,OAAQD,GAAG,IAAKhB,KAAK,CAACgB,GAAG,EAAEC,YAAY,CAAC;EAC1C;EAGA,OAAQD,GAAG,IAAKhB,KAAK,CAACgB,GAAG,CAAC;AAC5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-source.d.ts","sourceRoot":"","sources":["../../../src/lib/sources/image-source.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"image-source.d.ts","sourceRoot":"","sources":["../../../src/lib/sources/image-source.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AACnD,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AACzC,OAAO,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,EAAE,gBAAgB,EAAE,CAAC;CAC5B,CAAC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WAAW,GAAG;IACxB,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,aAAa;IACb,MAAM,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,4CAA4C;IAC5C,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,eAAe,CAAC;AAE/C;;;;GAIG;AACH,8BAAsB,WAAW,CAC/B,MAAM,SAAS,gBAAgB,GAAG,gBAAgB,CAClD,SAAQ,UAAU,CAAC,MAAM,CAAC;IAC1B,MAAM,CAAC,IAAI,EAAE,MAAM,CAAc;IACjC,MAAM,CAAC,OAAO,QAAS,MAAM,KAAG,OAAO,CAAU;IAEjD,QAAQ,CAAC,WAAW,IAAI,OAAO,CAAC,mBAAmB,CAAC;IACpD,QAAQ,CAAC,QAAQ,CAAC,UAAU,EAAE,kBAAkB,GAAG,OAAO,CAAC,SAAS,CAAC;CACtE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-source.js","names":["DataSource","ImageSource","type","testURL","url"],"sources":["../../../src/lib/sources/image-source.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport type {DataSourceProps} from './data-source';\nimport {DataSource} from './data-source';\nimport {ImageType} from './utils/image-type';\n\n/**\n * Normalized capabilities of an Image service\n * @example\n * The WMSService will normalize the response to the WMS `GetCapabilities`\n * data structure extracted from WMS XML response into an ImageSourceMetadata.\n */\nexport type ImageSourceMetadata = {\n name: string;\n title?: string;\n abstract?: string;\n keywords: string[];\n layers: ImageSourceLayer[];\n};\n\n/** Description of one data layer in the image source */\nexport type ImageSourceLayer = {\n /** Name of this layer */\n name?: string;\n /** Human readable title of this layer */\n title?: string;\n /** Coordinate systems supported by this layer */\n crs?: string[];\n /** layer limits in unspecified CRS:84-like lng/lat, for quick access w/o CRS calculations. */\n geographicBoundingBox?: [min: [x: number, y: number], max: [x: number, y: number]];\n /** Sub layers of this layer */\n layers?: ImageSourceLayer[];\n};\n\n/** Generic parameters for requesting an image from an image source */\nexport type GetImageParameters = {\n /** Layers to render */\n layers: string | string[];\n /** Styling */\n styles?: unknown;\n /** bounding box of the requested map image */\n bbox: [number, number, number, number];\n /** pixel width of returned image */\n width: number;\n /** pixels */\n height: number;\n /** crs for the image (not the bounding box) */\n crs?: string;\n /** requested format for the return image */\n format?: 'image/png';\n};\n\n// Attempt to break down GetImageParameters\nexport type ImageFilters = {\n /** Layers to render */\n layers: string | string[];\n /** Styling */\n styles?: unknown;\n};\n\nexport type ImageRegion = {\n /** bounding box of the requested map image */\n bbox: [number, number, number, number];\n};\n\nexport type ImageFormat = {\n /** pixel width of returned image */\n width: number;\n /** pixels */\n height: number;\n /** crs for the image (not the bounding box) */\n crs?: string;\n /** requested format for the return image */\n format?: 'image/png';\n};\n\nexport type ImageSourceProps = DataSourceProps;\n\n/**\n * MapImageSource - data sources that allow data to be queried by (geospatial) extents\n * @note\n * - If geospatial, bounding box is expected to be in web mercator coordinates\n */\nexport abstract class ImageSource<\n PropsT extends ImageSourceProps = ImageSourceProps\n> extends DataSource<PropsT> {\n static type: string = 'template';\n static testURL = (url: string): boolean => false;\n\n abstract getMetadata(): Promise<ImageSourceMetadata>;\n abstract getImage(parameters: GetImageParameters): Promise<ImageType>;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"image-source.js","names":["DataSource","ImageSource","type","testURL","url"],"sources":["../../../src/lib/sources/image-source.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\n\nimport type {DataSourceProps} from './data-source';\nimport {DataSource} from './data-source';\nimport {ImageType} from './utils/image-type';\n\n/**\n * Normalized capabilities of an Image service\n * @example\n * The WMSService will normalize the response to the WMS `GetCapabilities`\n * data structure extracted from WMS XML response into an ImageSourceMetadata.\n */\nexport type ImageSourceMetadata = {\n name: string;\n title?: string;\n abstract?: string;\n keywords: string[];\n layers: ImageSourceLayer[];\n};\n\n/** Description of one data layer in the image source */\nexport type ImageSourceLayer = {\n /** Name of this layer */\n name?: string;\n /** Human readable title of this layer */\n title?: string;\n /** Coordinate systems supported by this layer */\n crs?: string[];\n /** layer limits in unspecified CRS:84-like lng/lat, for quick access w/o CRS calculations. */\n geographicBoundingBox?: [min: [x: number, y: number], max: [x: number, y: number]];\n /** Sub layers of this layer */\n layers?: ImageSourceLayer[];\n};\n\n/** Generic parameters for requesting an image from an image source */\nexport type GetImageParameters = {\n /** Layers to render */\n layers: string | string[];\n /** Styling */\n styles?: unknown;\n /** bounding box of the requested map image */\n bbox: [number, number, number, number];\n /** pixel width of returned image */\n width: number;\n /** pixels */\n height: number;\n /** crs for the image (not the bounding box) */\n crs?: string;\n /** requested format for the return image */\n format?: 'image/png';\n};\n\n// Attempt to break down GetImageParameters\nexport type ImageFilters = {\n /** Layers to render */\n layers: string | string[];\n /** Styling */\n styles?: unknown;\n};\n\nexport type ImageRegion = {\n /** bounding box of the requested map image */\n bbox: [number, number, number, number];\n};\n\nexport type ImageFormat = {\n /** pixel width of returned image */\n width: number;\n /** pixels */\n height: number;\n /** crs for the image (not the bounding box) */\n crs?: string;\n /** requested format for the return image */\n format?: 'image/png';\n};\n\nexport type ImageSourceProps = DataSourceProps;\n\n/**\n * MapImageSource - data sources that allow data to be queried by (geospatial) extents\n * @note\n * - If geospatial, bounding box is expected to be in web mercator coordinates\n */\nexport abstract class ImageSource<\n PropsT extends ImageSourceProps = ImageSourceProps\n> extends DataSource<PropsT> {\n static type: string = 'template';\n static testURL = (url: string): boolean => false;\n\n abstract getMetadata(): Promise<ImageSourceMetadata>;\n abstract getImage(parameters: GetImageParameters): Promise<ImageType>;\n}\n"],"mappings":"SAIQA,UAAU;AAgFlB,OAAO,MAAeC,WAAW,SAEvBD,UAAU,CAAS;AAFPC,WAAW,CAGxBC,IAAI,GAAW,UAAU;AAHZD,WAAW,CAIxBE,OAAO,GAAIC,GAAW,IAAc,KAAK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-tile-source.d.ts","sourceRoot":"","sources":["../../../src/lib/sources/image-tile-source.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"image-tile-source.d.ts","sourceRoot":"","sources":["../../../src/lib/sources/image-tile-source.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAC,UAAU,EAAE,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAClE,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAErD;;;GAGG;AACH,MAAM,WAAW,eAAe,CAAC,SAAS,SAAS,kBAAkB,GAAG,kBAAkB,CACxF,SAAQ,UAAU,CAAC,SAAS,CAAC;IAC7B,YAAY,CAAC,UAAU,EAAE,iBAAiB,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;CACxE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-tile-source.js","names":[],"sources":["../../../src/lib/sources/image-tile-source.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport type {ImageType} from './utils/image-type';\nimport type {TileSource, TileSourceMetadata} from './tile-source';\nimport type {GetTileParameters} from './tile-source';\n\n/**\n * MapTileSource - data sources that allow data to be queried by (geospatial) tile\n * @note If geospatial, bounding box is expected to be in web mercator coordinates\n */\nexport interface ImageTileSource<MetadataT extends TileSourceMetadata = TileSourceMetadata>\n extends TileSource<MetadataT> {\n getImageTile(parameters: GetTileParameters): Promise<ImageType | null>;\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"image-tile-source.js","names":[],"sources":["../../../src/lib/sources/image-tile-source.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\n\nimport type {ImageType} from './utils/image-type';\nimport type {TileSource, TileSourceMetadata} from './tile-source';\nimport type {GetTileParameters} from './tile-source';\n\n/**\n * MapTileSource - data sources that allow data to be queried by (geospatial) tile\n * @note If geospatial, bounding box is expected to be in web mercator coordinates\n */\nexport interface ImageTileSource<MetadataT extends TileSourceMetadata = TileSourceMetadata>\n extends TileSource<MetadataT> {\n getImageTile(parameters: GetTileParameters): Promise<ImageType | null>;\n}\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tile-source.d.ts","sourceRoot":"","sources":["../../../src/lib/sources/tile-source.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tile-source.d.ts","sourceRoot":"","sources":["../../../src/lib/sources/tile-source.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB,sEAAsE;IACtE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,qEAAqE;IACrE,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IAExB,kDAAkD;IAClD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kDAAkD;IAClD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gEAAgE;IAChE,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;IAEzE,wBAAwB;IACxB,KAAK,CAAC,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;QACf,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;Q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,MAAM,MAAM,cAAc,GAAG;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAC,CAAC;AACxF,MAAM,MAAM,iBAAiB,GAAG;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAC,CAAC;AAE3F;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,EAAE,CAAC;AAEjC;;;;GAIG;AACH,MAAM,WAAW,UAAU,CAAC,SAAS,SAAS,kBAAkB;IAC9D,WAAW,IAAI,OAAO,CAAC,SAAS,CAAC,CAAC;IAClC,sBAAsB;IACtB,OAAO,CAAC,UAAU,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACzD,+BAA+B;IAC/B,WAAW,CAAC,UAAU,EAAE,kBAAkB,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;CACtE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tile-source.js","names":[],"sources":["../../../src/lib/sources/tile-source.ts"],"sourcesContent":["// loaders.gl, MIT license\n\n/**\n * Normalized capabilities of an Image service\n * Sources are expected to normalize the response to capabilities\n * @example\n * A WMS service would normalize the response to the WMS `GetCapabilities` data structure extracted from WMS XML response\n * into an TileSourceMetadata.\n */\nexport type TileSourceMetadata = {\n format?: string;\n formatHeader?: unknown;\n\n /** Name of the tileset (extracted from JSON metadata if available) */\n name?: string;\n title?: string;\n abstract?: string;\n keywords?: string[];\n /** Attribution string (extracted from JSON metadata if available) */\n attributions?: string[];\n\n /** Minimal zoom level of tiles in this tileset */\n minZoom?: number;\n /** Maximal zoom level of tiles in this tileset */\n maxZoom?: number;\n /** Bounding box of tiles in this tileset `[[w, s], [e, n]]` */\n boundingBox?: [min: [x: number, y: number], max: [x: number, y: number]];\n\n /** Layer information */\n layer?: {\n name: string;\n title?: string;\n srs?: string[];\n boundingBox?: [number, number, number, number];\n layers: TileSourceLayer[];\n };\n};\n\n/**\n * Description of one data layer in the image source\n */\nexport type TileSourceLayer = {\n name: string;\n title?: string;\n srs?: string[];\n boundingBox?: [number, number, number, number];\n layers: TileSourceLayer[];\n};\n\n/**\n * Generic parameters for requesting an image from an image source\n */\nexport type GetTileParameters = {\n /** Layers to render */\n layers: string | string[];\n /** Styling */\n styles?: unknown;\n /** bounding box of the requested map image */\n zoom: number;\n /** tile x coordinate */\n x: number;\n /** tile y coordinate */\n y: number;\n /** srs for the image (not the bounding box) */\n srs?: string;\n /** requested format for the return image */\n format?: 'image/png';\n};\n\nexport type TileLoadParameters = {\n index: {x: number; y: number; z: number};\n id: string;\n bbox: TileBoundingBox;\n zoom?: number;\n url?: string | null;\n signal?: AbortSignal;\n userData?: Record<string, any>;\n};\n\n/** deck.gl compatible bounding box */\nexport type TileBoundingBox = NonGeoBoundingBox | GeoBoundingBox;\nexport type GeoBoundingBox = {west: number; north: number; east: number; south: number};\nexport type NonGeoBoundingBox = {left: number; top: number; right: number; bottom: number};\n\n/**\n * Props for a TileSource\n */\nexport type TileSourceProps = {};\n\n/**\n * MapTileSource - data sources that allow data to be queried by (geospatial) extents\n * @note\n * - If geospatial, bounding box is expected to be in web mercator coordinates\n */\nexport interface TileSource<MetadataT extends TileSourceMetadata> {\n getMetadata(): Promise<MetadataT>;\n /** Flat parameters */\n getTile(parameters: GetTileParameters): Promise<unknown>;\n /** deck.gl style parameters */\n getTileData(parameters: TileLoadParameters): Promise<unknown | null>;\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"tile-source.js","names":[],"sources":["../../../src/lib/sources/tile-source.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\n\n/**\n * Normalized capabilities of an Image service\n * Sources are expected to normalize the response to capabilities\n * @example\n * A WMS service would normalize the response to the WMS `GetCapabilities` data structure extracted from WMS XML response\n * into an TileSourceMetadata.\n */\nexport type TileSourceMetadata = {\n format?: string;\n formatHeader?: unknown;\n\n /** Name of the tileset (extracted from JSON metadata if available) */\n name?: string;\n title?: string;\n abstract?: string;\n keywords?: string[];\n /** Attribution string (extracted from JSON metadata if available) */\n attributions?: string[];\n\n /** Minimal zoom level of tiles in this tileset */\n minZoom?: number;\n /** Maximal zoom level of tiles in this tileset */\n maxZoom?: number;\n /** Bounding box of tiles in this tileset `[[w, s], [e, n]]` */\n boundingBox?: [min: [x: number, y: number], max: [x: number, y: number]];\n\n /** Layer information */\n layer?: {\n name: string;\n title?: string;\n srs?: string[];\n boundingBox?: [number, number, number, number];\n layers: TileSourceLayer[];\n };\n};\n\n/**\n * Description of one data layer in the image source\n */\nexport type TileSourceLayer = {\n name: string;\n title?: string;\n srs?: string[];\n boundingBox?: [number, number, number, number];\n layers: TileSourceLayer[];\n};\n\n/**\n * Generic parameters for requesting an image from an image source\n */\nexport type GetTileParameters = {\n /** Layers to render */\n layers: string | string[];\n /** Styling */\n styles?: unknown;\n /** bounding box of the requested map image */\n zoom: number;\n /** tile x coordinate */\n x: number;\n /** tile y coordinate */\n y: number;\n /** srs for the image (not the bounding box) */\n srs?: string;\n /** requested format for the return image */\n format?: 'image/png';\n};\n\nexport type TileLoadParameters = {\n index: {x: number; y: number; z: number};\n id: string;\n bbox: TileBoundingBox;\n zoom?: number;\n url?: string | null;\n signal?: AbortSignal;\n userData?: Record<string, any>;\n};\n\n/** deck.gl compatible bounding box */\nexport type TileBoundingBox = NonGeoBoundingBox | GeoBoundingBox;\nexport type GeoBoundingBox = {west: number; north: number; east: number; south: number};\nexport type NonGeoBoundingBox = {left: number; top: number; right: number; bottom: number};\n\n/**\n * Props for a TileSource\n */\nexport type TileSourceProps = {};\n\n/**\n * MapTileSource - data sources that allow data to be queried by (geospatial) extents\n * @note\n * - If geospatial, bounding box is expected to be in web mercator coordinates\n */\nexport interface TileSource<MetadataT extends TileSourceMetadata> {\n getMetadata(): Promise<MetadataT>;\n /** Flat parameters */\n getTile(parameters: GetTileParameters): Promise<unknown>;\n /** deck.gl style parameters */\n getTileData(parameters: TileLoadParameters): Promise<unknown | null>;\n}\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/lib/sources/utils/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/lib/sources/utils/utils.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAE5D;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,CAAC,EAAE,aAAa,SAKvC,MAAM,iBAAiB,WAAW,uBAWlD;AAED,wBAAgB,sBAAsB,CAAC,KAAK,SAAS;IAAC,WAAW,CAAC,EAAE,GAAG,CAAA;CAAC,EACtE,KAAK,EAAE,KAAK,GACX,QAAQ,CAAC,KAAK,CAAC,CAUjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":["getFetchFunction","options","fetchFunction","fetch","url","fetchOptions","mergeImageServiceProps","props","loadOptions"],"sources":["../../../../src/lib/sources/utils/utils.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport type {LoaderOptions} from '@loaders.gl/loader-utils';\n\n/**\n * Gets the current fetch function from options\n * @todo - move to loader-utils module\n * @todo - use in core module counterpart\n * @param options\n * @param context\n */\nexport function getFetchFunction(options?: LoaderOptions) {\n const fetchFunction = options?.fetch;\n\n // options.fetch can be a function\n if (fetchFunction && typeof fetchFunction === 'function') {\n return (url: string, fetchOptions?: RequestInit) => fetchFunction(url, fetchOptions);\n }\n\n // options.fetch can be an options object, use global fetch with those options\n const fetchOptions = options?.fetch;\n if (fetchOptions && typeof fetchOptions !== 'function') {\n return (url) => fetch(url, fetchOptions);\n }\n\n // else return the global fetch function\n return (url) => fetch(url);\n}\n\nexport function mergeImageServiceProps<Props extends {loadOptions?: any}>(\n props: Props\n): Required<Props> {\n // @ts-expect-error\n return {\n // Default fetch\n ...props,\n loadOptions: {\n ...props.loadOptions,\n fetch: getFetchFunction(props.loadOptions)\n }\n };\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.js","names":["getFetchFunction","options","fetchFunction","fetch","url","fetchOptions","mergeImageServiceProps","props","loadOptions"],"sources":["../../../../src/lib/sources/utils/utils.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\n\nimport type {LoaderOptions} from '@loaders.gl/loader-utils';\n\n/**\n * Gets the current fetch function from options\n * @todo - move to loader-utils module\n * @todo - use in core module counterpart\n * @param options\n * @param context\n */\nexport function getFetchFunction(options?: LoaderOptions) {\n const fetchFunction = options?.fetch;\n\n // options.fetch can be a function\n if (fetchFunction && typeof fetchFunction === 'function') {\n return (url: string, fetchOptions?: RequestInit) => fetchFunction(url, fetchOptions);\n }\n\n // options.fetch can be an options object, use global fetch with those options\n const fetchOptions = options?.fetch;\n if (fetchOptions && typeof fetchOptions !== 'function') {\n return (url) => fetch(url, fetchOptions);\n }\n\n // else return the global fetch function\n return (url) => fetch(url);\n}\n\nexport function mergeImageServiceProps<Props extends {loadOptions?: any}>(\n props: Props\n): Required<Props> {\n // @ts-expect-error\n return {\n // Default fetch\n ...props,\n loadOptions: {\n ...props.loadOptions,\n fetch: getFetchFunction(props.loadOptions)\n }\n };\n}\n"],"mappings":"AAYA,OAAO,SAASA,gBAAgBA,CAACC,OAAuB,EAAE;EACxD,MAAMC,aAAa,GAAGD,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEE,KAAK;EAGpC,IAAID,aAAa,IAAI,OAAOA,aAAa,KAAK,UAAU,EAAE;IACxD,OAAO,CAACE,GAAW,EAAEC,YAA0B,KAAKH,aAAa,CAACE,GAAG,EAAEC,YAAY,CAAC;EACtF;EAGA,MAAMA,YAAY,GAAGJ,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEE,KAAK;EACnC,IAAIE,YAAY,IAAI,OAAOA,YAAY,KAAK,UAAU,EAAE;IACtD,OAAQD,GAAG,IAAKD,KAAK,CAACC,GAAG,EAAEC,YAAY,CAAC;EAC1C;EAGA,OAAQD,GAAG,IAAKD,KAAK,CAACC,GAAG,CAAC;AAC5B;AAEA,OAAO,SAASE,sBAAsBA,CACpCC,KAAY,EACK;EAEjB,OAAO;IAEL,GAAGA,KAAK;IACRC,WAAW,EAAE;MACX,GAAGD,KAAK,CAACC,WAAW;MACpBL,KAAK,EAAEH,gBAAgB,CAACO,KAAK,CAACC,WAAW;IAC3C;EACF,CAAC;AACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vector-tile-source.d.ts","sourceRoot":"","sources":["../../../src/lib/sources/vector-tile-source.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vector-tile-source.d.ts","sourceRoot":"","sources":["../../../src/lib/sources/vector-tile-source.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,UAAU,EAAE,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAC,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAEhD;;;GAGG;AACH,MAAM,WAAW,gBAAgB,CAAC,SAAS,SAAS,kBAAkB,GAAG,kBAAkB,CACzF,SAAQ,UAAU,CAAC,SAAS,CAAC;IAC7B,aAAa,CAAC,UAAU,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;CACvE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vector-tile-source.js","names":[],"sources":["../../../src/lib/sources/vector-tile-source.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport {TileSource, TileSourceMetadata} from './tile-source';\nimport {GetTileParameters} from './tile-source';\n\n/**\n * MapTileSource - data sources that allow data to be queried by (geospatial) tile\n * @note If geospatial, bounding box is expected to be in web mercator coordinates\n */\nexport interface VectorTileSource<MetadataT extends TileSourceMetadata = TileSourceMetadata>\n extends TileSource<MetadataT> {\n getVectorTile(parameters: GetTileParameters): Promise<unknown | null>;\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"vector-tile-source.js","names":[],"sources":["../../../src/lib/sources/vector-tile-source.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\n\nimport {TileSource, TileSourceMetadata} from './tile-source';\nimport {GetTileParameters} from './tile-source';\n\n/**\n * MapTileSource - data sources that allow data to be queried by (geospatial) tile\n * @note If geospatial, bounding box is expected to be in web mercator coordinates\n */\nexport interface VectorTileSource<MetadataT extends TileSourceMetadata = TileSourceMetadata>\n extends TileSource<MetadataT> {\n getVectorTile(parameters: GetTileParameters): Promise<unknown | null>;\n}\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader-types.d.ts","sourceRoot":"","sources":["../src/loader-types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"loader-types.d.ts","sourceRoot":"","sources":["../src/loader-types.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,SAAS,EACT,gBAAgB,EACjB,MAAM,SAAS,CAAC;AAIjB;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,+CAA+C;IAC/C,KAAK,CAAC,EAAE,OAAO,KAAK,GAAG,SAAS,GAAG,WAAW,GAAG,IAAI,CAAC;IACtD,6BAA6B;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6EAA6E;IAC7E,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,2DAA2D;IAC3D,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAGlC,kDAAkD;IAClD,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,4GAA4G;IAC5G,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAI5B,4E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AO,EAAE,QAAQ,GAAG,SAAS,EAC7B,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC;AAEtC;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,WAAW,EACjB,OAAO,EAAE,MAAM,EAAE,EACjB,OAAO,EAAE,aAAa,GAAG,SAAS,EAClC,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,OAAO,CAAC,CAAC;AAmBpB;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,SAAS,MAAM,EACtB,QAAQ,SAAS,aAAa,GAAG,iBAAiB,CAAC,OAAO,CAAC,EAE3D,IAAI,EAAE,WAAW,EACjB,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,QAAQ,GAAG,SAAS,EAC7B,OAAO,EAAE,aAAa,GACrB,gBAAgB,CAAC,OAAO,CAAC,CAK3B;AAED;;GAEG;AACH,wBAAsB,yBAAyB,CAC7C,OAAO,SAAS,MAAM,EACtB,QAAQ,SAAS,aAAa,GAAG,iBAAiB,CAAC,OAAO,CAAC,EAE3D,IAAI,EAAE,QAAQ,CAAC,WAAW,CAAC,GAAG,aAAa,CAAC,WAAW,CAAC,GAAG,QAAQ,EACnE,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,QAAQ,GAAG,SAAS,EAC7B,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,aAAa,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,CAKlD"}
|
package/dist/loader-types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader-types.js","names":["parseFromContext","data","loaders","options","context","_parse","parseSyncFromContext","loader","_parseSync","Error","parseInBatchesFromContext","_parseInBatches"],"sources":["../src/loader-types.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport {\n FetchLike,\n TransformBatches /* , DataType, SyncDataType, BatchableDataType */\n} from './types';\n\n// LOADERS\n\n/**\n * Core Loader Options\n */\nexport type LoaderOptions = {\n /** fetch options or a custom fetch function */\n fetch?: typeof fetch | FetchLike | RequestInit | null;\n /** Do not throw on errors */\n nothrow?: boolean;\n\n /** loader selection, search first for supplied mimeType */\n mimeType?: string;\n /** loader selection, provide fallback mimeType is server does not provide */\n fallbackMimeType?: string;\n /** loader selection, avoid searching registered loaders */\n ignoreRegisteredLoaders?: boolean;\n\n // general\n /** Experimental: Supply a logger to the parser */\n log?: any;\n /** Force to load WASM libraries from local file system in NodeJS or from loaders.gl CDN in a web browser */\n useLocalLibraries?: boolean;\n\n // batched parsing\n\n /** Size of each batch. `auto` matches batches to size of incoming chunks */\n batchSize?: number | 'auto';\n /** Minimal amount of time between batches */\n batchDebounceMs?: number;\n /** Stop loading after a given number of rows (compare SQL limit clause) */\n limit?: 0;\n /** Experimental: Stop loading after reaching */\n _limitMB?: 0;\n /** Generate metadata batches */\n metadata?: boolean;\n /** Transforms to run on incoming batches */\n transforms?: TransformBatches[];\n\n // workers\n\n /** CDN load workers from */\n CDN?: string | null;\n /** Set to `false` to disable workers */\n worker?: boolean;\n /** Number of concurrent workers (per loader) on desktop browser */\n maxConcurrency?: number;\n /** Number of concurrent workers (per loader) on mobile browsers */\n maxMobileConcurrency?: number;\n /** Set to `false` to prevent reuse workers */\n reuseWorkers?: boolean;\n /** Whether to use workers under Node.js (experimental) */\n _nodeWorkers?: boolean;\n /** set to 'test' to run local worker */\n _workerType?: string;\n\n /** @deprecated `options.batchType` removed, Use `options.<loader>.type` instead */\n batchType?: 'row' | 'columnar' | 'arrow';\n /** @deprecated `options.throw removed`, Use `options.nothrow` instead */\n throws?: boolean;\n /** @deprecated `options.dataType` no longer used */\n dataType?: never;\n /** @deprecated `options.uri` no longer used */\n uri?: never;\n /** @deprecated Use `options.fetch.method` */\n method?: never;\n /** @deprecated Use `options.fetch.headers` */\n headers?: never;\n /** @deprecated Use `options.fetch.body` */\n body?: never;\n /** @deprecated Use `options.fetch.mode` */\n mode?: never;\n /** @deprecated Use `options.fetch.credentials` */\n credentials?: never;\n /** @deprecated Use `options.fetch.cache` */\n cache?: never;\n /** @deprecated Use `options.fetch.redirect` */\n redirect?: never;\n /** @deprecated Use `options.fetch.referrer` */\n referrer?: never;\n /** @deprecated Use `options.fetch.referrerPolicy` */\n referrerPolicy?: never;\n /** @deprecated Use `options.fetch.integrity` */\n integrity?: never;\n /** @deprecated Use `options.fetch.keepalive` */\n keepalive?: never;\n /** @deprecated Use `options.fetch.signal` */\n signal?: never;\n\n // Accept other keys (loader options objects, e.g. `options.csv`, `options.json` ...)\n [loaderId: string]: unknown;\n};\n\ntype PreloadOptions = {\n [key: string]: unknown;\n};\n\n/**\n * A worker loader definition that can be used with `@loaders.gl/core` functions\n */\nexport type Loader<DataT = any, BatchT = any, LoaderOptionsT = LoaderOptions> = {\n /** The result type of this loader */\n dataType?: DataT;\n /** The batched result type of this loader */\n batchType?: BatchT;\n\n /** Default Options */\n options: LoaderOptionsT;\n /** Deprecated Options */\n deprecatedOptions?: Record<string, string | Record<string, string>>;\n\n /** Human readable name */\n name: string;\n /** id should be the same as the field used in LoaderOptions */\n id: string;\n /** module is used to generate worker threads, need to be the module directory name */\n module: string;\n /** Version should be injected by build tools */\n version: string;\n /** A boolean, or a URL */\n worker?: string | boolean;\n // end Worker\n\n /** Which category does this loader belong to */\n category?: string;\n /** File extensions that are potential matches with this loader. */\n extensions: string[];\n /** MIMETypes that indicate a match with this loader. @note Some MIMETypes are generic and supported by many loaders */\n mimeTypes: string[];\n\n /** Is the input of this loader binary */\n binary?: boolean;\n /** Is the input of this loader text */\n text?: boolean;\n\n /** Test some initial bytes of content to see if this loader might be a match */\n tests?: (((ArrayBuffer: ArrayBuffer) => boolean) | ArrayBuffer | string)[];\n\n /** @deprecated */\n supported?: boolean;\n /** @deprecated */\n testText?: (string: string) => boolean;\n};\n\n/**\n * A \"bundled\" loader definition that can be used with `@loaders.gl/core` functions\n * If a worker loader is supported it will also be supported.\n */\nexport type LoaderWithParser<DataT = any, BatchT = any, LoaderOptionsT = LoaderOptions> = Loader<\n DataT,\n BatchT,\n LoaderOptionsT\n> & {\n /** Perform actions before load. @deprecated Not officially supported. */\n preload?: Preload;\n /** Parse atomically from an arraybuffer asynchronously */\n parse: (\n arrayBuffer: ArrayBuffer,\n options?: LoaderOptionsT,\n context?: LoaderContext\n ) => Promise<DataT>;\n parseFile?: (file: Blob, options?: LoaderOptionsT, context?: LoaderContext) => Promise<DataT>;\n /** Parse atomically from an arraybuffer synchronously */\n parseSync?: (\n arrayBuffer: ArrayBuffer,\n options?: LoaderOptionsT,\n context?: LoaderContext\n ) => DataT;\n /** Parse atomically from a string asynchronously */\n parseText?: (text: string, options?: LoaderOptionsT, context?: LoaderContext) => Promise<DataT>;\n /** Parse atomically from a string synchronously */\n parseTextSync?: (text: string, options?: LoaderOptionsT, context?: LoaderContext) => DataT;\n /** Parse batches of data from an iterator, return an iterator that yield parsed batches. */\n parseInBatches?: (\n iterator: AsyncIterable<ArrayBuffer> | Iterable<ArrayBuffer>,\n options?: LoaderOptionsT,\n context?: LoaderContext\n ) => AsyncIterable<BatchT>;\n /** Like `parseInBatches` for loaders that don't integrate with fetch. @deprecated Not officially supported. */\n parseFileInBatches?: (\n file: Blob,\n options?: LoaderOptionsT,\n context?: LoaderContext\n ) => AsyncIterable<BatchT>;\n};\n\n/**\n * A Loader context is provided as a third parameters to a loader object's\n * parse functions when that loader is called by other loaders rather then\n * directly by the application.\n *\n * - The context object allows the subloaders to be aware of the parameters and\n * options that the application provided in the top level call.\n * - The context also providedsaccess to parse functions so that the subloader\n * does not need to include the core module.\n * - In addition, the context's parse functions may also redirect loads from worker\n * threads back to main thread.\n */\nexport type LoaderContext = {\n /** Loader list provided to top-level loader call plus any sub loaders */\n loaders?: Loader[] | null;\n /** If URL is available. */\n url?: string;\n /** the file name component of the URL (leading path and query string removed) */\n filename?: string;\n /** the directory name component of the URL (leading path excluding file name and query string) */\n baseUrl?: string;\n /** Query string (characters after `?`) */\n queryString?: string;\n\n /** Provides access to any application overrides of fetch() */\n fetch: typeof fetch | FetchLike;\n\n /** TBD */\n response?: Response;\n\n /**\n * Parse function for subloaders. Avoids importing `core`. In workers, may redirect to main thread\n */\n _parse: (\n arrayBuffer: ArrayBuffer,\n loaders?: Loader | Loader[] | LoaderOptions,\n options?: LoaderOptions,\n context?: LoaderContext\n ) => Promise<any>;\n\n /**\n * ParseSync function. Avoids importing `core`. In workers, may redirect to main thread\n * @deprecated Do not call directly, use `parseSyncFromContext` instead\n */\n _parseSync?: (\n arrayBuffer: ArrayBuffer,\n loaders?: Loader | Loader[] | LoaderOptions,\n options?: LoaderOptions,\n context?: LoaderContext\n ) => any;\n\n /**\n * ParseInBatches function. Avoids importing `core`.\n * @deprecated Do not call directly, use `parseInBatchesFromContext` instead\n */\n _parseInBatches?: (\n iterator: AsyncIterable<ArrayBuffer> | Iterable<ArrayBuffer> | Response,\n loaders?: Loader | Loader[] | LoaderOptions,\n options?: LoaderOptions,\n context?: LoaderContext\n ) => AsyncIterable<any> | Promise<AsyncIterable<any>>;\n};\n\n// type Parse = (\n// arrayBuffer: ArrayBuffer,\n// options?: LoaderOptions,\n// context?: LoaderContext\n// ) => Promise<any>;\n// type ParseSync = (\n// arrayBuffer: ArrayBuffer,\n// options?: LoaderOptions,\n// context?: LoaderContext\n// ) => any;\n// type ParseText = (text: string, options?: LoaderOptions) => Promise<any>;\n// type ParseTextSync = (text: string, options?: LoaderOptions) => any;\n// type ParseInBatches = (\n// iterator: AsyncIterable<ArrayBuffer> | Iterable<ArrayBuffer>,\n// options?: LoaderOptions,\n// context?: LoaderContext\n// ) => AsyncIterable<any>;\n// type ParseFileInBatches = (\n// file: Blob,\n// options?: LoaderOptions,\n// context?: LoaderContext\n// ) => AsyncIterable<any>;\n\ntype Preload = (url: string, options?: PreloadOptions) => any;\n\n/** Typescript helper to extract options type from a generic loader type */\nexport type LoaderOptionsType<T = Loader> = T extends Loader<any, any, infer Options>\n ? Options\n : never;\n/** Typescript helper to extract data type from a generic loader type */\nexport type LoaderReturnType<T = Loader> = T extends Loader<infer Return, any, any>\n ? Return\n : never;\n/** Typescript helper to extract batch type from a generic loader type */\nexport type LoaderBatchType<T = Loader> = T extends Loader<any, infer Batch, any> ? Batch : never;\n\n/**\n * Parses `data` asynchronously using the supplied loader, parse function provided via the loader context\n */\nexport async function parseFromContext<\n LoaderT extends Loader,\n OptionsT extends LoaderOptions = LoaderOptionsType<LoaderT>\n>(\n data: ArrayBuffer,\n loader: LoaderT,\n options: OptionsT | undefined,\n context: LoaderContext\n): Promise<LoaderReturnType<LoaderT>>;\n\n/**\n * Parses `data` asynchronously by matching one of the supplied loader\n */\nexport async function parseFromContext(\n data: ArrayBuffer,\n loaders: Loader[],\n options: LoaderOptions | undefined,\n context: LoaderContext\n): Promise<unknown>;\n\n/**\n * Parses `data` using a specified loader\n * @param data\n * @param loaders\n * @param options\n * @param context\n */\n// implementation signature\nexport async function parseFromContext(\n data: ArrayBuffer,\n loaders: Loader | Loader[],\n options: LoaderOptions | undefined,\n context: LoaderContext\n): Promise<unknown> {\n return context._parse(data, loaders, options, context);\n}\n\n/**\n * Parses `data` synchronously using the specified loader, parse function provided via the loader context\n */\nexport function parseSyncFromContext<\n LoaderT extends Loader,\n OptionsT extends LoaderOptions = LoaderOptionsType<LoaderT>\n>(\n data: ArrayBuffer,\n loader: LoaderT,\n options: OptionsT | undefined,\n context: LoaderContext\n): LoaderReturnType<LoaderT> {\n if (!context._parseSync) {\n throw new Error('parseSync');\n }\n return context._parseSync(data, loader, options, context);\n}\n\n/**\n * Parses `data` synchronously using a specified loader, parse function provided via the loader context\n */\nexport async function parseInBatchesFromContext<\n LoaderT extends Loader,\n OptionsT extends LoaderOptions = LoaderOptionsType<LoaderT>\n>(\n data: Iterable<ArrayBuffer> | AsyncIterable<ArrayBuffer> | Response,\n loader: LoaderT,\n options: OptionsT | undefined,\n context: LoaderContext\n): Promise<AsyncIterable<LoaderBatchType<LoaderT>>> {\n if (!context._parseInBatches) {\n throw new Error('parseInBatches');\n }\n return context._parseInBatches(data, loader, options, context);\n}\n"],"mappings":"AAmUA,OAAO,eAAeA,gBAAgBA,CACpCC,IAAiB,EACjBC,OAA0B,EAC1BC,OAAkC,EAClCC,OAAsB,EACJ;EAClB,OAAOA,OAAO,CAACC,MAAM,CAACJ,IAAI,EAAEC,OAAO,EAAEC,OAAO,EAAEC,OAAO,CAAC;AACxD;AAKA,OAAO,SAASE,oBAAoBA,CAIlCL,IAAiB,EACjBM,MAAe,EACfJ,OAA6B,EAC7BC,OAAsB,EACK;EAC3B,IAAI,CAACA,OAAO,CAACI,UAAU,EAAE;IACvB,MAAM,IAAIC,KAAK,CAAC,WAAW,CAAC;EAC9B;EACA,OAAOL,OAAO,CAACI,UAAU,CAACP,IAAI,EAAEM,MAAM,EAAEJ,OAAO,EAAEC,OAAO,CAAC;AAC3D;AAKA,OAAO,eAAeM,yBAAyBA,CAI7CT,IAAmE,EACnEM,MAAe,EACfJ,OAA6B,EAC7BC,OAAsB,EAC4B;EAClD,IAAI,CAACA,OAAO,CAACO,eAAe,EAAE;IAC5B,MAAM,IAAIF,KAAK,CAAC,gBAAgB,CAAC;EACnC;EACA,OAAOL,OAAO,CAACO,eAAe,CAACV,IAAI,EAAEM,MAAM,EAAEJ,OAAO,EAAEC,OAAO,CAAC;AAChE"}
|
|
1
|
+
{"version":3,"file":"loader-types.js","names":["parseFromContext","data","loaders","options","context","_parse","parseSyncFromContext","loader","_parseSync","Error","parseInBatchesFromContext","_parseInBatches"],"sources":["../src/loader-types.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\n\nimport {\n FetchLike,\n TransformBatches /* , DataType, SyncDataType, BatchableDataType */\n} from './types';\n\n// LOADERS\n\n/**\n * Core Loader Options\n */\nexport type LoaderOptions = {\n /** fetch options or a custom fetch function */\n fetch?: typeof fetch | FetchLike | RequestInit | null;\n /** Do not throw on errors */\n nothrow?: boolean;\n\n /** loader selection, search first for supplied mimeType */\n mimeType?: string;\n /** loader selection, provide fallback mimeType is server does not provide */\n fallbackMimeType?: string;\n /** loader selection, avoid searching registered loaders */\n ignoreRegisteredLoaders?: boolean;\n\n // general\n /** Experimental: Supply a logger to the parser */\n log?: any;\n /** Force to load WASM libraries from local file system in NodeJS or from loaders.gl CDN in a web browser */\n useLocalLibraries?: boolean;\n\n // batched parsing\n\n /** Size of each batch. `auto` matches batches to size of incoming chunks */\n batchSize?: number | 'auto';\n /** Minimal amount of time between batches */\n batchDebounceMs?: number;\n /** Stop loading after a given number of rows (compare SQL limit clause) */\n limit?: 0;\n /** Experimental: Stop loading after reaching */\n _limitMB?: 0;\n /** Generate metadata batches */\n metadata?: boolean;\n /** Transforms to run on incoming batches */\n transforms?: TransformBatches[];\n\n // workers\n\n /** CDN load workers from */\n CDN?: string | null;\n /** Set to `false` to disable workers */\n worker?: boolean;\n /** Number of concurrent workers (per loader) on desktop browser */\n maxConcurrency?: number;\n /** Number of concurrent workers (per loader) on mobile browsers */\n maxMobileConcurrency?: number;\n /** Set to `false` to prevent reuse workers */\n reuseWorkers?: boolean;\n /** Whether to use workers under Node.js (experimental) */\n _nodeWorkers?: boolean;\n /** set to 'test' to run local worker */\n _workerType?: string;\n\n /** @deprecated `options.batchType` removed, Use `options.<loader>.type` instead */\n batchType?: 'row' | 'columnar' | 'arrow';\n /** @deprecated `options.throw removed`, Use `options.nothrow` instead */\n throws?: boolean;\n /** @deprecated `options.dataType` no longer used */\n dataType?: never;\n /** @deprecated `options.uri` no longer used */\n uri?: never;\n /** @deprecated Use `options.fetch.method` */\n method?: never;\n /** @deprecated Use `options.fetch.headers` */\n headers?: never;\n /** @deprecated Use `options.fetch.body` */\n body?: never;\n /** @deprecated Use `options.fetch.mode` */\n mode?: never;\n /** @deprecated Use `options.fetch.credentials` */\n credentials?: never;\n /** @deprecated Use `options.fetch.cache` */\n cache?: never;\n /** @deprecated Use `options.fetch.redirect` */\n redirect?: never;\n /** @deprecated Use `options.fetch.referrer` */\n referrer?: never;\n /** @deprecated Use `options.fetch.referrerPolicy` */\n referrerPolicy?: never;\n /** @deprecated Use `options.fetch.integrity` */\n integrity?: never;\n /** @deprecated Use `options.fetch.keepalive` */\n keepalive?: never;\n /** @deprecated Use `options.fetch.signal` */\n signal?: never;\n\n // Accept other keys (loader options objects, e.g. `options.csv`, `options.json` ...)\n [loaderId: string]: unknown;\n};\n\ntype PreloadOptions = {\n [key: string]: unknown;\n};\n\n/**\n * A worker loader definition that can be used with `@loaders.gl/core` functions\n */\nexport type Loader<DataT = any, BatchT = any, LoaderOptionsT = LoaderOptions> = {\n /** The result type of this loader */\n dataType?: DataT;\n /** The batched result type of this loader */\n batchType?: BatchT;\n\n /** Default Options */\n options: LoaderOptionsT;\n /** Deprecated Options */\n deprecatedOptions?: Record<string, string | Record<string, string>>;\n\n /** Human readable name */\n name: string;\n /** id should be the same as the field used in LoaderOptions */\n id: string;\n /** module is used to generate worker threads, need to be the module directory name */\n module: string;\n /** Version should be injected by build tools */\n version: string;\n /** A boolean, or a URL */\n worker?: string | boolean;\n // end Worker\n\n /** Which category does this loader belong to */\n category?: string;\n /** File extensions that are potential matches with this loader. */\n extensions: string[];\n /** MIMETypes that indicate a match with this loader. @note Some MIMETypes are generic and supported by many loaders */\n mimeTypes: string[];\n\n /** Is the input of this loader binary */\n binary?: boolean;\n /** Is the input of this loader text */\n text?: boolean;\n\n /** Test some initial bytes of content to see if this loader might be a match */\n tests?: (((ArrayBuffer: ArrayBuffer) => boolean) | ArrayBuffer | string)[];\n\n /** @deprecated */\n supported?: boolean;\n /** @deprecated */\n testText?: (string: string) => boolean;\n};\n\n/**\n * A \"bundled\" loader definition that can be used with `@loaders.gl/core` functions\n * If a worker loader is supported it will also be supported.\n */\nexport type LoaderWithParser<DataT = any, BatchT = any, LoaderOptionsT = LoaderOptions> = Loader<\n DataT,\n BatchT,\n LoaderOptionsT\n> & {\n /** Perform actions before load. @deprecated Not officially supported. */\n preload?: Preload;\n /** Parse atomically from an arraybuffer asynchronously */\n parse: (\n arrayBuffer: ArrayBuffer,\n options?: LoaderOptionsT,\n context?: LoaderContext\n ) => Promise<DataT>;\n parseFile?: (file: Blob, options?: LoaderOptionsT, context?: LoaderContext) => Promise<DataT>;\n /** Parse atomically from an arraybuffer synchronously */\n parseSync?: (\n arrayBuffer: ArrayBuffer,\n options?: LoaderOptionsT,\n context?: LoaderContext\n ) => DataT;\n /** Parse atomically from a string asynchronously */\n parseText?: (text: string, options?: LoaderOptionsT, context?: LoaderContext) => Promise<DataT>;\n /** Parse atomically from a string synchronously */\n parseTextSync?: (text: string, options?: LoaderOptionsT, context?: LoaderContext) => DataT;\n /** Parse batches of data from an iterator, return an iterator that yield parsed batches. */\n parseInBatches?: (\n iterator: AsyncIterable<ArrayBuffer> | Iterable<ArrayBuffer>,\n options?: LoaderOptionsT,\n context?: LoaderContext\n ) => AsyncIterable<BatchT>;\n /** Like `parseInBatches` for loaders that don't integrate with fetch. @deprecated Not officially supported. */\n parseFileInBatches?: (\n file: Blob,\n options?: LoaderOptionsT,\n context?: LoaderContext\n ) => AsyncIterable<BatchT>;\n};\n\n/**\n * A Loader context is provided as a third parameters to a loader object's\n * parse functions when that loader is called by other loaders rather then\n * directly by the application.\n *\n * - The context object allows the subloaders to be aware of the parameters and\n * options that the application provided in the top level call.\n * - The context also providedsaccess to parse functions so that the subloader\n * does not need to include the core module.\n * - In addition, the context's parse functions may also redirect loads from worker\n * threads back to main thread.\n */\nexport type LoaderContext = {\n /** Loader list provided to top-level loader call plus any sub loaders */\n loaders?: Loader[] | null;\n /** If URL is available. */\n url?: string;\n /** the file name component of the URL (leading path and query string removed) */\n filename?: string;\n /** the directory name component of the URL (leading path excluding file name and query string) */\n baseUrl?: string;\n /** Query string (characters after `?`) */\n queryString?: string;\n\n /** Provides access to any application overrides of fetch() */\n fetch: typeof fetch | FetchLike;\n\n /** TBD */\n response?: Response;\n\n /**\n * Parse function for subloaders. Avoids importing `core`. In workers, may redirect to main thread\n */\n _parse: (\n arrayBuffer: ArrayBuffer,\n loaders?: Loader | Loader[] | LoaderOptions,\n options?: LoaderOptions,\n context?: LoaderContext\n ) => Promise<any>;\n\n /**\n * ParseSync function. Avoids importing `core`. In workers, may redirect to main thread\n * @deprecated Do not call directly, use `parseSyncFromContext` instead\n */\n _parseSync?: (\n arrayBuffer: ArrayBuffer,\n loaders?: Loader | Loader[] | LoaderOptions,\n options?: LoaderOptions,\n context?: LoaderContext\n ) => any;\n\n /**\n * ParseInBatches function. Avoids importing `core`.\n * @deprecated Do not call directly, use `parseInBatchesFromContext` instead\n */\n _parseInBatches?: (\n iterator: AsyncIterable<ArrayBuffer> | Iterable<ArrayBuffer> | Response,\n loaders?: Loader | Loader[] | LoaderOptions,\n options?: LoaderOptions,\n context?: LoaderContext\n ) => AsyncIterable<any> | Promise<AsyncIterable<any>>;\n};\n\n// type Parse = (\n// arrayBuffer: ArrayBuffer,\n// options?: LoaderOptions,\n// context?: LoaderContext\n// ) => Promise<any>;\n// type ParseSync = (\n// arrayBuffer: ArrayBuffer,\n// options?: LoaderOptions,\n// context?: LoaderContext\n// ) => any;\n// type ParseText = (text: string, options?: LoaderOptions) => Promise<any>;\n// type ParseTextSync = (text: string, options?: LoaderOptions) => any;\n// type ParseInBatches = (\n// iterator: AsyncIterable<ArrayBuffer> | Iterable<ArrayBuffer>,\n// options?: LoaderOptions,\n// context?: LoaderContext\n// ) => AsyncIterable<any>;\n// type ParseFileInBatches = (\n// file: Blob,\n// options?: LoaderOptions,\n// context?: LoaderContext\n// ) => AsyncIterable<any>;\n\ntype Preload = (url: string, options?: PreloadOptions) => any;\n\n/** Typescript helper to extract options type from a generic loader type */\nexport type LoaderOptionsType<T = Loader> = T extends Loader<any, any, infer Options>\n ? Options\n : never;\n/** Typescript helper to extract data type from a generic loader type */\nexport type LoaderReturnType<T = Loader> = T extends Loader<infer Return, any, any>\n ? Return\n : never;\n/** Typescript helper to extract batch type from a generic loader type */\nexport type LoaderBatchType<T = Loader> = T extends Loader<any, infer Batch, any> ? Batch : never;\n\n/**\n * Parses `data` asynchronously using the supplied loader, parse function provided via the loader context\n */\nexport async function parseFromContext<\n LoaderT extends Loader,\n OptionsT extends LoaderOptions = LoaderOptionsType<LoaderT>\n>(\n data: ArrayBuffer,\n loader: LoaderT,\n options: OptionsT | undefined,\n context: LoaderContext\n): Promise<LoaderReturnType<LoaderT>>;\n\n/**\n * Parses `data` asynchronously by matching one of the supplied loader\n */\nexport async function parseFromContext(\n data: ArrayBuffer,\n loaders: Loader[],\n options: LoaderOptions | undefined,\n context: LoaderContext\n): Promise<unknown>;\n\n/**\n * Parses `data` using a specified loader\n * @param data\n * @param loaders\n * @param options\n * @param context\n */\n// implementation signature\nexport async function parseFromContext(\n data: ArrayBuffer,\n loaders: Loader | Loader[],\n options: LoaderOptions | undefined,\n context: LoaderContext\n): Promise<unknown> {\n return context._parse(data, loaders, options, context);\n}\n\n/**\n * Parses `data` synchronously using the specified loader, parse function provided via the loader context\n */\nexport function parseSyncFromContext<\n LoaderT extends Loader,\n OptionsT extends LoaderOptions = LoaderOptionsType<LoaderT>\n>(\n data: ArrayBuffer,\n loader: LoaderT,\n options: OptionsT | undefined,\n context: LoaderContext\n): LoaderReturnType<LoaderT> {\n if (!context._parseSync) {\n throw new Error('parseSync');\n }\n return context._parseSync(data, loader, options, context);\n}\n\n/**\n * Parses `data` synchronously using a specified loader, parse function provided via the loader context\n */\nexport async function parseInBatchesFromContext<\n LoaderT extends Loader,\n OptionsT extends LoaderOptions = LoaderOptionsType<LoaderT>\n>(\n data: Iterable<ArrayBuffer> | AsyncIterable<ArrayBuffer> | Response,\n loader: LoaderT,\n options: OptionsT | undefined,\n context: LoaderContext\n): Promise<AsyncIterable<LoaderBatchType<LoaderT>>> {\n if (!context._parseInBatches) {\n throw new Error('parseInBatches');\n }\n return context._parseInBatches(data, loader, options, context);\n}\n"],"mappings":"AAoUA,OAAO,eAAeA,gBAAgBA,CACpCC,IAAiB,EACjBC,OAA0B,EAC1BC,OAAkC,EAClCC,OAAsB,EACJ;EAClB,OAAOA,OAAO,CAACC,MAAM,CAACJ,IAAI,EAAEC,OAAO,EAAEC,OAAO,EAAEC,OAAO,CAAC;AACxD;AAKA,OAAO,SAASE,oBAAoBA,CAIlCL,IAAiB,EACjBM,MAAe,EACfJ,OAA6B,EAC7BC,OAAsB,EACK;EAC3B,IAAI,CAACA,OAAO,CAACI,UAAU,EAAE;IACvB,MAAM,IAAIC,KAAK,CAAC,WAAW,CAAC;EAC9B;EACA,OAAOL,OAAO,CAACI,UAAU,CAACP,IAAI,EAAEM,MAAM,EAAEJ,OAAO,EAAEC,OAAO,CAAC;AAC3D;AAKA,OAAO,eAAeM,yBAAyBA,CAI7CT,IAAmE,EACnEM,MAAe,EACfJ,OAA6B,EAC7BC,OAAsB,EAC4B;EAClD,IAAI,CAACA,OAAO,CAACO,eAAe,EAAE;IAC5B,MAAM,IAAIF,KAAK,CAAC,gBAAgB,CAAC;EACnC;EACA,OAAOL,OAAO,CAACO,eAAe,CAACV,IAAI,EAAEM,MAAM,EAAEJ,OAAO,EAAEC,OAAO,CAAC;AAChE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-types.d.ts","sourceRoot":"","sources":["../src/service-types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"service-types.d.ts","sourceRoot":"","sources":["../src/service-types.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,WAAW,EAAE,gBAAgB,EAAC,MAAM,4BAA4B,CAAC;AAE9E,8BAA8B;AAC9B,MAAM,WAAW,OAAO,CAAC,OAAO,GAAG,WAAW,EAAE,YAAY,GAAG,gBAAgB;IAC7E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IAClC,MAAM,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC;CACtC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-types.js","names":[],"sources":["../src/service-types.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport type {ImageSource, ImageSourceProps} from './lib/sources/image-source';\n\n/** Export interface source */\nexport interface Service<SourceT = ImageSource, SourcePropsT = ImageSourceProps> {\n source?: SourceT;\n props?: SourcePropsT;\n type: string;\n testURL: (url: string) => boolean;\n create(props: SourcePropsT): SourceT;\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"service-types.js","names":[],"sources":["../src/service-types.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\n\nimport type {ImageSource, ImageSourceProps} from './lib/sources/image-source';\n\n/** Export interface source */\nexport interface Service<SourceT = ImageSource, SourcePropsT = ImageSourceProps> {\n source?: SourceT;\n props?: SourcePropsT;\n type: string;\n testURL: (url: string) => boolean;\n create(props: SourcePropsT): SourceT;\n}\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"writer-types.d.ts","sourceRoot":"","sources":["../src/writer-types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"writer-types.d.ts","sourceRoot":"","sources":["../src/writer-types.ts"],"names":[],"mappings":"AAKA,0BAA0B;AAC1B,MAAM,MAAM,aAAa,GAAG;IAC1B,wFAAwF;IACxF,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,4GAA4G;IAC5G,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,8BAA8B;IAC9B,CAAC,QAAQ,EAAE,MAAM,GAAG,GAAG,CAAC;CACzB,CAAC;AAEF;;GAEG;AAEH,MAAM,MAAM,MAAM,CAAC,KAAK,GAAG,OAAO,EAAE,MAAM,GAAG,OAAO,EAAE,cAAc,GAAG,aAAa,IAAI;IACtF,IAAI,EAAE,MAAM,CAAC;IAEb,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,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
{"version":3,"file":"writer-types.js","names":[],"sources":["../src/writer-types.ts"],"sourcesContent":["// loaders.gl, MIT license\n\n// WRITERS\n\n/** Options for writers */\nexport type WriterOptions = {\n /** worker source. If is set will be used instead of loading worker from the Internet */\n source?: string | null;\n /** Force to load WASM libraries from local file system in NodeJS or from loaders.gl CDN in a web browser */\n useLocalLibraries?: boolean;\n /** writer-specific options */\n [writerId: string]: any;\n};\n\n/**\n * A writer definition that can be used with `@loaders.gl/core` functions\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type Writer<DataT = unknown, BatchT = unknown, WriterOptionsT = WriterOptions> = {\n name: string;\n\n id: string;\n module: string;\n version: string;\n worker?: string | boolean;\n\n // TODO - are these are needed?\n extensions?: string[];\n mimeTypes?: string[];\n binary?: boolean;\n text?: boolean;\n\n options: WriterOptionsT;\n deprecatedOptions?: Record<string, string>;\n\n // encodeText?: EncodeText;\n // encode?: Encode;\n encode?(data: DataT, options?: WriterOptionsT): Promise<ArrayBuffer>;\n encodeSync?(data: DataT, options?: WriterOptionsT): ArrayBuffer;\n\n encodeText?(table: DataT, options?: WriterOptionsT): Promise<string>;\n encodeTextSync?(table: DataT, options?: WriterOptionsT): string;\n\n encodeInBatches?(data: AsyncIterable<any>, options?: WriterOptionsT): AsyncIterable<ArrayBuffer>;\n\n encodeURLtoURL?: (\n inputUrl: string,\n outputUrl: string,\n options?: WriterOptionsT\n ) => Promise<string>;\n};\n\n/** Typescript helper to extract the writer options type from a generic writer type */\nexport type WriterOptionsType<T = Writer> = T extends Writer<unknown, unknown, infer Options>\n ? Options\n : never;\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"writer-types.js","names":[],"sources":["../src/writer-types.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\n\n// WRITERS\n\n/** Options for writers */\nexport type WriterOptions = {\n /** worker source. If is set will be used instead of loading worker from the Internet */\n source?: string | null;\n /** Force to load WASM libraries from local file system in NodeJS or from loaders.gl CDN in a web browser */\n useLocalLibraries?: boolean;\n /** writer-specific options */\n [writerId: string]: any;\n};\n\n/**\n * A writer definition that can be used with `@loaders.gl/core` functions\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type Writer<DataT = unknown, BatchT = unknown, WriterOptionsT = WriterOptions> = {\n name: string;\n\n id: string;\n module: string;\n version: string;\n worker?: string | boolean;\n\n // TODO - are these are needed?\n extensions?: string[];\n mimeTypes?: string[];\n binary?: boolean;\n text?: boolean;\n\n options: WriterOptionsT;\n deprecatedOptions?: Record<string, string>;\n\n // encodeText?: EncodeText;\n // encode?: Encode;\n encode?(data: DataT, options?: WriterOptionsT): Promise<ArrayBuffer>;\n encodeSync?(data: DataT, options?: WriterOptionsT): ArrayBuffer;\n\n encodeText?(table: DataT, options?: WriterOptionsT): Promise<string>;\n encodeTextSync?(table: DataT, options?: WriterOptionsT): string;\n\n encodeInBatches?(data: AsyncIterable<any>, options?: WriterOptionsT): AsyncIterable<ArrayBuffer>;\n\n encodeURLtoURL?: (\n inputUrl: string,\n outputUrl: string,\n options?: WriterOptionsT\n ) => Promise<string>;\n};\n\n/** Typescript helper to extract the writer options type from a generic writer type */\nexport type WriterOptionsType<T = Writer> = T extends Writer<unknown, unknown, infer Options>\n ? Options\n : never;\n"],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loaders.gl/loader-utils",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.8",
|
|
4
4
|
"description": "Framework-independent loaders for 3D graphics formats",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"scripts": {},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@babel/runtime": "^7.3.1",
|
|
50
|
-
"@loaders.gl/worker-utils": "4.0.0-beta.
|
|
50
|
+
"@loaders.gl/worker-utils": "4.0.0-beta.8",
|
|
51
51
|
"@probe.gl/stats": "^4.0.2"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "ec3d1747b4c01c52a235455d6462680e711b4e19"
|
|
54
54
|
}
|
package/src/index.ts
CHANGED
package/src/lib/files/file.ts
CHANGED
package/src/lib/node/buffer.ts
CHANGED
package/src/lib/node/stream.ts
CHANGED
package/src/loader-types.ts
CHANGED
package/src/service-types.ts
CHANGED