@deck.gl/geo-layers 8.9.0-beta.3 → 8.9.0-beta.6

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.
Files changed (47) hide show
  1. package/dist/dist.dev.js +196 -1689
  2. package/dist/es5/geo-cell-layer/GeoCellLayer.js.map +1 -1
  3. package/dist/es5/h3-layers/h3-hexagon-layer.js.map +1 -1
  4. package/dist/es5/mesh-layer/mesh-layer.js.map +1 -1
  5. package/dist/es5/mvt-layer/mvt-layer.js +1 -0
  6. package/dist/es5/mvt-layer/mvt-layer.js.map +1 -1
  7. package/dist/es5/tile-3d-layer/tile-3d-layer.js +6 -11
  8. package/dist/es5/tile-3d-layer/tile-3d-layer.js.map +1 -1
  9. package/dist/es5/tile-layer/tile-layer.js +6 -12
  10. package/dist/es5/tile-layer/tile-layer.js.map +1 -1
  11. package/dist/es5/wms-layer/wms-layer.js +0 -4
  12. package/dist/es5/wms-layer/wms-layer.js.map +1 -1
  13. package/dist/esm/geo-cell-layer/GeoCellLayer.js.map +1 -1
  14. package/dist/esm/h3-layers/h3-hexagon-layer.js.map +1 -1
  15. package/dist/esm/mesh-layer/mesh-layer.js.map +1 -1
  16. package/dist/esm/mvt-layer/mvt-layer.js +2 -1
  17. package/dist/esm/mvt-layer/mvt-layer.js.map +1 -1
  18. package/dist/esm/tile-3d-layer/tile-3d-layer.js +6 -11
  19. package/dist/esm/tile-3d-layer/tile-3d-layer.js.map +1 -1
  20. package/dist/esm/tile-layer/tile-layer.js +6 -12
  21. package/dist/esm/tile-layer/tile-layer.js.map +1 -1
  22. package/dist/esm/wms-layer/wms-layer.js +0 -4
  23. package/dist/esm/wms-layer/wms-layer.js.map +1 -1
  24. package/dist.min.js +65 -66
  25. package/package.json +2 -2
  26. package/src/geo-cell-layer/GeoCellLayer.ts +2 -2
  27. package/src/h3-layers/h3-hexagon-layer.ts +2 -6
  28. package/src/mesh-layer/mesh-layer.ts +3 -3
  29. package/src/mvt-layer/mvt-layer.ts +15 -11
  30. package/src/tile-3d-layer/tile-3d-layer.ts +9 -8
  31. package/src/tile-layer/tile-layer.ts +10 -9
  32. package/src/wms-layer/wms-layer.ts +6 -5
  33. package/typed/geo-cell-layer/GeoCellLayer.d.ts +2 -2
  34. package/typed/geo-cell-layer/GeoCellLayer.d.ts.map +1 -1
  35. package/typed/h3-layers/h3-hexagon-layer.d.ts +3 -3
  36. package/typed/h3-layers/h3-hexagon-layer.d.ts.map +1 -1
  37. package/typed/mesh-layer/mesh-layer.d.ts +3 -3
  38. package/typed/mesh-layer/mesh-layer.d.ts.map +1 -1
  39. package/typed/mvt-layer/mvt-layer.d.ts +4 -4
  40. package/typed/mvt-layer/mvt-layer.d.ts.map +1 -1
  41. package/typed/tile-3d-layer/tile-3d-layer.d.ts +2 -1
  42. package/typed/tile-3d-layer/tile-3d-layer.d.ts.map +1 -1
  43. package/typed/tile-layer/tile-layer.d.ts +4 -2
  44. package/typed/tile-layer/tile-layer.d.ts.map +1 -1
  45. package/typed/wms-layer/wms-layer.d.ts +2 -1
  46. package/typed/wms-layer/wms-layer.d.ts.map +1 -1
  47. package/LICENSE +0 -19
package/dist/dist.dev.js CHANGED
@@ -1,5 +1,11 @@
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if (typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory();
4
+ else if (typeof define === 'function' && define.amd) define([], factory);
5
+ else if (typeof exports === 'object') exports['deck'] = factory();
6
+ else root['deck'] = factory();})(globalThis, function () {
1
7
  "use strict";
2
- var deck = (() => {
8
+ var __exports__ = (() => {
3
9
  var __create = Object.create;
4
10
  var __defProp = Object.defineProperty;
5
11
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -43,14 +49,14 @@ var deck = (() => {
43
49
  // external-global-plugin:@deck.gl/layers
44
50
  var require_layers = __commonJS({
45
51
  "external-global-plugin:@deck.gl/layers"(exports4, module2) {
46
- module2.exports = globalThis.deck;
52
+ module2.exports = typeof __require === "function" ? require_layers() : null;
47
53
  }
48
54
  });
49
55
 
50
56
  // external-global-plugin:@deck.gl/core
51
57
  var require_core = __commonJS({
52
58
  "external-global-plugin:@deck.gl/core"(exports4, module2) {
53
- module2.exports = globalThis.deck;
59
+ module2.exports = typeof __require === "function" ? require_core() : null;
54
60
  }
55
61
  });
56
62
 
@@ -488,17 +494,17 @@ var deck = (() => {
488
494
  [key]: val
489
495
  });
490
496
  }
491
- addChild(node3) {
492
- if (node3.tagname === "__proto__")
493
- node3.tagname = "#__proto__";
494
- if (node3[":@"] && Object.keys(node3[":@"]).length > 0) {
497
+ addChild(node2) {
498
+ if (node2.tagname === "__proto__")
499
+ node2.tagname = "#__proto__";
500
+ if (node2[":@"] && Object.keys(node2[":@"]).length > 0) {
495
501
  this.child.push({
496
- [node3.tagname]: node3.child,
497
- [":@"]: node3[":@"]
502
+ [node2.tagname]: node2.child,
503
+ [":@"]: node2[":@"]
498
504
  });
499
505
  } else {
500
506
  this.child.push({
501
- [node3.tagname]: node3.child
507
+ [node2.tagname]: node2.child
502
508
  });
503
509
  }
504
510
  }
@@ -1176,8 +1182,8 @@ var deck = (() => {
1176
1182
  var require_node2json = __commonJS({
1177
1183
  "../../node_modules/fast-xml-parser/src/xmlparser/node2json.js"(exports4) {
1178
1184
  "use strict";
1179
- function prettify(node3, options) {
1180
- return compress(node3, options);
1185
+ function prettify(node2, options) {
1186
+ return compress(node2, options);
1181
1187
  }
1182
1188
  function compress(arr, options, jPath) {
1183
1189
  let text;
@@ -1700,12 +1706,6 @@ var deck = (() => {
1700
1706
  }
1701
1707
  });
1702
1708
 
1703
- // (disabled):../../node_modules/@loaders.gl/loader-utils/dist/esm/lib/node/buffer
1704
- var require_buffer = __commonJS({
1705
- "(disabled):../../node_modules/@loaders.gl/loader-utils/dist/esm/lib/node/buffer"() {
1706
- }
1707
- });
1708
-
1709
1709
  // ../../node_modules/long/dist/long.js
1710
1710
  var require_long = __commonJS({
1711
1711
  "../../node_modules/long/dist/long.js"(exports4, module2) {
@@ -2228,28 +2228,35 @@ var deck = (() => {
2228
2228
  // external-global-plugin:h3-js
2229
2229
  var require_h3_js = __commonJS({
2230
2230
  "external-global-plugin:h3-js"(exports4, module2) {
2231
- module2.exports = globalThis.h3 || {};
2231
+ module2.exports = typeof __require === "function" ? require_h3_js() : null;
2232
2232
  }
2233
2233
  });
2234
2234
 
2235
2235
  // external-global-plugin:@luma.gl/core
2236
2236
  var require_core2 = __commonJS({
2237
2237
  "external-global-plugin:@luma.gl/core"(exports4, module2) {
2238
- module2.exports = globalThis.luma;
2238
+ module2.exports = typeof __require === "function" ? require_core2() : null;
2239
2239
  }
2240
2240
  });
2241
2241
 
2242
2242
  // external-global-plugin:@deck.gl/mesh-layers
2243
2243
  var require_mesh_layers = __commonJS({
2244
2244
  "external-global-plugin:@deck.gl/mesh-layers"(exports4, module2) {
2245
- module2.exports = globalThis.deck;
2245
+ module2.exports = typeof __require === "function" ? require_mesh_layers() : null;
2246
+ }
2247
+ });
2248
+
2249
+ // external-global-plugin:@loaders.gl/core
2250
+ var require_core3 = __commonJS({
2251
+ "external-global-plugin:@loaders.gl/core"(exports4, module2) {
2252
+ module2.exports = typeof __require === "function" ? require_core3() : null;
2246
2253
  }
2247
2254
  });
2248
2255
 
2249
2256
  // external-global-plugin:@deck.gl/extensions
2250
2257
  var require_extensions = __commonJS({
2251
2258
  "external-global-plugin:@deck.gl/extensions"(exports4, module2) {
2252
- module2.exports = globalThis.deck;
2259
+ module2.exports = typeof __require === "function" ? require_extensions() : null;
2253
2260
  }
2254
2261
  });
2255
2262
 
@@ -3250,12 +3257,6 @@ var deck = (() => {
3250
3257
  var matches = typeof process !== "undefined" && process.version && /v([0-9]*)/.exec(process.version);
3251
3258
  var nodeVersion = matches && parseFloat(matches[1]) || 0;
3252
3259
 
3253
- // ../../node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/version.js
3254
- var VERSION5 = true ? "3.3.1" : DEFAULT_VERSION;
3255
- if (false) {
3256
- console.error("loaders.gl: The __VERSION__ variable is not injected using babel plugin. Latest unstable workers would be fetched from the CDN.");
3257
- }
3258
-
3259
3260
  // ../../node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/assert.js
3260
3261
  function assert3(condition, message) {
3261
3262
  if (!condition) {
@@ -3280,455 +3281,9 @@ var deck = (() => {
3280
3281
  var matches2 = typeof process !== "undefined" && process.version && /v([0-9]*)/.exec(process.version);
3281
3282
  var nodeVersion2 = matches2 && parseFloat(matches2[1]) || 0;
3282
3283
 
3283
- // ../../node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-farm/worker-job.js
3284
- var WorkerJob = class {
3285
- constructor(jobName, workerThread) {
3286
- _defineProperty(this, "name", void 0);
3287
- _defineProperty(this, "workerThread", void 0);
3288
- _defineProperty(this, "isRunning", true);
3289
- _defineProperty(this, "result", void 0);
3290
- _defineProperty(this, "_resolve", () => {
3291
- });
3292
- _defineProperty(this, "_reject", () => {
3293
- });
3294
- this.name = jobName;
3295
- this.workerThread = workerThread;
3296
- this.result = new Promise((resolve, reject) => {
3297
- this._resolve = resolve;
3298
- this._reject = reject;
3299
- });
3300
- }
3301
- postMessage(type, payload) {
3302
- this.workerThread.postMessage({
3303
- source: "loaders.gl",
3304
- type,
3305
- payload
3306
- });
3307
- }
3308
- done(value) {
3309
- assert3(this.isRunning);
3310
- this.isRunning = false;
3311
- this._resolve(value);
3312
- }
3313
- error(error2) {
3314
- assert3(this.isRunning);
3315
- this.isRunning = false;
3316
- this._reject(error2);
3317
- }
3318
- };
3319
-
3320
- // ../../node_modules/@loaders.gl/worker-utils/dist/esm/lib/node/worker_threads-browser.js
3321
- var Worker2 = class {
3322
- terminate() {
3323
- }
3324
- };
3325
-
3326
- // ../../node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-utils/get-loadable-worker-url.js
3327
- var workerURLCache = /* @__PURE__ */ new Map();
3328
- function getLoadableWorkerURL(props) {
3329
- assert3(props.source && !props.url || !props.source && props.url);
3330
- let workerURL = workerURLCache.get(props.source || props.url);
3331
- if (!workerURL) {
3332
- if (props.url) {
3333
- workerURL = getLoadableWorkerURLFromURL(props.url);
3334
- workerURLCache.set(props.url, workerURL);
3335
- }
3336
- if (props.source) {
3337
- workerURL = getLoadableWorkerURLFromSource(props.source);
3338
- workerURLCache.set(props.source, workerURL);
3339
- }
3340
- }
3341
- assert3(workerURL);
3342
- return workerURL;
3343
- }
3344
- function getLoadableWorkerURLFromURL(url) {
3345
- if (!url.startsWith("http")) {
3346
- return url;
3347
- }
3348
- const workerSource = buildScriptSource(url);
3349
- return getLoadableWorkerURLFromSource(workerSource);
3350
- }
3351
- function getLoadableWorkerURLFromSource(workerSource) {
3352
- const blob = new Blob([workerSource], {
3353
- type: "application/javascript"
3354
- });
3355
- return URL.createObjectURL(blob);
3356
- }
3357
- function buildScriptSource(workerUrl) {
3358
- return "try {\n importScripts('".concat(workerUrl, "');\n} catch (error) {\n console.error(error);\n throw error;\n}");
3359
- }
3360
-
3361
- // ../../node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-utils/get-transfer-list.js
3362
- function getTransferList(object) {
3363
- let recursive = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
3364
- let transfers = arguments.length > 2 ? arguments[2] : void 0;
3365
- const transfersSet = transfers || /* @__PURE__ */ new Set();
3366
- if (!object) {
3367
- } else if (isTransferable(object)) {
3368
- transfersSet.add(object);
3369
- } else if (isTransferable(object.buffer)) {
3370
- transfersSet.add(object.buffer);
3371
- } else if (ArrayBuffer.isView(object)) {
3372
- } else if (recursive && typeof object === "object") {
3373
- for (const key in object) {
3374
- getTransferList(object[key], recursive, transfersSet);
3375
- }
3376
- }
3377
- return transfers === void 0 ? Array.from(transfersSet) : [];
3378
- }
3379
- function isTransferable(object) {
3380
- if (!object) {
3381
- return false;
3382
- }
3383
- if (object instanceof ArrayBuffer) {
3384
- return true;
3385
- }
3386
- if (typeof MessagePort !== "undefined" && object instanceof MessagePort) {
3387
- return true;
3388
- }
3389
- if (typeof ImageBitmap !== "undefined" && object instanceof ImageBitmap) {
3390
- return true;
3391
- }
3392
- if (typeof OffscreenCanvas !== "undefined" && object instanceof OffscreenCanvas) {
3393
- return true;
3394
- }
3395
- return false;
3396
- }
3397
-
3398
- // ../../node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-farm/worker-thread.js
3399
- var NOOP = () => {
3400
- };
3401
- var WorkerThread = class {
3402
- static isSupported() {
3403
- return typeof Worker !== "undefined" && isBrowser2 || typeof Worker2 !== "undefined" && !isBrowser2;
3404
- }
3405
- constructor(props) {
3406
- _defineProperty(this, "name", void 0);
3407
- _defineProperty(this, "source", void 0);
3408
- _defineProperty(this, "url", void 0);
3409
- _defineProperty(this, "terminated", false);
3410
- _defineProperty(this, "worker", void 0);
3411
- _defineProperty(this, "onMessage", void 0);
3412
- _defineProperty(this, "onError", void 0);
3413
- _defineProperty(this, "_loadableURL", "");
3414
- const {
3415
- name: name10,
3416
- source,
3417
- url
3418
- } = props;
3419
- assert3(source || url);
3420
- this.name = name10;
3421
- this.source = source;
3422
- this.url = url;
3423
- this.onMessage = NOOP;
3424
- this.onError = (error2) => console.log(error2);
3425
- this.worker = isBrowser2 ? this._createBrowserWorker() : this._createNodeWorker();
3426
- }
3427
- destroy() {
3428
- this.onMessage = NOOP;
3429
- this.onError = NOOP;
3430
- this.worker.terminate();
3431
- this.terminated = true;
3432
- }
3433
- get isRunning() {
3434
- return Boolean(this.onMessage);
3435
- }
3436
- postMessage(data, transferList) {
3437
- transferList = transferList || getTransferList(data);
3438
- this.worker.postMessage(data, transferList);
3439
- }
3440
- _getErrorFromErrorEvent(event) {
3441
- let message = "Failed to load ";
3442
- message += "worker ".concat(this.name, " from ").concat(this.url, ". ");
3443
- if (event.message) {
3444
- message += "".concat(event.message, " in ");
3445
- }
3446
- if (event.lineno) {
3447
- message += ":".concat(event.lineno, ":").concat(event.colno);
3448
- }
3449
- return new Error(message);
3450
- }
3451
- _createBrowserWorker() {
3452
- this._loadableURL = getLoadableWorkerURL({
3453
- source: this.source,
3454
- url: this.url
3455
- });
3456
- const worker = new Worker(this._loadableURL, {
3457
- name: this.name
3458
- });
3459
- worker.onmessage = (event) => {
3460
- if (!event.data) {
3461
- this.onError(new Error("No data received"));
3462
- } else {
3463
- this.onMessage(event.data);
3464
- }
3465
- };
3466
- worker.onerror = (error2) => {
3467
- this.onError(this._getErrorFromErrorEvent(error2));
3468
- this.terminated = true;
3469
- };
3470
- worker.onmessageerror = (event) => console.error(event);
3471
- return worker;
3472
- }
3473
- _createNodeWorker() {
3474
- let worker;
3475
- if (this.url) {
3476
- const absolute = this.url.includes(":/") || this.url.startsWith("/");
3477
- const url = absolute ? this.url : "./".concat(this.url);
3478
- worker = new Worker2(url, {
3479
- eval: false
3480
- });
3481
- } else if (this.source) {
3482
- worker = new Worker2(this.source, {
3483
- eval: true
3484
- });
3485
- } else {
3486
- throw new Error("no worker");
3487
- }
3488
- worker.on("message", (data) => {
3489
- this.onMessage(data);
3490
- });
3491
- worker.on("error", (error2) => {
3492
- this.onError(error2);
3493
- });
3494
- worker.on("exit", (code) => {
3495
- });
3496
- return worker;
3497
- }
3498
- };
3499
-
3500
- // ../../node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-farm/worker-pool.js
3501
- var WorkerPool = class {
3502
- static isSupported() {
3503
- return WorkerThread.isSupported();
3504
- }
3505
- constructor(props) {
3506
- _defineProperty(this, "name", "unnamed");
3507
- _defineProperty(this, "source", void 0);
3508
- _defineProperty(this, "url", void 0);
3509
- _defineProperty(this, "maxConcurrency", 1);
3510
- _defineProperty(this, "maxMobileConcurrency", 1);
3511
- _defineProperty(this, "onDebug", () => {
3512
- });
3513
- _defineProperty(this, "reuseWorkers", true);
3514
- _defineProperty(this, "props", {});
3515
- _defineProperty(this, "jobQueue", []);
3516
- _defineProperty(this, "idleQueue", []);
3517
- _defineProperty(this, "count", 0);
3518
- _defineProperty(this, "isDestroyed", false);
3519
- this.source = props.source;
3520
- this.url = props.url;
3521
- this.setProps(props);
3522
- }
3523
- destroy() {
3524
- this.idleQueue.forEach((worker) => worker.destroy());
3525
- this.isDestroyed = true;
3526
- }
3527
- setProps(props) {
3528
- this.props = {
3529
- ...this.props,
3530
- ...props
3531
- };
3532
- if (props.name !== void 0) {
3533
- this.name = props.name;
3534
- }
3535
- if (props.maxConcurrency !== void 0) {
3536
- this.maxConcurrency = props.maxConcurrency;
3537
- }
3538
- if (props.maxMobileConcurrency !== void 0) {
3539
- this.maxMobileConcurrency = props.maxMobileConcurrency;
3540
- }
3541
- if (props.reuseWorkers !== void 0) {
3542
- this.reuseWorkers = props.reuseWorkers;
3543
- }
3544
- if (props.onDebug !== void 0) {
3545
- this.onDebug = props.onDebug;
3546
- }
3547
- }
3548
- async startJob(name10) {
3549
- let onMessage2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : (job, type, data) => job.done(data);
3550
- let onError = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : (job, error2) => job.error(error2);
3551
- const startPromise = new Promise((onStart) => {
3552
- this.jobQueue.push({
3553
- name: name10,
3554
- onMessage: onMessage2,
3555
- onError,
3556
- onStart
3557
- });
3558
- return this;
3559
- });
3560
- this._startQueuedJob();
3561
- return await startPromise;
3562
- }
3563
- async _startQueuedJob() {
3564
- if (!this.jobQueue.length) {
3565
- return;
3566
- }
3567
- const workerThread = this._getAvailableWorker();
3568
- if (!workerThread) {
3569
- return;
3570
- }
3571
- const queuedJob = this.jobQueue.shift();
3572
- if (queuedJob) {
3573
- this.onDebug({
3574
- message: "Starting job",
3575
- name: queuedJob.name,
3576
- workerThread,
3577
- backlog: this.jobQueue.length
3578
- });
3579
- const job = new WorkerJob(queuedJob.name, workerThread);
3580
- workerThread.onMessage = (data) => queuedJob.onMessage(job, data.type, data.payload);
3581
- workerThread.onError = (error2) => queuedJob.onError(job, error2);
3582
- queuedJob.onStart(job);
3583
- try {
3584
- await job.result;
3585
- } finally {
3586
- this.returnWorkerToQueue(workerThread);
3587
- }
3588
- }
3589
- }
3590
- returnWorkerToQueue(worker) {
3591
- const shouldDestroyWorker = this.isDestroyed || !this.reuseWorkers || this.count > this._getMaxConcurrency();
3592
- if (shouldDestroyWorker) {
3593
- worker.destroy();
3594
- this.count--;
3595
- } else {
3596
- this.idleQueue.push(worker);
3597
- }
3598
- if (!this.isDestroyed) {
3599
- this._startQueuedJob();
3600
- }
3601
- }
3602
- _getAvailableWorker() {
3603
- if (this.idleQueue.length > 0) {
3604
- return this.idleQueue.shift() || null;
3605
- }
3606
- if (this.count < this._getMaxConcurrency()) {
3607
- this.count++;
3608
- const name10 = "".concat(this.name.toLowerCase(), " (#").concat(this.count, " of ").concat(this.maxConcurrency, ")");
3609
- return new WorkerThread({
3610
- name: name10,
3611
- source: this.source,
3612
- url: this.url
3613
- });
3614
- }
3615
- return null;
3616
- }
3617
- _getMaxConcurrency() {
3618
- return isMobile ? this.maxMobileConcurrency : this.maxConcurrency;
3619
- }
3620
- };
3621
-
3622
- // ../../node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-farm/worker-farm.js
3623
- var DEFAULT_PROPS = {
3624
- maxConcurrency: 3,
3625
- maxMobileConcurrency: 1,
3626
- reuseWorkers: true,
3627
- onDebug: () => {
3628
- }
3629
- };
3630
- var WorkerFarm = class {
3631
- static isSupported() {
3632
- return WorkerThread.isSupported();
3633
- }
3634
- static getWorkerFarm() {
3635
- let props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
3636
- WorkerFarm._workerFarm = WorkerFarm._workerFarm || new WorkerFarm({});
3637
- WorkerFarm._workerFarm.setProps(props);
3638
- return WorkerFarm._workerFarm;
3639
- }
3640
- constructor(props) {
3641
- _defineProperty(this, "props", void 0);
3642
- _defineProperty(this, "workerPools", /* @__PURE__ */ new Map());
3643
- this.props = {
3644
- ...DEFAULT_PROPS
3645
- };
3646
- this.setProps(props);
3647
- this.workerPools = /* @__PURE__ */ new Map();
3648
- }
3649
- destroy() {
3650
- for (const workerPool of this.workerPools.values()) {
3651
- workerPool.destroy();
3652
- }
3653
- this.workerPools = /* @__PURE__ */ new Map();
3654
- }
3655
- setProps(props) {
3656
- this.props = {
3657
- ...this.props,
3658
- ...props
3659
- };
3660
- for (const workerPool of this.workerPools.values()) {
3661
- workerPool.setProps(this._getWorkerPoolProps());
3662
- }
3663
- }
3664
- getWorkerPool(options) {
3665
- const {
3666
- name: name10,
3667
- source,
3668
- url
3669
- } = options;
3670
- let workerPool = this.workerPools.get(name10);
3671
- if (!workerPool) {
3672
- workerPool = new WorkerPool({
3673
- name: name10,
3674
- source,
3675
- url
3676
- });
3677
- workerPool.setProps(this._getWorkerPoolProps());
3678
- this.workerPools.set(name10, workerPool);
3679
- }
3680
- return workerPool;
3681
- }
3682
- _getWorkerPoolProps() {
3683
- return {
3684
- maxConcurrency: this.props.maxConcurrency,
3685
- maxMobileConcurrency: this.props.maxMobileConcurrency,
3686
- reuseWorkers: this.props.reuseWorkers,
3687
- onDebug: this.props.onDebug
3688
- };
3689
- }
3690
- };
3691
- _defineProperty(WorkerFarm, "_workerFarm", void 0);
3692
-
3693
- // ../../node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-api/get-worker-url.js
3694
- var NPM_TAG = "latest";
3695
- function getWorkerURL(worker) {
3696
- let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
3697
- const workerOptions = options[worker.id] || {};
3698
- const workerFile = "".concat(worker.id, "-worker.js");
3699
- let url = workerOptions.workerUrl;
3700
- if (!url && worker.id === "compression") {
3701
- url = options.workerUrl;
3702
- }
3703
- if (options._workerType === "test") {
3704
- url = "modules/".concat(worker.module, "/dist/").concat(workerFile);
3705
- }
3706
- if (!url) {
3707
- let version = worker.version;
3708
- if (version === "latest") {
3709
- version = NPM_TAG;
3710
- }
3711
- const versionTag = version ? "@".concat(version) : "";
3712
- url = "https://unpkg.com/@loaders.gl/".concat(worker.module).concat(versionTag, "/dist/").concat(workerFile);
3713
- }
3714
- assert3(url);
3715
- return url;
3716
- }
3717
-
3718
- // ../../node_modules/@loaders.gl/worker-utils/dist/esm/lib/worker-api/validate-worker-version.js
3719
- function validateWorkerVersion(worker) {
3720
- let coreVersion = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : VERSION5;
3721
- assert3(worker, "no worker provided");
3722
- const workerVersion = worker.version;
3723
- if (!coreVersion || !workerVersion) {
3724
- return false;
3725
- }
3726
- return true;
3727
- }
3728
-
3729
3284
  // ../../node_modules/@loaders.gl/worker-utils/dist/esm/lib/library-utils/library-utils.js
3730
3285
  var node = __toESM(require_require_utils());
3731
- var VERSION6 = true ? "3.3.1" : LATEST;
3286
+ var VERSION5 = true ? "3.3.1" : LATEST;
3732
3287
  var loadLibraryPromises = {};
3733
3288
  async function loadLibrary(libraryUrl) {
3734
3289
  let moduleName = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
@@ -3752,7 +3307,7 @@ var deck = (() => {
3752
3307
  }
3753
3308
  if (options.CDN) {
3754
3309
  assert3(options.CDN.startsWith("http"));
3755
- return "".concat(options.CDN, "/").concat(moduleName, "@").concat(VERSION6, "/dist/libs/").concat(library);
3310
+ return "".concat(options.CDN, "/").concat(moduleName, "@").concat(VERSION5, "/dist/libs/").concat(library);
3756
3311
  }
3757
3312
  if (isWorker) {
3758
3313
  return "../src/libs/".concat(library);
@@ -3797,71 +3352,6 @@ var deck = (() => {
3797
3352
  return null;
3798
3353
  }
3799
3354
 
3800
- // ../../node_modules/@loaders.gl/loader-utils/dist/esm/lib/worker-loader-utils/parse-with-worker.js
3801
- function canParseWithWorker(loader, options) {
3802
- if (!WorkerFarm.isSupported()) {
3803
- return false;
3804
- }
3805
- if (!isBrowser2 && !(options !== null && options !== void 0 && options._nodeWorkers)) {
3806
- return false;
3807
- }
3808
- return loader.worker && (options === null || options === void 0 ? void 0 : options.worker);
3809
- }
3810
- async function parseWithWorker(loader, data, options, context, parseOnMainThread) {
3811
- const name10 = loader.id;
3812
- const url = getWorkerURL(loader, options);
3813
- const workerFarm = WorkerFarm.getWorkerFarm(options);
3814
- const workerPool = workerFarm.getWorkerPool({
3815
- name: name10,
3816
- url
3817
- });
3818
- options = JSON.parse(JSON.stringify(options));
3819
- context = JSON.parse(JSON.stringify(context || {}));
3820
- const job = await workerPool.startJob(
3821
- "process-on-worker",
3822
- onMessage.bind(null, parseOnMainThread)
3823
- );
3824
- job.postMessage("process", {
3825
- input: data,
3826
- options,
3827
- context
3828
- });
3829
- const result = await job.result;
3830
- return await result.result;
3831
- }
3832
- async function onMessage(parseOnMainThread, job, type, payload) {
3833
- switch (type) {
3834
- case "done":
3835
- job.done(payload);
3836
- break;
3837
- case "error":
3838
- job.error(new Error(payload.error));
3839
- break;
3840
- case "process":
3841
- const {
3842
- id,
3843
- input,
3844
- options
3845
- } = payload;
3846
- try {
3847
- const result = await parseOnMainThread(input, options);
3848
- job.postMessage("done", {
3849
- id,
3850
- result
3851
- });
3852
- } catch (error2) {
3853
- const message = error2 instanceof Error ? error2.message : "unknown error";
3854
- job.postMessage("error", {
3855
- id,
3856
- error: message
3857
- });
3858
- }
3859
- break;
3860
- default:
3861
- console.warn("parse-with-worker unknown message ".concat(type));
3862
- }
3863
- }
3864
-
3865
3355
  // ../../node_modules/@loaders.gl/loader-utils/dist/esm/lib/binary-utils/get-first-characters.js
3866
3356
  function getFirstCharacters(data) {
3867
3357
  let length5 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 5;
@@ -3897,34 +3387,6 @@ var deck = (() => {
3897
3387
  }
3898
3388
 
3899
3389
  // ../../node_modules/@loaders.gl/loader-utils/dist/esm/lib/binary-utils/array-buffer-utils.js
3900
- function compareArrayBuffers(arrayBuffer1, arrayBuffer2, byteLength) {
3901
- byteLength = byteLength || arrayBuffer1.byteLength;
3902
- if (arrayBuffer1.byteLength < byteLength || arrayBuffer2.byteLength < byteLength) {
3903
- return false;
3904
- }
3905
- const array1 = new Uint8Array(arrayBuffer1);
3906
- const array2 = new Uint8Array(arrayBuffer2);
3907
- for (let i3 = 0; i3 < array1.length; ++i3) {
3908
- if (array1[i3] !== array2[i3]) {
3909
- return false;
3910
- }
3911
- }
3912
- return true;
3913
- }
3914
- function concatenateArrayBuffers() {
3915
- for (var _len = arguments.length, sources = new Array(_len), _key = 0; _key < _len; _key++) {
3916
- sources[_key] = arguments[_key];
3917
- }
3918
- const sourceArrays = sources.map((source2) => source2 instanceof ArrayBuffer ? new Uint8Array(source2) : source2);
3919
- const byteLength = sourceArrays.reduce((length5, typedArray) => length5 + typedArray.byteLength, 0);
3920
- const result = new Uint8Array(byteLength);
3921
- let offset = 0;
3922
- for (const sourceArray of sourceArrays) {
3923
- result.set(sourceArray, offset);
3924
- offset += sourceArray.byteLength;
3925
- }
3926
- return result.buffer;
3927
- }
3928
3390
  function concatenateTypedArrays() {
3929
3391
  for (var _len2 = arguments.length, typedArrays = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
3930
3392
  typedArrays[_key2] = arguments[_key2];
@@ -3968,15 +3430,6 @@ var deck = (() => {
3968
3430
  return targetOffset + padToNBytes(sourceArray.byteLength, 4);
3969
3431
  }
3970
3432
 
3971
- // ../../node_modules/@loaders.gl/loader-utils/dist/esm/lib/iterators/async-iteration.js
3972
- async function concatenateArrayBuffersAsync(asyncIterator) {
3973
- const arrayBuffers = [];
3974
- for await (const chunk of asyncIterator) {
3975
- arrayBuffers.push(chunk);
3976
- }
3977
- return concatenateArrayBuffers(...arrayBuffers);
3978
- }
3979
-
3980
3433
  // ../../node_modules/@probe.gl/stats/dist/esm/utils/hi-res-timestamp.js
3981
3434
  function getHiResTimestamp() {
3982
3435
  let timestamp;
@@ -4175,7 +3628,7 @@ var deck = (() => {
4175
3628
  var STAT_CANCELLED_REQUESTS = "Cancelled Requests";
4176
3629
  var STAT_QUEUED_REQUESTS_EVER = "Queued Requests Ever";
4177
3630
  var STAT_ACTIVE_REQUESTS_EVER = "Active Requests Ever";
4178
- var DEFAULT_PROPS2 = {
3631
+ var DEFAULT_PROPS = {
4179
3632
  id: "request-scheduler",
4180
3633
  throttleRequests: true,
4181
3634
  maxRequests: 6
@@ -4190,7 +3643,7 @@ var deck = (() => {
4190
3643
  _defineProperty(this, "requestMap", /* @__PURE__ */ new Map());
4191
3644
  _defineProperty(this, "deferredUpdate", null);
4192
3645
  this.props = {
4193
- ...DEFAULT_PROPS2,
3646
+ ...DEFAULT_PROPS,
4194
3647
  ...props
4195
3648
  };
4196
3649
  this.stats = new Stats({
@@ -4289,51 +3742,6 @@ var deck = (() => {
4289
3742
  }
4290
3743
  };
4291
3744
 
4292
- // ../../node_modules/@loaders.gl/loader-utils/dist/esm/lib/path-utils/file-aliases.js
4293
- var pathPrefix = "";
4294
- var fileAliases = {};
4295
- function resolvePath(filename2) {
4296
- for (const alias in fileAliases) {
4297
- if (filename2.startsWith(alias)) {
4298
- const replacement = fileAliases[alias];
4299
- filename2 = filename2.replace(alias, replacement);
4300
- }
4301
- }
4302
- if (!filename2.startsWith("http://") && !filename2.startsWith("https://")) {
4303
- filename2 = "".concat(pathPrefix).concat(filename2);
4304
- }
4305
- return filename2;
4306
- }
4307
-
4308
- // ../../node_modules/@loaders.gl/loader-utils/dist/esm/lib/binary-utils/memory-conversion-utils.js
4309
- var node2 = __toESM(require_buffer());
4310
- function isBuffer(value) {
4311
- return value && typeof value === "object" && value.isBuffer;
4312
- }
4313
- function toArrayBuffer2(data) {
4314
- if (isBuffer(data)) {
4315
- return node2.toArrayBuffer(data);
4316
- }
4317
- if (data instanceof ArrayBuffer) {
4318
- return data;
4319
- }
4320
- if (ArrayBuffer.isView(data)) {
4321
- if (data.byteOffset === 0 && data.byteLength === data.buffer.byteLength) {
4322
- return data.buffer;
4323
- }
4324
- return data.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength);
4325
- }
4326
- if (typeof data === "string") {
4327
- const text = data;
4328
- const uint8Array = new TextEncoder().encode(text);
4329
- return uint8Array.buffer;
4330
- }
4331
- if (data && typeof data === "object" && data._toArrayBuffer) {
4332
- return data._toArrayBuffer();
4333
- }
4334
- throw new Error("toArrayBuffer");
4335
- }
4336
-
4337
3745
  // ../../node_modules/@loaders.gl/loader-utils/dist/esm/lib/path-utils/path.js
4338
3746
  var path_exports = {};
4339
3747
  __export(path_exports, {
@@ -10438,24 +9846,20 @@ var deck = (() => {
10438
9846
  },
10439
9847
  onMetadataLoad: {
10440
9848
  type: "function",
10441
- compare: false,
10442
9849
  value: () => {
10443
9850
  }
10444
9851
  },
10445
9852
  onMetadataLoadError: {
10446
9853
  type: "function",
10447
- compare: false,
10448
9854
  value: console.error
10449
9855
  },
10450
9856
  onImageLoadStart: {
10451
9857
  type: "function",
10452
- compare: false,
10453
9858
  value: () => {
10454
9859
  }
10455
9860
  },
10456
9861
  onImageLoad: {
10457
9862
  type: "function",
10458
- compare: false,
10459
9863
  value: () => {
10460
9864
  }
10461
9865
  },
@@ -10986,7 +10390,7 @@ var deck = (() => {
10986
10390
  out[3] = a2[3];
10987
10391
  return out;
10988
10392
  }
10989
- var forEach2 = function() {
10393
+ var forEach = function() {
10990
10394
  var vec = create();
10991
10395
  return function(a2, stride, offset, count, fn, arg) {
10992
10396
  var i3, l2;
@@ -11605,7 +11009,7 @@ var deck = (() => {
11605
11009
  out[1] = m[1] * x2 + m[5] * y2 + m[13];
11606
11010
  return out;
11607
11011
  }
11608
- var forEach3 = function() {
11012
+ var forEach2 = function() {
11609
11013
  var vec = create2();
11610
11014
  return function(a2, stride, offset, count, fn, arg) {
11611
11015
  var i3, l2;
@@ -11755,7 +11159,7 @@ var deck = (() => {
11755
11159
  return Math.acos(Math.min(Math.max(cosine, -1), 1));
11756
11160
  }
11757
11161
  var len = length2;
11758
- var forEach4 = function() {
11162
+ var forEach3 = function() {
11759
11163
  var vec = create3();
11760
11164
  return function(a2, stride, offset, count, fn, arg) {
11761
11165
  var i3, l2;
@@ -14709,8 +14113,8 @@ var deck = (() => {
14709
14113
  result.push(this);
14710
14114
  }
14711
14115
  if (this._children) {
14712
- for (const node3 of this._children) {
14713
- node3.getSelected(result);
14116
+ for (const node2 of this._children) {
14117
+ node2.getSelected(result);
14714
14118
  }
14715
14119
  }
14716
14120
  return result;
@@ -15444,37 +14848,31 @@ var deck = (() => {
15444
14848
  dataComparator: urlType.equal,
15445
14849
  renderSubLayers: {
15446
14850
  type: "function",
15447
- value: (props) => new import_layers5.GeoJsonLayer(props),
15448
- compare: false
14851
+ value: (props) => new import_layers5.GeoJsonLayer(props)
15449
14852
  },
15450
14853
  getTileData: {
15451
14854
  type: "function",
15452
14855
  optional: true,
15453
- value: null,
15454
- compare: false
14856
+ value: null
15455
14857
  },
15456
14858
  onViewportLoad: {
15457
14859
  type: "function",
15458
14860
  optional: true,
15459
- value: null,
15460
- compare: false
14861
+ value: null
15461
14862
  },
15462
14863
  onTileLoad: {
15463
14864
  type: "function",
15464
14865
  value: (tile) => {
15465
- },
15466
- compare: false
14866
+ }
15467
14867
  },
15468
14868
  onTileUnload: {
15469
14869
  type: "function",
15470
14870
  value: (tile) => {
15471
- },
15472
- compare: false
14871
+ }
15473
14872
  },
15474
14873
  onTileError: {
15475
14874
  type: "function",
15476
- value: (err) => console.error(err),
15477
- compare: false
14875
+ value: (err) => console.error(err)
15478
14876
  },
15479
14877
  extent: {
15480
14878
  type: "array",
@@ -16780,7 +16178,7 @@ varying float vTime;
16780
16178
  var process_ = globals3.process || {};
16781
16179
 
16782
16180
  // ../../node_modules/@probe.gl/env/dist/esm/utils/globals.js
16783
- var VERSION7 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "untranspiled source";
16181
+ var VERSION6 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "untranspiled source";
16784
16182
  var isBrowser4 = isBrowser3();
16785
16183
 
16786
16184
  // ../../node_modules/@probe.gl/log/dist/esm/utils/local-storage.js
@@ -16965,7 +16363,7 @@ varying float vTime;
16965
16363
  id: ""
16966
16364
  };
16967
16365
  _defineProperty(this, "id", void 0);
16968
- _defineProperty(this, "VERSION", VERSION7);
16366
+ _defineProperty(this, "VERSION", VERSION6);
16969
16367
  _defineProperty(this, "_startTs", getHiResTimestamp2());
16970
16368
  _defineProperty(this, "_deltaTs", getHiResTimestamp2());
16971
16369
  _defineProperty(this, "_storage", void 0);
@@ -17171,7 +16569,7 @@ varying float vTime;
17171
16569
  return noop;
17172
16570
  }
17173
16571
  };
17174
- _defineProperty(Log, "VERSION", VERSION7);
16572
+ _defineProperty(Log, "VERSION", VERSION6);
17175
16573
  function normalizeLogLevel(logLevel) {
17176
16574
  if (!logLevel) {
17177
16575
  return 0;
@@ -18337,7 +17735,7 @@ varying float vTime;
18337
17735
  constructor(gl) {
18338
17736
  let {
18339
17737
  copyState = false,
18340
- log: log8 = () => {
17738
+ log: log7 = () => {
18341
17739
  }
18342
17740
  } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
18343
17741
  this.gl = gl;
@@ -18345,7 +17743,7 @@ varying float vTime;
18345
17743
  this.stateStack = [];
18346
17744
  this.enable = true;
18347
17745
  this.cache = copyState ? getParameters(gl) : Object.assign({}, GL_PARAMETER_DEFAULTS);
18348
- this.log = log8;
17746
+ this.log = log7;
18349
17747
  this._updateCache = this._updateCache.bind(this);
18350
17748
  Object.seal(this);
18351
17749
  }
@@ -18491,7 +17889,7 @@ varying float vTime;
18491
17889
  var isBrowser5 = isBrowser3();
18492
17890
 
18493
17891
  // ../../node_modules/@luma.gl/webgl/dist/esm/init.js
18494
- var VERSION8 = true ? "8.5.16" : "untranspiled source";
17892
+ var VERSION7 = true ? "8.5.16" : "untranspiled source";
18495
17893
  var STARTUP_MESSAGE = "set luma.log.level=1 (or higher) to trace rendering";
18496
17894
  var StatsManager = class {
18497
17895
  constructor() {
@@ -18507,16 +17905,16 @@ varying float vTime;
18507
17905
  }
18508
17906
  };
18509
17907
  var lumaStats = new StatsManager();
18510
- if (globalThis.luma && globalThis.luma.VERSION !== VERSION8) {
18511
- throw new Error("luma.gl - multiple VERSIONs detected: ".concat(globalThis.luma.VERSION, " vs ").concat(VERSION8));
17908
+ if (globalThis.luma && globalThis.luma.VERSION !== VERSION7) {
17909
+ throw new Error("luma.gl - multiple VERSIONs detected: ".concat(globalThis.luma.VERSION, " vs ").concat(VERSION7));
18512
17910
  }
18513
17911
  if (!globalThis.luma) {
18514
17912
  if (isBrowser3()) {
18515
- log.log(1, "luma.gl ".concat(VERSION8, " - ").concat(STARTUP_MESSAGE))();
17913
+ log.log(1, "luma.gl ".concat(VERSION7, " - ").concat(STARTUP_MESSAGE))();
18516
17914
  }
18517
17915
  globalThis.luma = globalThis.luma || {
18518
- VERSION: VERSION8,
18519
- version: VERSION8,
17916
+ VERSION: VERSION7,
17917
+ version: VERSION7,
18520
17918
  log,
18521
17919
  stats: lumaStats,
18522
17920
  globals: {
@@ -19990,10 +19388,10 @@ varying float vTime;
19990
19388
  };
19991
19389
 
19992
19390
  // ../../node_modules/@luma.gl/webgl/dist/esm/utils/load-file.js
19993
- var pathPrefix2 = "";
19391
+ var pathPrefix = "";
19994
19392
  function loadImage(url, opts) {
19995
19393
  assert8(typeof url === "string");
19996
- url = pathPrefix2 + url;
19394
+ url = pathPrefix + url;
19997
19395
  return new Promise((resolve, reject) => {
19998
19396
  try {
19999
19397
  const image = new Image();
@@ -21624,907 +21022,8 @@ void main(void) {
21624
21022
  __publicField(MeshLayer, "layerName", "MeshLayer");
21625
21023
  __publicField(MeshLayer, "defaultProps", defaultProps10);
21626
21024
 
21627
- // ../../node_modules/@loaders.gl/core/dist/esm/javascript-utils/is-type.js
21628
- var isBoolean = (x2) => typeof x2 === "boolean";
21629
- var isFunction = (x2) => typeof x2 === "function";
21630
- var isObject = (x2) => x2 !== null && typeof x2 === "object";
21631
- var isPureObject = (x2) => isObject(x2) && x2.constructor === {}.constructor;
21632
- var isIterable = (x2) => x2 && typeof x2[Symbol.iterator] === "function";
21633
- var isAsyncIterable = (x2) => x2 && typeof x2[Symbol.asyncIterator] === "function";
21634
- var isResponse = (x2) => typeof Response !== "undefined" && x2 instanceof Response || x2 && x2.arrayBuffer && x2.text && x2.json;
21635
- var isBlob = (x2) => typeof Blob !== "undefined" && x2 instanceof Blob;
21636
- var isBuffer2 = (x2) => x2 && typeof x2 === "object" && x2.isBuffer;
21637
- var isReadableDOMStream = (x2) => typeof ReadableStream !== "undefined" && x2 instanceof ReadableStream || isObject(x2) && isFunction(x2.tee) && isFunction(x2.cancel) && isFunction(x2.getReader);
21638
- var isReadableNodeStream = (x2) => isObject(x2) && isFunction(x2.read) && isFunction(x2.pipe) && isBoolean(x2.readable);
21639
- var isReadableStream = (x2) => isReadableDOMStream(x2) || isReadableNodeStream(x2);
21640
-
21641
- // ../../node_modules/@loaders.gl/core/dist/esm/lib/utils/mime-type-utils.js
21642
- var DATA_URL_PATTERN = /^data:([-\w.]+\/[-\w.+]+)(;|,)/;
21643
- var MIME_TYPE_PATTERN = /^([-\w.]+\/[-\w.+]+)/;
21644
- function parseMIMEType(mimeString) {
21645
- const matches3 = MIME_TYPE_PATTERN.exec(mimeString);
21646
- if (matches3) {
21647
- return matches3[1];
21648
- }
21649
- return mimeString;
21650
- }
21651
- function parseMIMETypeFromURL(url) {
21652
- const matches3 = DATA_URL_PATTERN.exec(url);
21653
- if (matches3) {
21654
- return matches3[1];
21655
- }
21656
- return "";
21657
- }
21658
-
21659
- // ../../node_modules/@loaders.gl/core/dist/esm/lib/utils/resource-utils.js
21660
- var QUERY_STRING_PATTERN = /\?.*/;
21661
- function getResourceUrlAndType(resource) {
21662
- if (isResponse(resource)) {
21663
- const url = stripQueryString(resource.url || "");
21664
- const contentTypeHeader = resource.headers.get("content-type") || "";
21665
- return {
21666
- url,
21667
- type: parseMIMEType(contentTypeHeader) || parseMIMETypeFromURL(url)
21668
- };
21669
- }
21670
- if (isBlob(resource)) {
21671
- return {
21672
- url: stripQueryString(resource.name || ""),
21673
- type: resource.type || ""
21674
- };
21675
- }
21676
- if (typeof resource === "string") {
21677
- return {
21678
- url: stripQueryString(resource),
21679
- type: parseMIMETypeFromURL(resource)
21680
- };
21681
- }
21682
- return {
21683
- url: "",
21684
- type: ""
21685
- };
21686
- }
21687
- function getResourceContentLength(resource) {
21688
- if (isResponse(resource)) {
21689
- return resource.headers["content-length"] || -1;
21690
- }
21691
- if (isBlob(resource)) {
21692
- return resource.size;
21693
- }
21694
- if (typeof resource === "string") {
21695
- return resource.length;
21696
- }
21697
- if (resource instanceof ArrayBuffer) {
21698
- return resource.byteLength;
21699
- }
21700
- if (ArrayBuffer.isView(resource)) {
21701
- return resource.byteLength;
21702
- }
21703
- return -1;
21704
- }
21705
- function stripQueryString(url) {
21706
- return url.replace(QUERY_STRING_PATTERN, "");
21707
- }
21708
-
21709
- // ../../node_modules/@loaders.gl/core/dist/esm/lib/utils/response-utils.js
21710
- async function makeResponse(resource) {
21711
- if (isResponse(resource)) {
21712
- return resource;
21713
- }
21714
- const headers = {};
21715
- const contentLength = getResourceContentLength(resource);
21716
- if (contentLength >= 0) {
21717
- headers["content-length"] = String(contentLength);
21718
- }
21719
- const {
21720
- url,
21721
- type
21722
- } = getResourceUrlAndType(resource);
21723
- if (type) {
21724
- headers["content-type"] = type;
21725
- }
21726
- const initialDataUrl = await getInitialDataUrl(resource);
21727
- if (initialDataUrl) {
21728
- headers["x-first-bytes"] = initialDataUrl;
21729
- }
21730
- if (typeof resource === "string") {
21731
- resource = new TextEncoder().encode(resource);
21732
- }
21733
- const response = new Response(resource, {
21734
- headers
21735
- });
21736
- Object.defineProperty(response, "url", {
21737
- value: url
21738
- });
21739
- return response;
21740
- }
21741
- async function checkResponse(response) {
21742
- if (!response.ok) {
21743
- const message = await getResponseError(response);
21744
- throw new Error(message);
21745
- }
21746
- }
21747
- async function getResponseError(response) {
21748
- let message = "Failed to fetch resource ".concat(response.url, " (").concat(response.status, "): ");
21749
- try {
21750
- const contentType = response.headers.get("Content-Type");
21751
- let text = response.statusText;
21752
- if (contentType.includes("application/json")) {
21753
- text += " ".concat(await response.text());
21754
- }
21755
- message += text;
21756
- message = message.length > 60 ? "".concat(message.slice(0, 60), "...") : message;
21757
- } catch (error2) {
21758
- }
21759
- return message;
21760
- }
21761
- async function getInitialDataUrl(resource) {
21762
- const INITIAL_DATA_LENGTH = 5;
21763
- if (typeof resource === "string") {
21764
- return "data:,".concat(resource.slice(0, INITIAL_DATA_LENGTH));
21765
- }
21766
- if (resource instanceof Blob) {
21767
- const blobSlice = resource.slice(0, 5);
21768
- return await new Promise((resolve) => {
21769
- const reader = new FileReader();
21770
- reader.onload = (event) => {
21771
- var _event$target;
21772
- return resolve(event === null || event === void 0 ? void 0 : (_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.result);
21773
- };
21774
- reader.readAsDataURL(blobSlice);
21775
- });
21776
- }
21777
- if (resource instanceof ArrayBuffer) {
21778
- const slice = resource.slice(0, INITIAL_DATA_LENGTH);
21779
- const base64 = arrayBufferToBase64(slice);
21780
- return "data:base64,".concat(base64);
21781
- }
21782
- return null;
21783
- }
21784
- function arrayBufferToBase64(buffer) {
21785
- let binary = "";
21786
- const bytes = new Uint8Array(buffer);
21787
- for (let i3 = 0; i3 < bytes.byteLength; i3++) {
21788
- binary += String.fromCharCode(bytes[i3]);
21789
- }
21790
- return btoa(binary);
21791
- }
21792
-
21793
- // ../../node_modules/@loaders.gl/core/dist/esm/lib/fetch/fetch-file.js
21794
- async function fetchFile(url, options) {
21795
- if (typeof url === "string") {
21796
- url = resolvePath(url);
21797
- let fetchOptions = options;
21798
- if (options !== null && options !== void 0 && options.fetch && typeof (options === null || options === void 0 ? void 0 : options.fetch) !== "function") {
21799
- fetchOptions = options.fetch;
21800
- }
21801
- return await fetch(url, fetchOptions);
21802
- }
21803
- return await makeResponse(url);
21804
- }
21805
-
21806
- // ../../node_modules/@loaders.gl/core/dist/esm/lib/loader-utils/loggers.js
21807
- var probeLog = new Log({
21808
- id: "loaders.gl"
21809
- });
21810
- var NullLog = class {
21811
- log() {
21812
- return () => {
21813
- };
21814
- }
21815
- info() {
21816
- return () => {
21817
- };
21818
- }
21819
- warn() {
21820
- return () => {
21821
- };
21822
- }
21823
- error() {
21824
- return () => {
21825
- };
21826
- }
21827
- };
21828
- var ConsoleLog = class {
21829
- constructor() {
21830
- _defineProperty(this, "console", void 0);
21831
- this.console = console;
21832
- }
21833
- log() {
21834
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
21835
- args[_key] = arguments[_key];
21836
- }
21837
- return this.console.log.bind(this.console, ...args);
21838
- }
21839
- info() {
21840
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
21841
- args[_key2] = arguments[_key2];
21842
- }
21843
- return this.console.info.bind(this.console, ...args);
21844
- }
21845
- warn() {
21846
- for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
21847
- args[_key3] = arguments[_key3];
21848
- }
21849
- return this.console.warn.bind(this.console, ...args);
21850
- }
21851
- error() {
21852
- for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
21853
- args[_key4] = arguments[_key4];
21854
- }
21855
- return this.console.error.bind(this.console, ...args);
21856
- }
21857
- };
21858
-
21859
- // ../../node_modules/@loaders.gl/core/dist/esm/lib/loader-utils/option-defaults.js
21860
- var DEFAULT_LOADER_OPTIONS = {
21861
- fetch: null,
21862
- mimeType: void 0,
21863
- nothrow: false,
21864
- log: new ConsoleLog(),
21865
- CDN: "https://unpkg.com/@loaders.gl",
21866
- worker: true,
21867
- maxConcurrency: 3,
21868
- maxMobileConcurrency: 1,
21869
- reuseWorkers: isBrowser,
21870
- _nodeWorkers: false,
21871
- _workerType: "",
21872
- limit: 0,
21873
- _limitMB: 0,
21874
- batchSize: "auto",
21875
- batchDebounceMs: 0,
21876
- metadata: false,
21877
- transforms: []
21878
- };
21879
- var REMOVED_LOADER_OPTIONS = {
21880
- throws: "nothrow",
21881
- dataType: "(no longer used)",
21882
- uri: "baseUri",
21883
- method: "fetch.method",
21884
- headers: "fetch.headers",
21885
- body: "fetch.body",
21886
- mode: "fetch.mode",
21887
- credentials: "fetch.credentials",
21888
- cache: "fetch.cache",
21889
- redirect: "fetch.redirect",
21890
- referrer: "fetch.referrer",
21891
- referrerPolicy: "fetch.referrerPolicy",
21892
- integrity: "fetch.integrity",
21893
- keepalive: "fetch.keepalive",
21894
- signal: "fetch.signal"
21895
- };
21896
-
21897
- // ../../node_modules/@loaders.gl/core/dist/esm/lib/loader-utils/option-utils.js
21898
- function getGlobalLoaderState() {
21899
- globalThis.loaders = globalThis.loaders || {};
21900
- const {
21901
- loaders
21902
- } = globalThis;
21903
- loaders._state = loaders._state || {};
21904
- return loaders._state;
21905
- }
21906
- var getGlobalLoaderOptions = () => {
21907
- const state = getGlobalLoaderState();
21908
- state.globalOptions = state.globalOptions || {
21909
- ...DEFAULT_LOADER_OPTIONS
21910
- };
21911
- return state.globalOptions;
21912
- };
21913
- function normalizeOptions(options, loader, loaders, url) {
21914
- loaders = loaders || [];
21915
- loaders = Array.isArray(loaders) ? loaders : [loaders];
21916
- validateOptions(options, loaders);
21917
- return normalizeOptionsInternal(loader, options, url);
21918
- }
21919
- function getFetchFunction2(options, context) {
21920
- const globalOptions = getGlobalLoaderOptions();
21921
- const fetchOptions = options || globalOptions;
21922
- if (typeof fetchOptions.fetch === "function") {
21923
- return fetchOptions.fetch;
21924
- }
21925
- if (isObject(fetchOptions.fetch)) {
21926
- return (url) => fetchFile(url, fetchOptions);
21927
- }
21928
- if (context !== null && context !== void 0 && context.fetch) {
21929
- return context === null || context === void 0 ? void 0 : context.fetch;
21930
- }
21931
- return fetchFile;
21932
- }
21933
- function validateOptions(options, loaders) {
21934
- validateOptionsObject(options, null, DEFAULT_LOADER_OPTIONS, REMOVED_LOADER_OPTIONS, loaders);
21935
- for (const loader of loaders) {
21936
- const idOptions = options && options[loader.id] || {};
21937
- const loaderOptions = loader.options && loader.options[loader.id] || {};
21938
- const deprecatedOptions = loader.deprecatedOptions && loader.deprecatedOptions[loader.id] || {};
21939
- validateOptionsObject(idOptions, loader.id, loaderOptions, deprecatedOptions, loaders);
21940
- }
21941
- }
21942
- function validateOptionsObject(options, id, defaultOptions, deprecatedOptions, loaders) {
21943
- const loaderName = id || "Top level";
21944
- const prefix = id ? "".concat(id, ".") : "";
21945
- for (const key in options) {
21946
- const isSubOptions = !id && isObject(options[key]);
21947
- const isBaseUriOption = key === "baseUri" && !id;
21948
- const isWorkerUrlOption = key === "workerUrl" && id;
21949
- if (!(key in defaultOptions) && !isBaseUriOption && !isWorkerUrlOption) {
21950
- if (key in deprecatedOptions) {
21951
- probeLog.warn("".concat(loaderName, " loader option '").concat(prefix).concat(key, "' no longer supported, use '").concat(deprecatedOptions[key], "'"))();
21952
- } else if (!isSubOptions) {
21953
- const suggestion = findSimilarOption(key, loaders);
21954
- probeLog.warn("".concat(loaderName, " loader option '").concat(prefix).concat(key, "' not recognized. ").concat(suggestion))();
21955
- }
21956
- }
21957
- }
21958
- }
21959
- function findSimilarOption(optionKey, loaders) {
21960
- const lowerCaseOptionKey = optionKey.toLowerCase();
21961
- let bestSuggestion = "";
21962
- for (const loader of loaders) {
21963
- for (const key in loader.options) {
21964
- if (optionKey === key) {
21965
- return "Did you mean '".concat(loader.id, ".").concat(key, "'?");
21966
- }
21967
- const lowerCaseKey = key.toLowerCase();
21968
- const isPartialMatch = lowerCaseOptionKey.startsWith(lowerCaseKey) || lowerCaseKey.startsWith(lowerCaseOptionKey);
21969
- if (isPartialMatch) {
21970
- bestSuggestion = bestSuggestion || "Did you mean '".concat(loader.id, ".").concat(key, "'?");
21971
- }
21972
- }
21973
- }
21974
- return bestSuggestion;
21975
- }
21976
- function normalizeOptionsInternal(loader, options, url) {
21977
- const loaderDefaultOptions = loader.options || {};
21978
- const mergedOptions = {
21979
- ...loaderDefaultOptions
21980
- };
21981
- addUrlOptions(mergedOptions, url);
21982
- if (mergedOptions.log === null) {
21983
- mergedOptions.log = new NullLog();
21984
- }
21985
- mergeNestedFields(mergedOptions, getGlobalLoaderOptions());
21986
- mergeNestedFields(mergedOptions, options);
21987
- return mergedOptions;
21988
- }
21989
- function mergeNestedFields(mergedOptions, options) {
21990
- for (const key in options) {
21991
- if (key in options) {
21992
- const value = options[key];
21993
- if (isPureObject(value) && isPureObject(mergedOptions[key])) {
21994
- mergedOptions[key] = {
21995
- ...mergedOptions[key],
21996
- ...options[key]
21997
- };
21998
- } else {
21999
- mergedOptions[key] = options[key];
22000
- }
22001
- }
22002
- }
22003
- }
22004
- function addUrlOptions(options, url) {
22005
- if (url && !("baseUri" in options)) {
22006
- options.baseUri = url;
22007
- }
22008
- }
22009
-
22010
- // ../../node_modules/@loaders.gl/core/dist/esm/lib/loader-utils/normalize-loader.js
22011
- function isLoaderObject(loader) {
22012
- var _loader;
22013
- if (!loader) {
22014
- return false;
22015
- }
22016
- if (Array.isArray(loader)) {
22017
- loader = loader[0];
22018
- }
22019
- const hasExtensions = Array.isArray((_loader = loader) === null || _loader === void 0 ? void 0 : _loader.extensions);
22020
- return hasExtensions;
22021
- }
22022
- function normalizeLoader(loader) {
22023
- var _loader2, _loader3;
22024
- assert2(loader, "null loader");
22025
- assert2(isLoaderObject(loader), "invalid loader");
22026
- let options;
22027
- if (Array.isArray(loader)) {
22028
- options = loader[1];
22029
- loader = loader[0];
22030
- loader = {
22031
- ...loader,
22032
- options: {
22033
- ...loader.options,
22034
- ...options
22035
- }
22036
- };
22037
- }
22038
- if ((_loader2 = loader) !== null && _loader2 !== void 0 && _loader2.parseTextSync || (_loader3 = loader) !== null && _loader3 !== void 0 && _loader3.parseText) {
22039
- loader.text = true;
22040
- }
22041
- if (!loader.text) {
22042
- loader.binary = true;
22043
- }
22044
- return loader;
22045
- }
22046
-
22047
- // ../../node_modules/@loaders.gl/core/dist/esm/lib/api/register-loaders.js
22048
- var getGlobalLoaderRegistry = () => {
22049
- const state = getGlobalLoaderState();
22050
- state.loaderRegistry = state.loaderRegistry || [];
22051
- return state.loaderRegistry;
22052
- };
22053
- function getRegisteredLoaders() {
22054
- return getGlobalLoaderRegistry();
22055
- }
22056
-
22057
- // ../../node_modules/@loaders.gl/core/dist/esm/lib/utils/log.js
22058
- var log4 = new Log({
22059
- id: "loaders.gl"
22060
- });
22061
-
22062
- // ../../node_modules/@loaders.gl/core/dist/esm/lib/api/select-loader.js
22063
- var EXT_PATTERN = /\.([^.]+)$/;
22064
- async function selectLoader(data) {
22065
- let loaders = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
22066
- let options = arguments.length > 2 ? arguments[2] : void 0;
22067
- let context = arguments.length > 3 ? arguments[3] : void 0;
22068
- if (!validHTTPResponse(data)) {
22069
- return null;
22070
- }
22071
- let loader = selectLoaderSync(data, loaders, {
22072
- ...options,
22073
- nothrow: true
22074
- }, context);
22075
- if (loader) {
22076
- return loader;
22077
- }
22078
- if (isBlob(data)) {
22079
- data = await data.slice(0, 10).arrayBuffer();
22080
- loader = selectLoaderSync(data, loaders, options, context);
22081
- }
22082
- if (!loader && !(options !== null && options !== void 0 && options.nothrow)) {
22083
- throw new Error(getNoValidLoaderMessage(data));
22084
- }
22085
- return loader;
22086
- }
22087
- function selectLoaderSync(data) {
22088
- let loaders = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
22089
- let options = arguments.length > 2 ? arguments[2] : void 0;
22090
- let context = arguments.length > 3 ? arguments[3] : void 0;
22091
- if (!validHTTPResponse(data)) {
22092
- return null;
22093
- }
22094
- if (loaders && !Array.isArray(loaders)) {
22095
- return normalizeLoader(loaders);
22096
- }
22097
- let candidateLoaders = [];
22098
- if (loaders) {
22099
- candidateLoaders = candidateLoaders.concat(loaders);
22100
- }
22101
- if (!(options !== null && options !== void 0 && options.ignoreRegisteredLoaders)) {
22102
- candidateLoaders.push(...getRegisteredLoaders());
22103
- }
22104
- normalizeLoaders(candidateLoaders);
22105
- const loader = selectLoaderInternal(data, candidateLoaders, options, context);
22106
- if (!loader && !(options !== null && options !== void 0 && options.nothrow)) {
22107
- throw new Error(getNoValidLoaderMessage(data));
22108
- }
22109
- return loader;
22110
- }
22111
- function selectLoaderInternal(data, loaders, options, context) {
22112
- const {
22113
- url,
22114
- type
22115
- } = getResourceUrlAndType(data);
22116
- const testUrl = url || (context === null || context === void 0 ? void 0 : context.url);
22117
- let loader = null;
22118
- let reason = "";
22119
- if (options !== null && options !== void 0 && options.mimeType) {
22120
- loader = findLoaderByMIMEType(loaders, options === null || options === void 0 ? void 0 : options.mimeType);
22121
- reason = "match forced by supplied MIME type ".concat(options === null || options === void 0 ? void 0 : options.mimeType);
22122
- }
22123
- loader = loader || findLoaderByUrl(loaders, testUrl);
22124
- reason = reason || (loader ? "matched url ".concat(testUrl) : "");
22125
- loader = loader || findLoaderByMIMEType(loaders, type);
22126
- reason = reason || (loader ? "matched MIME type ".concat(type) : "");
22127
- loader = loader || findLoaderByInitialBytes(loaders, data);
22128
- reason = reason || (loader ? "matched initial data ".concat(getFirstCharacters2(data)) : "");
22129
- loader = loader || findLoaderByMIMEType(loaders, options === null || options === void 0 ? void 0 : options.fallbackMimeType);
22130
- reason = reason || (loader ? "matched fallback MIME type ".concat(type) : "");
22131
- if (reason) {
22132
- var _loader;
22133
- log4.log(1, "selectLoader selected ".concat((_loader = loader) === null || _loader === void 0 ? void 0 : _loader.name, ": ").concat(reason, "."));
22134
- }
22135
- return loader;
22136
- }
22137
- function validHTTPResponse(data) {
22138
- if (data instanceof Response) {
22139
- if (data.status === 204) {
22140
- return false;
22141
- }
22142
- }
22143
- return true;
22144
- }
22145
- function getNoValidLoaderMessage(data) {
22146
- const {
22147
- url,
22148
- type
22149
- } = getResourceUrlAndType(data);
22150
- let message = "No valid loader found (";
22151
- message += url ? "".concat(path_exports.filename(url), ", ") : "no url provided, ";
22152
- message += "MIME type: ".concat(type ? '"'.concat(type, '"') : "not provided", ", ");
22153
- const firstCharacters = data ? getFirstCharacters2(data) : "";
22154
- message += firstCharacters ? ' first bytes: "'.concat(firstCharacters, '"') : "first bytes: not available";
22155
- message += ")";
22156
- return message;
22157
- }
22158
- function normalizeLoaders(loaders) {
22159
- for (const loader of loaders) {
22160
- normalizeLoader(loader);
22161
- }
22162
- }
22163
- function findLoaderByUrl(loaders, url) {
22164
- const match2 = url && EXT_PATTERN.exec(url);
22165
- const extension = match2 && match2[1];
22166
- return extension ? findLoaderByExtension(loaders, extension) : null;
22167
- }
22168
- function findLoaderByExtension(loaders, extension) {
22169
- extension = extension.toLowerCase();
22170
- for (const loader of loaders) {
22171
- for (const loaderExtension of loader.extensions) {
22172
- if (loaderExtension.toLowerCase() === extension) {
22173
- return loader;
22174
- }
22175
- }
22176
- }
22177
- return null;
22178
- }
22179
- function findLoaderByMIMEType(loaders, mimeType) {
22180
- for (const loader of loaders) {
22181
- if (loader.mimeTypes && loader.mimeTypes.includes(mimeType)) {
22182
- return loader;
22183
- }
22184
- if (mimeType === "application/x.".concat(loader.id)) {
22185
- return loader;
22186
- }
22187
- }
22188
- return null;
22189
- }
22190
- function findLoaderByInitialBytes(loaders, data) {
22191
- if (!data) {
22192
- return null;
22193
- }
22194
- for (const loader of loaders) {
22195
- if (typeof data === "string") {
22196
- if (testDataAgainstText(data, loader)) {
22197
- return loader;
22198
- }
22199
- } else if (ArrayBuffer.isView(data)) {
22200
- if (testDataAgainstBinary(data.buffer, data.byteOffset, loader)) {
22201
- return loader;
22202
- }
22203
- } else if (data instanceof ArrayBuffer) {
22204
- const byteOffset = 0;
22205
- if (testDataAgainstBinary(data, byteOffset, loader)) {
22206
- return loader;
22207
- }
22208
- }
22209
- }
22210
- return null;
22211
- }
22212
- function testDataAgainstText(data, loader) {
22213
- if (loader.testText) {
22214
- return loader.testText(data);
22215
- }
22216
- const tests = Array.isArray(loader.tests) ? loader.tests : [loader.tests];
22217
- return tests.some((test) => data.startsWith(test));
22218
- }
22219
- function testDataAgainstBinary(data, byteOffset, loader) {
22220
- const tests = Array.isArray(loader.tests) ? loader.tests : [loader.tests];
22221
- return tests.some((test) => testBinary(data, byteOffset, loader, test));
22222
- }
22223
- function testBinary(data, byteOffset, loader, test) {
22224
- if (test instanceof ArrayBuffer) {
22225
- return compareArrayBuffers(test, data, test.byteLength);
22226
- }
22227
- switch (typeof test) {
22228
- case "function":
22229
- return test(data, loader);
22230
- case "string":
22231
- const magic = getMagicString2(data, byteOffset, test.length);
22232
- return test === magic;
22233
- default:
22234
- return false;
22235
- }
22236
- }
22237
- function getFirstCharacters2(data) {
22238
- let length5 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 5;
22239
- if (typeof data === "string") {
22240
- return data.slice(0, length5);
22241
- } else if (ArrayBuffer.isView(data)) {
22242
- return getMagicString2(data.buffer, data.byteOffset, length5);
22243
- } else if (data instanceof ArrayBuffer) {
22244
- const byteOffset = 0;
22245
- return getMagicString2(data, byteOffset, length5);
22246
- }
22247
- return "";
22248
- }
22249
- function getMagicString2(arrayBuffer, byteOffset, length5) {
22250
- if (arrayBuffer.byteLength < byteOffset + length5) {
22251
- return "";
22252
- }
22253
- const dataView = new DataView(arrayBuffer);
22254
- let magic = "";
22255
- for (let i3 = 0; i3 < length5; i3++) {
22256
- magic += String.fromCharCode(dataView.getUint8(byteOffset + i3));
22257
- }
22258
- return magic;
22259
- }
22260
-
22261
- // ../../node_modules/@loaders.gl/core/dist/esm/iterators/make-iterator/make-string-iterator.js
22262
- var DEFAULT_CHUNK_SIZE = 256 * 1024;
22263
- function* makeStringIterator(string, options) {
22264
- const chunkSize = (options === null || options === void 0 ? void 0 : options.chunkSize) || DEFAULT_CHUNK_SIZE;
22265
- let offset = 0;
22266
- const textEncoder = new TextEncoder();
22267
- while (offset < string.length) {
22268
- const chunkLength = Math.min(string.length - offset, chunkSize);
22269
- const chunk = string.slice(offset, offset + chunkLength);
22270
- offset += chunkLength;
22271
- yield textEncoder.encode(chunk);
22272
- }
22273
- }
22274
-
22275
- // ../../node_modules/@loaders.gl/core/dist/esm/iterators/make-iterator/make-array-buffer-iterator.js
22276
- var DEFAULT_CHUNK_SIZE2 = 256 * 1024;
22277
- function* makeArrayBufferIterator(arrayBuffer) {
22278
- let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
22279
- const {
22280
- chunkSize = DEFAULT_CHUNK_SIZE2
22281
- } = options;
22282
- let byteOffset = 0;
22283
- while (byteOffset < arrayBuffer.byteLength) {
22284
- const chunkByteLength = Math.min(arrayBuffer.byteLength - byteOffset, chunkSize);
22285
- const chunk = new ArrayBuffer(chunkByteLength);
22286
- const sourceArray = new Uint8Array(arrayBuffer, byteOffset, chunkByteLength);
22287
- const chunkArray = new Uint8Array(chunk);
22288
- chunkArray.set(sourceArray);
22289
- byteOffset += chunkByteLength;
22290
- yield chunk;
22291
- }
22292
- }
22293
-
22294
- // ../../node_modules/@loaders.gl/core/dist/esm/iterators/make-iterator/make-blob-iterator.js
22295
- var DEFAULT_CHUNK_SIZE3 = 1024 * 1024;
22296
- async function* makeBlobIterator(blob, options) {
22297
- const chunkSize = (options === null || options === void 0 ? void 0 : options.chunkSize) || DEFAULT_CHUNK_SIZE3;
22298
- let offset = 0;
22299
- while (offset < blob.size) {
22300
- const end = offset + chunkSize;
22301
- const chunk = await blob.slice(offset, end).arrayBuffer();
22302
- offset = end;
22303
- yield chunk;
22304
- }
22305
- }
22306
-
22307
- // ../../node_modules/@loaders.gl/core/dist/esm/iterators/make-iterator/make-stream-iterator.js
22308
- function makeStreamIterator(stream, options) {
22309
- return isBrowser ? makeBrowserStreamIterator(stream, options) : makeNodeStreamIterator(stream, options);
22310
- }
22311
- async function* makeBrowserStreamIterator(stream, options) {
22312
- const reader = stream.getReader();
22313
- let nextBatchPromise;
22314
- try {
22315
- while (true) {
22316
- const currentBatchPromise = nextBatchPromise || reader.read();
22317
- if (options !== null && options !== void 0 && options._streamReadAhead) {
22318
- nextBatchPromise = reader.read();
22319
- }
22320
- const {
22321
- done,
22322
- value
22323
- } = await currentBatchPromise;
22324
- if (done) {
22325
- return;
22326
- }
22327
- yield toArrayBuffer2(value);
22328
- }
22329
- } catch (error2) {
22330
- reader.releaseLock();
22331
- }
22332
- }
22333
- async function* makeNodeStreamIterator(stream, options) {
22334
- for await (const chunk of stream) {
22335
- yield toArrayBuffer2(chunk);
22336
- }
22337
- }
22338
-
22339
- // ../../node_modules/@loaders.gl/core/dist/esm/iterators/make-iterator/make-iterator.js
22340
- function makeIterator(data, options) {
22341
- if (typeof data === "string") {
22342
- return makeStringIterator(data, options);
22343
- }
22344
- if (data instanceof ArrayBuffer) {
22345
- return makeArrayBufferIterator(data, options);
22346
- }
22347
- if (isBlob(data)) {
22348
- return makeBlobIterator(data, options);
22349
- }
22350
- if (isReadableStream(data)) {
22351
- return makeStreamIterator(data, options);
22352
- }
22353
- if (isResponse(data)) {
22354
- const response = data;
22355
- return makeStreamIterator(response.body, options);
22356
- }
22357
- throw new Error("makeIterator");
22358
- }
22359
-
22360
- // ../../node_modules/@loaders.gl/core/dist/esm/lib/loader-utils/get-data.js
22361
- var ERR_DATA = "Cannot convert supplied data type";
22362
- function getArrayBufferOrStringFromDataSync(data, loader, options) {
22363
- if (loader.text && typeof data === "string") {
22364
- return data;
22365
- }
22366
- if (isBuffer2(data)) {
22367
- data = data.buffer;
22368
- }
22369
- if (data instanceof ArrayBuffer) {
22370
- const arrayBuffer = data;
22371
- if (loader.text && !loader.binary) {
22372
- const textDecoder = new TextDecoder("utf8");
22373
- return textDecoder.decode(arrayBuffer);
22374
- }
22375
- return arrayBuffer;
22376
- }
22377
- if (ArrayBuffer.isView(data)) {
22378
- if (loader.text && !loader.binary) {
22379
- const textDecoder = new TextDecoder("utf8");
22380
- return textDecoder.decode(data);
22381
- }
22382
- let arrayBuffer = data.buffer;
22383
- const byteLength = data.byteLength || data.length;
22384
- if (data.byteOffset !== 0 || byteLength !== arrayBuffer.byteLength) {
22385
- arrayBuffer = arrayBuffer.slice(data.byteOffset, data.byteOffset + byteLength);
22386
- }
22387
- return arrayBuffer;
22388
- }
22389
- throw new Error(ERR_DATA);
22390
- }
22391
- async function getArrayBufferOrStringFromData(data, loader, options) {
22392
- const isArrayBuffer = data instanceof ArrayBuffer || ArrayBuffer.isView(data);
22393
- if (typeof data === "string" || isArrayBuffer) {
22394
- return getArrayBufferOrStringFromDataSync(data, loader, options);
22395
- }
22396
- if (isBlob(data)) {
22397
- data = await makeResponse(data);
22398
- }
22399
- if (isResponse(data)) {
22400
- const response = data;
22401
- await checkResponse(response);
22402
- return loader.binary ? await response.arrayBuffer() : await response.text();
22403
- }
22404
- if (isReadableStream(data)) {
22405
- data = makeIterator(data, options);
22406
- }
22407
- if (isIterable(data) || isAsyncIterable(data)) {
22408
- return concatenateArrayBuffersAsync(data);
22409
- }
22410
- throw new Error(ERR_DATA);
22411
- }
22412
-
22413
- // ../../node_modules/@loaders.gl/core/dist/esm/lib/loader-utils/loader-context.js
22414
- function getLoaderContext(context, options) {
22415
- let previousContext = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null;
22416
- if (previousContext) {
22417
- return previousContext;
22418
- }
22419
- const resolvedContext = {
22420
- fetch: getFetchFunction2(options, context),
22421
- ...context
22422
- };
22423
- if (!Array.isArray(resolvedContext.loaders)) {
22424
- resolvedContext.loaders = null;
22425
- }
22426
- return resolvedContext;
22427
- }
22428
- function getLoadersFromContext(loaders, context) {
22429
- if (!context && loaders && !Array.isArray(loaders)) {
22430
- return loaders;
22431
- }
22432
- let candidateLoaders;
22433
- if (loaders) {
22434
- candidateLoaders = Array.isArray(loaders) ? loaders : [loaders];
22435
- }
22436
- if (context && context.loaders) {
22437
- const contextLoaders = Array.isArray(context.loaders) ? context.loaders : [context.loaders];
22438
- candidateLoaders = candidateLoaders ? [...candidateLoaders, ...contextLoaders] : contextLoaders;
22439
- }
22440
- return candidateLoaders && candidateLoaders.length ? candidateLoaders : null;
22441
- }
22442
-
22443
- // ../../node_modules/@loaders.gl/core/dist/esm/lib/api/parse.js
22444
- async function parse2(data, loaders, options, context) {
22445
- assert3(!context || typeof context === "object");
22446
- if (loaders && !Array.isArray(loaders) && !isLoaderObject(loaders)) {
22447
- context = void 0;
22448
- options = loaders;
22449
- loaders = void 0;
22450
- }
22451
- data = await data;
22452
- options = options || {};
22453
- const {
22454
- url
22455
- } = getResourceUrlAndType(data);
22456
- const typedLoaders = loaders;
22457
- const candidateLoaders = getLoadersFromContext(typedLoaders, context);
22458
- const loader = await selectLoader(data, candidateLoaders, options);
22459
- if (!loader) {
22460
- return null;
22461
- }
22462
- options = normalizeOptions(options, loader, candidateLoaders, url);
22463
- context = getLoaderContext({
22464
- url,
22465
- parse: parse2,
22466
- loaders: candidateLoaders
22467
- }, options, context);
22468
- return await parseWithLoader(loader, data, options, context);
22469
- }
22470
- async function parseWithLoader(loader, data, options, context) {
22471
- validateWorkerVersion(loader);
22472
- if (isResponse(data)) {
22473
- const response = data;
22474
- const {
22475
- ok,
22476
- redirected,
22477
- status,
22478
- statusText,
22479
- type,
22480
- url
22481
- } = response;
22482
- const headers = Object.fromEntries(response.headers.entries());
22483
- context.response = {
22484
- headers,
22485
- ok,
22486
- redirected,
22487
- status,
22488
- statusText,
22489
- type,
22490
- url
22491
- };
22492
- }
22493
- data = await getArrayBufferOrStringFromData(data, loader, options);
22494
- if (loader.parseTextSync && typeof data === "string") {
22495
- options.dataType = "text";
22496
- return loader.parseTextSync(data, options, context, loader);
22497
- }
22498
- if (canParseWithWorker(loader, options)) {
22499
- return await parseWithWorker(loader, data, options, context, parse2);
22500
- }
22501
- if (loader.parseText && typeof data === "string") {
22502
- return await loader.parseText(data, options, context, loader);
22503
- }
22504
- if (loader.parse) {
22505
- return await loader.parse(data, options, context, loader);
22506
- }
22507
- assert3(!loader.parseSync);
22508
- throw new Error("".concat(loader.id, " loader - no parser found and worker is disabled"));
22509
- }
22510
-
22511
- // ../../node_modules/@loaders.gl/core/dist/esm/lib/api/load.js
22512
- async function load(url, loaders, options, context) {
22513
- if (!Array.isArray(loaders) && !isLoaderObject(loaders)) {
22514
- context = void 0;
22515
- options = loaders;
22516
- loaders = void 0;
22517
- }
22518
- const fetch2 = getFetchFunction2(options);
22519
- let data = url;
22520
- if (typeof url === "string") {
22521
- data = await fetch2(url);
22522
- }
22523
- if (isBlob(url)) {
22524
- data = await fetch2(url);
22525
- }
22526
- return await parse2(data, loaders, options);
22527
- }
21025
+ // src/tile-3d-layer/tile-3d-layer.ts
21026
+ var import_core44 = __toESM(require_core3());
22528
21027
 
22529
21028
  // ../../node_modules/@math.gl/geospatial/node_modules/@babel/runtime/helpers/esm/defineProperty.js
22530
21029
  function _defineProperty5(obj, key, value) {
@@ -22919,55 +21418,55 @@ void main(void) {
22919
21418
  return this._length;
22920
21419
  }
22921
21420
  add(item) {
22922
- const node3 = new DoublyLinkedListNode(item, this.tail, null);
21421
+ const node2 = new DoublyLinkedListNode(item, this.tail, null);
22923
21422
  if (this.tail) {
22924
- this.tail.next = node3;
22925
- this.tail = node3;
21423
+ this.tail.next = node2;
21424
+ this.tail = node2;
22926
21425
  } else {
22927
- this.head = node3;
22928
- this.tail = node3;
21426
+ this.head = node2;
21427
+ this.tail = node2;
22929
21428
  }
22930
21429
  ++this._length;
22931
- return node3;
21430
+ return node2;
22932
21431
  }
22933
- remove(node3) {
22934
- if (!node3) {
21432
+ remove(node2) {
21433
+ if (!node2) {
22935
21434
  return;
22936
21435
  }
22937
- if (node3.previous && node3.next) {
22938
- node3.previous.next = node3.next;
22939
- node3.next.previous = node3.previous;
22940
- } else if (node3.previous) {
22941
- node3.previous.next = null;
22942
- this.tail = node3.previous;
22943
- } else if (node3.next) {
22944
- node3.next.previous = null;
22945
- this.head = node3.next;
21436
+ if (node2.previous && node2.next) {
21437
+ node2.previous.next = node2.next;
21438
+ node2.next.previous = node2.previous;
21439
+ } else if (node2.previous) {
21440
+ node2.previous.next = null;
21441
+ this.tail = node2.previous;
21442
+ } else if (node2.next) {
21443
+ node2.next.previous = null;
21444
+ this.head = node2.next;
22946
21445
  } else {
22947
21446
  this.head = null;
22948
21447
  this.tail = null;
22949
21448
  }
22950
- node3.next = null;
22951
- node3.previous = null;
21449
+ node2.next = null;
21450
+ node2.previous = null;
22952
21451
  --this._length;
22953
21452
  }
22954
- splice(node3, nextNode) {
22955
- if (node3 === nextNode) {
21453
+ splice(node2, nextNode) {
21454
+ if (node2 === nextNode) {
22956
21455
  return;
22957
21456
  }
22958
21457
  this.remove(nextNode);
22959
- this._insert(node3, nextNode);
21458
+ this._insert(node2, nextNode);
22960
21459
  }
22961
- _insert(node3, nextNode) {
22962
- const oldNodeNext = node3.next;
22963
- node3.next = nextNode;
22964
- if (this.tail === node3) {
21460
+ _insert(node2, nextNode) {
21461
+ const oldNodeNext = node2.next;
21462
+ node2.next = nextNode;
21463
+ if (this.tail === node2) {
22965
21464
  this.tail = nextNode;
22966
21465
  } else {
22967
21466
  oldNodeNext.previous = nextNode;
22968
21467
  }
22969
21468
  nextNode.next = oldNodeNext;
22970
- nextNode.previous = node3;
21469
+ nextNode.previous = node2;
22971
21470
  ++this._length;
22972
21471
  }
22973
21472
  };
@@ -22989,9 +21488,9 @@ void main(void) {
22989
21488
  this._list.splice(this._list.tail, this._sentinel);
22990
21489
  }
22991
21490
  touch(tile) {
22992
- const node3 = tile._cacheNode;
22993
- if (defined(node3)) {
22994
- this._list.splice(this._sentinel, node3);
21491
+ const node2 = tile._cacheNode;
21492
+ if (defined(node2)) {
21493
+ this._list.splice(this._sentinel, node2);
22995
21494
  }
22996
21495
  }
22997
21496
  add(tileset, tile, addCallback) {
@@ -23003,11 +21502,11 @@ void main(void) {
23003
21502
  }
23004
21503
  }
23005
21504
  unloadTile(tileset, tile, unloadCallback) {
23006
- const node3 = tile._cacheNode;
23007
- if (!defined(node3)) {
21505
+ const node2 = tile._cacheNode;
21506
+ if (!defined(node2)) {
23008
21507
  return;
23009
21508
  }
23010
- this._list.remove(node3);
21509
+ this._list.remove(node2);
23011
21510
  tile._cacheNode = void 0;
23012
21511
  if (unloadCallback) {
23013
21512
  unloadCallback(tileset, tile);
@@ -23019,10 +21518,10 @@ void main(void) {
23019
21518
  const list = this._list;
23020
21519
  const maximumMemoryUsageInBytes = tileset.maximumMemoryUsage * 1024 * 1024;
23021
21520
  const sentinel = this._sentinel;
23022
- let node3 = list.head;
23023
- while (node3 !== sentinel && (tileset.gpuMemoryUsageInBytes > maximumMemoryUsageInBytes || trimTiles)) {
23024
- const tile = node3.item;
23025
- node3 = node3.next;
21521
+ let node2 = list.head;
21522
+ while (node2 !== sentinel && (tileset.gpuMemoryUsageInBytes > maximumMemoryUsageInBytes || trimTiles)) {
21523
+ const tile = node2.item;
21524
+ node2 = node2.next;
23026
21525
  this.unloadTile(tileset, tile, unloadCallback);
23027
21526
  }
23028
21527
  }
@@ -23246,6 +21745,9 @@ void main(void) {
23246
21745
  return size;
23247
21746
  }
23248
21747
 
21748
+ // ../../node_modules/@loaders.gl/tiles/dist/esm/tileset/tile-3d.js
21749
+ var import_core31 = __toESM(require_core3());
21750
+
23249
21751
  // ../../node_modules/@loaders.gl/tiles/dist/esm/constants.js
23250
21752
  var TILE_CONTENT_STATE = {
23251
21753
  UNLOADED: 0,
@@ -23536,7 +22038,7 @@ void main(void) {
23536
22038
  };
23537
22039
 
23538
22040
  // ../../node_modules/@loaders.gl/tiles/dist/esm/tileset/tileset-traverser.js
23539
- var DEFAULT_PROPS3 = {
22041
+ var DEFAULT_PROPS2 = {
23540
22042
  loadSiblings: false,
23541
22043
  skipLevelOfDetail: false,
23542
22044
  maximumScreenSpaceError: 2,
@@ -23562,7 +22064,7 @@ void main(void) {
23562
22064
  _defineProperty(this, "_emptyTraversalStack", void 0);
23563
22065
  _defineProperty(this, "_frameNumber", void 0);
23564
22066
  this.options = {
23565
- ...DEFAULT_PROPS3,
22067
+ ...DEFAULT_PROPS2,
23566
22068
  ...options
23567
22069
  };
23568
22070
  this._traversalStack = new ManagedArray();
@@ -23991,7 +22493,7 @@ void main(void) {
23991
22493
  ...this._getLoaderSpecificOptions(loader.id)
23992
22494
  }
23993
22495
  };
23994
- this.content = await load(contentUrl, loader, options);
22496
+ this.content = await (0, import_core31.load)(contentUrl, loader, options);
23995
22497
  if (this.tileset.options.contentLoader) {
23996
22498
  await this.tileset.options.contentLoader(this);
23997
22499
  }
@@ -24248,6 +22750,9 @@ void main(void) {
24248
22750
  }
24249
22751
  };
24250
22752
 
22753
+ // ../../node_modules/@loaders.gl/tiles/dist/esm/tileset/format-i3s/i3s-tileset-traverser.js
22754
+ var import_core32 = __toESM(require_core3());
22755
+
24251
22756
  // ../../node_modules/@loaders.gl/tiles/dist/esm/tileset/format-i3s/i3s-pending-tiles-register.js
24252
22757
  var I3SPendingTilesRegister = class {
24253
22758
  constructor() {
@@ -24402,7 +22907,7 @@ void main(void) {
24402
22907
  isTileHeader: true
24403
22908
  }
24404
22909
  };
24405
- return await load(nodeUrl, loader, options);
22910
+ return await (0, import_core32.load)(nodeUrl, loader, options);
24406
22911
  }
24407
22912
  _onTileLoad(header, tile, extendedId) {
24408
22913
  const childTile = new Tile3D(tile.tileset, header, tile, extendedId);
@@ -24416,7 +22921,7 @@ void main(void) {
24416
22921
  };
24417
22922
 
24418
22923
  // ../../node_modules/@loaders.gl/tiles/dist/esm/tileset/tileset-3d.js
24419
- var DEFAULT_PROPS4 = {
22924
+ var DEFAULT_PROPS3 = {
24420
22925
  description: "",
24421
22926
  ellipsoid: Ellipsoid.WGS84,
24422
22927
  modelMatrix: new Matrix4(),
@@ -24511,7 +23016,7 @@ void main(void) {
24511
23016
  _defineProperty(this, "maximumMemoryUsage", void 0);
24512
23017
  assert2(json);
24513
23018
  this.options = {
24514
- ...DEFAULT_PROPS4,
23019
+ ...DEFAULT_PROPS3,
24515
23020
  ...options
24516
23021
  };
24517
23022
  this.tileset = json;
@@ -25043,7 +23548,7 @@ void main(void) {
25043
23548
  }
25044
23549
 
25045
23550
  // ../../node_modules/@loaders.gl/3d-tiles/dist/esm/lib/utils/version.js
25046
- var VERSION9 = true ? "3.3.1" : "latest";
23551
+ var VERSION8 = true ? "3.3.1" : "latest";
25047
23552
 
25048
23553
  // ../../node_modules/@loaders.gl/3d-tiles/dist/esm/lib/constants.js
25049
23554
  var TILE3D_TYPE = {
@@ -25065,14 +23570,14 @@ void main(void) {
25065
23570
  const string = textDecoder.decode(typedArray);
25066
23571
  return string;
25067
23572
  }
25068
- function getMagicString3(arrayBuffer) {
23573
+ function getMagicString2(arrayBuffer) {
25069
23574
  let byteOffset = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
25070
23575
  const dataView = new DataView(arrayBuffer);
25071
23576
  return "".concat(String.fromCharCode(dataView.getUint8(byteOffset + 0))).concat(String.fromCharCode(dataView.getUint8(byteOffset + 1))).concat(String.fromCharCode(dataView.getUint8(byteOffset + 2))).concat(String.fromCharCode(dataView.getUint8(byteOffset + 3)));
25072
23577
  }
25073
23578
 
25074
23579
  // ../../node_modules/@loaders.gl/draco/dist/esm/lib/utils/version.js
25075
- var VERSION10 = true ? "3.3.1" : "latest";
23580
+ var VERSION9 = true ? "3.3.1" : "latest";
25076
23581
 
25077
23582
  // ../../node_modules/@loaders.gl/draco/dist/esm/draco-loader.js
25078
23583
  var DEFAULT_DRACO_OPTIONS = {
@@ -25088,7 +23593,7 @@ void main(void) {
25088
23593
  id: isBrowser2 ? "draco" : "draco-nodejs",
25089
23594
  module: "draco",
25090
23595
  shapes: ["mesh"],
25091
- version: VERSION10,
23596
+ version: VERSION9,
25092
23597
  worker: true,
25093
23598
  extensions: ["drc"],
25094
23599
  mimeTypes: ["application/octet-stream"],
@@ -26103,9 +24608,9 @@ void main(void) {
26103
24608
  // ../../node_modules/@loaders.gl/draco/dist/esm/index.js
26104
24609
  var DracoLoader2 = {
26105
24610
  ...DracoLoader,
26106
- parse: parse3
24611
+ parse: parse2
26107
24612
  };
26108
- async function parse3(arrayBuffer, options) {
24613
+ async function parse2(arrayBuffer, options) {
26109
24614
  const {
26110
24615
  draco
26111
24616
  } = await loadDracoDecoderModule(options);
@@ -27191,7 +25696,7 @@ void main(void) {
27191
25696
  }
27192
25697
  async function loadDraco(tile, dracoData, options, context) {
27193
25698
  const {
27194
- parse: parse6
25699
+ parse: parse5
27195
25700
  } = context;
27196
25701
  const dracoOptions = {
27197
25702
  ...options,
@@ -27201,7 +25706,7 @@ void main(void) {
27201
25706
  }
27202
25707
  };
27203
25708
  delete dracoOptions["3d-tiles"];
27204
- const data = await parse6(dracoData.buffer, DracoLoader2, dracoOptions);
25709
+ const data = await parse5(dracoData.buffer, DracoLoader2, dracoOptions);
27205
25710
  const decodedPositions = data.attributes.POSITION && data.attributes.POSITION.value;
27206
25711
  const decodedColors = data.attributes.COLOR_0 && data.attributes.COLOR_0.value;
27207
25712
  const decodedNormals = data.attributes.NORMAL && data.attributes.NORMAL.value;
@@ -27238,15 +25743,15 @@ void main(void) {
27238
25743
  }
27239
25744
 
27240
25745
  // ../../node_modules/@loaders.gl/gltf/dist/esm/lib/utils/version.js
27241
- var VERSION11 = true ? "3.3.1" : "latest";
25746
+ var VERSION10 = true ? "3.3.1" : "latest";
27242
25747
 
27243
25748
  // ../../node_modules/@loaders.gl/textures/dist/esm/lib/utils/version.js
27244
- var VERSION12 = true ? "3.3.1" : "beta";
25749
+ var VERSION11 = true ? "3.3.1" : "beta";
27245
25750
 
27246
25751
  // ../../node_modules/@loaders.gl/textures/dist/esm/lib/parsers/basis-module-loader.js
27247
- var VERSION13 = true ? "3.3.1" : "beta";
27248
- var BASIS_CDN_ENCODER_WASM = "https://unpkg.com/@loaders.gl/textures@".concat(VERSION13, "/dist/libs/basis_encoder.wasm");
27249
- var BASIS_CDN_ENCODER_JS = "https://unpkg.com/@loaders.gl/textures@".concat(VERSION13, "/dist/libs/basis_encoder.js");
25752
+ var VERSION12 = true ? "3.3.1" : "beta";
25753
+ var BASIS_CDN_ENCODER_WASM = "https://unpkg.com/@loaders.gl/textures@".concat(VERSION12, "/dist/libs/basis_encoder.wasm");
25754
+ var BASIS_CDN_ENCODER_JS = "https://unpkg.com/@loaders.gl/textures@".concat(VERSION12, "/dist/libs/basis_encoder.js");
27250
25755
  var loadBasisTranscoderPromise;
27251
25756
  async function loadBasisTrascoderModule(options) {
27252
25757
  const modules = options.modules || {};
@@ -27701,7 +26206,7 @@ void main(void) {
27701
26206
  name: "Basis",
27702
26207
  id: isBrowser2 ? "basis" : "basis-nodejs",
27703
26208
  module: "textures",
27704
- version: VERSION12,
26209
+ version: VERSION11,
27705
26210
  worker: true,
27706
26211
  extensions: ["basis", "ktx2"],
27707
26212
  mimeTypes: ["application/octet-stream", "image/ktx2"],
@@ -28030,11 +26535,11 @@ void main(void) {
28030
26535
  });
28031
26536
  return this.json.scenes.length - 1;
28032
26537
  }
28033
- addNode(node3) {
26538
+ addNode(node2) {
28034
26539
  const {
28035
26540
  meshIndex,
28036
26541
  matrix
28037
- } = node3;
26542
+ } = node2;
28038
26543
  this.json.nodes = this.json.nodes || [];
28039
26544
  const nodeData = {
28040
26545
  mesh: meshIndex
@@ -28532,13 +27037,13 @@ void main(void) {
28532
27037
  const buffer = scenegraph.getTypedArrayForBufferView(dracoExtension.bufferView);
28533
27038
  const bufferCopy = sliceArrayBuffer(buffer.buffer, buffer.byteOffset);
28534
27039
  const {
28535
- parse: parse6
27040
+ parse: parse5
28536
27041
  } = context;
28537
27042
  const dracoOptions = {
28538
27043
  ...options
28539
27044
  };
28540
27045
  delete dracoOptions["3d-tiles"];
28541
- const decodedData = await parse6(bufferCopy, DracoLoader2, dracoOptions, context);
27046
+ const decodedData = await parse5(bufferCopy, DracoLoader2, dracoOptions, context);
28542
27047
  const decodedAttributes = getGLTFAccessors(decodedData.attributes);
28543
27048
  for (const [attributeName, decodedAttribute] of Object.entries(decodedAttributes)) {
28544
27049
  if (attributeName in primitive.attributes) {
@@ -28822,12 +27327,12 @@ void main(void) {
28822
27327
  gltfScenegraph.json.lights = extension.lights;
28823
27328
  gltfScenegraph.removeExtension(KHR_LIGHTS_PUNCTUAL);
28824
27329
  }
28825
- for (const node3 of json.nodes || []) {
28826
- const nodeExtension = gltfScenegraph.getObjectExtension(node3, KHR_LIGHTS_PUNCTUAL);
27330
+ for (const node2 of json.nodes || []) {
27331
+ const nodeExtension = gltfScenegraph.getObjectExtension(node2, KHR_LIGHTS_PUNCTUAL);
28827
27332
  if (nodeExtension) {
28828
- node3.light = nodeExtension.light;
27333
+ node2.light = nodeExtension.light;
28829
27334
  }
28830
- gltfScenegraph.removeObjectExtension(node3, KHR_LIGHTS_PUNCTUAL);
27335
+ gltfScenegraph.removeObjectExtension(node2, KHR_LIGHTS_PUNCTUAL);
28831
27336
  }
28832
27337
  }
28833
27338
  async function encode3(gltfData) {
@@ -28843,8 +27348,8 @@ void main(void) {
28843
27348
  }
28844
27349
  if (gltfScenegraph.json.lights) {
28845
27350
  for (const light of gltfScenegraph.json.lights) {
28846
- const node3 = light.node;
28847
- gltfScenegraph.addObjectExtension(node3, KHR_LIGHTS_PUNCTUAL, light);
27351
+ const node2 = light.node;
27352
+ gltfScenegraph.addObjectExtension(node2, KHR_LIGHTS_PUNCTUAL, light);
28848
27353
  }
28849
27354
  delete gltfScenegraph.json.lights;
28850
27355
  }
@@ -29207,11 +27712,11 @@ void main(void) {
29207
27712
  for (const mesh of json.meshes) {
29208
27713
  this._convertMeshIds(mesh);
29209
27714
  }
29210
- for (const node3 of json.nodes) {
29211
- this._convertNodeIds(node3);
27715
+ for (const node2 of json.nodes) {
27716
+ this._convertNodeIds(node2);
29212
27717
  }
29213
- for (const node3 of json.scenes) {
29214
- this._convertSceneIds(node3);
27718
+ for (const node2 of json.scenes) {
27719
+ this._convertSceneIds(node2);
29215
27720
  }
29216
27721
  }
29217
27722
  _convertTextureIds(texture) {
@@ -29237,17 +27742,17 @@ void main(void) {
29237
27742
  }
29238
27743
  }
29239
27744
  }
29240
- _convertNodeIds(node3) {
29241
- if (node3.children) {
29242
- node3.children = node3.children.map((child) => this._convertIdToIndex(child, "node"));
27745
+ _convertNodeIds(node2) {
27746
+ if (node2.children) {
27747
+ node2.children = node2.children.map((child) => this._convertIdToIndex(child, "node"));
29243
27748
  }
29244
- if (node3.meshes) {
29245
- node3.meshes = node3.meshes.map((mesh) => this._convertIdToIndex(mesh, "mesh"));
27749
+ if (node2.meshes) {
27750
+ node2.meshes = node2.meshes.map((mesh) => this._convertIdToIndex(mesh, "mesh"));
29246
27751
  }
29247
27752
  }
29248
27753
  _convertSceneIds(scene) {
29249
27754
  if (scene.nodes) {
29250
- scene.nodes = scene.nodes.map((node3) => this._convertIdToIndex(node3, "node"));
27755
+ scene.nodes = scene.nodes.map((node2) => this._convertIdToIndex(node2, "node"));
29251
27756
  }
29252
27757
  }
29253
27758
  _convertIdsToIndices(json, topLevelArrayName) {
@@ -29394,7 +27899,7 @@ void main(void) {
29394
27899
  json.meshes = json.meshes.map((mesh, i3) => this._resolveMesh(mesh, i3));
29395
27900
  }
29396
27901
  if (json.nodes) {
29397
- json.nodes = json.nodes.map((node3, i3) => this._resolveNode(node3, i3));
27902
+ json.nodes = json.nodes.map((node2, i3) => this._resolveNode(node2, i3));
29398
27903
  }
29399
27904
  if (json.skins) {
29400
27905
  json.skins = json.skins.map((skin, i3) => this._resolveSkin(skin, i3));
@@ -29454,18 +27959,18 @@ void main(void) {
29454
27959
  }
29455
27960
  _resolveScene(scene, index) {
29456
27961
  scene.id = scene.id || "scene-".concat(index);
29457
- scene.nodes = (scene.nodes || []).map((node3) => this.getNode(node3));
27962
+ scene.nodes = (scene.nodes || []).map((node2) => this.getNode(node2));
29458
27963
  return scene;
29459
27964
  }
29460
- _resolveNode(node3, index) {
29461
- node3.id = node3.id || "node-".concat(index);
29462
- if (node3.children) {
29463
- node3.children = node3.children.map((child) => this.getNode(child));
27965
+ _resolveNode(node2, index) {
27966
+ node2.id = node2.id || "node-".concat(index);
27967
+ if (node2.children) {
27968
+ node2.children = node2.children.map((child) => this.getNode(child));
29464
27969
  }
29465
- if (node3.mesh !== void 0) {
29466
- node3.mesh = this.getMesh(node3.mesh);
29467
- } else if (node3.meshes !== void 0 && node3.meshes.length) {
29468
- node3.mesh = node3.meshes.reduce((accum, meshIndex) => {
27970
+ if (node2.mesh !== void 0) {
27971
+ node2.mesh = this.getMesh(node2.mesh);
27972
+ } else if (node2.meshes !== void 0 && node2.meshes.length) {
27973
+ node2.mesh = node2.meshes.reduce((accum, meshIndex) => {
29469
27974
  const mesh = this.getMesh(meshIndex);
29470
27975
  accum.id = mesh.id;
29471
27976
  accum.primitives = accum.primitives.concat(mesh.primitives);
@@ -29474,13 +27979,13 @@ void main(void) {
29474
27979
  primitives: []
29475
27980
  });
29476
27981
  }
29477
- if (node3.camera !== void 0) {
29478
- node3.camera = this.getCamera(node3.camera);
27982
+ if (node2.camera !== void 0) {
27983
+ node2.camera = this.getCamera(node2.camera);
29479
27984
  }
29480
- if (node3.skin !== void 0) {
29481
- node3.skin = this.getSkin(node3.skin);
27985
+ if (node2.skin !== void 0) {
27986
+ node2.skin = this.getSkin(node2.skin);
29482
27987
  }
29483
- return node3;
27988
+ return node2;
29484
27989
  }
29485
27990
  _resolveSkin(skin, index) {
29486
27991
  skin.id = skin.id || "skin-".concat(index);
@@ -29653,7 +28158,7 @@ void main(void) {
29653
28158
  var GLB_CHUNK_TYPE_BIX_XVIZ_DEPRECATED = 1;
29654
28159
  var GLB_V1_CONTENT_FORMAT_JSON = 0;
29655
28160
  var LE = true;
29656
- function getMagicString4(dataView) {
28161
+ function getMagicString3(dataView) {
29657
28162
  let byteOffset = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
29658
28163
  return "".concat(String.fromCharCode(dataView.getUint8(byteOffset + 0))).concat(String.fromCharCode(dataView.getUint8(byteOffset + 1))).concat(String.fromCharCode(dataView.getUint8(byteOffset + 2))).concat(String.fromCharCode(dataView.getUint8(byteOffset + 3)));
29659
28164
  }
@@ -29671,7 +28176,7 @@ void main(void) {
29671
28176
  let byteOffset = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0;
29672
28177
  let options = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
29673
28178
  const dataView = new DataView(arrayBuffer);
29674
- const type = getMagicString4(dataView, byteOffset + 0);
28179
+ const type = getMagicString3(dataView, byteOffset + 0);
29675
28180
  const version = dataView.getUint32(byteOffset + 4, LE);
29676
28181
  const byteLength = dataView.getUint32(byteOffset + 8, LE);
29677
28182
  Object.assign(glb, {
@@ -29865,7 +28370,7 @@ void main(void) {
29865
28370
  async function loadImage2(gltf, image, index, options, context) {
29866
28371
  const {
29867
28372
  fetch: fetch2,
29868
- parse: parse6
28373
+ parse: parse5
29869
28374
  } = context;
29870
28375
  let arrayBuffer;
29871
28376
  if (image.uri && !image.hasOwnProperty("bufferView")) {
@@ -29881,7 +28386,7 @@ void main(void) {
29881
28386
  arrayBuffer = sliceArrayBuffer(array.buffer, array.byteOffset, array.byteLength);
29882
28387
  }
29883
28388
  assert11(arrayBuffer, "glTF image has no data");
29884
- let parsedImage = await parse6(arrayBuffer, [ImageLoader, BasisLoader], {
28389
+ let parsedImage = await parse5(arrayBuffer, [ImageLoader, BasisLoader], {
29885
28390
  mimeType: image.mimeType,
29886
28391
  basis: options.basis || {
29887
28392
  format: selectSupportedBasisFormat()
@@ -29905,13 +28410,13 @@ void main(void) {
29905
28410
  name: "glTF",
29906
28411
  id: "gltf",
29907
28412
  module: "gltf",
29908
- version: VERSION11,
28413
+ version: VERSION10,
29909
28414
  extensions: ["gltf", "glb"],
29910
28415
  mimeTypes: ["model/gltf+json", "model/gltf-binary"],
29911
28416
  text: true,
29912
28417
  binary: true,
29913
28418
  tests: ["glTF"],
29914
- parse: parse4,
28419
+ parse: parse3,
29915
28420
  options: {
29916
28421
  gltf: {
29917
28422
  normalize: true,
@@ -29932,7 +28437,7 @@ void main(void) {
29932
28437
  }
29933
28438
  }
29934
28439
  };
29935
- async function parse4(arrayBuffer) {
28440
+ async function parse3(arrayBuffer) {
29936
28441
  let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
29937
28442
  let context = arguments.length > 2 ? arguments[2] : void 0;
29938
28443
  options = {
@@ -29976,7 +28481,7 @@ void main(void) {
29976
28481
  extractGLTFBufferOrURL(tile, gltfFormat, options);
29977
28482
  if (tile3DOptions.loadGLTF) {
29978
28483
  const {
29979
- parse: parse6,
28484
+ parse: parse5,
29980
28485
  fetch: fetch2
29981
28486
  } = context;
29982
28487
  if (tile.gltfUrl) {
@@ -29984,7 +28489,7 @@ void main(void) {
29984
28489
  tile.gltfByteOffset = 0;
29985
28490
  }
29986
28491
  if (tile.gltfArrayBuffer) {
29987
- tile.gltf = await parse6(tile.gltfArrayBuffer, GLTFLoader, options, context);
28492
+ tile.gltf = await parse5(tile.gltfArrayBuffer, GLTFLoader, options, context);
29988
28493
  delete tile.gltfArrayBuffer;
29989
28494
  delete tile.gltfByteOffset;
29990
28495
  delete tile.gltfByteLength;
@@ -30190,9 +28695,9 @@ void main(void) {
30190
28695
  tile.rotateYtoZ = true;
30191
28696
  tile.gltfUpAxis = options["3d-tiles"] && options["3d-tiles"].assetGltfUpAxis ? options["3d-tiles"].assetGltfUpAxis : "Y";
30192
28697
  const {
30193
- parse: parse6
28698
+ parse: parse5
30194
28699
  } = context;
30195
- tile.gltf = await parse6(arrayBuffer, GLTFLoader, options, context);
28700
+ tile.gltf = await parse5(arrayBuffer, GLTFLoader, options, context);
30196
28701
  }
30197
28702
 
30198
28703
  // ../../node_modules/@loaders.gl/3d-tiles/dist/esm/lib/parsers/parse-3d-tile.js
@@ -30202,7 +28707,7 @@ void main(void) {
30202
28707
  let context = arguments.length > 3 ? arguments[3] : void 0;
30203
28708
  let tile = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {};
30204
28709
  tile.byteOffset = byteOffset;
30205
- tile.type = getMagicString3(arrayBuffer, byteOffset);
28710
+ tile.type = getMagicString2(arrayBuffer, byteOffset);
30206
28711
  switch (tile.type) {
30207
28712
  case TILE3D_TYPE.COMPOSITE:
30208
28713
  return await parseComposite3DTile(tile, arrayBuffer, byteOffset, options, context, parse3DTile);
@@ -30292,7 +28797,7 @@ void main(void) {
30292
28797
  id: "3d-tiles-subtree",
30293
28798
  name: "3D Tiles Subtree",
30294
28799
  module: "3d-tiles",
30295
- version: VERSION9,
28800
+ version: VERSION8,
30296
28801
  extensions: ["subtree"],
30297
28802
  mimeTypes: ["application/octet-stream"],
30298
28803
  tests: ["subtree"],
@@ -30300,7 +28805,11 @@ void main(void) {
30300
28805
  options: {}
30301
28806
  };
30302
28807
 
28808
+ // ../../node_modules/@loaders.gl/3d-tiles/dist/esm/lib/parsers/parse-3d-tile-header.js
28809
+ var import_core41 = __toESM(require_core3());
28810
+
30303
28811
  // ../../node_modules/@loaders.gl/3d-tiles/dist/esm/lib/parsers/helpers/parse-3d-implicit-tiles.js
28812
+ var import_core40 = __toESM(require_core3());
30304
28813
  var QUADTREE_DEVISION_COUNT = 4;
30305
28814
  var OCTREE_DEVISION_COUNT = 8;
30306
28815
  var SUBDIVISION_COUNT_MAP = {
@@ -30363,7 +28872,7 @@ void main(void) {
30363
28872
  if (isChildSubtreeAvailable) {
30364
28873
  const subtreePath = "".concat(basePath, "/").concat(subtreesUriTemplate);
30365
28874
  const childSubtreeUrl = replaceContentUrlTemplate(subtreePath, lev, x2, y2, z);
30366
- const childSubtree = await load(childSubtreeUrl, Tile3DSubtreeLoader);
28875
+ const childSubtree = await (0, import_core40.load)(childSubtreeUrl, Tile3DSubtreeLoader);
30367
28876
  subtree = childSubtree;
30368
28877
  globalData.mortonIndex = childTileMortonIndex;
30369
28878
  globalData.x = childTileX;
@@ -30598,7 +29107,7 @@ void main(void) {
30598
29107
  } = implicitTilingExtension;
30599
29108
  const replacedUrlTemplate = replaceContentUrlTemplate(subtreesUriTemplate, 0, 0, 0, 0);
30600
29109
  const subtreeUrl = resolveUri(replacedUrlTemplate, basePath);
30601
- const subtree = await load(subtreeUrl, Tile3DSubtreeLoader, options);
29110
+ const subtree = await (0, import_core41.load)(subtreeUrl, Tile3DSubtreeLoader, options);
30602
29111
  const contentUrlTemplate = resolveUri(tile.content.uri, basePath);
30603
29112
  const refine = tileset === null || tileset === void 0 ? void 0 : (_tileset$root = tileset.root) === null || _tileset$root === void 0 ? void 0 : _tileset$root.refine;
30604
29113
  const rootLodMetricValue = tile.geometricError;
@@ -30655,11 +29164,11 @@ void main(void) {
30655
29164
  id: "3d-tiles",
30656
29165
  name: "3D Tiles",
30657
29166
  module: "3d-tiles",
30658
- version: VERSION9,
29167
+ version: VERSION8,
30659
29168
  extensions: ["cmpt", "pnts", "b3dm", "i3dm"],
30660
29169
  mimeTypes: ["application/octet-stream"],
30661
29170
  tests: ["cmpt", "pnts", "b3dm", "i3dm"],
30662
- parse: parse5,
29171
+ parse: parse4,
30663
29172
  options: {
30664
29173
  "3d-tiles": {
30665
29174
  loadGLTF: true,
@@ -30694,7 +29203,7 @@ void main(void) {
30694
29203
  tilesetJson.lodMetricValue = ((_tilesetJson$root = tilesetJson.root) === null || _tilesetJson$root === void 0 ? void 0 : _tilesetJson$root.lodMetricValue) || 0;
30695
29204
  return tilesetJson;
30696
29205
  }
30697
- async function parse5(data, options, context) {
29206
+ async function parse4(data, options, context) {
30698
29207
  const loaderOptions = options["3d-tiles"] || {};
30699
29208
  let isTileset;
30700
29209
  if (loaderOptions.isTileset === "auto") {
@@ -30718,36 +29227,31 @@ void main(void) {
30718
29227
  value: [0, 0, 0, 255]
30719
29228
  },
30720
29229
  pointSize: 1,
30721
- data: null,
29230
+ data: "",
30722
29231
  loader: Tiles3DLoader,
30723
29232
  onTilesetLoad: {
30724
29233
  type: "function",
30725
29234
  value: (tileset3d) => {
30726
- },
30727
- compare: false
29235
+ }
30728
29236
  },
30729
29237
  onTileLoad: {
30730
29238
  type: "function",
30731
29239
  value: (tileHeader) => {
30732
- },
30733
- compare: false
29240
+ }
30734
29241
  },
30735
29242
  onTileUnload: {
30736
29243
  type: "function",
30737
29244
  value: (tileHeader) => {
30738
- },
30739
- compare: false
29245
+ }
30740
29246
  },
30741
29247
  onTileError: {
30742
29248
  type: "function",
30743
29249
  value: (tile, message, url) => {
30744
- },
30745
- compare: false
29250
+ }
30746
29251
  },
30747
29252
  _getMeshColor: {
30748
29253
  type: "function",
30749
- value: (tileHeader) => [255, 255, 255],
30750
- compare: false
29254
+ value: (tileHeader) => [255, 255, 255]
30751
29255
  }
30752
29256
  };
30753
29257
  var Tile3DLayer = class extends import_core43.CompositeLayer {
@@ -30869,7 +29373,7 @@ void main(void) {
30869
29373
  }
30870
29374
  Object.assign(options, preloadOptions);
30871
29375
  }
30872
- const tilesetJson = await load(tilesetUrl, loader, options.loadOptions);
29376
+ const tilesetJson = await (0, import_core44.load)(tilesetUrl, loader, options.loadOptions);
30873
29377
  const tileset3d = new Tileset3D(tilesetJson, {
30874
29378
  onTileLoad: this._onTileLoad.bind(this),
30875
29379
  onTileUnload: this._onTileUnload.bind(this),
@@ -32158,14 +30662,14 @@ void main(void) {
32158
30662
  }
32159
30663
 
32160
30664
  // ../../node_modules/@loaders.gl/terrain/dist/esm/lib/utils/version.js
32161
- var VERSION14 = true ? "3.3.1" : "latest";
30665
+ var VERSION13 = true ? "3.3.1" : "latest";
32162
30666
 
32163
30667
  // ../../node_modules/@loaders.gl/terrain/dist/esm/terrain-loader.js
32164
30668
  var TerrainLoader = {
32165
30669
  name: "Terrain",
32166
30670
  id: "terrain",
32167
30671
  module: "terrain",
32168
- version: VERSION14,
30672
+ version: VERSION13,
32169
30673
  worker: true,
32170
30674
  extensions: ["png", "pngraw", "jpg", "jpeg", "gif", "webp", "bmp"],
32171
30675
  mimeTypes: ["image/png", "image/jpeg", "image/gif", "image/webp", "image/bmp"],
@@ -32190,7 +30694,7 @@ void main(void) {
32190
30694
  name: "Quantized Mesh",
32191
30695
  id: "quantized-mesh",
32192
30696
  module: "terrain",
32193
- version: VERSION14,
30697
+ version: VERSION13,
32194
30698
  worker: true,
32195
30699
  extensions: ["terrain"],
32196
30700
  mimeTypes: ["application/vnd.quantized-mesh"],
@@ -34074,7 +32578,7 @@ void main(void) {
34074
32578
  // ../../node_modules/@loaders.gl/mvt/dist/esm/lib/parse-mvt.js
34075
32579
  function parseMVT(arrayBuffer, options) {
34076
32580
  var _options$gis, _options$mvt;
34077
- const mvtOptions = normalizeOptions2(options);
32581
+ const mvtOptions = normalizeOptions(options);
34078
32582
  const shape = (options === null || options === void 0 ? void 0 : (_options$gis = options.gis) === null || _options$gis === void 0 ? void 0 : _options$gis.format) || (options === null || options === void 0 ? void 0 : (_options$mvt = options.mvt) === null || _options$mvt === void 0 ? void 0 : _options$mvt.shape);
34079
32583
  switch (shape) {
34080
32584
  case "columnar-table":
@@ -34157,7 +32661,7 @@ void main(void) {
34157
32661
  });
34158
32662
  return features;
34159
32663
  }
34160
- function normalizeOptions2(options) {
32664
+ function normalizeOptions(options) {
34161
32665
  var _options$mvt2;
34162
32666
  if (!(options !== null && options !== void 0 && options.mvt)) {
34163
32667
  throw new Error("mvt options required");
@@ -34206,7 +32710,7 @@ void main(void) {
34206
32710
  }
34207
32711
 
34208
32712
  // ../../node_modules/@loaders.gl/mvt/dist/esm/mvt-loader.js
34209
- var VERSION15 = true ? "3.3.1" : "latest";
32713
+ var VERSION14 = true ? "3.3.1" : "latest";
34210
32714
  var DEFAULT_MVT_LOADER_OPTIONS = {
34211
32715
  mvt: {
34212
32716
  shape: "geojson",
@@ -34220,7 +32724,7 @@ void main(void) {
34220
32724
  name: "Mapbox Vector Tile",
34221
32725
  id: "mvt",
34222
32726
  module: "mvt",
34223
- version: VERSION15,
32727
+ version: VERSION14,
34224
32728
  extensions: ["mvt", "pbf"],
34225
32729
  mimeTypes: [
34226
32730
  "application/vnd.mapbox-vector-tile",
@@ -34363,6 +32867,7 @@ void main(void) {
34363
32867
  var WORLD_SIZE = 512;
34364
32868
  var defaultProps13 = {
34365
32869
  ...import_layers9.GeoJsonLayer.defaultProps,
32870
+ data: urlType,
34366
32871
  onDataLoad: {
34367
32872
  type: "function",
34368
32873
  value: null,
@@ -34786,3 +33291,5 @@ void main(void) {
34786
33291
  __publicField(GeohashLayer, "defaultProps", defaultProps14);
34787
33292
  return __toCommonJS(bundle_exports);
34788
33293
  })();
33294
+ return __exports__;
33295
+ });