@itwin/rpcinterface-full-stack-tests 5.2.0-dev.8 → 5.3.0-dev.2

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.
@@ -1,2255 +0,0 @@
1
- "use strict";
2
- (self["webpackChunk_itwin_rpcinterface_full_stack_tests"] = self["webpackChunk_itwin_rpcinterface_full_stack_tests"] || []).push([["vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_1_6_node_modules_loaders_gl_draco_di-0642a6"],{
3
-
4
- /***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/draco-loader.js":
5
- /*!****************************************************************************************************************************!*\
6
- !*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/draco-loader.js ***!
7
- \****************************************************************************************************************************/
8
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9
-
10
- __webpack_require__.r(__webpack_exports__);
11
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12
- /* harmony export */ DracoLoader: () => (/* binding */ DracoLoader),
13
- /* harmony export */ _TypecheckDracoLoader: () => (/* binding */ _TypecheckDracoLoader)
14
- /* harmony export */ });
15
- /* harmony import */ var _lib_utils_version__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/utils/version */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/lib/utils/version.js");
16
-
17
- const DEFAULT_DRACO_OPTIONS = {
18
- draco: {
19
- decoderType: typeof WebAssembly === 'object' ? 'wasm' : 'js',
20
- libraryPath: 'libs/',
21
- extraAttributes: {},
22
- attributeNameEntry: undefined
23
- }
24
- };
25
- const DracoLoader = {
26
- name: 'Draco',
27
- id: 'draco',
28
- module: 'draco',
29
- shapes: ['mesh'],
30
- version: _lib_utils_version__WEBPACK_IMPORTED_MODULE_0__.VERSION,
31
- worker: true,
32
- extensions: ['drc'],
33
- mimeTypes: ['application/octet-stream'],
34
- binary: true,
35
- tests: ['DRACO'],
36
- options: DEFAULT_DRACO_OPTIONS
37
- };
38
- const _TypecheckDracoLoader = DracoLoader;
39
-
40
-
41
- /***/ }),
42
-
43
- /***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/draco-writer.js":
44
- /*!****************************************************************************************************************************!*\
45
- !*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/draco-writer.js ***!
46
- \****************************************************************************************************************************/
47
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
48
-
49
- __webpack_require__.r(__webpack_exports__);
50
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
51
- /* harmony export */ DracoWriter: () => (/* binding */ DracoWriter)
52
- /* harmony export */ });
53
- /* harmony import */ var _lib_draco_builder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lib/draco-builder */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/lib/draco-builder.js");
54
- /* harmony import */ var _lib_draco_module_loader__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib/draco-module-loader */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/lib/draco-module-loader.js");
55
- /* harmony import */ var _lib_utils_version__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/utils/version */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/lib/utils/version.js");
56
-
57
-
58
-
59
- const DEFAULT_DRACO_OPTIONS = {
60
- pointcloud: false,
61
- attributeNameEntry: 'name'
62
- };
63
- const DracoWriter = {
64
- name: 'DRACO',
65
- id: 'draco',
66
- module: 'draco',
67
- version: _lib_utils_version__WEBPACK_IMPORTED_MODULE_0__.VERSION,
68
- extensions: ['drc'],
69
- encode,
70
- options: {
71
- draco: DEFAULT_DRACO_OPTIONS
72
- }
73
- };
74
-
75
- async function encode(data, options = {}) {
76
- const {
77
- draco
78
- } = await (0,_lib_draco_module_loader__WEBPACK_IMPORTED_MODULE_1__.loadDracoEncoderModule)(options);
79
- const dracoBuilder = new _lib_draco_builder__WEBPACK_IMPORTED_MODULE_2__["default"](draco);
80
-
81
- try {
82
- return dracoBuilder.encodeSync(data, options.draco);
83
- } finally {
84
- dracoBuilder.destroy();
85
- }
86
- }
87
-
88
-
89
- /***/ }),
90
-
91
- /***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/index.js":
92
- /*!*********************************************************************************************************************!*\
93
- !*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/index.js ***!
94
- \*********************************************************************************************************************/
95
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
96
-
97
- __webpack_require__.r(__webpack_exports__);
98
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
99
- /* harmony export */ DracoLoader: () => (/* binding */ DracoLoader),
100
- /* harmony export */ DracoWorkerLoader: () => (/* reexport safe */ _draco_loader__WEBPACK_IMPORTED_MODULE_1__.DracoLoader),
101
- /* harmony export */ DracoWriter: () => (/* reexport safe */ _draco_writer__WEBPACK_IMPORTED_MODULE_0__.DracoWriter),
102
- /* harmony export */ _TypecheckDracoLoader: () => (/* binding */ _TypecheckDracoLoader)
103
- /* harmony export */ });
104
- /* harmony import */ var _draco_loader__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./draco-loader */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/draco-loader.js");
105
- /* harmony import */ var _lib_draco_parser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./lib/draco-parser */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/lib/draco-parser.js");
106
- /* harmony import */ var _lib_draco_module_loader__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lib/draco-module-loader */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/lib/draco-module-loader.js");
107
- /* harmony import */ var _draco_writer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./draco-writer */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/draco-writer.js");
108
-
109
-
110
-
111
-
112
-
113
- const DracoLoader = { ..._draco_loader__WEBPACK_IMPORTED_MODULE_1__.DracoLoader,
114
- parse
115
- };
116
-
117
- async function parse(arrayBuffer, options) {
118
- const {
119
- draco
120
- } = await (0,_lib_draco_module_loader__WEBPACK_IMPORTED_MODULE_2__.loadDracoDecoderModule)(options);
121
- const dracoParser = new _lib_draco_parser__WEBPACK_IMPORTED_MODULE_3__["default"](draco);
122
-
123
- try {
124
- return dracoParser.parseSync(arrayBuffer, options === null || options === void 0 ? void 0 : options.draco);
125
- } finally {
126
- dracoParser.destroy();
127
- }
128
- }
129
-
130
- const _TypecheckDracoLoader = DracoLoader;
131
-
132
-
133
- /***/ }),
134
-
135
- /***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/lib/draco-builder.js":
136
- /*!*********************************************************************************************************************************!*\
137
- !*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/lib/draco-builder.js ***!
138
- \*********************************************************************************************************************************/
139
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
140
-
141
- __webpack_require__.r(__webpack_exports__);
142
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
143
- /* harmony export */ "default": () => (/* binding */ DracoBuilder)
144
- /* harmony export */ });
145
- /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.26.10/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
146
-
147
- const GLTF_TO_DRACO_ATTRIBUTE_NAME_MAP = {
148
- POSITION: 'POSITION',
149
- NORMAL: 'NORMAL',
150
- COLOR_0: 'COLOR',
151
- TEXCOORD_0: 'TEX_COORD'
152
- };
153
-
154
- const noop = () => {};
155
-
156
- class DracoBuilder {
157
- constructor(draco) {
158
- (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "draco", void 0);
159
-
160
- (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "dracoEncoder", void 0);
161
-
162
- (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "dracoMeshBuilder", void 0);
163
-
164
- (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "dracoMetadataBuilder", void 0);
165
-
166
- (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "log", void 0);
167
-
168
- this.draco = draco;
169
- this.dracoEncoder = new this.draco.Encoder();
170
- this.dracoMeshBuilder = new this.draco.MeshBuilder();
171
- this.dracoMetadataBuilder = new this.draco.MetadataBuilder();
172
- }
173
-
174
- destroy() {
175
- this.destroyEncodedObject(this.dracoMeshBuilder);
176
- this.destroyEncodedObject(this.dracoEncoder);
177
- this.destroyEncodedObject(this.dracoMetadataBuilder);
178
- this.dracoMeshBuilder = null;
179
- this.dracoEncoder = null;
180
- this.draco = null;
181
- }
182
-
183
- destroyEncodedObject(object) {
184
- if (object) {
185
- this.draco.destroy(object);
186
- }
187
- }
188
-
189
- encodeSync(mesh, options = {}) {
190
- this.log = noop;
191
-
192
- this._setOptions(options);
193
-
194
- return options.pointcloud ? this._encodePointCloud(mesh, options) : this._encodeMesh(mesh, options);
195
- }
196
-
197
- _getAttributesFromMesh(mesh) {
198
- const attributes = { ...mesh,
199
- ...mesh.attributes
200
- };
201
-
202
- if (mesh.indices) {
203
- attributes.indices = mesh.indices;
204
- }
205
-
206
- return attributes;
207
- }
208
-
209
- _encodePointCloud(pointcloud, options) {
210
- const dracoPointCloud = new this.draco.PointCloud();
211
-
212
- if (options.metadata) {
213
- this._addGeometryMetadata(dracoPointCloud, options.metadata);
214
- }
215
-
216
- const attributes = this._getAttributesFromMesh(pointcloud);
217
-
218
- this._createDracoPointCloud(dracoPointCloud, attributes, options);
219
-
220
- const dracoData = new this.draco.DracoInt8Array();
221
-
222
- try {
223
- const encodedLen = this.dracoEncoder.EncodePointCloudToDracoBuffer(dracoPointCloud, false, dracoData);
224
-
225
- if (!(encodedLen > 0)) {
226
- throw new Error('Draco encoding failed.');
227
- }
228
-
229
- this.log("DRACO encoded ".concat(dracoPointCloud.num_points(), " points\n with ").concat(dracoPointCloud.num_attributes(), " attributes into ").concat(encodedLen, " bytes"));
230
- return dracoInt8ArrayToArrayBuffer(dracoData);
231
- } finally {
232
- this.destroyEncodedObject(dracoData);
233
- this.destroyEncodedObject(dracoPointCloud);
234
- }
235
- }
236
-
237
- _encodeMesh(mesh, options) {
238
- const dracoMesh = new this.draco.Mesh();
239
-
240
- if (options.metadata) {
241
- this._addGeometryMetadata(dracoMesh, options.metadata);
242
- }
243
-
244
- const attributes = this._getAttributesFromMesh(mesh);
245
-
246
- this._createDracoMesh(dracoMesh, attributes, options);
247
-
248
- const dracoData = new this.draco.DracoInt8Array();
249
-
250
- try {
251
- const encodedLen = this.dracoEncoder.EncodeMeshToDracoBuffer(dracoMesh, dracoData);
252
-
253
- if (encodedLen <= 0) {
254
- throw new Error('Draco encoding failed.');
255
- }
256
-
257
- this.log("DRACO encoded ".concat(dracoMesh.num_points(), " points\n with ").concat(dracoMesh.num_attributes(), " attributes into ").concat(encodedLen, " bytes"));
258
- return dracoInt8ArrayToArrayBuffer(dracoData);
259
- } finally {
260
- this.destroyEncodedObject(dracoData);
261
- this.destroyEncodedObject(dracoMesh);
262
- }
263
- }
264
-
265
- _setOptions(options) {
266
- if ('speed' in options) {
267
- this.dracoEncoder.SetSpeedOptions(...options.speed);
268
- }
269
-
270
- if ('method' in options) {
271
- const dracoMethod = this.draco[options.method || 'MESH_SEQUENTIAL_ENCODING'];
272
- this.dracoEncoder.SetEncodingMethod(dracoMethod);
273
- }
274
-
275
- if ('quantization' in options) {
276
- for (const attribute in options.quantization) {
277
- const bits = options.quantization[attribute];
278
- const dracoPosition = this.draco[attribute];
279
- this.dracoEncoder.SetAttributeQuantization(dracoPosition, bits);
280
- }
281
- }
282
- }
283
-
284
- _createDracoMesh(dracoMesh, attributes, options) {
285
- const optionalMetadata = options.attributesMetadata || {};
286
-
287
- try {
288
- const positions = this._getPositionAttribute(attributes);
289
-
290
- if (!positions) {
291
- throw new Error('positions');
292
- }
293
-
294
- const vertexCount = positions.length / 3;
295
-
296
- for (let attributeName in attributes) {
297
- const attribute = attributes[attributeName];
298
- attributeName = GLTF_TO_DRACO_ATTRIBUTE_NAME_MAP[attributeName] || attributeName;
299
-
300
- const uniqueId = this._addAttributeToMesh(dracoMesh, attributeName, attribute, vertexCount);
301
-
302
- if (uniqueId !== -1) {
303
- this._addAttributeMetadata(dracoMesh, uniqueId, {
304
- name: attributeName,
305
- ...(optionalMetadata[attributeName] || {})
306
- });
307
- }
308
- }
309
- } catch (error) {
310
- this.destroyEncodedObject(dracoMesh);
311
- throw error;
312
- }
313
-
314
- return dracoMesh;
315
- }
316
-
317
- _createDracoPointCloud(dracoPointCloud, attributes, options) {
318
- const optionalMetadata = options.attributesMetadata || {};
319
-
320
- try {
321
- const positions = this._getPositionAttribute(attributes);
322
-
323
- if (!positions) {
324
- throw new Error('positions');
325
- }
326
-
327
- const vertexCount = positions.length / 3;
328
-
329
- for (let attributeName in attributes) {
330
- const attribute = attributes[attributeName];
331
- attributeName = GLTF_TO_DRACO_ATTRIBUTE_NAME_MAP[attributeName] || attributeName;
332
-
333
- const uniqueId = this._addAttributeToMesh(dracoPointCloud, attributeName, attribute, vertexCount);
334
-
335
- if (uniqueId !== -1) {
336
- this._addAttributeMetadata(dracoPointCloud, uniqueId, {
337
- name: attributeName,
338
- ...(optionalMetadata[attributeName] || {})
339
- });
340
- }
341
- }
342
- } catch (error) {
343
- this.destroyEncodedObject(dracoPointCloud);
344
- throw error;
345
- }
346
-
347
- return dracoPointCloud;
348
- }
349
-
350
- _addAttributeToMesh(mesh, attributeName, attribute, vertexCount) {
351
- if (!ArrayBuffer.isView(attribute)) {
352
- return -1;
353
- }
354
-
355
- const type = this._getDracoAttributeType(attributeName);
356
-
357
- const size = attribute.length / vertexCount;
358
-
359
- if (type === 'indices') {
360
- const numFaces = attribute.length / 3;
361
- this.log("Adding attribute ".concat(attributeName, ", size ").concat(numFaces));
362
- this.dracoMeshBuilder.AddFacesToMesh(mesh, numFaces, attribute);
363
- return -1;
364
- }
365
-
366
- this.log("Adding attribute ".concat(attributeName, ", size ").concat(size));
367
- const builder = this.dracoMeshBuilder;
368
- const {
369
- buffer
370
- } = attribute;
371
-
372
- switch (attribute.constructor) {
373
- case Int8Array:
374
- return builder.AddInt8Attribute(mesh, type, vertexCount, size, new Int8Array(buffer));
375
-
376
- case Int16Array:
377
- return builder.AddInt16Attribute(mesh, type, vertexCount, size, new Int16Array(buffer));
378
-
379
- case Int32Array:
380
- return builder.AddInt32Attribute(mesh, type, vertexCount, size, new Int32Array(buffer));
381
-
382
- case Uint8Array:
383
- case Uint8ClampedArray:
384
- return builder.AddUInt8Attribute(mesh, type, vertexCount, size, new Uint8Array(buffer));
385
-
386
- case Uint16Array:
387
- return builder.AddUInt16Attribute(mesh, type, vertexCount, size, new Uint16Array(buffer));
388
-
389
- case Uint32Array:
390
- return builder.AddUInt32Attribute(mesh, type, vertexCount, size, new Uint32Array(buffer));
391
-
392
- case Float32Array:
393
- default:
394
- return builder.AddFloatAttribute(mesh, type, vertexCount, size, new Float32Array(buffer));
395
- }
396
- }
397
-
398
- _getDracoAttributeType(attributeName) {
399
- switch (attributeName.toLowerCase()) {
400
- case 'indices':
401
- return 'indices';
402
-
403
- case 'position':
404
- case 'positions':
405
- case 'vertices':
406
- return this.draco.POSITION;
407
-
408
- case 'normal':
409
- case 'normals':
410
- return this.draco.NORMAL;
411
-
412
- case 'color':
413
- case 'colors':
414
- return this.draco.COLOR;
415
-
416
- case 'texcoord':
417
- case 'texcoords':
418
- return this.draco.TEX_COORD;
419
-
420
- default:
421
- return this.draco.GENERIC;
422
- }
423
- }
424
-
425
- _getPositionAttribute(attributes) {
426
- for (const attributeName in attributes) {
427
- const attribute = attributes[attributeName];
428
-
429
- const dracoType = this._getDracoAttributeType(attributeName);
430
-
431
- if (dracoType === this.draco.POSITION) {
432
- return attribute;
433
- }
434
- }
435
-
436
- return null;
437
- }
438
-
439
- _addGeometryMetadata(dracoGeometry, metadata) {
440
- const dracoMetadata = new this.draco.Metadata();
441
-
442
- this._populateDracoMetadata(dracoMetadata, metadata);
443
-
444
- this.dracoMeshBuilder.AddMetadata(dracoGeometry, dracoMetadata);
445
- }
446
-
447
- _addAttributeMetadata(dracoGeometry, uniqueAttributeId, metadata) {
448
- const dracoAttributeMetadata = new this.draco.Metadata();
449
-
450
- this._populateDracoMetadata(dracoAttributeMetadata, metadata);
451
-
452
- this.dracoMeshBuilder.SetMetadataForAttribute(dracoGeometry, uniqueAttributeId, dracoAttributeMetadata);
453
- }
454
-
455
- _populateDracoMetadata(dracoMetadata, metadata) {
456
- for (const [key, value] of getEntries(metadata)) {
457
- switch (typeof value) {
458
- case 'number':
459
- if (Math.trunc(value) === value) {
460
- this.dracoMetadataBuilder.AddIntEntry(dracoMetadata, key, value);
461
- } else {
462
- this.dracoMetadataBuilder.AddDoubleEntry(dracoMetadata, key, value);
463
- }
464
-
465
- break;
466
-
467
- case 'object':
468
- if (value instanceof Int32Array) {
469
- this.dracoMetadataBuilder.AddIntEntryArray(dracoMetadata, key, value, value.length);
470
- }
471
-
472
- break;
473
-
474
- case 'string':
475
- default:
476
- this.dracoMetadataBuilder.AddStringEntry(dracoMetadata, key, value);
477
- }
478
- }
479
- }
480
-
481
- }
482
-
483
- function dracoInt8ArrayToArrayBuffer(dracoData) {
484
- const byteLength = dracoData.size();
485
- const outputBuffer = new ArrayBuffer(byteLength);
486
- const outputData = new Int8Array(outputBuffer);
487
-
488
- for (let i = 0; i < byteLength; ++i) {
489
- outputData[i] = dracoData.GetValue(i);
490
- }
491
-
492
- return outputBuffer;
493
- }
494
-
495
- function getEntries(container) {
496
- const hasEntriesFunc = container.entries && !container.hasOwnProperty('entries');
497
- return hasEntriesFunc ? container.entries() : Object.entries(container);
498
- }
499
-
500
-
501
- /***/ }),
502
-
503
- /***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/lib/draco-module-loader.js":
504
- /*!***************************************************************************************************************************************!*\
505
- !*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/lib/draco-module-loader.js ***!
506
- \***************************************************************************************************************************************/
507
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
508
-
509
- __webpack_require__.r(__webpack_exports__);
510
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
511
- /* harmony export */ loadDracoDecoderModule: () => (/* binding */ loadDracoDecoderModule),
512
- /* harmony export */ loadDracoEncoderModule: () => (/* binding */ loadDracoEncoderModule)
513
- /* harmony export */ });
514
- /* harmony import */ var _loaders_gl_worker_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @loaders.gl/worker-utils */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.1.6/node_modules/@loaders.gl/worker-utils/dist/esm/lib/library-utils/library-utils.js");
515
-
516
- const DRACO_VERSION = '1.4.1';
517
- const DRACO_JS_DECODER_URL = "https://www.gstatic.com/draco/versioned/decoders/".concat(DRACO_VERSION, "/draco_decoder.js");
518
- const DRACO_WASM_WRAPPER_URL = "https://www.gstatic.com/draco/versioned/decoders/".concat(DRACO_VERSION, "/draco_wasm_wrapper.js");
519
- const DRACO_WASM_DECODER_URL = "https://www.gstatic.com/draco/versioned/decoders/".concat(DRACO_VERSION, "/draco_decoder.wasm");
520
- const DRACO_ENCODER_URL = "https://raw.githubusercontent.com/google/draco/".concat(DRACO_VERSION, "/javascript/draco_encoder.js");
521
- let loadDecoderPromise;
522
- let loadEncoderPromise;
523
- async function loadDracoDecoderModule(options) {
524
- const modules = options.modules || {};
525
-
526
- if (modules.draco3d) {
527
- loadDecoderPromise = loadDecoderPromise || modules.draco3d.createDecoderModule({}).then(draco => {
528
- return {
529
- draco
530
- };
531
- });
532
- } else {
533
- loadDecoderPromise = loadDecoderPromise || loadDracoDecoder(options);
534
- }
535
-
536
- return await loadDecoderPromise;
537
- }
538
- async function loadDracoEncoderModule(options) {
539
- const modules = options.modules || {};
540
-
541
- if (modules.draco3d) {
542
- loadEncoderPromise = loadEncoderPromise || modules.draco3d.createEncoderModule({}).then(draco => {
543
- return {
544
- draco
545
- };
546
- });
547
- } else {
548
- loadEncoderPromise = loadEncoderPromise || loadDracoEncoder(options);
549
- }
550
-
551
- return await loadEncoderPromise;
552
- }
553
-
554
- async function loadDracoDecoder(options) {
555
- let DracoDecoderModule;
556
- let wasmBinary;
557
-
558
- switch (options.draco && options.draco.decoderType) {
559
- case 'js':
560
- DracoDecoderModule = await (0,_loaders_gl_worker_utils__WEBPACK_IMPORTED_MODULE_0__.loadLibrary)(DRACO_JS_DECODER_URL, 'draco', options);
561
- break;
562
-
563
- case 'wasm':
564
- default:
565
- [DracoDecoderModule, wasmBinary] = await Promise.all([await (0,_loaders_gl_worker_utils__WEBPACK_IMPORTED_MODULE_0__.loadLibrary)(DRACO_WASM_WRAPPER_URL, 'draco', options), await (0,_loaders_gl_worker_utils__WEBPACK_IMPORTED_MODULE_0__.loadLibrary)(DRACO_WASM_DECODER_URL, 'draco', options)]);
566
- }
567
-
568
- DracoDecoderModule = DracoDecoderModule || globalThis.DracoDecoderModule;
569
- return await initializeDracoDecoder(DracoDecoderModule, wasmBinary);
570
- }
571
-
572
- function initializeDracoDecoder(DracoDecoderModule, wasmBinary) {
573
- const options = {};
574
-
575
- if (wasmBinary) {
576
- options.wasmBinary = wasmBinary;
577
- }
578
-
579
- return new Promise(resolve => {
580
- DracoDecoderModule({ ...options,
581
- onModuleLoaded: draco => resolve({
582
- draco
583
- })
584
- });
585
- });
586
- }
587
-
588
- async function loadDracoEncoder(options) {
589
- let DracoEncoderModule = await (0,_loaders_gl_worker_utils__WEBPACK_IMPORTED_MODULE_0__.loadLibrary)(DRACO_ENCODER_URL, 'draco', options);
590
- DracoEncoderModule = DracoEncoderModule || globalThis.DracoEncoderModule;
591
- return new Promise(resolve => {
592
- DracoEncoderModule({
593
- onModuleLoaded: draco => resolve({
594
- draco
595
- })
596
- });
597
- });
598
- }
599
-
600
-
601
- /***/ }),
602
-
603
- /***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/lib/draco-parser.js":
604
- /*!********************************************************************************************************************************!*\
605
- !*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/lib/draco-parser.js ***!
606
- \********************************************************************************************************************************/
607
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
608
-
609
- __webpack_require__.r(__webpack_exports__);
610
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
611
- /* harmony export */ "default": () => (/* binding */ DracoParser)
612
- /* harmony export */ });
613
- /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.26.10/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
614
- /* harmony import */ var _loaders_gl_schema__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @loaders.gl/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/category/mesh/mesh-utils.js");
615
- /* harmony import */ var _utils_get_draco_schema__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/get-draco-schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/lib/utils/get-draco-schema.js");
616
-
617
-
618
-
619
- const GEOMETRY_TYPE = {
620
- TRIANGULAR_MESH: 0,
621
- POINT_CLOUD: 1
622
- };
623
- const DRACO_TO_GLTF_ATTRIBUTE_NAME_MAP = {
624
- POSITION: 'POSITION',
625
- NORMAL: 'NORMAL',
626
- COLOR: 'COLOR_0',
627
- TEX_COORD: 'TEXCOORD_0'
628
- };
629
- const DRACO_DATA_TYPE_TO_TYPED_ARRAY_MAP = {
630
- 1: Int8Array,
631
- 2: Uint8Array,
632
- 3: Int16Array,
633
- 4: Uint16Array,
634
- 5: Int32Array,
635
- 6: Uint32Array,
636
- 9: Float32Array
637
- };
638
- const INDEX_ITEM_SIZE = 4;
639
- class DracoParser {
640
- constructor(draco) {
641
- (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "draco", void 0);
642
-
643
- (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "decoder", void 0);
644
-
645
- (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "metadataQuerier", void 0);
646
-
647
- this.draco = draco;
648
- this.decoder = new this.draco.Decoder();
649
- this.metadataQuerier = new this.draco.MetadataQuerier();
650
- }
651
-
652
- destroy() {
653
- this.draco.destroy(this.decoder);
654
- this.draco.destroy(this.metadataQuerier);
655
- }
656
-
657
- parseSync(arrayBuffer, options = {}) {
658
- const buffer = new this.draco.DecoderBuffer();
659
- buffer.Init(new Int8Array(arrayBuffer), arrayBuffer.byteLength);
660
-
661
- this._disableAttributeTransforms(options);
662
-
663
- const geometry_type = this.decoder.GetEncodedGeometryType(buffer);
664
- const dracoGeometry = geometry_type === this.draco.TRIANGULAR_MESH ? new this.draco.Mesh() : new this.draco.PointCloud();
665
-
666
- try {
667
- let dracoStatus;
668
-
669
- switch (geometry_type) {
670
- case this.draco.TRIANGULAR_MESH:
671
- dracoStatus = this.decoder.DecodeBufferToMesh(buffer, dracoGeometry);
672
- break;
673
-
674
- case this.draco.POINT_CLOUD:
675
- dracoStatus = this.decoder.DecodeBufferToPointCloud(buffer, dracoGeometry);
676
- break;
677
-
678
- default:
679
- throw new Error('DRACO: Unknown geometry type.');
680
- }
681
-
682
- if (!dracoStatus.ok() || !dracoGeometry.ptr) {
683
- const message = "DRACO decompression failed: ".concat(dracoStatus.error_msg());
684
- throw new Error(message);
685
- }
686
-
687
- const loaderData = this._getDracoLoaderData(dracoGeometry, geometry_type, options);
688
-
689
- const geometry = this._getMeshData(dracoGeometry, loaderData, options);
690
-
691
- const boundingBox = (0,_loaders_gl_schema__WEBPACK_IMPORTED_MODULE_1__.getMeshBoundingBox)(geometry.attributes);
692
- const schema = (0,_utils_get_draco_schema__WEBPACK_IMPORTED_MODULE_2__.getDracoSchema)(geometry.attributes, loaderData, geometry.indices);
693
- const data = {
694
- loader: 'draco',
695
- loaderData,
696
- header: {
697
- vertexCount: dracoGeometry.num_points(),
698
- boundingBox
699
- },
700
- ...geometry,
701
- schema
702
- };
703
- return data;
704
- } finally {
705
- this.draco.destroy(buffer);
706
-
707
- if (dracoGeometry) {
708
- this.draco.destroy(dracoGeometry);
709
- }
710
- }
711
- }
712
-
713
- _getDracoLoaderData(dracoGeometry, geometry_type, options) {
714
- const metadata = this._getTopLevelMetadata(dracoGeometry);
715
-
716
- const attributes = this._getDracoAttributes(dracoGeometry, options);
717
-
718
- return {
719
- geometry_type,
720
- num_attributes: dracoGeometry.num_attributes(),
721
- num_points: dracoGeometry.num_points(),
722
- num_faces: dracoGeometry instanceof this.draco.Mesh ? dracoGeometry.num_faces() : 0,
723
- metadata,
724
- attributes
725
- };
726
- }
727
-
728
- _getDracoAttributes(dracoGeometry, options) {
729
- const dracoAttributes = {};
730
-
731
- for (let attributeId = 0; attributeId < dracoGeometry.num_attributes(); attributeId++) {
732
- const dracoAttribute = this.decoder.GetAttribute(dracoGeometry, attributeId);
733
-
734
- const metadata = this._getAttributeMetadata(dracoGeometry, attributeId);
735
-
736
- dracoAttributes[dracoAttribute.unique_id()] = {
737
- unique_id: dracoAttribute.unique_id(),
738
- attribute_type: dracoAttribute.attribute_type(),
739
- data_type: dracoAttribute.data_type(),
740
- num_components: dracoAttribute.num_components(),
741
- byte_offset: dracoAttribute.byte_offset(),
742
- byte_stride: dracoAttribute.byte_stride(),
743
- normalized: dracoAttribute.normalized(),
744
- attribute_index: attributeId,
745
- metadata
746
- };
747
-
748
- const quantization = this._getQuantizationTransform(dracoAttribute, options);
749
-
750
- if (quantization) {
751
- dracoAttributes[dracoAttribute.unique_id()].quantization_transform = quantization;
752
- }
753
-
754
- const octahedron = this._getOctahedronTransform(dracoAttribute, options);
755
-
756
- if (octahedron) {
757
- dracoAttributes[dracoAttribute.unique_id()].octahedron_transform = octahedron;
758
- }
759
- }
760
-
761
- return dracoAttributes;
762
- }
763
-
764
- _getMeshData(dracoGeometry, loaderData, options) {
765
- const attributes = this._getMeshAttributes(loaderData, dracoGeometry, options);
766
-
767
- const positionAttribute = attributes.POSITION;
768
-
769
- if (!positionAttribute) {
770
- throw new Error('DRACO: No position attribute found.');
771
- }
772
-
773
- if (dracoGeometry instanceof this.draco.Mesh) {
774
- switch (options.topology) {
775
- case 'triangle-strip':
776
- return {
777
- topology: 'triangle-strip',
778
- mode: 4,
779
- attributes,
780
- indices: {
781
- value: this._getTriangleStripIndices(dracoGeometry),
782
- size: 1
783
- }
784
- };
785
-
786
- case 'triangle-list':
787
- default:
788
- return {
789
- topology: 'triangle-list',
790
- mode: 5,
791
- attributes,
792
- indices: {
793
- value: this._getTriangleListIndices(dracoGeometry),
794
- size: 1
795
- }
796
- };
797
- }
798
- }
799
-
800
- return {
801
- topology: 'point-list',
802
- mode: 0,
803
- attributes
804
- };
805
- }
806
-
807
- _getMeshAttributes(loaderData, dracoGeometry, options) {
808
- const attributes = {};
809
-
810
- for (const loaderAttribute of Object.values(loaderData.attributes)) {
811
- const attributeName = this._deduceAttributeName(loaderAttribute, options);
812
-
813
- loaderAttribute.name = attributeName;
814
-
815
- const {
816
- value,
817
- size
818
- } = this._getAttributeValues(dracoGeometry, loaderAttribute);
819
-
820
- attributes[attributeName] = {
821
- value,
822
- size,
823
- byteOffset: loaderAttribute.byte_offset,
824
- byteStride: loaderAttribute.byte_stride,
825
- normalized: loaderAttribute.normalized
826
- };
827
- }
828
-
829
- return attributes;
830
- }
831
-
832
- _getTriangleListIndices(dracoGeometry) {
833
- const numFaces = dracoGeometry.num_faces();
834
- const numIndices = numFaces * 3;
835
- const byteLength = numIndices * INDEX_ITEM_SIZE;
836
-
837
- const ptr = this.draco._malloc(byteLength);
838
-
839
- try {
840
- this.decoder.GetTrianglesUInt32Array(dracoGeometry, byteLength, ptr);
841
- return new Uint32Array(this.draco.HEAPF32.buffer, ptr, numIndices).slice();
842
- } finally {
843
- this.draco._free(ptr);
844
- }
845
- }
846
-
847
- _getTriangleStripIndices(dracoGeometry) {
848
- const dracoArray = new this.draco.DracoInt32Array();
849
-
850
- try {
851
- this.decoder.GetTriangleStripsFromMesh(dracoGeometry, dracoArray);
852
- return getUint32Array(dracoArray);
853
- } finally {
854
- this.draco.destroy(dracoArray);
855
- }
856
- }
857
-
858
- _getAttributeValues(dracoGeometry, attribute) {
859
- const TypedArrayCtor = DRACO_DATA_TYPE_TO_TYPED_ARRAY_MAP[attribute.data_type];
860
- const numComponents = attribute.num_components;
861
- const numPoints = dracoGeometry.num_points();
862
- const numValues = numPoints * numComponents;
863
- const byteLength = numValues * TypedArrayCtor.BYTES_PER_ELEMENT;
864
- const dataType = getDracoDataType(this.draco, TypedArrayCtor);
865
- let value;
866
-
867
- const ptr = this.draco._malloc(byteLength);
868
-
869
- try {
870
- const dracoAttribute = this.decoder.GetAttribute(dracoGeometry, attribute.attribute_index);
871
- this.decoder.GetAttributeDataArrayForAllPoints(dracoGeometry, dracoAttribute, dataType, byteLength, ptr);
872
- value = new TypedArrayCtor(this.draco.HEAPF32.buffer, ptr, numValues).slice();
873
- } finally {
874
- this.draco._free(ptr);
875
- }
876
-
877
- return {
878
- value,
879
- size: numComponents
880
- };
881
- }
882
-
883
- _deduceAttributeName(attribute, options) {
884
- const uniqueId = attribute.unique_id;
885
-
886
- for (const [attributeName, attributeUniqueId] of Object.entries(options.extraAttributes || {})) {
887
- if (attributeUniqueId === uniqueId) {
888
- return attributeName;
889
- }
890
- }
891
-
892
- const thisAttributeType = attribute.attribute_type;
893
-
894
- for (const dracoAttributeConstant in DRACO_TO_GLTF_ATTRIBUTE_NAME_MAP) {
895
- const attributeType = this.draco[dracoAttributeConstant];
896
-
897
- if (attributeType === thisAttributeType) {
898
- return DRACO_TO_GLTF_ATTRIBUTE_NAME_MAP[dracoAttributeConstant];
899
- }
900
- }
901
-
902
- const entryName = options.attributeNameEntry || 'name';
903
-
904
- if (attribute.metadata[entryName]) {
905
- return attribute.metadata[entryName].string;
906
- }
907
-
908
- return "CUSTOM_ATTRIBUTE_".concat(uniqueId);
909
- }
910
-
911
- _getTopLevelMetadata(dracoGeometry) {
912
- const dracoMetadata = this.decoder.GetMetadata(dracoGeometry);
913
- return this._getDracoMetadata(dracoMetadata);
914
- }
915
-
916
- _getAttributeMetadata(dracoGeometry, attributeId) {
917
- const dracoMetadata = this.decoder.GetAttributeMetadata(dracoGeometry, attributeId);
918
- return this._getDracoMetadata(dracoMetadata);
919
- }
920
-
921
- _getDracoMetadata(dracoMetadata) {
922
- if (!dracoMetadata || !dracoMetadata.ptr) {
923
- return {};
924
- }
925
-
926
- const result = {};
927
- const numEntries = this.metadataQuerier.NumEntries(dracoMetadata);
928
-
929
- for (let entryIndex = 0; entryIndex < numEntries; entryIndex++) {
930
- const entryName = this.metadataQuerier.GetEntryName(dracoMetadata, entryIndex);
931
- result[entryName] = this._getDracoMetadataField(dracoMetadata, entryName);
932
- }
933
-
934
- return result;
935
- }
936
-
937
- _getDracoMetadataField(dracoMetadata, entryName) {
938
- const dracoArray = new this.draco.DracoInt32Array();
939
-
940
- try {
941
- this.metadataQuerier.GetIntEntryArray(dracoMetadata, entryName, dracoArray);
942
- const intArray = getInt32Array(dracoArray);
943
- return {
944
- int: this.metadataQuerier.GetIntEntry(dracoMetadata, entryName),
945
- string: this.metadataQuerier.GetStringEntry(dracoMetadata, entryName),
946
- double: this.metadataQuerier.GetDoubleEntry(dracoMetadata, entryName),
947
- intArray
948
- };
949
- } finally {
950
- this.draco.destroy(dracoArray);
951
- }
952
- }
953
-
954
- _disableAttributeTransforms(options) {
955
- const {
956
- quantizedAttributes = [],
957
- octahedronAttributes = []
958
- } = options;
959
- const skipAttributes = [...quantizedAttributes, ...octahedronAttributes];
960
-
961
- for (const dracoAttributeName of skipAttributes) {
962
- this.decoder.SkipAttributeTransform(this.draco[dracoAttributeName]);
963
- }
964
- }
965
-
966
- _getQuantizationTransform(dracoAttribute, options) {
967
- const {
968
- quantizedAttributes = []
969
- } = options;
970
- const attribute_type = dracoAttribute.attribute_type();
971
- const skip = quantizedAttributes.map(type => this.decoder[type]).includes(attribute_type);
972
-
973
- if (skip) {
974
- const transform = new this.draco.AttributeQuantizationTransform();
975
-
976
- try {
977
- if (transform.InitFromAttribute(dracoAttribute)) {
978
- return {
979
- quantization_bits: transform.quantization_bits(),
980
- range: transform.range(),
981
- min_values: new Float32Array([1, 2, 3]).map(i => transform.min_value(i))
982
- };
983
- }
984
- } finally {
985
- this.draco.destroy(transform);
986
- }
987
- }
988
-
989
- return null;
990
- }
991
-
992
- _getOctahedronTransform(dracoAttribute, options) {
993
- const {
994
- octahedronAttributes = []
995
- } = options;
996
- const attribute_type = dracoAttribute.attribute_type();
997
- const octahedron = octahedronAttributes.map(type => this.decoder[type]).includes(attribute_type);
998
-
999
- if (octahedron) {
1000
- const transform = new this.draco.AttributeQuantizationTransform();
1001
-
1002
- try {
1003
- if (transform.InitFromAttribute(dracoAttribute)) {
1004
- return {
1005
- quantization_bits: transform.quantization_bits()
1006
- };
1007
- }
1008
- } finally {
1009
- this.draco.destroy(transform);
1010
- }
1011
- }
1012
-
1013
- return null;
1014
- }
1015
-
1016
- }
1017
-
1018
- function getDracoDataType(draco, attributeType) {
1019
- switch (attributeType) {
1020
- case Float32Array:
1021
- return draco.DT_FLOAT32;
1022
-
1023
- case Int8Array:
1024
- return draco.DT_INT8;
1025
-
1026
- case Int16Array:
1027
- return draco.DT_INT16;
1028
-
1029
- case Int32Array:
1030
- return draco.DT_INT32;
1031
-
1032
- case Uint8Array:
1033
- return draco.DT_UINT8;
1034
-
1035
- case Uint16Array:
1036
- return draco.DT_UINT16;
1037
-
1038
- case Uint32Array:
1039
- return draco.DT_UINT32;
1040
-
1041
- default:
1042
- return draco.DT_INVALID;
1043
- }
1044
- }
1045
-
1046
- function getInt32Array(dracoArray) {
1047
- const numValues = dracoArray.size();
1048
- const intArray = new Int32Array(numValues);
1049
-
1050
- for (let i = 0; i < numValues; i++) {
1051
- intArray[i] = dracoArray.GetValue(i);
1052
- }
1053
-
1054
- return intArray;
1055
- }
1056
-
1057
- function getUint32Array(dracoArray) {
1058
- const numValues = dracoArray.size();
1059
- const intArray = new Int32Array(numValues);
1060
-
1061
- for (let i = 0; i < numValues; i++) {
1062
- intArray[i] = dracoArray.GetValue(i);
1063
- }
1064
-
1065
- return intArray;
1066
- }
1067
-
1068
-
1069
- /***/ }),
1070
-
1071
- /***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/lib/utils/get-draco-schema.js":
1072
- /*!******************************************************************************************************************************************!*\
1073
- !*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/lib/utils/get-draco-schema.js ***!
1074
- \******************************************************************************************************************************************/
1075
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1076
-
1077
- __webpack_require__.r(__webpack_exports__);
1078
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1079
- /* harmony export */ getDracoSchema: () => (/* binding */ getDracoSchema)
1080
- /* harmony export */ });
1081
- /* harmony import */ var _loaders_gl_schema__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @loaders.gl/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/category/mesh/deduce-mesh-schema.js");
1082
- /* harmony import */ var _loaders_gl_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @loaders.gl/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/schema.js");
1083
-
1084
-
1085
- function getDracoSchema(attributes, loaderData, indices) {
1086
- const metadataMap = makeMetadata(loaderData.metadata);
1087
- const fields = [];
1088
- const namedLoaderDataAttributes = transformAttributesLoaderData(loaderData.attributes);
1089
-
1090
- for (const attributeName in attributes) {
1091
- const attribute = attributes[attributeName];
1092
- const field = getArrowFieldFromAttribute(attributeName, attribute, namedLoaderDataAttributes[attributeName]);
1093
- fields.push(field);
1094
- }
1095
-
1096
- if (indices) {
1097
- const indicesField = getArrowFieldFromAttribute('indices', indices);
1098
- fields.push(indicesField);
1099
- }
1100
-
1101
- return new _loaders_gl_schema__WEBPACK_IMPORTED_MODULE_0__["default"](fields, metadataMap);
1102
- }
1103
-
1104
- function transformAttributesLoaderData(loaderData) {
1105
- const result = {};
1106
-
1107
- for (const key in loaderData) {
1108
- const dracoAttribute = loaderData[key];
1109
- result[dracoAttribute.name || 'undefined'] = dracoAttribute;
1110
- }
1111
-
1112
- return result;
1113
- }
1114
-
1115
- function getArrowFieldFromAttribute(attributeName, attribute, loaderData) {
1116
- const metadataMap = loaderData ? makeMetadata(loaderData.metadata) : undefined;
1117
- const field = (0,_loaders_gl_schema__WEBPACK_IMPORTED_MODULE_1__.deduceMeshField)(attributeName, attribute, metadataMap);
1118
- return field;
1119
- }
1120
-
1121
- function makeMetadata(metadata) {
1122
- const metadataMap = new Map();
1123
-
1124
- for (const key in metadata) {
1125
- metadataMap.set("".concat(key, ".string"), JSON.stringify(metadata[key]));
1126
- }
1127
-
1128
- return metadataMap;
1129
- }
1130
-
1131
-
1132
- /***/ }),
1133
-
1134
- /***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/lib/utils/version.js":
1135
- /*!*********************************************************************************************************************************!*\
1136
- !*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.1.6/node_modules/@loaders.gl/draco/dist/esm/lib/utils/version.js ***!
1137
- \*********************************************************************************************************************************/
1138
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1139
-
1140
- __webpack_require__.r(__webpack_exports__);
1141
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1142
- /* harmony export */ VERSION: () => (/* binding */ VERSION)
1143
- /* harmony export */ });
1144
- const VERSION = true ? "3.1.6" : 0;
1145
-
1146
-
1147
- /***/ }),
1148
-
1149
- /***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/category/mesh/deduce-mesh-schema.js":
1150
- /*!**************************************************************************************************************************************************!*\
1151
- !*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/category/mesh/deduce-mesh-schema.js ***!
1152
- \**************************************************************************************************************************************************/
1153
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1154
-
1155
- __webpack_require__.r(__webpack_exports__);
1156
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1157
- /* harmony export */ deduceMeshField: () => (/* binding */ deduceMeshField),
1158
- /* harmony export */ deduceMeshSchema: () => (/* binding */ deduceMeshSchema),
1159
- /* harmony export */ makeMeshAttributeMetadata: () => (/* binding */ makeMeshAttributeMetadata)
1160
- /* harmony export */ });
1161
- /* harmony import */ var _lib_schema_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../lib/schema/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/schema.js");
1162
- /* harmony import */ var _lib_schema_schema__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../lib/schema/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/field.js");
1163
- /* harmony import */ var _lib_schema_schema__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../lib/schema/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/type.js");
1164
- /* harmony import */ var _lib_arrow_arrow_like_type_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../lib/arrow/arrow-like-type-utils */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/arrow/arrow-like-type-utils.js");
1165
-
1166
-
1167
- function deduceMeshSchema(attributes, metadata) {
1168
- const fields = deduceMeshFields(attributes);
1169
- return new _lib_schema_schema__WEBPACK_IMPORTED_MODULE_0__["default"](fields, metadata);
1170
- }
1171
- function deduceMeshField(attributeName, attribute, optionalMetadata) {
1172
- const type = (0,_lib_arrow_arrow_like_type_utils__WEBPACK_IMPORTED_MODULE_1__.getArrowTypeFromTypedArray)(attribute.value);
1173
- const metadata = optionalMetadata ? optionalMetadata : makeMeshAttributeMetadata(attribute);
1174
- const field = new _lib_schema_schema__WEBPACK_IMPORTED_MODULE_2__["default"](attributeName, new _lib_schema_schema__WEBPACK_IMPORTED_MODULE_3__.FixedSizeList(attribute.size, new _lib_schema_schema__WEBPACK_IMPORTED_MODULE_2__["default"]('value', type)), false, metadata);
1175
- return field;
1176
- }
1177
-
1178
- function deduceMeshFields(attributes) {
1179
- const fields = [];
1180
-
1181
- for (const attributeName in attributes) {
1182
- const attribute = attributes[attributeName];
1183
- fields.push(deduceMeshField(attributeName, attribute));
1184
- }
1185
-
1186
- return fields;
1187
- }
1188
-
1189
- function makeMeshAttributeMetadata(attribute) {
1190
- const result = new Map();
1191
-
1192
- if ('byteOffset' in attribute) {
1193
- result.set('byteOffset', attribute.byteOffset.toString(10));
1194
- }
1195
-
1196
- if ('byteStride' in attribute) {
1197
- result.set('byteStride', attribute.byteStride.toString(10));
1198
- }
1199
-
1200
- if ('normalized' in attribute) {
1201
- result.set('normalized', attribute.normalized.toString());
1202
- }
1203
-
1204
- return result;
1205
- }
1206
-
1207
-
1208
- /***/ }),
1209
-
1210
- /***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/category/mesh/mesh-utils.js":
1211
- /*!******************************************************************************************************************************************!*\
1212
- !*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/category/mesh/mesh-utils.js ***!
1213
- \******************************************************************************************************************************************/
1214
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1215
-
1216
- __webpack_require__.r(__webpack_exports__);
1217
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1218
- /* harmony export */ getMeshBoundingBox: () => (/* binding */ getMeshBoundingBox),
1219
- /* harmony export */ getMeshSize: () => (/* binding */ getMeshSize)
1220
- /* harmony export */ });
1221
- function getMeshSize(attributes) {
1222
- let size = 0;
1223
-
1224
- for (const attributeName in attributes) {
1225
- const attribute = attributes[attributeName];
1226
-
1227
- if (ArrayBuffer.isView(attribute)) {
1228
- size += attribute.byteLength * attribute.BYTES_PER_ELEMENT;
1229
- }
1230
- }
1231
-
1232
- return size;
1233
- }
1234
- function getMeshBoundingBox(attributes) {
1235
- let minX = Infinity;
1236
- let minY = Infinity;
1237
- let minZ = Infinity;
1238
- let maxX = -Infinity;
1239
- let maxY = -Infinity;
1240
- let maxZ = -Infinity;
1241
- const positions = attributes.POSITION ? attributes.POSITION.value : [];
1242
- const len = positions && positions.length;
1243
-
1244
- for (let i = 0; i < len; i += 3) {
1245
- const x = positions[i];
1246
- const y = positions[i + 1];
1247
- const z = positions[i + 2];
1248
- minX = x < minX ? x : minX;
1249
- minY = y < minY ? y : minY;
1250
- minZ = z < minZ ? z : minZ;
1251
- maxX = x > maxX ? x : maxX;
1252
- maxY = y > maxY ? y : maxY;
1253
- maxZ = z > maxZ ? z : maxZ;
1254
- }
1255
-
1256
- return [[minX, minY, minZ], [maxX, maxY, maxZ]];
1257
- }
1258
-
1259
-
1260
- /***/ }),
1261
-
1262
- /***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/arrow/arrow-like-type-utils.js":
1263
- /*!*************************************************************************************************************************************************!*\
1264
- !*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/arrow/arrow-like-type-utils.js ***!
1265
- \*************************************************************************************************************************************************/
1266
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1267
-
1268
- __webpack_require__.r(__webpack_exports__);
1269
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1270
- /* harmony export */ getArrowTypeFromTypedArray: () => (/* binding */ getArrowTypeFromTypedArray)
1271
- /* harmony export */ });
1272
- /* harmony import */ var _schema_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../schema/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/type.js");
1273
-
1274
- function getArrowTypeFromTypedArray(array) {
1275
- switch (array.constructor) {
1276
- case Int8Array:
1277
- return new _schema_schema__WEBPACK_IMPORTED_MODULE_0__.Int8();
1278
-
1279
- case Uint8Array:
1280
- return new _schema_schema__WEBPACK_IMPORTED_MODULE_0__.Uint8();
1281
-
1282
- case Int16Array:
1283
- return new _schema_schema__WEBPACK_IMPORTED_MODULE_0__.Int16();
1284
-
1285
- case Uint16Array:
1286
- return new _schema_schema__WEBPACK_IMPORTED_MODULE_0__.Uint16();
1287
-
1288
- case Int32Array:
1289
- return new _schema_schema__WEBPACK_IMPORTED_MODULE_0__.Int32();
1290
-
1291
- case Uint32Array:
1292
- return new _schema_schema__WEBPACK_IMPORTED_MODULE_0__.Uint32();
1293
-
1294
- case Float32Array:
1295
- return new _schema_schema__WEBPACK_IMPORTED_MODULE_0__.Float32();
1296
-
1297
- case Float64Array:
1298
- return new _schema_schema__WEBPACK_IMPORTED_MODULE_0__.Float64();
1299
-
1300
- default:
1301
- throw new Error('array type not supported');
1302
- }
1303
- }
1304
-
1305
-
1306
- /***/ }),
1307
-
1308
- /***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/enum.js":
1309
- /*!**************************************************************************************************************************************!*\
1310
- !*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/enum.js ***!
1311
- \**************************************************************************************************************************************/
1312
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1313
-
1314
- __webpack_require__.r(__webpack_exports__);
1315
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1316
- /* harmony export */ Type: () => (/* binding */ Type)
1317
- /* harmony export */ });
1318
- let Type;
1319
-
1320
- (function (Type) {
1321
- Type[Type["NONE"] = 0] = "NONE";
1322
- Type[Type["Null"] = 1] = "Null";
1323
- Type[Type["Int"] = 2] = "Int";
1324
- Type[Type["Float"] = 3] = "Float";
1325
- Type[Type["Binary"] = 4] = "Binary";
1326
- Type[Type["Utf8"] = 5] = "Utf8";
1327
- Type[Type["Bool"] = 6] = "Bool";
1328
- Type[Type["Decimal"] = 7] = "Decimal";
1329
- Type[Type["Date"] = 8] = "Date";
1330
- Type[Type["Time"] = 9] = "Time";
1331
- Type[Type["Timestamp"] = 10] = "Timestamp";
1332
- Type[Type["Interval"] = 11] = "Interval";
1333
- Type[Type["List"] = 12] = "List";
1334
- Type[Type["Struct"] = 13] = "Struct";
1335
- Type[Type["Union"] = 14] = "Union";
1336
- Type[Type["FixedSizeBinary"] = 15] = "FixedSizeBinary";
1337
- Type[Type["FixedSizeList"] = 16] = "FixedSizeList";
1338
- Type[Type["Map"] = 17] = "Map";
1339
- Type[Type["Dictionary"] = -1] = "Dictionary";
1340
- Type[Type["Int8"] = -2] = "Int8";
1341
- Type[Type["Int16"] = -3] = "Int16";
1342
- Type[Type["Int32"] = -4] = "Int32";
1343
- Type[Type["Int64"] = -5] = "Int64";
1344
- Type[Type["Uint8"] = -6] = "Uint8";
1345
- Type[Type["Uint16"] = -7] = "Uint16";
1346
- Type[Type["Uint32"] = -8] = "Uint32";
1347
- Type[Type["Uint64"] = -9] = "Uint64";
1348
- Type[Type["Float16"] = -10] = "Float16";
1349
- Type[Type["Float32"] = -11] = "Float32";
1350
- Type[Type["Float64"] = -12] = "Float64";
1351
- Type[Type["DateDay"] = -13] = "DateDay";
1352
- Type[Type["DateMillisecond"] = -14] = "DateMillisecond";
1353
- Type[Type["TimestampSecond"] = -15] = "TimestampSecond";
1354
- Type[Type["TimestampMillisecond"] = -16] = "TimestampMillisecond";
1355
- Type[Type["TimestampMicrosecond"] = -17] = "TimestampMicrosecond";
1356
- Type[Type["TimestampNanosecond"] = -18] = "TimestampNanosecond";
1357
- Type[Type["TimeSecond"] = -19] = "TimeSecond";
1358
- Type[Type["TimeMillisecond"] = -20] = "TimeMillisecond";
1359
- Type[Type["TimeMicrosecond"] = -21] = "TimeMicrosecond";
1360
- Type[Type["TimeNanosecond"] = -22] = "TimeNanosecond";
1361
- Type[Type["DenseUnion"] = -23] = "DenseUnion";
1362
- Type[Type["SparseUnion"] = -24] = "SparseUnion";
1363
- Type[Type["IntervalDayTime"] = -25] = "IntervalDayTime";
1364
- Type[Type["IntervalYearMonth"] = -26] = "IntervalYearMonth";
1365
- })(Type || (Type = {}));
1366
-
1367
-
1368
- /***/ }),
1369
-
1370
- /***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/field.js":
1371
- /*!***************************************************************************************************************************************!*\
1372
- !*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/field.js ***!
1373
- \***************************************************************************************************************************************/
1374
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1375
-
1376
- __webpack_require__.r(__webpack_exports__);
1377
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1378
- /* harmony export */ "default": () => (/* binding */ Field)
1379
- /* harmony export */ });
1380
- /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.26.10/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
1381
-
1382
- class Field {
1383
- constructor(name, type, nullable = false, metadata = new Map()) {
1384
- (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "name", void 0);
1385
-
1386
- (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "type", void 0);
1387
-
1388
- (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "nullable", void 0);
1389
-
1390
- (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "metadata", void 0);
1391
-
1392
- this.name = name;
1393
- this.type = type;
1394
- this.nullable = nullable;
1395
- this.metadata = metadata;
1396
- }
1397
-
1398
- get typeId() {
1399
- return this.type && this.type.typeId;
1400
- }
1401
-
1402
- clone() {
1403
- return new Field(this.name, this.type, this.nullable, this.metadata);
1404
- }
1405
-
1406
- compareTo(other) {
1407
- return this.name === other.name && this.type === other.type && this.nullable === other.nullable && this.metadata === other.metadata;
1408
- }
1409
-
1410
- toString() {
1411
- return "".concat(this.type).concat(this.nullable ? ', nullable' : '').concat(this.metadata ? ", metadata: ".concat(this.metadata) : '');
1412
- }
1413
-
1414
- }
1415
-
1416
-
1417
- /***/ }),
1418
-
1419
- /***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/schema.js":
1420
- /*!****************************************************************************************************************************************!*\
1421
- !*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/schema.js ***!
1422
- \****************************************************************************************************************************************/
1423
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1424
-
1425
- __webpack_require__.r(__webpack_exports__);
1426
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1427
- /* harmony export */ "default": () => (/* binding */ Schema)
1428
- /* harmony export */ });
1429
- /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.26.10/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
1430
- /* harmony import */ var _utils_assert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/assert */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/utils/assert.js");
1431
-
1432
-
1433
- class Schema {
1434
- constructor(fields, metadata) {
1435
- (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "fields", void 0);
1436
-
1437
- (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "metadata", void 0);
1438
-
1439
- (0,_utils_assert__WEBPACK_IMPORTED_MODULE_1__.assert)(Array.isArray(fields));
1440
- checkNames(fields);
1441
- this.fields = fields;
1442
- this.metadata = metadata || new Map();
1443
- }
1444
-
1445
- compareTo(other) {
1446
- if (this.metadata !== other.metadata) {
1447
- return false;
1448
- }
1449
-
1450
- if (this.fields.length !== other.fields.length) {
1451
- return false;
1452
- }
1453
-
1454
- for (let i = 0; i < this.fields.length; ++i) {
1455
- if (!this.fields[i].compareTo(other.fields[i])) {
1456
- return false;
1457
- }
1458
- }
1459
-
1460
- return true;
1461
- }
1462
-
1463
- select(...columnNames) {
1464
- const nameMap = Object.create(null);
1465
-
1466
- for (const name of columnNames) {
1467
- nameMap[name] = true;
1468
- }
1469
-
1470
- const selectedFields = this.fields.filter(field => nameMap[field.name]);
1471
- return new Schema(selectedFields, this.metadata);
1472
- }
1473
-
1474
- selectAt(...columnIndices) {
1475
- const selectedFields = columnIndices.map(index => this.fields[index]).filter(Boolean);
1476
- return new Schema(selectedFields, this.metadata);
1477
- }
1478
-
1479
- assign(schemaOrFields) {
1480
- let fields;
1481
- let metadata = this.metadata;
1482
-
1483
- if (schemaOrFields instanceof Schema) {
1484
- const otherSchema = schemaOrFields;
1485
- fields = otherSchema.fields;
1486
- metadata = mergeMaps(mergeMaps(new Map(), this.metadata), otherSchema.metadata);
1487
- } else {
1488
- fields = schemaOrFields;
1489
- }
1490
-
1491
- const fieldMap = Object.create(null);
1492
-
1493
- for (const field of this.fields) {
1494
- fieldMap[field.name] = field;
1495
- }
1496
-
1497
- for (const field of fields) {
1498
- fieldMap[field.name] = field;
1499
- }
1500
-
1501
- const mergedFields = Object.values(fieldMap);
1502
- return new Schema(mergedFields, metadata);
1503
- }
1504
-
1505
- }
1506
-
1507
- function checkNames(fields) {
1508
- const usedNames = {};
1509
-
1510
- for (const field of fields) {
1511
- if (usedNames[field.name]) {
1512
- console.warn('Schema: duplicated field name', field.name, field);
1513
- }
1514
-
1515
- usedNames[field.name] = true;
1516
- }
1517
- }
1518
-
1519
- function mergeMaps(m1, m2) {
1520
- return new Map([...(m1 || new Map()), ...(m2 || new Map())]);
1521
- }
1522
-
1523
-
1524
- /***/ }),
1525
-
1526
- /***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/type.js":
1527
- /*!**************************************************************************************************************************************!*\
1528
- !*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/type.js ***!
1529
- \**************************************************************************************************************************************/
1530
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1531
-
1532
- __webpack_require__.r(__webpack_exports__);
1533
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1534
- /* harmony export */ Binary: () => (/* binding */ Binary),
1535
- /* harmony export */ Bool: () => (/* binding */ Bool),
1536
- /* harmony export */ DataType: () => (/* binding */ DataType),
1537
- /* harmony export */ Date: () => (/* binding */ Date),
1538
- /* harmony export */ DateDay: () => (/* binding */ DateDay),
1539
- /* harmony export */ DateMillisecond: () => (/* binding */ DateMillisecond),
1540
- /* harmony export */ FixedSizeList: () => (/* binding */ FixedSizeList),
1541
- /* harmony export */ Float: () => (/* binding */ Float),
1542
- /* harmony export */ Float16: () => (/* binding */ Float16),
1543
- /* harmony export */ Float32: () => (/* binding */ Float32),
1544
- /* harmony export */ Float64: () => (/* binding */ Float64),
1545
- /* harmony export */ Int: () => (/* binding */ Int),
1546
- /* harmony export */ Int16: () => (/* binding */ Int16),
1547
- /* harmony export */ Int32: () => (/* binding */ Int32),
1548
- /* harmony export */ Int64: () => (/* binding */ Int64),
1549
- /* harmony export */ Int8: () => (/* binding */ Int8),
1550
- /* harmony export */ Interval: () => (/* binding */ Interval),
1551
- /* harmony export */ IntervalDayTime: () => (/* binding */ IntervalDayTime),
1552
- /* harmony export */ IntervalYearMonth: () => (/* binding */ IntervalYearMonth),
1553
- /* harmony export */ Null: () => (/* binding */ Null),
1554
- /* harmony export */ Struct: () => (/* binding */ Struct),
1555
- /* harmony export */ Time: () => (/* binding */ Time),
1556
- /* harmony export */ TimeMillisecond: () => (/* binding */ TimeMillisecond),
1557
- /* harmony export */ TimeSecond: () => (/* binding */ TimeSecond),
1558
- /* harmony export */ Timestamp: () => (/* binding */ Timestamp),
1559
- /* harmony export */ TimestampMicrosecond: () => (/* binding */ TimestampMicrosecond),
1560
- /* harmony export */ TimestampMillisecond: () => (/* binding */ TimestampMillisecond),
1561
- /* harmony export */ TimestampNanosecond: () => (/* binding */ TimestampNanosecond),
1562
- /* harmony export */ TimestampSecond: () => (/* binding */ TimestampSecond),
1563
- /* harmony export */ Type: () => (/* reexport safe */ _enum__WEBPACK_IMPORTED_MODULE_1__.Type),
1564
- /* harmony export */ Uint16: () => (/* binding */ Uint16),
1565
- /* harmony export */ Uint32: () => (/* binding */ Uint32),
1566
- /* harmony export */ Uint64: () => (/* binding */ Uint64),
1567
- /* harmony export */ Uint8: () => (/* binding */ Uint8),
1568
- /* harmony export */ Utf8: () => (/* binding */ Utf8)
1569
- /* harmony export */ });
1570
- /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.26.10/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
1571
- /* harmony import */ var _enum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./enum */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/enum.js");
1572
-
1573
-
1574
- let _Symbol$toStringTag, _Symbol$toStringTag2, _Symbol$toStringTag3, _Symbol$toStringTag4, _Symbol$toStringTag5, _Symbol$toStringTag6, _Symbol$toStringTag7, _Symbol$toStringTag8;
1575
-
1576
-
1577
-
1578
- class DataType {
1579
- static isNull(x) {
1580
- return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Null;
1581
- }
1582
-
1583
- static isInt(x) {
1584
- return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Int;
1585
- }
1586
-
1587
- static isFloat(x) {
1588
- return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Float;
1589
- }
1590
-
1591
- static isBinary(x) {
1592
- return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Binary;
1593
- }
1594
-
1595
- static isUtf8(x) {
1596
- return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Utf8;
1597
- }
1598
-
1599
- static isBool(x) {
1600
- return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Bool;
1601
- }
1602
-
1603
- static isDecimal(x) {
1604
- return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Decimal;
1605
- }
1606
-
1607
- static isDate(x) {
1608
- return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Date;
1609
- }
1610
-
1611
- static isTime(x) {
1612
- return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Time;
1613
- }
1614
-
1615
- static isTimestamp(x) {
1616
- return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Timestamp;
1617
- }
1618
-
1619
- static isInterval(x) {
1620
- return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Interval;
1621
- }
1622
-
1623
- static isList(x) {
1624
- return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.List;
1625
- }
1626
-
1627
- static isStruct(x) {
1628
- return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Struct;
1629
- }
1630
-
1631
- static isUnion(x) {
1632
- return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Union;
1633
- }
1634
-
1635
- static isFixedSizeBinary(x) {
1636
- return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.FixedSizeBinary;
1637
- }
1638
-
1639
- static isFixedSizeList(x) {
1640
- return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.FixedSizeList;
1641
- }
1642
-
1643
- static isMap(x) {
1644
- return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Map;
1645
- }
1646
-
1647
- static isDictionary(x) {
1648
- return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Dictionary;
1649
- }
1650
-
1651
- get typeId() {
1652
- return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.NONE;
1653
- }
1654
-
1655
- compareTo(other) {
1656
- return this === other;
1657
- }
1658
-
1659
- }
1660
- class Null extends DataType {
1661
- get typeId() {
1662
- return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Null;
1663
- }
1664
-
1665
- get [Symbol.toStringTag]() {
1666
- return 'Null';
1667
- }
1668
-
1669
- toString() {
1670
- return 'Null';
1671
- }
1672
-
1673
- }
1674
- class Bool extends DataType {
1675
- get typeId() {
1676
- return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Bool;
1677
- }
1678
-
1679
- get [Symbol.toStringTag]() {
1680
- return 'Bool';
1681
- }
1682
-
1683
- toString() {
1684
- return 'Bool';
1685
- }
1686
-
1687
- }
1688
- _Symbol$toStringTag = Symbol.toStringTag;
1689
- class Int extends DataType {
1690
- constructor(isSigned, bitWidth) {
1691
- super();
1692
-
1693
- (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "isSigned", void 0);
1694
-
1695
- (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "bitWidth", void 0);
1696
-
1697
- this.isSigned = isSigned;
1698
- this.bitWidth = bitWidth;
1699
- }
1700
-
1701
- get typeId() {
1702
- return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Int;
1703
- }
1704
-
1705
- get [_Symbol$toStringTag]() {
1706
- return 'Int';
1707
- }
1708
-
1709
- toString() {
1710
- return "".concat(this.isSigned ? 'I' : 'Ui', "nt").concat(this.bitWidth);
1711
- }
1712
-
1713
- }
1714
- class Int8 extends Int {
1715
- constructor() {
1716
- super(true, 8);
1717
- }
1718
-
1719
- }
1720
- class Int16 extends Int {
1721
- constructor() {
1722
- super(true, 16);
1723
- }
1724
-
1725
- }
1726
- class Int32 extends Int {
1727
- constructor() {
1728
- super(true, 32);
1729
- }
1730
-
1731
- }
1732
- class Int64 extends Int {
1733
- constructor() {
1734
- super(true, 64);
1735
- }
1736
-
1737
- }
1738
- class Uint8 extends Int {
1739
- constructor() {
1740
- super(false, 8);
1741
- }
1742
-
1743
- }
1744
- class Uint16 extends Int {
1745
- constructor() {
1746
- super(false, 16);
1747
- }
1748
-
1749
- }
1750
- class Uint32 extends Int {
1751
- constructor() {
1752
- super(false, 32);
1753
- }
1754
-
1755
- }
1756
- class Uint64 extends Int {
1757
- constructor() {
1758
- super(false, 64);
1759
- }
1760
-
1761
- }
1762
- const Precision = {
1763
- HALF: 16,
1764
- SINGLE: 32,
1765
- DOUBLE: 64
1766
- };
1767
- _Symbol$toStringTag2 = Symbol.toStringTag;
1768
- class Float extends DataType {
1769
- constructor(precision) {
1770
- super();
1771
-
1772
- (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "precision", void 0);
1773
-
1774
- this.precision = precision;
1775
- }
1776
-
1777
- get typeId() {
1778
- return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Float;
1779
- }
1780
-
1781
- get [_Symbol$toStringTag2]() {
1782
- return 'Float';
1783
- }
1784
-
1785
- toString() {
1786
- return "Float".concat(this.precision);
1787
- }
1788
-
1789
- }
1790
- class Float16 extends Float {
1791
- constructor() {
1792
- super(Precision.HALF);
1793
- }
1794
-
1795
- }
1796
- class Float32 extends Float {
1797
- constructor() {
1798
- super(Precision.SINGLE);
1799
- }
1800
-
1801
- }
1802
- class Float64 extends Float {
1803
- constructor() {
1804
- super(Precision.DOUBLE);
1805
- }
1806
-
1807
- }
1808
- class Binary extends DataType {
1809
- constructor() {
1810
- super();
1811
- }
1812
-
1813
- get typeId() {
1814
- return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Binary;
1815
- }
1816
-
1817
- toString() {
1818
- return 'Binary';
1819
- }
1820
-
1821
- get [Symbol.toStringTag]() {
1822
- return 'Binary';
1823
- }
1824
-
1825
- }
1826
- class Utf8 extends DataType {
1827
- get typeId() {
1828
- return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Utf8;
1829
- }
1830
-
1831
- get [Symbol.toStringTag]() {
1832
- return 'Utf8';
1833
- }
1834
-
1835
- toString() {
1836
- return 'Utf8';
1837
- }
1838
-
1839
- }
1840
- const DateUnit = {
1841
- DAY: 0,
1842
- MILLISECOND: 1
1843
- };
1844
- _Symbol$toStringTag3 = Symbol.toStringTag;
1845
- class Date extends DataType {
1846
- constructor(unit) {
1847
- super();
1848
-
1849
- (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "unit", void 0);
1850
-
1851
- this.unit = unit;
1852
- }
1853
-
1854
- get typeId() {
1855
- return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Date;
1856
- }
1857
-
1858
- get [_Symbol$toStringTag3]() {
1859
- return 'Date';
1860
- }
1861
-
1862
- toString() {
1863
- return "Date".concat((this.unit + 1) * 32, "<").concat(DateUnit[this.unit], ">");
1864
- }
1865
-
1866
- }
1867
- class DateDay extends Date {
1868
- constructor() {
1869
- super(DateUnit.DAY);
1870
- }
1871
-
1872
- }
1873
- class DateMillisecond extends Date {
1874
- constructor() {
1875
- super(DateUnit.MILLISECOND);
1876
- }
1877
-
1878
- }
1879
- const TimeUnit = {
1880
- SECOND: 1,
1881
- MILLISECOND: 1e3,
1882
- MICROSECOND: 1e6,
1883
- NANOSECOND: 1e9
1884
- };
1885
- _Symbol$toStringTag4 = Symbol.toStringTag;
1886
- class Time extends DataType {
1887
- constructor(unit, bitWidth) {
1888
- super();
1889
-
1890
- (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "unit", void 0);
1891
-
1892
- (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "bitWidth", void 0);
1893
-
1894
- this.unit = unit;
1895
- this.bitWidth = bitWidth;
1896
- }
1897
-
1898
- get typeId() {
1899
- return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Time;
1900
- }
1901
-
1902
- toString() {
1903
- return "Time".concat(this.bitWidth, "<").concat(TimeUnit[this.unit], ">");
1904
- }
1905
-
1906
- get [_Symbol$toStringTag4]() {
1907
- return 'Time';
1908
- }
1909
-
1910
- }
1911
- class TimeSecond extends Time {
1912
- constructor() {
1913
- super(TimeUnit.SECOND, 32);
1914
- }
1915
-
1916
- }
1917
- class TimeMillisecond extends Time {
1918
- constructor() {
1919
- super(TimeUnit.MILLISECOND, 32);
1920
- }
1921
-
1922
- }
1923
- _Symbol$toStringTag5 = Symbol.toStringTag;
1924
- class Timestamp extends DataType {
1925
- constructor(unit, timezone = null) {
1926
- super();
1927
-
1928
- (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "unit", void 0);
1929
-
1930
- (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "timezone", void 0);
1931
-
1932
- this.unit = unit;
1933
- this.timezone = timezone;
1934
- }
1935
-
1936
- get typeId() {
1937
- return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Timestamp;
1938
- }
1939
-
1940
- get [_Symbol$toStringTag5]() {
1941
- return 'Timestamp';
1942
- }
1943
-
1944
- toString() {
1945
- return "Timestamp<".concat(TimeUnit[this.unit]).concat(this.timezone ? ", ".concat(this.timezone) : '', ">");
1946
- }
1947
-
1948
- }
1949
- class TimestampSecond extends Timestamp {
1950
- constructor(timezone = null) {
1951
- super(TimeUnit.SECOND, timezone);
1952
- }
1953
-
1954
- }
1955
- class TimestampMillisecond extends Timestamp {
1956
- constructor(timezone = null) {
1957
- super(TimeUnit.MILLISECOND, timezone);
1958
- }
1959
-
1960
- }
1961
- class TimestampMicrosecond extends Timestamp {
1962
- constructor(timezone = null) {
1963
- super(TimeUnit.MICROSECOND, timezone);
1964
- }
1965
-
1966
- }
1967
- class TimestampNanosecond extends Timestamp {
1968
- constructor(timezone = null) {
1969
- super(TimeUnit.NANOSECOND, timezone);
1970
- }
1971
-
1972
- }
1973
- const IntervalUnit = {
1974
- DAY_TIME: 0,
1975
- YEAR_MONTH: 1
1976
- };
1977
- _Symbol$toStringTag6 = Symbol.toStringTag;
1978
- class Interval extends DataType {
1979
- constructor(unit) {
1980
- super();
1981
-
1982
- (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "unit", void 0);
1983
-
1984
- this.unit = unit;
1985
- }
1986
-
1987
- get typeId() {
1988
- return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Interval;
1989
- }
1990
-
1991
- get [_Symbol$toStringTag6]() {
1992
- return 'Interval';
1993
- }
1994
-
1995
- toString() {
1996
- return "Interval<".concat(IntervalUnit[this.unit], ">");
1997
- }
1998
-
1999
- }
2000
- class IntervalDayTime extends Interval {
2001
- constructor() {
2002
- super(IntervalUnit.DAY_TIME);
2003
- }
2004
-
2005
- }
2006
- class IntervalYearMonth extends Interval {
2007
- constructor() {
2008
- super(IntervalUnit.YEAR_MONTH);
2009
- }
2010
-
2011
- }
2012
- _Symbol$toStringTag7 = Symbol.toStringTag;
2013
- class FixedSizeList extends DataType {
2014
- constructor(listSize, child) {
2015
- super();
2016
-
2017
- (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "listSize", void 0);
2018
-
2019
- (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "children", void 0);
2020
-
2021
- this.listSize = listSize;
2022
- this.children = [child];
2023
- }
2024
-
2025
- get typeId() {
2026
- return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.FixedSizeList;
2027
- }
2028
-
2029
- get valueType() {
2030
- return this.children[0].type;
2031
- }
2032
-
2033
- get valueField() {
2034
- return this.children[0];
2035
- }
2036
-
2037
- get [_Symbol$toStringTag7]() {
2038
- return 'FixedSizeList';
2039
- }
2040
-
2041
- toString() {
2042
- return "FixedSizeList[".concat(this.listSize, "]<").concat(this.valueType, ">");
2043
- }
2044
-
2045
- }
2046
- _Symbol$toStringTag8 = Symbol.toStringTag;
2047
- class Struct extends DataType {
2048
- constructor(children) {
2049
- super();
2050
-
2051
- (0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "children", void 0);
2052
-
2053
- this.children = children;
2054
- }
2055
-
2056
- get typeId() {
2057
- return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Struct;
2058
- }
2059
-
2060
- toString() {
2061
- return "Struct<{".concat(this.children.map(f => "".concat(f.name, ":").concat(f.type)).join(', '), "}>");
2062
- }
2063
-
2064
- get [_Symbol$toStringTag8]() {
2065
- return 'Struct';
2066
- }
2067
-
2068
- }
2069
-
2070
-
2071
- /***/ }),
2072
-
2073
- /***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/utils/assert.js":
2074
- /*!**********************************************************************************************************************************!*\
2075
- !*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.1.6/node_modules/@loaders.gl/schema/dist/esm/lib/utils/assert.js ***!
2076
- \**********************************************************************************************************************************/
2077
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2078
-
2079
- __webpack_require__.r(__webpack_exports__);
2080
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2081
- /* harmony export */ assert: () => (/* binding */ assert)
2082
- /* harmony export */ });
2083
- function assert(condition, message) {
2084
- if (!condition) {
2085
- throw new Error(message || 'loader assertion failed.');
2086
- }
2087
- }
2088
-
2089
-
2090
- /***/ }),
2091
-
2092
- /***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.1.6/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/assert.js":
2093
- /*!**************************************************************************************************************************************************!*\
2094
- !*** ../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.1.6/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/assert.js ***!
2095
- \**************************************************************************************************************************************************/
2096
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2097
-
2098
- __webpack_require__.r(__webpack_exports__);
2099
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2100
- /* harmony export */ assert: () => (/* binding */ assert)
2101
- /* harmony export */ });
2102
- function assert(condition, message) {
2103
- if (!condition) {
2104
- throw new Error(message || 'loaders.gl assertion failed.');
2105
- }
2106
- }
2107
-
2108
-
2109
- /***/ }),
2110
-
2111
- /***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.1.6/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/globals.js":
2112
- /*!***************************************************************************************************************************************************!*\
2113
- !*** ../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.1.6/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/globals.js ***!
2114
- \***************************************************************************************************************************************************/
2115
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2116
-
2117
- __webpack_require__.r(__webpack_exports__);
2118
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2119
- /* harmony export */ document: () => (/* binding */ document_),
2120
- /* harmony export */ global: () => (/* binding */ global_),
2121
- /* harmony export */ isBrowser: () => (/* binding */ isBrowser),
2122
- /* harmony export */ isMobile: () => (/* binding */ isMobile),
2123
- /* harmony export */ isWorker: () => (/* binding */ isWorker),
2124
- /* harmony export */ nodeVersion: () => (/* binding */ nodeVersion),
2125
- /* harmony export */ self: () => (/* binding */ self_),
2126
- /* harmony export */ window: () => (/* binding */ window_)
2127
- /* harmony export */ });
2128
- const globals = {
2129
- self: typeof self !== 'undefined' && self,
2130
- window: typeof window !== 'undefined' && window,
2131
- global: typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g,
2132
- document: typeof document !== 'undefined' && document
2133
- };
2134
- const self_ = globals.self || globals.window || globals.global || {};
2135
- const window_ = globals.window || globals.self || globals.global || {};
2136
- const global_ = globals.global || globals.self || globals.window || {};
2137
- const document_ = globals.document || {};
2138
-
2139
- const isBrowser = typeof process !== 'object' || String(process) !== '[object process]' || process.browser;
2140
- const isWorker = typeof importScripts === 'function';
2141
- const isMobile = typeof window !== 'undefined' && typeof window.orientation !== 'undefined';
2142
- const matches = typeof process !== 'undefined' && process.version && /v([0-9]*)/.exec(process.version);
2143
- const nodeVersion = matches && parseFloat(matches[1]) || 0;
2144
-
2145
-
2146
- /***/ }),
2147
-
2148
- /***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.1.6/node_modules/@loaders.gl/worker-utils/dist/esm/lib/library-utils/library-utils.js":
2149
- /*!*************************************************************************************************************************************************************!*\
2150
- !*** ../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.1.6/node_modules/@loaders.gl/worker-utils/dist/esm/lib/library-utils/library-utils.js ***!
2151
- \*************************************************************************************************************************************************************/
2152
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2153
-
2154
- __webpack_require__.r(__webpack_exports__);
2155
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2156
- /* harmony export */ getLibraryUrl: () => (/* binding */ getLibraryUrl),
2157
- /* harmony export */ loadLibrary: () => (/* binding */ loadLibrary)
2158
- /* harmony export */ });
2159
- /* harmony import */ var _env_utils_globals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../env-utils/globals */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.1.6/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/globals.js");
2160
- /* harmony import */ var _node_require_utils_node__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../node/require-utils.node */ "?bea9");
2161
- /* harmony import */ var _node_require_utils_node__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_require_utils_node__WEBPACK_IMPORTED_MODULE_0__);
2162
- /* harmony import */ var _env_utils_assert__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../env-utils/assert */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.1.6/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/assert.js");
2163
-
2164
-
2165
-
2166
-
2167
- const LATEST = 'latest';
2168
- const VERSION = true ? "3.1.6" : 0;
2169
- const loadLibraryPromises = {};
2170
- async function loadLibrary(libraryUrl, moduleName = null, options = {}) {
2171
- if (moduleName) {
2172
- libraryUrl = getLibraryUrl(libraryUrl, moduleName, options);
2173
- }
2174
-
2175
- loadLibraryPromises[libraryUrl] = loadLibraryPromises[libraryUrl] || loadLibraryFromFile(libraryUrl);
2176
- return await loadLibraryPromises[libraryUrl];
2177
- }
2178
- function getLibraryUrl(library, moduleName, options) {
2179
- if (library.startsWith('http')) {
2180
- return library;
2181
- }
2182
-
2183
- const modules = options.modules || {};
2184
-
2185
- if (modules[library]) {
2186
- return modules[library];
2187
- }
2188
-
2189
- if (!_env_utils_globals__WEBPACK_IMPORTED_MODULE_1__.isBrowser) {
2190
- return "modules/".concat(moduleName, "/dist/libs/").concat(library);
2191
- }
2192
-
2193
- if (options.CDN) {
2194
- (0,_env_utils_assert__WEBPACK_IMPORTED_MODULE_2__.assert)(options.CDN.startsWith('http'));
2195
- return "".concat(options.CDN, "/").concat(moduleName, "@").concat(VERSION, "/dist/libs/").concat(library);
2196
- }
2197
-
2198
- if (_env_utils_globals__WEBPACK_IMPORTED_MODULE_1__.isWorker) {
2199
- return "../src/libs/".concat(library);
2200
- }
2201
-
2202
- return "modules/".concat(moduleName, "/src/libs/").concat(library);
2203
- }
2204
-
2205
- async function loadLibraryFromFile(libraryUrl) {
2206
- if (libraryUrl.endsWith('wasm')) {
2207
- const response = await fetch(libraryUrl);
2208
- return await response.arrayBuffer();
2209
- }
2210
-
2211
- if (!_env_utils_globals__WEBPACK_IMPORTED_MODULE_1__.isBrowser) {
2212
- try {
2213
- return _node_require_utils_node__WEBPACK_IMPORTED_MODULE_0__ && _node_require_utils_node__WEBPACK_IMPORTED_MODULE_0__.requireFromFile && (await _node_require_utils_node__WEBPACK_IMPORTED_MODULE_0__.requireFromFile(libraryUrl));
2214
- } catch {
2215
- return null;
2216
- }
2217
- }
2218
-
2219
- if (_env_utils_globals__WEBPACK_IMPORTED_MODULE_1__.isWorker) {
2220
- return importScripts(libraryUrl);
2221
- }
2222
-
2223
- const response = await fetch(libraryUrl);
2224
- const scriptSource = await response.text();
2225
- return loadLibraryFromString(scriptSource, libraryUrl);
2226
- }
2227
-
2228
- function loadLibraryFromString(scriptSource, id) {
2229
- if (!_env_utils_globals__WEBPACK_IMPORTED_MODULE_1__.isBrowser) {
2230
- return _node_require_utils_node__WEBPACK_IMPORTED_MODULE_0__.requireFromString && _node_require_utils_node__WEBPACK_IMPORTED_MODULE_0__.requireFromString(scriptSource, id);
2231
- }
2232
-
2233
- if (_env_utils_globals__WEBPACK_IMPORTED_MODULE_1__.isWorker) {
2234
- eval.call(_env_utils_globals__WEBPACK_IMPORTED_MODULE_1__.global, scriptSource);
2235
- return null;
2236
- }
2237
-
2238
- const script = document.createElement('script');
2239
- script.id = id;
2240
-
2241
- try {
2242
- script.appendChild(document.createTextNode(scriptSource));
2243
- } catch (e) {
2244
- script.text = scriptSource;
2245
- }
2246
-
2247
- document.body.appendChild(script);
2248
- return null;
2249
- }
2250
-
2251
-
2252
- /***/ })
2253
-
2254
- }]);
2255
- //# sourceMappingURL=vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_1_6_node_modules_loaders_gl_draco_di-0642a6.bundled-tests.js.map